@scaleway/sdk 1.18.0 → 1.19.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/api/instance/v1/marshalling.gen.js +1 -0
- package/dist/api/k8s/v1/marshalling.gen.js +3 -1
- package/dist/api/rdb/v1/marshalling.gen.js +1 -0
- package/dist/api/vpc/v2/api.gen.js +28 -20
- package/dist/api/vpc/v2/marshalling.gen.js +0 -1
- package/dist/index.cjs +7 -4
- package/dist/index.d.ts +23 -4
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -1353,6 +1353,7 @@ const marshalUpdatePrivateNICRequest = (request, defaults) => ({
|
|
|
1353
1353
|
const marshalUpdateServerRequest = (request, defaults) => ({
|
|
1354
1354
|
boot_type: request.bootType,
|
|
1355
1355
|
bootscript: request.bootscript,
|
|
1356
|
+
commercial_type: request.commercialType,
|
|
1356
1357
|
dynamic_ip_required: request.dynamicIpRequired,
|
|
1357
1358
|
enable_ipv6: request.enableIpv6,
|
|
1358
1359
|
name: request.name,
|
|
@@ -103,7 +103,9 @@ const unmarshalClusterType = data => {
|
|
|
103
103
|
availability: data.availability,
|
|
104
104
|
commitmentDelay: data.commitment_delay,
|
|
105
105
|
maxNodes: data.max_nodes,
|
|
106
|
-
name: data.name
|
|
106
|
+
name: data.name,
|
|
107
|
+
resiliency: data.resiliency,
|
|
108
|
+
sla: data.sla
|
|
107
109
|
};
|
|
108
110
|
};
|
|
109
111
|
const unmarshalNode = data => {
|
|
@@ -286,6 +286,7 @@ const unmarshalNodeType = data => {
|
|
|
286
286
|
description: data.description,
|
|
287
287
|
disabled: data.disabled,
|
|
288
288
|
generation: data.generation,
|
|
289
|
+
instanceRange: data.instance_range,
|
|
289
290
|
isBssdCompatible: data.is_bssd_compatible,
|
|
290
291
|
isHaRequired: data.is_ha_required,
|
|
291
292
|
memory: data.memory,
|
|
@@ -49,12 +49,20 @@ class API extends API$1 {
|
|
|
49
49
|
* @param request - The request {@link CreateVPCRequest}
|
|
50
50
|
* @returns A Promise of VPC
|
|
51
51
|
*/
|
|
52
|
-
createVPC =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
createVPC = (() => {
|
|
53
|
+
var _this3 = this;
|
|
54
|
+
return function (request) {
|
|
55
|
+
if (request === void 0) {
|
|
56
|
+
request = {};
|
|
57
|
+
}
|
|
58
|
+
return _this3.client.fetch({
|
|
59
|
+
body: JSON.stringify(marshalCreateVPCRequest(request, _this3.client.settings)),
|
|
60
|
+
headers: jsonContentHeaders,
|
|
61
|
+
method: 'POST',
|
|
62
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/vpcs`
|
|
63
|
+
}, unmarshalVPC);
|
|
64
|
+
};
|
|
65
|
+
})();
|
|
58
66
|
|
|
59
67
|
/**
|
|
60
68
|
* Get a VPC. Retrieve details of an existing VPC, specified by its VPC ID.
|
|
@@ -90,15 +98,15 @@ class API extends API$1 {
|
|
|
90
98
|
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam('vpcId', request.vpcId)}`
|
|
91
99
|
});
|
|
92
100
|
pageOfListPrivateNetworks = (() => {
|
|
93
|
-
var
|
|
101
|
+
var _this4 = this;
|
|
94
102
|
return function (request) {
|
|
95
103
|
if (request === void 0) {
|
|
96
104
|
request = {};
|
|
97
105
|
}
|
|
98
|
-
return
|
|
106
|
+
return _this4.client.fetch({
|
|
99
107
|
method: 'GET',
|
|
100
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ??
|
|
101
|
-
urlParams: urlParams(['dhcp_enabled', request.dhcpEnabled], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ??
|
|
108
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/private-networks`,
|
|
109
|
+
urlParams: urlParams(['dhcp_enabled', request.dhcpEnabled], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
|
|
102
110
|
}, unmarshalListPrivateNetworksResponse);
|
|
103
111
|
};
|
|
104
112
|
})();
|
|
@@ -113,12 +121,12 @@ class API extends API$1 {
|
|
|
113
121
|
* @returns A Promise of ListPrivateNetworksResponse
|
|
114
122
|
*/
|
|
115
123
|
listPrivateNetworks = (() => {
|
|
116
|
-
var
|
|
124
|
+
var _this5 = this;
|
|
117
125
|
return function (request) {
|
|
118
126
|
if (request === void 0) {
|
|
119
127
|
request = {};
|
|
120
128
|
}
|
|
121
|
-
return enrichForPagination('privateNetworks',
|
|
129
|
+
return enrichForPagination('privateNetworks', _this5.pageOfListPrivateNetworks, request);
|
|
122
130
|
};
|
|
123
131
|
})();
|
|
124
132
|
|
|
@@ -130,16 +138,16 @@ class API extends API$1 {
|
|
|
130
138
|
* @returns A Promise of PrivateNetwork
|
|
131
139
|
*/
|
|
132
140
|
createPrivateNetwork = (() => {
|
|
133
|
-
var
|
|
141
|
+
var _this6 = this;
|
|
134
142
|
return function (request) {
|
|
135
143
|
if (request === void 0) {
|
|
136
144
|
request = {};
|
|
137
145
|
}
|
|
138
|
-
return
|
|
139
|
-
body: JSON.stringify(marshalCreatePrivateNetworkRequest(request,
|
|
146
|
+
return _this6.client.fetch({
|
|
147
|
+
body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, _this6.client.settings)),
|
|
140
148
|
headers: jsonContentHeaders,
|
|
141
149
|
method: 'POST',
|
|
142
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ??
|
|
150
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/private-networks`
|
|
143
151
|
}, unmarshalPrivateNetwork);
|
|
144
152
|
};
|
|
145
153
|
})();
|
|
@@ -192,16 +200,16 @@ class API extends API$1 {
|
|
|
192
200
|
* @param request - The request {@link MigrateZonalPrivateNetworksRequest}
|
|
193
201
|
*/
|
|
194
202
|
migrateZonalPrivateNetworks = (() => {
|
|
195
|
-
var
|
|
203
|
+
var _this7 = this;
|
|
196
204
|
return function (request) {
|
|
197
205
|
if (request === void 0) {
|
|
198
206
|
request = {};
|
|
199
207
|
}
|
|
200
|
-
return
|
|
201
|
-
body: JSON.stringify(marshalMigrateZonalPrivateNetworksRequest(request,
|
|
208
|
+
return _this7.client.fetch({
|
|
209
|
+
body: JSON.stringify(marshalMigrateZonalPrivateNetworksRequest(request, _this7.client.settings)),
|
|
202
210
|
headers: jsonContentHeaders,
|
|
203
211
|
method: 'POST',
|
|
204
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ??
|
|
212
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this7.client.settings.defaultRegion)}/private-networks/migrate-zonal`
|
|
205
213
|
});
|
|
206
214
|
};
|
|
207
215
|
})();
|
|
@@ -103,7 +103,6 @@ const marshalCreatePrivateNetworkRequest = (request, defaults) => ({
|
|
|
103
103
|
vpc_id: request.vpcId
|
|
104
104
|
});
|
|
105
105
|
const marshalCreateVPCRequest = (request, defaults) => ({
|
|
106
|
-
default_private_network_name: request.defaultPrivateNetworkName,
|
|
107
106
|
name: request.name || randomName('vpc'),
|
|
108
107
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
109
108
|
tags: request.tags
|
package/dist/index.cjs
CHANGED
|
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
|
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
-
const version = 'v1.
|
|
500
|
+
const version = 'v1.18.0';
|
|
501
501
|
const userAgent = `scaleway-sdk-js/${version}`;
|
|
502
502
|
|
|
503
503
|
const isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
@@ -10677,6 +10677,7 @@ const marshalUpdatePrivateNICRequest = (request, defaults) => ({
|
|
|
10677
10677
|
const marshalUpdateServerRequest = (request, defaults) => ({
|
|
10678
10678
|
boot_type: request.bootType,
|
|
10679
10679
|
bootscript: request.bootscript,
|
|
10680
|
+
commercial_type: request.commercialType,
|
|
10680
10681
|
dynamic_ip_required: request.dynamicIpRequired,
|
|
10681
10682
|
enable_ipv6: request.enableIpv6,
|
|
10682
10683
|
name: request.name,
|
|
@@ -13303,7 +13304,9 @@ const unmarshalClusterType = data => {
|
|
|
13303
13304
|
availability: data.availability,
|
|
13304
13305
|
commitmentDelay: data.commitment_delay,
|
|
13305
13306
|
maxNodes: data.max_nodes,
|
|
13306
|
-
name: data.name
|
|
13307
|
+
name: data.name,
|
|
13308
|
+
resiliency: data.resiliency,
|
|
13309
|
+
sla: data.sla
|
|
13307
13310
|
};
|
|
13308
13311
|
};
|
|
13309
13312
|
const unmarshalNode = data => {
|
|
@@ -17735,6 +17738,7 @@ const unmarshalNodeType$1 = data => {
|
|
|
17735
17738
|
description: data.description,
|
|
17736
17739
|
disabled: data.disabled,
|
|
17737
17740
|
generation: data.generation,
|
|
17741
|
+
instanceRange: data.instance_range,
|
|
17738
17742
|
isBssdCompatible: data.is_bssd_compatible,
|
|
17739
17743
|
isHaRequired: data.is_ha_required,
|
|
17740
17744
|
memory: data.memory,
|
|
@@ -21344,7 +21348,6 @@ const marshalCreatePrivateNetworkRequest = (request, defaults) => ({
|
|
|
21344
21348
|
vpc_id: request.vpcId
|
|
21345
21349
|
});
|
|
21346
21350
|
const marshalCreateVPCRequest = (request, defaults) => ({
|
|
21347
|
-
default_private_network_name: request.defaultPrivateNetworkName,
|
|
21348
21351
|
name: request.name || randomName('vpc'),
|
|
21349
21352
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
21350
21353
|
tags: request.tags
|
|
@@ -21406,7 +21409,7 @@ let API$2 = class API extends API$s {
|
|
|
21406
21409
|
* @param request - The request {@link CreateVPCRequest}
|
|
21407
21410
|
* @returns A Promise of VPC
|
|
21408
21411
|
*/
|
|
21409
|
-
createVPC = request => this.client.fetch({
|
|
21412
|
+
createVPC = (request = {}) => this.client.fetch({
|
|
21410
21413
|
body: JSON.stringify(marshalCreateVPCRequest(request, this.client.settings)),
|
|
21411
21414
|
headers: jsonContentHeaders$2,
|
|
21412
21415
|
method: 'POST',
|
package/dist/index.d.ts
CHANGED
|
@@ -11582,6 +11582,18 @@ type UpdateServerRequest = {
|
|
|
11582
11582
|
placementGroup?: string | null;
|
|
11583
11583
|
/** Instance private NICs. */
|
|
11584
11584
|
privateNics?: PrivateNIC[];
|
|
11585
|
+
/**
|
|
11586
|
+
* Set the commercial_type for this Instance. Warning: This field has some
|
|
11587
|
+
* restrictions:
|
|
11588
|
+
*
|
|
11589
|
+
* - Cannot be changed if the Instance is not in `stopped` state.
|
|
11590
|
+
* - Cannot be changed if the Instance is in a placement group.
|
|
11591
|
+
* - Local storage requirements of the target commercial_types must be fulfilled
|
|
11592
|
+
* (i.e. if an Instance has 80GB of local storage, it can be changed into a
|
|
11593
|
+
* GP1-XS, which has a maximum of 150GB, but it cannot be changed into a
|
|
11594
|
+
* DEV1-S, which has only 20GB).
|
|
11595
|
+
*/
|
|
11596
|
+
commercialType?: string;
|
|
11585
11597
|
};
|
|
11586
11598
|
type SetImageRequest = {
|
|
11587
11599
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
@@ -14544,6 +14556,7 @@ type AutoscalerExpander = 'unknown_expander' | 'random' | 'most_pods' | 'least_w
|
|
|
14544
14556
|
type CNI = 'unknown_cni' | 'cilium' | 'calico' | 'weave' | 'flannel' | 'kilo';
|
|
14545
14557
|
type ClusterStatus$1 = 'unknown' | 'creating' | 'ready' | 'deleting' | 'deleted' | 'updating' | 'locked' | 'pool_required';
|
|
14546
14558
|
type ClusterTypeAvailability = 'available' | 'scarce' | 'shortage';
|
|
14559
|
+
type ClusterTypeResiliency = 'unknown_resiliency' | 'standard' | 'high_availability';
|
|
14547
14560
|
type Ingress = 'unknown_ingress' | 'none' | 'nginx' | 'traefik' | 'traefik2';
|
|
14548
14561
|
type ListClustersRequestOrderBy$1 = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'name_asc' | 'name_desc' | 'status_asc' | 'status_desc' | 'version_asc' | 'version_desc';
|
|
14549
14562
|
type ListNodesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
@@ -14716,6 +14729,10 @@ interface ClusterType {
|
|
|
14716
14729
|
maxNodes: number;
|
|
14717
14730
|
/** Time period during which you can no longer switch to a lower offer. */
|
|
14718
14731
|
commitmentDelay?: string;
|
|
14732
|
+
/** Value of the Service Level Agreement of the offer. */
|
|
14733
|
+
sla: number;
|
|
14734
|
+
/** Resiliency offered by the offer. */
|
|
14735
|
+
resiliency: ClusterTypeResiliency;
|
|
14719
14736
|
}
|
|
14720
14737
|
/** Create cluster request. auto upgrade. */
|
|
14721
14738
|
interface CreateClusterRequestAutoUpgrade {
|
|
@@ -16061,6 +16078,7 @@ type index$e_ClusterAutoscalerConfig = ClusterAutoscalerConfig;
|
|
|
16061
16078
|
type index$e_ClusterOpenIDConnectConfig = ClusterOpenIDConnectConfig;
|
|
16062
16079
|
type index$e_ClusterType = ClusterType;
|
|
16063
16080
|
type index$e_ClusterTypeAvailability = ClusterTypeAvailability;
|
|
16081
|
+
type index$e_ClusterTypeResiliency = ClusterTypeResiliency;
|
|
16064
16082
|
type index$e_CreateClusterRequestAutoUpgrade = CreateClusterRequestAutoUpgrade;
|
|
16065
16083
|
type index$e_CreateClusterRequestPoolConfigUpgradePolicy = CreateClusterRequestPoolConfigUpgradePolicy;
|
|
16066
16084
|
type index$e_CreateExternalNodeRequest = CreateExternalNodeRequest;
|
|
@@ -16116,6 +16134,7 @@ declare namespace index$e {
|
|
|
16116
16134
|
ClusterStatus$1 as ClusterStatus,
|
|
16117
16135
|
index$e_ClusterType as ClusterType,
|
|
16118
16136
|
index$e_ClusterTypeAvailability as ClusterTypeAvailability,
|
|
16137
|
+
index$e_ClusterTypeResiliency as ClusterTypeResiliency,
|
|
16119
16138
|
CreateClusterRequest$2 as CreateClusterRequest,
|
|
16120
16139
|
index$e_CreateClusterRequestAutoUpgrade as CreateClusterRequestAutoUpgrade,
|
|
16121
16140
|
CreateClusterRequestAutoscalerConfig$1 as CreateClusterRequestAutoscalerConfig,
|
|
@@ -21610,8 +21629,10 @@ interface NodeType$1 {
|
|
|
21610
21629
|
availableVolumeTypes: NodeTypeVolumeType[];
|
|
21611
21630
|
/** The Node Type can be used only with high availability option. */
|
|
21612
21631
|
isHaRequired: boolean;
|
|
21613
|
-
/** Generation associated the NodeType offer. */
|
|
21632
|
+
/** Generation associated with the NodeType offer. */
|
|
21614
21633
|
generation: NodeTypeGeneration;
|
|
21634
|
+
/** Instance range associated with the NodeType offer. */
|
|
21635
|
+
instanceRange: string;
|
|
21615
21636
|
/** Region the Node Type is in. */
|
|
21616
21637
|
region: Region;
|
|
21617
21638
|
}
|
|
@@ -26659,8 +26680,6 @@ type CreateVPCRequest = {
|
|
|
26659
26680
|
region?: Region;
|
|
26660
26681
|
/** Name for the VPC. */
|
|
26661
26682
|
name?: string;
|
|
26662
|
-
/** Name for the VPC's associated default Private Network. */
|
|
26663
|
-
defaultPrivateNetworkName: string;
|
|
26664
26683
|
/** Scaleway Project in which to create the VPC. */
|
|
26665
26684
|
projectId?: string;
|
|
26666
26685
|
/** Tags for the VPC. */
|
|
@@ -26882,7 +26901,7 @@ declare class API$2 extends API$s {
|
|
|
26882
26901
|
* @param request - The request {@link CreateVPCRequest}
|
|
26883
26902
|
* @returns A Promise of VPC
|
|
26884
26903
|
*/
|
|
26885
|
-
createVPC: (request
|
|
26904
|
+
createVPC: (request?: Readonly<CreateVPCRequest>) => Promise<VPC>;
|
|
26886
26905
|
/**
|
|
26887
26906
|
* Get a VPC. Retrieve details of an existing VPC, specified by its VPC ID.
|
|
26888
26907
|
*
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"bundledDependencies": [
|
|
36
36
|
"@scaleway/random-name"
|
|
37
37
|
],
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "3b57b4bfa4f59a53ad81f7cff21fc3fdb2bfc0e2"
|
|
39
39
|
}
|