@@ -118,7 +118,7 @@ class Server extends ServerModel {
118
118
public updateDetails ( options : ServerDetailsRequestOptions ) : Promise < Server > {
119
119
return new Promise ( async ( resolve , reject ) => {
120
120
try {
121
- let res = await this . api . call ( `/application/servers/${ this . internalId } /details` , 'PATCH' , this . getDetailsRequestObject ( options ) ) ;
121
+ let res = await this . api . call ( `/application/servers/${ this . id } /details` , 'PATCH' , this . getDetailsRequestObject ( options ) ) ;
122
122
resolve ( new Server ( this . api , res . data . attributes ) ) ;
123
123
} catch ( error ) {
124
124
reject ( error ) ;
@@ -129,7 +129,7 @@ class Server extends ServerModel {
129
129
public updateBuild ( options : ServerBuildConfigRequestOptions ) : Promise < Server > {
130
130
return new Promise ( async ( resolve , reject ) => {
131
131
try {
132
- let res = await this . api . call ( `/application/servers/${ this . internalId } /build` , 'PATCH' , this . getBuildRequestObject ( options ) ) ;
132
+ let res = await this . api . call ( `/application/servers/${ this . id } /build` , 'PATCH' , this . getBuildRequestObject ( options ) ) ;
133
133
resolve ( new Server ( this . api , res . data . attributes ) ) ;
134
134
} catch ( error ) {
135
135
reject ( error ) ;
@@ -140,7 +140,7 @@ class Server extends ServerModel {
140
140
public updateStartup ( options : ServerStartupRequestOptions ) : Promise < Server > {
141
141
return new Promise ( async ( resolve , reject ) => {
142
142
try {
143
- let res = await this . api . call ( `/application/servers/${ this . internalId } /startup` , 'PATCH' , this . getStartupRequestObject ( options ) ) ;
143
+ let res = await this . api . call ( `/application/servers/${ this . id } /startup` , 'PATCH' , this . getStartupRequestObject ( options ) ) ;
144
144
resolve ( new Server ( this . api , res . data . attributes ) ) ;
145
145
} catch ( error ) {
146
146
reject ( error ) ;
@@ -153,7 +153,7 @@ class Server extends ServerModel {
153
153
154
154
return new Promise ( async ( resolve , reject ) => {
155
155
try {
156
- await this . api . call ( `/application/servers/${ this . internalId } /suspend` , 'POST' ) ;
156
+ await this . api . call ( `/application/servers/${ this . id } /suspend` , 'POST' ) ;
157
157
resolve ( ) ;
158
158
} catch ( error ) {
159
159
reject ( error ) ;
@@ -166,7 +166,7 @@ class Server extends ServerModel {
166
166
167
167
return new Promise ( async ( resolve , reject ) => {
168
168
try {
169
- await this . api . call ( `/application/servers/${ this . internalId } /unsuspend` , 'POST' ) ;
169
+ await this . api . call ( `/application/servers/${ this . id } /unsuspend` , 'POST' ) ;
170
170
resolve ( ) ;
171
171
} catch ( error ) {
172
172
reject ( error ) ;
@@ -177,7 +177,7 @@ class Server extends ServerModel {
177
177
public reinstall ( ) : Promise < void > {
178
178
return new Promise ( async ( resolve , reject ) => {
179
179
try {
180
- await this . api . call ( `/application/servers/${ this . internalId } /reinstall` , 'POST' ) ;
180
+ await this . api . call ( `/application/servers/${ this . id } /reinstall` , 'POST' ) ;
181
181
resolve ( ) ;
182
182
} catch ( error ) {
183
183
reject ( error ) ;
@@ -187,7 +187,7 @@ class Server extends ServerModel {
187
187
public rebuild ( ) : Promise < void > {
188
188
return new Promise ( async ( resolve , reject ) => {
189
189
try {
190
- await this . api . call ( `/application/servers/${ this . internalId } /rebuild` , 'POST' ) ;
190
+ await this . api . call ( `/application/servers/${ this . id } /rebuild` , 'POST' ) ;
191
191
resolve ( ) ;
192
192
} catch ( error ) {
193
193
reject ( error ) ;
@@ -206,7 +206,7 @@ class Server extends ServerModel {
206
206
207
207
return new Promise ( async ( resolve , reject ) => {
208
208
try {
209
- let res = await this . api . call ( `/application/servers/${ this . internalId } /details` , 'PATCH' , this . getDetailsRequestObject ( { name } ) ) ;
209
+ let res = await this . api . call ( `/application/servers/${ this . id } /details` , 'PATCH' , this . getDetailsRequestObject ( { name } ) ) ;
210
210
resolve ( new Server ( this . api , res . data . attributes ) ) ;
211
211
} catch ( error ) {
212
212
reject ( error ) ;
@@ -219,7 +219,7 @@ class Server extends ServerModel {
219
219
220
220
return new Promise ( async ( resolve , reject ) => {
221
221
try {
222
- let res = await this . api . call ( `/application/servers/${ this . internalId } /details` , 'PATCH' , this . getDetailsRequestObject ( { description } ) ) ;
222
+ let res = await this . api . call ( `/application/servers/${ this . id } /details` , 'PATCH' , this . getDetailsRequestObject ( { description } ) ) ;
223
223
resolve ( new Server ( this . api , res . data . attributes ) ) ;
224
224
} catch ( error ) {
225
225
reject ( error ) ;
@@ -232,7 +232,7 @@ class Server extends ServerModel {
232
232
233
233
return new Promise ( async ( resolve , reject ) => {
234
234
try {
235
- let res = await this . api . call ( `/application/servers/${ this . internalId } /details` , 'PATCH' , this . getDetailsRequestObject ( { user } ) ) ;
235
+ let res = await this . api . call ( `/application/servers/${ this . id } /details` , 'PATCH' , this . getDetailsRequestObject ( { user } ) ) ;
236
236
resolve ( new Server ( this . api , res . data . attributes ) ) ;
237
237
} catch ( error ) {
238
238
reject ( error ) ;
@@ -246,7 +246,7 @@ class Server extends ServerModel {
246
246
247
247
return new Promise ( async ( resolve , reject ) => {
248
248
try {
249
- let res = await this . api . call ( `/application/servers/${ this . internalId } /details` , 'PATCH' , this . getDetailsRequestObject ( { limits : { memory } } ) ) ;
249
+ let res = await this . api . call ( `/application/servers/${ this . id } /details` , 'PATCH' , this . getDetailsRequestObject ( { limits : { memory } } ) ) ;
250
250
resolve ( new Server ( this . api , res . data . attributes ) ) ;
251
251
} catch ( error ) {
252
252
reject ( error ) ;
@@ -260,7 +260,7 @@ class Server extends ServerModel {
260
260
261
261
return new Promise ( async ( resolve , reject ) => {
262
262
try {
263
- let res = await this . api . call ( `/application/servers/${ this . internalId } /build` , 'PATCH' , this . getBuildRequestObject ( { limits : { cpu } } ) ) ;
263
+ let res = await this . api . call ( `/application/servers/${ this . id } /build` , 'PATCH' , this . getBuildRequestObject ( { limits : { cpu } } ) ) ;
264
264
resolve ( new Server ( this . api , res . data . attributes ) ) ;
265
265
} catch ( error ) {
266
266
reject ( error ) ;
@@ -273,7 +273,7 @@ class Server extends ServerModel {
273
273
274
274
return new Promise ( async ( resolve , reject ) => {
275
275
try {
276
- let res = await this . api . call ( `/application/servers/${ this . internalId } /build` , 'PATCH' , this . getBuildRequestObject ( { limits : { disk } } ) ) ;
276
+ let res = await this . api . call ( `/application/servers/${ this . id } /build` , 'PATCH' , this . getBuildRequestObject ( { limits : { disk } } ) ) ;
277
277
resolve ( new Server ( this . api , res . data . attributes ) ) ;
278
278
} catch ( error ) {
279
279
reject ( error ) ;
@@ -286,7 +286,7 @@ class Server extends ServerModel {
286
286
287
287
return new Promise ( async ( resolve , reject ) => {
288
288
try {
289
- let res = await this . api . call ( `/application/servers/${ this . internalId } /build` , 'PATCH' , this . getBuildRequestObject ( { limits : { io } } ) ) ;
289
+ let res = await this . api . call ( `/application/servers/${ this . id } /build` , 'PATCH' , this . getBuildRequestObject ( { limits : { io } } ) ) ;
290
290
resolve ( new Server ( this . api , res . data . attributes ) ) ;
291
291
} catch ( error ) {
292
292
reject ( error ) ;
@@ -299,7 +299,7 @@ class Server extends ServerModel {
299
299
300
300
return new Promise ( async ( resolve , reject ) => {
301
301
try {
302
- let res = await this . api . call ( `/application/servers/${ this . internalId } /build` , 'PATCH' , this . getBuildRequestObject ( { limits : { swap } } ) ) ;
302
+ let res = await this . api . call ( `/application/servers/${ this . id } /build` , 'PATCH' , this . getBuildRequestObject ( { limits : { swap } } ) ) ;
303
303
resolve ( new Server ( this . api , res . data . attributes ) ) ;
304
304
} catch ( error ) {
305
305
reject ( error ) ;
@@ -312,7 +312,7 @@ class Server extends ServerModel {
312
312
313
313
return new Promise ( async ( resolve , reject ) => {
314
314
try {
315
- let res = await this . api . call ( `/application/servers/${ this . internalId } /build` , 'PATCH' , this . getBuildRequestObject ( { feature_limits : { databases : amount } } ) ) ;
315
+ let res = await this . api . call ( `/application/servers/${ this . id } /build` , 'PATCH' , this . getBuildRequestObject ( { feature_limits : { databases : amount } } ) ) ;
316
316
resolve ( new Server ( this . api , res . data . attributes ) ) ;
317
317
} catch ( error ) {
318
318
reject ( error ) ;
@@ -325,7 +325,7 @@ class Server extends ServerModel {
325
325
326
326
return new Promise ( async ( resolve , reject ) => {
327
327
try {
328
- let res = await this . api . call ( `/application/servers/${ this . internalId } /build` , 'PATCH' , this . getBuildRequestObject ( { feature_limits : { allocations : amount } } ) ) ;
328
+ let res = await this . api . call ( `/application/servers/${ this . id } /build` , 'PATCH' , this . getBuildRequestObject ( { feature_limits : { allocations : amount } } ) ) ;
329
329
resolve ( new Server ( this . api , res . data . attributes ) ) ;
330
330
} catch ( error ) {
331
331
reject ( error ) ;
@@ -338,7 +338,7 @@ class Server extends ServerModel {
338
338
339
339
return new Promise ( async ( resolve , reject ) => {
340
340
try {
341
- let res = await this . api . call ( `/application/servers/${ this . internalId } /startup` , 'PATCH' , this . getStartupRequestObject ( { startup : command } ) ) ;
341
+ let res = await this . api . call ( `/application/servers/${ this . id } /startup` , 'PATCH' , this . getStartupRequestObject ( { startup : command } ) ) ;
342
342
resolve ( new Server ( this . api , res . data . attributes ) ) ;
343
343
} catch ( error ) {
344
344
reject ( error ) ;
@@ -351,7 +351,7 @@ class Server extends ServerModel {
351
351
352
352
return new Promise ( async ( resolve , reject ) => {
353
353
try {
354
- let res = await this . api . call ( `/application/servers/${ this . internalId } /startup` , 'PATCH' , this . getStartupRequestObject ( { egg } ) ) ;
354
+ let res = await this . api . call ( `/application/servers/${ this . id } /startup` , 'PATCH' , this . getStartupRequestObject ( { egg } ) ) ;
355
355
resolve ( new Server ( this . api , res . data . attributes ) ) ;
356
356
} catch ( error ) {
357
357
reject ( error ) ;
@@ -364,7 +364,7 @@ class Server extends ServerModel {
364
364
365
365
return new Promise ( async ( resolve , reject ) => {
366
366
try {
367
- let res = await this . api . call ( `/application/servers/${ this . internalId } /startup` , 'PATCH' , this . getStartupRequestObject ( { pack } ) ) ;
367
+ let res = await this . api . call ( `/application/servers/${ this . id } /startup` , 'PATCH' , this . getStartupRequestObject ( { pack } ) ) ;
368
368
resolve ( new Server ( this . api , res . data . attributes ) ) ;
369
369
} catch ( error ) {
370
370
reject ( error ) ;
@@ -378,7 +378,7 @@ class Server extends ServerModel {
378
378
379
379
return new Promise ( async ( resolve , reject ) => {
380
380
try {
381
- let res = await this . api . call ( `/application/servers/${ this . internalId } /startup` , 'PATCH' , this . getStartupRequestObject ( { image } ) ) ;
381
+ let res = await this . api . call ( `/application/servers/${ this . id } /startup` , 'PATCH' , this . getStartupRequestObject ( { image } ) ) ;
382
382
resolve ( new Server ( this . api , res . data . attributes ) ) ;
383
383
} catch ( error ) {
384
384
reject ( error ) ;
@@ -389,7 +389,7 @@ class Server extends ServerModel {
389
389
public createDatabase ( name : string , remote : string , host : number ) : Promise < ServerDatabase > {
390
390
return new Promise ( async ( resolve , reject ) => {
391
391
try {
392
- let res = await this . api . call ( `/application/servers/${ this . internalId } /databases` , 'POST' , { database : name , remote, host } ) ;
392
+ let res = await this . api . call ( `/application/servers/${ this . id } /databases` , 'POST' , { database : name , remote, host } ) ;
393
393
resolve ( new ServerDatabase ( this . api , res . data . attributes ) ) ;
394
394
} catch ( error ) {
395
395
reject ( error ) ;
@@ -408,7 +408,7 @@ class Server extends ServerModel {
408
408
public delete ( force ?: boolean ) : Promise < void > {
409
409
return new Promise ( async ( resolve , reject ) => {
410
410
try {
411
- await this . api . call ( `/application/servers/${ this . internalId } ${ force ? '/force' : '' } ` , 'DELETE' ) ;
411
+ await this . api . call ( `/application/servers/${ this . id } ${ force ? '/force' : '' } ` , 'DELETE' ) ;
412
412
resolve ( ) ;
413
413
} catch ( error ) {
414
414
reject ( error ) ;
0 commit comments