@scaleway/sdk-container 1.7.0 → 2.1.1
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 +96 -0
- package/dist/v1beta1/api.gen.d.ts +3 -2
- package/dist/v1beta1/api.gen.js +34 -55
- package/dist/v1beta1/content.gen.js +4 -1
- package/dist/v1beta1/index.gen.d.ts +1 -1
- package/dist/v1beta1/marshalling.gen.js +26 -36
- package/dist/v1beta1/types.gen.d.ts +2 -2
- package/package.json +6 -9
- package/dist/index.gen.cjs +0 -4
- package/dist/v1beta1/api.gen.cjs +0 -606
- package/dist/v1beta1/content.gen.cjs +0 -34
- package/dist/v1beta1/index.gen.cjs +0 -36
- package/dist/v1beta1/marshalling.gen.cjs +0 -512
- package/dist/v1beta1/validation-rules.gen.cjs +0 -73
package/dist/v1beta1/api.gen.cjs
DELETED
|
@@ -1,606 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const sdkClient = require("@scaleway/sdk-client");
|
|
4
|
-
const content_gen = require("./content.gen.cjs");
|
|
5
|
-
const marshalling_gen = require("./marshalling.gen.cjs");
|
|
6
|
-
const jsonContentHeaders = {
|
|
7
|
-
"Content-Type": "application/json; charset=utf-8"
|
|
8
|
-
};
|
|
9
|
-
class API extends sdkClient.API {
|
|
10
|
-
/**
|
|
11
|
-
* Locality of this API.
|
|
12
|
-
* type ∈ {'zone','region','global','unspecified'}
|
|
13
|
-
*/
|
|
14
|
-
static LOCALITY = sdkClient.toApiLocality({
|
|
15
|
-
regions: ["fr-par", "nl-ams", "pl-waw"]
|
|
16
|
-
});
|
|
17
|
-
pageOfListNamespaces = (request = {}) => this.client.fetch(
|
|
18
|
-
{
|
|
19
|
-
method: "GET",
|
|
20
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces`,
|
|
21
|
-
urlParams: sdkClient.urlParams(
|
|
22
|
-
["name", request.name],
|
|
23
|
-
["order_by", request.orderBy],
|
|
24
|
-
["organization_id", request.organizationId],
|
|
25
|
-
["page", request.page],
|
|
26
|
-
[
|
|
27
|
-
"page_size",
|
|
28
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
29
|
-
],
|
|
30
|
-
["project_id", request.projectId]
|
|
31
|
-
)
|
|
32
|
-
},
|
|
33
|
-
marshalling_gen.unmarshalListNamespacesResponse
|
|
34
|
-
);
|
|
35
|
-
/**
|
|
36
|
-
* List all your namespaces. List all namespaces in a specified region.
|
|
37
|
-
*
|
|
38
|
-
* @param request - The request {@link ListNamespacesRequest}
|
|
39
|
-
* @returns A Promise of ListNamespacesResponse
|
|
40
|
-
*/
|
|
41
|
-
listNamespaces = (request = {}) => sdkClient.enrichForPagination("namespaces", this.pageOfListNamespaces, request);
|
|
42
|
-
/**
|
|
43
|
-
* Get a namespace. Get the namespace associated with the specified ID.
|
|
44
|
-
*
|
|
45
|
-
* @param request - The request {@link GetNamespaceRequest}
|
|
46
|
-
* @returns A Promise of Namespace
|
|
47
|
-
*/
|
|
48
|
-
getNamespace = (request) => this.client.fetch(
|
|
49
|
-
{
|
|
50
|
-
method: "GET",
|
|
51
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${sdkClient.validatePathParam("namespaceId", request.namespaceId)}`
|
|
52
|
-
},
|
|
53
|
-
marshalling_gen.unmarshalNamespace
|
|
54
|
-
);
|
|
55
|
-
/**
|
|
56
|
-
* Waits for {@link Namespace} to be in a final state.
|
|
57
|
-
*
|
|
58
|
-
* @param request - The request {@link GetNamespaceRequest}
|
|
59
|
-
* @param options - The waiting options
|
|
60
|
-
* @returns A Promise of Namespace
|
|
61
|
-
*/
|
|
62
|
-
waitForNamespace = (request, options) => sdkClient.waitForResource(
|
|
63
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
64
|
-
!content_gen.NAMESPACE_TRANSIENT_STATUSES.includes(res.status)
|
|
65
|
-
)),
|
|
66
|
-
this.getNamespace,
|
|
67
|
-
request,
|
|
68
|
-
options
|
|
69
|
-
);
|
|
70
|
-
/**
|
|
71
|
-
* Create a new namespace. Create a new namespace in a specified region.
|
|
72
|
-
*
|
|
73
|
-
* @param request - The request {@link CreateNamespaceRequest}
|
|
74
|
-
* @returns A Promise of Namespace
|
|
75
|
-
*/
|
|
76
|
-
createNamespace = (request = {}) => this.client.fetch(
|
|
77
|
-
{
|
|
78
|
-
body: JSON.stringify(
|
|
79
|
-
marshalling_gen.marshalCreateNamespaceRequest(request, this.client.settings)
|
|
80
|
-
),
|
|
81
|
-
headers: jsonContentHeaders,
|
|
82
|
-
method: "POST",
|
|
83
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces`
|
|
84
|
-
},
|
|
85
|
-
marshalling_gen.unmarshalNamespace
|
|
86
|
-
);
|
|
87
|
-
/**
|
|
88
|
-
* Update an existing namespace. Update the space associated with the specified ID.
|
|
89
|
-
*
|
|
90
|
-
* @param request - The request {@link UpdateNamespaceRequest}
|
|
91
|
-
* @returns A Promise of Namespace
|
|
92
|
-
*/
|
|
93
|
-
updateNamespace = (request) => this.client.fetch(
|
|
94
|
-
{
|
|
95
|
-
body: JSON.stringify(
|
|
96
|
-
marshalling_gen.marshalUpdateNamespaceRequest(request, this.client.settings)
|
|
97
|
-
),
|
|
98
|
-
headers: jsonContentHeaders,
|
|
99
|
-
method: "PATCH",
|
|
100
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${sdkClient.validatePathParam("namespaceId", request.namespaceId)}`
|
|
101
|
-
},
|
|
102
|
-
marshalling_gen.unmarshalNamespace
|
|
103
|
-
);
|
|
104
|
-
/**
|
|
105
|
-
* Delete an existing namespace. Delete the namespace associated with the specified ID.
|
|
106
|
-
*
|
|
107
|
-
* @param request - The request {@link DeleteNamespaceRequest}
|
|
108
|
-
* @returns A Promise of Namespace
|
|
109
|
-
*/
|
|
110
|
-
deleteNamespace = (request) => this.client.fetch(
|
|
111
|
-
{
|
|
112
|
-
method: "DELETE",
|
|
113
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${sdkClient.validatePathParam("namespaceId", request.namespaceId)}`
|
|
114
|
-
},
|
|
115
|
-
marshalling_gen.unmarshalNamespace
|
|
116
|
-
);
|
|
117
|
-
pageOfListContainers = (request) => this.client.fetch(
|
|
118
|
-
{
|
|
119
|
-
method: "GET",
|
|
120
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers`,
|
|
121
|
-
urlParams: sdkClient.urlParams(
|
|
122
|
-
["name", request.name],
|
|
123
|
-
["namespace_id", request.namespaceId],
|
|
124
|
-
["order_by", request.orderBy],
|
|
125
|
-
["organization_id", request.organizationId],
|
|
126
|
-
["page", request.page],
|
|
127
|
-
[
|
|
128
|
-
"page_size",
|
|
129
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
130
|
-
],
|
|
131
|
-
["project_id", request.projectId]
|
|
132
|
-
)
|
|
133
|
-
},
|
|
134
|
-
marshalling_gen.unmarshalListContainersResponse
|
|
135
|
-
);
|
|
136
|
-
/**
|
|
137
|
-
* List all your containers. List all containers for a specified region.
|
|
138
|
-
*
|
|
139
|
-
* @param request - The request {@link ListContainersRequest}
|
|
140
|
-
* @returns A Promise of ListContainersResponse
|
|
141
|
-
*/
|
|
142
|
-
listContainers = (request) => sdkClient.enrichForPagination("containers", this.pageOfListContainers, request);
|
|
143
|
-
/**
|
|
144
|
-
* Get a container. Get the container associated with the specified ID.
|
|
145
|
-
*
|
|
146
|
-
* @param request - The request {@link GetContainerRequest}
|
|
147
|
-
* @returns A Promise of Container
|
|
148
|
-
*/
|
|
149
|
-
getContainer = (request) => this.client.fetch(
|
|
150
|
-
{
|
|
151
|
-
method: "GET",
|
|
152
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${sdkClient.validatePathParam("containerId", request.containerId)}`
|
|
153
|
-
},
|
|
154
|
-
marshalling_gen.unmarshalContainer
|
|
155
|
-
);
|
|
156
|
-
/**
|
|
157
|
-
* Waits for {@link Container} to be in a final state.
|
|
158
|
-
*
|
|
159
|
-
* @param request - The request {@link GetContainerRequest}
|
|
160
|
-
* @param options - The waiting options
|
|
161
|
-
* @returns A Promise of Container
|
|
162
|
-
*/
|
|
163
|
-
waitForContainer = (request, options) => sdkClient.waitForResource(
|
|
164
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
165
|
-
!content_gen.CONTAINER_TRANSIENT_STATUSES.includes(res.status)
|
|
166
|
-
)),
|
|
167
|
-
this.getContainer,
|
|
168
|
-
request,
|
|
169
|
-
options
|
|
170
|
-
);
|
|
171
|
-
/**
|
|
172
|
-
* Create a new container. Create a new container in the specified region.
|
|
173
|
-
*
|
|
174
|
-
* @param request - The request {@link CreateContainerRequest}
|
|
175
|
-
* @returns A Promise of Container
|
|
176
|
-
*/
|
|
177
|
-
createContainer = (request) => this.client.fetch(
|
|
178
|
-
{
|
|
179
|
-
body: JSON.stringify(
|
|
180
|
-
marshalling_gen.marshalCreateContainerRequest(request, this.client.settings)
|
|
181
|
-
),
|
|
182
|
-
headers: jsonContentHeaders,
|
|
183
|
-
method: "POST",
|
|
184
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers`
|
|
185
|
-
},
|
|
186
|
-
marshalling_gen.unmarshalContainer
|
|
187
|
-
);
|
|
188
|
-
/**
|
|
189
|
-
* Update an existing container. Update the container associated with the specified ID.
|
|
190
|
-
|
|
191
|
-
When updating a container, the container is automatically redeployed to apply the changes.
|
|
192
|
-
This behavior can be changed by setting the `redeploy` field to `false` in the request.
|
|
193
|
-
*
|
|
194
|
-
* @param request - The request {@link UpdateContainerRequest}
|
|
195
|
-
* @returns A Promise of Container
|
|
196
|
-
*/
|
|
197
|
-
updateContainer = (request) => this.client.fetch(
|
|
198
|
-
{
|
|
199
|
-
body: JSON.stringify(
|
|
200
|
-
marshalling_gen.marshalUpdateContainerRequest(request, this.client.settings)
|
|
201
|
-
),
|
|
202
|
-
headers: jsonContentHeaders,
|
|
203
|
-
method: "PATCH",
|
|
204
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${sdkClient.validatePathParam("containerId", request.containerId)}`
|
|
205
|
-
},
|
|
206
|
-
marshalling_gen.unmarshalContainer
|
|
207
|
-
);
|
|
208
|
-
/**
|
|
209
|
-
* Delete a container. Delete the container associated with the specified ID.
|
|
210
|
-
*
|
|
211
|
-
* @param request - The request {@link DeleteContainerRequest}
|
|
212
|
-
* @returns A Promise of Container
|
|
213
|
-
*/
|
|
214
|
-
deleteContainer = (request) => this.client.fetch(
|
|
215
|
-
{
|
|
216
|
-
method: "DELETE",
|
|
217
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${sdkClient.validatePathParam("containerId", request.containerId)}`
|
|
218
|
-
},
|
|
219
|
-
marshalling_gen.unmarshalContainer
|
|
220
|
-
);
|
|
221
|
-
/**
|
|
222
|
-
* Deploy a container. Deploy a container associated with the specified ID.
|
|
223
|
-
*
|
|
224
|
-
* @param request - The request {@link DeployContainerRequest}
|
|
225
|
-
* @returns A Promise of Container
|
|
226
|
-
*/
|
|
227
|
-
deployContainer = (request) => this.client.fetch(
|
|
228
|
-
{
|
|
229
|
-
body: "{}",
|
|
230
|
-
headers: jsonContentHeaders,
|
|
231
|
-
method: "POST",
|
|
232
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/containers/${sdkClient.validatePathParam("containerId", request.containerId)}/deploy`
|
|
233
|
-
},
|
|
234
|
-
marshalling_gen.unmarshalContainer
|
|
235
|
-
);
|
|
236
|
-
pageOfListCrons = (request) => this.client.fetch(
|
|
237
|
-
{
|
|
238
|
-
method: "GET",
|
|
239
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons`,
|
|
240
|
-
urlParams: sdkClient.urlParams(
|
|
241
|
-
["container_id", request.containerId],
|
|
242
|
-
["order_by", request.orderBy],
|
|
243
|
-
["page", request.page],
|
|
244
|
-
[
|
|
245
|
-
"page_size",
|
|
246
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
247
|
-
]
|
|
248
|
-
)
|
|
249
|
-
},
|
|
250
|
-
marshalling_gen.unmarshalListCronsResponse
|
|
251
|
-
);
|
|
252
|
-
/**
|
|
253
|
-
* List all your crons.
|
|
254
|
-
*
|
|
255
|
-
* @param request - The request {@link ListCronsRequest}
|
|
256
|
-
* @returns A Promise of ListCronsResponse
|
|
257
|
-
*/
|
|
258
|
-
listCrons = (request) => sdkClient.enrichForPagination("crons", this.pageOfListCrons, request);
|
|
259
|
-
/**
|
|
260
|
-
* Get a cron. Get the cron associated with the specified ID.
|
|
261
|
-
*
|
|
262
|
-
* @param request - The request {@link GetCronRequest}
|
|
263
|
-
* @returns A Promise of Cron
|
|
264
|
-
*/
|
|
265
|
-
getCron = (request) => this.client.fetch(
|
|
266
|
-
{
|
|
267
|
-
method: "GET",
|
|
268
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons/${sdkClient.validatePathParam("cronId", request.cronId)}`
|
|
269
|
-
},
|
|
270
|
-
marshalling_gen.unmarshalCron
|
|
271
|
-
);
|
|
272
|
-
/**
|
|
273
|
-
* Waits for {@link Cron} to be in a final state.
|
|
274
|
-
*
|
|
275
|
-
* @param request - The request {@link GetCronRequest}
|
|
276
|
-
* @param options - The waiting options
|
|
277
|
-
* @returns A Promise of Cron
|
|
278
|
-
*/
|
|
279
|
-
waitForCron = (request, options) => sdkClient.waitForResource(
|
|
280
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
281
|
-
!content_gen.CRON_TRANSIENT_STATUSES.includes(res.status)
|
|
282
|
-
)),
|
|
283
|
-
this.getCron,
|
|
284
|
-
request,
|
|
285
|
-
options
|
|
286
|
-
);
|
|
287
|
-
/**
|
|
288
|
-
* Create a new cron.
|
|
289
|
-
*
|
|
290
|
-
* @param request - The request {@link CreateCronRequest}
|
|
291
|
-
* @returns A Promise of Cron
|
|
292
|
-
*/
|
|
293
|
-
createCron = (request) => this.client.fetch(
|
|
294
|
-
{
|
|
295
|
-
body: JSON.stringify(
|
|
296
|
-
marshalling_gen.marshalCreateCronRequest(request, this.client.settings)
|
|
297
|
-
),
|
|
298
|
-
headers: jsonContentHeaders,
|
|
299
|
-
method: "POST",
|
|
300
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons`
|
|
301
|
-
},
|
|
302
|
-
marshalling_gen.unmarshalCron
|
|
303
|
-
);
|
|
304
|
-
/**
|
|
305
|
-
* Update an existing cron. Update the cron associated with the specified ID.
|
|
306
|
-
*
|
|
307
|
-
* @param request - The request {@link UpdateCronRequest}
|
|
308
|
-
* @returns A Promise of Cron
|
|
309
|
-
*/
|
|
310
|
-
updateCron = (request) => this.client.fetch(
|
|
311
|
-
{
|
|
312
|
-
body: JSON.stringify(
|
|
313
|
-
marshalling_gen.marshalUpdateCronRequest(request, this.client.settings)
|
|
314
|
-
),
|
|
315
|
-
headers: jsonContentHeaders,
|
|
316
|
-
method: "PATCH",
|
|
317
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons/${sdkClient.validatePathParam("cronId", request.cronId)}`
|
|
318
|
-
},
|
|
319
|
-
marshalling_gen.unmarshalCron
|
|
320
|
-
);
|
|
321
|
-
/**
|
|
322
|
-
* Delete an existing cron. Delete the cron associated with the specified ID.
|
|
323
|
-
*
|
|
324
|
-
* @param request - The request {@link DeleteCronRequest}
|
|
325
|
-
* @returns A Promise of Cron
|
|
326
|
-
*/
|
|
327
|
-
deleteCron = (request) => this.client.fetch(
|
|
328
|
-
{
|
|
329
|
-
method: "DELETE",
|
|
330
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/crons/${sdkClient.validatePathParam("cronId", request.cronId)}`
|
|
331
|
-
},
|
|
332
|
-
marshalling_gen.unmarshalCron
|
|
333
|
-
);
|
|
334
|
-
pageOfListDomains = (request) => this.client.fetch(
|
|
335
|
-
{
|
|
336
|
-
method: "GET",
|
|
337
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
338
|
-
urlParams: sdkClient.urlParams(
|
|
339
|
-
["container_id", request.containerId],
|
|
340
|
-
["order_by", request.orderBy],
|
|
341
|
-
["page", request.page],
|
|
342
|
-
[
|
|
343
|
-
"page_size",
|
|
344
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
345
|
-
]
|
|
346
|
-
)
|
|
347
|
-
},
|
|
348
|
-
marshalling_gen.unmarshalListDomainsResponse
|
|
349
|
-
);
|
|
350
|
-
/**
|
|
351
|
-
* List all custom domains. List all custom domains in a specified region.
|
|
352
|
-
*
|
|
353
|
-
* @param request - The request {@link ListDomainsRequest}
|
|
354
|
-
* @returns A Promise of ListDomainsResponse
|
|
355
|
-
*/
|
|
356
|
-
listDomains = (request) => sdkClient.enrichForPagination("domains", this.pageOfListDomains, request);
|
|
357
|
-
/**
|
|
358
|
-
* Get a custom domain. Get a custom domain for the container with the specified ID.
|
|
359
|
-
*
|
|
360
|
-
* @param request - The request {@link GetDomainRequest}
|
|
361
|
-
* @returns A Promise of Domain
|
|
362
|
-
*/
|
|
363
|
-
getDomain = (request) => this.client.fetch(
|
|
364
|
-
{
|
|
365
|
-
method: "GET",
|
|
366
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${sdkClient.validatePathParam("domainId", request.domainId)}`
|
|
367
|
-
},
|
|
368
|
-
marshalling_gen.unmarshalDomain
|
|
369
|
-
);
|
|
370
|
-
/**
|
|
371
|
-
* Waits for {@link Domain} to be in a final state.
|
|
372
|
-
*
|
|
373
|
-
* @param request - The request {@link GetDomainRequest}
|
|
374
|
-
* @param options - The waiting options
|
|
375
|
-
* @returns A Promise of Domain
|
|
376
|
-
*/
|
|
377
|
-
waitForDomain = (request, options) => sdkClient.waitForResource(
|
|
378
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
379
|
-
!content_gen.DOMAIN_TRANSIENT_STATUSES.includes(res.status)
|
|
380
|
-
)),
|
|
381
|
-
this.getDomain,
|
|
382
|
-
request,
|
|
383
|
-
options
|
|
384
|
-
);
|
|
385
|
-
/**
|
|
386
|
-
* Create a custom domain. Create a custom domain for the container with the specified ID.
|
|
387
|
-
*
|
|
388
|
-
* @param request - The request {@link CreateDomainRequest}
|
|
389
|
-
* @returns A Promise of Domain
|
|
390
|
-
*/
|
|
391
|
-
createDomain = (request) => this.client.fetch(
|
|
392
|
-
{
|
|
393
|
-
body: JSON.stringify(
|
|
394
|
-
marshalling_gen.marshalCreateDomainRequest(request, this.client.settings)
|
|
395
|
-
),
|
|
396
|
-
headers: jsonContentHeaders,
|
|
397
|
-
method: "POST",
|
|
398
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
399
|
-
},
|
|
400
|
-
marshalling_gen.unmarshalDomain
|
|
401
|
-
);
|
|
402
|
-
/**
|
|
403
|
-
* Delete a custom domain. Delete the custom domain with the specific ID.
|
|
404
|
-
*
|
|
405
|
-
* @param request - The request {@link DeleteDomainRequest}
|
|
406
|
-
* @returns A Promise of Domain
|
|
407
|
-
*/
|
|
408
|
-
deleteDomain = (request) => this.client.fetch(
|
|
409
|
-
{
|
|
410
|
-
method: "DELETE",
|
|
411
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${sdkClient.validatePathParam("domainId", request.domainId)}`
|
|
412
|
-
},
|
|
413
|
-
marshalling_gen.unmarshalDomain
|
|
414
|
-
);
|
|
415
|
-
/**
|
|
416
|
-
* Create a new revocable token.
|
|
417
|
-
*
|
|
418
|
-
* @param request - The request {@link CreateTokenRequest}
|
|
419
|
-
* @returns A Promise of Token
|
|
420
|
-
*/
|
|
421
|
-
createToken = (request = {}) => this.client.fetch(
|
|
422
|
-
{
|
|
423
|
-
body: JSON.stringify(
|
|
424
|
-
marshalling_gen.marshalCreateTokenRequest(request, this.client.settings)
|
|
425
|
-
),
|
|
426
|
-
headers: jsonContentHeaders,
|
|
427
|
-
method: "POST",
|
|
428
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens`
|
|
429
|
-
},
|
|
430
|
-
marshalling_gen.unmarshalToken
|
|
431
|
-
);
|
|
432
|
-
/**
|
|
433
|
-
* Get a token. Get a token with a specified ID.
|
|
434
|
-
*
|
|
435
|
-
* @param request - The request {@link GetTokenRequest}
|
|
436
|
-
* @returns A Promise of Token
|
|
437
|
-
*/
|
|
438
|
-
getToken = (request) => this.client.fetch(
|
|
439
|
-
{
|
|
440
|
-
method: "GET",
|
|
441
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens/${sdkClient.validatePathParam("tokenId", request.tokenId)}`
|
|
442
|
-
},
|
|
443
|
-
marshalling_gen.unmarshalToken
|
|
444
|
-
);
|
|
445
|
-
/**
|
|
446
|
-
* Waits for {@link Token} to be in a final state.
|
|
447
|
-
*
|
|
448
|
-
* @param request - The request {@link GetTokenRequest}
|
|
449
|
-
* @param options - The waiting options
|
|
450
|
-
* @returns A Promise of Token
|
|
451
|
-
*/
|
|
452
|
-
waitForToken = (request, options) => sdkClient.waitForResource(
|
|
453
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
454
|
-
!content_gen.TOKEN_TRANSIENT_STATUSES.includes(res.status)
|
|
455
|
-
)),
|
|
456
|
-
this.getToken,
|
|
457
|
-
request,
|
|
458
|
-
options
|
|
459
|
-
);
|
|
460
|
-
pageOfListTokens = (request = {}) => this.client.fetch(
|
|
461
|
-
{
|
|
462
|
-
method: "GET",
|
|
463
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens`,
|
|
464
|
-
urlParams: sdkClient.urlParams(
|
|
465
|
-
["container_id", request.containerId],
|
|
466
|
-
["namespace_id", request.namespaceId],
|
|
467
|
-
["order_by", request.orderBy],
|
|
468
|
-
["page", request.page],
|
|
469
|
-
[
|
|
470
|
-
"page_size",
|
|
471
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
472
|
-
]
|
|
473
|
-
)
|
|
474
|
-
},
|
|
475
|
-
marshalling_gen.unmarshalListTokensResponse
|
|
476
|
-
);
|
|
477
|
-
/**
|
|
478
|
-
* List all tokens. List all tokens belonging to a specified Organization or Project.
|
|
479
|
-
*
|
|
480
|
-
* @param request - The request {@link ListTokensRequest}
|
|
481
|
-
* @returns A Promise of ListTokensResponse
|
|
482
|
-
*/
|
|
483
|
-
listTokens = (request = {}) => sdkClient.enrichForPagination("tokens", this.pageOfListTokens, request);
|
|
484
|
-
/**
|
|
485
|
-
* Delete a token. Delete a token with a specified ID.
|
|
486
|
-
*
|
|
487
|
-
* @param request - The request {@link DeleteTokenRequest}
|
|
488
|
-
* @returns A Promise of Token
|
|
489
|
-
*/
|
|
490
|
-
deleteToken = (request) => this.client.fetch(
|
|
491
|
-
{
|
|
492
|
-
method: "DELETE",
|
|
493
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tokens/${sdkClient.validatePathParam("tokenId", request.tokenId)}`
|
|
494
|
-
},
|
|
495
|
-
marshalling_gen.unmarshalToken
|
|
496
|
-
);
|
|
497
|
-
/**
|
|
498
|
-
* Create a trigger. Create a new trigger for a specified container.
|
|
499
|
-
*
|
|
500
|
-
* @param request - The request {@link CreateTriggerRequest}
|
|
501
|
-
* @returns A Promise of Trigger
|
|
502
|
-
*/
|
|
503
|
-
createTrigger = (request) => this.client.fetch(
|
|
504
|
-
{
|
|
505
|
-
body: JSON.stringify(
|
|
506
|
-
marshalling_gen.marshalCreateTriggerRequest(request, this.client.settings)
|
|
507
|
-
),
|
|
508
|
-
headers: jsonContentHeaders,
|
|
509
|
-
method: "POST",
|
|
510
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`
|
|
511
|
-
},
|
|
512
|
-
marshalling_gen.unmarshalTrigger
|
|
513
|
-
);
|
|
514
|
-
/**
|
|
515
|
-
* Get a trigger. Get a trigger with a specified ID.
|
|
516
|
-
*
|
|
517
|
-
* @param request - The request {@link GetTriggerRequest}
|
|
518
|
-
* @returns A Promise of Trigger
|
|
519
|
-
*/
|
|
520
|
-
getTrigger = (request) => this.client.fetch(
|
|
521
|
-
{
|
|
522
|
-
method: "GET",
|
|
523
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${sdkClient.validatePathParam("triggerId", request.triggerId)}`
|
|
524
|
-
},
|
|
525
|
-
marshalling_gen.unmarshalTrigger
|
|
526
|
-
);
|
|
527
|
-
/**
|
|
528
|
-
* Waits for {@link Trigger} to be in a final state.
|
|
529
|
-
*
|
|
530
|
-
* @param request - The request {@link GetTriggerRequest}
|
|
531
|
-
* @param options - The waiting options
|
|
532
|
-
* @returns A Promise of Trigger
|
|
533
|
-
*/
|
|
534
|
-
waitForTrigger = (request, options) => sdkClient.waitForResource(
|
|
535
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
536
|
-
!content_gen.TRIGGER_TRANSIENT_STATUSES.includes(res.status)
|
|
537
|
-
)),
|
|
538
|
-
this.getTrigger,
|
|
539
|
-
request,
|
|
540
|
-
options
|
|
541
|
-
);
|
|
542
|
-
pageOfListTriggers = (request = {}) => this.client.fetch(
|
|
543
|
-
{
|
|
544
|
-
method: "GET",
|
|
545
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers`,
|
|
546
|
-
urlParams: sdkClient.urlParams(
|
|
547
|
-
["order_by", request.orderBy],
|
|
548
|
-
["page", request.page],
|
|
549
|
-
[
|
|
550
|
-
"page_size",
|
|
551
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
552
|
-
],
|
|
553
|
-
...Object.entries(
|
|
554
|
-
sdkClient.resolveOneOf([
|
|
555
|
-
{ param: "container_id", value: request.containerId },
|
|
556
|
-
{ param: "namespace_id", value: request.namespaceId },
|
|
557
|
-
{
|
|
558
|
-
default: this.client.settings.defaultProjectId,
|
|
559
|
-
param: "project_id",
|
|
560
|
-
value: request.projectId
|
|
561
|
-
}
|
|
562
|
-
])
|
|
563
|
-
)
|
|
564
|
-
)
|
|
565
|
-
},
|
|
566
|
-
marshalling_gen.unmarshalListTriggersResponse
|
|
567
|
-
);
|
|
568
|
-
/**
|
|
569
|
-
* List all triggers. List all triggers belonging to a specified Organization or Project.
|
|
570
|
-
*
|
|
571
|
-
* @param request - The request {@link ListTriggersRequest}
|
|
572
|
-
* @returns A Promise of ListTriggersResponse
|
|
573
|
-
*/
|
|
574
|
-
listTriggers = (request = {}) => sdkClient.enrichForPagination("triggers", this.pageOfListTriggers, request);
|
|
575
|
-
/**
|
|
576
|
-
* Update a trigger. Update a trigger with a specified ID.
|
|
577
|
-
*
|
|
578
|
-
* @param request - The request {@link UpdateTriggerRequest}
|
|
579
|
-
* @returns A Promise of Trigger
|
|
580
|
-
*/
|
|
581
|
-
updateTrigger = (request) => this.client.fetch(
|
|
582
|
-
{
|
|
583
|
-
body: JSON.stringify(
|
|
584
|
-
marshalling_gen.marshalUpdateTriggerRequest(request, this.client.settings)
|
|
585
|
-
),
|
|
586
|
-
headers: jsonContentHeaders,
|
|
587
|
-
method: "PATCH",
|
|
588
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${sdkClient.validatePathParam("triggerId", request.triggerId)}`
|
|
589
|
-
},
|
|
590
|
-
marshalling_gen.unmarshalTrigger
|
|
591
|
-
);
|
|
592
|
-
/**
|
|
593
|
-
* Delete a trigger. Delete a trigger with a specified ID.
|
|
594
|
-
*
|
|
595
|
-
* @param request - The request {@link DeleteTriggerRequest}
|
|
596
|
-
* @returns A Promise of Trigger
|
|
597
|
-
*/
|
|
598
|
-
deleteTrigger = (request) => this.client.fetch(
|
|
599
|
-
{
|
|
600
|
-
method: "DELETE",
|
|
601
|
-
path: `/containers/v1beta1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${sdkClient.validatePathParam("triggerId", request.triggerId)}`
|
|
602
|
-
},
|
|
603
|
-
marshalling_gen.unmarshalTrigger
|
|
604
|
-
);
|
|
605
|
-
}
|
|
606
|
-
exports.API = API;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const CONTAINER_TRANSIENT_STATUSES = [
|
|
4
|
-
"deleting",
|
|
5
|
-
"creating",
|
|
6
|
-
"pending"
|
|
7
|
-
];
|
|
8
|
-
const CRON_TRANSIENT_STATUSES = [
|
|
9
|
-
"deleting",
|
|
10
|
-
"creating",
|
|
11
|
-
"pending"
|
|
12
|
-
];
|
|
13
|
-
const DOMAIN_TRANSIENT_STATUSES = [
|
|
14
|
-
"deleting",
|
|
15
|
-
"creating",
|
|
16
|
-
"pending"
|
|
17
|
-
];
|
|
18
|
-
const NAMESPACE_TRANSIENT_STATUSES = [
|
|
19
|
-
"deleting",
|
|
20
|
-
"creating",
|
|
21
|
-
"pending"
|
|
22
|
-
];
|
|
23
|
-
const TOKEN_TRANSIENT_STATUSES = ["deleting", "creating"];
|
|
24
|
-
const TRIGGER_TRANSIENT_STATUSES = [
|
|
25
|
-
"deleting",
|
|
26
|
-
"creating",
|
|
27
|
-
"pending"
|
|
28
|
-
];
|
|
29
|
-
exports.CONTAINER_TRANSIENT_STATUSES = CONTAINER_TRANSIENT_STATUSES;
|
|
30
|
-
exports.CRON_TRANSIENT_STATUSES = CRON_TRANSIENT_STATUSES;
|
|
31
|
-
exports.DOMAIN_TRANSIENT_STATUSES = DOMAIN_TRANSIENT_STATUSES;
|
|
32
|
-
exports.NAMESPACE_TRANSIENT_STATUSES = NAMESPACE_TRANSIENT_STATUSES;
|
|
33
|
-
exports.TOKEN_TRANSIENT_STATUSES = TOKEN_TRANSIENT_STATUSES;
|
|
34
|
-
exports.TRIGGER_TRANSIENT_STATUSES = TRIGGER_TRANSIENT_STATUSES;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const api_gen = require("./api.gen.cjs");
|
|
4
|
-
const content_gen = require("./content.gen.cjs");
|
|
5
|
-
const marshalling_gen = require("./marshalling.gen.cjs");
|
|
6
|
-
const validationRules_gen = require("./validation-rules.gen.cjs");
|
|
7
|
-
exports.API = api_gen.API;
|
|
8
|
-
exports.CONTAINER_TRANSIENT_STATUSES = content_gen.CONTAINER_TRANSIENT_STATUSES;
|
|
9
|
-
exports.CRON_TRANSIENT_STATUSES = content_gen.CRON_TRANSIENT_STATUSES;
|
|
10
|
-
exports.DOMAIN_TRANSIENT_STATUSES = content_gen.DOMAIN_TRANSIENT_STATUSES;
|
|
11
|
-
exports.NAMESPACE_TRANSIENT_STATUSES = content_gen.NAMESPACE_TRANSIENT_STATUSES;
|
|
12
|
-
exports.TOKEN_TRANSIENT_STATUSES = content_gen.TOKEN_TRANSIENT_STATUSES;
|
|
13
|
-
exports.TRIGGER_TRANSIENT_STATUSES = content_gen.TRIGGER_TRANSIENT_STATUSES;
|
|
14
|
-
exports.marshalCreateContainerRequest = marshalling_gen.marshalCreateContainerRequest;
|
|
15
|
-
exports.marshalCreateCronRequest = marshalling_gen.marshalCreateCronRequest;
|
|
16
|
-
exports.marshalCreateDomainRequest = marshalling_gen.marshalCreateDomainRequest;
|
|
17
|
-
exports.marshalCreateNamespaceRequest = marshalling_gen.marshalCreateNamespaceRequest;
|
|
18
|
-
exports.marshalCreateTokenRequest = marshalling_gen.marshalCreateTokenRequest;
|
|
19
|
-
exports.marshalCreateTriggerRequest = marshalling_gen.marshalCreateTriggerRequest;
|
|
20
|
-
exports.marshalUpdateContainerRequest = marshalling_gen.marshalUpdateContainerRequest;
|
|
21
|
-
exports.marshalUpdateCronRequest = marshalling_gen.marshalUpdateCronRequest;
|
|
22
|
-
exports.marshalUpdateNamespaceRequest = marshalling_gen.marshalUpdateNamespaceRequest;
|
|
23
|
-
exports.marshalUpdateTriggerRequest = marshalling_gen.marshalUpdateTriggerRequest;
|
|
24
|
-
exports.unmarshalContainer = marshalling_gen.unmarshalContainer;
|
|
25
|
-
exports.unmarshalCron = marshalling_gen.unmarshalCron;
|
|
26
|
-
exports.unmarshalDomain = marshalling_gen.unmarshalDomain;
|
|
27
|
-
exports.unmarshalListContainersResponse = marshalling_gen.unmarshalListContainersResponse;
|
|
28
|
-
exports.unmarshalListCronsResponse = marshalling_gen.unmarshalListCronsResponse;
|
|
29
|
-
exports.unmarshalListDomainsResponse = marshalling_gen.unmarshalListDomainsResponse;
|
|
30
|
-
exports.unmarshalListNamespacesResponse = marshalling_gen.unmarshalListNamespacesResponse;
|
|
31
|
-
exports.unmarshalListTokensResponse = marshalling_gen.unmarshalListTokensResponse;
|
|
32
|
-
exports.unmarshalListTriggersResponse = marshalling_gen.unmarshalListTriggersResponse;
|
|
33
|
-
exports.unmarshalNamespace = marshalling_gen.unmarshalNamespace;
|
|
34
|
-
exports.unmarshalToken = marshalling_gen.unmarshalToken;
|
|
35
|
-
exports.unmarshalTrigger = marshalling_gen.unmarshalTrigger;
|
|
36
|
-
exports.ValidationRules = validationRules_gen;
|