@scaleway/sdk-applesilicon 1.0.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.
@@ -0,0 +1,564 @@
1
+ import type { Zone as ScwZone } from '@scaleway/sdk-client';
2
+ export type CommitmentType = 'duration_24h' | 'renewed_monthly' | 'none';
3
+ export type ConnectivityDiagnosticActionType = 'reboot_server' | 'reinstall_server';
4
+ export type ConnectivityDiagnosticDiagnosticStatus = 'unknown_status' | 'processing' | 'error' | 'completed';
5
+ export type ListServerPrivateNetworksRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc';
6
+ export type ListServersRequestOrderBy = 'created_at_asc' | 'created_at_desc';
7
+ export type ServerPrivateNetworkServerStatus = 'unknown_status' | 'attaching' | 'attached' | 'error' | 'detaching' | 'locked';
8
+ export type ServerPrivateNetworkStatus = 'vpc_unknown_status' | 'vpc_enabled' | 'vpc_updating' | 'vpc_disabled';
9
+ export type ServerStatus = 'unknown_status' | 'starting' | 'ready' | 'error' | 'rebooting' | 'updating' | 'locking' | 'locked' | 'unlocking' | 'reinstalling' | 'busy';
10
+ export type ServerTypeStock = 'unknown_stock' | 'no_stock' | 'low_stock' | 'high_stock';
11
+ export interface OS {
12
+ /**
13
+ * Unique ID of the OS.
14
+ */
15
+ id: string;
16
+ /**
17
+ * OS name.
18
+ */
19
+ name: string;
20
+ /**
21
+ * OS name as it should be displayed.
22
+ */
23
+ label: string;
24
+ /**
25
+ * URL of the image.
26
+ */
27
+ imageUrl: string;
28
+ /**
29
+ * The OS family to which this OS belongs, eg. 13 or 14.
30
+ */
31
+ family: string;
32
+ /**
33
+ * Describes if the OS is in beta.
34
+ */
35
+ isBeta: boolean;
36
+ /**
37
+ * The OS version number, eg. Sonoma has version number 14.3.
38
+ */
39
+ version: string;
40
+ /**
41
+ * The current xcode version for this OS.
42
+ */
43
+ xcodeVersion: string;
44
+ /**
45
+ * List of compatible server types.
46
+ */
47
+ compatibleServerTypes: string[];
48
+ }
49
+ export interface ServerTypeCPU {
50
+ name: string;
51
+ coreCount: number;
52
+ frequency: number;
53
+ }
54
+ export interface ServerTypeDisk {
55
+ capacity: number;
56
+ type: string;
57
+ }
58
+ export interface ServerTypeGPU {
59
+ count: number;
60
+ }
61
+ export interface ServerTypeMemory {
62
+ capacity: number;
63
+ type: string;
64
+ }
65
+ export interface ServerTypeNetwork {
66
+ publicBandwidthBps: number;
67
+ }
68
+ export interface Commitment {
69
+ type: CommitmentType;
70
+ cancelled: boolean;
71
+ }
72
+ export interface ConnectivityDiagnosticServerHealth {
73
+ lastCheckinDate?: Date;
74
+ isServerAlive: boolean;
75
+ isAgentAlive: boolean;
76
+ isMdmAlive: boolean;
77
+ isSshPortUp: boolean;
78
+ isVncPortUp: boolean;
79
+ }
80
+ export interface ServerPrivateNetwork {
81
+ /**
82
+ * ID of the Server-to-Private Network mapping.
83
+ */
84
+ id: string;
85
+ /**
86
+ * Private Network Project ID.
87
+ */
88
+ projectId: string;
89
+ /**
90
+ * Apple silicon server ID.
91
+ */
92
+ serverId: string;
93
+ /**
94
+ * Private Network ID.
95
+ */
96
+ privateNetworkId: string;
97
+ /**
98
+ * ID of the VLAN associated with the Private Network.
99
+ */
100
+ vlan?: number;
101
+ /**
102
+ * Configuration status of the Private Network.
103
+ */
104
+ status: ServerPrivateNetworkServerStatus;
105
+ /**
106
+ * Private Network creation date.
107
+ */
108
+ createdAt?: Date;
109
+ /**
110
+ * Date the Private Network was last modified.
111
+ */
112
+ updatedAt?: Date;
113
+ /**
114
+ * IPAM IP IDs of the server, if it has any.
115
+ */
116
+ ipamIpIds: string[];
117
+ }
118
+ export interface ServerType {
119
+ /**
120
+ * CPU description.
121
+ */
122
+ cpu?: ServerTypeCPU;
123
+ /**
124
+ * Size of the local disk of the server.
125
+ */
126
+ disk?: ServerTypeDisk;
127
+ /**
128
+ * Name of the type.
129
+ */
130
+ name: string;
131
+ /**
132
+ * Size of memory available.
133
+ */
134
+ memory?: ServerTypeMemory;
135
+ /**
136
+ * Current stock.
137
+ */
138
+ stock: ServerTypeStock;
139
+ /**
140
+ * Minimum duration of the lease in seconds (example. 3.4s).
141
+ */
142
+ minimumLeaseDuration?: string;
143
+ /**
144
+ * GPU description.
145
+ */
146
+ gpu?: ServerTypeGPU;
147
+ /**
148
+ * Network description.
149
+ */
150
+ network?: ServerTypeNetwork;
151
+ /**
152
+ * The default OS for this server type.
153
+ */
154
+ defaultOs?: OS;
155
+ }
156
+ export interface Server {
157
+ /**
158
+ * UUID of the server.
159
+ */
160
+ id: string;
161
+ /**
162
+ * Type of the server.
163
+ */
164
+ type: string;
165
+ /**
166
+ * Name of the server.
167
+ */
168
+ name: string;
169
+ /**
170
+ * Project this server is associated with.
171
+ */
172
+ projectId: string;
173
+ /**
174
+ * Organization this server is associated with.
175
+ */
176
+ organizationId: string;
177
+ /**
178
+ * IPv4 address of the server.
179
+ */
180
+ ip: string;
181
+ /**
182
+ * Vnc:// URL to access Apple Remote Desktop.
183
+ */
184
+ vncUrl: string;
185
+ /**
186
+ * SSH Username for remote shell.
187
+ */
188
+ sshUsername: string;
189
+ /**
190
+ * Admin password required to execute commands.
191
+ */
192
+ sudoPassword: string;
193
+ /**
194
+ * VNC port to use for remote desktop connection.
195
+ */
196
+ vncPort: number;
197
+ /**
198
+ * Initially installed OS, this does not necessarily reflect the current OS version.
199
+ */
200
+ os?: OS;
201
+ /**
202
+ * Current status of the server.
203
+ */
204
+ status: ServerStatus;
205
+ /**
206
+ * Date on which the server was created.
207
+ */
208
+ createdAt?: Date;
209
+ /**
210
+ * Date on which the server was last updated.
211
+ */
212
+ updatedAt?: Date;
213
+ /**
214
+ * Date from which the server can be deleted.
215
+ */
216
+ deletableAt?: Date;
217
+ /**
218
+ * Set to true to mark the server for automatic deletion depending on `deletable_at` date. Set to false to cancel an existing deletion schedule. Leave unset otherwise.
219
+ */
220
+ deletionScheduled: boolean;
221
+ /**
222
+ * Zone of the server.
223
+ */
224
+ zone: ScwZone;
225
+ /**
226
+ * Set to true once the server has completed its provisioning steps and is ready to use. Some OS configurations might require a reinstallation of the server before delivery depending on the available stock. A reinstallation after the initial delivery will not change this flag and can be tracked using the server status.
227
+ */
228
+ delivered: boolean;
229
+ /**
230
+ * Activation status of optional Private Network feature support for this server.
231
+ */
232
+ vpcStatus: ServerPrivateNetworkStatus;
233
+ /**
234
+ * Commitment scheme applied to this server.
235
+ */
236
+ commitment?: Commitment;
237
+ }
238
+ export interface CommitmentTypeValue {
239
+ commitmentType: CommitmentType;
240
+ }
241
+ export interface ConnectivityDiagnostic {
242
+ id: string;
243
+ status: ConnectivityDiagnosticDiagnosticStatus;
244
+ isHealthy: boolean;
245
+ healthDetails?: ConnectivityDiagnosticServerHealth;
246
+ supportedActions: ConnectivityDiagnosticActionType[];
247
+ errorMessage: string;
248
+ }
249
+ export type CreateServerRequest = {
250
+ /**
251
+ * Zone to target. If none is passed will use default zone from the config.
252
+ */
253
+ zone?: ScwZone;
254
+ /**
255
+ * Create a server with this given name.
256
+ */
257
+ name?: string;
258
+ /**
259
+ * Create a server in the given project ID.
260
+ */
261
+ projectId?: string;
262
+ /**
263
+ * Create a server of the given type.
264
+ */
265
+ type: string;
266
+ /**
267
+ * Create a server & install the given os_id, when no os_id provided the default OS for this server type is chosen. Requesting a non-default OS will induce an extended delivery time.
268
+ */
269
+ osId?: string;
270
+ /**
271
+ * Activate the Private Network feature for this server. This feature is configured through the Apple Silicon - Private Networks API.
272
+ */
273
+ enableVpc: boolean;
274
+ /**
275
+ * Activate commitment for this server. If not specified, there is a 24h commitment due to Apple licensing (commitment_type `duration_24h`). It can be updated with the Update Server request. Available commitment depends on server type.
276
+ */
277
+ commitmentType?: CommitmentType;
278
+ };
279
+ export type DeleteServerRequest = {
280
+ /**
281
+ * Zone to target. If none is passed will use default zone from the config.
282
+ */
283
+ zone?: ScwZone;
284
+ /**
285
+ * UUID of the server you want to delete.
286
+ */
287
+ serverId: string;
288
+ };
289
+ export type GetConnectivityDiagnosticRequest = {
290
+ /**
291
+ * Zone to target. If none is passed will use default zone from the config.
292
+ */
293
+ zone?: ScwZone;
294
+ diagnosticId: string;
295
+ };
296
+ export type GetOSRequest = {
297
+ /**
298
+ * Zone to target. If none is passed will use default zone from the config.
299
+ */
300
+ zone?: ScwZone;
301
+ /**
302
+ * UUID of the OS you want to get.
303
+ */
304
+ osId: string;
305
+ };
306
+ export type GetServerRequest = {
307
+ /**
308
+ * Zone to target. If none is passed will use default zone from the config.
309
+ */
310
+ zone?: ScwZone;
311
+ /**
312
+ * UUID of the server you want to get.
313
+ */
314
+ serverId: string;
315
+ };
316
+ export type GetServerTypeRequest = {
317
+ /**
318
+ * Zone to target. If none is passed will use default zone from the config.
319
+ */
320
+ zone?: ScwZone;
321
+ /**
322
+ * Server type identifier.
323
+ */
324
+ serverType: string;
325
+ };
326
+ export type ListOSRequest = {
327
+ /**
328
+ * Zone to target. If none is passed will use default zone from the config.
329
+ */
330
+ zone?: ScwZone;
331
+ /**
332
+ * Positive integer to choose the page to return.
333
+ */
334
+ page?: number;
335
+ /**
336
+ * Positive integer lower or equal to 100 to select the number of items to return.
337
+ */
338
+ pageSize?: number;
339
+ /**
340
+ * List of compatible server types.
341
+ */
342
+ serverType?: string;
343
+ /**
344
+ * Filter OS by name (note that "11.1" will return "11.1.2" and "11.1" but not "12")).
345
+ */
346
+ name?: string;
347
+ };
348
+ export interface ListOSResponse {
349
+ /**
350
+ * Total number of OS.
351
+ */
352
+ totalCount: number;
353
+ /**
354
+ * List of OS.
355
+ */
356
+ os: OS[];
357
+ }
358
+ export interface ListServerPrivateNetworksResponse {
359
+ serverPrivateNetworks: ServerPrivateNetwork[];
360
+ totalCount: number;
361
+ }
362
+ export type ListServerTypesRequest = {
363
+ /**
364
+ * Zone to target. If none is passed will use default zone from the config.
365
+ */
366
+ zone?: ScwZone;
367
+ };
368
+ export interface ListServerTypesResponse {
369
+ /**
370
+ * Available server types.
371
+ */
372
+ serverTypes: ServerType[];
373
+ }
374
+ export type ListServersRequest = {
375
+ /**
376
+ * Zone to target. If none is passed will use default zone from the config.
377
+ */
378
+ zone?: ScwZone;
379
+ /**
380
+ * Sort order of the returned servers.
381
+ */
382
+ orderBy?: ListServersRequestOrderBy;
383
+ /**
384
+ * Only list servers of this project ID.
385
+ */
386
+ projectId?: string;
387
+ /**
388
+ * Only list servers of this Organization ID.
389
+ */
390
+ organizationId?: string;
391
+ /**
392
+ * Positive integer to choose the page to return.
393
+ */
394
+ page?: number;
395
+ /**
396
+ * Positive integer lower or equal to 100 to select the number of items to return.
397
+ */
398
+ pageSize?: number;
399
+ };
400
+ export interface ListServersResponse {
401
+ /**
402
+ * Total number of servers.
403
+ */
404
+ totalCount: number;
405
+ /**
406
+ * Paginated returned servers.
407
+ */
408
+ servers: Server[];
409
+ }
410
+ export type PrivateNetworkApiAddServerPrivateNetworkRequest = {
411
+ /**
412
+ * Zone to target. If none is passed will use default zone from the config.
413
+ */
414
+ zone?: ScwZone;
415
+ /**
416
+ * ID of the server.
417
+ */
418
+ serverId: string;
419
+ /**
420
+ * ID of the Private Network.
421
+ */
422
+ privateNetworkId: string;
423
+ /**
424
+ * IPAM IDs of IPs to attach to the server.
425
+ */
426
+ ipamIpIds?: string[];
427
+ };
428
+ export type PrivateNetworkApiDeleteServerPrivateNetworkRequest = {
429
+ /**
430
+ * Zone to target. If none is passed will use default zone from the config.
431
+ */
432
+ zone?: ScwZone;
433
+ /**
434
+ * ID of the server.
435
+ */
436
+ serverId: string;
437
+ /**
438
+ * ID of the Private Network.
439
+ */
440
+ privateNetworkId: string;
441
+ };
442
+ export type PrivateNetworkApiGetServerPrivateNetworkRequest = {
443
+ /**
444
+ * Zone to target. If none is passed will use default zone from the config.
445
+ */
446
+ zone?: ScwZone;
447
+ serverId: string;
448
+ privateNetworkId: string;
449
+ };
450
+ export type PrivateNetworkApiListServerPrivateNetworksRequest = {
451
+ /**
452
+ * Zone to target. If none is passed will use default zone from the config.
453
+ */
454
+ zone?: ScwZone;
455
+ /**
456
+ * Sort order for the returned Private Networks.
457
+ */
458
+ orderBy?: ListServerPrivateNetworksRequestOrderBy;
459
+ /**
460
+ * Page number for the returned Private Networks.
461
+ */
462
+ page?: number;
463
+ /**
464
+ * Maximum number of Private Networks per page.
465
+ */
466
+ pageSize?: number;
467
+ /**
468
+ * Filter Private Networks by server ID.
469
+ */
470
+ serverId?: string;
471
+ /**
472
+ * Filter Private Networks by Private Network ID.
473
+ */
474
+ privateNetworkId?: string;
475
+ /**
476
+ * Filter Private Networks by Organization ID.
477
+ */
478
+ organizationId?: string;
479
+ /**
480
+ * Filter Private Networks by Project ID.
481
+ */
482
+ projectId?: string;
483
+ /**
484
+ * Filter Private Networks by IPAM IP IDs.
485
+ */
486
+ ipamIpIds?: string[];
487
+ };
488
+ export type PrivateNetworkApiSetServerPrivateNetworksRequest = {
489
+ /**
490
+ * Zone to target. If none is passed will use default zone from the config.
491
+ */
492
+ zone?: ScwZone;
493
+ /**
494
+ * ID of the server.
495
+ */
496
+ serverId: string;
497
+ /**
498
+ * Object where the keys are the IDs of Private Networks and the values are arrays of IPAM IDs representing the IPs to assign to this Apple silicon server on the Private Network. If the array supplied for a Private Network is empty, the next available IP from the Private Network's CIDR block will automatically be used for attachment.
499
+ */
500
+ perPrivateNetworkIpamIpIds: Record<string, string[]>;
501
+ };
502
+ export type RebootServerRequest = {
503
+ /**
504
+ * Zone to target. If none is passed will use default zone from the config.
505
+ */
506
+ zone?: ScwZone;
507
+ /**
508
+ * UUID of the server you want to reboot.
509
+ */
510
+ serverId: string;
511
+ };
512
+ export type ReinstallServerRequest = {
513
+ /**
514
+ * Zone to target. If none is passed will use default zone from the config.
515
+ */
516
+ zone?: ScwZone;
517
+ /**
518
+ * UUID of the server you want to reinstall.
519
+ */
520
+ serverId: string;
521
+ /**
522
+ * Reinstall the server with the target OS, when no os_id provided the default OS for the server type is used.
523
+ */
524
+ osId?: string;
525
+ };
526
+ export interface SetServerPrivateNetworksResponse {
527
+ serverPrivateNetworks: ServerPrivateNetwork[];
528
+ }
529
+ export type StartConnectivityDiagnosticRequest = {
530
+ /**
531
+ * Zone to target. If none is passed will use default zone from the config.
532
+ */
533
+ zone?: ScwZone;
534
+ serverId: string;
535
+ };
536
+ export interface StartConnectivityDiagnosticResponse {
537
+ diagnosticId: string;
538
+ }
539
+ export type UpdateServerRequest = {
540
+ /**
541
+ * Zone to target. If none is passed will use default zone from the config.
542
+ */
543
+ zone?: ScwZone;
544
+ /**
545
+ * UUID of the server you want to update.
546
+ */
547
+ serverId: string;
548
+ /**
549
+ * Updated name for your server.
550
+ */
551
+ name?: string;
552
+ /**
553
+ * Specify whether the server should be flagged for automatic deletion.
554
+ */
555
+ scheduleDeletion?: boolean;
556
+ /**
557
+ * Activate or deactivate Private Network support for this server.
558
+ */
559
+ enableVpc?: boolean;
560
+ /**
561
+ * Change commitment. Use 'none' to automatically cancel a renewing commitment.
562
+ */
563
+ commitmentType?: CommitmentTypeValue;
564
+ };
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@scaleway/sdk-applesilicon",
3
+ "version": "1.0.1",
4
+ "description": "Scaleway SDK applesilicon",
5
+ "types": "dist/index.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "type": "module",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.gen.d.ts",
13
+ "import": "./dist/index.gen.js",
14
+ "require": "./dist/index.gen.cjs",
15
+ "default": "./dist/index.gen.js"
16
+ },
17
+ "./*": {
18
+ "types": "./dist/*/index.gen.d.ts",
19
+ "import": "./dist/*/index.gen.js",
20
+ "require": "./dist/*/index.gen.cjs",
21
+ "default": "./dist/*/index.gen.js"
22
+ }
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "directory": "packages_generated/applesilicon"
27
+ },
28
+ "engines": {
29
+ "node": ">=20.18.3"
30
+ },
31
+ "dependencies": {
32
+ "@scaleway/random-name": "5.1.1",
33
+ "@scaleway/sdk-std": "1.0.1"
34
+ },
35
+ "peerDependencies": {
36
+ "@scaleway/sdk-client": "^1.2.1"
37
+ },
38
+ "devDependencies": {
39
+ "@scaleway/sdk-client": "^1.2.1"
40
+ },
41
+ "bundledDependencies": [
42
+ "@scaleway/random-name"
43
+ ],
44
+ "scripts": {
45
+ "package:check": "pnpm publint",
46
+ "typecheck": "tsc --noEmit",
47
+ "type:generate": "tsc --declaration -p tsconfig.build.json",
48
+ "build": "vite build --config vite.config.ts && pnpm run type:generate",
49
+ "build:profile": "npx vite-bundle-visualizer -c vite.config.ts"
50
+ }
51
+ }