@scaleway/sdk 0.1.0-beta.1 → 0.1.0-beta.11
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/README.md +1 -1
- package/dist/api/account/index.js +2 -0
- package/dist/api/account/v2/api.gen.js +88 -0
- package/dist/api/account/v2/index.js +1 -0
- package/dist/api/account/v2/marshalling.gen.js +39 -0
- package/dist/api/account/v2alpha1/marshalling.gen.js +1 -1
- package/dist/api/baremetal/v1/marshalling.gen.js +1 -1
- package/dist/api/container/v1beta1/marshalling.gen.js +3 -1
- package/dist/api/domain/v2beta1/api.gen.js +15 -2
- package/dist/api/domain/v2beta1/marshalling.gen.js +56 -4
- package/dist/api/function/v1beta1/marshalling.gen.js +3 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.js +6 -5
- package/dist/api/instance/v1/api.gen.js +8 -1
- package/dist/api/instance/v1/marshalling.gen.js +38 -3
- package/dist/api/iot/v1/marshalling.gen.js +1 -1
- package/dist/api/k8s/v1/api.gen.js +2 -1
- package/dist/api/k8s/v1/content.gen.js +1 -1
- package/dist/api/k8s/v1/marshalling.gen.js +2 -1
- package/dist/api/lb/v1/marshalling.gen.js +1 -1
- package/dist/api/marketplace/v1/marshalling.gen.js +1 -1
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +26 -1
- package/dist/api/rdb/v1/api.gen.js +32 -1
- package/dist/api/rdb/v1/marshalling.gen.js +56 -19
- package/dist/api/redis/v1alpha1/api.gen.js +1 -1
- package/dist/api/redis/v1alpha1/marshalling.gen.js +1 -1
- package/dist/api/registry/v1/marshalling.gen.js +1 -1
- package/dist/api/test/v1/marshalling.gen.js +1 -1
- package/dist/api/vpcgw/v1/marshalling.gen.js +1 -1
- package/dist/helpers/json.js +6 -0
- package/dist/index.cjs +511 -89
- package/dist/index.d.ts +706 -140
- package/dist/index.js +2 -1
- package/dist/scw/api.js +1 -1
- package/dist/scw/client-ini-factory.js +5 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-marshalling.js +12 -8
- package/dist/scw/errors/standard/precondition-failed-error.js +2 -19
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This SDK enables you to interact with Scaleway APIs.
|
|
4
4
|
|
|
5
5
|
**🔗 Important links:**
|
|
6
|
-
* Reference documentation
|
|
6
|
+
* [Reference documentation](https://scaleway.github.io/scaleway-sdk-js)
|
|
7
7
|
* [Example projects](https://github.com/scaleway/scaleway-sdk-js/tree/master/examples)
|
|
8
8
|
* [Developers website](https://developers.scaleway.com) (API documentation)
|
|
9
9
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { API } from '../../../scw/api.js';
|
|
2
|
+
import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
|
|
3
|
+
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
+
import { marshalCreateProjectRequest, unmarshalProject, unmarshalListProjectsResponse, marshalUpdateProjectRequest } from './marshalling.gen.js';
|
|
5
|
+
|
|
6
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
7
|
+
const jsonContentHeaders = {
|
|
8
|
+
'Content-Type': 'application/json; charset=utf-8'
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Account API.
|
|
12
|
+
*
|
|
13
|
+
* This API allows you to manage projects.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
class AccountV2GenAPI extends API {
|
|
17
|
+
constructor() {
|
|
18
|
+
var _this;
|
|
19
|
+
|
|
20
|
+
super(...arguments);
|
|
21
|
+
_this = this;
|
|
22
|
+
|
|
23
|
+
this.createProject = request => this.client.fetch({
|
|
24
|
+
body: JSON.stringify(marshalCreateProjectRequest(request, this.client.settings)),
|
|
25
|
+
headers: jsonContentHeaders,
|
|
26
|
+
method: 'POST',
|
|
27
|
+
path: `/account/v2/projects`
|
|
28
|
+
}, unmarshalProject);
|
|
29
|
+
|
|
30
|
+
this.pageOfListProjects = function (request) {
|
|
31
|
+
if (request === void 0) {
|
|
32
|
+
request = {};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return _this.client.fetch({
|
|
36
|
+
method: 'GET',
|
|
37
|
+
path: `/account/v2/projects`,
|
|
38
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_ids', request.projectIds])
|
|
39
|
+
}, unmarshalListProjectsResponse);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
this.listProjects = function (request) {
|
|
43
|
+
if (request === void 0) {
|
|
44
|
+
request = {};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return enrichForPagination('projects', _this.pageOfListProjects, request);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
this.getProject = function (request) {
|
|
51
|
+
if (request === void 0) {
|
|
52
|
+
request = {};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return _this.client.fetch({
|
|
56
|
+
method: 'GET',
|
|
57
|
+
path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? _this.client.settings.defaultProjectId)}`
|
|
58
|
+
}, unmarshalProject);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
this.deleteProject = function (request) {
|
|
62
|
+
if (request === void 0) {
|
|
63
|
+
request = {};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return _this.client.fetch({
|
|
67
|
+
method: 'DELETE',
|
|
68
|
+
path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? _this.client.settings.defaultProjectId)}`
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
this.updateProject = function (request) {
|
|
73
|
+
if (request === void 0) {
|
|
74
|
+
request = {};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return _this.client.fetch({
|
|
78
|
+
body: JSON.stringify(marshalUpdateProjectRequest(request, _this.client.settings)),
|
|
79
|
+
headers: jsonContentHeaders,
|
|
80
|
+
method: 'PATCH',
|
|
81
|
+
path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? _this.client.settings.defaultProjectId)}`
|
|
82
|
+
}, unmarshalProject);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { AccountV2GenAPI };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AccountV2GenAPI as API } from './api.gen.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { isJSONObject } from '../../../helpers/json.js';
|
|
2
|
+
import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.js';
|
|
3
|
+
|
|
4
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
5
|
+
const unmarshalProject = data => {
|
|
6
|
+
if (!isJSONObject(data)) {
|
|
7
|
+
throw new TypeError(`Unmarshalling the type 'Project' failed as data isn't a dictionary.`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
createdAt: unmarshalDate(data.created_at),
|
|
12
|
+
description: data.description,
|
|
13
|
+
id: data.id,
|
|
14
|
+
name: data.name,
|
|
15
|
+
organizationId: data.organization_id,
|
|
16
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
const unmarshalListProjectsResponse = data => {
|
|
20
|
+
if (!isJSONObject(data)) {
|
|
21
|
+
throw new TypeError(`Unmarshalling the type 'ListProjectsResponse' failed as data isn't a dictionary.`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
projects: unmarshalArrayOfObject(data.projects, unmarshalProject),
|
|
26
|
+
totalCount: data.total_count
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
const marshalCreateProjectRequest = (request, defaults) => ({
|
|
30
|
+
description: request.description,
|
|
31
|
+
name: request.name,
|
|
32
|
+
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
33
|
+
});
|
|
34
|
+
const marshalUpdateProjectRequest = (request, defaults) => ({
|
|
35
|
+
description: request.description,
|
|
36
|
+
name: request.name
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export { marshalCreateProjectRequest, marshalUpdateProjectRequest, unmarshalListProjectsResponse, unmarshalProject };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
2
|
-
import {
|
|
2
|
+
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
3
3
|
|
|
4
4
|
// This file was automatically generated. DO NOT EDIT.
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
2
2
|
import { unmarshalMoney, unmarshalTimeSeries } from '../../../scw/custom-marshalling.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
6
|
|
|
@@ -114,6 +114,7 @@ const unmarshalToken = data => {
|
|
|
114
114
|
|
|
115
115
|
return {
|
|
116
116
|
containerId: data.container_id,
|
|
117
|
+
description: data.description,
|
|
117
118
|
expiresAt: unmarshalDate(data.expires_at),
|
|
118
119
|
id: data.id,
|
|
119
120
|
namespaceId: data.namespace_id,
|
|
@@ -222,6 +223,7 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
|
222
223
|
secret_environment_variables: request.secretEnvironmentVariables ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined
|
|
223
224
|
});
|
|
224
225
|
const marshalCreateTokenRequest = (request, defaults) => ({
|
|
226
|
+
description: request.description,
|
|
225
227
|
expires_at: request.expiresAt,
|
|
226
228
|
...resolveOneOf([{
|
|
227
229
|
param: 'container_id',
|
|
@@ -2,7 +2,7 @@ import { API } from '../../../scw/api.js';
|
|
|
2
2
|
import { unmarshalScwFile } from '../../../scw/custom-marshalling.js';
|
|
3
3
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
4
|
import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
|
|
5
|
-
import { unmarshalListDNSZonesResponse, marshalCreateDNSZoneRequest, unmarshalDNSZone, marshalUpdateDNSZoneRequest, marshalCloneDNSZoneRequest, unmarshalDeleteDNSZoneResponse, unmarshalListDNSZoneRecordsResponse, marshalUpdateDNSZoneRecordsRequest, unmarshalUpdateDNSZoneRecordsResponse, unmarshalListDNSZoneNameserversResponse, marshalUpdateDNSZoneNameserversRequest, unmarshalUpdateDNSZoneNameserversResponse, unmarshalClearDNSZoneRecordsResponse, marshalImportRawDNSZoneRequest, unmarshalImportRawDNSZoneResponse, marshalImportProviderDNSZoneRequest, unmarshalImportProviderDNSZoneResponse, marshalRefreshDNSZoneRequest, unmarshalRefreshDNSZoneResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, marshalCreateSSLCertificateRequest, unmarshalListSSLCertificatesResponse, unmarshalDeleteSSLCertificateResponse, unmarshalGetDNSZoneTsigKeyResponse, unmarshalListTasksResponse, marshalRegistrarApiBuyDomainsRequest, unmarshalOrderResponse, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiRegisterExternalDomainRequest, unmarshalRegisterExternalDomainResponse, unmarshalDeleteExternalDomainResponse, unmarshalListContactsResponse, unmarshalContact, marshalRegistrarApiUpdateContactRequest, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalDomain, marshalRegistrarApiUpdateDomainRequest, unmarshalGetDomainAuthCodeResponse, marshalRegistrarApiEnableDomainDNSSECRequest, unmarshalSearchAvailableDomainsResponse } from './marshalling.gen.js';
|
|
5
|
+
import { unmarshalListDNSZonesResponse, marshalCreateDNSZoneRequest, unmarshalDNSZone, marshalUpdateDNSZoneRequest, marshalCloneDNSZoneRequest, unmarshalDeleteDNSZoneResponse, unmarshalListDNSZoneRecordsResponse, marshalUpdateDNSZoneRecordsRequest, unmarshalUpdateDNSZoneRecordsResponse, unmarshalListDNSZoneNameserversResponse, marshalUpdateDNSZoneNameserversRequest, unmarshalUpdateDNSZoneNameserversResponse, unmarshalClearDNSZoneRecordsResponse, marshalImportRawDNSZoneRequest, unmarshalImportRawDNSZoneResponse, marshalImportProviderDNSZoneRequest, unmarshalImportProviderDNSZoneResponse, marshalRefreshDNSZoneRequest, unmarshalRefreshDNSZoneResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, marshalCreateSSLCertificateRequest, unmarshalListSSLCertificatesResponse, unmarshalDeleteSSLCertificateResponse, unmarshalGetDNSZoneTsigKeyResponse, unmarshalListTasksResponse, marshalRegistrarApiBuyDomainsRequest, unmarshalOrderResponse, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiRegisterExternalDomainRequest, unmarshalRegisterExternalDomainResponse, unmarshalDeleteExternalDomainResponse, marshalRegistrarApiCheckContactsCompatibilityRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalListContactsResponse, unmarshalContact, marshalRegistrarApiUpdateContactRequest, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalDomain, marshalRegistrarApiUpdateDomainRequest, unmarshalGetDomainAuthCodeResponse, marshalRegistrarApiEnableDomainDNSSECRequest, unmarshalSearchAvailableDomainsResponse } from './marshalling.gen.js';
|
|
6
6
|
|
|
7
7
|
// This file was automatically generated. DO NOT EDIT.
|
|
8
8
|
const jsonContentHeaders = {
|
|
@@ -239,6 +239,19 @@ class DomainRegistrarV2Beta1GenAPI extends API {
|
|
|
239
239
|
path: `/domain/v2beta1/external-domains/${validatePathParam('domain', request.domain)}`
|
|
240
240
|
}, unmarshalDeleteExternalDomainResponse);
|
|
241
241
|
|
|
242
|
+
this.checkContactsCompatibility = function (request) {
|
|
243
|
+
if (request === void 0) {
|
|
244
|
+
request = {};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return _this.client.fetch({
|
|
248
|
+
body: JSON.stringify(marshalRegistrarApiCheckContactsCompatibilityRequest(request, _this.client.settings)),
|
|
249
|
+
headers: jsonContentHeaders,
|
|
250
|
+
method: 'POST',
|
|
251
|
+
path: `/domain/v2beta1/check-contacts-compatibility`
|
|
252
|
+
}, unmarshalCheckContactsCompatibilityResponse);
|
|
253
|
+
};
|
|
254
|
+
|
|
242
255
|
this.pageOfListContacts = function (request) {
|
|
243
256
|
if (request === void 0) {
|
|
244
257
|
request = {};
|
|
@@ -279,7 +292,7 @@ class DomainRegistrarV2Beta1GenAPI extends API {
|
|
|
279
292
|
return _this.client.fetch({
|
|
280
293
|
method: 'GET',
|
|
281
294
|
path: `/domain/v2beta1/domains`,
|
|
282
|
-
urlParams: urlParams(['is_external', request.isExternal], ['order_by', request.orderBy ?? 'domain_asc'], ['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId], ['registrar', request.registrar], ['status', request.status ?? 'status_unknown'])
|
|
295
|
+
urlParams: urlParams(['domain', request.domain], ['is_external', request.isExternal], ['order_by', request.orderBy ?? 'domain_asc'], ['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this.client.settings.defaultProjectId], ['registrar', request.registrar], ['status', request.status ?? 'status_unknown'])
|
|
283
296
|
}, unmarshalListDomainsResponse);
|
|
284
297
|
};
|
|
285
298
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
2
2
|
import { unmarshalMoney } from '../../../scw/custom-marshalling.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf, unmarshalMapOfObject } from '../../../helpers/marshalling.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
6
|
|
|
@@ -274,7 +274,7 @@ const unmarshalContact = data => {
|
|
|
274
274
|
lastname: data.lastname,
|
|
275
275
|
legalForm: data.legal_form,
|
|
276
276
|
phoneNumber: data.phone_number,
|
|
277
|
-
questions: unmarshalArrayOfObject(data.questions, unmarshalContactQuestion),
|
|
277
|
+
questions: unmarshalArrayOfObject(data.questions, unmarshalContactQuestion, false),
|
|
278
278
|
resale: data.resale,
|
|
279
279
|
state: data.state,
|
|
280
280
|
vatIdentificationCode: data.vat_identification_code,
|
|
@@ -399,6 +399,17 @@ const unmarshalAvailableDomain = data => {
|
|
|
399
399
|
};
|
|
400
400
|
};
|
|
401
401
|
|
|
402
|
+
const unmarshalCheckContactsCompatibilityResponseContactCheckResult = data => {
|
|
403
|
+
if (!isJSONObject(data)) {
|
|
404
|
+
throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponseContactCheckResult' failed as data isn't a dictionary.`);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
return {
|
|
408
|
+
compatible: data.compatible,
|
|
409
|
+
errorMessage: data.error_message
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
|
|
402
413
|
const unmarshalContactRoles = data => {
|
|
403
414
|
if (!isJSONObject(data)) {
|
|
404
415
|
throw new TypeError(`Unmarshalling the type 'ContactRoles' failed as data isn't a dictionary.`);
|
|
@@ -545,6 +556,18 @@ const unmarshalTask = data => {
|
|
|
545
556
|
};
|
|
546
557
|
};
|
|
547
558
|
|
|
559
|
+
const unmarshalCheckContactsCompatibilityResponse = data => {
|
|
560
|
+
if (!isJSONObject(data)) {
|
|
561
|
+
throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponse' failed as data isn't a dictionary.`);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
return {
|
|
565
|
+
administrativeCheckResult: data.administrative_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result) : undefined,
|
|
566
|
+
compatible: data.compatible,
|
|
567
|
+
ownerCheckResult: data.owner_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result) : undefined,
|
|
568
|
+
technicalCheckResult: data.technical_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result) : undefined
|
|
569
|
+
};
|
|
570
|
+
};
|
|
548
571
|
const unmarshalClearDNSZoneRecordsResponse = data => {
|
|
549
572
|
if (!isJSONObject(data)) {
|
|
550
573
|
throw new TypeError(`Unmarshalling the type 'ClearDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
|
|
@@ -1027,7 +1050,7 @@ const marshalNewContact = (request, defaults) => ({
|
|
|
1027
1050
|
lastname: request.lastname,
|
|
1028
1051
|
legal_form: request.legalForm,
|
|
1029
1052
|
phone_number: request.phoneNumber,
|
|
1030
|
-
questions: request.questions.map(elt => marshalContactQuestion(elt)),
|
|
1053
|
+
questions: request.questions ? request.questions.map(elt => marshalContactQuestion(elt)) : undefined,
|
|
1031
1054
|
resale: request.resale,
|
|
1032
1055
|
state: request.state,
|
|
1033
1056
|
vat_identification_code: request.vatIdentificationCode,
|
|
@@ -1121,6 +1144,35 @@ const marshalRegistrarApiBuyDomainsRequest = (request, defaults) => ({
|
|
|
1121
1144
|
value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
|
|
1122
1145
|
}])
|
|
1123
1146
|
});
|
|
1147
|
+
const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults) => ({ ...resolveOneOf([{
|
|
1148
|
+
param: 'administrative_contact_id',
|
|
1149
|
+
value: request.administrativeContactId
|
|
1150
|
+
}, {
|
|
1151
|
+
param: 'administrative_contact',
|
|
1152
|
+
value: request.administrativeContact ? marshalNewContact(request.administrativeContact) : undefined
|
|
1153
|
+
}]),
|
|
1154
|
+
...resolveOneOf([{
|
|
1155
|
+
param: 'owner_contact_id',
|
|
1156
|
+
value: request.ownerContactId
|
|
1157
|
+
}, {
|
|
1158
|
+
param: 'owner_contact',
|
|
1159
|
+
value: request.ownerContact ? marshalNewContact(request.ownerContact) : undefined
|
|
1160
|
+
}]),
|
|
1161
|
+
...resolveOneOf([{
|
|
1162
|
+
param: 'domain',
|
|
1163
|
+
value: request.domain
|
|
1164
|
+
}, {
|
|
1165
|
+
param: 'tld',
|
|
1166
|
+
value: request.tld
|
|
1167
|
+
}]),
|
|
1168
|
+
...resolveOneOf([{
|
|
1169
|
+
param: 'technical_contact_id',
|
|
1170
|
+
value: request.technicalContactId
|
|
1171
|
+
}, {
|
|
1172
|
+
param: 'technical_contact',
|
|
1173
|
+
value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
|
|
1174
|
+
}])
|
|
1175
|
+
});
|
|
1124
1176
|
const marshalRegistrarApiEnableDomainDNSSECRequest = (request, defaults) => ({
|
|
1125
1177
|
ds_record: request.dsRecord ? marshalDSRecord(request.dsRecord) : undefined
|
|
1126
1178
|
});
|
|
@@ -1225,4 +1277,4 @@ const marshalUpdateDNSZoneRequest = (request, defaults) => ({
|
|
|
1225
1277
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
1226
1278
|
});
|
|
1227
1279
|
|
|
1228
|
-
export { marshalCloneDNSZoneRequest, marshalCreateDNSZoneRequest, marshalCreateSSLCertificateRequest, marshalImportProviderDNSZoneRequest, marshalImportRawDNSZoneRequest, marshalRefreshDNSZoneRequest, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiEnableDomainDNSSECRequest, marshalRegistrarApiRegisterExternalDomainRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiUpdateContactRequest, marshalRegistrarApiUpdateDomainRequest, marshalUpdateDNSZoneNameserversRequest, marshalUpdateDNSZoneRecordsRequest, marshalUpdateDNSZoneRequest, unmarshalClearDNSZoneRecordsResponse, unmarshalContact, unmarshalDNSZone, unmarshalDeleteDNSZoneResponse, unmarshalDeleteExternalDomainResponse, unmarshalDeleteSSLCertificateResponse, unmarshalDomain, unmarshalGetDNSZoneTsigKeyResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalGetDomainAuthCodeResponse, unmarshalImportProviderDNSZoneResponse, unmarshalImportRawDNSZoneResponse, unmarshalListContactsResponse, unmarshalListDNSZoneNameserversResponse, unmarshalListDNSZoneRecordsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZonesResponse, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalListSSLCertificatesResponse, unmarshalListTasksResponse, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsResponse, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse };
|
|
1280
|
+
export { marshalCloneDNSZoneRequest, marshalCreateDNSZoneRequest, marshalCreateSSLCertificateRequest, marshalImportProviderDNSZoneRequest, marshalImportRawDNSZoneRequest, marshalRefreshDNSZoneRequest, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiCheckContactsCompatibilityRequest, marshalRegistrarApiEnableDomainDNSSECRequest, marshalRegistrarApiRegisterExternalDomainRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiUpdateContactRequest, marshalRegistrarApiUpdateDomainRequest, marshalUpdateDNSZoneNameserversRequest, marshalUpdateDNSZoneRecordsRequest, marshalUpdateDNSZoneRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalClearDNSZoneRecordsResponse, unmarshalContact, unmarshalDNSZone, unmarshalDeleteDNSZoneResponse, unmarshalDeleteExternalDomainResponse, unmarshalDeleteSSLCertificateResponse, unmarshalDomain, unmarshalGetDNSZoneTsigKeyResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalGetDomainAuthCodeResponse, unmarshalImportProviderDNSZoneResponse, unmarshalImportRawDNSZoneResponse, unmarshalListContactsResponse, unmarshalListDNSZoneNameserversResponse, unmarshalListDNSZoneRecordsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZonesResponse, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalListSSLCertificatesResponse, unmarshalListTasksResponse, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsResponse, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
6
|
|
|
@@ -131,6 +131,7 @@ const unmarshalToken = data => {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
return {
|
|
134
|
+
description: data.description,
|
|
134
135
|
expiresAt: unmarshalDate(data.expires_at),
|
|
135
136
|
functionId: data.function_id,
|
|
136
137
|
id: data.id,
|
|
@@ -268,6 +269,7 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
|
268
269
|
secret_environment_variables: request.secretEnvironmentVariables ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined
|
|
269
270
|
});
|
|
270
271
|
const marshalCreateTokenRequest = (request, defaults) => ({
|
|
272
|
+
description: request.description,
|
|
271
273
|
expires_at: request.expiresAt,
|
|
272
274
|
...resolveOneOf([{
|
|
273
275
|
param: 'function_id',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
1
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
2
|
-
import {
|
|
3
|
+
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
3
4
|
|
|
4
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
5
6
|
const unmarshalAPIKey = data => {
|
|
@@ -265,17 +266,17 @@ const marshalCreateAPIKeyRequest = (request, defaults) => ({
|
|
|
265
266
|
});
|
|
266
267
|
const marshalCreateApplicationRequest = (request, defaults) => ({
|
|
267
268
|
description: request.description,
|
|
268
|
-
name: request.name,
|
|
269
|
+
name: request.name || randomName('app'),
|
|
269
270
|
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
270
271
|
});
|
|
271
272
|
const marshalCreateGroupRequest = (request, defaults) => ({
|
|
272
273
|
description: request.description,
|
|
273
|
-
name: request.name,
|
|
274
|
+
name: request.name || randomName('grp'),
|
|
274
275
|
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
275
276
|
});
|
|
276
277
|
const marshalCreatePolicyRequest = (request, defaults) => ({
|
|
277
278
|
description: request.description,
|
|
278
|
-
name: request.name,
|
|
279
|
+
name: request.name || randomName('pol'),
|
|
279
280
|
organization_id: request.organizationId ?? defaults.defaultOrganizationId,
|
|
280
281
|
rules: request.rules ? request.rules.map(elt => marshalRuleSpecs(elt, defaults)) : undefined,
|
|
281
282
|
...resolveOneOf([{
|
|
@@ -293,7 +294,7 @@ const marshalCreatePolicyRequest = (request, defaults) => ({
|
|
|
293
294
|
}])
|
|
294
295
|
});
|
|
295
296
|
const marshalCreateSSHKeyRequest = (request, defaults) => ({
|
|
296
|
-
name: request.name,
|
|
297
|
+
name: request.name || randomName('key'),
|
|
297
298
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
298
299
|
public_key: request.publicKey
|
|
299
300
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API } from '../../../scw/api.js';
|
|
2
2
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
3
3
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { unmarshalGetServerTypesAvailabilityResponse, unmarshalListServersTypesResponse, unmarshalListVolumesTypesResponse, unmarshalListServersResponse, marshalCreateServerRequest, unmarshalCreateServerResponse, unmarshalGetServerResponse, marshalSetServerRequest, unmarshalSetServerResponse, marshalUpdateServerRequest, unmarshalUpdateServerResponse, unmarshalListServerActionsResponse, marshalServerActionRequest, unmarshalServerActionResponse, unmarshalListServerUserDataResponse, unmarshalListImagesResponse, unmarshalGetImageResponse, marshalCreateImageRequest, unmarshalCreateImageResponse, marshalSetImageRequest, unmarshalSetImageResponse, unmarshalListSnapshotsResponse, marshalCreateSnapshotRequest, unmarshalCreateSnapshotResponse, unmarshalGetSnapshotResponse, marshalSetSnapshotRequest, unmarshalSetSnapshotResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalCreateVolumeResponse, unmarshalGetVolumeResponse, marshalUpdateVolumeRequest, unmarshalUpdateVolumeResponse, unmarshalListSecurityGroupsResponse, marshalCreateSecurityGroupRequest, unmarshalCreateSecurityGroupResponse, unmarshalGetSecurityGroupResponse, marshalSetSecurityGroupRequest, unmarshalSetSecurityGroupResponse, unmarshalListSecurityGroupRulesResponse, marshalCreateSecurityGroupRuleRequest, unmarshalCreateSecurityGroupRuleResponse, marshalSetSecurityGroupRulesRequest, unmarshalSetSecurityGroupRulesResponse, unmarshalGetSecurityGroupRuleResponse, marshalSetSecurityGroupRuleRequest, unmarshalSetSecurityGroupRuleResponse, unmarshalListPlacementGroupsResponse, marshalCreatePlacementGroupRequest, unmarshalCreatePlacementGroupResponse, unmarshalGetPlacementGroupResponse, marshalSetPlacementGroupRequest, unmarshalSetPlacementGroupResponse, marshalUpdatePlacementGroupRequest, unmarshalUpdatePlacementGroupResponse, unmarshalGetPlacementGroupServersResponse, marshalSetPlacementGroupServersRequest, unmarshalSetPlacementGroupServersResponse, marshalUpdatePlacementGroupServersRequest, unmarshalUpdatePlacementGroupServersResponse, unmarshalListIpsResponse, marshalCreateIpRequest, unmarshalCreateIpResponse, unmarshalGetIpResponse, marshalUpdateIpRequest, unmarshalUpdateIpResponse, unmarshalListPrivateNICsResponse, marshalCreatePrivateNICRequest, unmarshalCreatePrivateNICResponse, unmarshalGetPrivateNICResponse, unmarshalListBootscriptsResponse, unmarshalGetBootscriptResponse, unmarshalGetDashboardResponse } from './marshalling.gen.js';
|
|
4
|
+
import { unmarshalGetServerTypesAvailabilityResponse, unmarshalListServersTypesResponse, unmarshalListVolumesTypesResponse, unmarshalListServersResponse, marshalCreateServerRequest, unmarshalCreateServerResponse, unmarshalGetServerResponse, marshalSetServerRequest, unmarshalSetServerResponse, marshalUpdateServerRequest, unmarshalUpdateServerResponse, unmarshalListServerActionsResponse, marshalServerActionRequest, unmarshalServerActionResponse, unmarshalListServerUserDataResponse, unmarshalListImagesResponse, unmarshalGetImageResponse, marshalCreateImageRequest, unmarshalCreateImageResponse, marshalSetImageRequest, unmarshalSetImageResponse, unmarshalListSnapshotsResponse, marshalCreateSnapshotRequest, unmarshalCreateSnapshotResponse, unmarshalGetSnapshotResponse, marshalSetSnapshotRequest, unmarshalSetSnapshotResponse, marshalExportSnapshotRequest, unmarshalExportSnapshotResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalCreateVolumeResponse, unmarshalGetVolumeResponse, marshalUpdateVolumeRequest, unmarshalUpdateVolumeResponse, unmarshalListSecurityGroupsResponse, marshalCreateSecurityGroupRequest, unmarshalCreateSecurityGroupResponse, unmarshalGetSecurityGroupResponse, marshalSetSecurityGroupRequest, unmarshalSetSecurityGroupResponse, unmarshalListSecurityGroupRulesResponse, marshalCreateSecurityGroupRuleRequest, unmarshalCreateSecurityGroupRuleResponse, marshalSetSecurityGroupRulesRequest, unmarshalSetSecurityGroupRulesResponse, unmarshalGetSecurityGroupRuleResponse, marshalSetSecurityGroupRuleRequest, unmarshalSetSecurityGroupRuleResponse, unmarshalListPlacementGroupsResponse, marshalCreatePlacementGroupRequest, unmarshalCreatePlacementGroupResponse, unmarshalGetPlacementGroupResponse, marshalSetPlacementGroupRequest, unmarshalSetPlacementGroupResponse, marshalUpdatePlacementGroupRequest, unmarshalUpdatePlacementGroupResponse, unmarshalGetPlacementGroupServersResponse, marshalSetPlacementGroupServersRequest, unmarshalSetPlacementGroupServersResponse, marshalUpdatePlacementGroupServersRequest, unmarshalUpdatePlacementGroupServersResponse, unmarshalListIpsResponse, marshalCreateIpRequest, unmarshalCreateIpResponse, unmarshalGetIpResponse, marshalUpdateIpRequest, unmarshalUpdateIpResponse, unmarshalListPrivateNICsResponse, marshalCreatePrivateNICRequest, unmarshalCreatePrivateNICResponse, unmarshalGetPrivateNICResponse, unmarshalListBootscriptsResponse, unmarshalGetBootscriptResponse, unmarshalGetDashboardResponse } from './marshalling.gen.js';
|
|
5
5
|
|
|
6
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
7
7
|
const jsonContentHeaders = {
|
|
@@ -213,6 +213,13 @@ class InstanceV1GenAPI extends API {
|
|
|
213
213
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
214
214
|
});
|
|
215
215
|
|
|
216
|
+
this.exportSnapshot = request => this.client.fetch({
|
|
217
|
+
body: JSON.stringify(marshalExportSnapshotRequest(request, this.client.settings)),
|
|
218
|
+
headers: jsonContentHeaders,
|
|
219
|
+
method: 'POST',
|
|
220
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}/export`
|
|
221
|
+
}, unmarshalExportSnapshotResponse);
|
|
222
|
+
|
|
216
223
|
this.pageOfListVolumes = function (request) {
|
|
217
224
|
if (request === void 0) {
|
|
218
225
|
request = {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unmarshalArrayOfObject, unmarshalMapOfObject, resolveOneOf, unmarshalDate } from '../../../helpers/marshalling.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
6
|
|
|
@@ -206,6 +206,17 @@ const unmarshalServerMaintenance = data => {
|
|
|
206
206
|
return {};
|
|
207
207
|
};
|
|
208
208
|
|
|
209
|
+
const unmarshalServerTypeCapabilities = data => {
|
|
210
|
+
if (!isJSONObject(data)) {
|
|
211
|
+
throw new TypeError(`Unmarshalling the type 'ServerTypeCapabilities' failed as data isn't a dictionary.`);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return {
|
|
215
|
+
blockStorage: data.block_storage,
|
|
216
|
+
bootTypes: data.boot_types
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
|
|
209
220
|
const unmarshalServerTypeNetwork = data => {
|
|
210
221
|
if (!isJSONObject(data)) {
|
|
211
222
|
throw new TypeError(`Unmarshalling the type 'ServerTypeNetwork' failed as data isn't a dictionary.`);
|
|
@@ -292,12 +303,18 @@ const unmarshalDashboard = data => {
|
|
|
292
303
|
imagesCount: data.images_count,
|
|
293
304
|
ipsCount: data.ips_count,
|
|
294
305
|
ipsUnused: data.ips_unused,
|
|
306
|
+
placementGroupsCount: data.placement_groups_count,
|
|
307
|
+
privateNicsCount: data.private_nics_count,
|
|
295
308
|
runningServersCount: data.running_servers_count,
|
|
296
309
|
securityGroupsCount: data.security_groups_count,
|
|
297
310
|
serversByTypes: data.servers_by_types,
|
|
298
311
|
serversCount: data.servers_count,
|
|
299
312
|
snapshotsCount: data.snapshots_count,
|
|
300
|
-
|
|
313
|
+
volumesBSsdCount: data.volumes_b_ssd_count,
|
|
314
|
+
volumesBSsdTotalSize: data.volumes_b_ssd_total_size,
|
|
315
|
+
volumesCount: data.volumes_count,
|
|
316
|
+
volumesLSsdCount: data.volumes_l_ssd_count,
|
|
317
|
+
volumesLSsdTotalSize: data.volumes_l_ssd_total_size
|
|
301
318
|
};
|
|
302
319
|
};
|
|
303
320
|
|
|
@@ -432,6 +449,7 @@ const unmarshalServerType = data => {
|
|
|
432
449
|
altNames: data.alt_names,
|
|
433
450
|
arch: data.arch,
|
|
434
451
|
baremetal: data.baremetal,
|
|
452
|
+
capabilities: data.capabilities ? unmarshalServerTypeCapabilities(data.capabilities) : undefined,
|
|
435
453
|
gpu: data.gpu,
|
|
436
454
|
hourlyPrice: data.hourly_price,
|
|
437
455
|
monthlyPrice: data.monthly_price,
|
|
@@ -451,6 +469,7 @@ const unmarshalSnapshot = data => {
|
|
|
451
469
|
return {
|
|
452
470
|
baseVolume: data.base_volume ? unmarshalSnapshotBaseVolume(data.base_volume) : undefined,
|
|
453
471
|
creationDate: unmarshalDate(data.creation_date),
|
|
472
|
+
errorReason: data.error_reason,
|
|
454
473
|
id: data.id,
|
|
455
474
|
modificationDate: unmarshalDate(data.modification_date),
|
|
456
475
|
name: data.name,
|
|
@@ -579,6 +598,15 @@ const unmarshalCreateVolumeResponse = data => {
|
|
|
579
598
|
volume: data.volume ? unmarshalVolume(data.volume) : undefined
|
|
580
599
|
};
|
|
581
600
|
};
|
|
601
|
+
const unmarshalExportSnapshotResponse = data => {
|
|
602
|
+
if (!isJSONObject(data)) {
|
|
603
|
+
throw new TypeError(`Unmarshalling the type 'ExportSnapshotResponse' failed as data isn't a dictionary.`);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
return {
|
|
607
|
+
task: data.task ? unmarshalTask(data.task) : undefined
|
|
608
|
+
};
|
|
609
|
+
};
|
|
582
610
|
const unmarshalGetBootscriptResponse = data => {
|
|
583
611
|
if (!isJSONObject(data)) {
|
|
584
612
|
throw new TypeError(`Unmarshalling the type 'GetBootscriptResponse' failed as data isn't a dictionary.`);
|
|
@@ -1250,7 +1278,10 @@ const marshalCreateServerRequest = (request, defaults) => ({
|
|
|
1250
1278
|
}])
|
|
1251
1279
|
});
|
|
1252
1280
|
const marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
1281
|
+
bucket: request.bucket,
|
|
1282
|
+
key: request.key,
|
|
1253
1283
|
name: request.name || randomName('snp'),
|
|
1284
|
+
size: request.size,
|
|
1254
1285
|
tags: request.tags,
|
|
1255
1286
|
volume_id: request.volumeId,
|
|
1256
1287
|
volume_type: request.volumeType,
|
|
@@ -1288,6 +1319,10 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
1288
1319
|
value: request.baseSnapshot
|
|
1289
1320
|
}])
|
|
1290
1321
|
});
|
|
1322
|
+
const marshalExportSnapshotRequest = (request, defaults) => ({
|
|
1323
|
+
bucket: request.bucket,
|
|
1324
|
+
key: request.key
|
|
1325
|
+
});
|
|
1291
1326
|
const marshalServerActionRequest = (request, defaults) => ({
|
|
1292
1327
|
action: request.action,
|
|
1293
1328
|
name: request.name,
|
|
@@ -1444,4 +1479,4 @@ const marshalUpdateVolumeRequest = (request, defaults) => ({
|
|
|
1444
1479
|
tags: request.tags
|
|
1445
1480
|
});
|
|
1446
1481
|
|
|
1447
|
-
export { marshalCreateImageRequest, marshalCreateIpRequest, marshalCreatePlacementGroupRequest, marshalCreatePrivateNICRequest, marshalCreateSecurityGroupRequest, marshalCreateSecurityGroupRuleRequest, marshalCreateServerRequest, marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalServerActionRequest, marshalSetImageRequest, marshalSetPlacementGroupRequest, marshalSetPlacementGroupServersRequest, marshalSetSecurityGroupRequest, marshalSetSecurityGroupRuleRequest, marshalSetSecurityGroupRulesRequest, marshalSetServerRequest, marshalSetSnapshotRequest, marshalUpdateIpRequest, marshalUpdatePlacementGroupRequest, marshalUpdatePlacementGroupServersRequest, marshalUpdateServerRequest, marshalUpdateVolumeRequest, unmarshalCreateImageResponse, unmarshalCreateIpResponse, unmarshalCreatePlacementGroupResponse, unmarshalCreatePrivateNICResponse, unmarshalCreateSecurityGroupResponse, unmarshalCreateSecurityGroupRuleResponse, unmarshalCreateServerResponse, unmarshalCreateSnapshotResponse, unmarshalCreateVolumeResponse, unmarshalGetBootscriptResponse, unmarshalGetDashboardResponse, unmarshalGetImageResponse, unmarshalGetIpResponse, unmarshalGetPlacementGroupResponse, unmarshalGetPlacementGroupServersResponse, unmarshalGetPrivateNICResponse, unmarshalGetSecurityGroupResponse, unmarshalGetSecurityGroupRuleResponse, unmarshalGetServerResponse, unmarshalGetServerTypesAvailabilityResponse, unmarshalGetSnapshotResponse, unmarshalGetVolumeResponse, unmarshalListBootscriptsResponse, unmarshalListImagesResponse, unmarshalListIpsResponse, unmarshalListPlacementGroupsResponse, unmarshalListPrivateNICsResponse, unmarshalListSecurityGroupRulesResponse, unmarshalListSecurityGroupsResponse, unmarshalListServerActionsResponse, unmarshalListServerUserDataResponse, unmarshalListServersResponse, unmarshalListServersTypesResponse, unmarshalListSnapshotsResponse, unmarshalListVolumesResponse, unmarshalListVolumesTypesResponse, unmarshalServerActionResponse, unmarshalSetImageResponse, unmarshalSetPlacementGroupResponse, unmarshalSetPlacementGroupServersResponse, unmarshalSetSecurityGroupResponse, unmarshalSetSecurityGroupRuleResponse, unmarshalSetSecurityGroupRulesResponse, unmarshalSetServerResponse, unmarshalSetSnapshotResponse, unmarshalUpdateIpResponse, unmarshalUpdatePlacementGroupResponse, unmarshalUpdatePlacementGroupServersResponse, unmarshalUpdateServerResponse, unmarshalUpdateVolumeResponse };
|
|
1482
|
+
export { marshalCreateImageRequest, marshalCreateIpRequest, marshalCreatePlacementGroupRequest, marshalCreatePrivateNICRequest, marshalCreateSecurityGroupRequest, marshalCreateSecurityGroupRuleRequest, marshalCreateServerRequest, marshalCreateSnapshotRequest, marshalCreateVolumeRequest, marshalExportSnapshotRequest, marshalServerActionRequest, marshalSetImageRequest, marshalSetPlacementGroupRequest, marshalSetPlacementGroupServersRequest, marshalSetSecurityGroupRequest, marshalSetSecurityGroupRuleRequest, marshalSetSecurityGroupRulesRequest, marshalSetServerRequest, marshalSetSnapshotRequest, marshalUpdateIpRequest, marshalUpdatePlacementGroupRequest, marshalUpdatePlacementGroupServersRequest, marshalUpdateServerRequest, marshalUpdateVolumeRequest, unmarshalCreateImageResponse, unmarshalCreateIpResponse, unmarshalCreatePlacementGroupResponse, unmarshalCreatePrivateNICResponse, unmarshalCreateSecurityGroupResponse, unmarshalCreateSecurityGroupRuleResponse, unmarshalCreateServerResponse, unmarshalCreateSnapshotResponse, unmarshalCreateVolumeResponse, unmarshalExportSnapshotResponse, unmarshalGetBootscriptResponse, unmarshalGetDashboardResponse, unmarshalGetImageResponse, unmarshalGetIpResponse, unmarshalGetPlacementGroupResponse, unmarshalGetPlacementGroupServersResponse, unmarshalGetPrivateNICResponse, unmarshalGetSecurityGroupResponse, unmarshalGetSecurityGroupRuleResponse, unmarshalGetServerResponse, unmarshalGetServerTypesAvailabilityResponse, unmarshalGetSnapshotResponse, unmarshalGetVolumeResponse, unmarshalListBootscriptsResponse, unmarshalListImagesResponse, unmarshalListIpsResponse, unmarshalListPlacementGroupsResponse, unmarshalListPrivateNICsResponse, unmarshalListSecurityGroupRulesResponse, unmarshalListSecurityGroupsResponse, unmarshalListServerActionsResponse, unmarshalListServerUserDataResponse, unmarshalListServersResponse, unmarshalListServersTypesResponse, unmarshalListSnapshotsResponse, unmarshalListVolumesResponse, unmarshalListVolumesTypesResponse, unmarshalServerActionResponse, unmarshalSetImageResponse, unmarshalSetPlacementGroupResponse, unmarshalSetPlacementGroupServersResponse, unmarshalSetSecurityGroupResponse, unmarshalSetSecurityGroupRuleResponse, unmarshalSetSecurityGroupRulesResponse, unmarshalSetServerResponse, unmarshalSetSnapshotResponse, unmarshalUpdateIpResponse, unmarshalUpdatePlacementGroupResponse, unmarshalUpdatePlacementGroupServersResponse, unmarshalUpdateServerResponse, unmarshalUpdateVolumeResponse };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
3
|
import { unmarshalTimeSeries } from '../../../scw/custom-marshalling.js';
|
|
4
|
-
import {
|
|
4
|
+
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
5
5
|
|
|
6
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
7
7
|
|
|
@@ -162,7 +162,8 @@ class K8SV1GenAPI extends API {
|
|
|
162
162
|
|
|
163
163
|
this.deleteNode = request => this.client.fetch({
|
|
164
164
|
method: 'DELETE',
|
|
165
|
-
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nodes/${validatePathParam('nodeId', request.nodeId)}
|
|
165
|
+
path: `/k8s/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nodes/${validatePathParam('nodeId', request.nodeId)}`,
|
|
166
|
+
urlParams: urlParams(['replace', request.replace], ['skip_drain', request.skipDrain])
|
|
166
167
|
}, unmarshalNode);
|
|
167
168
|
|
|
168
169
|
this.listVersions = function (request) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
const CLUSTER_TRANSIENT_STATUSES = ['creating', 'deleting', 'updating'];
|
|
6
6
|
/** Lists transient statutes of the enum {@link NodeStatus}. */
|
|
7
7
|
|
|
8
|
-
const NODE_TRANSIENT_STATUSES = ['creating', 'deleting', 'rebooting', 'upgrading'];
|
|
8
|
+
const NODE_TRANSIENT_STATUSES = ['creating', 'deleting', 'rebooting', 'upgrading', 'starting', 'registering'];
|
|
9
9
|
/** Lists transient statutes of the enum {@link PoolStatus}. */
|
|
10
10
|
|
|
11
11
|
const POOL_TRANSIENT_STATUSES = ['deleting', 'scaling', 'upgrading'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
6
|
|
|
@@ -113,6 +113,7 @@ const unmarshalNode = data => {
|
|
|
113
113
|
clusterId: data.cluster_id,
|
|
114
114
|
conditions: data.conditions,
|
|
115
115
|
createdAt: unmarshalDate(data.created_at),
|
|
116
|
+
errorMessage: data.error_message,
|
|
116
117
|
id: data.id,
|
|
117
118
|
name: data.name,
|
|
118
119
|
poolId: data.pool_id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
2
|
-
import {
|
|
2
|
+
import { unmarshalArrayOfObject, unmarshalDate } from '../../../helpers/marshalling.js';
|
|
3
3
|
|
|
4
4
|
// This file was automatically generated. DO NOT EDIT.
|
|
5
5
|
|