@scaleway/sdk 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/account/v2/api.gen.js +29 -0
- package/dist/api/account/v2alpha1/api.gen.js +29 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.js +74 -1
- package/dist/api/baremetal/v1/api.gen.js +202 -2
- package/dist/api/baremetal/v1/api.utils.js +7 -0
- package/dist/api/baremetal/v1/marshalling.gen.js +4 -1
- package/dist/api/cockpit/index.js +2 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +319 -0
- package/dist/api/cockpit/v1beta1/content.gen.js +7 -0
- package/dist/api/cockpit/v1beta1/index.gen.js +4 -0
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +174 -0
- package/dist/api/container/v1beta1/api.gen.js +189 -2
- package/dist/api/domain/v2beta1/api.gen.js +395 -8
- package/dist/api/domain/v2beta1/marshalling.gen.js +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +68 -1
- package/dist/api/function/v1beta1/api.gen.js +214 -2
- package/dist/api/function/v1beta1/marshalling.gen.js +12 -0
- package/dist/api/iam/v1alpha1/api.gen.js +265 -3
- package/dist/api/iam/v1alpha1/marshalling.gen.js +44 -1
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +24 -1
- package/dist/api/instance/v1/api.gen.js +351 -11
- package/dist/api/instance/v1/api.utils.js +101 -0
- package/dist/api/instance/v1/marshalling.gen.js +12 -5
- package/dist/api/iot/v1/api.gen.js +230 -1
- package/dist/api/k8s/index.js +2 -2
- package/dist/api/k8s/v1/api.gen.js +189 -1
- package/dist/api/k8s/v1/api.utils.js +16 -0
- package/dist/api/k8s/v1/{index.gen.js → index.js} +1 -3
- package/dist/api/lb/v1/api.gen.js +652 -6
- package/dist/api/lb/v1/api.utils.js +29 -0
- package/dist/api/lb/v1/marshalling.gen.js +14 -0
- package/dist/api/marketplace/v1/api.gen.js +12 -0
- package/dist/api/marketplace/v2/api.gen.js +18 -0
- package/dist/api/mnq/v1alpha1/api.gen.js +60 -1
- package/dist/api/rdb/v1/api.gen.js +383 -4
- package/dist/api/rdb/v1/marshalling.gen.js +5 -1
- package/dist/api/redis/v1/api.gen.js +144 -1
- package/dist/api/registry/v1/api.gen.js +96 -2
- package/dist/api/secret/v1alpha1/api.gen.js +134 -44
- package/dist/api/tem/v1alpha1/api.gen.js +79 -3
- package/dist/api/test/v1/api.gen.js +61 -1
- package/dist/api/vpc/v1/api.gen.js +31 -1
- package/dist/api/vpcgw/v1/api.gen.js +227 -3
- package/dist/api/webhosting/index.js +2 -0
- package/dist/api/webhosting/v1alpha1/api.gen.js +131 -0
- package/dist/api/webhosting/v1alpha1/content.gen.js +7 -0
- package/dist/api/webhosting/v1alpha1/index.gen.js +6 -0
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +140 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +14 -0
- package/dist/index.cjs +1667 -707
- package/dist/index.d.ts +7504 -5544
- package/dist/index.js +42 -38
- package/dist/scw/constants.js +1 -1
- package/dist/scw/fetch/build-fetcher.js +1 -1
- package/package.json +2 -2
|
@@ -5,6 +5,13 @@ import { PRIVATE_NETWORK_TRANSIENT_STATUSES, LB_TRANSIENT_STATUSES, INSTANCE_TRA
|
|
|
5
5
|
class LbV1UtilsAPI extends API {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
|
+
/**
|
|
9
|
+
* Waits for all private networks of a load balancer to be in a final state.
|
|
10
|
+
*
|
|
11
|
+
* @param request - The request {@link WaitForLbPrivateNetworksRequest}
|
|
12
|
+
* @param options - The waiting options
|
|
13
|
+
* @returns A Promise of ListLbPrivateNetworksResponse
|
|
14
|
+
*/
|
|
8
15
|
this.waitForLbPrivateNetworks = (request, options) => tryAtIntervals(async () => {
|
|
9
16
|
const value = await this.listLbPrivateNetworks({
|
|
10
17
|
lbId: request.lbId,
|
|
@@ -18,6 +25,13 @@ class LbV1UtilsAPI extends API {
|
|
|
18
25
|
value
|
|
19
26
|
};
|
|
20
27
|
}, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
|
|
28
|
+
/**
|
|
29
|
+
* Waits for all instances of a load balancer to be in a final state.
|
|
30
|
+
*
|
|
31
|
+
* @param request - The request {@link GetLbRequest}
|
|
32
|
+
* @param options - The waiting options
|
|
33
|
+
* @returns A Promise of Lb
|
|
34
|
+
*/
|
|
21
35
|
this.waitForLbInstances = (request, options) => tryAtIntervals(async () => {
|
|
22
36
|
const value = await this.getLb(request);
|
|
23
37
|
return {
|
|
@@ -30,6 +44,14 @@ class LbV1UtilsAPI extends API {
|
|
|
30
44
|
class LbZonedV1UtilsAPI extends ZonedAPI {
|
|
31
45
|
constructor() {
|
|
32
46
|
super(...arguments);
|
|
47
|
+
/**
|
|
48
|
+
* Waits for all private networks of a (zoned) load balancer to be in a final
|
|
49
|
+
* state.
|
|
50
|
+
*
|
|
51
|
+
* @param request - The request {@link ZonedWaitForLbPrivateNetworksRequest}
|
|
52
|
+
* @param options - The waiting options
|
|
53
|
+
* @returns A Promise of ListLbPrivateNetworksResponse
|
|
54
|
+
*/
|
|
33
55
|
this.waitForLbPrivateNetworks = (request, options) => tryAtIntervals(async () => {
|
|
34
56
|
const value = await this.listLbPrivateNetworks({
|
|
35
57
|
lbId: request.lbId,
|
|
@@ -43,6 +65,13 @@ class LbZonedV1UtilsAPI extends ZonedAPI {
|
|
|
43
65
|
value
|
|
44
66
|
};
|
|
45
67
|
}, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
|
|
68
|
+
/**
|
|
69
|
+
* Waits for all instances of a (zoned) load balancer to be in a final state.
|
|
70
|
+
*
|
|
71
|
+
* @param request - The request {@link GetLbRequest}
|
|
72
|
+
* @param options - The waiting options
|
|
73
|
+
* @returns A Promise of Lb
|
|
74
|
+
*/
|
|
46
75
|
this.waitForLbInstances = (request, options) => tryAtIntervals(async () => {
|
|
47
76
|
const value = await this.getLb(request);
|
|
48
77
|
return {
|
|
@@ -265,6 +265,12 @@ const unmarshalPrivateNetworkDHCPConfig = data => {
|
|
|
265
265
|
}
|
|
266
266
|
return {};
|
|
267
267
|
};
|
|
268
|
+
const unmarshalPrivateNetworkIpamConfig = data => {
|
|
269
|
+
if (!isJSONObject(data)) {
|
|
270
|
+
throw new TypeError(`Unmarshalling the type 'PrivateNetworkIpamConfig' failed as data isn't a dictionary.`);
|
|
271
|
+
}
|
|
272
|
+
return {};
|
|
273
|
+
};
|
|
268
274
|
const unmarshalPrivateNetworkStaticConfig = data => {
|
|
269
275
|
if (!isJSONObject(data)) {
|
|
270
276
|
throw new TypeError(`Unmarshalling the type 'PrivateNetworkStaticConfig' failed as data isn't a dictionary.`);
|
|
@@ -330,6 +336,7 @@ const unmarshalPrivateNetwork = data => {
|
|
|
330
336
|
return {
|
|
331
337
|
createdAt: unmarshalDate(data.created_at),
|
|
332
338
|
dhcpConfig: data.dhcp_config ? unmarshalPrivateNetworkDHCPConfig(data.dhcp_config) : undefined,
|
|
339
|
+
ipamConfig: data.ipam_config ? unmarshalPrivateNetworkIpamConfig(data.ipam_config) : undefined,
|
|
333
340
|
lb: data.lb ? unmarshalLb(data.lb) : undefined,
|
|
334
341
|
privateNetworkId: data.private_network_id,
|
|
335
342
|
staticConfig: data.static_config ? unmarshalPrivateNetworkStaticConfig(data.static_config) : undefined,
|
|
@@ -548,6 +555,7 @@ const marshalHealthCheck = (request, defaults) => ({
|
|
|
548
555
|
}])
|
|
549
556
|
});
|
|
550
557
|
const marshalPrivateNetworkDHCPConfig = (request, defaults) => ({});
|
|
558
|
+
const marshalPrivateNetworkIpamConfig = (request, defaults) => ({});
|
|
551
559
|
const marshalPrivateNetworkStaticConfig = (request, defaults) => ({
|
|
552
560
|
ip_address: request.ipAddress
|
|
553
561
|
});
|
|
@@ -576,6 +584,9 @@ const marshalAttachPrivateNetworkRequest = (request, defaults) => ({
|
|
|
576
584
|
}, {
|
|
577
585
|
param: 'dhcp_config',
|
|
578
586
|
value: request.dhcpConfig ? marshalPrivateNetworkDHCPConfig(request.dhcpConfig) : undefined
|
|
587
|
+
}, {
|
|
588
|
+
param: 'ipam_config',
|
|
589
|
+
value: request.ipamConfig ? marshalPrivateNetworkIpamConfig(request.ipamConfig) : undefined
|
|
579
590
|
}])
|
|
580
591
|
});
|
|
581
592
|
const marshalCreateAclRequest = (request, defaults) => ({
|
|
@@ -786,6 +797,9 @@ const marshalZonedApiAttachPrivateNetworkRequest = (request, defaults) => ({
|
|
|
786
797
|
}, {
|
|
787
798
|
param: 'dhcp_config',
|
|
788
799
|
value: request.dhcpConfig ? marshalPrivateNetworkDHCPConfig(request.dhcpConfig) : undefined
|
|
800
|
+
}, {
|
|
801
|
+
param: 'ipam_config',
|
|
802
|
+
value: request.ipamConfig ? marshalPrivateNetworkIpamConfig(request.ipamConfig) : undefined
|
|
789
803
|
}])
|
|
790
804
|
});
|
|
791
805
|
const marshalZonedApiCreateAclRequest = (request, defaults) => ({
|
|
@@ -20,12 +20,24 @@ class API extends API$1 {
|
|
|
20
20
|
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize])
|
|
21
21
|
}, unmarshalListImagesResponse);
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* List marketplace images
|
|
25
|
+
*
|
|
26
|
+
* @param request - The request {@link ListImagesRequest}
|
|
27
|
+
* @returns A Promise of ListImagesResponse
|
|
28
|
+
*/
|
|
23
29
|
this.listImages = function (request) {
|
|
24
30
|
if (request === void 0) {
|
|
25
31
|
request = {};
|
|
26
32
|
}
|
|
27
33
|
return enrichForPagination('images', _this.pageOfListImages, request);
|
|
28
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* Get a specific marketplace image
|
|
37
|
+
*
|
|
38
|
+
* @param request - The request {@link GetImageRequest}
|
|
39
|
+
* @returns A Promise of GetImageResponse
|
|
40
|
+
*/
|
|
29
41
|
this.getImage = request => this.client.fetch({
|
|
30
42
|
method: 'GET',
|
|
31
43
|
path: `/marketplace/v1/images/${validatePathParam('imageId', request.imageId)}`
|
|
@@ -15,7 +15,19 @@ class API extends API$1 {
|
|
|
15
15
|
path: `/marketplace/v2/images`,
|
|
16
16
|
urlParams: urlParams(['arch', request.arch], ['category', request.category], ['include_eol', request.includeEol], ['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
17
17
|
}, unmarshalListImagesResponse);
|
|
18
|
+
/**
|
|
19
|
+
* List marketplace images
|
|
20
|
+
*
|
|
21
|
+
* @param request - The request {@link ListImagesRequest}
|
|
22
|
+
* @returns A Promise of ListImagesResponse
|
|
23
|
+
*/
|
|
18
24
|
this.listImages = request => enrichForPagination('images', this.pageOfListImages, request);
|
|
25
|
+
/**
|
|
26
|
+
* Get a specific marketplace image
|
|
27
|
+
*
|
|
28
|
+
* @param request - The request {@link GetImageRequest}
|
|
29
|
+
* @returns A Promise of Image
|
|
30
|
+
*/
|
|
19
31
|
this.getImage = request => this.client.fetch({
|
|
20
32
|
method: 'GET',
|
|
21
33
|
path: `/marketplace/v2/images/${validatePathParam('imageId', request.imageId)}`
|
|
@@ -49,6 +61,12 @@ class API extends API$1 {
|
|
|
49
61
|
}])))
|
|
50
62
|
}, unmarshalListLocalImagesResponse);
|
|
51
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* List local images from a specific image or version
|
|
66
|
+
*
|
|
67
|
+
* @param request - The request {@link ListLocalImagesRequest}
|
|
68
|
+
* @returns A Promise of ListLocalImagesResponse
|
|
69
|
+
*/
|
|
52
70
|
this.listLocalImages = function (request) {
|
|
53
71
|
if (request === void 0) {
|
|
54
72
|
request = {};
|
|
@@ -25,41 +25,81 @@ class API extends API$1 {
|
|
|
25
25
|
return _this.client.fetch({
|
|
26
26
|
method: 'GET',
|
|
27
27
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`,
|
|
28
|
-
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId
|
|
28
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
29
29
|
}, unmarshalListNamespacesResponse);
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* List namespaces
|
|
33
|
+
*
|
|
34
|
+
* @param request - The request {@link ListNamespacesRequest}
|
|
35
|
+
* @returns A Promise of ListNamespacesResponse
|
|
36
|
+
*/
|
|
31
37
|
this.listNamespaces = function (request) {
|
|
32
38
|
if (request === void 0) {
|
|
33
39
|
request = {};
|
|
34
40
|
}
|
|
35
41
|
return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
|
|
36
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* Create a namespace
|
|
45
|
+
*
|
|
46
|
+
* @param request - The request {@link CreateNamespaceRequest}
|
|
47
|
+
* @returns A Promise of Namespace
|
|
48
|
+
*/
|
|
37
49
|
this.createNamespace = request => this.client.fetch({
|
|
38
50
|
body: JSON.stringify(marshalCreateNamespaceRequest(request, this.client.settings)),
|
|
39
51
|
headers: jsonContentHeaders,
|
|
40
52
|
method: 'POST',
|
|
41
53
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
|
|
42
54
|
}, unmarshalNamespace);
|
|
55
|
+
/**
|
|
56
|
+
* Update the name of a namespace
|
|
57
|
+
*
|
|
58
|
+
* @param request - The request {@link UpdateNamespaceRequest}
|
|
59
|
+
* @returns A Promise of Namespace
|
|
60
|
+
*/
|
|
43
61
|
this.updateNamespace = request => this.client.fetch({
|
|
44
62
|
body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
|
|
45
63
|
headers: jsonContentHeaders,
|
|
46
64
|
method: 'PATCH',
|
|
47
65
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
|
|
48
66
|
}, unmarshalNamespace);
|
|
67
|
+
/**
|
|
68
|
+
* Get a namespace
|
|
69
|
+
*
|
|
70
|
+
* @param request - The request {@link GetNamespaceRequest}
|
|
71
|
+
* @returns A Promise of Namespace
|
|
72
|
+
*/
|
|
49
73
|
this.getNamespace = request => this.client.fetch({
|
|
50
74
|
method: 'GET',
|
|
51
75
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
52
76
|
}, unmarshalNamespace);
|
|
77
|
+
/**
|
|
78
|
+
* Delete a namespace
|
|
79
|
+
*
|
|
80
|
+
* @param request - The request {@link DeleteNamespaceRequest}
|
|
81
|
+
*/
|
|
53
82
|
this.deleteNamespace = request => this.client.fetch({
|
|
54
83
|
method: 'DELETE',
|
|
55
84
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
56
85
|
});
|
|
86
|
+
/**
|
|
87
|
+
* Create a set of credentials for a specific namespace.
|
|
88
|
+
*
|
|
89
|
+
* @param request - The request {@link CreateCredentialRequest}
|
|
90
|
+
* @returns A Promise of Credential
|
|
91
|
+
*/
|
|
57
92
|
this.createCredential = request => this.client.fetch({
|
|
58
93
|
body: JSON.stringify(marshalCreateCredentialRequest(request, this.client.settings)),
|
|
59
94
|
headers: jsonContentHeaders,
|
|
60
95
|
method: 'POST',
|
|
61
96
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials`
|
|
62
97
|
}, unmarshalCredential);
|
|
98
|
+
/**
|
|
99
|
+
* Delete credentials
|
|
100
|
+
*
|
|
101
|
+
* @param request - The request {@link DeleteCredentialRequest}
|
|
102
|
+
*/
|
|
63
103
|
this.deleteCredential = request => this.client.fetch({
|
|
64
104
|
method: 'DELETE',
|
|
65
105
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
|
|
@@ -74,24 +114,43 @@ class API extends API$1 {
|
|
|
74
114
|
urlParams: urlParams(['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'id_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
|
|
75
115
|
}, unmarshalListCredentialsResponse);
|
|
76
116
|
};
|
|
117
|
+
/**
|
|
118
|
+
* List credentials
|
|
119
|
+
*
|
|
120
|
+
* @param request - The request {@link ListCredentialsRequest}
|
|
121
|
+
* @returns A Promise of ListCredentialsResponse
|
|
122
|
+
*/
|
|
77
123
|
this.listCredentials = function (request) {
|
|
78
124
|
if (request === void 0) {
|
|
79
125
|
request = {};
|
|
80
126
|
}
|
|
81
127
|
return enrichForPagination('credentials', _this.pageOfListCredentials, request);
|
|
82
128
|
};
|
|
129
|
+
/**
|
|
130
|
+
* Update a set of credentials.
|
|
131
|
+
*
|
|
132
|
+
* @param request - The request {@link UpdateCredentialRequest}
|
|
133
|
+
* @returns A Promise of Credential
|
|
134
|
+
*/
|
|
83
135
|
this.updateCredential = request => this.client.fetch({
|
|
84
136
|
body: JSON.stringify(marshalUpdateCredentialRequest(request, this.client.settings)),
|
|
85
137
|
headers: jsonContentHeaders,
|
|
86
138
|
method: 'PATCH',
|
|
87
139
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
|
|
88
140
|
}, unmarshalCredential);
|
|
141
|
+
/**
|
|
142
|
+
* Get a set of credentials
|
|
143
|
+
*
|
|
144
|
+
* @param request - The request {@link GetCredentialRequest}
|
|
145
|
+
* @returns A Promise of Credential
|
|
146
|
+
*/
|
|
89
147
|
this.getCredential = request => this.client.fetch({
|
|
90
148
|
method: 'GET',
|
|
91
149
|
path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
|
|
92
150
|
}, unmarshalCredential);
|
|
93
151
|
}
|
|
94
152
|
}
|
|
153
|
+
/** Lists the available regions of the API. */
|
|
95
154
|
API.LOCALITIES = ['fr-par'];
|
|
96
155
|
|
|
97
156
|
export { API };
|