@scaleway/sdk 0.1.0-alpha.16 → 0.1.0-alpha.19
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/applesilicon/v1alpha1/api.gen.js +4 -0
- package/dist/api/applesilicon/v1alpha1/content.gen.js +7 -0
- package/dist/api/applesilicon/v1alpha1/index.js +1 -0
- package/dist/api/baremetal/v1/api.gen.js +22 -6
- package/dist/api/baremetal/v1/api.utils.js +31 -0
- package/dist/api/baremetal/v1/content.gen.js +10 -0
- package/dist/api/baremetal/v1/index.js +2 -1
- package/dist/api/container/v1beta1/api.gen.js +24 -6
- package/dist/api/container/v1beta1/content.gen.js +19 -0
- package/dist/api/container/v1beta1/index.js +1 -0
- package/dist/api/container/v1beta1/marshalling.gen.js +4 -4
- package/dist/api/dedibox/v1/api.gen.js +12 -2
- package/dist/api/dedibox/v1/content.gen.js +31 -0
- package/dist/api/dedibox/v1/index.js +1 -0
- package/dist/api/dedibox/v1/marshalling.gen.js +1 -1
- package/dist/api/domain/v2beta1/api.gen.js +7 -0
- package/dist/api/domain/v2beta1/content.gen.js +7 -0
- package/dist/api/domain/v2beta1/index.js +1 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +25 -6
- package/dist/api/flexibleip/v1alpha1/content.gen.js +10 -0
- package/dist/api/flexibleip/v1alpha1/index.js +1 -0
- package/dist/api/function/v1beta1/api.gen.js +24 -6
- package/dist/api/function/v1beta1/content.gen.js +19 -0
- package/dist/api/function/v1beta1/index.js +1 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +4 -4
- package/dist/api/iam/v1alpha1/api.gen.js +89 -39
- package/dist/api/iam/v1alpha1/marshalling.gen.js +20 -4
- package/dist/api/instance/v1/api.gen.js +102 -36
- package/dist/api/instance/v1/api.utils.js +254 -0
- package/dist/api/instance/v1/content.gen.js +28 -0
- package/dist/api/instance/v1/index.js +2 -1
- package/dist/api/instance/v1/marshalling.gen.js +54 -54
- package/dist/api/iot/v1/api.gen.js +4 -0
- package/dist/api/iot/v1/content.gen.js +7 -0
- package/dist/api/iot/v1/index.js +1 -0
- package/dist/api/k8s/v1/api.gen.js +15 -1
- package/dist/api/k8s/v1/content.gen.js +13 -0
- package/dist/api/k8s/v1/index.js +1 -0
- package/dist/api/k8s/v1/marshalling.gen.js +3 -3
- package/dist/api/lb/v1/api.gen.js +10 -0
- package/dist/api/lb/v1/api.utils.js +62 -0
- package/dist/api/lb/v1/content.gen.js +16 -0
- package/dist/api/lb/v1/index.js +2 -1
- package/dist/api/rdb/v1/api.gen.js +32 -6
- package/dist/api/rdb/v1/content.gen.js +16 -0
- package/dist/api/rdb/v1/index.js +1 -0
- package/dist/api/rdb/v1/marshalling.gen.js +2 -2
- package/dist/api/redis/v1alpha1/api.gen.js +32 -7
- package/dist/api/redis/v1alpha1/content.gen.js +7 -0
- package/dist/api/redis/v1alpha1/index.js +1 -0
- package/dist/api/redis/v1alpha1/marshalling.gen.js +3 -3
- package/dist/api/registry/v1/api.gen.js +8 -0
- package/dist/api/registry/v1/content.gen.js +13 -0
- package/dist/api/registry/v1/index.js +1 -0
- package/dist/api/vpc/v1/api.gen.js +33 -12
- package/dist/api/vpcgw/v1/api.gen.js +54 -18
- package/dist/api/vpcgw/v1/content.gen.js +10 -0
- package/dist/api/vpcgw/v1/index.js +1 -0
- package/dist/api/vpcgw/v1/marshalling.gen.js +1 -1
- package/dist/helpers/API.js +1 -1
- package/dist/index.cjs +1474 -274
- package/dist/index.d.ts +1232 -298
- package/dist/internal/async/interval-retrier.js +105 -0
- package/dist/internal/async/sleep.js +13 -0
- package/dist/internal/interceptors/request.js +5 -1
- package/dist/internals.js +2 -1
- package/dist/scw/custom-marshalling.js +11 -1
- package/dist/scw/errors/scw-error.js +10 -1
- package/dist/scw/fetch/response-parser.js +33 -3
- package/package.json +2 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { API } from '../../../helpers/API.js';
|
|
2
|
+
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
3
|
import { validatePathParam, unmarshalAnyRes, urlParams } from '../../../scw/marshalling.js';
|
|
3
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
+
import { SERVER_TRANSIENT_STATUSES } from './content.gen.js';
|
|
4
6
|
import { marshalCreateServerRequest, unmarshalA4C1, marshalUpdateServerRequest } from './marshalling.gen.js';
|
|
5
7
|
|
|
6
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -108,6 +110,8 @@ class ApplesiliconV1Alpha1GenAPI extends API {
|
|
|
108
110
|
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
109
111
|
}, unmarshalA4C1);
|
|
110
112
|
|
|
113
|
+
this.waitForServer = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SERVER_TRANSIENT_STATUSES.includes(res.status))), this.getServer, request, options);
|
|
114
|
+
|
|
111
115
|
this.updateServer = request => this.client.fetch({
|
|
112
116
|
body: JSON.stringify(marshalUpdateServerRequest(request, this.client.settings)),
|
|
113
117
|
headers: jsonContentHeaders,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
/** Lists transient statutes of the enum {@link ServerStatus}. */
|
|
5
|
+
const SERVER_TRANSIENT_STATUSES = ['starting', 'rebooting', 'updating', 'locking', 'unlocking', 'reinstalling'];
|
|
6
|
+
|
|
7
|
+
export { SERVER_TRANSIENT_STATUSES };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { API } from '../../../helpers/API.js';
|
|
2
|
+
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
3
|
import { validatePathParam, urlParams, unmarshalAnyRes } from '../../../scw/marshalling.js';
|
|
3
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
+
import { SERVER_TRANSIENT_STATUSES } from './content.gen.js';
|
|
4
6
|
import { unmarshal23C1, marshalCreateServerRequest, marshalUpdateServerRequest, marshalInstallServerRequest, marshalRebootServerRequest, marshalStartServerRequest, unmarshal0ECB, marshalStartBMCAccessRequest, unmarshal41B8, marshalUpdateIPRequest, marshalAddOptionServerRequest, marshalUpdateSettingRequest } from './marshalling.gen.js';
|
|
5
7
|
|
|
6
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -20,19 +22,33 @@ class BaremetalV1GenAPI extends API {
|
|
|
20
22
|
super(...arguments);
|
|
21
23
|
_this = this;
|
|
22
24
|
|
|
23
|
-
this.pageOfListServers = request
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}, unmarshal23C1);
|
|
25
|
+
this.pageOfListServers = function (request) {
|
|
26
|
+
if (request === void 0) {
|
|
27
|
+
request = {};
|
|
28
|
+
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
return _this.client.fetch({
|
|
31
|
+
method: 'GET',
|
|
32
|
+
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/servers`,
|
|
33
|
+
urlParams: urlParams(['name', request.name], ['option_id', request.optionId], ['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_id', request.projectId ?? _this.client.settings.defaultProjectId], ['status', request.status], ['tags', request.tags])
|
|
34
|
+
}, unmarshal23C1);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
this.listServers = function (request) {
|
|
38
|
+
if (request === void 0) {
|
|
39
|
+
request = {};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return enrichForPagination('servers', _this.pageOfListServers, request);
|
|
43
|
+
};
|
|
30
44
|
|
|
31
45
|
this.getServer = request => this.client.fetch({
|
|
32
46
|
method: 'GET',
|
|
33
47
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
34
48
|
}, unmarshal23C1);
|
|
35
49
|
|
|
50
|
+
this.waitForServer = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SERVER_TRANSIENT_STATUSES.includes(res.status))), this.getServer, request, options);
|
|
51
|
+
|
|
36
52
|
this.createServer = request => this.client.fetch({
|
|
37
53
|
body: JSON.stringify(marshalCreateServerRequest(request, this.client.settings)),
|
|
38
54
|
headers: jsonContentHeaders,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { tryAtIntervals, createExponentialBackoffStrategy } from '../../../internal/async/interval-retrier.js';
|
|
2
|
+
import { BaremetalV1GenAPI } from './api.gen.js';
|
|
3
|
+
import { SERVER_INSTALL_TRANSIENT_STATUSES } from './content.gen.js';
|
|
4
|
+
|
|
5
|
+
class BaremetalV1UtilsAPI extends BaremetalV1GenAPI {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
|
|
9
|
+
this.waitForServerInstall = (request, options) => tryAtIntervals(async () => {
|
|
10
|
+
const value = await this.getServer(request).then(server => {
|
|
11
|
+
if (!server.install) {
|
|
12
|
+
throw new Error(`Server creation has not begun for server ${request.serverId}`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return server.install;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
if (!value) {
|
|
19
|
+
throw new Error(`Server creation has not begun for server ${request.serverId}`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
done: !SERVER_INSTALL_TRANSIENT_STATUSES.includes(value.status),
|
|
24
|
+
value
|
|
25
|
+
};
|
|
26
|
+
}, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { BaremetalV1UtilsAPI };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
/** Lists transient statutes of the enum {@link ServerInstallStatus}. */
|
|
5
|
+
const SERVER_INSTALL_TRANSIENT_STATUSES = ['to_install', 'installing'];
|
|
6
|
+
/** Lists transient statutes of the enum {@link ServerStatus}. */
|
|
7
|
+
|
|
8
|
+
const SERVER_TRANSIENT_STATUSES = ['delivering', 'stopping', 'starting', 'deleting', 'ordered'];
|
|
9
|
+
|
|
10
|
+
export { SERVER_INSTALL_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { BaremetalV1UtilsAPI as API } from './api.utils.js';
|
|
2
|
+
export { SERVER_INSTALL_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES } from './content.gen.js';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { API } from '../../../helpers/API.js';
|
|
2
|
+
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
3
|
import { validatePathParam, urlParams, unmarshalAnyRes, resolveOneOf } from '../../../scw/marshalling.js';
|
|
3
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
+
import { NAMESPACE_TRANSIENT_STATUSES, CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES } from './content.gen.js';
|
|
4
6
|
import { unmarshal9544, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, marshalCreateContainerRequest, marshalUpdateContainerRequest, unmarshal27A7, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalB3B3, marshalCreateDomainRequest, unmarshal41B8, marshalCreateTokenRequest } from './marshalling.gen.js';
|
|
5
7
|
|
|
6
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -45,12 +47,20 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
45
47
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
46
48
|
}, unmarshal9544);
|
|
47
49
|
|
|
48
|
-
this.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
this.waitForNamespace = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
51
|
+
|
|
52
|
+
this.createNamespace = function (request) {
|
|
53
|
+
if (request === void 0) {
|
|
54
|
+
request = {};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return _this.client.fetch({
|
|
58
|
+
body: JSON.stringify(marshalCreateNamespaceRequest(request, _this.client.settings)),
|
|
59
|
+
headers: jsonContentHeaders,
|
|
60
|
+
method: 'POST',
|
|
61
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`
|
|
62
|
+
}, unmarshal9544);
|
|
63
|
+
};
|
|
54
64
|
|
|
55
65
|
this.updateNamespace = request => this.client.fetch({
|
|
56
66
|
body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
|
|
@@ -77,6 +87,8 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
77
87
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
|
|
78
88
|
}, unmarshal9544);
|
|
79
89
|
|
|
90
|
+
this.waitForContainer = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CONTAINER_TRANSIENT_STATUSES.includes(res.status))), this.getContainer, request, options);
|
|
91
|
+
|
|
80
92
|
this.createContainer = request => this.client.fetch({
|
|
81
93
|
body: JSON.stringify(marshalCreateContainerRequest(request, this.client.settings)),
|
|
82
94
|
headers: jsonContentHeaders,
|
|
@@ -116,6 +128,8 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
116
128
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
117
129
|
}, unmarshal27A7);
|
|
118
130
|
|
|
131
|
+
this.waitForCron = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
|
|
132
|
+
|
|
119
133
|
this.createCron = request => this.client.fetch({
|
|
120
134
|
body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
|
|
121
135
|
headers: jsonContentHeaders,
|
|
@@ -156,6 +170,8 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
156
170
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
|
|
157
171
|
}, unmarshalAnyRes);
|
|
158
172
|
|
|
173
|
+
this.waitForDomain = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
174
|
+
|
|
159
175
|
this.createDomain = request => this.client.fetch({
|
|
160
176
|
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
161
177
|
headers: jsonContentHeaders,
|
|
@@ -204,6 +220,8 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
204
220
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
205
221
|
}, unmarshal41B8);
|
|
206
222
|
|
|
223
|
+
this.waitForToken = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
|
|
224
|
+
|
|
207
225
|
this.pageOfListTokens = function (request) {
|
|
208
226
|
if (request === void 0) {
|
|
209
227
|
request = {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
/** Lists transient statutes of the enum {@link ContainerStatus}. */
|
|
5
|
+
const CONTAINER_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
6
|
+
/** Lists transient statutes of the enum {@link CronStatus}. */
|
|
7
|
+
|
|
8
|
+
const CRON_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
9
|
+
/** Lists transient statutes of the enum {@link DomainStatus}. */
|
|
10
|
+
|
|
11
|
+
const DOMAIN_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
12
|
+
/** Lists transient statutes of the enum {@link NamespaceStatus}. */
|
|
13
|
+
|
|
14
|
+
const NAMESPACE_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
15
|
+
/** Lists transient statutes of the enum {@link TokenStatus}. */
|
|
16
|
+
|
|
17
|
+
const TOKEN_TRANSIENT_STATUSES = ['deleting', 'creating'];
|
|
18
|
+
|
|
19
|
+
export { CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES };
|
|
@@ -27,7 +27,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
|
|
|
27
27
|
privacy: request.privacy,
|
|
28
28
|
protocol: request.protocol,
|
|
29
29
|
registry_image: request.registryImage,
|
|
30
|
-
secret_environment_variables: request.secretEnvironmentVariables.map(elt => marshalSecret(elt)),
|
|
30
|
+
secret_environment_variables: request.secretEnvironmentVariables ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined,
|
|
31
31
|
timeout: request.timeout
|
|
32
32
|
});
|
|
33
33
|
const marshalCreateCronRequest = (request, defaults) => ({
|
|
@@ -44,7 +44,7 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
|
44
44
|
environment_variables: request.environmentVariables,
|
|
45
45
|
name: request.name || randomName('cns'),
|
|
46
46
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
47
|
-
secret_environment_variables: request.secretEnvironmentVariables.map(elt => marshalSecret(elt))
|
|
47
|
+
secret_environment_variables: request.secretEnvironmentVariables ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined
|
|
48
48
|
});
|
|
49
49
|
const marshalCreateTokenRequest = (request, defaults) => ({
|
|
50
50
|
expires_at: request.expiresAt,
|
|
@@ -70,7 +70,7 @@ const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
|
70
70
|
protocol: request.protocol,
|
|
71
71
|
redeploy: request.redeploy,
|
|
72
72
|
registry_image: request.registryImage,
|
|
73
|
-
secret_environment_variables: request.secretEnvironmentVariables.map(elt => marshalSecret(elt)),
|
|
73
|
+
secret_environment_variables: request.secretEnvironmentVariables ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined,
|
|
74
74
|
timeout: request.timeout
|
|
75
75
|
});
|
|
76
76
|
const marshalUpdateCronRequest = (request, defaults) => ({
|
|
@@ -81,7 +81,7 @@ const marshalUpdateCronRequest = (request, defaults) => ({
|
|
|
81
81
|
const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
82
82
|
description: request.description,
|
|
83
83
|
environment_variables: request.environmentVariables,
|
|
84
|
-
secret_environment_variables: request.secretEnvironmentVariables.map(elt => marshalSecret(elt))
|
|
84
|
+
secret_environment_variables: request.secretEnvironmentVariables ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
export { marshalCreateContainerRequest, marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalUpdateContainerRequest, marshalUpdateCronRequest, marshalUpdateNamespaceRequest, unmarshal27A7, unmarshal41B8, unmarshal9544, unmarshalB3B3 };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { API } from '../../../helpers/API.js';
|
|
2
|
+
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
3
|
import { validatePathParam, urlParams, unmarshalAnyRes } from '../../../scw/marshalling.js';
|
|
3
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
+
import { SERVER_TRANSIENT_STATUSES, SERVER_INSTALL_TRANSIENT_STATUSES, BMC_ACCESS_TRANSIENT_STATUSES, RPN_V2_GROUP_TRANSIENT_STATUSES } from './content.gen.js';
|
|
4
6
|
import { unmarshal8FAE, unmarshal847D, marshalUpdateServerBackupRequest, marshalSubscribeServerOptionRequest, unmarshal81E8, marshalCreateServerRequest, marshalSubscribeStorageOptionsRequest, marshalUpdateServerRequest, marshalUpdateServerTagsRequest, unmarshal4963, marshalInstallServerRequest, marshalStartBMCAccessRequest, unmarshal41B8, marshalUpdateReverseRequest, marshalCreateFailoverIPsRequest, marshalAttachFailoverIPsRequest, marshalDetachFailoverIPsRequest, marshalAttachFailoverIPToMacAddressRequest, marshalUpdateRaidRequest, marshalStartRescueRequest, unmarshal7121, unmarshalFDE1, marshalIPv6BlockApiCreateIPv6BlockRequest, marshalIPv6BlockApiUpdateIPv6BlockRequest, marshalIPv6BlockApiCreateIPv6BlockSubnetRequest, unmarshal07B0, marshalRpnV1ApiCreateRpnGroupRequest, marshalRpnV1ApiUpdateRpnGroupNameRequest, marshalRpnV1ApiRpnGroupInviteRequest, marshalRpnV1ApiLeaveRpnGroupRequest, marshalRpnV1ApiAddRpnGroupMembersRequest, marshalRpnV1ApiDeleteRpnGroupMembersRequest, marshalRpnV2ApiCreateRpnV2GroupRequest, marshalRpnV2ApiUpdateRpnV2GroupNameRequest, marshalRpnV2ApiAddRpnV2MembersRequest, marshalRpnV2ApiDeleteRpnV2MembersRequest, unmarshal3AEB, marshalRpnV2ApiUpdateRpnV2VlanForMembersRequest, marshalRpnV2ApiEnableRpnV2GroupCompatibilityRequest } from './marshalling.gen.js';
|
|
5
7
|
|
|
6
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -41,6 +43,8 @@ class DediboxV1GenAPI extends API {
|
|
|
41
43
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
42
44
|
}, unmarshal847D);
|
|
43
45
|
|
|
46
|
+
this.waitForServer = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SERVER_TRANSIENT_STATUSES.includes(res.status))), this.getServer, request, options);
|
|
47
|
+
|
|
44
48
|
this.getServerBackup = request => this.client.fetch({
|
|
45
49
|
method: 'GET',
|
|
46
50
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/backups`
|
|
@@ -182,6 +186,8 @@ class DediboxV1GenAPI extends API {
|
|
|
182
186
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/install`
|
|
183
187
|
}, unmarshalAnyRes);
|
|
184
188
|
|
|
189
|
+
this.waitForServerInstall = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SERVER_INSTALL_TRANSIENT_STATUSES.includes(res.status))), this.getServerInstall, request, options);
|
|
190
|
+
|
|
185
191
|
this.cancelServerInstall = request => this.client.fetch({
|
|
186
192
|
method: 'POST',
|
|
187
193
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/cancel-install`
|
|
@@ -204,6 +210,8 @@ class DediboxV1GenAPI extends API {
|
|
|
204
210
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/bmc-access`
|
|
205
211
|
}, unmarshal41B8);
|
|
206
212
|
|
|
213
|
+
this.waitForBMCAccess = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!BMC_ACCESS_TRANSIENT_STATUSES.includes(res.status))), this.getBMCAccess, request, options);
|
|
214
|
+
|
|
207
215
|
this.stopBMCAccess = request => this.client.fetch({
|
|
208
216
|
method: 'DELETE',
|
|
209
217
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/bmc-access`
|
|
@@ -756,6 +764,8 @@ class DediboxRpnV2V1GenAPI extends API {
|
|
|
756
764
|
path: `/dedibox/v1/rpnv2/groups/${validatePathParam('groupId', request.groupId)}`
|
|
757
765
|
}, unmarshal07B0);
|
|
758
766
|
|
|
767
|
+
this.waitForRpnV2Group = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!RPN_V2_GROUP_TRANSIENT_STATUSES.includes(res.status))), this.getRpnV2Group, request, options);
|
|
768
|
+
|
|
759
769
|
this.createRpnV2Group = request => this.client.fetch({
|
|
760
770
|
body: JSON.stringify(marshalRpnV2ApiCreateRpnV2GroupRequest(request, this.client.settings)),
|
|
761
771
|
headers: jsonContentHeaders,
|
|
@@ -780,14 +790,14 @@ class DediboxRpnV2V1GenAPI extends API {
|
|
|
780
790
|
headers: jsonContentHeaders,
|
|
781
791
|
method: 'POST',
|
|
782
792
|
path: `/dedibox/v1/rpnv2/groups/${validatePathParam('groupId', request.groupId)}/members`
|
|
783
|
-
}
|
|
793
|
+
});
|
|
784
794
|
|
|
785
795
|
this.deleteRpnV2Members = request => this.client.fetch({
|
|
786
796
|
body: JSON.stringify(marshalRpnV2ApiDeleteRpnV2MembersRequest(request, this.client.settings)),
|
|
787
797
|
headers: jsonContentHeaders,
|
|
788
798
|
method: 'DELETE',
|
|
789
799
|
path: `/dedibox/v1/rpnv2/groups/${validatePathParam('groupId', request.groupId)}/members`
|
|
790
|
-
}
|
|
800
|
+
});
|
|
791
801
|
|
|
792
802
|
this.pageOfListRpnV2CapableResources = function (request) {
|
|
793
803
|
if (request === void 0) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
/** Lists transient statutes of the enum {@link BMCAccessStatus}. */
|
|
5
|
+
const BMC_ACCESS_TRANSIENT_STATUSES = ['creating', 'deleting'];
|
|
6
|
+
/** Lists transient statutes of the enum {@link IPv6BlockDelegationStatus}. */
|
|
7
|
+
|
|
8
|
+
const I_PV6_BLOCK_DELEGATION_TRANSIENT_STATUSES = ['updating'];
|
|
9
|
+
/** Lists transient statutes of the enum {@link RpnGroupMemberStatus}. */
|
|
10
|
+
|
|
11
|
+
const RPN_GROUP_MEMBER_TRANSIENT_STATUSES = ['creating', 'deleting'];
|
|
12
|
+
/** Lists transient statutes of the enum {@link RpnSanStatus}. */
|
|
13
|
+
|
|
14
|
+
const RPN_SAN_TRANSIENT_STATUSES = ['creating', 'deleting'];
|
|
15
|
+
/** Lists transient statutes of the enum {@link RpnV2GroupStatus}. */
|
|
16
|
+
|
|
17
|
+
const RPN_V2_GROUP_TRANSIENT_STATUSES = ['creating', 'updating', 'deleting'];
|
|
18
|
+
/** Lists transient statutes of the enum {@link RpnV2MemberStatus}. */
|
|
19
|
+
|
|
20
|
+
const RPN_V2_MEMBER_TRANSIENT_STATUSES = ['creating', 'updating', 'deleting'];
|
|
21
|
+
/** Lists transient statutes of the enum {@link ServerInstallStatus}. */
|
|
22
|
+
|
|
23
|
+
const SERVER_INSTALL_TRANSIENT_STATUSES = ['booting', 'setting_up_raid', 'partitioning', 'formatting', 'installing', 'configuring', 'configuring_bootloader', 'rebooting'];
|
|
24
|
+
/** Lists transient statutes of the enum {@link ServerStatus}. */
|
|
25
|
+
|
|
26
|
+
const SERVER_TRANSIENT_STATUSES = ['delivering', 'installing'];
|
|
27
|
+
/** Lists transient statutes of the enum {@link ServiceProvisioningStatus}. */
|
|
28
|
+
|
|
29
|
+
const SERVICE_PROVISIONING_TRANSIENT_STATUSES = ['delivering', 'expiring'];
|
|
30
|
+
|
|
31
|
+
export { BMC_ACCESS_TRANSIENT_STATUSES, I_PV6_BLOCK_DELEGATION_TRANSIENT_STATUSES, RPN_GROUP_MEMBER_TRANSIENT_STATUSES, RPN_SAN_TRANSIENT_STATUSES, RPN_V2_GROUP_TRANSIENT_STATUSES, RPN_V2_MEMBER_TRANSIENT_STATUSES, SERVER_INSTALL_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SERVICE_PROVISIONING_TRANSIENT_STATUSES };
|
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export { DediboxV1GenAPI as API, DediboxBillingV1GenAPI as BillingAPI, DediboxIPv6BlockV1GenAPI as IPv6BlockAPI, DediboxRpnV1GenAPI as RpnAPI, DediboxRpnV1V1GenAPI as RpnV1API, DediboxRpnV2V1GenAPI as RpnV2API } from './api.gen.js';
|
|
2
|
+
export { BMC_ACCESS_TRANSIENT_STATUSES, I_PV6_BLOCK_DELEGATION_TRANSIENT_STATUSES, RPN_GROUP_MEMBER_TRANSIENT_STATUSES, RPN_SAN_TRANSIENT_STATUSES, RPN_V2_GROUP_TRANSIENT_STATUSES, RPN_V2_MEMBER_TRANSIENT_STATUSES, SERVER_INSTALL_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SERVICE_PROVISIONING_TRANSIENT_STATUSES } from './content.gen.js';
|
|
@@ -62,7 +62,7 @@ const marshalInstallServerRequest = (request, defaults) => ({
|
|
|
62
62
|
license_offer_id: request.licenseOfferId,
|
|
63
63
|
os_id: request.osId,
|
|
64
64
|
panel_password: request.panelPassword,
|
|
65
|
-
partitions: request.partitions.map(elt => marshalInstallPartition(elt)),
|
|
65
|
+
partitions: request.partitions ? request.partitions.map(elt => marshalInstallPartition(elt)) : undefined,
|
|
66
66
|
root_password: request.rootPassword,
|
|
67
67
|
ssh_key_ids: request.sshKeyIds,
|
|
68
68
|
user_login: request.userLogin,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { API } from '../../../helpers/API.js';
|
|
2
|
+
import { unmarshalScwFile } from '../../../scw/custom-marshalling.js';
|
|
2
3
|
import { urlParams, validatePathParam, unmarshalAnyRes } from '../../../scw/marshalling.js';
|
|
3
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
5
|
import { unmarshal9999, marshalCreateDNSZoneRequest, marshalUpdateDNSZoneRequest, marshalCloneDNSZoneRequest, marshalUpdateDNSZoneRecordsRequest, marshalUpdateDNSZoneNameserversRequest, marshalImportRawDNSZoneRequest, marshalImportProviderDNSZoneRequest, marshalRefreshDNSZoneRequest, unmarshal07B0, unmarshalA030, marshalCreateSSLCertificateRequest, unmarshalF1FB, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiRegisterExternalDomainRequest, unmarshal4704, marshalRegistrarApiUpdateContactRequest, unmarshal3303, unmarshalFBF2, unmarshal5D7A, marshalRegistrarApiUpdateDomainRequest, marshalRegistrarApiEnableDomainDNSSECRequest, unmarshal7220 } from './marshalling.gen.js';
|
|
@@ -85,6 +86,12 @@ class DomainV2Beta1GenAPI extends API {
|
|
|
85
86
|
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/records`
|
|
86
87
|
}, unmarshalAnyRes);
|
|
87
88
|
|
|
89
|
+
this.exportRawDNSZone = request => this.client.fetch({
|
|
90
|
+
method: 'GET',
|
|
91
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/raw`,
|
|
92
|
+
urlParams: urlParams(['format', request.format])
|
|
93
|
+
}, unmarshalScwFile);
|
|
94
|
+
|
|
88
95
|
this.importRawDNSZone = request => this.client.fetch({
|
|
89
96
|
body: JSON.stringify(marshalImportRawDNSZoneRequest(request, this.client.settings)),
|
|
90
97
|
headers: jsonContentHeaders,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
/** Lists transient statutes of the enum {@link DNSZoneStatus}. */
|
|
5
|
+
const DNS_ZONE_TRANSIENT_STATUSES = ['pending'];
|
|
6
|
+
|
|
7
|
+
export { DNS_ZONE_TRANSIENT_STATUSES };
|
|
@@ -278,7 +278,7 @@ const marshalImportProviderDNSZoneRequest = (request, defaults) => ({ ...resolve
|
|
|
278
278
|
});
|
|
279
279
|
const marshalImportRawDNSZoneRequest = (request, defaults) => ({
|
|
280
280
|
content: request.content,
|
|
281
|
-
format: request.format
|
|
281
|
+
format: request.format,
|
|
282
282
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
283
283
|
...resolveOneOf([{
|
|
284
284
|
param: 'bind_source',
|
|
@@ -379,7 +379,7 @@ const marshalRegistrarApiUpdateContactRequest = (request, defaults) => ({
|
|
|
379
379
|
fax_number: request.faxNumber,
|
|
380
380
|
lang: request.lang,
|
|
381
381
|
phone_number: request.phoneNumber,
|
|
382
|
-
questions: request.questions.map(elt => marshalUpdateContactRequestQuestion(elt)),
|
|
382
|
+
questions: request.questions ? request.questions.map(elt => marshalUpdateContactRequestQuestion(elt)) : undefined,
|
|
383
383
|
resale: request.resale,
|
|
384
384
|
state: request.state,
|
|
385
385
|
vat_identification_code: request.vatIdentificationCode,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { API } from '../../../helpers/API.js';
|
|
2
|
+
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
3
|
import { validatePathParam, urlParams } from '../../../scw/marshalling.js';
|
|
3
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
+
import { FLEXIBLE_IP_TRANSIENT_STATUSES } from './content.gen.js';
|
|
4
6
|
import { marshalCreateFlexibleIPRequest, unmarshal0ECB, marshalUpdateFlexibleIPRequest, marshalAttachFlexibleIPRequest, marshalDetachFlexibleIPRequest, marshalGenerateMACAddrRequest, marshalDuplicateMACAddrRequest, marshalMoveMACAddrRequest } from './marshalling.gen.js';
|
|
5
7
|
|
|
6
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -11,7 +13,10 @@ const jsonContentHeaders = {
|
|
|
11
13
|
|
|
12
14
|
class FlexibleipV1Alpha1GenAPI extends API {
|
|
13
15
|
constructor() {
|
|
16
|
+
var _this;
|
|
17
|
+
|
|
14
18
|
super(...arguments);
|
|
19
|
+
_this = this;
|
|
15
20
|
|
|
16
21
|
this.createFlexibleIP = request => this.client.fetch({
|
|
17
22
|
body: JSON.stringify(marshalCreateFlexibleIPRequest(request, this.client.settings)),
|
|
@@ -25,13 +30,27 @@ class FlexibleipV1Alpha1GenAPI extends API {
|
|
|
25
30
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}`
|
|
26
31
|
}, unmarshal0ECB);
|
|
27
32
|
|
|
28
|
-
this.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
this.waitForFlexibleIP = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!FLEXIBLE_IP_TRANSIENT_STATUSES.includes(res.status))), this.getFlexibleIP, request, options);
|
|
34
|
+
|
|
35
|
+
this.pageOfListFlexibleIPs = function (request) {
|
|
36
|
+
if (request === void 0) {
|
|
37
|
+
request = {};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return _this.client.fetch({
|
|
41
|
+
method: 'GET',
|
|
42
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/fips`,
|
|
43
|
+
urlParams: urlParams(['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_id', request.projectId ?? _this.client.settings.defaultProjectId], ['server_ids', request.serverIds], ['status', request.status], ['tags', request.tags])
|
|
44
|
+
}, unmarshal0ECB);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
this.listFlexibleIPs = function (request) {
|
|
48
|
+
if (request === void 0) {
|
|
49
|
+
request = {};
|
|
50
|
+
}
|
|
33
51
|
|
|
34
|
-
|
|
52
|
+
return enrichForPagination('flexibleIps', _this.pageOfListFlexibleIPs, request);
|
|
53
|
+
};
|
|
35
54
|
|
|
36
55
|
this.updateFlexibleIP = request => this.client.fetch({
|
|
37
56
|
body: JSON.stringify(marshalUpdateFlexibleIPRequest(request, this.client.settings)),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
/** Lists transient statutes of the enum {@link FlexibleIPStatus}. */
|
|
5
|
+
const FLEXIBLE_IP_TRANSIENT_STATUSES = ['updating', 'detaching'];
|
|
6
|
+
/** Lists transient statutes of the enum {@link MACAddressStatus}. */
|
|
7
|
+
|
|
8
|
+
const MAC_ADDRESS_TRANSIENT_STATUSES = ['updating', 'deleting'];
|
|
9
|
+
|
|
10
|
+
export { FLEXIBLE_IP_TRANSIENT_STATUSES, MAC_ADDRESS_TRANSIENT_STATUSES };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { API } from '../../../helpers/API.js';
|
|
2
|
+
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
3
|
import { validatePathParam, urlParams, unmarshalAnyRes, resolveOneOf } from '../../../scw/marshalling.js';
|
|
3
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
+
import { NAMESPACE_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES } from './content.gen.js';
|
|
4
6
|
import { unmarshal9544, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, marshalCreateFunctionRequest, marshalUpdateFunctionRequest, unmarshal27A7, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalB3B3, marshalCreateDomainRequest, unmarshal41B8, marshalCreateTokenRequest } from './marshalling.gen.js';
|
|
5
7
|
|
|
6
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -45,12 +47,20 @@ class FunctionV1Beta1GenAPI extends API {
|
|
|
45
47
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
46
48
|
}, unmarshal9544);
|
|
47
49
|
|
|
48
|
-
this.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
this.waitForNamespace = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
51
|
+
|
|
52
|
+
this.createNamespace = function (request) {
|
|
53
|
+
if (request === void 0) {
|
|
54
|
+
request = {};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return _this.client.fetch({
|
|
58
|
+
body: JSON.stringify(marshalCreateNamespaceRequest(request, _this.client.settings)),
|
|
59
|
+
headers: jsonContentHeaders,
|
|
60
|
+
method: 'POST',
|
|
61
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`
|
|
62
|
+
}, unmarshal9544);
|
|
63
|
+
};
|
|
54
64
|
|
|
55
65
|
this.updateNamespace = request => this.client.fetch({
|
|
56
66
|
body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
|
|
@@ -77,6 +87,8 @@ class FunctionV1Beta1GenAPI extends API {
|
|
|
77
87
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
|
|
78
88
|
}, unmarshal9544);
|
|
79
89
|
|
|
90
|
+
this.waitForFunction = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!FUNCTION_TRANSIENT_STATUSES.includes(res.status))), this.getFunction, request, options);
|
|
91
|
+
|
|
80
92
|
this.createFunction = request => this.client.fetch({
|
|
81
93
|
body: JSON.stringify(marshalCreateFunctionRequest(request, this.client.settings)),
|
|
82
94
|
headers: jsonContentHeaders,
|
|
@@ -138,6 +150,8 @@ class FunctionV1Beta1GenAPI extends API {
|
|
|
138
150
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
139
151
|
}, unmarshal27A7);
|
|
140
152
|
|
|
153
|
+
this.waitForCron = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
|
|
154
|
+
|
|
141
155
|
this.createCron = request => this.client.fetch({
|
|
142
156
|
body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
|
|
143
157
|
headers: jsonContentHeaders,
|
|
@@ -178,6 +192,8 @@ class FunctionV1Beta1GenAPI extends API {
|
|
|
178
192
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
|
|
179
193
|
}, unmarshalAnyRes);
|
|
180
194
|
|
|
195
|
+
this.waitForDomain = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
196
|
+
|
|
181
197
|
this.createDomain = request => this.client.fetch({
|
|
182
198
|
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
183
199
|
headers: jsonContentHeaders,
|
|
@@ -226,6 +242,8 @@ class FunctionV1Beta1GenAPI extends API {
|
|
|
226
242
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
227
243
|
}, unmarshal41B8);
|
|
228
244
|
|
|
245
|
+
this.waitForToken = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
|
|
246
|
+
|
|
229
247
|
this.pageOfListTokens = function (request) {
|
|
230
248
|
if (request === void 0) {
|
|
231
249
|
request = {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
/** Lists transient statutes of the enum {@link CronStatus}. */
|
|
5
|
+
const CRON_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
6
|
+
/** Lists transient statutes of the enum {@link DomainStatus}. */
|
|
7
|
+
|
|
8
|
+
const DOMAIN_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
9
|
+
/** Lists transient statutes of the enum {@link FunctionStatus}. */
|
|
10
|
+
|
|
11
|
+
const FUNCTION_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
12
|
+
/** Lists transient statutes of the enum {@link NamespaceStatus}. */
|
|
13
|
+
|
|
14
|
+
const NAMESPACE_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
15
|
+
/** Lists transient statutes of the enum {@link TokenStatus}. */
|
|
16
|
+
|
|
17
|
+
const TOKEN_TRANSIENT_STATUSES = ['deleting', 'creating'];
|
|
18
|
+
|
|
19
|
+
export { CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES };
|