@scaleway/sdk-applesilicon 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,9 @@ class API extends API$1 {
10
10
  * type ∈ {'zone','region','global','unspecified'}
11
11
  */
12
12
  static LOCALITY = toApiLocality({
13
- zones: ["fr-par-3"]
13
+ zones: [
14
+ "fr-par-3"
15
+ ]
14
16
  });
15
17
  /**
16
18
  * List server types. List all technical details about Apple silicon server types available in the specified zone. Since there is only one Availability Zone for Apple silicon servers, the targeted value is `fr-par-3`.
@@ -80,10 +82,7 @@ class API extends API$1 {
80
82
  ["order_by", request.orderBy],
81
83
  ["organization_id", request.organizationId],
82
84
  ["page", request.page],
83
- [
84
- "page_size",
85
- request.pageSize ?? this.client.settings.defaultPageSize
86
- ],
85
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
87
86
  ["project_id", request.projectId]
88
87
  )
89
88
  },
@@ -103,10 +102,7 @@ class API extends API$1 {
103
102
  urlParams: urlParams(
104
103
  ["name", request.name],
105
104
  ["page", request.page],
106
- [
107
- "page_size",
108
- request.pageSize ?? this.client.settings.defaultPageSize
109
- ],
105
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
110
106
  ["server_type", request.serverType]
111
107
  )
112
108
  },
@@ -153,9 +149,7 @@ class API extends API$1 {
153
149
  * @returns A Promise of Server
154
150
  */
155
151
  waitForServer = (request, options) => waitForResource(
156
- options?.stop ?? ((res) => Promise.resolve(
157
- !SERVER_TRANSIENT_STATUSES.includes(res.status)
158
- )),
152
+ options?.stop ?? ((res) => Promise.resolve(!SERVER_TRANSIENT_STATUSES.includes(res.status))),
159
153
  this.getServer,
160
154
  request,
161
155
  options
@@ -182,10 +176,12 @@ class API extends API$1 {
182
176
  *
183
177
  * @param request - The request {@link DeleteServerRequest}
184
178
  */
185
- deleteServer = (request) => this.client.fetch({
186
- method: "DELETE",
187
- path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}`
188
- });
179
+ deleteServer = (request) => this.client.fetch(
180
+ {
181
+ method: "DELETE",
182
+ path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}`
183
+ }
184
+ );
189
185
  /**
190
186
  * Reboot a server. Reboot an existing Apple silicon server, specified by its server ID.
191
187
  *
@@ -221,10 +217,7 @@ class API extends API$1 {
221
217
  startConnectivityDiagnostic = (request) => this.client.fetch(
222
218
  {
223
219
  body: JSON.stringify(
224
- marshalStartConnectivityDiagnosticRequest(
225
- request,
226
- this.client.settings
227
- )
220
+ marshalStartConnectivityDiagnosticRequest(request, this.client.settings)
228
221
  ),
229
222
  headers: jsonContentHeaders,
230
223
  method: "POST",
@@ -277,9 +270,7 @@ class API extends API$1 {
277
270
  * @returns A Promise of Runner
278
271
  */
279
272
  waitForRunner = (request, options) => waitForResource(
280
- options?.stop ?? ((res) => Promise.resolve(
281
- !RUNNER_TRANSIENT_STATUSES.includes(res.status)
282
- )),
273
+ options?.stop ?? ((res) => Promise.resolve(!RUNNER_TRANSIENT_STATUSES.includes(res.status))),
283
274
  this.getRunner,
284
275
  request,
285
276
  options
@@ -291,10 +282,7 @@ class API extends API$1 {
291
282
  urlParams: urlParams(
292
283
  ["organization_id", request.organizationId],
293
284
  ["page", request.page],
294
- [
295
- "page_size",
296
- request.pageSize ?? this.client.settings.defaultPageSize
297
- ],
285
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
298
286
  ["project_id", request.projectId],
299
287
  ["server_id", request.serverId]
300
288
  )
@@ -330,10 +318,12 @@ class API extends API$1 {
330
318
  *
331
319
  * @param request - The request {@link DeleteRunnerRequest}
332
320
  */
333
- deleteRunner = (request) => this.client.fetch({
334
- method: "DELETE",
335
- path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/runners/${validatePathParam("runnerId", request.runnerId)}`
336
- });
321
+ deleteRunner = (request) => this.client.fetch(
322
+ {
323
+ method: "DELETE",
324
+ path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/runners/${validatePathParam("runnerId", request.runnerId)}`
325
+ }
326
+ );
337
327
  }
338
328
  class PrivateNetworkAPI extends API$1 {
339
329
  /**
@@ -341,7 +331,10 @@ class PrivateNetworkAPI extends API$1 {
341
331
  * type ∈ {'zone','region','global','unspecified'}
342
332
  */
343
333
  static LOCALITY = toApiLocality({
344
- zones: ["fr-par-1", "fr-par-3"]
334
+ zones: [
335
+ "fr-par-1",
336
+ "fr-par-3"
337
+ ]
345
338
  });
346
339
  getServerPrivateNetwork = (request) => this.client.fetch(
347
340
  {
@@ -358,11 +351,7 @@ class PrivateNetworkAPI extends API$1 {
358
351
  * @returns A Promise of ServerPrivateNetwork
359
352
  */
360
353
  waitForServerPrivateNetwork = (request, options) => waitForResource(
361
- options?.stop ?? ((res) => Promise.resolve(
362
- !SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES.includes(
363
- res.status
364
- )
365
- )),
354
+ options?.stop ?? ((res) => Promise.resolve(!SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES.includes(res.status))),
366
355
  this.getServerPrivateNetwork,
367
356
  request,
368
357
  options
@@ -376,10 +365,7 @@ class PrivateNetworkAPI extends API$1 {
376
365
  addServerPrivateNetwork = (request) => this.client.fetch(
377
366
  {
378
367
  body: JSON.stringify(
379
- marshalPrivateNetworkApiAddServerPrivateNetworkRequest(
380
- request,
381
- this.client.settings
382
- )
368
+ marshalPrivateNetworkApiAddServerPrivateNetworkRequest(request, this.client.settings)
383
369
  ),
384
370
  headers: jsonContentHeaders,
385
371
  method: "POST",
@@ -396,10 +382,7 @@ class PrivateNetworkAPI extends API$1 {
396
382
  setServerPrivateNetworks = (request) => this.client.fetch(
397
383
  {
398
384
  body: JSON.stringify(
399
- marshalPrivateNetworkApiSetServerPrivateNetworksRequest(
400
- request,
401
- this.client.settings
402
- )
385
+ marshalPrivateNetworkApiSetServerPrivateNetworksRequest(request, this.client.settings)
403
386
  ),
404
387
  headers: jsonContentHeaders,
405
388
  method: "PUT",
@@ -416,10 +399,7 @@ class PrivateNetworkAPI extends API$1 {
416
399
  ["order_by", request.orderBy],
417
400
  ["organization_id", request.organizationId],
418
401
  ["page", request.page],
419
- [
420
- "page_size",
421
- request.pageSize ?? this.client.settings.defaultPageSize
422
- ],
402
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
423
403
  ["private_network_id", request.privateNetworkId],
424
404
  ["project_id", request.projectId],
425
405
  ["server_id", request.serverId]
@@ -433,20 +413,18 @@ class PrivateNetworkAPI extends API$1 {
433
413
  * @param request - The request {@link PrivateNetworkApiListServerPrivateNetworksRequest}
434
414
  * @returns A Promise of ListServerPrivateNetworksResponse
435
415
  */
436
- listServerPrivateNetworks = (request = {}) => enrichForPagination(
437
- "serverPrivateNetworks",
438
- this.pageOfListServerPrivateNetworks,
439
- request
440
- );
416
+ listServerPrivateNetworks = (request = {}) => enrichForPagination("serverPrivateNetworks", this.pageOfListServerPrivateNetworks, request);
441
417
  /**
442
418
  * Delete a Private Network.
443
419
  *
444
420
  * @param request - The request {@link PrivateNetworkApiDeleteServerPrivateNetworkRequest}
445
421
  */
446
- deleteServerPrivateNetwork = (request) => this.client.fetch({
447
- method: "DELETE",
448
- path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
449
- });
422
+ deleteServerPrivateNetwork = (request) => this.client.fetch(
423
+ {
424
+ method: "DELETE",
425
+ path: `/apple-silicon/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
426
+ }
427
+ );
450
428
  }
451
429
  export {
452
430
  API,
@@ -1,6 +1,13 @@
1
- const RUNNER_TRANSIENT_STATUSES = ["waiting"];
2
- const SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES = ["attaching", "detaching"];
3
- const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = ["vpc_updating"];
1
+ const RUNNER_TRANSIENT_STATUSES = [
2
+ "waiting"
3
+ ];
4
+ const SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES = [
5
+ "attaching",
6
+ "detaching"
7
+ ];
8
+ const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = [
9
+ "vpc_updating"
10
+ ];
4
11
  const SERVER_TRANSIENT_STATUSES = [
5
12
  "starting",
6
13
  "rebooting",
@@ -27,10 +27,7 @@ const unmarshalOS = (data) => {
27
27
  label: data.label,
28
28
  name: data.name,
29
29
  releaseNotesUrl: data.release_notes_url,
30
- supportedServerTypes: unmarshalArrayOfObject(
31
- data.supported_server_types,
32
- unmarshalOSSupportedServerType
33
- ),
30
+ supportedServerTypes: unmarshalArrayOfObject(data.supported_server_types, unmarshalOSSupportedServerType),
34
31
  tags: data.tags,
35
32
  version: data.version,
36
33
  xcodeVersion: data.xcode_version
@@ -316,10 +313,7 @@ const unmarshalListServerPrivateNetworksResponse = (data) => {
316
313
  );
317
314
  }
318
315
  return {
319
- serverPrivateNetworks: unmarshalArrayOfObject(
320
- data.server_private_networks,
321
- unmarshalServerPrivateNetwork
322
- ),
316
+ serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork),
323
317
  totalCount: data.total_count
324
318
  };
325
319
  };
@@ -351,10 +345,7 @@ const unmarshalSetServerPrivateNetworksResponse = (data) => {
351
345
  );
352
346
  }
353
347
  return {
354
- serverPrivateNetworks: unmarshalArrayOfObject(
355
- data.server_private_networks,
356
- unmarshalServerPrivateNetwork
357
- )
348
+ serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork)
358
349
  };
359
350
  };
360
351
  const unmarshalStartConnectivityDiagnosticResponse = (data) => {
@@ -377,11 +368,7 @@ const marshalBatchCreateServersRequest = (request, defaults) => ({
377
368
  os_id: request.osId,
378
369
  project_id: request.projectId ?? defaults.defaultProjectId,
379
370
  public_bandwidth_bps: request.publicBandwidthBps,
380
- requests: request.requests !== void 0 ? request.requests.map(
381
- (elt) => marshalBatchCreateServersRequestBatchInnerCreateServerRequest(
382
- elt
383
- )
384
- ) : void 0,
371
+ requests: request.requests !== void 0 ? request.requests.map((elt) => marshalBatchCreateServersRequestBatchInnerCreateServerRequest(elt)) : void 0,
385
372
  type: request.type
386
373
  });
387
374
  const marshalGithubRunnerConfiguration = (request, defaults) => ({
@@ -399,23 +386,17 @@ const marshalRunnerConfigurationV2 = (request, defaults) => ({
399
386
  ...resolveOneOf([
400
387
  {
401
388
  param: "github_configuration",
402
- value: request.githubConfiguration !== void 0 ? marshalGithubRunnerConfiguration(
403
- request.githubConfiguration
404
- ) : void 0
389
+ value: request.githubConfiguration !== void 0 ? marshalGithubRunnerConfiguration(request.githubConfiguration) : void 0
405
390
  },
406
391
  {
407
392
  param: "gitlab_configuration",
408
- value: request.gitlabConfiguration !== void 0 ? marshalGitlabRunnerConfiguration(
409
- request.gitlabConfiguration
410
- ) : void 0
393
+ value: request.gitlabConfiguration !== void 0 ? marshalGitlabRunnerConfiguration(request.gitlabConfiguration) : void 0
411
394
  }
412
395
  ])
413
396
  });
414
397
  const marshalCreateRunnerRequest = (request, defaults) => ({
415
398
  project_id: request.projectId ?? defaults.defaultProjectId,
416
- runner_configuration: marshalRunnerConfigurationV2(
417
- request.runnerConfiguration
418
- )
399
+ runner_configuration: marshalRunnerConfigurationV2(request.runnerConfiguration)
419
400
  });
420
401
  const marshalAppliedRunnerConfigurations = (request, defaults) => ({
421
402
  runner_configuration_ids: request.runnerConfigurationIds
@@ -427,9 +408,7 @@ const marshalRunnerConfiguration = (request, defaults) => ({
427
408
  url: request.url
428
409
  });
429
410
  const marshalCreateServerRequest = (request, defaults) => ({
430
- applied_runner_configurations: request.appliedRunnerConfigurations !== void 0 ? marshalAppliedRunnerConfigurations(
431
- request.appliedRunnerConfigurations
432
- ) : void 0,
411
+ applied_runner_configurations: request.appliedRunnerConfigurations !== void 0 ? marshalAppliedRunnerConfigurations(request.appliedRunnerConfigurations) : void 0,
433
412
  commitment_type: request.commitmentType,
434
413
  enable_kext: request.enableKext,
435
414
  enable_vpc: request.enableVpc,
@@ -455,17 +434,13 @@ const marshalStartConnectivityDiagnosticRequest = (request, defaults) => ({
455
434
  server_id: request.serverId
456
435
  });
457
436
  const marshalUpdateRunnerRequest = (request, defaults) => ({
458
- runner_configuration: marshalRunnerConfigurationV2(
459
- request.runnerConfiguration
460
- )
437
+ runner_configuration: marshalRunnerConfigurationV2(request.runnerConfiguration)
461
438
  });
462
439
  const marshalCommitmentTypeValue = (request, defaults) => ({
463
440
  commitment_type: request.commitmentType
464
441
  });
465
442
  const marshalUpdateServerRequest = (request, defaults) => ({
466
- applied_runner_configurations: request.appliedRunnerConfigurations !== void 0 ? marshalAppliedRunnerConfigurations(
467
- request.appliedRunnerConfigurations
468
- ) : void 0,
443
+ applied_runner_configurations: request.appliedRunnerConfigurations !== void 0 ? marshalAppliedRunnerConfigurations(request.appliedRunnerConfigurations) : void 0,
469
444
  commitment_type: request.commitmentType !== void 0 ? marshalCommitmentTypeValue(request.commitmentType) : void 0,
470
445
  enable_vpc: request.enableVpc,
471
446
  name: request.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-applesilicon",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Scaleway SDK applesilicon",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.1.0"
30
+ "@scaleway/sdk-std": "2.1.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@scaleway/sdk-client": "^2.1.0"