@scaleway/sdk-container 2.5.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/index.gen.d.ts +1 -0
- package/dist/index.gen.js +3 -2
- package/dist/metadata.gen.d.ts +12 -0
- package/dist/metadata.gen.js +13 -0
- package/dist/v1/api.gen.d.ts +226 -0
- package/dist/v1/api.gen.js +142 -0
- package/dist/v1/content.gen.d.ts +9 -0
- package/dist/v1/content.gen.js +35 -0
- package/dist/v1/index.gen.d.ts +5 -0
- package/dist/v1/index.gen.js +32 -0
- package/dist/v1/marshalling.gen.d.ts +18 -0
- package/dist/v1/marshalling.gen.js +373 -0
- package/dist/v1/metadata.gen.d.ts +103 -0
- package/dist/v1/metadata.gen.js +115 -0
- package/dist/v1/types.gen.d.ts +1109 -0
- package/dist/v1/types.gen.js +0 -0
- package/dist/v1/validation-rules.gen.d.ts +263 -0
- package/dist/v1/validation-rules.gen.js +225 -0
- package/dist/v1beta1/api.gen.d.ts +15 -7
- package/dist/v1beta1/api.gen.js +181 -400
- 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/types.gen.d.ts +2 -2
- package/dist/v1beta1/validation-rules.gen.js +9 -9
- package/package.json +16 -6
- package/LICENSE +0 -191
package/dist/v1beta1/api.gen.js
CHANGED
|
@@ -2,412 +2,193 @@ import { CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT
|
|
|
2
2
|
import { marshalCreateContainerRequest, marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalCreateTriggerRequest, marshalUpdateContainerRequest, marshalUpdateCronRequest, marshalUpdateNamespaceRequest, marshalUpdateTriggerRequest, unmarshalContainer, unmarshalCron, unmarshalDomain, unmarshalListContainersResponse, unmarshalListCronsResponse, unmarshalListDomainsResponse, unmarshalListNamespacesResponse, unmarshalListTokensResponse, unmarshalListTriggersResponse, unmarshalNamespace, unmarshalToken, unmarshalTrigger } from "./marshalling.gen.js";
|
|
3
3
|
import { API as API$1, enrichForPagination, resolveOneOf, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
4
|
//#region src/v1beta1/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
|
This API allows you to manage your Serverless Containers.
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
*/
|
|
193
|
-
waitForCron = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
|
|
194
|
-
/**
|
|
195
|
-
* Create a new cron.
|
|
196
|
-
*
|
|
197
|
-
* @param request - The request {@link CreateCronRequest}
|
|
198
|
-
* @returns A Promise of Cron
|
|
199
|
-
*/
|
|
200
|
-
createCron = (request) => this.client.fetch({
|
|
201
|
-
body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
|
|
202
|
-
headers: jsonContentHeaders,
|
|
203
|
-
method: "POST",
|
|
204
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons`
|
|
205
|
-
}, unmarshalCron);
|
|
206
|
-
/**
|
|
207
|
-
* Update an existing cron. Update the cron associated with the specified ID.
|
|
208
|
-
*
|
|
209
|
-
* @param request - The request {@link UpdateCronRequest}
|
|
210
|
-
* @returns A Promise of Cron
|
|
211
|
-
*/
|
|
212
|
-
updateCron = (request) => this.client.fetch({
|
|
213
|
-
body: JSON.stringify(marshalUpdateCronRequest(request, this.client.settings)),
|
|
214
|
-
headers: jsonContentHeaders,
|
|
215
|
-
method: "PATCH",
|
|
216
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam("cronId", request.cronId)}`
|
|
217
|
-
}, unmarshalCron);
|
|
218
|
-
/**
|
|
219
|
-
* Delete an existing cron. Delete the cron associated with the specified ID.
|
|
220
|
-
*
|
|
221
|
-
* @param request - The request {@link DeleteCronRequest}
|
|
222
|
-
* @returns A Promise of Cron
|
|
223
|
-
*/
|
|
224
|
-
deleteCron = (request) => this.client.fetch({
|
|
225
|
-
method: "DELETE",
|
|
226
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam("cronId", request.cronId)}`
|
|
227
|
-
}, unmarshalCron);
|
|
228
|
-
pageOfListDomains = (request) => this.client.fetch({
|
|
229
|
-
method: "GET",
|
|
230
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
231
|
-
urlParams: urlParams(["container_id", request.containerId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
232
|
-
}, unmarshalListDomainsResponse);
|
|
233
|
-
/**
|
|
234
|
-
* List all custom domains. List all custom domains in a specified region.
|
|
235
|
-
*
|
|
236
|
-
* @param request - The request {@link ListDomainsRequest}
|
|
237
|
-
* @returns A Promise of ListDomainsResponse
|
|
238
|
-
*/
|
|
239
|
-
listDomains = (request) => enrichForPagination("domains", this.pageOfListDomains, request);
|
|
240
|
-
/**
|
|
241
|
-
* Get a custom domain. Get a custom domain for the container with the specified ID.
|
|
242
|
-
*
|
|
243
|
-
* @param request - The request {@link GetDomainRequest}
|
|
244
|
-
* @returns A Promise of Domain
|
|
245
|
-
*/
|
|
246
|
-
getDomain = (request) => this.client.fetch({
|
|
247
|
-
method: "GET",
|
|
248
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
249
|
-
}, unmarshalDomain);
|
|
250
|
-
/**
|
|
251
|
-
* Waits for {@link Domain} to be in a final state.
|
|
252
|
-
*
|
|
253
|
-
* @param request - The request {@link GetDomainRequest}
|
|
254
|
-
* @param options - The waiting options
|
|
255
|
-
* @returns A Promise of Domain
|
|
256
|
-
*/
|
|
257
|
-
waitForDomain = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
258
|
-
/**
|
|
259
|
-
* Create a custom domain. Create a custom domain for the container with the specified ID.
|
|
260
|
-
*
|
|
261
|
-
* @param request - The request {@link CreateDomainRequest}
|
|
262
|
-
* @returns A Promise of Domain
|
|
263
|
-
*/
|
|
264
|
-
createDomain = (request) => this.client.fetch({
|
|
265
|
-
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
266
|
-
headers: jsonContentHeaders,
|
|
267
|
-
method: "POST",
|
|
268
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
269
|
-
}, unmarshalDomain);
|
|
270
|
-
/**
|
|
271
|
-
* Delete a custom domain. Delete the custom domain with the specific ID.
|
|
272
|
-
*
|
|
273
|
-
* @param request - The request {@link DeleteDomainRequest}
|
|
274
|
-
* @returns A Promise of Domain
|
|
275
|
-
*/
|
|
276
|
-
deleteDomain = (request) => this.client.fetch({
|
|
277
|
-
method: "DELETE",
|
|
278
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
279
|
-
}, unmarshalDomain);
|
|
280
|
-
/**
|
|
281
|
-
* Create a new revocable token. Deprecated in favor of IAM authentication.
|
|
282
|
-
*
|
|
283
|
-
* @deprecated
|
|
284
|
-
* @param request - The request {@link CreateTokenRequest}
|
|
285
|
-
* @returns A Promise of Token
|
|
286
|
-
*/
|
|
287
|
-
createToken = (request = {}) => this.client.fetch({
|
|
288
|
-
body: JSON.stringify(marshalCreateTokenRequest(request, this.client.settings)),
|
|
289
|
-
headers: jsonContentHeaders,
|
|
290
|
-
method: "POST",
|
|
291
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens`
|
|
292
|
-
}, unmarshalToken);
|
|
293
|
-
/**
|
|
294
|
-
* Get a token. Get a token with a specified ID.
|
|
295
|
-
*
|
|
296
|
-
* @param request - The request {@link GetTokenRequest}
|
|
297
|
-
* @returns A Promise of Token
|
|
298
|
-
*/
|
|
299
|
-
getToken = (request) => this.client.fetch({
|
|
300
|
-
method: "GET",
|
|
301
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam("tokenId", request.tokenId)}`
|
|
302
|
-
}, unmarshalToken);
|
|
303
|
-
/**
|
|
304
|
-
* Waits for {@link Token} to be in a final state.
|
|
305
|
-
*
|
|
306
|
-
* @param request - The request {@link GetTokenRequest}
|
|
307
|
-
* @param options - The waiting options
|
|
308
|
-
* @returns A Promise of Token
|
|
309
|
-
*/
|
|
310
|
-
waitForToken = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
|
|
311
|
-
pageOfListTokens = (request = {}) => this.client.fetch({
|
|
312
|
-
method: "GET",
|
|
313
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens`,
|
|
314
|
-
urlParams: urlParams(["container_id", request.containerId], ["namespace_id", request.namespaceId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
315
|
-
}, unmarshalListTokensResponse);
|
|
316
|
-
/**
|
|
317
|
-
* List all tokens. List all tokens belonging to a specified Organization or Project.
|
|
318
|
-
*
|
|
319
|
-
* @param request - The request {@link ListTokensRequest}
|
|
320
|
-
* @returns A Promise of ListTokensResponse
|
|
321
|
-
*/
|
|
322
|
-
listTokens = (request = {}) => enrichForPagination("tokens", this.pageOfListTokens, request);
|
|
323
|
-
/**
|
|
324
|
-
* Delete a token. Delete a token with a specified ID.
|
|
325
|
-
*
|
|
326
|
-
* @param request - The request {@link DeleteTokenRequest}
|
|
327
|
-
* @returns A Promise of Token
|
|
328
|
-
*/
|
|
329
|
-
deleteToken = (request) => this.client.fetch({
|
|
330
|
-
method: "DELETE",
|
|
331
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam("tokenId", request.tokenId)}`
|
|
332
|
-
}, unmarshalToken);
|
|
333
|
-
/**
|
|
334
|
-
* Create a trigger. Create a new trigger for a specified container.
|
|
335
|
-
*
|
|
336
|
-
* @param request - The request {@link CreateTriggerRequest}
|
|
337
|
-
* @returns A Promise of Trigger
|
|
338
|
-
*/
|
|
339
|
-
createTrigger = (request) => this.client.fetch({
|
|
340
|
-
body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
|
|
341
|
-
headers: jsonContentHeaders,
|
|
342
|
-
method: "POST",
|
|
343
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`
|
|
344
|
-
}, unmarshalTrigger);
|
|
345
|
-
/**
|
|
346
|
-
* Get a trigger. Get a trigger with a specified ID.
|
|
347
|
-
*
|
|
348
|
-
* @param request - The request {@link GetTriggerRequest}
|
|
349
|
-
* @returns A Promise of Trigger
|
|
350
|
-
*/
|
|
351
|
-
getTrigger = (request) => this.client.fetch({
|
|
352
|
-
method: "GET",
|
|
353
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
354
|
-
}, unmarshalTrigger);
|
|
355
|
-
/**
|
|
356
|
-
* Waits for {@link Trigger} to be in a final state.
|
|
357
|
-
*
|
|
358
|
-
* @param request - The request {@link GetTriggerRequest}
|
|
359
|
-
* @param options - The waiting options
|
|
360
|
-
* @returns A Promise of Trigger
|
|
361
|
-
*/
|
|
362
|
-
waitForTrigger = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
|
|
363
|
-
pageOfListTriggers = (request = {}) => this.client.fetch({
|
|
364
|
-
method: "GET",
|
|
365
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`,
|
|
366
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([
|
|
367
|
-
{
|
|
368
|
-
param: "container_id",
|
|
369
|
-
value: request.containerId
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
param: "namespace_id",
|
|
373
|
-
value: request.namespaceId
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
default: this.client.settings.defaultProjectId,
|
|
377
|
-
param: "project_id",
|
|
378
|
-
value: request.projectId
|
|
379
|
-
}
|
|
380
|
-
])))
|
|
381
|
-
}, unmarshalListTriggersResponse);
|
|
382
|
-
/**
|
|
383
|
-
* List all triggers. List all triggers belonging to a specified Organization or Project.
|
|
384
|
-
*
|
|
385
|
-
* @param request - The request {@link ListTriggersRequest}
|
|
386
|
-
* @returns A Promise of ListTriggersResponse
|
|
387
|
-
*/
|
|
388
|
-
listTriggers = (request = {}) => enrichForPagination("triggers", this.pageOfListTriggers, request);
|
|
389
|
-
/**
|
|
390
|
-
* Update a trigger. Update a trigger with a specified ID.
|
|
391
|
-
*
|
|
392
|
-
* @param request - The request {@link UpdateTriggerRequest}
|
|
393
|
-
* @returns A Promise of Trigger
|
|
394
|
-
*/
|
|
395
|
-
updateTrigger = (request) => this.client.fetch({
|
|
396
|
-
body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
|
|
397
|
-
headers: jsonContentHeaders,
|
|
398
|
-
method: "PATCH",
|
|
399
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
400
|
-
}, unmarshalTrigger);
|
|
401
|
-
/**
|
|
402
|
-
* Delete a trigger. Delete a trigger with a specified ID.
|
|
403
|
-
*
|
|
404
|
-
* @param request - The request {@link DeleteTriggerRequest}
|
|
405
|
-
* @returns A Promise of Trigger
|
|
406
|
-
*/
|
|
407
|
-
deleteTrigger = (request) => this.client.fetch({
|
|
408
|
-
method: "DELETE",
|
|
409
|
-
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
410
|
-
}, unmarshalTrigger);
|
|
12
|
+
constructor(..._args) {
|
|
13
|
+
super(..._args);
|
|
14
|
+
this.pageOfListNamespaces = (request = {}) => this.client.fetch({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces`,
|
|
17
|
+
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])
|
|
18
|
+
}, unmarshalListNamespacesResponse);
|
|
19
|
+
this.listNamespaces = (request = {}) => enrichForPagination("namespaces", this.pageOfListNamespaces, request);
|
|
20
|
+
this.getNamespace = (request) => this.client.fetch({
|
|
21
|
+
method: "GET",
|
|
22
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam("namespaceId", request.namespaceId)}`
|
|
23
|
+
}, unmarshalNamespace);
|
|
24
|
+
this.waitForNamespace = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
25
|
+
this.createNamespace = (request = {}) => this.client.fetch({
|
|
26
|
+
body: JSON.stringify(marshalCreateNamespaceRequest(request, this.client.settings)),
|
|
27
|
+
headers: jsonContentHeaders,
|
|
28
|
+
method: "POST",
|
|
29
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces`
|
|
30
|
+
}, unmarshalNamespace);
|
|
31
|
+
this.updateNamespace = (request) => this.client.fetch({
|
|
32
|
+
body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
|
|
33
|
+
headers: jsonContentHeaders,
|
|
34
|
+
method: "PATCH",
|
|
35
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam("namespaceId", request.namespaceId)}`
|
|
36
|
+
}, unmarshalNamespace);
|
|
37
|
+
this.deleteNamespace = (request) => this.client.fetch({
|
|
38
|
+
method: "DELETE",
|
|
39
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam("namespaceId", request.namespaceId)}`
|
|
40
|
+
}, unmarshalNamespace);
|
|
41
|
+
this.pageOfListContainers = (request) => this.client.fetch({
|
|
42
|
+
method: "GET",
|
|
43
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers`,
|
|
44
|
+
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])
|
|
45
|
+
}, unmarshalListContainersResponse);
|
|
46
|
+
this.listContainers = (request) => enrichForPagination("containers", this.pageOfListContainers, request);
|
|
47
|
+
this.getContainer = (request) => this.client.fetch({
|
|
48
|
+
method: "GET",
|
|
49
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}`
|
|
50
|
+
}, unmarshalContainer);
|
|
51
|
+
this.waitForContainer = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CONTAINER_TRANSIENT_STATUSES.includes(res.status))), this.getContainer, request, options);
|
|
52
|
+
this.createContainer = (request) => this.client.fetch({
|
|
53
|
+
body: JSON.stringify(marshalCreateContainerRequest(request, this.client.settings)),
|
|
54
|
+
headers: jsonContentHeaders,
|
|
55
|
+
method: "POST",
|
|
56
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers`
|
|
57
|
+
}, unmarshalContainer);
|
|
58
|
+
this.updateContainer = (request) => this.client.fetch({
|
|
59
|
+
body: JSON.stringify(marshalUpdateContainerRequest(request, this.client.settings)),
|
|
60
|
+
headers: jsonContentHeaders,
|
|
61
|
+
method: "PATCH",
|
|
62
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}`
|
|
63
|
+
}, unmarshalContainer);
|
|
64
|
+
this.deleteContainer = (request) => this.client.fetch({
|
|
65
|
+
method: "DELETE",
|
|
66
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}`
|
|
67
|
+
}, unmarshalContainer);
|
|
68
|
+
this.deployContainer = (request) => this.client.fetch({
|
|
69
|
+
body: "{}",
|
|
70
|
+
headers: jsonContentHeaders,
|
|
71
|
+
method: "POST",
|
|
72
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam("containerId", request.containerId)}/deploy`
|
|
73
|
+
}, unmarshalContainer);
|
|
74
|
+
this.pageOfListCrons = (request) => this.client.fetch({
|
|
75
|
+
method: "GET",
|
|
76
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons`,
|
|
77
|
+
urlParams: urlParams(["container_id", request.containerId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
78
|
+
}, unmarshalListCronsResponse);
|
|
79
|
+
this.listCrons = (request) => enrichForPagination("crons", this.pageOfListCrons, request);
|
|
80
|
+
this.getCron = (request) => this.client.fetch({
|
|
81
|
+
method: "GET",
|
|
82
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam("cronId", request.cronId)}`
|
|
83
|
+
}, unmarshalCron);
|
|
84
|
+
this.waitForCron = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
|
|
85
|
+
this.createCron = (request) => this.client.fetch({
|
|
86
|
+
body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
|
|
87
|
+
headers: jsonContentHeaders,
|
|
88
|
+
method: "POST",
|
|
89
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons`
|
|
90
|
+
}, unmarshalCron);
|
|
91
|
+
this.updateCron = (request) => this.client.fetch({
|
|
92
|
+
body: JSON.stringify(marshalUpdateCronRequest(request, this.client.settings)),
|
|
93
|
+
headers: jsonContentHeaders,
|
|
94
|
+
method: "PATCH",
|
|
95
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam("cronId", request.cronId)}`
|
|
96
|
+
}, unmarshalCron);
|
|
97
|
+
this.deleteCron = (request) => this.client.fetch({
|
|
98
|
+
method: "DELETE",
|
|
99
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam("cronId", request.cronId)}`
|
|
100
|
+
}, unmarshalCron);
|
|
101
|
+
this.pageOfListDomains = (request) => this.client.fetch({
|
|
102
|
+
method: "GET",
|
|
103
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
104
|
+
urlParams: urlParams(["container_id", request.containerId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
105
|
+
}, unmarshalListDomainsResponse);
|
|
106
|
+
this.listDomains = (request) => enrichForPagination("domains", this.pageOfListDomains, request);
|
|
107
|
+
this.getDomain = (request) => this.client.fetch({
|
|
108
|
+
method: "GET",
|
|
109
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
110
|
+
}, unmarshalDomain);
|
|
111
|
+
this.waitForDomain = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
112
|
+
this.createDomain = (request) => this.client.fetch({
|
|
113
|
+
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
114
|
+
headers: jsonContentHeaders,
|
|
115
|
+
method: "POST",
|
|
116
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
117
|
+
}, unmarshalDomain);
|
|
118
|
+
this.deleteDomain = (request) => this.client.fetch({
|
|
119
|
+
method: "DELETE",
|
|
120
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
121
|
+
}, unmarshalDomain);
|
|
122
|
+
this.createToken = (request = {}) => this.client.fetch({
|
|
123
|
+
body: JSON.stringify(marshalCreateTokenRequest(request, this.client.settings)),
|
|
124
|
+
headers: jsonContentHeaders,
|
|
125
|
+
method: "POST",
|
|
126
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens`
|
|
127
|
+
}, unmarshalToken);
|
|
128
|
+
this.getToken = (request) => this.client.fetch({
|
|
129
|
+
method: "GET",
|
|
130
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam("tokenId", request.tokenId)}`
|
|
131
|
+
}, unmarshalToken);
|
|
132
|
+
this.waitForToken = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
|
|
133
|
+
this.pageOfListTokens = (request = {}) => this.client.fetch({
|
|
134
|
+
method: "GET",
|
|
135
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens`,
|
|
136
|
+
urlParams: urlParams(["container_id", request.containerId], ["namespace_id", request.namespaceId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
137
|
+
}, unmarshalListTokensResponse);
|
|
138
|
+
this.listTokens = (request = {}) => enrichForPagination("tokens", this.pageOfListTokens, request);
|
|
139
|
+
this.deleteToken = (request) => this.client.fetch({
|
|
140
|
+
method: "DELETE",
|
|
141
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam("tokenId", request.tokenId)}`
|
|
142
|
+
}, unmarshalToken);
|
|
143
|
+
this.createTrigger = (request) => this.client.fetch({
|
|
144
|
+
body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
|
|
145
|
+
headers: jsonContentHeaders,
|
|
146
|
+
method: "POST",
|
|
147
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`
|
|
148
|
+
}, unmarshalTrigger);
|
|
149
|
+
this.getTrigger = (request) => this.client.fetch({
|
|
150
|
+
method: "GET",
|
|
151
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
152
|
+
}, unmarshalTrigger);
|
|
153
|
+
this.waitForTrigger = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
|
|
154
|
+
this.pageOfListTriggers = (request = {}) => this.client.fetch({
|
|
155
|
+
method: "GET",
|
|
156
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`,
|
|
157
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([
|
|
158
|
+
{
|
|
159
|
+
param: "container_id",
|
|
160
|
+
value: request.containerId
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
param: "namespace_id",
|
|
164
|
+
value: request.namespaceId
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
default: this.client.settings.defaultProjectId,
|
|
168
|
+
param: "project_id",
|
|
169
|
+
value: request.projectId
|
|
170
|
+
}
|
|
171
|
+
])))
|
|
172
|
+
}, unmarshalListTriggersResponse);
|
|
173
|
+
this.listTriggers = (request = {}) => enrichForPagination("triggers", this.pageOfListTriggers, request);
|
|
174
|
+
this.updateTrigger = (request) => this.client.fetch({
|
|
175
|
+
body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
|
|
176
|
+
headers: jsonContentHeaders,
|
|
177
|
+
method: "PATCH",
|
|
178
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
179
|
+
}, unmarshalTrigger);
|
|
180
|
+
this.deleteTrigger = (request) => this.client.fetch({
|
|
181
|
+
method: "DELETE",
|
|
182
|
+
path: `/containers/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
|
|
183
|
+
}, unmarshalTrigger);
|
|
184
|
+
}
|
|
185
|
+
static {
|
|
186
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
187
|
+
"fr-par",
|
|
188
|
+
"nl-ams",
|
|
189
|
+
"pl-waw"
|
|
190
|
+
] });
|
|
191
|
+
}
|
|
411
192
|
};
|
|
412
193
|
//#endregion
|
|
413
194
|
export { API };
|