@scaleway/sdk-container 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/license.md +3 -0
- package/dist/metadata.gen.d.ts +6 -6
- package/dist/metadata.gen.js +6 -2
- package/dist/v1/api.gen.d.ts +4 -4
- package/dist/v1/api.gen.js +129 -297
- package/dist/v1/content.gen.js +4 -4
- package/dist/v1/marshalling.gen.js +39 -39
- package/dist/v1/metadata.gen.js +1 -1
- package/dist/v1/validation-rules.gen.js +24 -24
- package/dist/v1beta1/api.gen.d.ts +6 -6
- package/dist/v1beta1/api.gen.js +181 -408
- package/dist/v1beta1/content.gen.js +6 -6
- package/dist/v1beta1/marshalling.gen.js +39 -39
- package/dist/v1beta1/metadata.gen.js +1 -1
- package/dist/v1beta1/validation-rules.gen.js +9 -9
- package/package.json +8 -6
- package/LICENSE +0 -191
- package/dist/metadata.gen.json +0 -6
- package/dist/metadata2.gen.js +0 -8
package/dist/metadata.gen.d.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is automatically generated
|
|
3
3
|
* PLEASE DO NOT EDIT HERE
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
name:
|
|
7
|
-
namespace:
|
|
8
|
-
displayName:
|
|
9
|
-
versions:
|
|
5
|
+
export declare const pkgMetadata: {
|
|
6
|
+
readonly name: "@scaleway/sdk-container";
|
|
7
|
+
readonly namespace: "container";
|
|
8
|
+
readonly displayName: "Container";
|
|
9
|
+
readonly versions: readonly ["v1", "v1beta1"];
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type Metadata = typeof pkgMetadata;
|
|
12
12
|
export default pkgMetadata;
|
package/dist/metadata.gen.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import metadata_gen_default from "./metadata2.gen.js";
|
|
2
1
|
//#region src/metadata.gen.ts
|
|
3
2
|
/**
|
|
4
3
|
* This file is automatically generated
|
|
5
4
|
* PLEASE DO NOT EDIT HERE
|
|
6
5
|
*/
|
|
7
|
-
|
|
6
|
+
const pkgMetadata = {
|
|
7
|
+
name: "@scaleway/sdk-container",
|
|
8
|
+
namespace: "container",
|
|
9
|
+
displayName: "Container",
|
|
10
|
+
versions: ["v1", "v1beta1"]
|
|
11
|
+
};
|
|
8
12
|
//#endregion
|
|
9
13
|
export { pkgMetadata as default, pkgMetadata };
|
package/dist/v1/api.gen.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare class API extends ParentAPI {
|
|
|
34
34
|
* @param options - The waiting options
|
|
35
35
|
* @returns A Promise of Namespace
|
|
36
36
|
*/
|
|
37
|
-
waitForNamespace: (request: Readonly<GetNamespaceRequest>, options?: Readonly<WaitForOptions<Namespace>>) => Promise<Namespace>;
|
|
37
|
+
waitForNamespace: (request: Readonly<GetNamespaceRequest>, options?: Readonly<WaitForOptions<Namespace>> | undefined) => Promise<Namespace>;
|
|
38
38
|
protected pageOfListNamespaces: (request?: Readonly<ListNamespacesRequest>) => Promise<ListNamespacesResponse>;
|
|
39
39
|
/**
|
|
40
40
|
* List all namespaces the caller can access (read permission).. By default, the namespaces listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
|
|
@@ -85,7 +85,7 @@ export declare class API extends ParentAPI {
|
|
|
85
85
|
* @param options - The waiting options
|
|
86
86
|
* @returns A Promise of Container
|
|
87
87
|
*/
|
|
88
|
-
waitForContainer: (request: Readonly<GetContainerRequest>, options?: Readonly<WaitForOptions<Container>>) => Promise<Container>;
|
|
88
|
+
waitForContainer: (request: Readonly<GetContainerRequest>, options?: Readonly<WaitForOptions<Container>> | undefined) => Promise<Container>;
|
|
89
89
|
protected pageOfListContainers: (request?: Readonly<ListContainersRequest>) => Promise<ListContainersResponse>;
|
|
90
90
|
/**
|
|
91
91
|
* List all containers the caller can access (read permission).. By default, the containers listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
|
|
@@ -136,7 +136,7 @@ export declare class API extends ParentAPI {
|
|
|
136
136
|
* @param options - The waiting options
|
|
137
137
|
* @returns A Promise of Domain
|
|
138
138
|
*/
|
|
139
|
-
waitForDomain: (request: Readonly<GetDomainRequest>, options?: Readonly<WaitForOptions<Domain>>) => Promise<Domain>;
|
|
139
|
+
waitForDomain: (request: Readonly<GetDomainRequest>, options?: Readonly<WaitForOptions<Domain>> | undefined) => Promise<Domain>;
|
|
140
140
|
protected pageOfListDomains: (request?: Readonly<ListDomainsRequest>) => Promise<ListDomainsResponse>;
|
|
141
141
|
/**
|
|
142
142
|
* List all custom domains the caller can access (read permission).. By default, the custom domains listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
|
|
@@ -194,7 +194,7 @@ export declare class API extends ParentAPI {
|
|
|
194
194
|
* @param options - The waiting options
|
|
195
195
|
* @returns A Promise of Trigger
|
|
196
196
|
*/
|
|
197
|
-
waitForTrigger: (request: Readonly<GetTriggerRequest>, options?: Readonly<WaitForOptions<Trigger>>) => Promise<Trigger>;
|
|
197
|
+
waitForTrigger: (request: Readonly<GetTriggerRequest>, options?: Readonly<WaitForOptions<Trigger>> | undefined) => Promise<Trigger>;
|
|
198
198
|
protected pageOfListTriggers: (request?: Readonly<ListTriggersRequest>) => Promise<ListTriggersResponse>;
|
|
199
199
|
/**
|
|
200
200
|
* List all triggers the caller can access (read permission).. By default, the triggers listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -2,309 +2,141 @@ import { CONTAINER_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, NAMESPACE_TRAN
|
|
|
2
2
|
import { marshalCreateContainerRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalCreateTriggerRequest, marshalUpdateContainerRequest, marshalUpdateDomainRequest, marshalUpdateNamespaceRequest, marshalUpdateTriggerRequest, unmarshalContainer, unmarshalDomain, unmarshalListContainersResponse, unmarshalListDomainsResponse, unmarshalListNamespacesResponse, unmarshalListTriggersResponse, unmarshalNamespace, unmarshalTrigger } from "./marshalling.gen.js";
|
|
3
3
|
import { API as API$1, enrichForPagination, toApiLocality, unmarshalServiceInfo, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
4
|
//#region src/v1/api.gen.ts
|
|
5
|
-
|
|
5
|
+
const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
6
6
|
/**
|
|
7
7
|
* Serverless Containers API.
|
|
8
8
|
|
|
9
9
|
Easily run containers on the cloud with a single command.
|
|
10
10
|
*/
|
|
11
11
|
var API = class extends API$1 {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
* @param request - The request {@link UpdateContainerRequest}
|
|
141
|
-
* @returns A Promise of Container
|
|
142
|
-
*/
|
|
143
|
-
updateContainer = (request) => this.client.fetch({
|
|
144
|
-
body: JSON.stringify(marshalUpdateContainerRequest(request, this.client.settings)),
|
|
145
|
-
headers: jsonContentHeaders,
|
|
146
|
-
method: "PATCH",
|
|
147
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}`
|
|
148
|
-
}, unmarshalContainer);
|
|
149
|
-
/**
|
|
150
|
-
* Delete the container associated with the specified ID.. It also deletes in cascade any resource linked to the container (crons, tokens, etc.).
|
|
151
|
-
|
|
152
|
-
This action **cannot** be undone.
|
|
153
|
-
*
|
|
154
|
-
* @param request - The request {@link DeleteContainerRequest}
|
|
155
|
-
* @returns A Promise of Container
|
|
156
|
-
*/
|
|
157
|
-
deleteContainer = (request) => this.client.fetch({
|
|
158
|
-
method: "DELETE",
|
|
159
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}`
|
|
160
|
-
}, unmarshalContainer);
|
|
161
|
-
/**
|
|
162
|
-
* Create a new custom domain for the container with the specified ID.. Create a new custom domain for the container with the specified ID.
|
|
163
|
-
*
|
|
164
|
-
* @param request - The request {@link CreateDomainRequest}
|
|
165
|
-
* @returns A Promise of Domain
|
|
166
|
-
*/
|
|
167
|
-
createDomain = (request) => this.client.fetch({
|
|
168
|
-
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
169
|
-
headers: jsonContentHeaders,
|
|
170
|
-
method: "POST",
|
|
171
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
172
|
-
}, unmarshalDomain);
|
|
173
|
-
/**
|
|
174
|
-
* Get the custom domain associated with the specified ID.. Get the custom domain associated with the specified ID.
|
|
175
|
-
*
|
|
176
|
-
* @param request - The request {@link GetDomainRequest}
|
|
177
|
-
* @returns A Promise of Domain
|
|
178
|
-
*/
|
|
179
|
-
getDomain = (request) => this.client.fetch({
|
|
180
|
-
method: "GET",
|
|
181
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
182
|
-
}, unmarshalDomain);
|
|
183
|
-
/**
|
|
184
|
-
* Waits for {@link Domain} to be in a final state.
|
|
185
|
-
*
|
|
186
|
-
* @param request - The request {@link GetDomainRequest}
|
|
187
|
-
* @param options - The waiting options
|
|
188
|
-
* @returns A Promise of Domain
|
|
189
|
-
*/
|
|
190
|
-
waitForDomain = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
191
|
-
pageOfListDomains = (request = {}) => this.client.fetch({
|
|
192
|
-
method: "GET",
|
|
193
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
194
|
-
urlParams: urlParams(["container_id", request.containerId], ["namespace_id", request.namespaceId], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
195
|
-
}, unmarshalListDomainsResponse);
|
|
196
|
-
/**
|
|
197
|
-
* List all custom domains the caller can access (read permission).. By default, the custom domains listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
|
|
198
|
-
|
|
199
|
-
Additional parameters can be set in the query to filter the output, such as `organization_id`, `project_id`, `namespace_id`, or `container_id`.
|
|
200
|
-
*
|
|
201
|
-
* @param request - The request {@link ListDomainsRequest}
|
|
202
|
-
* @returns A Promise of ListDomainsResponse
|
|
203
|
-
*/
|
|
204
|
-
listDomains = (request = {}) => enrichForPagination("domains", this.pageOfListDomains, request);
|
|
205
|
-
/**
|
|
206
|
-
* Update the domain associated with the specified ID.. Only fields present in the request are updated; others are left untouched.
|
|
207
|
-
*
|
|
208
|
-
* @param request - The request {@link UpdateDomainRequest}
|
|
209
|
-
* @returns A Promise of Domain
|
|
210
|
-
*/
|
|
211
|
-
updateDomain = (request) => this.client.fetch({
|
|
212
|
-
body: JSON.stringify(marshalUpdateDomainRequest(request, this.client.settings)),
|
|
213
|
-
headers: jsonContentHeaders,
|
|
214
|
-
method: "PATCH",
|
|
215
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
216
|
-
}, unmarshalDomain);
|
|
217
|
-
/**
|
|
218
|
-
* Delete the custom domain associated with the specified ID.. Delete the custom domain associated with the specified ID.
|
|
219
|
-
*
|
|
220
|
-
* @param request - The request {@link DeleteDomainRequest}
|
|
221
|
-
* @returns A Promise of Domain
|
|
222
|
-
*/
|
|
223
|
-
deleteDomain = (request) => this.client.fetch({
|
|
224
|
-
method: "DELETE",
|
|
225
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
226
|
-
}, unmarshalDomain);
|
|
227
|
-
/**
|
|
228
|
-
* Redeploy a container. Performs a rollout of the container by creating new instances with the latest image version and terminating the old instances.
|
|
229
|
-
When using mutable registry image references (e.g. `my-registry-namespace/image:tag`), this endpoint can be used to force the container to use
|
|
230
|
-
the most recent image version available in the registry.
|
|
231
|
-
*
|
|
232
|
-
* @param request - The request {@link RedeployContainerRequest}
|
|
233
|
-
* @returns A Promise of Container
|
|
234
|
-
*/
|
|
235
|
-
redeployContainer = (request) => this.client.fetch({
|
|
236
|
-
body: "{}",
|
|
237
|
-
headers: jsonContentHeaders,
|
|
238
|
-
method: "POST",
|
|
239
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}/redeploy`
|
|
240
|
-
}, unmarshalContainer);
|
|
241
|
-
/**
|
|
242
|
-
* Create a new trigger for the container with the specified ID.. Create a new trigger for the container with the specified ID.
|
|
243
|
-
*
|
|
244
|
-
* @param request - The request {@link CreateTriggerRequest}
|
|
245
|
-
* @returns A Promise of Trigger
|
|
246
|
-
*/
|
|
247
|
-
createTrigger = (request) => this.client.fetch({
|
|
248
|
-
body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
|
|
249
|
-
headers: jsonContentHeaders,
|
|
250
|
-
method: "POST",
|
|
251
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`
|
|
252
|
-
}, unmarshalTrigger);
|
|
253
|
-
/**
|
|
254
|
-
* Get the trigger associated with the specified ID.. Get the trigger associated with the specified ID.
|
|
255
|
-
*
|
|
256
|
-
* @param request - The request {@link GetTriggerRequest}
|
|
257
|
-
* @returns A Promise of Trigger
|
|
258
|
-
*/
|
|
259
|
-
getTrigger = (request) => this.client.fetch({
|
|
260
|
-
method: "GET",
|
|
261
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
262
|
-
}, unmarshalTrigger);
|
|
263
|
-
/**
|
|
264
|
-
* Waits for {@link Trigger} to be in a final state.
|
|
265
|
-
*
|
|
266
|
-
* @param request - The request {@link GetTriggerRequest}
|
|
267
|
-
* @param options - The waiting options
|
|
268
|
-
* @returns A Promise of Trigger
|
|
269
|
-
*/
|
|
270
|
-
waitForTrigger = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
|
|
271
|
-
pageOfListTriggers = (request = {}) => this.client.fetch({
|
|
272
|
-
method: "GET",
|
|
273
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`,
|
|
274
|
-
urlParams: urlParams(["container_id", request.containerId], ["namespace_id", request.namespaceId], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
275
|
-
}, unmarshalListTriggersResponse);
|
|
276
|
-
/**
|
|
277
|
-
* List all triggers the caller can access (read permission).. By default, the triggers listed are ordered by creation date in ascending order. This can be modified via the `order_by` field.
|
|
278
|
-
|
|
279
|
-
Additional parameters can be set in the query to filter, such as `organization_id`, `project_id`, `namespace_id`, or `container_id`.
|
|
280
|
-
*
|
|
281
|
-
* @param request - The request {@link ListTriggersRequest}
|
|
282
|
-
* @returns A Promise of ListTriggersResponse
|
|
283
|
-
*/
|
|
284
|
-
listTriggers = (request = {}) => enrichForPagination("triggers", this.pageOfListTriggers, request);
|
|
285
|
-
/**
|
|
286
|
-
* Update the trigger associated with the specified ID.. When updating a trigger, you cannot specify a different source type than the one already set.
|
|
287
|
-
Only fields present in the request are updated; others are left untouched.
|
|
288
|
-
*
|
|
289
|
-
* @param request - The request {@link UpdateTriggerRequest}
|
|
290
|
-
* @returns A Promise of Trigger
|
|
291
|
-
*/
|
|
292
|
-
updateTrigger = (request) => this.client.fetch({
|
|
293
|
-
body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
|
|
294
|
-
headers: jsonContentHeaders,
|
|
295
|
-
method: "PATCH",
|
|
296
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
297
|
-
}, unmarshalTrigger);
|
|
298
|
-
/**
|
|
299
|
-
* Delete the trigger associated with the specified ID.. This action **cannot** be undone.
|
|
300
|
-
*
|
|
301
|
-
* @param request - The request {@link DeleteTriggerRequest}
|
|
302
|
-
* @returns A Promise of Trigger
|
|
303
|
-
*/
|
|
304
|
-
deleteTrigger = (request) => this.client.fetch({
|
|
305
|
-
method: "DELETE",
|
|
306
|
-
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
307
|
-
}, unmarshalTrigger);
|
|
12
|
+
constructor(..._args) {
|
|
13
|
+
super(..._args);
|
|
14
|
+
this.getServiceInfo = (request = {}) => this.client.fetch({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}`
|
|
17
|
+
}, unmarshalServiceInfo);
|
|
18
|
+
this.createNamespace = (request) => this.client.fetch({
|
|
19
|
+
body: JSON.stringify(marshalCreateNamespaceRequest(request, this.client.settings)),
|
|
20
|
+
headers: jsonContentHeaders,
|
|
21
|
+
method: "POST",
|
|
22
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces`
|
|
23
|
+
}, unmarshalNamespace);
|
|
24
|
+
this.getNamespace = (request) => this.client.fetch({
|
|
25
|
+
method: "GET",
|
|
26
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam("namespaceId", request.namespaceId)}`
|
|
27
|
+
}, unmarshalNamespace);
|
|
28
|
+
this.waitForNamespace = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
29
|
+
this.pageOfListNamespaces = (request = {}) => this.client.fetch({
|
|
30
|
+
method: "GET",
|
|
31
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces`,
|
|
32
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
33
|
+
}, unmarshalListNamespacesResponse);
|
|
34
|
+
this.listNamespaces = (request = {}) => enrichForPagination("namespaces", this.pageOfListNamespaces, request);
|
|
35
|
+
this.updateNamespace = (request) => this.client.fetch({
|
|
36
|
+
body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
|
|
37
|
+
headers: jsonContentHeaders,
|
|
38
|
+
method: "PATCH",
|
|
39
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam("namespaceId", request.namespaceId)}`
|
|
40
|
+
}, unmarshalNamespace);
|
|
41
|
+
this.deleteNamespace = (request) => this.client.fetch({
|
|
42
|
+
method: "DELETE",
|
|
43
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam("namespaceId", request.namespaceId)}`
|
|
44
|
+
}, unmarshalNamespace);
|
|
45
|
+
this.createContainer = (request) => this.client.fetch({
|
|
46
|
+
body: JSON.stringify(marshalCreateContainerRequest(request, this.client.settings)),
|
|
47
|
+
headers: jsonContentHeaders,
|
|
48
|
+
method: "POST",
|
|
49
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers`
|
|
50
|
+
}, unmarshalContainer);
|
|
51
|
+
this.getContainer = (request) => this.client.fetch({
|
|
52
|
+
method: "GET",
|
|
53
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}`
|
|
54
|
+
}, unmarshalContainer);
|
|
55
|
+
this.waitForContainer = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CONTAINER_TRANSIENT_STATUSES.includes(res.status))), this.getContainer, request, options);
|
|
56
|
+
this.pageOfListContainers = (request = {}) => this.client.fetch({
|
|
57
|
+
method: "GET",
|
|
58
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers`,
|
|
59
|
+
urlParams: urlParams(["name", request.name], ["namespace_id", request.namespaceId], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
60
|
+
}, unmarshalListContainersResponse);
|
|
61
|
+
this.listContainers = (request = {}) => enrichForPagination("containers", this.pageOfListContainers, request);
|
|
62
|
+
this.updateContainer = (request) => this.client.fetch({
|
|
63
|
+
body: JSON.stringify(marshalUpdateContainerRequest(request, this.client.settings)),
|
|
64
|
+
headers: jsonContentHeaders,
|
|
65
|
+
method: "PATCH",
|
|
66
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}`
|
|
67
|
+
}, unmarshalContainer);
|
|
68
|
+
this.deleteContainer = (request) => this.client.fetch({
|
|
69
|
+
method: "DELETE",
|
|
70
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}`
|
|
71
|
+
}, unmarshalContainer);
|
|
72
|
+
this.createDomain = (request) => this.client.fetch({
|
|
73
|
+
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
74
|
+
headers: jsonContentHeaders,
|
|
75
|
+
method: "POST",
|
|
76
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
77
|
+
}, unmarshalDomain);
|
|
78
|
+
this.getDomain = (request) => this.client.fetch({
|
|
79
|
+
method: "GET",
|
|
80
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
81
|
+
}, unmarshalDomain);
|
|
82
|
+
this.waitForDomain = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
83
|
+
this.pageOfListDomains = (request = {}) => this.client.fetch({
|
|
84
|
+
method: "GET",
|
|
85
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
86
|
+
urlParams: urlParams(["container_id", request.containerId], ["namespace_id", request.namespaceId], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
87
|
+
}, unmarshalListDomainsResponse);
|
|
88
|
+
this.listDomains = (request = {}) => enrichForPagination("domains", this.pageOfListDomains, request);
|
|
89
|
+
this.updateDomain = (request) => this.client.fetch({
|
|
90
|
+
body: JSON.stringify(marshalUpdateDomainRequest(request, this.client.settings)),
|
|
91
|
+
headers: jsonContentHeaders,
|
|
92
|
+
method: "PATCH",
|
|
93
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
94
|
+
}, unmarshalDomain);
|
|
95
|
+
this.deleteDomain = (request) => this.client.fetch({
|
|
96
|
+
method: "DELETE",
|
|
97
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
98
|
+
}, unmarshalDomain);
|
|
99
|
+
this.redeployContainer = (request) => this.client.fetch({
|
|
100
|
+
body: "{}",
|
|
101
|
+
headers: jsonContentHeaders,
|
|
102
|
+
method: "POST",
|
|
103
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}/redeploy`
|
|
104
|
+
}, unmarshalContainer);
|
|
105
|
+
this.createTrigger = (request) => this.client.fetch({
|
|
106
|
+
body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
|
|
107
|
+
headers: jsonContentHeaders,
|
|
108
|
+
method: "POST",
|
|
109
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`
|
|
110
|
+
}, unmarshalTrigger);
|
|
111
|
+
this.getTrigger = (request) => this.client.fetch({
|
|
112
|
+
method: "GET",
|
|
113
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
114
|
+
}, unmarshalTrigger);
|
|
115
|
+
this.waitForTrigger = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
|
|
116
|
+
this.pageOfListTriggers = (request = {}) => this.client.fetch({
|
|
117
|
+
method: "GET",
|
|
118
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`,
|
|
119
|
+
urlParams: urlParams(["container_id", request.containerId], ["namespace_id", request.namespaceId], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
120
|
+
}, unmarshalListTriggersResponse);
|
|
121
|
+
this.listTriggers = (request = {}) => enrichForPagination("triggers", this.pageOfListTriggers, request);
|
|
122
|
+
this.updateTrigger = (request) => this.client.fetch({
|
|
123
|
+
body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
|
|
124
|
+
headers: jsonContentHeaders,
|
|
125
|
+
method: "PATCH",
|
|
126
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
127
|
+
}, unmarshalTrigger);
|
|
128
|
+
this.deleteTrigger = (request) => this.client.fetch({
|
|
129
|
+
method: "DELETE",
|
|
130
|
+
path: `/containers/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
131
|
+
}, unmarshalTrigger);
|
|
132
|
+
}
|
|
133
|
+
static {
|
|
134
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
135
|
+
"fr-par",
|
|
136
|
+
"nl-ams",
|
|
137
|
+
"pl-waw"
|
|
138
|
+
] });
|
|
139
|
+
}
|
|
308
140
|
};
|
|
309
141
|
//#endregion
|
|
310
142
|
export { API };
|
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/v1/content.gen.ts
|
|
2
2
|
/** Lists transient statutes of the enum {@link ContainerStatus}. */
|
|
3
|
-
|
|
3
|
+
const CONTAINER_TRANSIENT_STATUSES = [
|
|
4
4
|
"updating",
|
|
5
5
|
"deleting",
|
|
6
6
|
"locking",
|
|
@@ -8,7 +8,7 @@ var CONTAINER_TRANSIENT_STATUSES = [
|
|
|
8
8
|
"upgrading"
|
|
9
9
|
];
|
|
10
10
|
/** Lists transient statutes of the enum {@link DomainStatus}. */
|
|
11
|
-
|
|
11
|
+
const DOMAIN_TRANSIENT_STATUSES = [
|
|
12
12
|
"creating",
|
|
13
13
|
"updating",
|
|
14
14
|
"deleting",
|
|
@@ -16,7 +16,7 @@ var DOMAIN_TRANSIENT_STATUSES = [
|
|
|
16
16
|
"upgrading"
|
|
17
17
|
];
|
|
18
18
|
/** Lists transient statutes of the enum {@link NamespaceStatus}. */
|
|
19
|
-
|
|
19
|
+
const NAMESPACE_TRANSIENT_STATUSES = [
|
|
20
20
|
"updating",
|
|
21
21
|
"deleting",
|
|
22
22
|
"locking",
|
|
@@ -24,7 +24,7 @@ var NAMESPACE_TRANSIENT_STATUSES = [
|
|
|
24
24
|
"upgrading"
|
|
25
25
|
];
|
|
26
26
|
/** Lists transient statutes of the enum {@link TriggerStatus}. */
|
|
27
|
-
|
|
27
|
+
const TRIGGER_TRANSIENT_STATUSES = [
|
|
28
28
|
"deleting",
|
|
29
29
|
"updating",
|
|
30
30
|
"creating",
|