@scaleway/sdk 0.1.0-alpha.14 → 0.1.0-alpha.17
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 +6 -6
- package/dist/api/account/index.js +2 -0
- package/dist/api/account/v2alpha1/api.gen.js +2 -0
- package/dist/api/account/v2alpha1/index.js +1 -0
- package/dist/api/account/v2alpha1/marshalling.gen.js +7 -10
- package/dist/api/applesilicon/index.js +2 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.js +25 -0
- package/dist/api/applesilicon/v1alpha1/content.gen.js +7 -0
- package/dist/api/applesilicon/v1alpha1/index.js +2 -0
- package/dist/api/baremetal/index.js +2 -0
- package/dist/api/baremetal/v1/api.gen.js +10 -0
- 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 -0
- package/dist/api/baremetal/v1/marshalling.gen.js +11 -14
- package/dist/api/container/index.js +2 -0
- package/dist/api/container/v1beta1/api.gen.js +70 -10
- package/dist/api/container/v1beta1/content.gen.js +19 -0
- package/dist/api/container/v1beta1/index.js +2 -0
- package/dist/api/container/v1beta1/marshalling.gen.js +17 -6
- package/dist/api/dedibox/index.js +2 -0
- package/dist/api/dedibox/v1/api.gen.js +24 -2
- package/dist/api/dedibox/v1/content.gen.js +31 -0
- package/dist/api/dedibox/v1/index.js +2 -0
- package/dist/api/dedibox/v1/marshalling.gen.js +2 -2
- package/dist/api/domain/index.js +2 -0
- package/dist/api/domain/v2beta1/api.gen.js +12 -0
- package/dist/api/domain/v2beta1/content.gen.js +7 -0
- package/dist/api/domain/v2beta1/index.js +2 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +91 -132
- package/dist/api/flexibleip/index.js +2 -0
- package/dist/api/flexibleip/v1alpha1/api.gen.js +6 -0
- package/dist/api/flexibleip/v1alpha1/content.gen.js +10 -0
- package/dist/api/flexibleip/v1alpha1/index.js +2 -0
- package/dist/api/function/index.js +2 -0
- package/dist/api/function/v1beta1/api.gen.js +70 -10
- package/dist/api/function/v1beta1/content.gen.js +19 -0
- package/dist/api/function/v1beta1/index.js +2 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +17 -6
- package/dist/api/iam/index.js +2 -0
- package/dist/api/iam/v1alpha1/api.gen.js +21 -8
- package/dist/api/iam/v1alpha1/index.js +1 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +28 -38
- package/dist/api/instance/index.js +2 -0
- package/dist/api/instance/v1/api.gen.js +24 -4
- package/dist/api/instance/v1/api.utils.js +52 -0
- package/dist/api/instance/v1/content.gen.js +28 -0
- package/dist/api/instance/v1/index.js +2 -0
- package/dist/api/instance/v1/marshalling.gen.js +133 -131
- package/dist/api/iot/index.js +2 -0
- package/dist/api/iot/v1/api.gen.js +10 -0
- package/dist/api/iot/v1/content.gen.js +7 -0
- package/dist/api/iot/v1/index.js +2 -0
- package/dist/api/iot/v1/marshalling.gen.js +32 -44
- package/dist/api/k8s/index.js +2 -0
- package/dist/api/k8s/v1/api.gen.js +15 -0
- package/dist/api/k8s/v1/content.gen.js +13 -0
- package/dist/api/k8s/v1/index.js +2 -0
- package/dist/api/k8s/v1/marshalling.gen.js +20 -23
- package/dist/api/lb/index.js +2 -0
- package/dist/api/lb/v1/api.gen.js +22 -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 -0
- package/dist/api/lb/v1/marshalling.gen.js +111 -158
- package/dist/api/marketplace/index.js +2 -0
- package/dist/api/marketplace/v1/api.gen.js +2 -0
- package/dist/api/marketplace/v1/index.js +1 -0
- package/dist/api/mnq/index.js +2 -0
- package/dist/api/mnq/v1alpha1/api.gen.js +6 -0
- package/dist/api/mnq/v1alpha1/index.js +1 -0
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +11 -17
- package/dist/api/rdb/index.js +2 -0
- package/dist/api/rdb/v1/api.gen.js +10 -0
- package/dist/api/rdb/v1/content.gen.js +16 -0
- package/dist/api/rdb/v1/index.js +2 -0
- package/dist/api/rdb/v1/marshalling.gen.js +28 -37
- package/dist/api/redis/index.js +2 -0
- package/dist/api/redis/v1alpha1/api.gen.js +7 -1
- package/dist/api/redis/v1alpha1/content.gen.js +7 -0
- package/dist/api/redis/v1alpha1/index.js +2 -0
- package/dist/api/redis/v1alpha1/marshalling.gen.js +16 -22
- package/dist/api/registry/index.js +2 -0
- package/dist/api/registry/v1/api.gen.js +14 -0
- package/dist/api/registry/v1/content.gen.js +13 -0
- package/dist/api/registry/v1/index.js +2 -0
- package/dist/api/registry/v1/marshalling.gen.js +8 -11
- package/dist/api/vpc/index.js +2 -0
- package/dist/api/vpc/v1/api.gen.js +2 -0
- package/dist/api/vpc/v1/index.js +1 -0
- package/dist/api/vpcgw/index.js +2 -0
- package/dist/api/vpcgw/v1/api.gen.js +8 -0
- package/dist/api/vpcgw/v1/content.gen.js +10 -0
- package/dist/api/vpcgw/v1/index.js +2 -0
- package/dist/api/vpcgw/v1/marshalling.gen.js +17 -23
- package/dist/index.cjs +1946 -872
- package/dist/index.d.ts +5114 -3066
- package/dist/index.js +40 -60
- 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/internal/logger/console-logger.js +9 -1
- package/dist/internals.js +2 -1
- package/dist/scw/custom-marshalling.js +27 -0
- package/dist/scw/errors/scw-error.js +5 -1
- package/dist/scw/fetch/http-interceptors.js +4 -0
- package/dist/scw/fetch/response-parser.js +33 -3
- package/package.json +2 -2
- package/dist/api/account/v2alpha1/types.gen.js +0 -1
- package/dist/api/applesilicon/v1alpha1/types.gen.js +0 -1
- package/dist/api/baremetal/v1/types.gen.js +0 -1
- package/dist/api/container/v1beta1/types.gen.js +0 -1
- package/dist/api/dedibox/v1/types.gen.js +0 -1
- package/dist/api/domain/v2beta1/types.gen.js +0 -1
- package/dist/api/flexibleip/v1alpha1/types.gen.js +0 -1
- package/dist/api/function/v1beta1/types.gen.js +0 -1
- package/dist/api/iam/v1alpha1/types.gen.js +0 -1
- package/dist/api/instance/v1/types.gen.js +0 -1
- package/dist/api/iot/v1/types.gen.js +0 -1
- package/dist/api/k8s/v1/types.gen.js +0 -1
- package/dist/api/lb/v1/types.gen.js +0 -1
- package/dist/api/marketplace/v1/types.gen.js +0 -1
- package/dist/api/mnq/v1alpha1/types.gen.js +0 -1
- package/dist/api/rdb/v1/types.gen.js +0 -1
- package/dist/api/redis/v1alpha1/types.gen.js +0 -1
- package/dist/api/registry/v1/types.gen.js +0 -1
- package/dist/api/vpc/v1/types.gen.js +0 -1
- package/dist/api/vpcgw/v1/types.gen.js +0 -1
- package/dist/scw/custom-unmarshallers.js +0 -7
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Scaleway SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This SDK enables you to interact with Scaleway APIs.
|
|
4
4
|
|
|
5
5
|
**⚠️ The project is in alpha:**
|
|
6
6
|
* Code is subject to breaking changes.
|
|
7
7
|
* Sources will be available on GitHub once the SDK enters beta.
|
|
8
|
-
* SDK only works from a
|
|
8
|
+
* SDK only works from a node.js runtime, browser calls aren't supported yet.
|
|
9
9
|
|
|
10
10
|
**🔗 Important links:**
|
|
11
11
|
* Reference documentation (soon)
|
|
@@ -19,7 +19,7 @@ You'll need a pair of access and secret keys to connect to Scaleway API. Please
|
|
|
19
19
|
**A minimal setup** would look like this:
|
|
20
20
|
|
|
21
21
|
```ts
|
|
22
|
-
import {
|
|
22
|
+
import { Registry, createClient } from '@scaleway/sdk'
|
|
23
23
|
|
|
24
24
|
const client = createClient({
|
|
25
25
|
accessKey: 'SCWXXXXXXXXXXXXXXXXX',
|
|
@@ -29,10 +29,10 @@ const client = createClient({
|
|
|
29
29
|
defaultZone: 'fr-par-1',
|
|
30
30
|
})
|
|
31
31
|
|
|
32
|
-
const api = new
|
|
32
|
+
const api = new Registry.v1.API(client)
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
**
|
|
35
|
+
**For a simpler setup**, you could retrieve the profile from either the configuration file or the environment variables:
|
|
36
36
|
|
|
37
37
|
```ts
|
|
38
38
|
import {
|
|
@@ -70,7 +70,7 @@ for await (const page of api.listNamespaces()) {
|
|
|
70
70
|
|
|
71
71
|
## Dependencies
|
|
72
72
|
|
|
73
|
-
This SDK is based on the [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) API and use `Request`, `Response` & `Headers` interfaces. Those interfaces are native in modern browsers, node >=18 & deno environments.
|
|
73
|
+
This SDK is based on the [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) API and use `Request`, `Response` & `Headers` interfaces. Those interfaces are native in modern browsers, node >=18 & [deno](https://deno.land/) environments.
|
|
74
74
|
|
|
75
75
|
For `node` < 18 & `React Native` environments, the commonJS build requires [cross-fetch](https://www.npmjs.com/package/cross-fetch) package, it is listed in `dependencies` but not used in esm build.
|
|
76
76
|
|
|
@@ -7,6 +7,8 @@ import { unmarshal0ECB, marshalCreateSSHKeyRequest, marshalUpdateSSHKeyRequest }
|
|
|
7
7
|
const jsonContentHeaders = {
|
|
8
8
|
'Content-Type': 'application/json; charset=utf-8'
|
|
9
9
|
};
|
|
10
|
+
/** Account API. */
|
|
11
|
+
|
|
10
12
|
class AccountV2Alpha1GenAPI extends API {
|
|
11
13
|
constructor() {
|
|
12
14
|
var _this;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AccountV2Alpha1GenAPI as API } from './api.gen.js';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveOneOf, unmarshalAnyRes } from '../../../scw/marshalling.js';
|
|
2
2
|
|
|
3
3
|
// This file was automatically generated. DO NOT EDIT.
|
|
4
4
|
const unmarshal0ECB = data => unmarshalAnyRes(data, [], ['created_at', 'updated_at']);
|
|
5
|
-
const marshalCreateSSHKeyRequest = (request, defaults) => {
|
|
6
|
-
|
|
5
|
+
const marshalCreateSSHKeyRequest = (request, defaults) => ({
|
|
6
|
+
name: request.name,
|
|
7
|
+
public_key: request.publicKey,
|
|
8
|
+
...resolveOneOf([{
|
|
7
9
|
default: defaults.defaultProjectId,
|
|
8
10
|
param: 'project_id',
|
|
9
11
|
value: request.projectId
|
|
@@ -11,13 +13,8 @@ const marshalCreateSSHKeyRequest = (request, defaults) => {
|
|
|
11
13
|
default: defaults.defaultOrganizationId,
|
|
12
14
|
param: 'organization_id',
|
|
13
15
|
value: request.organizationId
|
|
14
|
-
}])
|
|
15
|
-
|
|
16
|
-
name: request.name,
|
|
17
|
-
public_key: request.publicKey,
|
|
18
|
-
...projectIdentifier
|
|
19
|
-
};
|
|
20
|
-
};
|
|
16
|
+
}])
|
|
17
|
+
});
|
|
21
18
|
const marshalUpdateSSHKeyRequest = (request, defaults) => ({
|
|
22
19
|
name: request.name
|
|
23
20
|
});
|
|
@@ -1,12 +1,35 @@
|
|
|
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.
|
|
7
9
|
const jsonContentHeaders = {
|
|
8
10
|
'Content-Type': 'application/json; charset=utf-8'
|
|
9
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Apple silicon.
|
|
14
|
+
*
|
|
15
|
+
* Scaleway Apple silicon M1 as-a-Service is built using the latest generation
|
|
16
|
+
* of Apple Mac mini hardware (fifth generation).
|
|
17
|
+
*
|
|
18
|
+
* These dedicated Mac mini M1s are designed for developing, building, testing,
|
|
19
|
+
* and signing applications for Apple devices, including iPhones, iPads, Mac
|
|
20
|
+
* computers and much more.
|
|
21
|
+
*
|
|
22
|
+
* Get set to explore, learn and build on a dedicated Mac mini M1 with more
|
|
23
|
+
* performance and speed than you ever thought possible.
|
|
24
|
+
*
|
|
25
|
+
* _Apple silicon as a Service comes with a minimum allocation period of 24 hours_*.
|
|
26
|
+
*
|
|
27
|
+
* Mac mini and macOS are trademarks of Apple Inc., registered in the U.S. and
|
|
28
|
+
* other countries and regions. IOS is a trademark or registered trademark of
|
|
29
|
+
* Cisco in the U.S. and other countries and is used by Apple under license.
|
|
30
|
+
* Scaleway is not affiliated with Apple Inc.
|
|
31
|
+
*/
|
|
32
|
+
|
|
10
33
|
class ApplesiliconV1Alpha1GenAPI extends API {
|
|
11
34
|
constructor() {
|
|
12
35
|
var _this;
|
|
@@ -87,6 +110,8 @@ class ApplesiliconV1Alpha1GenAPI extends API {
|
|
|
87
110
|
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
88
111
|
}, unmarshalA4C1);
|
|
89
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
|
+
|
|
90
115
|
this.updateServer = request => this.client.fetch({
|
|
91
116
|
body: JSON.stringify(marshalUpdateServerRequest(request, this.client.settings)),
|
|
92
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,12 +1,20 @@
|
|
|
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.
|
|
7
9
|
const jsonContentHeaders = {
|
|
8
10
|
'Content-Type': 'application/json; charset=utf-8'
|
|
9
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Elastic metal API.
|
|
14
|
+
*
|
|
15
|
+
* This API allows to manage your Bare metal server.
|
|
16
|
+
*/
|
|
17
|
+
|
|
10
18
|
class BaremetalV1GenAPI extends API {
|
|
11
19
|
constructor() {
|
|
12
20
|
var _this;
|
|
@@ -27,6 +35,8 @@ class BaremetalV1GenAPI extends API {
|
|
|
27
35
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
28
36
|
}, unmarshal23C1);
|
|
29
37
|
|
|
38
|
+
this.waitForServer = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SERVER_TRANSIENT_STATUSES.includes(res.status))), this.getServer, request, options);
|
|
39
|
+
|
|
30
40
|
this.createServer = request => this.client.fetch({
|
|
31
41
|
body: JSON.stringify(marshalCreateServerRequest(request, this.client.settings)),
|
|
32
42
|
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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveOneOf, unmarshalAnyRes } from '../../../scw/marshalling.js';
|
|
2
2
|
|
|
3
3
|
// This file was automatically generated. DO NOT EDIT.
|
|
4
4
|
const unmarshal0ECB = data => unmarshalAnyRes(data, [], ['created_at', 'updated_at']);
|
|
@@ -18,8 +18,14 @@ const marshalCreateServerRequestInstall = (request, defaults) => ({
|
|
|
18
18
|
const marshalAddOptionServerRequest = (request, defaults) => ({
|
|
19
19
|
expires_at: request.expiresAt
|
|
20
20
|
});
|
|
21
|
-
const marshalCreateServerRequest = (request, defaults) => {
|
|
22
|
-
|
|
21
|
+
const marshalCreateServerRequest = (request, defaults) => ({
|
|
22
|
+
description: request.description,
|
|
23
|
+
install: request.install ? marshalCreateServerRequestInstall(request.install) : undefined,
|
|
24
|
+
name: request.name,
|
|
25
|
+
offer_id: request.offerId,
|
|
26
|
+
option_ids: request.optionIds,
|
|
27
|
+
tags: request.tags,
|
|
28
|
+
...resolveOneOf([{
|
|
23
29
|
default: defaults.defaultProjectId,
|
|
24
30
|
param: 'project_id',
|
|
25
31
|
value: request.projectId
|
|
@@ -27,17 +33,8 @@ const marshalCreateServerRequest = (request, defaults) => {
|
|
|
27
33
|
default: defaults.defaultOrganizationId,
|
|
28
34
|
param: 'organization_id',
|
|
29
35
|
value: request.organizationId
|
|
30
|
-
}])
|
|
31
|
-
|
|
32
|
-
description: request.description,
|
|
33
|
-
install: request.install ? marshalCreateServerRequestInstall(request.install) : undefined,
|
|
34
|
-
name: request.name,
|
|
35
|
-
offer_id: request.offerId,
|
|
36
|
-
option_ids: request.optionIds,
|
|
37
|
-
tags: request.tags,
|
|
38
|
-
...projectIdentifier
|
|
39
|
-
};
|
|
40
|
-
};
|
|
36
|
+
}])
|
|
37
|
+
});
|
|
41
38
|
const marshalInstallServerRequest = (request, defaults) => ({
|
|
42
39
|
hostname: request.hostname,
|
|
43
40
|
os_id: request.osId,
|
|
@@ -1,12 +1,20 @@
|
|
|
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';
|
|
4
|
-
import {
|
|
5
|
+
import { NAMESPACE_TRANSIENT_STATUSES, CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES } from './content.gen.js';
|
|
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.
|
|
7
9
|
const jsonContentHeaders = {
|
|
8
10
|
'Content-Type': 'application/json; charset=utf-8'
|
|
9
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Containers API.
|
|
14
|
+
*
|
|
15
|
+
* Serverless Containers API.
|
|
16
|
+
*/
|
|
17
|
+
|
|
10
18
|
class ContainerV1Beta1GenAPI extends API {
|
|
11
19
|
constructor() {
|
|
12
20
|
var _this;
|
|
@@ -39,6 +47,8 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
39
47
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
40
48
|
}, unmarshal9544);
|
|
41
49
|
|
|
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
|
+
|
|
42
52
|
this.createNamespace = request => this.client.fetch({
|
|
43
53
|
body: JSON.stringify(marshalCreateNamespaceRequest(request, this.client.settings)),
|
|
44
54
|
headers: jsonContentHeaders,
|
|
@@ -71,6 +81,8 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
71
81
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
|
|
72
82
|
}, unmarshal9544);
|
|
73
83
|
|
|
84
|
+
this.waitForContainer = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CONTAINER_TRANSIENT_STATUSES.includes(res.status))), this.getContainer, request, options);
|
|
85
|
+
|
|
74
86
|
this.createContainer = request => this.client.fetch({
|
|
75
87
|
body: JSON.stringify(marshalCreateContainerRequest(request, this.client.settings)),
|
|
76
88
|
headers: jsonContentHeaders,
|
|
@@ -110,6 +122,8 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
110
122
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
111
123
|
}, unmarshal27A7);
|
|
112
124
|
|
|
125
|
+
this.waitForCron = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
|
|
126
|
+
|
|
113
127
|
this.createCron = request => this.client.fetch({
|
|
114
128
|
body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
|
|
115
129
|
headers: jsonContentHeaders,
|
|
@@ -150,6 +164,8 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
150
164
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
|
|
151
165
|
}, unmarshalAnyRes);
|
|
152
166
|
|
|
167
|
+
this.waitForDomain = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
168
|
+
|
|
153
169
|
this.createDomain = request => this.client.fetch({
|
|
154
170
|
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
155
171
|
headers: jsonContentHeaders,
|
|
@@ -167,19 +183,63 @@ class ContainerV1Beta1GenAPI extends API {
|
|
|
167
183
|
request = {};
|
|
168
184
|
}
|
|
169
185
|
|
|
170
|
-
const scope = resolveOneOf([{
|
|
171
|
-
param: 'container_id',
|
|
172
|
-
value: request.containerId
|
|
173
|
-
}, {
|
|
174
|
-
param: 'namespace_id',
|
|
175
|
-
value: request.namespaceId
|
|
176
|
-
}]);
|
|
177
186
|
return _this.client.fetch({
|
|
178
187
|
method: 'GET',
|
|
179
188
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/issue-jwt`,
|
|
180
|
-
urlParams: urlParams(['expires_at', request.expiresAt], ...Object.entries(
|
|
181
|
-
|
|
189
|
+
urlParams: urlParams(['expires_at', request.expiresAt], ...Object.entries(resolveOneOf([{
|
|
190
|
+
param: 'container_id',
|
|
191
|
+
value: request.containerId
|
|
192
|
+
}, {
|
|
193
|
+
param: 'namespace_id',
|
|
194
|
+
value: request.namespaceId
|
|
195
|
+
}])))
|
|
196
|
+
}, unmarshal41B8);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
this.createToken = function (request) {
|
|
200
|
+
if (request === void 0) {
|
|
201
|
+
request = {};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return _this.client.fetch({
|
|
205
|
+
body: JSON.stringify(marshalCreateTokenRequest(request, _this.client.settings)),
|
|
206
|
+
headers: jsonContentHeaders,
|
|
207
|
+
method: 'POST',
|
|
208
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/tokens`
|
|
209
|
+
}, unmarshal41B8);
|
|
182
210
|
};
|
|
211
|
+
|
|
212
|
+
this.getToken = request => this.client.fetch({
|
|
213
|
+
method: 'GET',
|
|
214
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
215
|
+
}, unmarshal41B8);
|
|
216
|
+
|
|
217
|
+
this.waitForToken = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
|
|
218
|
+
|
|
219
|
+
this.pageOfListTokens = function (request) {
|
|
220
|
+
if (request === void 0) {
|
|
221
|
+
request = {};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
return _this.client.fetch({
|
|
225
|
+
method: 'GET',
|
|
226
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/tokens`,
|
|
227
|
+
urlParams: urlParams(['container_id', request.containerId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
|
|
228
|
+
}, unmarshal41B8);
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
this.listTokens = function (request) {
|
|
232
|
+
if (request === void 0) {
|
|
233
|
+
request = {};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return enrichForPagination('tokens', _this.pageOfListTokens, request);
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
this.deleteToken = request => this.client.fetch({
|
|
240
|
+
method: 'DELETE',
|
|
241
|
+
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
242
|
+
}, unmarshal41B8);
|
|
183
243
|
}
|
|
184
244
|
|
|
185
245
|
}
|
|
@@ -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 };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
|
-
import { unmarshalAnyRes } from '../../../scw/marshalling.js';
|
|
2
|
+
import { resolveOneOf, unmarshalAnyRes } from '../../../scw/marshalling.js';
|
|
3
3
|
|
|
4
4
|
// This file was automatically generated. DO NOT EDIT.
|
|
5
5
|
const unmarshal27A7 = data => unmarshalAnyRes(data, ['args']);
|
|
6
|
+
const unmarshal41B8 = data => unmarshalAnyRes(data, [], ['expires_at']);
|
|
6
7
|
const unmarshal9544 = data => unmarshalAnyRes(data, ['environment_variables']);
|
|
7
8
|
const unmarshalB3B3 = data => unmarshalAnyRes(data, [], ['timestamp']);
|
|
8
9
|
|
|
@@ -26,7 +27,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
|
|
|
26
27
|
privacy: request.privacy,
|
|
27
28
|
protocol: request.protocol,
|
|
28
29
|
registry_image: request.registryImage,
|
|
29
|
-
secret_environment_variables: request.secretEnvironmentVariables
|
|
30
|
+
secret_environment_variables: request.secretEnvironmentVariables.map(elt => marshalSecret(elt)),
|
|
30
31
|
timeout: request.timeout
|
|
31
32
|
});
|
|
32
33
|
const marshalCreateCronRequest = (request, defaults) => ({
|
|
@@ -43,7 +44,17 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
|
43
44
|
environment_variables: request.environmentVariables,
|
|
44
45
|
name: request.name || randomName('cns'),
|
|
45
46
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
46
|
-
secret_environment_variables: request.secretEnvironmentVariables
|
|
47
|
+
secret_environment_variables: request.secretEnvironmentVariables.map(elt => marshalSecret(elt))
|
|
48
|
+
});
|
|
49
|
+
const marshalCreateTokenRequest = (request, defaults) => ({
|
|
50
|
+
expires_at: request.expiresAt,
|
|
51
|
+
...resolveOneOf([{
|
|
52
|
+
param: 'container_id',
|
|
53
|
+
value: request.containerId
|
|
54
|
+
}, {
|
|
55
|
+
param: 'namespace_id',
|
|
56
|
+
value: request.namespaceId
|
|
57
|
+
}])
|
|
47
58
|
});
|
|
48
59
|
const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
49
60
|
description: request.description,
|
|
@@ -59,7 +70,7 @@ const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
|
59
70
|
protocol: request.protocol,
|
|
60
71
|
redeploy: request.redeploy,
|
|
61
72
|
registry_image: request.registryImage,
|
|
62
|
-
secret_environment_variables: request.secretEnvironmentVariables
|
|
73
|
+
secret_environment_variables: request.secretEnvironmentVariables.map(elt => marshalSecret(elt)),
|
|
63
74
|
timeout: request.timeout
|
|
64
75
|
});
|
|
65
76
|
const marshalUpdateCronRequest = (request, defaults) => ({
|
|
@@ -70,7 +81,7 @@ const marshalUpdateCronRequest = (request, defaults) => ({
|
|
|
70
81
|
const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
71
82
|
description: request.description,
|
|
72
83
|
environment_variables: request.environmentVariables,
|
|
73
|
-
secret_environment_variables: request.secretEnvironmentVariables
|
|
84
|
+
secret_environment_variables: request.secretEnvironmentVariables.map(elt => marshalSecret(elt))
|
|
74
85
|
});
|
|
75
86
|
|
|
76
|
-
export { marshalCreateContainerRequest, marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalUpdateContainerRequest, marshalUpdateCronRequest, marshalUpdateNamespaceRequest, unmarshal27A7, unmarshal9544, unmarshalB3B3 };
|
|
87
|
+
export { marshalCreateContainerRequest, marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalUpdateContainerRequest, marshalUpdateCronRequest, marshalUpdateNamespaceRequest, unmarshal27A7, unmarshal41B8, unmarshal9544, unmarshalB3B3 };
|
|
@@ -1,12 +1,16 @@
|
|
|
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.
|
|
7
9
|
const jsonContentHeaders = {
|
|
8
10
|
'Content-Type': 'application/json; charset=utf-8'
|
|
9
11
|
};
|
|
12
|
+
/** Dedibox Phoenix API. */
|
|
13
|
+
|
|
10
14
|
class DediboxV1GenAPI extends API {
|
|
11
15
|
constructor() {
|
|
12
16
|
var _this;
|
|
@@ -39,6 +43,8 @@ class DediboxV1GenAPI extends API {
|
|
|
39
43
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
40
44
|
}, unmarshal847D);
|
|
41
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
|
+
|
|
42
48
|
this.getServerBackup = request => this.client.fetch({
|
|
43
49
|
method: 'GET',
|
|
44
50
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/backups`
|
|
@@ -180,6 +186,8 @@ class DediboxV1GenAPI extends API {
|
|
|
180
186
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/install`
|
|
181
187
|
}, unmarshalAnyRes);
|
|
182
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
|
+
|
|
183
191
|
this.cancelServerInstall = request => this.client.fetch({
|
|
184
192
|
method: 'POST',
|
|
185
193
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/cancel-install`
|
|
@@ -202,6 +210,8 @@ class DediboxV1GenAPI extends API {
|
|
|
202
210
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/bmc-access`
|
|
203
211
|
}, unmarshal41B8);
|
|
204
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
|
+
|
|
205
215
|
this.stopBMCAccess = request => this.client.fetch({
|
|
206
216
|
method: 'DELETE',
|
|
207
217
|
path: `/dedibox/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/bmc-access`
|
|
@@ -362,6 +372,8 @@ class DediboxV1GenAPI extends API {
|
|
|
362
372
|
}
|
|
363
373
|
|
|
364
374
|
}
|
|
375
|
+
/** Dedibox Phoenix Billing API. */
|
|
376
|
+
|
|
365
377
|
DediboxV1GenAPI.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1'];
|
|
366
378
|
class DediboxBillingV1GenAPI extends API {
|
|
367
379
|
constructor() {
|
|
@@ -434,6 +446,8 @@ class DediboxBillingV1GenAPI extends API {
|
|
|
434
446
|
}
|
|
435
447
|
|
|
436
448
|
}
|
|
449
|
+
/** Dedibox Phoenix IPv6 Block API. */
|
|
450
|
+
|
|
437
451
|
class DediboxIPv6BlockV1GenAPI extends API {
|
|
438
452
|
constructor() {
|
|
439
453
|
var _this3;
|
|
@@ -504,6 +518,8 @@ class DediboxIPv6BlockV1GenAPI extends API {
|
|
|
504
518
|
}
|
|
505
519
|
|
|
506
520
|
}
|
|
521
|
+
/** Dedibox Phoenix RPN API. */
|
|
522
|
+
|
|
507
523
|
class DediboxRpnV1GenAPI extends API {
|
|
508
524
|
constructor() {
|
|
509
525
|
var _this4;
|
|
@@ -545,6 +561,8 @@ class DediboxRpnV1GenAPI extends API {
|
|
|
545
561
|
}
|
|
546
562
|
|
|
547
563
|
}
|
|
564
|
+
/** Dedibox Phoenix RPN v1 API. */
|
|
565
|
+
|
|
548
566
|
class DediboxRpnV1V1GenAPI extends API {
|
|
549
567
|
constructor() {
|
|
550
568
|
var _this5;
|
|
@@ -704,6 +722,8 @@ class DediboxRpnV1V1GenAPI extends API {
|
|
|
704
722
|
}
|
|
705
723
|
|
|
706
724
|
}
|
|
725
|
+
/** Dedibox Phoenix RPN v2 API. */
|
|
726
|
+
|
|
707
727
|
class DediboxRpnV2V1GenAPI extends API {
|
|
708
728
|
constructor() {
|
|
709
729
|
var _this6;
|
|
@@ -744,6 +764,8 @@ class DediboxRpnV2V1GenAPI extends API {
|
|
|
744
764
|
path: `/dedibox/v1/rpnv2/groups/${validatePathParam('groupId', request.groupId)}`
|
|
745
765
|
}, unmarshal07B0);
|
|
746
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
|
+
|
|
747
769
|
this.createRpnV2Group = request => this.client.fetch({
|
|
748
770
|
body: JSON.stringify(marshalRpnV2ApiCreateRpnV2GroupRequest(request, this.client.settings)),
|
|
749
771
|
headers: jsonContentHeaders,
|
|
@@ -768,14 +790,14 @@ class DediboxRpnV2V1GenAPI extends API {
|
|
|
768
790
|
headers: jsonContentHeaders,
|
|
769
791
|
method: 'POST',
|
|
770
792
|
path: `/dedibox/v1/rpnv2/groups/${validatePathParam('groupId', request.groupId)}/members`
|
|
771
|
-
}
|
|
793
|
+
});
|
|
772
794
|
|
|
773
795
|
this.deleteRpnV2Members = request => this.client.fetch({
|
|
774
796
|
body: JSON.stringify(marshalRpnV2ApiDeleteRpnV2MembersRequest(request, this.client.settings)),
|
|
775
797
|
headers: jsonContentHeaders,
|
|
776
798
|
method: 'DELETE',
|
|
777
799
|
path: `/dedibox/v1/rpnv2/groups/${validatePathParam('groupId', request.groupId)}/members`
|
|
778
|
-
}
|
|
800
|
+
});
|
|
779
801
|
|
|
780
802
|
this.pageOfListRpnV2CapableResources = function (request) {
|
|
781
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 };
|