@scaleway/sdk 0.1.0-beta.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api/account/index.js +2 -2
- package/dist/api/account/v2/api.gen.js +5 -18
- package/dist/api/account/v2/index.gen.js +3 -0
- package/dist/api/account/v2/marshalling.gen.js +0 -2
- package/dist/api/account/v2alpha1/api.gen.js +3 -13
- package/dist/api/account/v2alpha1/marshalling.gen.js +0 -5
- package/dist/api/applesilicon/index.js +2 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +7 -27
- package/dist/api/applesilicon/v1alpha1/index.gen.js +4 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -14
- package/dist/api/baremetal/v1/api.gen.js +47 -49
- package/dist/api/baremetal/v1/api.utils.js +2 -10
- package/dist/api/baremetal/v1/content.gen.js +6 -3
- package/dist/api/baremetal/v1/index.js +4 -1
- package/dist/api/baremetal/v1/marshalling.gen.js +44 -45
- package/dist/api/baremetal/v1/validation-rules.gen.js +109 -0
- package/dist/api/container/index.js +2 -2
- package/dist/api/container/v1beta1/api.gen.js +5 -51
- package/dist/api/container/v1beta1/content.gen.js +4 -4
- package/dist/api/container/v1beta1/{index.js → index.gen.js} +3 -1
- package/dist/api/container/v1beta1/marshalling.gen.js +12 -26
- package/dist/api/domain/index.js +2 -2
- package/dist/api/domain/v2beta1/api.gen.js +55 -85
- package/dist/api/domain/v2beta1/content.gen.js +22 -1
- package/dist/api/domain/v2beta1/index.gen.js +4 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +47 -165
- package/dist/api/flexibleip/index.js +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +5 -22
- package/dist/api/flexibleip/v1alpha1/content.gen.js +1 -1
- package/dist/api/flexibleip/v1alpha1/index.gen.js +6 -0
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +14 -0
- package/dist/api/function/index.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +54 -57
- package/dist/api/function/v1beta1/content.gen.js +8 -5
- package/dist/api/function/v1beta1/index.gen.js +4 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +125 -33
- package/dist/api/iam/index.js +2 -2
- package/dist/api/iam/v1alpha1/api.gen.js +15 -62
- package/dist/api/iam/v1alpha1/index.gen.js +5 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +7 -29
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +184 -0
- package/dist/api/instance/v1/api.gen.js +38 -118
- package/dist/api/instance/v1/api.utils.js +59 -51
- package/dist/api/instance/v1/content.gen.js +7 -7
- package/dist/api/instance/v1/marshalling.gen.js +46 -168
- package/dist/api/instance/v1/marshalling.utils.js +63 -0
- package/dist/api/iot/index.js +2 -2
- package/dist/api/iot/v1/api.gen.js +5 -56
- package/dist/api/iot/v1/index.gen.js +4 -0
- package/dist/api/iot/v1/marshalling.gen.js +2 -51
- package/dist/api/k8s/index.js +2 -2
- package/dist/api/k8s/v1/api.gen.js +17 -43
- package/dist/api/k8s/v1/content.gen.js +2 -2
- package/dist/api/k8s/v1/index.gen.js +6 -0
- package/dist/api/k8s/v1/marshalling.gen.js +18 -36
- package/dist/api/k8s/v1/validation-rules.gen.js +92 -0
- package/dist/api/lb/v1/api.gen.js +8 -163
- package/dist/api/lb/v1/api.utils.js +3 -9
- package/dist/api/lb/v1/content.gen.js +3 -3
- package/dist/api/lb/v1/marshalling.gen.js +74 -101
- package/dist/api/marketplace/index.js +4 -2
- package/dist/api/marketplace/v1/api.gen.js +3 -13
- package/dist/api/marketplace/v1/index.gen.js +3 -0
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -13
- package/dist/api/marketplace/v2/api.gen.js +85 -0
- package/dist/api/marketplace/v2/index.gen.js +3 -0
- package/dist/api/marketplace/v2/marshalling.gen.js +92 -0
- package/dist/api/mnq/index.js +2 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +7 -25
- package/dist/api/mnq/v1alpha1/index.gen.js +3 -0
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +7 -46
- package/dist/api/rdb/index.js +2 -2
- package/dist/api/rdb/v1/api.gen.js +15 -89
- package/dist/api/rdb/v1/content.gen.js +10 -4
- package/dist/api/rdb/v1/index.gen.js +4 -0
- package/dist/api/rdb/v1/marshalling.gen.js +25 -81
- package/dist/api/redis/index.js +2 -2
- package/dist/api/redis/{v1alpha1 → v1}/api.gen.js +45 -77
- package/dist/api/redis/{v1alpha1 → v1}/content.gen.js +1 -1
- package/dist/api/redis/v1/index.gen.js +4 -0
- package/dist/api/redis/{v1alpha1 → v1}/marshalling.gen.js +42 -59
- package/dist/api/registry/index.js +2 -2
- package/dist/api/registry/v1/api.gen.js +5 -29
- package/dist/api/registry/v1/content.gen.js +2 -2
- package/dist/api/registry/v1/{index.js → index.gen.js} +3 -1
- package/dist/api/registry/v1/marshalling.gen.js +2 -8
- package/dist/api/secret/index.js +2 -0
- package/dist/api/secret/v1alpha1/api.gen.js +135 -0
- package/dist/api/secret/v1alpha1/index.gen.js +3 -0
- package/dist/api/secret/v1alpha1/marshalling.gen.js +82 -0
- package/dist/api/tem/index.js +2 -0
- package/dist/api/tem/v1alpha1/api.gen.js +109 -0
- package/dist/api/tem/v1alpha1/content.gen.js +10 -0
- package/dist/api/tem/v1alpha1/index.gen.js +4 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +132 -0
- package/dist/api/test/index.js +2 -2
- package/dist/api/test/v1/api.gen.js +6 -20
- package/dist/api/test/v1/index.gen.js +4 -0
- package/dist/api/test/v1/marshalling.gen.js +2 -5
- package/dist/api/vpc/index.js +2 -2
- package/dist/api/vpc/v1/api.gen.js +6 -17
- package/dist/api/vpc/v1/index.gen.js +3 -0
- package/dist/api/vpc/v1/marshalling.gen.js +1 -3
- package/dist/api/vpcgw/index.js +2 -2
- package/dist/api/vpcgw/v1/api.gen.js +5 -64
- package/dist/api/vpcgw/v1/content.gen.js +2 -2
- package/dist/api/vpcgw/v1/{index.js → index.gen.js} +3 -1
- package/dist/api/vpcgw/v1/marshalling.gen.js +3 -24
- package/dist/helpers/json.js +1 -2
- package/dist/helpers/marshalling.js +7 -20
- package/dist/index.cjs +3870 -2948
- package/dist/index.d.ts +7218 -4335
- package/dist/index.js +10 -6
- package/dist/internal/async/interval-retrier.js +10 -16
- package/dist/internal/interceptors/interceptor.js +3 -1
- package/dist/internal/interceptors/request.js +1 -3
- package/dist/internal/logger/console-logger.js +3 -5
- package/dist/internal/logger/index.js +3 -5
- package/dist/internal/logger/level-resolver.js +0 -3
- package/dist/internal/validations/string-validation.js +8 -10
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js +13 -0
- package/dist/scw/api.js +3 -4
- package/dist/scw/auth.js +3 -5
- package/dist/scw/client-ini-factory.js +32 -15
- package/dist/scw/client-ini-profile.js +10 -4
- package/dist/scw/client-settings.js +32 -15
- package/dist/scw/client.js +5 -6
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-marshalling.js +8 -14
- package/dist/scw/errors/error-parser.js +2 -21
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +17 -15
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +7 -6
- package/dist/scw/errors/scw-error.js +20 -20
- package/dist/scw/errors/standard/already-exists-error.js +3 -4
- package/dist/scw/errors/standard/denied-authentication-error.js +4 -11
- package/dist/scw/errors/standard/invalid-arguments-error.js +1 -10
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -3
- package/dist/scw/errors/standard/permissions-denied-error.js +1 -4
- package/dist/scw/errors/standard/precondition-failed-error.js +4 -8
- package/dist/scw/errors/standard/quotas-exceeded-error.js +14 -14
- package/dist/scw/errors/standard/resource-expired-error.js +3 -4
- package/dist/scw/errors/standard/resource-locked-error.js +3 -4
- package/dist/scw/errors/standard/resource-not-found-error.js +3 -4
- package/dist/scw/errors/standard/too-many-requests-error.js +3 -16
- package/dist/scw/errors/standard/transient-state-error.js +3 -4
- package/dist/scw/errors/types.js +0 -3
- package/dist/scw/fetch/build-fetcher.js +1 -9
- package/dist/scw/fetch/http-dumper.js +4 -7
- package/dist/scw/fetch/http-interceptors.js +9 -12
- package/dist/scw/fetch/resource-paginator.js +18 -16
- package/dist/scw/fetch/response-parser.js +17 -23
- package/node_modules/@scaleway/random-name/CHANGELOG.md +42 -63
- package/node_modules/@scaleway/random-name/dist/index.js +5 -246
- package/node_modules/@scaleway/random-name/package.json +6 -5
- package/package.json +4 -5
- package/dist/api/account/v2/index.js +0 -1
- package/dist/api/applesilicon/v1alpha1/index.js +0 -2
- package/dist/api/domain/v2beta1/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/index.js +0 -2
- package/dist/api/function/v1beta1/index.js +0 -2
- package/dist/api/iam/v1alpha1/index.js +0 -1
- package/dist/api/iot/v1/index.js +0 -2
- package/dist/api/k8s/v1/index.js +0 -2
- package/dist/api/marketplace/v1/index.js +0 -1
- package/dist/api/mnq/v1alpha1/index.js +0 -1
- package/dist/api/rdb/v1/index.js +0 -2
- package/dist/api/redis/v1alpha1/index.js +0 -2
- package/dist/api/test/v1/index.js +0 -1
- package/dist/api/vpc/v1/index.js +0 -1
- package/dist/node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -254
- package/node_modules/@scaleway/random-name/dist/index.browser.js +0 -256
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
export {
|
|
1
|
+
import * as index_gen from './v1alpha1/index.gen.js';
|
|
2
|
+
export { index_gen as v1alpha1 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
|
-
import { API } from '../../../scw/api.js';
|
|
2
|
+
import { API as API$1 } from '../../../scw/api.js';
|
|
3
3
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
4
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
5
|
import { FLEXIBLE_IP_TRANSIENT_STATUSES } from './content.gen.js';
|
|
@@ -9,103 +9,86 @@ import { marshalCreateFlexibleIPRequest, unmarshalFlexibleIP, unmarshalListFlexi
|
|
|
9
9
|
const jsonContentHeaders = {
|
|
10
10
|
'Content-Type': 'application/json; charset=utf-8'
|
|
11
11
|
};
|
|
12
|
-
/** Flexible IP API. */
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
/** Flexible IP API. */
|
|
14
|
+
class API extends API$1 {
|
|
15
15
|
constructor() {
|
|
16
16
|
var _this;
|
|
17
|
-
|
|
18
17
|
super(...arguments);
|
|
19
18
|
_this = this;
|
|
20
|
-
|
|
21
19
|
this.createFlexibleIP = request => this.client.fetch({
|
|
22
20
|
body: JSON.stringify(marshalCreateFlexibleIPRequest(request, this.client.settings)),
|
|
23
21
|
headers: jsonContentHeaders,
|
|
24
22
|
method: 'POST',
|
|
25
23
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips`
|
|
26
24
|
}, unmarshalFlexibleIP);
|
|
27
|
-
|
|
28
25
|
this.getFlexibleIP = request => this.client.fetch({
|
|
29
26
|
method: 'GET',
|
|
30
27
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}`
|
|
31
28
|
}, unmarshalFlexibleIP);
|
|
32
|
-
|
|
33
29
|
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
30
|
this.pageOfListFlexibleIPs = function (request) {
|
|
36
31
|
if (request === void 0) {
|
|
37
32
|
request = {};
|
|
38
33
|
}
|
|
39
|
-
|
|
40
34
|
return _this.client.fetch({
|
|
41
35
|
method: 'GET',
|
|
42
36
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/fips`,
|
|
43
37
|
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
38
|
}, unmarshalListFlexibleIPsResponse);
|
|
45
39
|
};
|
|
46
|
-
|
|
47
40
|
this.listFlexibleIPs = function (request) {
|
|
48
41
|
if (request === void 0) {
|
|
49
42
|
request = {};
|
|
50
43
|
}
|
|
51
|
-
|
|
52
44
|
return enrichForPagination('flexibleIps', _this.pageOfListFlexibleIPs, request);
|
|
53
45
|
};
|
|
54
|
-
|
|
55
46
|
this.updateFlexibleIP = request => this.client.fetch({
|
|
56
47
|
body: JSON.stringify(marshalUpdateFlexibleIPRequest(request, this.client.settings)),
|
|
57
48
|
headers: jsonContentHeaders,
|
|
58
49
|
method: 'PATCH',
|
|
59
50
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}`
|
|
60
51
|
}, unmarshalFlexibleIP);
|
|
61
|
-
|
|
62
52
|
this.deleteFlexibleIP = request => this.client.fetch({
|
|
63
53
|
method: 'DELETE',
|
|
64
54
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}`
|
|
65
55
|
});
|
|
66
|
-
|
|
67
56
|
this.attachFlexibleIP = request => this.client.fetch({
|
|
68
57
|
body: JSON.stringify(marshalAttachFlexibleIPRequest(request, this.client.settings)),
|
|
69
58
|
headers: jsonContentHeaders,
|
|
70
59
|
method: 'POST',
|
|
71
60
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/attach`
|
|
72
61
|
}, unmarshalAttachFlexibleIPsResponse);
|
|
73
|
-
|
|
74
62
|
this.detachFlexibleIP = request => this.client.fetch({
|
|
75
63
|
body: JSON.stringify(marshalDetachFlexibleIPRequest(request, this.client.settings)),
|
|
76
64
|
headers: jsonContentHeaders,
|
|
77
65
|
method: 'POST',
|
|
78
66
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/detach`
|
|
79
67
|
}, unmarshalDetachFlexibleIPsResponse);
|
|
80
|
-
|
|
81
68
|
this.generateMACAddr = request => this.client.fetch({
|
|
82
69
|
body: JSON.stringify(marshalGenerateMACAddrRequest(request, this.client.settings)),
|
|
83
70
|
headers: jsonContentHeaders,
|
|
84
71
|
method: 'POST',
|
|
85
72
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}/mac`
|
|
86
73
|
}, unmarshalFlexibleIP);
|
|
87
|
-
|
|
88
74
|
this.duplicateMACAddr = request => this.client.fetch({
|
|
89
75
|
body: JSON.stringify(marshalDuplicateMACAddrRequest(request, this.client.settings)),
|
|
90
76
|
headers: jsonContentHeaders,
|
|
91
77
|
method: 'POST',
|
|
92
78
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}/mac/duplicate`
|
|
93
79
|
}, unmarshalFlexibleIP);
|
|
94
|
-
|
|
95
80
|
this.moveMACAddr = request => this.client.fetch({
|
|
96
81
|
body: JSON.stringify(marshalMoveMACAddrRequest(request, this.client.settings)),
|
|
97
82
|
headers: jsonContentHeaders,
|
|
98
83
|
method: 'POST',
|
|
99
84
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}/mac/move`
|
|
100
85
|
}, unmarshalFlexibleIP);
|
|
101
|
-
|
|
102
86
|
this.deleteMACAddr = request => this.client.fetch({
|
|
103
87
|
method: 'DELETE',
|
|
104
88
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}/mac`
|
|
105
89
|
});
|
|
106
90
|
}
|
|
107
|
-
|
|
108
91
|
}
|
|
109
|
-
|
|
92
|
+
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1'];
|
|
110
93
|
|
|
111
|
-
export {
|
|
94
|
+
export { API };
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
/** Lists transient statutes of the enum {@link FlexibleIPStatus}. */
|
|
5
5
|
const FLEXIBLE_IP_TRANSIENT_STATUSES = ['updating', 'detaching'];
|
|
6
|
-
/** Lists transient statutes of the enum {@link MACAddressStatus}. */
|
|
7
6
|
|
|
7
|
+
/** Lists transient statutes of the enum {@link MACAddressStatus}. */
|
|
8
8
|
const MAC_ADDRESS_TRANSIENT_STATUSES = ['updating', 'deleting'];
|
|
9
9
|
|
|
10
10
|
export { FLEXIBLE_IP_TRANSIENT_STATUSES, MAC_ADDRESS_TRANSIENT_STATUSES };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
|
+
export { FLEXIBLE_IP_TRANSIENT_STATUSES, MAC_ADDRESS_TRANSIENT_STATUSES } from './content.gen.js';
|
|
3
|
+
import * as validationRules_gen from './validation-rules.gen.js';
|
|
4
|
+
export { validationRules_gen as ValidationRules };
|
|
5
|
+
|
|
6
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
@@ -2,12 +2,10 @@ import { isJSONObject } from '../../../helpers/json.js';
|
|
|
2
2
|
import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.js';
|
|
3
3
|
|
|
4
4
|
// This file was automatically generated. DO NOT EDIT.
|
|
5
|
-
|
|
6
5
|
const unmarshalMACAddress = data => {
|
|
7
6
|
if (!isJSONObject(data)) {
|
|
8
7
|
throw new TypeError(`Unmarshalling the type 'MACAddress' failed as data isn't a dictionary.`);
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return {
|
|
12
10
|
createdAt: unmarshalDate(data.created_at),
|
|
13
11
|
id: data.id,
|
|
@@ -18,12 +16,10 @@ const unmarshalMACAddress = data => {
|
|
|
18
16
|
zone: data.zone
|
|
19
17
|
};
|
|
20
18
|
};
|
|
21
|
-
|
|
22
19
|
const unmarshalFlexibleIP = data => {
|
|
23
20
|
if (!isJSONObject(data)) {
|
|
24
21
|
throw new TypeError(`Unmarshalling the type 'FlexibleIP' failed as data isn't a dictionary.`);
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
return {
|
|
28
24
|
createdAt: unmarshalDate(data.created_at),
|
|
29
25
|
description: data.description,
|
|
@@ -44,7 +40,6 @@ const unmarshalAttachFlexibleIPsResponse = data => {
|
|
|
44
40
|
if (!isJSONObject(data)) {
|
|
45
41
|
throw new TypeError(`Unmarshalling the type 'AttachFlexibleIPsResponse' failed as data isn't a dictionary.`);
|
|
46
42
|
}
|
|
47
|
-
|
|
48
43
|
return {
|
|
49
44
|
flexibleIps: unmarshalArrayOfObject(data.flexible_ips, unmarshalFlexibleIP),
|
|
50
45
|
totalCount: data.total_count
|
|
@@ -54,7 +49,6 @@ const unmarshalDetachFlexibleIPsResponse = data => {
|
|
|
54
49
|
if (!isJSONObject(data)) {
|
|
55
50
|
throw new TypeError(`Unmarshalling the type 'DetachFlexibleIPsResponse' failed as data isn't a dictionary.`);
|
|
56
51
|
}
|
|
57
|
-
|
|
58
52
|
return {
|
|
59
53
|
flexibleIps: unmarshalArrayOfObject(data.flexible_ips, unmarshalFlexibleIP),
|
|
60
54
|
totalCount: data.total_count
|
|
@@ -64,7 +58,6 @@ const unmarshalListFlexibleIPsResponse = data => {
|
|
|
64
58
|
if (!isJSONObject(data)) {
|
|
65
59
|
throw new TypeError(`Unmarshalling the type 'ListFlexibleIPsResponse' failed as data isn't a dictionary.`);
|
|
66
60
|
}
|
|
67
|
-
|
|
68
61
|
return {
|
|
69
62
|
flexibleIps: unmarshalArrayOfObject(data.flexible_ips, unmarshalFlexibleIP),
|
|
70
63
|
totalCount: data.total_count
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
const ListFlexibleIPsRequest = {
|
|
5
|
+
page: {
|
|
6
|
+
greaterThan: 0
|
|
7
|
+
},
|
|
8
|
+
pageSize: {
|
|
9
|
+
greaterThan: 0,
|
|
10
|
+
lessThanOrEqual: 100
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { ListFlexibleIPsRequest };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
export {
|
|
1
|
+
import * as index_gen from './v1beta1/index.gen.js';
|
|
2
|
+
export { index_gen as v1beta1 };
|
|
@@ -1,59 +1,50 @@
|
|
|
1
1
|
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
|
-
import { API } from '../../../scw/api.js';
|
|
2
|
+
import { API as API$1 } from '../../../scw/api.js';
|
|
3
3
|
import { validatePathParam, urlParams, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
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';
|
|
6
|
-
import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListFunctionsResponse, unmarshalFunction, marshalCreateFunctionRequest, marshalUpdateFunctionRequest, unmarshalListFunctionRuntimesResponse, unmarshalUploadURL, unmarshalDownloadURL, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalListLogsResponse, unmarshalListDomainsResponse, unmarshalDomain, marshalCreateDomainRequest, unmarshalToken, marshalCreateTokenRequest, unmarshalListTokensResponse } from './marshalling.gen.js';
|
|
5
|
+
import { NAMESPACE_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
+
import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListFunctionsResponse, unmarshalFunction, marshalCreateFunctionRequest, marshalUpdateFunctionRequest, unmarshalListFunctionRuntimesResponse, unmarshalUploadURL, unmarshalDownloadURL, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalListLogsResponse, unmarshalListDomainsResponse, unmarshalDomain, marshalCreateDomainRequest, unmarshalToken, marshalCreateTokenRequest, unmarshalListTokensResponse, marshalCreateTriggerRequest, unmarshalTrigger, unmarshalListTriggersResponse, marshalUpdateTriggerRequest } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
const jsonContentHeaders = {
|
|
10
10
|
'Content-Type': 'application/json; charset=utf-8'
|
|
11
11
|
};
|
|
12
|
+
|
|
12
13
|
/**
|
|
13
14
|
* Functions API.
|
|
14
15
|
*
|
|
15
16
|
* Serverless functions API.
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
-
class FunctionV1Beta1GenAPI extends API {
|
|
18
|
+
class API extends API$1 {
|
|
19
19
|
constructor() {
|
|
20
20
|
var _this;
|
|
21
|
-
|
|
22
21
|
super(...arguments);
|
|
23
22
|
_this = this;
|
|
24
|
-
|
|
25
23
|
this.pageOfListNamespaces = function (request) {
|
|
26
24
|
if (request === void 0) {
|
|
27
25
|
request = {};
|
|
28
26
|
}
|
|
29
|
-
|
|
30
27
|
return _this.client.fetch({
|
|
31
28
|
method: 'GET',
|
|
32
29
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`,
|
|
33
30
|
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_id', request.projectId ?? _this.client.settings.defaultProjectId])
|
|
34
31
|
}, unmarshalListNamespacesResponse);
|
|
35
32
|
};
|
|
36
|
-
|
|
37
33
|
this.listNamespaces = function (request) {
|
|
38
34
|
if (request === void 0) {
|
|
39
35
|
request = {};
|
|
40
36
|
}
|
|
41
|
-
|
|
42
37
|
return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
|
|
43
38
|
};
|
|
44
|
-
|
|
45
39
|
this.getNamespace = request => this.client.fetch({
|
|
46
40
|
method: 'GET',
|
|
47
41
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
48
42
|
}, unmarshalNamespace);
|
|
49
|
-
|
|
50
43
|
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
44
|
this.createNamespace = function (request) {
|
|
53
45
|
if (request === void 0) {
|
|
54
46
|
request = {};
|
|
55
47
|
}
|
|
56
|
-
|
|
57
48
|
return _this.client.fetch({
|
|
58
49
|
body: JSON.stringify(marshalCreateNamespaceRequest(request, _this.client.settings)),
|
|
59
50
|
headers: jsonContentHeaders,
|
|
@@ -61,156 +52,125 @@ class FunctionV1Beta1GenAPI extends API {
|
|
|
61
52
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`
|
|
62
53
|
}, unmarshalNamespace);
|
|
63
54
|
};
|
|
64
|
-
|
|
65
55
|
this.updateNamespace = request => this.client.fetch({
|
|
66
56
|
body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
|
|
67
57
|
headers: jsonContentHeaders,
|
|
68
58
|
method: 'PATCH',
|
|
69
59
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
70
60
|
}, unmarshalNamespace);
|
|
71
|
-
|
|
72
61
|
this.deleteNamespace = request => this.client.fetch({
|
|
73
62
|
method: 'DELETE',
|
|
74
63
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
75
64
|
}, unmarshalNamespace);
|
|
76
|
-
|
|
77
65
|
this.pageOfListFunctions = request => this.client.fetch({
|
|
78
66
|
method: 'GET',
|
|
79
67
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions`,
|
|
80
68
|
urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['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])
|
|
81
69
|
}, unmarshalListFunctionsResponse);
|
|
82
|
-
|
|
83
70
|
this.listFunctions = request => enrichForPagination('functions', this.pageOfListFunctions, request);
|
|
84
|
-
|
|
85
71
|
this.getFunction = request => this.client.fetch({
|
|
86
72
|
method: 'GET',
|
|
87
73
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
|
|
88
74
|
}, unmarshalFunction);
|
|
89
|
-
|
|
90
75
|
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
|
-
|
|
92
76
|
this.createFunction = request => this.client.fetch({
|
|
93
77
|
body: JSON.stringify(marshalCreateFunctionRequest(request, this.client.settings)),
|
|
94
78
|
headers: jsonContentHeaders,
|
|
95
79
|
method: 'POST',
|
|
96
80
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions`
|
|
97
81
|
}, unmarshalFunction);
|
|
98
|
-
|
|
99
82
|
this.updateFunction = request => this.client.fetch({
|
|
100
83
|
body: JSON.stringify(marshalUpdateFunctionRequest(request, this.client.settings)),
|
|
101
84
|
headers: jsonContentHeaders,
|
|
102
85
|
method: 'PATCH',
|
|
103
86
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
|
|
104
87
|
}, unmarshalFunction);
|
|
105
|
-
|
|
106
88
|
this.deleteFunction = request => this.client.fetch({
|
|
107
89
|
method: 'DELETE',
|
|
108
90
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
|
|
109
91
|
}, unmarshalFunction);
|
|
110
|
-
|
|
111
92
|
this.deployFunction = request => this.client.fetch({
|
|
112
93
|
body: '{}',
|
|
113
94
|
headers: jsonContentHeaders,
|
|
114
95
|
method: 'POST',
|
|
115
96
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/deploy`
|
|
116
97
|
}, unmarshalFunction);
|
|
117
|
-
|
|
118
98
|
this.listFunctionRuntimes = function (request) {
|
|
119
99
|
if (request === void 0) {
|
|
120
100
|
request = {};
|
|
121
101
|
}
|
|
122
|
-
|
|
123
102
|
return _this.client.fetch({
|
|
124
103
|
method: 'GET',
|
|
125
104
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/runtimes`
|
|
126
105
|
}, unmarshalListFunctionRuntimesResponse);
|
|
127
106
|
};
|
|
128
|
-
|
|
129
107
|
this.getFunctionUploadURL = request => this.client.fetch({
|
|
130
108
|
method: 'GET',
|
|
131
109
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/upload-url`,
|
|
132
110
|
urlParams: urlParams(['content_length', request.contentLength])
|
|
133
111
|
}, unmarshalUploadURL);
|
|
134
|
-
|
|
135
112
|
this.getFunctionDownloadURL = request => this.client.fetch({
|
|
136
113
|
method: 'GET',
|
|
137
114
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/download-url`
|
|
138
115
|
}, unmarshalDownloadURL);
|
|
139
|
-
|
|
140
116
|
this.pageOfListCrons = request => this.client.fetch({
|
|
141
117
|
method: 'GET',
|
|
142
118
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`,
|
|
143
119
|
urlParams: urlParams(['function_id', request.functionId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
144
120
|
}, unmarshalListCronsResponse);
|
|
145
|
-
|
|
146
121
|
this.listCrons = request => enrichForPagination('crons', this.pageOfListCrons, request);
|
|
147
|
-
|
|
148
122
|
this.getCron = request => this.client.fetch({
|
|
149
123
|
method: 'GET',
|
|
150
124
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
151
125
|
}, unmarshalCron);
|
|
152
|
-
|
|
153
126
|
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
|
-
|
|
155
127
|
this.createCron = request => this.client.fetch({
|
|
156
128
|
body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
|
|
157
129
|
headers: jsonContentHeaders,
|
|
158
130
|
method: 'POST',
|
|
159
131
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`
|
|
160
132
|
}, unmarshalCron);
|
|
161
|
-
|
|
162
133
|
this.updateCron = request => this.client.fetch({
|
|
163
134
|
body: JSON.stringify(marshalUpdateCronRequest(request, this.client.settings)),
|
|
164
135
|
headers: jsonContentHeaders,
|
|
165
136
|
method: 'PATCH',
|
|
166
137
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
167
138
|
}, unmarshalCron);
|
|
168
|
-
|
|
169
139
|
this.deleteCron = request => this.client.fetch({
|
|
170
140
|
method: 'DELETE',
|
|
171
141
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
172
142
|
}, unmarshalCron);
|
|
173
|
-
|
|
174
143
|
this.pageOfListLogs = request => this.client.fetch({
|
|
175
144
|
method: 'GET',
|
|
176
145
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/logs`,
|
|
177
146
|
urlParams: urlParams(['order_by', request.orderBy ?? 'timestamp_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
178
147
|
}, unmarshalListLogsResponse);
|
|
179
|
-
|
|
180
148
|
this.listLogs = request => enrichForPagination('logs', this.pageOfListLogs, request);
|
|
181
|
-
|
|
182
149
|
this.pageOfListDomains = request => this.client.fetch({
|
|
183
150
|
method: 'GET',
|
|
184
151
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
185
152
|
urlParams: urlParams(['function_id', request.functionId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
186
153
|
}, unmarshalListDomainsResponse);
|
|
187
|
-
|
|
188
154
|
this.listDomains = request => enrichForPagination('domains', this.pageOfListDomains, request);
|
|
189
|
-
|
|
190
155
|
this.getDomain = request => this.client.fetch({
|
|
191
156
|
method: 'GET',
|
|
192
157
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
|
|
193
158
|
}, unmarshalDomain);
|
|
194
|
-
|
|
195
159
|
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
|
-
|
|
197
160
|
this.createDomain = request => this.client.fetch({
|
|
198
161
|
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
199
162
|
headers: jsonContentHeaders,
|
|
200
163
|
method: 'POST',
|
|
201
164
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
202
165
|
}, unmarshalDomain);
|
|
203
|
-
|
|
204
166
|
this.deleteDomain = request => this.client.fetch({
|
|
205
167
|
method: 'DELETE',
|
|
206
168
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
|
|
207
169
|
}, unmarshalDomain);
|
|
208
|
-
|
|
209
170
|
this.issueJWT = function (request) {
|
|
210
171
|
if (request === void 0) {
|
|
211
172
|
request = {};
|
|
212
173
|
}
|
|
213
|
-
|
|
214
174
|
return _this.client.fetch({
|
|
215
175
|
method: 'GET',
|
|
216
176
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/issue-jwt`,
|
|
@@ -223,12 +183,10 @@ class FunctionV1Beta1GenAPI extends API {
|
|
|
223
183
|
}])))
|
|
224
184
|
}, unmarshalToken);
|
|
225
185
|
};
|
|
226
|
-
|
|
227
186
|
this.createToken = function (request) {
|
|
228
187
|
if (request === void 0) {
|
|
229
188
|
request = {};
|
|
230
189
|
}
|
|
231
|
-
|
|
232
190
|
return _this.client.fetch({
|
|
233
191
|
body: JSON.stringify(marshalCreateTokenRequest(request, _this.client.settings)),
|
|
234
192
|
headers: jsonContentHeaders,
|
|
@@ -236,41 +194,80 @@ class FunctionV1Beta1GenAPI extends API {
|
|
|
236
194
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/tokens`
|
|
237
195
|
}, unmarshalToken);
|
|
238
196
|
};
|
|
239
|
-
|
|
240
197
|
this.getToken = request => this.client.fetch({
|
|
241
198
|
method: 'GET',
|
|
242
199
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
243
200
|
}, unmarshalToken);
|
|
244
|
-
|
|
245
201
|
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
|
-
|
|
247
202
|
this.pageOfListTokens = function (request) {
|
|
248
203
|
if (request === void 0) {
|
|
249
204
|
request = {};
|
|
250
205
|
}
|
|
251
|
-
|
|
252
206
|
return _this.client.fetch({
|
|
253
207
|
method: 'GET',
|
|
254
208
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/tokens`,
|
|
255
209
|
urlParams: urlParams(['function_id', request.functionId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
|
|
256
210
|
}, unmarshalListTokensResponse);
|
|
257
211
|
};
|
|
258
|
-
|
|
259
212
|
this.listTokens = function (request) {
|
|
260
213
|
if (request === void 0) {
|
|
261
214
|
request = {};
|
|
262
215
|
}
|
|
263
|
-
|
|
264
216
|
return enrichForPagination('tokens', _this.pageOfListTokens, request);
|
|
265
217
|
};
|
|
266
|
-
|
|
267
218
|
this.deleteToken = request => this.client.fetch({
|
|
268
219
|
method: 'DELETE',
|
|
269
220
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
270
221
|
}, unmarshalToken);
|
|
222
|
+
this.createTrigger = request => this.client.fetch({
|
|
223
|
+
body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
|
|
224
|
+
headers: jsonContentHeaders,
|
|
225
|
+
method: 'POST',
|
|
226
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers`
|
|
227
|
+
}, unmarshalTrigger);
|
|
228
|
+
this.getTrigger = request => this.client.fetch({
|
|
229
|
+
method: 'GET',
|
|
230
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
231
|
+
}, unmarshalTrigger);
|
|
232
|
+
this.waitForTrigger = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
|
|
233
|
+
this.pageOfListTriggers = function (request) {
|
|
234
|
+
if (request === void 0) {
|
|
235
|
+
request = {};
|
|
236
|
+
}
|
|
237
|
+
return _this.client.fetch({
|
|
238
|
+
method: 'GET',
|
|
239
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/triggers`,
|
|
240
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
|
|
241
|
+
default: _this.client.settings.defaultProjectId,
|
|
242
|
+
param: 'project_id',
|
|
243
|
+
value: request.projectId
|
|
244
|
+
}, {
|
|
245
|
+
param: 'function_id',
|
|
246
|
+
value: request.functionId
|
|
247
|
+
}, {
|
|
248
|
+
param: 'namespace_id',
|
|
249
|
+
value: request.namespaceId
|
|
250
|
+
}])))
|
|
251
|
+
}, unmarshalListTriggersResponse);
|
|
252
|
+
};
|
|
253
|
+
this.listTriggers = function (request) {
|
|
254
|
+
if (request === void 0) {
|
|
255
|
+
request = {};
|
|
256
|
+
}
|
|
257
|
+
return enrichForPagination('triggers', _this.pageOfListTriggers, request);
|
|
258
|
+
};
|
|
259
|
+
this.updateTrigger = request => this.client.fetch({
|
|
260
|
+
body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
|
|
261
|
+
headers: jsonContentHeaders,
|
|
262
|
+
method: 'PATCH',
|
|
263
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
264
|
+
}, unmarshalTrigger);
|
|
265
|
+
this.deleteTrigger = request => this.client.fetch({
|
|
266
|
+
method: 'DELETE',
|
|
267
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
268
|
+
}, unmarshalTrigger);
|
|
271
269
|
}
|
|
272
|
-
|
|
273
270
|
}
|
|
274
|
-
|
|
271
|
+
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
275
272
|
|
|
276
|
-
export {
|
|
273
|
+
export { API };
|
|
@@ -3,17 +3,20 @@
|
|
|
3
3
|
|
|
4
4
|
/** Lists transient statutes of the enum {@link CronStatus}. */
|
|
5
5
|
const CRON_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
6
|
-
/** Lists transient statutes of the enum {@link DomainStatus}. */
|
|
7
6
|
|
|
7
|
+
/** Lists transient statutes of the enum {@link DomainStatus}. */
|
|
8
8
|
const DOMAIN_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
9
|
-
/** Lists transient statutes of the enum {@link FunctionStatus}. */
|
|
10
9
|
|
|
10
|
+
/** Lists transient statutes of the enum {@link FunctionStatus}. */
|
|
11
11
|
const FUNCTION_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
12
|
-
/** Lists transient statutes of the enum {@link NamespaceStatus}. */
|
|
13
12
|
|
|
13
|
+
/** Lists transient statutes of the enum {@link NamespaceStatus}. */
|
|
14
14
|
const NAMESPACE_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
15
|
-
/** Lists transient statutes of the enum {@link TokenStatus}. */
|
|
16
15
|
|
|
16
|
+
/** Lists transient statutes of the enum {@link TokenStatus}. */
|
|
17
17
|
const TOKEN_TRANSIENT_STATUSES = ['deleting', 'creating'];
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
/** Lists transient statutes of the enum {@link TriggerStatus}. */
|
|
20
|
+
const TRIGGER_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
|
|
21
|
+
|
|
22
|
+
export { CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
|
+
export { CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from './content.gen.js';
|
|
3
|
+
|
|
4
|
+
// This file was automatically generated. DO NOT EDIT.
|