@scaleway/sdk-applesilicon 1.1.0 → 1.2.0

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.
@@ -20,6 +20,47 @@ const unmarshalOS = (data) => {
20
20
  xcodeVersion: data.xcode_version
21
21
  };
22
22
  };
23
+ const unmarshalCommitment = (data) => {
24
+ if (!sdkClient.isJSONObject(data)) {
25
+ throw new TypeError(
26
+ `Unmarshalling the type 'Commitment' failed as data isn't a dictionary.`
27
+ );
28
+ }
29
+ return {
30
+ cancelled: data.cancelled,
31
+ type: data.type
32
+ };
33
+ };
34
+ const unmarshalServer = (data) => {
35
+ if (!sdkClient.isJSONObject(data)) {
36
+ throw new TypeError(
37
+ `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
38
+ );
39
+ }
40
+ return {
41
+ commitment: data.commitment ? unmarshalCommitment(data.commitment) : void 0,
42
+ createdAt: sdkClient.unmarshalDate(data.created_at),
43
+ deletableAt: sdkClient.unmarshalDate(data.deletable_at),
44
+ deletionScheduled: data.deletion_scheduled,
45
+ delivered: data.delivered,
46
+ id: data.id,
47
+ ip: data.ip,
48
+ name: data.name,
49
+ organizationId: data.organization_id,
50
+ os: data.os ? unmarshalOS(data.os) : void 0,
51
+ projectId: data.project_id,
52
+ publicBandwidthBps: data.public_bandwidth_bps,
53
+ sshUsername: data.ssh_username,
54
+ status: data.status,
55
+ sudoPassword: data.sudo_password,
56
+ type: data.type,
57
+ updatedAt: sdkClient.unmarshalDate(data.updated_at),
58
+ vncPort: data.vnc_port,
59
+ vncUrl: data.vnc_url,
60
+ vpcStatus: data.vpc_status,
61
+ zone: data.zone
62
+ };
63
+ };
23
64
  const unmarshalServerPrivateNetwork = (data) => {
24
65
  if (!sdkClient.isJSONObject(data)) {
25
66
  throw new TypeError(
@@ -111,47 +152,6 @@ const unmarshalServerType = (data) => {
111
152
  stock: data.stock
112
153
  };
113
154
  };
114
- const unmarshalCommitment = (data) => {
115
- if (!sdkClient.isJSONObject(data)) {
116
- throw new TypeError(
117
- `Unmarshalling the type 'Commitment' failed as data isn't a dictionary.`
118
- );
119
- }
120
- return {
121
- cancelled: data.cancelled,
122
- type: data.type
123
- };
124
- };
125
- const unmarshalServer = (data) => {
126
- if (!sdkClient.isJSONObject(data)) {
127
- throw new TypeError(
128
- `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
129
- );
130
- }
131
- return {
132
- commitment: data.commitment ? unmarshalCommitment(data.commitment) : void 0,
133
- createdAt: sdkClient.unmarshalDate(data.created_at),
134
- deletableAt: sdkClient.unmarshalDate(data.deletable_at),
135
- deletionScheduled: data.deletion_scheduled,
136
- delivered: data.delivered,
137
- id: data.id,
138
- ip: data.ip,
139
- name: data.name,
140
- organizationId: data.organization_id,
141
- os: data.os ? unmarshalOS(data.os) : void 0,
142
- projectId: data.project_id,
143
- publicBandwidthBps: data.public_bandwidth_bps,
144
- sshUsername: data.ssh_username,
145
- status: data.status,
146
- sudoPassword: data.sudo_password,
147
- type: data.type,
148
- updatedAt: sdkClient.unmarshalDate(data.updated_at),
149
- vncPort: data.vnc_port,
150
- vncUrl: data.vnc_url,
151
- vpcStatus: data.vpc_status,
152
- zone: data.zone
153
- };
154
- };
155
155
  const unmarshalConnectivityDiagnosticServerHealth = (data) => {
156
156
  if (!sdkClient.isJSONObject(data)) {
157
157
  throw new TypeError(
@@ -1,9 +1,9 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
2
2
  import type { ConnectivityDiagnostic, CreateServerRequest, ListOSResponse, ListServerPrivateNetworksResponse, ListServerTypesResponse, ListServersResponse, OS, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, ReinstallServerRequest, Server, ServerPrivateNetwork, ServerType, SetServerPrivateNetworksResponse, StartConnectivityDiagnosticRequest, StartConnectivityDiagnosticResponse, UpdateServerRequest } from './types.gen';
3
3
  export declare const unmarshalOS: (data: unknown) => OS;
4
+ export declare const unmarshalServer: (data: unknown) => Server;
4
5
  export declare const unmarshalServerPrivateNetwork: (data: unknown) => ServerPrivateNetwork;
5
6
  export declare const unmarshalServerType: (data: unknown) => ServerType;
6
- export declare const unmarshalServer: (data: unknown) => Server;
7
7
  export declare const unmarshalConnectivityDiagnostic: (data: unknown) => ConnectivityDiagnostic;
8
8
  export declare const unmarshalListOSResponse: (data: unknown) => ListOSResponse;
9
9
  export declare const unmarshalListServerPrivateNetworksResponse: (data: unknown) => ListServerPrivateNetworksResponse;
@@ -18,6 +18,47 @@ const unmarshalOS = (data) => {
18
18
  xcodeVersion: data.xcode_version
19
19
  };
20
20
  };
21
+ const unmarshalCommitment = (data) => {
22
+ if (!isJSONObject(data)) {
23
+ throw new TypeError(
24
+ `Unmarshalling the type 'Commitment' failed as data isn't a dictionary.`
25
+ );
26
+ }
27
+ return {
28
+ cancelled: data.cancelled,
29
+ type: data.type
30
+ };
31
+ };
32
+ const unmarshalServer = (data) => {
33
+ if (!isJSONObject(data)) {
34
+ throw new TypeError(
35
+ `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
36
+ );
37
+ }
38
+ return {
39
+ commitment: data.commitment ? unmarshalCommitment(data.commitment) : void 0,
40
+ createdAt: unmarshalDate(data.created_at),
41
+ deletableAt: unmarshalDate(data.deletable_at),
42
+ deletionScheduled: data.deletion_scheduled,
43
+ delivered: data.delivered,
44
+ id: data.id,
45
+ ip: data.ip,
46
+ name: data.name,
47
+ organizationId: data.organization_id,
48
+ os: data.os ? unmarshalOS(data.os) : void 0,
49
+ projectId: data.project_id,
50
+ publicBandwidthBps: data.public_bandwidth_bps,
51
+ sshUsername: data.ssh_username,
52
+ status: data.status,
53
+ sudoPassword: data.sudo_password,
54
+ type: data.type,
55
+ updatedAt: unmarshalDate(data.updated_at),
56
+ vncPort: data.vnc_port,
57
+ vncUrl: data.vnc_url,
58
+ vpcStatus: data.vpc_status,
59
+ zone: data.zone
60
+ };
61
+ };
21
62
  const unmarshalServerPrivateNetwork = (data) => {
22
63
  if (!isJSONObject(data)) {
23
64
  throw new TypeError(
@@ -109,47 +150,6 @@ const unmarshalServerType = (data) => {
109
150
  stock: data.stock
110
151
  };
111
152
  };
112
- const unmarshalCommitment = (data) => {
113
- if (!isJSONObject(data)) {
114
- throw new TypeError(
115
- `Unmarshalling the type 'Commitment' failed as data isn't a dictionary.`
116
- );
117
- }
118
- return {
119
- cancelled: data.cancelled,
120
- type: data.type
121
- };
122
- };
123
- const unmarshalServer = (data) => {
124
- if (!isJSONObject(data)) {
125
- throw new TypeError(
126
- `Unmarshalling the type 'Server' failed as data isn't a dictionary.`
127
- );
128
- }
129
- return {
130
- commitment: data.commitment ? unmarshalCommitment(data.commitment) : void 0,
131
- createdAt: unmarshalDate(data.created_at),
132
- deletableAt: unmarshalDate(data.deletable_at),
133
- deletionScheduled: data.deletion_scheduled,
134
- delivered: data.delivered,
135
- id: data.id,
136
- ip: data.ip,
137
- name: data.name,
138
- organizationId: data.organization_id,
139
- os: data.os ? unmarshalOS(data.os) : void 0,
140
- projectId: data.project_id,
141
- publicBandwidthBps: data.public_bandwidth_bps,
142
- sshUsername: data.ssh_username,
143
- status: data.status,
144
- sudoPassword: data.sudo_password,
145
- type: data.type,
146
- updatedAt: unmarshalDate(data.updated_at),
147
- vncPort: data.vnc_port,
148
- vncUrl: data.vnc_url,
149
- vpcStatus: data.vpc_status,
150
- zone: data.zone
151
- };
152
- };
153
153
  const unmarshalConnectivityDiagnosticServerHealth = (data) => {
154
154
  if (!isJSONObject(data)) {
155
155
  throw new TypeError(
@@ -8,6 +8,10 @@ export type ServerPrivateNetworkServerStatus = 'unknown_status' | 'attaching' |
8
8
  export type ServerPrivateNetworkStatus = 'vpc_unknown_status' | 'vpc_enabled' | 'vpc_updating' | 'vpc_disabled';
9
9
  export type ServerStatus = 'unknown_status' | 'starting' | 'ready' | 'error' | 'rebooting' | 'updating' | 'locking' | 'locked' | 'unlocking' | 'reinstalling' | 'busy';
10
10
  export type ServerTypeStock = 'unknown_stock' | 'no_stock' | 'low_stock' | 'high_stock';
11
+ export interface Commitment {
12
+ type: CommitmentType;
13
+ cancelled: boolean;
14
+ }
11
15
  export interface OS {
12
16
  /**
13
17
  * Unique ID of the OS.
@@ -66,94 +70,6 @@ export interface ServerTypeNetwork {
66
70
  publicBandwidthBps: number;
67
71
  supportedBandwidth: number[];
68
72
  }
69
- export interface Commitment {
70
- type: CommitmentType;
71
- cancelled: boolean;
72
- }
73
- export interface ConnectivityDiagnosticServerHealth {
74
- lastCheckinDate?: Date;
75
- isServerAlive: boolean;
76
- isAgentAlive: boolean;
77
- isMdmAlive: boolean;
78
- isSshPortUp: boolean;
79
- isVncPortUp: boolean;
80
- }
81
- export interface ServerPrivateNetwork {
82
- /**
83
- * ID of the Server-to-Private Network mapping.
84
- */
85
- id: string;
86
- /**
87
- * Private Network Project ID.
88
- */
89
- projectId: string;
90
- /**
91
- * Apple silicon server ID.
92
- */
93
- serverId: string;
94
- /**
95
- * Private Network ID.
96
- */
97
- privateNetworkId: string;
98
- /**
99
- * ID of the VLAN associated with the Private Network.
100
- */
101
- vlan?: number;
102
- /**
103
- * Configuration status of the Private Network.
104
- */
105
- status: ServerPrivateNetworkServerStatus;
106
- /**
107
- * Private Network creation date.
108
- */
109
- createdAt?: Date;
110
- /**
111
- * Date the Private Network was last modified.
112
- */
113
- updatedAt?: Date;
114
- /**
115
- * IPAM IP IDs of the server, if it has any.
116
- */
117
- ipamIpIds: string[];
118
- }
119
- export interface ServerType {
120
- /**
121
- * CPU description.
122
- */
123
- cpu?: ServerTypeCPU;
124
- /**
125
- * Size of the local disk of the server.
126
- */
127
- disk?: ServerTypeDisk;
128
- /**
129
- * Name of the type.
130
- */
131
- name: string;
132
- /**
133
- * Size of memory available.
134
- */
135
- memory?: ServerTypeMemory;
136
- /**
137
- * Current stock.
138
- */
139
- stock: ServerTypeStock;
140
- /**
141
- * Minimum duration of the lease in seconds (example. 3.4s).
142
- */
143
- minimumLeaseDuration?: string;
144
- /**
145
- * GPU description.
146
- */
147
- gpu?: ServerTypeGPU;
148
- /**
149
- * Network description.
150
- */
151
- network?: ServerTypeNetwork;
152
- /**
153
- * The default OS for this server type.
154
- */
155
- defaultOs?: OS;
156
- }
157
73
  export interface Server {
158
74
  /**
159
75
  * UUID of the server.
@@ -240,6 +156,90 @@ export interface Server {
240
156
  */
241
157
  publicBandwidthBps: number;
242
158
  }
159
+ export interface ConnectivityDiagnosticServerHealth {
160
+ lastCheckinDate?: Date;
161
+ isServerAlive: boolean;
162
+ isAgentAlive: boolean;
163
+ isMdmAlive: boolean;
164
+ isSshPortUp: boolean;
165
+ isVncPortUp: boolean;
166
+ }
167
+ export interface ServerPrivateNetwork {
168
+ /**
169
+ * ID of the Server-to-Private Network mapping.
170
+ */
171
+ id: string;
172
+ /**
173
+ * Private Network Project ID.
174
+ */
175
+ projectId: string;
176
+ /**
177
+ * Apple silicon server ID.
178
+ */
179
+ serverId: string;
180
+ /**
181
+ * Private Network ID.
182
+ */
183
+ privateNetworkId: string;
184
+ /**
185
+ * ID of the VLAN associated with the Private Network.
186
+ */
187
+ vlan?: number;
188
+ /**
189
+ * Configuration status of the Private Network.
190
+ */
191
+ status: ServerPrivateNetworkServerStatus;
192
+ /**
193
+ * Private Network creation date.
194
+ */
195
+ createdAt?: Date;
196
+ /**
197
+ * Date the Private Network was last modified.
198
+ */
199
+ updatedAt?: Date;
200
+ /**
201
+ * IPAM IP IDs of the server, if it has any.
202
+ */
203
+ ipamIpIds: string[];
204
+ }
205
+ export interface ServerType {
206
+ /**
207
+ * CPU description.
208
+ */
209
+ cpu?: ServerTypeCPU;
210
+ /**
211
+ * Size of the local disk of the server.
212
+ */
213
+ disk?: ServerTypeDisk;
214
+ /**
215
+ * Name of the type.
216
+ */
217
+ name: string;
218
+ /**
219
+ * Size of memory available.
220
+ */
221
+ memory?: ServerTypeMemory;
222
+ /**
223
+ * Current stock.
224
+ */
225
+ stock: ServerTypeStock;
226
+ /**
227
+ * Minimum duration of the lease in seconds (example. 3.4s).
228
+ */
229
+ minimumLeaseDuration?: string;
230
+ /**
231
+ * GPU description.
232
+ */
233
+ gpu?: ServerTypeGPU;
234
+ /**
235
+ * Network description.
236
+ */
237
+ network?: ServerTypeNetwork;
238
+ /**
239
+ * The default OS for this server type.
240
+ */
241
+ defaultOs?: OS;
242
+ }
243
243
  export interface CommitmentTypeValue {
244
244
  commitmentType: CommitmentType;
245
245
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-applesilicon",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Scaleway SDK applesilicon",
5
5
  "license": "Apache-2.0",
6
6
  "files": [