@scaleway/sdk-baremetal 2.3.1 → 2.4.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.
@@ -1,3 +1,4 @@
1
+ //#region \0rolldown/runtime.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __exportAll = (all, no_symbols) => {
3
4
  let target = {};
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
8
9
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
10
  return target;
10
11
  };
12
+ //#endregion
11
13
  export { __exportAll };
@@ -1,13 +1,14 @@
1
1
  import { SERVER_TRANSIENT_STATUSES } from "./content.gen.js";
2
2
  import { marshalAddOptionServerRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, marshalValidatePartitioningSchemaRequest, unmarshalBMCAccess, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalSchema, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse, unmarshalSetting } from "./marshalling.gen.js";
3
- import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
3
+ import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
4
+ //#region src/v1/api.gen.ts
4
5
  var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
5
6
  /**
6
7
  * Elastic Metal API.
7
8
 
8
9
  This API allows you to manage your Elastic Metal servers.
9
10
  */
10
- var API$1 = class extends API {
11
+ var API = class extends API$1 {
11
12
  /**
12
13
  * Locality of this API.
13
14
  * type ∈ {'zone','region','global','unspecified'}
@@ -348,7 +349,7 @@ var API$1 = class extends API {
348
349
  /**
349
350
  * Elastic Metal - Private Network API.
350
351
  */
351
- var PrivateNetworkAPI = class extends API {
352
+ var PrivateNetworkAPI = class extends API$1 {
352
353
  /**
353
354
  * Locality of this API.
354
355
  * type ∈ {'zone','region','global','unspecified'}
@@ -400,4 +401,5 @@ var PrivateNetworkAPI = class extends API {
400
401
  path: `/baremetal/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
401
402
  });
402
403
  };
403
- export { API$1 as API, PrivateNetworkAPI };
404
+ //#endregion
405
+ export { API, PrivateNetworkAPI };
@@ -1,9 +1,10 @@
1
+ //#region src/v1/content.gen.ts
1
2
  /** Lists transient statutes of the enum {@link ServerInstallStatus}. */
2
- const SERVER_INSTALL_TRANSIENT_STATUSES = ["to_install", "installing"];
3
+ var SERVER_INSTALL_TRANSIENT_STATUSES = ["to_install", "installing"];
3
4
  /** Lists transient statutes of the enum {@link ServerPrivateNetworkStatus}. */
4
- const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = ["attaching", "detaching"];
5
+ var SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = ["attaching", "detaching"];
5
6
  /** Lists transient statutes of the enum {@link ServerStatus}. */
6
- const SERVER_TRANSIENT_STATUSES = [
7
+ var SERVER_TRANSIENT_STATUSES = [
7
8
  "delivering",
8
9
  "stopping",
9
10
  "starting",
@@ -12,4 +13,5 @@ const SERVER_TRANSIENT_STATUSES = [
12
13
  "resetting",
13
14
  "migrating"
14
15
  ];
16
+ //#endregion
15
17
  export { SERVER_INSTALL_TRANSIENT_STATUSES, SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES };
@@ -3,6 +3,7 @@ import { SERVER_INSTALL_TRANSIENT_STATUSES, SERVER_PRIVATE_NETWORK_TRANSIENT_STA
3
3
  import { marshalAddOptionServerRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalSchema, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, marshalValidatePartitioningSchemaRequest, unmarshalBMCAccess, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalSchema, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse, unmarshalSetting } from "./marshalling.gen.js";
4
4
  import { API, PrivateNetworkAPI } from "./api.gen.js";
5
5
  import { validation_rules_gen_exports } from "./validation-rules.gen.js";
6
+ //#region src/v1/index.gen.ts
6
7
  var index_gen_exports = /* @__PURE__ */ __exportAll({
7
8
  API: () => API,
8
9
  PrivateNetworkAPI: () => PrivateNetworkAPI,
@@ -42,4 +43,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
42
43
  unmarshalSetServerPrivateNetworksResponse: () => unmarshalSetServerPrivateNetworksResponse,
43
44
  unmarshalSetting: () => unmarshalSetting
44
45
  });
45
- export { index_gen_exports };
46
+ //#endregion
47
+ export { API, PrivateNetworkAPI, SERVER_INSTALL_TRANSIENT_STATUSES, SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalAddOptionServerRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalSchema, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, marshalValidatePartitioningSchemaRequest, unmarshalBMCAccess, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalSchema, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse, unmarshalSetting };
@@ -1,4 +1,5 @@
1
1
  import { isJSONObject, marshalBlobToScwFile, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney, unmarshalTimeSeries } from "@scaleway/sdk-client";
2
+ //#region src/v1/marshalling.gen.ts
2
3
  var unmarshalSchemaPartition = (data) => {
3
4
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaPartition' failed as data isn't a dictionary.`);
4
5
  return {
@@ -45,7 +46,7 @@ var unmarshalSchemaZFS = (data) => {
45
46
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SchemaZFS' failed as data isn't a dictionary.`);
46
47
  return { pools: unmarshalArrayOfObject(data.pools, unmarshalSchemaPool) };
47
48
  };
48
- const unmarshalSchema = (data) => {
49
+ var unmarshalSchema = (data) => {
49
50
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Schema' failed as data isn't a dictionary.`);
50
51
  return {
51
52
  disks: unmarshalArrayOfObject(data.disks, unmarshalSchemaDisk),
@@ -54,7 +55,7 @@ const unmarshalSchema = (data) => {
54
55
  zfs: data.zfs ? unmarshalSchemaZFS(data.zfs) : void 0
55
56
  };
56
57
  };
57
- const unmarshalIP = (data) => {
58
+ var unmarshalIP = (data) => {
58
59
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IP' failed as data isn't a dictionary.`);
59
60
  return {
60
61
  address: data.address,
@@ -120,7 +121,7 @@ var unmarshalServerRescueServer = (data) => {
120
121
  user: data.user
121
122
  };
122
123
  };
123
- const unmarshalServer = (data) => {
124
+ var unmarshalServer = (data) => {
124
125
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Server' failed as data isn't a dictionary.`);
125
126
  return {
126
127
  bootType: data.boot_type,
@@ -154,7 +155,7 @@ var unmarshalOSOSField = (data) => {
154
155
  required: data.required
155
156
  };
156
157
  };
157
- const unmarshalOS = (data) => {
158
+ var unmarshalOS = (data) => {
158
159
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OS' failed as data isn't a dictionary.`);
159
160
  return {
160
161
  allowed: data.allowed,
@@ -240,7 +241,7 @@ var unmarshalRaidController = (data) => {
240
241
  raidLevel: data.raid_level
241
242
  };
242
243
  };
243
- const unmarshalOffer = (data) => {
244
+ var unmarshalOffer = (data) => {
244
245
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Offer' failed as data isn't a dictionary.`);
245
246
  return {
246
247
  bandwidth: data.bandwidth,
@@ -271,7 +272,7 @@ const unmarshalOffer = (data) => {
271
272
  zone: data.zone
272
273
  };
273
274
  };
274
- const unmarshalOption = (data) => {
275
+ var unmarshalOption = (data) => {
275
276
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Option' failed as data isn't a dictionary.`);
276
277
  return {
277
278
  certification: data.certification ? unmarshalCertificationOption(data.certification) : void 0,
@@ -284,7 +285,7 @@ const unmarshalOption = (data) => {
284
285
  remoteAccess: data.remote_access ? unmarshalRemoteAccessOption(data.remote_access) : void 0
285
286
  };
286
287
  };
287
- const unmarshalServerPrivateNetwork = (data) => {
288
+ var unmarshalServerPrivateNetwork = (data) => {
288
289
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerPrivateNetwork' failed as data isn't a dictionary.`);
289
290
  return {
290
291
  createdAt: unmarshalDate(data.created_at),
@@ -297,7 +298,7 @@ const unmarshalServerPrivateNetwork = (data) => {
297
298
  vlan: data.vlan
298
299
  };
299
300
  };
300
- const unmarshalSetting = (data) => {
301
+ var unmarshalSetting = (data) => {
301
302
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Setting' failed as data isn't a dictionary.`);
302
303
  return {
303
304
  enabled: data.enabled,
@@ -306,7 +307,7 @@ const unmarshalSetting = (data) => {
306
307
  type: data.type
307
308
  };
308
309
  };
309
- const unmarshalBMCAccess = (data) => {
310
+ var unmarshalBMCAccess = (data) => {
310
311
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BMCAccess' failed as data isn't a dictionary.`);
311
312
  return {
312
313
  expiresAt: unmarshalDate(data.expires_at),
@@ -315,25 +316,25 @@ const unmarshalBMCAccess = (data) => {
315
316
  url: data.url
316
317
  };
317
318
  };
318
- const unmarshalGetServerMetricsResponse = (data) => {
319
+ var unmarshalGetServerMetricsResponse = (data) => {
319
320
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetServerMetricsResponse' failed as data isn't a dictionary.`);
320
321
  return { pings: data.pings ? unmarshalTimeSeries(data.pings) : void 0 };
321
322
  };
322
- const unmarshalListOSResponse = (data) => {
323
+ var unmarshalListOSResponse = (data) => {
323
324
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOSResponse' failed as data isn't a dictionary.`);
324
325
  return {
325
326
  os: unmarshalArrayOfObject(data.os, unmarshalOS),
326
327
  totalCount: data.total_count
327
328
  };
328
329
  };
329
- const unmarshalListOffersResponse = (data) => {
330
+ var unmarshalListOffersResponse = (data) => {
330
331
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`);
331
332
  return {
332
333
  offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
333
334
  totalCount: data.total_count
334
335
  };
335
336
  };
336
- const unmarshalListOptionsResponse = (data) => {
337
+ var unmarshalListOptionsResponse = (data) => {
337
338
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOptionsResponse' failed as data isn't a dictionary.`);
338
339
  return {
339
340
  options: unmarshalArrayOfObject(data.options, unmarshalOption),
@@ -349,35 +350,35 @@ var unmarshalServerEvent = (data) => {
349
350
  updatedAt: unmarshalDate(data.updated_at)
350
351
  };
351
352
  };
352
- const unmarshalListServerEventsResponse = (data) => {
353
+ var unmarshalListServerEventsResponse = (data) => {
353
354
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerEventsResponse' failed as data isn't a dictionary.`);
354
355
  return {
355
356
  events: unmarshalArrayOfObject(data.events, unmarshalServerEvent),
356
357
  totalCount: data.total_count
357
358
  };
358
359
  };
359
- const unmarshalListServerPrivateNetworksResponse = (data) => {
360
+ var unmarshalListServerPrivateNetworksResponse = (data) => {
360
361
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
361
362
  return {
362
363
  serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork),
363
364
  totalCount: data.total_count
364
365
  };
365
366
  };
366
- const unmarshalListServersResponse = (data) => {
367
+ var unmarshalListServersResponse = (data) => {
367
368
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`);
368
369
  return {
369
370
  servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
370
371
  totalCount: data.total_count
371
372
  };
372
373
  };
373
- const unmarshalListSettingsResponse = (data) => {
374
+ var unmarshalListSettingsResponse = (data) => {
374
375
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSettingsResponse' failed as data isn't a dictionary.`);
375
376
  return {
376
377
  settings: unmarshalArrayOfObject(data.settings, unmarshalSetting),
377
378
  totalCount: data.total_count
378
379
  };
379
380
  };
380
- const unmarshalSetServerPrivateNetworksResponse = (data) => {
381
+ var unmarshalSetServerPrivateNetworksResponse = (data) => {
381
382
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
382
383
  return { serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork) };
383
384
  };
@@ -409,7 +410,7 @@ var marshalSchemaRAID = (request, defaults) => ({
409
410
  name: request.name
410
411
  });
411
412
  var marshalSchemaZFS = (request, defaults) => ({ pools: request.pools.map((elt) => marshalSchemaPool(elt, defaults)) });
412
- const marshalSchema = (request, defaults) => ({
413
+ var marshalSchema = (request, defaults) => ({
413
414
  disks: request.disks.map((elt) => marshalSchemaDisk(elt, defaults)),
414
415
  filesystems: request.filesystems.map((elt) => marshalSchemaFilesystem(elt, defaults)),
415
416
  raids: request.raids.map((elt) => marshalSchemaRAID(elt, defaults)),
@@ -425,7 +426,7 @@ var marshalCreateServerRequestInstall = (request, defaults) => ({
425
426
  ssh_key_ids: request.sshKeyIds,
426
427
  user: request.user
427
428
  });
428
- const marshalCreateServerRequest = (request, defaults) => ({
429
+ var marshalCreateServerRequest = (request, defaults) => ({
429
430
  description: request.description,
430
431
  install: request.install !== void 0 ? marshalCreateServerRequestInstall(request.install, defaults) : void 0,
431
432
  name: request.name,
@@ -444,8 +445,8 @@ const marshalCreateServerRequest = (request, defaults) => ({
444
445
  value: request.organizationId
445
446
  }])
446
447
  });
447
- const marshalAddOptionServerRequest = (request, defaults) => ({ expires_at: request.expiresAt });
448
- const marshalInstallServerRequest = async (request, defaults) => ({
448
+ var marshalAddOptionServerRequest = (request, defaults) => ({ expires_at: request.expiresAt });
449
+ var marshalInstallServerRequest = async (request, defaults) => ({
449
450
  hostname: request.hostname,
450
451
  os_id: request.osId,
451
452
  partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0,
@@ -456,29 +457,30 @@ const marshalInstallServerRequest = async (request, defaults) => ({
456
457
  user: request.user,
457
458
  user_data: request.userData !== void 0 ? await marshalBlobToScwFile(request.userData) : void 0
458
459
  });
459
- const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({ private_network_id: request.privateNetworkId });
460
- const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({ private_network_ids: request.privateNetworkIds });
461
- const marshalRebootServerRequest = (request, defaults) => ({
460
+ var marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({ private_network_id: request.privateNetworkId });
461
+ var marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({ private_network_ids: request.privateNetworkIds });
462
+ var marshalRebootServerRequest = (request, defaults) => ({
462
463
  boot_type: request.bootType,
463
464
  ssh_key_ids: request.sshKeyIds
464
465
  });
465
- const marshalStartBMCAccessRequest = (request, defaults) => ({ ip: request.ip });
466
- const marshalStartServerRequest = (request, defaults) => ({
466
+ var marshalStartBMCAccessRequest = (request, defaults) => ({ ip: request.ip });
467
+ var marshalStartServerRequest = (request, defaults) => ({
467
468
  boot_type: request.bootType,
468
469
  ssh_key_ids: request.sshKeyIds
469
470
  });
470
- const marshalUpdateIPRequest = (request, defaults) => ({ reverse: request.reverse });
471
- const marshalUpdateServerRequest = (request, defaults) => ({
471
+ var marshalUpdateIPRequest = (request, defaults) => ({ reverse: request.reverse });
472
+ var marshalUpdateServerRequest = (request, defaults) => ({
472
473
  description: request.description,
473
474
  name: request.name,
474
475
  protected: request.protected,
475
476
  tags: request.tags,
476
477
  user_data: request.userData
477
478
  });
478
- const marshalUpdateSettingRequest = (request, defaults) => ({ enabled: request.enabled });
479
- const marshalValidatePartitioningSchemaRequest = (request, defaults) => ({
479
+ var marshalUpdateSettingRequest = (request, defaults) => ({ enabled: request.enabled });
480
+ var marshalValidatePartitioningSchemaRequest = (request, defaults) => ({
480
481
  offer_id: request.offerId,
481
482
  os_id: request.osId,
482
483
  partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0
483
484
  });
485
+ //#endregion
484
486
  export { marshalAddOptionServerRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalSchema, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, marshalValidatePartitioningSchemaRequest, unmarshalBMCAccess, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalSchema, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse, unmarshalSetting };
@@ -0,0 +1,154 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "baremetal";
3
+ readonly version: "v1";
4
+ readonly folderName: "baremetalv1";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "API";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "listServers";
9
+ readonly protoName: "ListServers";
10
+ readonly paramsType: "ListServersRequest";
11
+ readonly returnType: "ListServersResponse";
12
+ readonly isList: true;
13
+ readonly paginationType: "offset";
14
+ readonly pageParamKey: "page";
15
+ readonly listItemType: "Server";
16
+ readonly isPrivate: false;
17
+ readonly description: "\"";
18
+ }, {
19
+ readonly methodName: "getServer";
20
+ readonly protoName: "GetServer";
21
+ readonly paramsType: "GetServerRequest";
22
+ readonly returnType: "Server";
23
+ readonly isList: false;
24
+ readonly paginationType: "none";
25
+ readonly isPrivate: false;
26
+ readonly description: "\"";
27
+ readonly hasWaiter: true;
28
+ }, {
29
+ readonly methodName: "getServerMetrics";
30
+ readonly protoName: "GetServerMetrics";
31
+ readonly paramsType: "GetServerMetricsRequest";
32
+ readonly returnType: "GetServerMetricsResponse";
33
+ readonly isList: false;
34
+ readonly paginationType: "none";
35
+ readonly isPrivate: false;
36
+ readonly description: "\"";
37
+ }, {
38
+ readonly methodName: "listServerEvents";
39
+ readonly protoName: "ListServerEvents";
40
+ readonly paramsType: "ListServerEventsRequest";
41
+ readonly returnType: "ListServerEventsResponse";
42
+ readonly isList: true;
43
+ readonly paginationType: "offset";
44
+ readonly pageParamKey: "page";
45
+ readonly listItemType: "ServerEvent";
46
+ readonly isPrivate: false;
47
+ readonly description: "\"";
48
+ }, {
49
+ readonly methodName: "getDefaultPartitioningSchema";
50
+ readonly protoName: "GetDefaultPartitioningSchema";
51
+ readonly paramsType: "GetDefaultPartitioningSchemaRequest";
52
+ readonly returnType: "Schema";
53
+ readonly isList: false;
54
+ readonly paginationType: "none";
55
+ readonly isPrivate: false;
56
+ readonly description: "\"";
57
+ }, {
58
+ readonly methodName: "getBMCAccess";
59
+ readonly protoName: "GetBMCAccess";
60
+ readonly paramsType: "GetBMCAccessRequest";
61
+ readonly returnType: "BMCAccess";
62
+ readonly isList: false;
63
+ readonly paginationType: "none";
64
+ readonly isPrivate: false;
65
+ readonly description: "\"";
66
+ }, {
67
+ readonly methodName: "listOffers";
68
+ readonly protoName: "ListOffers";
69
+ readonly paramsType: "ListOffersRequest";
70
+ readonly returnType: "ListOffersResponse";
71
+ readonly isList: true;
72
+ readonly paginationType: "offset";
73
+ readonly pageParamKey: "page";
74
+ readonly listItemType: "Offer";
75
+ readonly isPrivate: false;
76
+ readonly description: "\"";
77
+ }, {
78
+ readonly methodName: "getOffer";
79
+ readonly protoName: "GetOffer";
80
+ readonly paramsType: "GetOfferRequest";
81
+ readonly returnType: "Offer";
82
+ readonly isList: false;
83
+ readonly paginationType: "none";
84
+ readonly isPrivate: false;
85
+ readonly description: "\"";
86
+ }, {
87
+ readonly methodName: "getOption";
88
+ readonly protoName: "GetOption";
89
+ readonly paramsType: "GetOptionRequest";
90
+ readonly returnType: "Option";
91
+ readonly isList: false;
92
+ readonly paginationType: "none";
93
+ readonly isPrivate: false;
94
+ readonly description: "\"";
95
+ }, {
96
+ readonly methodName: "listOptions";
97
+ readonly protoName: "ListOptions";
98
+ readonly paramsType: "ListOptionsRequest";
99
+ readonly returnType: "ListOptionsResponse";
100
+ readonly isList: true;
101
+ readonly paginationType: "offset";
102
+ readonly pageParamKey: "page";
103
+ readonly listItemType: "Option";
104
+ readonly isPrivate: false;
105
+ readonly description: "\"";
106
+ }, {
107
+ readonly methodName: "listSettings";
108
+ readonly protoName: "ListSettings";
109
+ readonly paramsType: "ListSettingsRequest";
110
+ readonly returnType: "ListSettingsResponse";
111
+ readonly isList: true;
112
+ readonly paginationType: "offset";
113
+ readonly pageParamKey: "page";
114
+ readonly listItemType: "Setting";
115
+ readonly isPrivate: false;
116
+ readonly description: "\"";
117
+ }, {
118
+ readonly methodName: "listOS";
119
+ readonly protoName: "ListOS";
120
+ readonly paramsType: "ListOSRequest";
121
+ readonly returnType: "ListOSResponse";
122
+ readonly isList: true;
123
+ readonly paginationType: "offset";
124
+ readonly pageParamKey: "page";
125
+ readonly listItemType: "OS";
126
+ readonly isPrivate: false;
127
+ readonly description: "\"";
128
+ }, {
129
+ readonly methodName: "getOS";
130
+ readonly protoName: "GetOS";
131
+ readonly paramsType: "GetOSRequest";
132
+ readonly returnType: "OS";
133
+ readonly isList: false;
134
+ readonly paginationType: "none";
135
+ readonly isPrivate: false;
136
+ readonly description: "\"";
137
+ }];
138
+ }, {
139
+ readonly apiClass: "PrivateNetworkAPI";
140
+ readonly methods: readonly [{
141
+ readonly methodName: "listServerPrivateNetworks";
142
+ readonly protoName: "ListServerPrivateNetworks";
143
+ readonly paramsType: "PrivateNetworkApiListServerPrivateNetworksRequest";
144
+ readonly returnType: "ListServerPrivateNetworksResponse";
145
+ readonly isList: true;
146
+ readonly paginationType: "offset";
147
+ readonly pageParamKey: "page";
148
+ readonly listItemType: "ServerPrivateNetwork";
149
+ readonly isPrivate: false;
150
+ readonly description: "\"";
151
+ }];
152
+ }];
153
+ };
154
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,170 @@
1
+ //#region src/v1/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "baremetal",
4
+ version: "v1",
5
+ folderName: "baremetalv1",
6
+ services: [{
7
+ apiClass: "API",
8
+ methods: [
9
+ {
10
+ methodName: "listServers",
11
+ protoName: "ListServers",
12
+ paramsType: "ListServersRequest",
13
+ returnType: "ListServersResponse",
14
+ isList: true,
15
+ paginationType: "offset",
16
+ pageParamKey: "page",
17
+ listItemType: "Server",
18
+ isPrivate: false,
19
+ description: "\""
20
+ },
21
+ {
22
+ methodName: "getServer",
23
+ protoName: "GetServer",
24
+ paramsType: "GetServerRequest",
25
+ returnType: "Server",
26
+ isList: false,
27
+ paginationType: "none",
28
+ isPrivate: false,
29
+ description: "\"",
30
+ hasWaiter: true
31
+ },
32
+ {
33
+ methodName: "getServerMetrics",
34
+ protoName: "GetServerMetrics",
35
+ paramsType: "GetServerMetricsRequest",
36
+ returnType: "GetServerMetricsResponse",
37
+ isList: false,
38
+ paginationType: "none",
39
+ isPrivate: false,
40
+ description: "\""
41
+ },
42
+ {
43
+ methodName: "listServerEvents",
44
+ protoName: "ListServerEvents",
45
+ paramsType: "ListServerEventsRequest",
46
+ returnType: "ListServerEventsResponse",
47
+ isList: true,
48
+ paginationType: "offset",
49
+ pageParamKey: "page",
50
+ listItemType: "ServerEvent",
51
+ isPrivate: false,
52
+ description: "\""
53
+ },
54
+ {
55
+ methodName: "getDefaultPartitioningSchema",
56
+ protoName: "GetDefaultPartitioningSchema",
57
+ paramsType: "GetDefaultPartitioningSchemaRequest",
58
+ returnType: "Schema",
59
+ isList: false,
60
+ paginationType: "none",
61
+ isPrivate: false,
62
+ description: "\""
63
+ },
64
+ {
65
+ methodName: "getBMCAccess",
66
+ protoName: "GetBMCAccess",
67
+ paramsType: "GetBMCAccessRequest",
68
+ returnType: "BMCAccess",
69
+ isList: false,
70
+ paginationType: "none",
71
+ isPrivate: false,
72
+ description: "\""
73
+ },
74
+ {
75
+ methodName: "listOffers",
76
+ protoName: "ListOffers",
77
+ paramsType: "ListOffersRequest",
78
+ returnType: "ListOffersResponse",
79
+ isList: true,
80
+ paginationType: "offset",
81
+ pageParamKey: "page",
82
+ listItemType: "Offer",
83
+ isPrivate: false,
84
+ description: "\""
85
+ },
86
+ {
87
+ methodName: "getOffer",
88
+ protoName: "GetOffer",
89
+ paramsType: "GetOfferRequest",
90
+ returnType: "Offer",
91
+ isList: false,
92
+ paginationType: "none",
93
+ isPrivate: false,
94
+ description: "\""
95
+ },
96
+ {
97
+ methodName: "getOption",
98
+ protoName: "GetOption",
99
+ paramsType: "GetOptionRequest",
100
+ returnType: "Option",
101
+ isList: false,
102
+ paginationType: "none",
103
+ isPrivate: false,
104
+ description: "\""
105
+ },
106
+ {
107
+ methodName: "listOptions",
108
+ protoName: "ListOptions",
109
+ paramsType: "ListOptionsRequest",
110
+ returnType: "ListOptionsResponse",
111
+ isList: true,
112
+ paginationType: "offset",
113
+ pageParamKey: "page",
114
+ listItemType: "Option",
115
+ isPrivate: false,
116
+ description: "\""
117
+ },
118
+ {
119
+ methodName: "listSettings",
120
+ protoName: "ListSettings",
121
+ paramsType: "ListSettingsRequest",
122
+ returnType: "ListSettingsResponse",
123
+ isList: true,
124
+ paginationType: "offset",
125
+ pageParamKey: "page",
126
+ listItemType: "Setting",
127
+ isPrivate: false,
128
+ description: "\""
129
+ },
130
+ {
131
+ methodName: "listOS",
132
+ protoName: "ListOS",
133
+ paramsType: "ListOSRequest",
134
+ returnType: "ListOSResponse",
135
+ isList: true,
136
+ paginationType: "offset",
137
+ pageParamKey: "page",
138
+ listItemType: "OS",
139
+ isPrivate: false,
140
+ description: "\""
141
+ },
142
+ {
143
+ methodName: "getOS",
144
+ protoName: "GetOS",
145
+ paramsType: "GetOSRequest",
146
+ returnType: "OS",
147
+ isList: false,
148
+ paginationType: "none",
149
+ isPrivate: false,
150
+ description: "\""
151
+ }
152
+ ]
153
+ }, {
154
+ apiClass: "PrivateNetworkAPI",
155
+ methods: [{
156
+ methodName: "listServerPrivateNetworks",
157
+ protoName: "ListServerPrivateNetworks",
158
+ paramsType: "PrivateNetworkApiListServerPrivateNetworksRequest",
159
+ returnType: "ListServerPrivateNetworksResponse",
160
+ isList: true,
161
+ paginationType: "offset",
162
+ pageParamKey: "page",
163
+ listItemType: "ServerPrivateNetwork",
164
+ isPrivate: false,
165
+ description: "\""
166
+ }]
167
+ }]
168
+ };
169
+ //#endregion
170
+ export { queriesMetadata };
File without changes
@@ -1,4 +1,5 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ //#region src/v1/validation-rules.gen.ts
2
3
  var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
3
4
  CreateServerRequest: () => CreateServerRequest,
4
5
  CreateServerRequestInstall: () => CreateServerRequestInstall,
@@ -11,68 +12,69 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
11
12
  ListSettingsRequest: () => ListSettingsRequest,
12
13
  UpdateServerRequest: () => UpdateServerRequest
13
14
  });
14
- const CreateServerRequest = {
15
+ var CreateServerRequest = {
15
16
  description: { maxLength: 255 },
16
17
  name: { minLength: 1 }
17
18
  };
18
- const CreateServerRequestInstall = {
19
+ var CreateServerRequestInstall = {
19
20
  hostname: { maxLength: 255 },
20
21
  password: { maxLength: 255 },
21
22
  servicePassword: { maxLength: 255 },
22
23
  serviceUser: { maxLength: 255 },
23
24
  user: { maxLength: 255 }
24
25
  };
25
- const InstallServerRequest = {
26
+ var InstallServerRequest = {
26
27
  hostname: { maxLength: 255 },
27
28
  password: { maxLength: 255 },
28
29
  servicePassword: { maxLength: 255 },
29
30
  serviceUser: { maxLength: 255 },
30
31
  user: { maxLength: 255 }
31
32
  };
32
- const ListOSRequest = {
33
+ var ListOSRequest = {
33
34
  page: { greaterThan: 0 },
34
35
  pageSize: {
35
36
  greaterThan: 0,
36
37
  lessThanOrEqual: 100
37
38
  }
38
39
  };
39
- const ListOffersRequest = {
40
+ var ListOffersRequest = {
40
41
  page: { greaterThan: 0 },
41
42
  pageSize: {
42
43
  greaterThan: 0,
43
44
  lessThanOrEqual: 100
44
45
  }
45
46
  };
46
- const ListOptionsRequest = {
47
+ var ListOptionsRequest = {
47
48
  page: { greaterThan: 0 },
48
49
  pageSize: {
49
50
  greaterThan: 0,
50
51
  lessThanOrEqual: 100
51
52
  }
52
53
  };
53
- const ListServerEventsRequest = {
54
+ var ListServerEventsRequest = {
54
55
  page: { greaterThan: 0 },
55
56
  pageSize: {
56
57
  greaterThan: 0,
57
58
  lessThanOrEqual: 100
58
59
  }
59
60
  };
60
- const ListServersRequest = {
61
+ var ListServersRequest = {
61
62
  page: { greaterThan: 0 },
62
63
  pageSize: {
63
64
  greaterThan: 0,
64
65
  lessThanOrEqual: 100
65
66
  }
66
67
  };
67
- const ListSettingsRequest = {
68
+ var ListSettingsRequest = {
68
69
  page: { greaterThan: 0 },
69
70
  pageSize: {
70
71
  greaterThan: 0,
71
72
  lessThanOrEqual: 100
72
73
  }
73
74
  };
74
- const UpdateServerRequest = {
75
+ var UpdateServerRequest = {
75
76
  description: { maxLength: 255 },
76
77
  name: { maxLength: 255 }
77
78
  };
78
- export { validation_rules_gen_exports };
79
+ //#endregion
80
+ export { CreateServerRequest, CreateServerRequestInstall, InstallServerRequest, ListOSRequest, ListOffersRequest, ListOptionsRequest, ListServerEventsRequest, ListServersRequest, ListSettingsRequest, UpdateServerRequest, validation_rules_gen_exports };
@@ -1,5 +1,6 @@
1
1
  import { marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, unmarshalListServerPrivateNetworksResponse, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse } from "./marshalling.gen.js";
2
2
  import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
3
+ //#region src/v3/api.gen.ts
3
4
  var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
4
5
  /**
5
6
  * Elastic Metal - Private Networks API.
@@ -63,4 +64,5 @@ var PrivateNetworkAPI = class extends API {
63
64
  path: `/baremetal/v3/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam("serverId", request.serverId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
64
65
  });
65
66
  };
67
+ //#endregion
66
68
  export { PrivateNetworkAPI };
@@ -1,3 +1,5 @@
1
+ //#region src/v3/content.gen.ts
1
2
  /** Lists transient statutes of the enum {@link ServerPrivateNetworkStatus}. */
2
- const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = ["attaching", "detaching"];
3
+ var SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES = ["attaching", "detaching"];
4
+ //#endregion
3
5
  export { SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES };
@@ -2,6 +2,7 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, unmarshalListServerPrivateNetworksResponse, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse } from "./marshalling.gen.js";
3
3
  import { PrivateNetworkAPI } from "./api.gen.js";
4
4
  import { SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES } from "./content.gen.js";
5
+ //#region src/v3/index.gen.ts
5
6
  var index_gen_exports = /* @__PURE__ */ __exportAll({
6
7
  PrivateNetworkAPI: () => PrivateNetworkAPI,
7
8
  SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: () => SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES,
@@ -11,4 +12,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
11
12
  unmarshalServerPrivateNetwork: () => unmarshalServerPrivateNetwork,
12
13
  unmarshalSetServerPrivateNetworksResponse: () => unmarshalSetServerPrivateNetworksResponse
13
14
  });
14
- export { index_gen_exports };
15
+ //#endregion
16
+ export { PrivateNetworkAPI, SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES, index_gen_exports, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, unmarshalListServerPrivateNetworksResponse, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse };
@@ -1,5 +1,6 @@
1
1
  import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
- const unmarshalServerPrivateNetwork = (data) => {
2
+ //#region src/v3/marshalling.gen.ts
3
+ var unmarshalServerPrivateNetwork = (data) => {
3
4
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ServerPrivateNetwork' failed as data isn't a dictionary.`);
4
5
  return {
5
6
  createdAt: unmarshalDate(data.created_at),
@@ -13,20 +14,21 @@ const unmarshalServerPrivateNetwork = (data) => {
13
14
  vlan: data.vlan
14
15
  };
15
16
  };
16
- const unmarshalListServerPrivateNetworksResponse = (data) => {
17
+ var unmarshalListServerPrivateNetworksResponse = (data) => {
17
18
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
18
19
  return {
19
20
  serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork),
20
21
  totalCount: data.total_count
21
22
  };
22
23
  };
23
- const unmarshalSetServerPrivateNetworksResponse = (data) => {
24
+ var unmarshalSetServerPrivateNetworksResponse = (data) => {
24
25
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetServerPrivateNetworksResponse' failed as data isn't a dictionary.`);
25
26
  return { serverPrivateNetworks: unmarshalArrayOfObject(data.server_private_networks, unmarshalServerPrivateNetwork) };
26
27
  };
27
- const marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({
28
+ var marshalPrivateNetworkApiAddServerPrivateNetworkRequest = (request, defaults) => ({
28
29
  ipam_ip_ids: request.ipamIpIds,
29
30
  private_network_id: request.privateNetworkId
30
31
  });
31
- const marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({ per_private_network_ipam_ip_ids: request.perPrivateNetworkIpamIpIds });
32
+ var marshalPrivateNetworkApiSetServerPrivateNetworksRequest = (request, defaults) => ({ per_private_network_ipam_ip_ids: request.perPrivateNetworkIpamIpIds });
33
+ //#endregion
32
34
  export { marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, unmarshalListServerPrivateNetworksResponse, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse };
@@ -0,0 +1,21 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "baremetal";
3
+ readonly version: "v3";
4
+ readonly folderName: "baremetalv3";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "PrivateNetworkAPI";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "listServerPrivateNetworks";
9
+ readonly protoName: "ListServerPrivateNetworks";
10
+ readonly paramsType: "PrivateNetworkApiListServerPrivateNetworksRequest";
11
+ readonly returnType: "ListServerPrivateNetworksResponse";
12
+ readonly isList: true;
13
+ readonly paginationType: "offset";
14
+ readonly pageParamKey: "page";
15
+ readonly listItemType: "ServerPrivateNetwork";
16
+ readonly isPrivate: false;
17
+ readonly description: "\"";
18
+ }];
19
+ }];
20
+ };
21
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,23 @@
1
+ //#region src/v3/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "baremetal",
4
+ version: "v3",
5
+ folderName: "baremetalv3",
6
+ services: [{
7
+ apiClass: "PrivateNetworkAPI",
8
+ methods: [{
9
+ methodName: "listServerPrivateNetworks",
10
+ protoName: "ListServerPrivateNetworks",
11
+ paramsType: "PrivateNetworkApiListServerPrivateNetworksRequest",
12
+ returnType: "ListServerPrivateNetworksResponse",
13
+ isList: true,
14
+ paginationType: "offset",
15
+ pageParamKey: "page",
16
+ listItemType: "ServerPrivateNetwork",
17
+ isPrivate: false,
18
+ description: "\""
19
+ }]
20
+ }]
21
+ };
22
+ //#endregion
23
+ export { queriesMetadata };
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-baremetal",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Scaleway SDK baremetal",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,14 +26,14 @@
26
26
  "node": ">=20.19.6"
27
27
  },
28
28
  "dependencies": {
29
- "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.2.1"
29
+ "@scaleway/random-name": "5.1.4",
30
+ "@scaleway/sdk-std": "2.2.2"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.2.1"
33
+ "@scaleway/sdk-client": "^2.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.1"
36
+ "@scaleway/sdk-client": "^2.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",