@scaleway/sdk-baremetal 2.4.0 → 2.5.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/metadata.gen.d.ts +12 -0
- package/dist/metadata.gen.js +9 -0
- package/dist/metadata.gen.json +6 -0
- package/dist/metadata2.gen.js +8 -0
- package/dist/v1/api.gen.d.ts +8 -1
- package/dist/v1/api.gen.js +13 -1
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/index.gen.js +4 -2
- package/dist/v1/marshalling.gen.d.ts +3 -1
- package/dist/v1/marshalling.gen.js +14 -1
- package/dist/v1/types.gen.d.ts +22 -0
- package/dist/v1/validation-rules.gen.d.ts +8 -0
- package/dist/v1/validation-rules.gen.js +6 -1
- package/package.json +10 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is automatically generated
|
|
3
|
+
* PLEASE DO NOT EDIT HERE
|
|
4
|
+
*/
|
|
5
|
+
export type Metadata = {
|
|
6
|
+
name: string;
|
|
7
|
+
namespace: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
versions: string[];
|
|
10
|
+
};
|
|
11
|
+
export declare const pkgMetadata: Metadata;
|
|
12
|
+
export default pkgMetadata;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import metadata_gen_default from "./metadata2.gen.js";
|
|
2
|
+
//#region src/metadata.gen.ts
|
|
3
|
+
/**
|
|
4
|
+
* This file is automatically generated
|
|
5
|
+
* PLEASE DO NOT EDIT HERE
|
|
6
|
+
*/
|
|
7
|
+
var pkgMetadata = metadata_gen_default;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { pkgMetadata as default, pkgMetadata };
|
package/dist/v1/api.gen.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
2
2
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
3
|
-
import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, DeleteOptionServerRequest, DeleteServerRequest, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOfferRequest, GetOptionRequest, GetOSRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, InstallServerRequest, IP, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListOSRequest, ListOSResponse, ListServerEventsRequest, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersRequest, ListServersResponse, ListSettingsRequest, ListSettingsResponse, MigrateServerToMonthlyOfferRequest, Offer, Option, OS, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen.js';
|
|
3
|
+
import type { AddOptionServerRequest, BatchCreateServersRequest, BatchCreateServersResponse, BMCAccess, CreateServerRequest, DeleteOptionServerRequest, DeleteServerRequest, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOfferRequest, GetOptionRequest, GetOSRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, InstallServerRequest, IP, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListOSRequest, ListOSResponse, ListServerEventsRequest, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersRequest, ListServersResponse, ListSettingsRequest, ListSettingsResponse, MigrateServerToMonthlyOfferRequest, Offer, Option, OS, 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
|
|
|
@@ -45,6 +45,13 @@ export declare class API extends ParentAPI {
|
|
|
45
45
|
* @returns A Promise of Server
|
|
46
46
|
*/
|
|
47
47
|
createServer: (request: Readonly<CreateServerRequest>) => Promise<Server>;
|
|
48
|
+
/**
|
|
49
|
+
* Create multiple Elastic Metal servers. Create multiple new Elastic Metal servers. Once the servers are created, proceed with the [installation of an OS](#post-3e949e).
|
|
50
|
+
*
|
|
51
|
+
* @param request - The request {@link BatchCreateServersRequest}
|
|
52
|
+
* @returns A Promise of BatchCreateServersResponse
|
|
53
|
+
*/
|
|
54
|
+
batchCreateServers: (request?: Readonly<BatchCreateServersRequest>) => Promise<BatchCreateServersResponse>;
|
|
48
55
|
/**
|
|
49
56
|
* 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
57
|
*
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SERVER_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
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";
|
|
2
|
+
import { marshalAddOptionServerRequest, marshalBatchCreateServersRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, marshalValidatePartitioningSchemaRequest, unmarshalBMCAccess, unmarshalBatchCreateServersResponse, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalSchema, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse, unmarshalSetting } from "./marshalling.gen.js";
|
|
3
3
|
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
4
|
//#region src/v1/api.gen.ts
|
|
5
5
|
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
@@ -64,6 +64,18 @@ var API = class extends API$1 {
|
|
|
64
64
|
path: `/baremetal/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers`
|
|
65
65
|
}, unmarshalServer);
|
|
66
66
|
/**
|
|
67
|
+
* Create multiple Elastic Metal servers. Create multiple new Elastic Metal servers. Once the servers are created, proceed with the [installation of an OS](#post-3e949e).
|
|
68
|
+
*
|
|
69
|
+
* @param request - The request {@link BatchCreateServersRequest}
|
|
70
|
+
* @returns A Promise of BatchCreateServersResponse
|
|
71
|
+
*/
|
|
72
|
+
batchCreateServers = (request = {}) => this.client.fetch({
|
|
73
|
+
body: JSON.stringify(marshalBatchCreateServersRequest(request, this.client.settings)),
|
|
74
|
+
headers: jsonContentHeaders,
|
|
75
|
+
method: "POST",
|
|
76
|
+
path: `/baremetal/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/batch-create-servers`
|
|
77
|
+
}, unmarshalBatchCreateServersResponse);
|
|
78
|
+
/**
|
|
67
79
|
* 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.
|
|
68
80
|
*
|
|
69
81
|
* @param request - The request {@link UpdateServerRequest}
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { API, PrivateNetworkAPI, } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
|
-
export type { AddOptionServerRequest, BMCAccess, CertificationOption, CPU, CreateServerRequest, CreateServerRequestInstall, DeleteOptionServerRequest, DeleteServerRequest, Disk, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOfferRequest, GetOptionRequest, GetOSRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, GPU, InstallServerRequest, IP, IPReverseStatus, IPVersion, LicenseOption, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListOSRequest, ListOSResponse, ListServerEventsRequest, ListServerEventsRequestOrderBy, ListServerEventsResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, ListSettingsRequest, ListSettingsRequestOrderBy, ListSettingsResponse, Memory, MigrateServerToMonthlyOfferRequest, Offer, OfferOptionOffer, OfferStock, OfferSubscriptionPeriod, Option, OS, OSOSField, 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';
|
|
4
|
+
export type { AddOptionServerRequest, BatchCreateServersRequest, BatchCreateServersRequestServerConfig, BatchCreateServersResponse, BMCAccess, CertificationOption, CPU, CreateServerRequest, CreateServerRequestInstall, DeleteOptionServerRequest, DeleteServerRequest, Disk, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOfferRequest, GetOptionRequest, GetOSRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, GPU, InstallServerRequest, IP, IPReverseStatus, IPVersion, LicenseOption, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListOSRequest, ListOSResponse, ListServerEventsRequest, ListServerEventsRequestOrderBy, ListServerEventsResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, ListSettingsRequest, ListSettingsRequestOrderBy, ListSettingsResponse, Memory, MigrateServerToMonthlyOfferRequest, Offer, OfferOptionOffer, OfferStock, OfferSubscriptionPeriod, Option, OS, OSOSField, 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
5
|
export * as ValidationRules from './validation-rules.gen.js';
|
package/dist/v1/index.gen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { SERVER_INSTALL_TRANSIENT_STATUSES, SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
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";
|
|
3
|
+
import { marshalAddOptionServerRequest, marshalBatchCreateServersRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalSchema, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, marshalValidatePartitioningSchemaRequest, unmarshalBMCAccess, unmarshalBatchCreateServersResponse, 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
6
|
//#region src/v1/index.gen.ts
|
|
@@ -12,6 +12,7 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
12
12
|
SERVER_TRANSIENT_STATUSES: () => SERVER_TRANSIENT_STATUSES,
|
|
13
13
|
ValidationRules: () => validation_rules_gen_exports,
|
|
14
14
|
marshalAddOptionServerRequest: () => marshalAddOptionServerRequest,
|
|
15
|
+
marshalBatchCreateServersRequest: () => marshalBatchCreateServersRequest,
|
|
15
16
|
marshalCreateServerRequest: () => marshalCreateServerRequest,
|
|
16
17
|
marshalInstallServerRequest: () => marshalInstallServerRequest,
|
|
17
18
|
marshalPrivateNetworkApiAddServerPrivateNetworkRequest: () => marshalPrivateNetworkApiAddServerPrivateNetworkRequest,
|
|
@@ -25,6 +26,7 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
25
26
|
marshalUpdateSettingRequest: () => marshalUpdateSettingRequest,
|
|
26
27
|
marshalValidatePartitioningSchemaRequest: () => marshalValidatePartitioningSchemaRequest,
|
|
27
28
|
unmarshalBMCAccess: () => unmarshalBMCAccess,
|
|
29
|
+
unmarshalBatchCreateServersResponse: () => unmarshalBatchCreateServersResponse,
|
|
28
30
|
unmarshalGetServerMetricsResponse: () => unmarshalGetServerMetricsResponse,
|
|
29
31
|
unmarshalIP: () => unmarshalIP,
|
|
30
32
|
unmarshalListOSResponse: () => unmarshalListOSResponse,
|
|
@@ -44,4 +46,4 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
44
46
|
unmarshalSetting: () => unmarshalSetting
|
|
45
47
|
});
|
|
46
48
|
//#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 };
|
|
49
|
+
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, marshalBatchCreateServersRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalSchema, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, marshalValidatePartitioningSchemaRequest, unmarshalBMCAccess, unmarshalBatchCreateServersResponse, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalSchema, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse, unmarshalSetting };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { AddOptionServerRequest, BMCAccess, CreateServerRequest, GetServerMetricsResponse, InstallServerRequest, IP, ListOffersResponse, ListOptionsResponse, ListOSResponse, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersResponse, ListSettingsResponse, Offer, Option, OS, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, RebootServerRequest, Schema, Server, ServerPrivateNetwork, SetServerPrivateNetworksResponse, Setting, StartBMCAccessRequest, StartServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest } from './types.gen.js';
|
|
2
|
+
import type { AddOptionServerRequest, BatchCreateServersRequest, BatchCreateServersResponse, BMCAccess, CreateServerRequest, GetServerMetricsResponse, InstallServerRequest, IP, ListOffersResponse, ListOptionsResponse, ListOSResponse, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersResponse, ListSettingsResponse, Offer, Option, OS, 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
5
|
export declare const unmarshalServer: (data: unknown) => Server;
|
|
@@ -9,6 +9,7 @@ export declare const unmarshalOption: (data: unknown) => Option;
|
|
|
9
9
|
export declare const unmarshalServerPrivateNetwork: (data: unknown) => ServerPrivateNetwork;
|
|
10
10
|
export declare const unmarshalSetting: (data: unknown) => Setting;
|
|
11
11
|
export declare const unmarshalBMCAccess: (data: unknown) => BMCAccess;
|
|
12
|
+
export declare const unmarshalBatchCreateServersResponse: (data: unknown) => BatchCreateServersResponse;
|
|
12
13
|
export declare const unmarshalGetServerMetricsResponse: (data: unknown) => GetServerMetricsResponse;
|
|
13
14
|
export declare const unmarshalListOSResponse: (data: unknown) => ListOSResponse;
|
|
14
15
|
export declare const unmarshalListOffersResponse: (data: unknown) => ListOffersResponse;
|
|
@@ -21,6 +22,7 @@ export declare const unmarshalSetServerPrivateNetworksResponse: (data: unknown)
|
|
|
21
22
|
export declare const marshalSchema: (request: Schema, defaults: DefaultValues) => Record<string, unknown>;
|
|
22
23
|
export declare const marshalCreateServerRequest: (request: CreateServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
23
24
|
export declare const marshalAddOptionServerRequest: (request: AddOptionServerRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
25
|
+
export declare const marshalBatchCreateServersRequest: (request: BatchCreateServersRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
24
26
|
export declare const marshalInstallServerRequest: (request: InstallServerRequest, defaults: DefaultValues) => Promise<Record<string, unknown>>;
|
|
25
27
|
export declare const marshalPrivateNetworkApiAddServerPrivateNetworkRequest: (request: PrivateNetworkApiAddServerPrivateNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
26
28
|
export declare const marshalPrivateNetworkApiSetServerPrivateNetworksRequest: (request: PrivateNetworkApiSetServerPrivateNetworksRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -316,6 +316,10 @@ var unmarshalBMCAccess = (data) => {
|
|
|
316
316
|
url: data.url
|
|
317
317
|
};
|
|
318
318
|
};
|
|
319
|
+
var unmarshalBatchCreateServersResponse = (data) => {
|
|
320
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BatchCreateServersResponse' failed as data isn't a dictionary.`);
|
|
321
|
+
return { servers: unmarshalArrayOfObject(data.servers, unmarshalServer) };
|
|
322
|
+
};
|
|
319
323
|
var unmarshalGetServerMetricsResponse = (data) => {
|
|
320
324
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetServerMetricsResponse' failed as data isn't a dictionary.`);
|
|
321
325
|
return { pings: data.pings ? unmarshalTimeSeries(data.pings) : void 0 };
|
|
@@ -446,6 +450,15 @@ var marshalCreateServerRequest = (request, defaults) => ({
|
|
|
446
450
|
}])
|
|
447
451
|
});
|
|
448
452
|
var marshalAddOptionServerRequest = (request, defaults) => ({ expires_at: request.expiresAt });
|
|
453
|
+
var marshalBatchCreateServersRequestServerConfig = (request, defaults) => ({
|
|
454
|
+
description: request.description,
|
|
455
|
+
hostname: request.hostname,
|
|
456
|
+
tags: request.tags
|
|
457
|
+
});
|
|
458
|
+
var marshalBatchCreateServersRequest = (request, defaults) => ({
|
|
459
|
+
common_configuration: request.commonConfiguration !== void 0 ? marshalCreateServerRequest(request.commonConfiguration, defaults) : void 0,
|
|
460
|
+
servers: request.servers !== void 0 ? request.servers.map((elt) => marshalBatchCreateServersRequestServerConfig(elt, defaults)) : void 0
|
|
461
|
+
});
|
|
449
462
|
var marshalInstallServerRequest = async (request, defaults) => ({
|
|
450
463
|
hostname: request.hostname,
|
|
451
464
|
os_id: request.osId,
|
|
@@ -483,4 +496,4 @@ var marshalValidatePartitioningSchemaRequest = (request, defaults) => ({
|
|
|
483
496
|
partitioning_schema: request.partitioningSchema !== void 0 ? marshalSchema(request.partitioningSchema, defaults) : void 0
|
|
484
497
|
});
|
|
485
498
|
//#endregion
|
|
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 };
|
|
499
|
+
export { marshalAddOptionServerRequest, marshalBatchCreateServersRequest, marshalCreateServerRequest, marshalInstallServerRequest, marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, marshalRebootServerRequest, marshalSchema, marshalStartBMCAccessRequest, marshalStartServerRequest, marshalUpdateIPRequest, marshalUpdateServerRequest, marshalUpdateSettingRequest, marshalValidatePartitioningSchemaRequest, unmarshalBMCAccess, unmarshalBatchCreateServersResponse, unmarshalGetServerMetricsResponse, unmarshalIP, unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, unmarshalOS, unmarshalOffer, unmarshalOption, unmarshalSchema, unmarshalServer, unmarshalServerPrivateNetwork, unmarshalSetServerPrivateNetworksResponse, unmarshalSetting };
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -367,6 +367,11 @@ export interface RaidController {
|
|
|
367
367
|
model: string;
|
|
368
368
|
raidLevel: string[];
|
|
369
369
|
}
|
|
370
|
+
export interface BatchCreateServersRequestServerConfig {
|
|
371
|
+
hostname: string;
|
|
372
|
+
description: string;
|
|
373
|
+
tags: string[];
|
|
374
|
+
}
|
|
370
375
|
export type CreateServerRequest = {
|
|
371
376
|
/**
|
|
372
377
|
* Zone to target. If none is passed will use default zone from the config.
|
|
@@ -825,6 +830,23 @@ export interface BMCAccess {
|
|
|
825
830
|
*/
|
|
826
831
|
expiresAt?: Date;
|
|
827
832
|
}
|
|
833
|
+
export type BatchCreateServersRequest = {
|
|
834
|
+
/**
|
|
835
|
+
* Zone to target. If none is passed will use default zone from the config.
|
|
836
|
+
*/
|
|
837
|
+
zone?: ScwZone;
|
|
838
|
+
/**
|
|
839
|
+
* Configuration wanted for the servers to create.
|
|
840
|
+
*/
|
|
841
|
+
commonConfiguration?: CreateServerRequest;
|
|
842
|
+
/**
|
|
843
|
+
* List of servers to create.
|
|
844
|
+
*/
|
|
845
|
+
servers?: BatchCreateServersRequestServerConfig[];
|
|
846
|
+
};
|
|
847
|
+
export interface BatchCreateServersResponse {
|
|
848
|
+
servers: Server[];
|
|
849
|
+
}
|
|
828
850
|
export type DeleteOptionServerRequest = {
|
|
829
851
|
/**
|
|
830
852
|
* Zone to target. If none is passed will use default zone from the config.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
//#region src/v1/validation-rules.gen.ts
|
|
3
3
|
var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
4
|
+
BatchCreateServersRequestServerConfig: () => BatchCreateServersRequestServerConfig,
|
|
4
5
|
CreateServerRequest: () => CreateServerRequest,
|
|
5
6
|
CreateServerRequestInstall: () => CreateServerRequestInstall,
|
|
6
7
|
InstallServerRequest: () => InstallServerRequest,
|
|
@@ -12,6 +13,10 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
12
13
|
ListSettingsRequest: () => ListSettingsRequest,
|
|
13
14
|
UpdateServerRequest: () => UpdateServerRequest
|
|
14
15
|
});
|
|
16
|
+
var BatchCreateServersRequestServerConfig = {
|
|
17
|
+
description: { maxLength: 255 },
|
|
18
|
+
hostname: { minLength: 1 }
|
|
19
|
+
};
|
|
15
20
|
var CreateServerRequest = {
|
|
16
21
|
description: { maxLength: 255 },
|
|
17
22
|
name: { minLength: 1 }
|
|
@@ -77,4 +82,4 @@ var UpdateServerRequest = {
|
|
|
77
82
|
name: { maxLength: 255 }
|
|
78
83
|
};
|
|
79
84
|
//#endregion
|
|
80
|
-
export { CreateServerRequest, CreateServerRequestInstall, InstallServerRequest, ListOSRequest, ListOffersRequest, ListOptionsRequest, ListServerEventsRequest, ListServersRequest, ListSettingsRequest, UpdateServerRequest, validation_rules_gen_exports };
|
|
85
|
+
export { BatchCreateServersRequestServerConfig, CreateServerRequest, CreateServerRequestInstall, InstallServerRequest, ListOSRequest, ListOffersRequest, ListOptionsRequest, ListServerEventsRequest, ListServersRequest, ListSettingsRequest, UpdateServerRequest, validation_rules_gen_exports };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-baremetal",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Scaleway SDK baremetal",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
"./*": {
|
|
17
17
|
"types": "./dist/*/index.gen.d.ts",
|
|
18
18
|
"default": "./dist/*/index.gen.js"
|
|
19
|
+
},
|
|
20
|
+
"./metadata": {
|
|
21
|
+
"types": "./dist/metadata.gen.d.ts",
|
|
22
|
+
"default": "./dist/metadata.gen.js"
|
|
23
|
+
},
|
|
24
|
+
"./*/metadata": {
|
|
25
|
+
"types": "./dist/*/metadata.gen.d.ts",
|
|
26
|
+
"default": "./dist/*/metadata.gen.js"
|
|
19
27
|
}
|
|
20
28
|
},
|
|
21
29
|
"repository": {
|
|
@@ -27,7 +35,7 @@
|
|
|
27
35
|
},
|
|
28
36
|
"dependencies": {
|
|
29
37
|
"@scaleway/random-name": "5.1.4",
|
|
30
|
-
"@scaleway/sdk-std": "2.
|
|
38
|
+
"@scaleway/sdk-std": "2.3.0"
|
|
31
39
|
},
|
|
32
40
|
"peerDependencies": {
|
|
33
41
|
"@scaleway/sdk-client": "^2.2.2"
|