@scaleway/sdk-applesilicon 2.2.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.
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -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: [
|
|
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
|
-
|
|
187
|
-
|
|
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
|
-
|
|
335
|
-
|
|
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: [
|
|
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
|
-
|
|
448
|
-
|
|
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 = [
|
|
2
|
-
|
|
3
|
-
|
|
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) => {
|
|
@@ -372,15 +363,12 @@ const marshalBatchCreateServersRequestBatchInnerCreateServerRequest = (request,
|
|
|
372
363
|
});
|
|
373
364
|
const marshalBatchCreateServersRequest = (request, defaults) => ({
|
|
374
365
|
commitment_type: request.commitmentType,
|
|
366
|
+
enable_kext: request.enableKext,
|
|
375
367
|
enable_vpc: request.enableVpc,
|
|
376
368
|
os_id: request.osId,
|
|
377
369
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
378
370
|
public_bandwidth_bps: request.publicBandwidthBps,
|
|
379
|
-
requests: request.requests !== void 0 ? request.requests.map(
|
|
380
|
-
(elt) => marshalBatchCreateServersRequestBatchInnerCreateServerRequest(
|
|
381
|
-
elt
|
|
382
|
-
)
|
|
383
|
-
) : void 0,
|
|
371
|
+
requests: request.requests !== void 0 ? request.requests.map((elt) => marshalBatchCreateServersRequestBatchInnerCreateServerRequest(elt)) : void 0,
|
|
384
372
|
type: request.type
|
|
385
373
|
});
|
|
386
374
|
const marshalGithubRunnerConfiguration = (request, defaults) => ({
|
|
@@ -398,23 +386,17 @@ const marshalRunnerConfigurationV2 = (request, defaults) => ({
|
|
|
398
386
|
...resolveOneOf([
|
|
399
387
|
{
|
|
400
388
|
param: "github_configuration",
|
|
401
|
-
value: request.githubConfiguration !== void 0 ? marshalGithubRunnerConfiguration(
|
|
402
|
-
request.githubConfiguration
|
|
403
|
-
) : void 0
|
|
389
|
+
value: request.githubConfiguration !== void 0 ? marshalGithubRunnerConfiguration(request.githubConfiguration) : void 0
|
|
404
390
|
},
|
|
405
391
|
{
|
|
406
392
|
param: "gitlab_configuration",
|
|
407
|
-
value: request.gitlabConfiguration !== void 0 ? marshalGitlabRunnerConfiguration(
|
|
408
|
-
request.gitlabConfiguration
|
|
409
|
-
) : void 0
|
|
393
|
+
value: request.gitlabConfiguration !== void 0 ? marshalGitlabRunnerConfiguration(request.gitlabConfiguration) : void 0
|
|
410
394
|
}
|
|
411
395
|
])
|
|
412
396
|
});
|
|
413
397
|
const marshalCreateRunnerRequest = (request, defaults) => ({
|
|
414
398
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
415
|
-
runner_configuration: marshalRunnerConfigurationV2(
|
|
416
|
-
request.runnerConfiguration
|
|
417
|
-
)
|
|
399
|
+
runner_configuration: marshalRunnerConfigurationV2(request.runnerConfiguration)
|
|
418
400
|
});
|
|
419
401
|
const marshalAppliedRunnerConfigurations = (request, defaults) => ({
|
|
420
402
|
runner_configuration_ids: request.runnerConfigurationIds
|
|
@@ -426,10 +408,9 @@ const marshalRunnerConfiguration = (request, defaults) => ({
|
|
|
426
408
|
url: request.url
|
|
427
409
|
});
|
|
428
410
|
const marshalCreateServerRequest = (request, defaults) => ({
|
|
429
|
-
applied_runner_configurations: request.appliedRunnerConfigurations !== void 0 ? marshalAppliedRunnerConfigurations(
|
|
430
|
-
request.appliedRunnerConfigurations
|
|
431
|
-
) : void 0,
|
|
411
|
+
applied_runner_configurations: request.appliedRunnerConfigurations !== void 0 ? marshalAppliedRunnerConfigurations(request.appliedRunnerConfigurations) : void 0,
|
|
432
412
|
commitment_type: request.commitmentType,
|
|
413
|
+
enable_kext: request.enableKext,
|
|
433
414
|
enable_vpc: request.enableVpc,
|
|
434
415
|
name: request.name || randomName("as"),
|
|
435
416
|
os_id: request.osId,
|
|
@@ -446,23 +427,20 @@ const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaul
|
|
|
446
427
|
per_private_network_ipam_ip_ids: request.perPrivateNetworkIpamIpIds
|
|
447
428
|
});
|
|
448
429
|
const marshalReinstallServerRequest = (request, defaults) => ({
|
|
430
|
+
enable_kext: request.enableKext,
|
|
449
431
|
os_id: request.osId
|
|
450
432
|
});
|
|
451
433
|
const marshalStartConnectivityDiagnosticRequest = (request, defaults) => ({
|
|
452
434
|
server_id: request.serverId
|
|
453
435
|
});
|
|
454
436
|
const marshalUpdateRunnerRequest = (request, defaults) => ({
|
|
455
|
-
runner_configuration: marshalRunnerConfigurationV2(
|
|
456
|
-
request.runnerConfiguration
|
|
457
|
-
)
|
|
437
|
+
runner_configuration: marshalRunnerConfigurationV2(request.runnerConfiguration)
|
|
458
438
|
});
|
|
459
439
|
const marshalCommitmentTypeValue = (request, defaults) => ({
|
|
460
440
|
commitment_type: request.commitmentType
|
|
461
441
|
});
|
|
462
442
|
const marshalUpdateServerRequest = (request, defaults) => ({
|
|
463
|
-
applied_runner_configurations: request.appliedRunnerConfigurations !== void 0 ? marshalAppliedRunnerConfigurations(
|
|
464
|
-
request.appliedRunnerConfigurations
|
|
465
|
-
) : void 0,
|
|
443
|
+
applied_runner_configurations: request.appliedRunnerConfigurations !== void 0 ? marshalAppliedRunnerConfigurations(request.appliedRunnerConfigurations) : void 0,
|
|
466
444
|
commitment_type: request.commitmentType !== void 0 ? marshalCommitmentTypeValue(request.commitmentType) : void 0,
|
|
467
445
|
enable_vpc: request.enableVpc,
|
|
468
446
|
name: request.name,
|
|
@@ -362,6 +362,10 @@ export type BatchCreateServersRequest = {
|
|
|
362
362
|
* List of servers to create.
|
|
363
363
|
*/
|
|
364
364
|
requests?: BatchCreateServersRequestBatchInnerCreateServerRequest[];
|
|
365
|
+
/**
|
|
366
|
+
* Enable kernel extensions in this install of mac OS.
|
|
367
|
+
*/
|
|
368
|
+
enableKext: boolean;
|
|
365
369
|
};
|
|
366
370
|
export interface BatchCreateServersResponse {
|
|
367
371
|
/**
|
|
@@ -432,6 +436,10 @@ export type CreateServerRequest = {
|
|
|
432
436
|
* Runner configurations to apply on the server, existing ones missing from the specified configuration will be removed from the server.
|
|
433
437
|
*/
|
|
434
438
|
appliedRunnerConfigurations?: AppliedRunnerConfigurations;
|
|
439
|
+
/**
|
|
440
|
+
* Enable kernel extensions in this install of mac OS.
|
|
441
|
+
*/
|
|
442
|
+
enableKext: boolean;
|
|
435
443
|
};
|
|
436
444
|
export type DeleteRunnerRequest = {
|
|
437
445
|
/**
|
|
@@ -729,6 +737,10 @@ export type ReinstallServerRequest = {
|
|
|
729
737
|
* Reinstall the server with the target OS, when no os_id provided the default OS for the server type is used.
|
|
730
738
|
*/
|
|
731
739
|
osId?: string;
|
|
740
|
+
/**
|
|
741
|
+
* Enable kernel extensions in this install of mac OS.
|
|
742
|
+
*/
|
|
743
|
+
enableKext: boolean;
|
|
732
744
|
};
|
|
733
745
|
export interface SetServerPrivateNetworksResponse {
|
|
734
746
|
serverPrivateNetworks: ServerPrivateNetwork[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-applesilicon",
|
|
3
|
-
"version": "2.
|
|
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.
|
|
30
|
+
"@scaleway/sdk-std": "2.1.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@scaleway/sdk-client": "^2.1.0"
|