@scaleway/sdk-baremetal 1.0.5 → 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.
- package/dist/index.gen.d.ts +2 -2
- package/dist/v1/api.gen.cjs +1 -1
- package/dist/v1/api.gen.d.ts +4 -4
- package/dist/v1/api.gen.js +1 -1
- package/dist/v1/content.gen.d.ts +1 -1
- package/dist/v1/index.gen.d.ts +5 -5
- package/dist/v1/marshalling.gen.cjs +122 -115
- package/dist/v1/marshalling.gen.d.ts +3 -3
- package/dist/v1/marshalling.gen.js +122 -115
- package/dist/v1/types.gen.d.ts +247 -219
- package/dist/v3/api.gen.d.ts +1 -1
- package/dist/v3/content.gen.d.ts +1 -1
- package/dist/v3/index.gen.d.ts +4 -4
- package/dist/v3/marshalling.gen.d.ts +1 -1
- package/package.json +6 -6
package/dist/index.gen.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* This file is automatically generated
|
|
3
3
|
* PLEASE DO NOT EDIT HERE
|
|
4
4
|
*/
|
|
5
|
-
export * as Baremetalv1 from './v1/index.gen';
|
|
6
|
-
export * as Baremetalv3 from './v3/index.gen';
|
|
5
|
+
export * as Baremetalv1 from './v1/index.gen.js';
|
|
6
|
+
export * as Baremetalv3 from './v3/index.gen.js';
|
package/dist/v1/api.gen.cjs
CHANGED
|
@@ -95,7 +95,7 @@ class API extends sdkClient.API {
|
|
|
95
95
|
marshalling_gen.unmarshalServer
|
|
96
96
|
);
|
|
97
97
|
/**
|
|
98
|
-
* Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags and
|
|
98
|
+
* Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.
|
|
99
99
|
*
|
|
100
100
|
* @param request - The request {@link UpdateServerRequest}
|
|
101
101
|
* @returns A Promise of Server
|
package/dist/v1/api.gen.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
2
|
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
3
|
-
import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, DeleteOptionServerRequest, DeleteServerRequest, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOSRequest, GetOfferRequest, GetOptionRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, IP, InstallServerRequest, ListOSRequest, ListOSResponse, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListServerEventsRequest, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersRequest, ListServersResponse, ListSettingsRequest, ListSettingsResponse, MigrateServerToMonthlyOfferRequest, OS, Offer, Option, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen';
|
|
3
|
+
import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, DeleteOptionServerRequest, DeleteServerRequest, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOSRequest, GetOfferRequest, GetOptionRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, IP, InstallServerRequest, ListOSRequest, ListOSResponse, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListServerEventsRequest, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersRequest, ListServersResponse, ListSettingsRequest, ListSettingsResponse, MigrateServerToMonthlyOfferRequest, OS, Offer, Option, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen.js';
|
|
4
4
|
/**
|
|
5
5
|
* Elastic Metal API.
|
|
6
6
|
|
|
@@ -46,7 +46,7 @@ export declare class API extends ParentAPI {
|
|
|
46
46
|
*/
|
|
47
47
|
createServer: (request: Readonly<CreateServerRequest>) => Promise<Server>;
|
|
48
48
|
/**
|
|
49
|
-
* Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags and
|
|
49
|
+
* Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.
|
|
50
50
|
*
|
|
51
51
|
* @param request - The request {@link UpdateServerRequest}
|
|
52
52
|
* @returns A Promise of Server
|
|
@@ -102,8 +102,8 @@ export declare class API extends ParentAPI {
|
|
|
102
102
|
* @returns A Promise of ListServerEventsResponse
|
|
103
103
|
*/
|
|
104
104
|
listServerEvents: (request: Readonly<ListServerEventsRequest>) => Promise<ListServerEventsResponse> & {
|
|
105
|
-
all: () => Promise<import("./types.gen").ServerEvent[]>;
|
|
106
|
-
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ServerEvent[], void, void>;
|
|
105
|
+
all: () => Promise<import("./types.gen.js").ServerEvent[]>;
|
|
106
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").ServerEvent[], void, void>;
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
109
|
* Get default partitioning schema. Get the default partitioning schema for the given offer ID and OS ID.
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -93,7 +93,7 @@ class API extends API$1 {
|
|
|
93
93
|
unmarshalServer
|
|
94
94
|
);
|
|
95
95
|
/**
|
|
96
|
-
* Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags and
|
|
96
|
+
* Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated.
|
|
97
97
|
*
|
|
98
98
|
* @param request - The request {@link UpdateServerRequest}
|
|
99
99
|
* @returns A Promise of Server
|
package/dist/v1/content.gen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ServerInstallStatus, ServerPrivateNetworkStatus, ServerStatus } from './types.gen';
|
|
1
|
+
import type { ServerInstallStatus, ServerPrivateNetworkStatus, ServerStatus } from './types.gen.js';
|
|
2
2
|
/** Lists transient statutes of the enum {@link ServerInstallStatus}. */
|
|
3
3
|
export declare const SERVER_INSTALL_TRANSIENT_STATUSES: ServerInstallStatus[];
|
|
4
4
|
/** Lists transient statutes of the enum {@link ServerPrivateNetworkStatus}. */
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { API, PrivateNetworkAPI, } from './api.gen';
|
|
2
|
-
export * from './content.gen';
|
|
3
|
-
export * from './marshalling.gen';
|
|
4
|
-
export type { AddOptionServerRequest, BMCAccess, CPU, CertificationOption, CreateServerRequest, CreateServerRequestInstall, DeleteOptionServerRequest, DeleteServerRequest, Disk, GPU, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOSRequest, GetOfferRequest, GetOptionRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, IP, IPReverseStatus, IPVersion, InstallServerRequest, LicenseOption, ListOSRequest, ListOSResponse, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListServerEventsRequest, ListServerEventsRequestOrderBy, ListServerEventsResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, ListSettingsRequest, ListSettingsRequestOrderBy, ListSettingsResponse, Memory, MigrateServerToMonthlyOfferRequest, OS, OSOSField, Offer, OfferOptionOffer, OfferStock, OfferSubscriptionPeriod, Option, PersistentMemory, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, PrivateNetworkOption, PublicBandwidthOption, RaidController, RebootServerRequest, RemoteAccessOption, Schema, SchemaDisk, SchemaFilesystem, SchemaFilesystemFormat, SchemaPartition, SchemaPartitionLabel, SchemaPool, SchemaPoolType, SchemaRAID, SchemaRAIDLevel, SchemaZFS, Server, ServerBootType, ServerEvent, ServerInstall, ServerInstallStatus, ServerOption, ServerOptionOptionStatus, ServerPingStatus, ServerPrivateNetwork, ServerPrivateNetworkStatus, ServerRescueServer, ServerStatus, SetServerPrivateNetworksResponse, Setting, SettingType, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest, } from './types.gen';
|
|
5
|
-
export * as ValidationRules from './validation-rules.gen';
|
|
1
|
+
export { API, PrivateNetworkAPI, } from './api.gen.js';
|
|
2
|
+
export * from './content.gen.js';
|
|
3
|
+
export * from './marshalling.gen.js';
|
|
4
|
+
export type { AddOptionServerRequest, BMCAccess, CPU, CertificationOption, CreateServerRequest, CreateServerRequestInstall, DeleteOptionServerRequest, DeleteServerRequest, Disk, GPU, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOSRequest, GetOfferRequest, GetOptionRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, IP, IPReverseStatus, IPVersion, InstallServerRequest, LicenseOption, ListOSRequest, ListOSResponse, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListServerEventsRequest, ListServerEventsRequestOrderBy, ListServerEventsResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, ListSettingsRequest, ListSettingsRequestOrderBy, ListSettingsResponse, Memory, MigrateServerToMonthlyOfferRequest, OS, OSOSField, Offer, OfferOptionOffer, OfferStock, OfferSubscriptionPeriod, Option, PersistentMemory, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, PrivateNetworkOption, PublicBandwidthOption, RaidController, RebootServerRequest, RemoteAccessOption, Schema, SchemaDisk, SchemaFilesystem, SchemaFilesystemFormat, SchemaPartition, SchemaPartitionLabel, SchemaPool, SchemaPoolType, SchemaRAID, SchemaRAIDLevel, SchemaZFS, Server, ServerBootType, ServerEvent, ServerInstall, ServerInstallStatus, ServerOption, ServerOptionOptionStatus, ServerPingStatus, ServerPrivateNetwork, ServerPrivateNetworkStatus, ServerRescueServer, ServerStatus, SetServerPrivateNetworksResponse, Setting, SettingType, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest, } from './types.gen.js';
|
|
5
|
+
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -107,40 +107,6 @@ const unmarshalIP = (data) => {
|
|
|
107
107
|
version: data.version
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
|
-
const unmarshalOSOSField = (data) => {
|
|
111
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
112
|
-
throw new TypeError(
|
|
113
|
-
`Unmarshalling the type 'OSOSField' failed as data isn't a dictionary.`
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
return {
|
|
117
|
-
defaultValue: data.default_value,
|
|
118
|
-
editable: data.editable,
|
|
119
|
-
required: data.required
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
const unmarshalOS = (data) => {
|
|
123
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
124
|
-
throw new TypeError(
|
|
125
|
-
`Unmarshalling the type 'OS' failed as data isn't a dictionary.`
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
return {
|
|
129
|
-
allowed: data.allowed,
|
|
130
|
-
customPartitioningSupported: data.custom_partitioning_supported,
|
|
131
|
-
enabled: data.enabled,
|
|
132
|
-
id: data.id,
|
|
133
|
-
licenseRequired: data.license_required,
|
|
134
|
-
logoUrl: data.logo_url,
|
|
135
|
-
name: data.name,
|
|
136
|
-
password: data.password ? unmarshalOSOSField(data.password) : void 0,
|
|
137
|
-
servicePassword: data.service_password ? unmarshalOSOSField(data.service_password) : void 0,
|
|
138
|
-
serviceUser: data.service_user ? unmarshalOSOSField(data.service_user) : void 0,
|
|
139
|
-
ssh: data.ssh ? unmarshalOSOSField(data.ssh) : void 0,
|
|
140
|
-
user: data.user ? unmarshalOSOSField(data.user) : void 0,
|
|
141
|
-
version: data.version
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
110
|
const unmarshalCertificationOption = (data) => {
|
|
145
111
|
if (!sdkClient.isJSONObject(data)) {
|
|
146
112
|
throw new TypeError(
|
|
@@ -187,6 +153,117 @@ const unmarshalRemoteAccessOption = (data) => {
|
|
|
187
153
|
}
|
|
188
154
|
return {};
|
|
189
155
|
};
|
|
156
|
+
const unmarshalServerInstall = (data) => {
|
|
157
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
158
|
+
throw new TypeError(
|
|
159
|
+
`Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
hostname: data.hostname,
|
|
164
|
+
osId: data.os_id,
|
|
165
|
+
partitioningSchema: data.partitioning_schema ? unmarshalSchema(data.partitioning_schema) : void 0,
|
|
166
|
+
serviceUrl: data.service_url,
|
|
167
|
+
serviceUser: data.service_user,
|
|
168
|
+
sshKeyIds: data.ssh_key_ids,
|
|
169
|
+
status: data.status,
|
|
170
|
+
user: data.user
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
const unmarshalServerOption = (data) => {
|
|
174
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
175
|
+
throw new TypeError(
|
|
176
|
+
`Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
|
|
181
|
+
expiresAt: sdkClient.unmarshalDate(data.expires_at),
|
|
182
|
+
id: data.id,
|
|
183
|
+
license: data.license ? unmarshalLicenseOption(data.license) : void 0,
|
|
184
|
+
manageable: data.manageable,
|
|
185
|
+
name: data.name,
|
|
186
|
+
privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
|
|
187
|
+
publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
|
|
188
|
+
remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
|
|
189
|
+
status: data.status
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
const unmarshalServerRescueServer = (data) => {
|
|
193
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
194
|
+
throw new TypeError(
|
|
195
|
+
`Unmarshalling the type 'ServerRescueServer' failed as data isn't a dictionary.`
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
password: data.password,
|
|
200
|
+
user: data.user
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
const unmarshalServer = (data) => {
|
|
204
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
205
|
+
throw new TypeError(
|
|
206
|
+
`Unmarshalling the type 'Server' failed as data isn't a dictionary.`
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
bootType: data.boot_type,
|
|
211
|
+
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
212
|
+
description: data.description,
|
|
213
|
+
domain: data.domain,
|
|
214
|
+
id: data.id,
|
|
215
|
+
install: data.install ? unmarshalServerInstall(data.install) : void 0,
|
|
216
|
+
ips: sdkClient.unmarshalArrayOfObject(data.ips, unmarshalIP),
|
|
217
|
+
name: data.name,
|
|
218
|
+
offerId: data.offer_id,
|
|
219
|
+
offerName: data.offer_name,
|
|
220
|
+
options: sdkClient.unmarshalArrayOfObject(data.options, unmarshalServerOption),
|
|
221
|
+
organizationId: data.organization_id,
|
|
222
|
+
pingStatus: data.ping_status,
|
|
223
|
+
projectId: data.project_id,
|
|
224
|
+
protected: data.protected,
|
|
225
|
+
rescueServer: data.rescue_server ? unmarshalServerRescueServer(data.rescue_server) : void 0,
|
|
226
|
+
status: data.status,
|
|
227
|
+
tags: data.tags,
|
|
228
|
+
updatedAt: sdkClient.unmarshalDate(data.updated_at),
|
|
229
|
+
zone: data.zone
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
const unmarshalOSOSField = (data) => {
|
|
233
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
234
|
+
throw new TypeError(
|
|
235
|
+
`Unmarshalling the type 'OSOSField' failed as data isn't a dictionary.`
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
return {
|
|
239
|
+
defaultValue: data.default_value,
|
|
240
|
+
editable: data.editable,
|
|
241
|
+
required: data.required
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
const unmarshalOS = (data) => {
|
|
245
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
246
|
+
throw new TypeError(
|
|
247
|
+
`Unmarshalling the type 'OS' failed as data isn't a dictionary.`
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
return {
|
|
251
|
+
allowed: data.allowed,
|
|
252
|
+
customPartitioningSupported: data.custom_partitioning_supported,
|
|
253
|
+
enabled: data.enabled,
|
|
254
|
+
id: data.id,
|
|
255
|
+
licenseRequired: data.license_required,
|
|
256
|
+
logoUrl: data.logo_url,
|
|
257
|
+
name: data.name,
|
|
258
|
+
password: data.password ? unmarshalOSOSField(data.password) : void 0,
|
|
259
|
+
servicePassword: data.service_password ? unmarshalOSOSField(data.service_password) : void 0,
|
|
260
|
+
serviceUser: data.service_user ? unmarshalOSOSField(data.service_user) : void 0,
|
|
261
|
+
ssh: data.ssh ? unmarshalOSOSField(data.ssh) : void 0,
|
|
262
|
+
user: data.user ? unmarshalOSOSField(data.user) : void 0,
|
|
263
|
+
version: data.version,
|
|
264
|
+
zone: data.zone
|
|
265
|
+
};
|
|
266
|
+
};
|
|
190
267
|
const unmarshalCPU = (data) => {
|
|
191
268
|
if (!sdkClient.isJSONObject(data)) {
|
|
192
269
|
throw new TypeError(
|
|
@@ -317,7 +394,8 @@ const unmarshalOffer = (data) => {
|
|
|
317
394
|
sharedBandwidth: data.shared_bandwidth,
|
|
318
395
|
stock: data.stock,
|
|
319
396
|
subscriptionPeriod: data.subscription_period,
|
|
320
|
-
tags: data.tags
|
|
397
|
+
tags: data.tags,
|
|
398
|
+
zone: data.zone
|
|
321
399
|
};
|
|
322
400
|
};
|
|
323
401
|
const unmarshalOption = (data) => {
|
|
@@ -354,81 +432,6 @@ const unmarshalServerPrivateNetwork = (data) => {
|
|
|
354
432
|
vlan: data.vlan
|
|
355
433
|
};
|
|
356
434
|
};
|
|
357
|
-
const unmarshalServerInstall = (data) => {
|
|
358
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
359
|
-
throw new TypeError(
|
|
360
|
-
`Unmarshalling the type 'ServerInstall' failed as data isn't a dictionary.`
|
|
361
|
-
);
|
|
362
|
-
}
|
|
363
|
-
return {
|
|
364
|
-
hostname: data.hostname,
|
|
365
|
-
osId: data.os_id,
|
|
366
|
-
partitioningSchema: data.partitioning_schema ? unmarshalSchema(data.partitioning_schema) : void 0,
|
|
367
|
-
serviceUrl: data.service_url,
|
|
368
|
-
serviceUser: data.service_user,
|
|
369
|
-
sshKeyIds: data.ssh_key_ids,
|
|
370
|
-
status: data.status,
|
|
371
|
-
user: data.user
|
|
372
|
-
};
|
|
373
|
-
};
|
|
374
|
-
const unmarshalServerOption = (data) => {
|
|
375
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
376
|
-
throw new TypeError(
|
|
377
|
-
`Unmarshalling the type 'ServerOption' failed as data isn't a dictionary.`
|
|
378
|
-
);
|
|
379
|
-
}
|
|
380
|
-
return {
|
|
381
|
-
certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
|
|
382
|
-
expiresAt: sdkClient.unmarshalDate(data.expires_at),
|
|
383
|
-
id: data.id,
|
|
384
|
-
license: data.license ? unmarshalLicenseOption(data.license) : void 0,
|
|
385
|
-
manageable: data.manageable,
|
|
386
|
-
name: data.name,
|
|
387
|
-
privateNetwork: data.private_network ? unmarshalPrivateNetworkOption(data.private_network) : void 0,
|
|
388
|
-
publicBandwidth: data.public_bandwidth ? unmarshalPublicBandwidthOption(data.public_bandwidth) : void 0,
|
|
389
|
-
remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0,
|
|
390
|
-
status: data.status
|
|
391
|
-
};
|
|
392
|
-
};
|
|
393
|
-
const unmarshalServerRescueServer = (data) => {
|
|
394
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
395
|
-
throw new TypeError(
|
|
396
|
-
`Unmarshalling the type 'ServerRescueServer' failed as data isn't a dictionary.`
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
return {
|
|
400
|
-
password: data.password,
|
|
401
|
-
user: data.user
|
|
402
|
-
};
|
|
403
|
-
};
|
|
404
|
-
const unmarshalServer = (data) => {
|
|
405
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
406
|
-
throw new TypeError(
|
|
407
|
-
`Unmarshalling the type 'Server' failed as data isn't a dictionary.`
|
|
408
|
-
);
|
|
409
|
-
}
|
|
410
|
-
return {
|
|
411
|
-
bootType: data.boot_type,
|
|
412
|
-
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
413
|
-
description: data.description,
|
|
414
|
-
domain: data.domain,
|
|
415
|
-
id: data.id,
|
|
416
|
-
install: data.install ? unmarshalServerInstall(data.install) : void 0,
|
|
417
|
-
ips: sdkClient.unmarshalArrayOfObject(data.ips, unmarshalIP),
|
|
418
|
-
name: data.name,
|
|
419
|
-
offerId: data.offer_id,
|
|
420
|
-
offerName: data.offer_name,
|
|
421
|
-
options: sdkClient.unmarshalArrayOfObject(data.options, unmarshalServerOption),
|
|
422
|
-
organizationId: data.organization_id,
|
|
423
|
-
pingStatus: data.ping_status,
|
|
424
|
-
projectId: data.project_id,
|
|
425
|
-
rescueServer: data.rescue_server ? unmarshalServerRescueServer(data.rescue_server) : void 0,
|
|
426
|
-
status: data.status,
|
|
427
|
-
tags: data.tags,
|
|
428
|
-
updatedAt: sdkClient.unmarshalDate(data.updated_at),
|
|
429
|
-
zone: data.zone
|
|
430
|
-
};
|
|
431
|
-
};
|
|
432
435
|
const unmarshalSetting = (data) => {
|
|
433
436
|
if (!sdkClient.isJSONObject(data)) {
|
|
434
437
|
throw new TypeError(
|
|
@@ -571,9 +574,6 @@ const unmarshalSetServerPrivateNetworksResponse = (data) => {
|
|
|
571
574
|
)
|
|
572
575
|
};
|
|
573
576
|
};
|
|
574
|
-
const marshalAddOptionServerRequest = (request, defaults) => ({
|
|
575
|
-
expires_at: request.expiresAt
|
|
576
|
-
});
|
|
577
577
|
const marshalSchemaPartition = (request, defaults) => ({
|
|
578
578
|
label: request.label,
|
|
579
579
|
number: request.number,
|
|
@@ -630,6 +630,7 @@ const marshalCreateServerRequest = (request, defaults) => ({
|
|
|
630
630
|
name: request.name,
|
|
631
631
|
offer_id: request.offerId,
|
|
632
632
|
option_ids: request.optionIds,
|
|
633
|
+
protected: request.protected,
|
|
633
634
|
tags: request.tags,
|
|
634
635
|
...sdkClient.resolveOneOf([
|
|
635
636
|
{
|
|
@@ -644,6 +645,9 @@ const marshalCreateServerRequest = (request, defaults) => ({
|
|
|
644
645
|
}
|
|
645
646
|
])
|
|
646
647
|
});
|
|
648
|
+
const marshalAddOptionServerRequest = (request, defaults) => ({
|
|
649
|
+
expires_at: request.expiresAt
|
|
650
|
+
});
|
|
647
651
|
const marshalInstallServerRequest = (request, defaults) => ({
|
|
648
652
|
hostname: request.hostname,
|
|
649
653
|
os_id: request.osId,
|
|
@@ -661,13 +665,15 @@ const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaul
|
|
|
661
665
|
private_network_ids: request.privateNetworkIds
|
|
662
666
|
});
|
|
663
667
|
const marshalRebootServerRequest = (request, defaults) => ({
|
|
664
|
-
boot_type: request.bootType
|
|
668
|
+
boot_type: request.bootType,
|
|
669
|
+
ssh_key_ids: request.sshKeyIds
|
|
665
670
|
});
|
|
666
671
|
const marshalStartBMCAccessRequest = (request, defaults) => ({
|
|
667
672
|
ip: request.ip
|
|
668
673
|
});
|
|
669
674
|
const marshalStartServerRequest = (request, defaults) => ({
|
|
670
|
-
boot_type: request.bootType
|
|
675
|
+
boot_type: request.bootType,
|
|
676
|
+
ssh_key_ids: request.sshKeyIds
|
|
671
677
|
});
|
|
672
678
|
const marshalUpdateIPRequest = (request, defaults) => ({
|
|
673
679
|
reverse: request.reverse
|
|
@@ -675,6 +681,7 @@ const marshalUpdateIPRequest = (request, defaults) => ({
|
|
|
675
681
|
const marshalUpdateServerRequest = (request, defaults) => ({
|
|
676
682
|
description: request.description,
|
|
677
683
|
name: request.name,
|
|
684
|
+
protected: request.protected,
|
|
678
685
|
tags: request.tags
|
|
679
686
|
});
|
|
680
687
|
const marshalUpdateSettingRequest = (request, defaults) => ({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, GetServerMetricsResponse, IP, InstallServerRequest, ListOSResponse, ListOffersResponse, ListOptionsResponse, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersResponse, ListSettingsResponse, OS, Offer, Option, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen';
|
|
2
|
+
import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, GetServerMetricsResponse, IP, InstallServerRequest, ListOSResponse, ListOffersResponse, ListOptionsResponse, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersResponse, ListSettingsResponse, OS, Offer, Option, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen.js';
|
|
3
3
|
export declare const unmarshalSchema: (data: unknown) => Schema;
|
|
4
4
|
export declare const unmarshalIP: (data: unknown) => IP;
|
|
5
|
+
export declare const unmarshalServer: (data: unknown) => Server;
|
|
5
6
|
export declare const unmarshalOS: (data: unknown) => OS;
|
|
6
7
|
export declare const unmarshalOffer: (data: unknown) => Offer;
|
|
7
8
|
export declare const unmarshalOption: (data: unknown) => Option;
|
|
8
9
|
export declare const unmarshalServerPrivateNetwork: (data: unknown) => ServerPrivateNetwork;
|
|
9
|
-
export declare const unmarshalServer: (data: unknown) => Server;
|
|
10
10
|
export declare const unmarshalSetting: (data: unknown) => Setting;
|
|
11
11
|
export declare const unmarshalBMCAccess: (data: unknown) => BMCAccess;
|
|
12
12
|
export declare const unmarshalGetServerMetricsResponse: (data: unknown) => GetServerMetricsResponse;
|
|
@@ -18,9 +18,9 @@ export declare const unmarshalListServerPrivateNetworksResponse: (data: unknown)
|
|
|
18
18
|
export declare const unmarshalListServersResponse: (data: unknown) => ListServersResponse;
|
|
19
19
|
export declare const unmarshalListSettingsResponse: (data: unknown) => ListSettingsResponse;
|
|
20
20
|
export declare const unmarshalSetServerPrivateNetworksResponse: (data: unknown) => SetServerPrivateNetworksResponse;
|
|
21
|
-
export declare const marshalAddOptionServerRequest: (request: AddOptionServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
22
21
|
export declare const marshalSchema: (request: Schema, defaults: DefaultValues) => Record<string, unknown>;
|
|
23
22
|
export declare const marshalCreateServerRequest: (request: CreateServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
23
|
+
export declare const marshalAddOptionServerRequest: (request: AddOptionServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
24
24
|
export declare const marshalInstallServerRequest: (request: InstallServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
25
25
|
export declare const marshalPrivateNetworkApiAddServerPrivateNetworkRequest: (request: PrivateNetworkApiAddServerPrivateNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
26
26
|
export declare const marshalPrivateNetworkApiSetServerPrivateNetworksRequest: (request: PrivateNetworkApiSetServerPrivateNetworksRequest, defaults: DefaultValues) => Record<string, unknown>;
|