@scaleway/sdk 1.13.0 → 1.15.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.
Files changed (50) hide show
  1. package/dist/api/account/v2/api.gen.js +77 -60
  2. package/dist/api/applesilicon/v1alpha1/api.gen.js +175 -173
  3. package/dist/api/baremetal/v1/api.gen.js +434 -378
  4. package/dist/api/baremetal/v1/api.utils.js +19 -22
  5. package/dist/api/billing/v2alpha1/api.gen.js +21 -17
  6. package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
  7. package/dist/api/container/v1beta1/api.gen.js +384 -337
  8. package/dist/api/domain/v2beta1/api.gen.js +754 -668
  9. package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
  10. package/dist/api/function/v1beta1/api.gen.js +467 -407
  11. package/dist/api/iam/v1alpha1/api.gen.js +641 -557
  12. package/dist/api/instance/v1/api.gen.js +802 -677
  13. package/dist/api/instance/v1/api.utils.js +337 -325
  14. package/dist/api/instance/v1/marshalling.gen.js +2 -1
  15. package/dist/api/iot/v1/api.gen.js +508 -452
  16. package/dist/api/ipfs/index.js +2 -0
  17. package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
  18. package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
  19. package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
  20. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
  21. package/dist/api/k8s/v1/api.gen.js +403 -342
  22. package/dist/api/k8s/v1/api.utils.js +7 -10
  23. package/dist/api/k8s/v1/marshalling.gen.js +19 -1
  24. package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
  25. package/dist/api/lb/v1/api.gen.js +1501 -1363
  26. package/dist/api/lb/v1/api.utils.js +71 -75
  27. package/dist/api/lb/v1/marshalling.gen.js +6 -0
  28. package/dist/api/marketplace/v1/api.gen.js +35 -32
  29. package/dist/api/marketplace/v2/api.gen.js +117 -102
  30. package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
  31. package/dist/api/rdb/v1/api.gen.js +897 -819
  32. package/dist/api/redis/v1/api.gen.js +358 -333
  33. package/dist/api/registry/v1/api.gen.js +211 -189
  34. package/dist/api/secret/v1alpha1/api.gen.js +265 -245
  35. package/dist/api/secret/v1alpha1/marshalling.gen.js +1 -0
  36. package/dist/api/tem/v1alpha1/api.gen.js +183 -156
  37. package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
  38. package/dist/api/test/v1/api.gen.js +116 -104
  39. package/dist/api/vpc/v1/api.gen.js +74 -65
  40. package/dist/api/vpc/v2/api.gen.js +200 -178
  41. package/dist/api/vpc/v2/marshalling.gen.js +2 -0
  42. package/dist/api/vpcgw/v1/api.gen.js +575 -501
  43. package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
  44. package/dist/index.cjs +738 -343
  45. package/dist/index.d.ts +2067 -1592
  46. package/dist/index.js +28 -26
  47. package/dist/internal/logger/console-logger.js +4 -5
  48. package/dist/scw/constants.js +1 -1
  49. package/dist/scw/errors/scw-error.js +0 -1
  50. package/package.json +2 -2
@@ -13,11 +13,11 @@ const jsonContentHeaders = {
13
13
 
14
14
  /** Serverless Containers API. */
15
15
  class API extends API$1 {
16
- constructor() {
17
- var _this;
18
- super(...arguments);
19
- _this = this;
20
- this.pageOfListNamespaces = function (request) {
16
+ /** Lists the available regions of the API. */
17
+ static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
18
+ pageOfListNamespaces = (() => {
19
+ var _this = this;
20
+ return function (request) {
21
21
  if (request === void 0) {
22
22
  request = {};
23
23
  }
@@ -27,299 +27,334 @@ class API extends API$1 {
27
27
  urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
28
28
  }, unmarshalListNamespacesResponse);
29
29
  };
30
- /**
31
- * List all your namespaces. List all namespaces in a specified region.
32
- *
33
- * @param request - The request {@link ListNamespacesRequest}
34
- * @returns A Promise of ListNamespacesResponse
35
- */
36
- this.listNamespaces = function (request) {
30
+ })();
31
+
32
+ /**
33
+ * List all your namespaces. List all namespaces in a specified region.
34
+ *
35
+ * @param request - The request {@link ListNamespacesRequest}
36
+ * @returns A Promise of ListNamespacesResponse
37
+ */
38
+ listNamespaces = (() => {
39
+ var _this2 = this;
40
+ return function (request) {
37
41
  if (request === void 0) {
38
42
  request = {};
39
43
  }
40
- return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
44
+ return enrichForPagination('namespaces', _this2.pageOfListNamespaces, request);
41
45
  };
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
- this.getNamespace = request => this.client.fetch({
49
- method: 'GET',
50
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
51
- }, unmarshalNamespace);
52
- /**
53
- * Waits for {@link Namespace} to be in a final state.
54
- *
55
- * @param request - The request {@link GetNamespaceRequest}
56
- * @param options - The waiting options
57
- * @returns A Promise of Namespace
58
- */
59
- this.waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
60
- /**
61
- * Create a new namespace. Create a new namespace in a specified region.
62
- *
63
- * @param request - The request {@link CreateNamespaceRequest}
64
- * @returns A Promise of Namespace
65
- */
66
- this.createNamespace = function (request) {
46
+ })();
47
+
48
+ /**
49
+ * Get a namespace. Get the namespace associated with the specified ID.
50
+ *
51
+ * @param request - The request {@link GetNamespaceRequest}
52
+ * @returns A Promise of Namespace
53
+ */
54
+ getNamespace = request => this.client.fetch({
55
+ method: 'GET',
56
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
57
+ }, unmarshalNamespace);
58
+
59
+ /**
60
+ * Waits for {@link Namespace} to be in a final state.
61
+ *
62
+ * @param request - The request {@link GetNamespaceRequest}
63
+ * @param options - The waiting options
64
+ * @returns A Promise of Namespace
65
+ */
66
+ waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
67
+
68
+ /**
69
+ * Create a new namespace. Create a new namespace in a specified region.
70
+ *
71
+ * @param request - The request {@link CreateNamespaceRequest}
72
+ * @returns A Promise of Namespace
73
+ */
74
+ createNamespace = (() => {
75
+ var _this3 = this;
76
+ return function (request) {
67
77
  if (request === void 0) {
68
78
  request = {};
69
79
  }
70
- return _this.client.fetch({
71
- body: JSON.stringify(marshalCreateNamespaceRequest(request, _this.client.settings)),
80
+ return _this3.client.fetch({
81
+ body: JSON.stringify(marshalCreateNamespaceRequest(request, _this3.client.settings)),
72
82
  headers: jsonContentHeaders,
73
83
  method: 'POST',
74
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`
84
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/namespaces`
75
85
  }, unmarshalNamespace);
76
86
  };
77
- /**
78
- * Update an existing namespace. Update the space associated with the
79
- * specified ID.
80
- *
81
- * @param request - The request {@link UpdateNamespaceRequest}
82
- * @returns A Promise of Namespace
83
- */
84
- this.updateNamespace = request => this.client.fetch({
85
- body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
86
- headers: jsonContentHeaders,
87
- method: 'PATCH',
88
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
89
- }, unmarshalNamespace);
90
- /**
91
- * Delete an existing namespace. Delete the namespace associated with the
92
- * specified ID.
93
- *
94
- * @param request - The request {@link DeleteNamespaceRequest}
95
- * @returns A Promise of Namespace
96
- */
97
- this.deleteNamespace = request => this.client.fetch({
98
- method: 'DELETE',
99
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
100
- }, unmarshalNamespace);
101
- this.pageOfListContainers = request => this.client.fetch({
102
- method: 'GET',
103
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers`,
104
- urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
105
- }, unmarshalListContainersResponse);
106
- /**
107
- * List all your containers. List all containers for a specified region.
108
- *
109
- * @param request - The request {@link ListContainersRequest}
110
- * @returns A Promise of ListContainersResponse
111
- */
112
- this.listContainers = request => enrichForPagination('containers', this.pageOfListContainers, request);
113
- /**
114
- * Get a container. Get the container associated with the specified ID.
115
- *
116
- * @param request - The request {@link GetContainerRequest}
117
- * @returns A Promise of Container
118
- */
119
- this.getContainer = request => this.client.fetch({
120
- method: 'GET',
121
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
122
- }, unmarshalContainer);
123
- /**
124
- * Waits for {@link Container} to be in a final state.
125
- *
126
- * @param request - The request {@link GetContainerRequest}
127
- * @param options - The waiting options
128
- * @returns A Promise of Container
129
- */
130
- this.waitForContainer = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CONTAINER_TRANSIENT_STATUSES.includes(res.status))), this.getContainer, request, options);
131
- /**
132
- * Create a new container. Create a new container in the specified region.
133
- *
134
- * @param request - The request {@link CreateContainerRequest}
135
- * @returns A Promise of Container
136
- */
137
- this.createContainer = request => this.client.fetch({
138
- body: JSON.stringify(marshalCreateContainerRequest(request, this.client.settings)),
139
- headers: jsonContentHeaders,
140
- method: 'POST',
141
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers`
142
- }, unmarshalContainer);
143
- /**
144
- * Update an existing container. Update the container associated with the
145
- * specified ID.
146
- *
147
- * @param request - The request {@link UpdateContainerRequest}
148
- * @returns A Promise of Container
149
- */
150
- this.updateContainer = request => this.client.fetch({
151
- body: JSON.stringify(marshalUpdateContainerRequest(request, this.client.settings)),
152
- headers: jsonContentHeaders,
153
- method: 'PATCH',
154
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
155
- }, unmarshalContainer);
156
- /**
157
- * Delete a container. Delete the container associated with the specified ID.
158
- *
159
- * @param request - The request {@link DeleteContainerRequest}
160
- * @returns A Promise of Container
161
- */
162
- this.deleteContainer = request => this.client.fetch({
163
- method: 'DELETE',
164
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
165
- }, unmarshalContainer);
166
- /**
167
- * Deploy a container. Deploy a container associated with the specified ID.
168
- *
169
- * @param request - The request {@link DeployContainerRequest}
170
- * @returns A Promise of Container
171
- */
172
- this.deployContainer = request => this.client.fetch({
173
- body: '{}',
174
- headers: jsonContentHeaders,
175
- method: 'POST',
176
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}/deploy`
177
- }, unmarshalContainer);
178
- this.pageOfListCrons = request => this.client.fetch({
179
- method: 'GET',
180
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`,
181
- urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
182
- }, unmarshalListCronsResponse);
183
- /**
184
- * List all your crons.
185
- *
186
- * @param request - The request {@link ListCronsRequest}
187
- * @returns A Promise of ListCronsResponse
188
- */
189
- this.listCrons = request => enrichForPagination('crons', this.pageOfListCrons, request);
190
- /**
191
- * Get a cron. Get the cron associated with the specified ID.
192
- *
193
- * @param request - The request {@link GetCronRequest}
194
- * @returns A Promise of Cron
195
- */
196
- this.getCron = request => this.client.fetch({
197
- method: 'GET',
198
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
199
- }, unmarshalCron);
200
- /**
201
- * Waits for {@link Cron} to be in a final state.
202
- *
203
- * @param request - The request {@link GetCronRequest}
204
- * @param options - The waiting options
205
- * @returns A Promise of Cron
206
- */
207
- this.waitForCron = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
208
- /**
209
- * Create a new cron.
210
- *
211
- * @param request - The request {@link CreateCronRequest}
212
- * @returns A Promise of Cron
213
- */
214
- this.createCron = request => this.client.fetch({
215
- body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
216
- headers: jsonContentHeaders,
217
- method: 'POST',
218
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`
219
- }, unmarshalCron);
220
- /**
221
- * Update an existing cron. Update the cron associated with the specified ID.
222
- *
223
- * @param request - The request {@link UpdateCronRequest}
224
- * @returns A Promise of Cron
225
- */
226
- this.updateCron = request => this.client.fetch({
227
- body: JSON.stringify(marshalUpdateCronRequest(request, this.client.settings)),
228
- headers: jsonContentHeaders,
229
- method: 'PATCH',
230
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
231
- }, unmarshalCron);
232
- /**
233
- * Delete an existing cron. Delete the cron associated with the specified ID.
234
- *
235
- * @param request - The request {@link DeleteCronRequest}
236
- * @returns A Promise of Cron
237
- */
238
- this.deleteCron = request => this.client.fetch({
239
- method: 'DELETE',
240
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
241
- }, unmarshalCron);
242
- this.pageOfListLogs = request => this.client.fetch({
243
- method: 'GET',
244
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}/logs`,
245
- urlParams: urlParams(['order_by', request.orderBy ?? 'timestamp_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
246
- }, unmarshalListLogsResponse);
247
- /**
248
- * List your container logs. List the logs of the container with the specified
249
- * ID.
250
- *
251
- * @param request - The request {@link ListLogsRequest}
252
- * @returns A Promise of ListLogsResponse
253
- */
254
- this.listLogs = request => enrichForPagination('logs', this.pageOfListLogs, request);
255
- this.pageOfListDomains = request => this.client.fetch({
256
- method: 'GET',
257
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`,
258
- urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
259
- }, unmarshalListDomainsResponse);
260
- /**
261
- * List all domain name bindings. List all domain name bindings in a specified
262
- * region.
263
- *
264
- * @param request - The request {@link ListDomainsRequest}
265
- * @returns A Promise of ListDomainsResponse
266
- */
267
- this.listDomains = request => enrichForPagination('domains', this.pageOfListDomains, request);
268
- /**
269
- * Get a domain name binding. Get a domain name binding for the container with
270
- * the specified ID.
271
- *
272
- * @param request - The request {@link GetDomainRequest}
273
- * @returns A Promise of Domain
274
- */
275
- this.getDomain = request => this.client.fetch({
276
- method: 'GET',
277
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
278
- }, unmarshalDomain);
279
- /**
280
- * Waits for {@link Domain} to be in a final state.
281
- *
282
- * @param request - The request {@link GetDomainRequest}
283
- * @param options - The waiting options
284
- * @returns A Promise of Domain
285
- */
286
- this.waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
287
- /**
288
- * Create a domain name binding. Create a domain name binding for the
289
- * container with the specified ID.
290
- *
291
- * @param request - The request {@link CreateDomainRequest}
292
- * @returns A Promise of Domain
293
- */
294
- this.createDomain = request => this.client.fetch({
295
- body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
296
- headers: jsonContentHeaders,
297
- method: 'POST',
298
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`
299
- }, unmarshalDomain);
300
- /**
301
- * Delete a domain name binding. Delete the domain name binding with the
302
- * specific ID.
303
- *
304
- * @param request - The request {@link DeleteDomainRequest}
305
- * @returns A Promise of Domain
306
- */
307
- this.deleteDomain = request => this.client.fetch({
308
- method: 'DELETE',
309
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
310
- }, unmarshalDomain);
311
- /**
312
- * @deprecated
313
- * @param request - The request {@link IssueJWTRequest}
314
- * @returns A Promise of Token
315
- */
316
- this.issueJWT = function (request) {
87
+ })();
88
+
89
+ /**
90
+ * Update an existing namespace. Update the space associated with the
91
+ * specified ID.
92
+ *
93
+ * @param request - The request {@link UpdateNamespaceRequest}
94
+ * @returns A Promise of Namespace
95
+ */
96
+ updateNamespace = request => this.client.fetch({
97
+ body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
98
+ headers: jsonContentHeaders,
99
+ method: 'PATCH',
100
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
101
+ }, unmarshalNamespace);
102
+
103
+ /**
104
+ * Delete an existing namespace. Delete the namespace associated with the
105
+ * specified ID.
106
+ *
107
+ * @param request - The request {@link DeleteNamespaceRequest}
108
+ * @returns A Promise of Namespace
109
+ */
110
+ deleteNamespace = request => this.client.fetch({
111
+ method: 'DELETE',
112
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
113
+ }, unmarshalNamespace);
114
+ pageOfListContainers = request => this.client.fetch({
115
+ method: 'GET',
116
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers`,
117
+ urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
118
+ }, unmarshalListContainersResponse);
119
+
120
+ /**
121
+ * List all your containers. List all containers for a specified region.
122
+ *
123
+ * @param request - The request {@link ListContainersRequest}
124
+ * @returns A Promise of ListContainersResponse
125
+ */
126
+ listContainers = request => enrichForPagination('containers', this.pageOfListContainers, request);
127
+
128
+ /**
129
+ * Get a container. Get the container associated with the specified ID.
130
+ *
131
+ * @param request - The request {@link GetContainerRequest}
132
+ * @returns A Promise of Container
133
+ */
134
+ getContainer = request => this.client.fetch({
135
+ method: 'GET',
136
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
137
+ }, unmarshalContainer);
138
+
139
+ /**
140
+ * Waits for {@link Container} to be in a final state.
141
+ *
142
+ * @param request - The request {@link GetContainerRequest}
143
+ * @param options - The waiting options
144
+ * @returns A Promise of Container
145
+ */
146
+ waitForContainer = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CONTAINER_TRANSIENT_STATUSES.includes(res.status))), this.getContainer, request, options);
147
+
148
+ /**
149
+ * Create a new container. Create a new container in the specified region.
150
+ *
151
+ * @param request - The request {@link CreateContainerRequest}
152
+ * @returns A Promise of Container
153
+ */
154
+ createContainer = request => this.client.fetch({
155
+ body: JSON.stringify(marshalCreateContainerRequest(request, this.client.settings)),
156
+ headers: jsonContentHeaders,
157
+ method: 'POST',
158
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers`
159
+ }, unmarshalContainer);
160
+
161
+ /**
162
+ * Update an existing container. Update the container associated with the
163
+ * specified ID.
164
+ *
165
+ * @param request - The request {@link UpdateContainerRequest}
166
+ * @returns A Promise of Container
167
+ */
168
+ updateContainer = request => this.client.fetch({
169
+ body: JSON.stringify(marshalUpdateContainerRequest(request, this.client.settings)),
170
+ headers: jsonContentHeaders,
171
+ method: 'PATCH',
172
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
173
+ }, unmarshalContainer);
174
+
175
+ /**
176
+ * Delete a container. Delete the container associated with the specified ID.
177
+ *
178
+ * @param request - The request {@link DeleteContainerRequest}
179
+ * @returns A Promise of Container
180
+ */
181
+ deleteContainer = request => this.client.fetch({
182
+ method: 'DELETE',
183
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
184
+ }, unmarshalContainer);
185
+
186
+ /**
187
+ * Deploy a container. Deploy a container associated with the specified ID.
188
+ *
189
+ * @param request - The request {@link DeployContainerRequest}
190
+ * @returns A Promise of Container
191
+ */
192
+ deployContainer = request => this.client.fetch({
193
+ body: '{}',
194
+ headers: jsonContentHeaders,
195
+ method: 'POST',
196
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}/deploy`
197
+ }, unmarshalContainer);
198
+ pageOfListCrons = request => this.client.fetch({
199
+ method: 'GET',
200
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`,
201
+ urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
202
+ }, unmarshalListCronsResponse);
203
+
204
+ /**
205
+ * List all your crons.
206
+ *
207
+ * @param request - The request {@link ListCronsRequest}
208
+ * @returns A Promise of ListCronsResponse
209
+ */
210
+ listCrons = request => enrichForPagination('crons', this.pageOfListCrons, request);
211
+
212
+ /**
213
+ * Get a cron. Get the cron associated with the specified ID.
214
+ *
215
+ * @param request - The request {@link GetCronRequest}
216
+ * @returns A Promise of Cron
217
+ */
218
+ getCron = request => this.client.fetch({
219
+ method: 'GET',
220
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
221
+ }, unmarshalCron);
222
+
223
+ /**
224
+ * Waits for {@link Cron} to be in a final state.
225
+ *
226
+ * @param request - The request {@link GetCronRequest}
227
+ * @param options - The waiting options
228
+ * @returns A Promise of Cron
229
+ */
230
+ waitForCron = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
231
+
232
+ /**
233
+ * Create a new cron.
234
+ *
235
+ * @param request - The request {@link CreateCronRequest}
236
+ * @returns A Promise of Cron
237
+ */
238
+ createCron = request => this.client.fetch({
239
+ body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
240
+ headers: jsonContentHeaders,
241
+ method: 'POST',
242
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`
243
+ }, unmarshalCron);
244
+
245
+ /**
246
+ * Update an existing cron. Update the cron associated with the specified ID.
247
+ *
248
+ * @param request - The request {@link UpdateCronRequest}
249
+ * @returns A Promise of Cron
250
+ */
251
+ updateCron = request => this.client.fetch({
252
+ body: JSON.stringify(marshalUpdateCronRequest(request, this.client.settings)),
253
+ headers: jsonContentHeaders,
254
+ method: 'PATCH',
255
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
256
+ }, unmarshalCron);
257
+
258
+ /**
259
+ * Delete an existing cron. Delete the cron associated with the specified ID.
260
+ *
261
+ * @param request - The request {@link DeleteCronRequest}
262
+ * @returns A Promise of Cron
263
+ */
264
+ deleteCron = request => this.client.fetch({
265
+ method: 'DELETE',
266
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
267
+ }, unmarshalCron);
268
+ pageOfListLogs = request => this.client.fetch({
269
+ method: 'GET',
270
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}/logs`,
271
+ urlParams: urlParams(['order_by', request.orderBy ?? 'timestamp_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
272
+ }, unmarshalListLogsResponse);
273
+
274
+ /**
275
+ * List your container logs. List the logs of the container with the specified
276
+ * ID.
277
+ *
278
+ * @param request - The request {@link ListLogsRequest}
279
+ * @returns A Promise of ListLogsResponse
280
+ */
281
+ listLogs = request => enrichForPagination('logs', this.pageOfListLogs, request);
282
+ pageOfListDomains = request => this.client.fetch({
283
+ method: 'GET',
284
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`,
285
+ urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
286
+ }, unmarshalListDomainsResponse);
287
+
288
+ /**
289
+ * List all domain name bindings. List all domain name bindings in a specified
290
+ * region.
291
+ *
292
+ * @param request - The request {@link ListDomainsRequest}
293
+ * @returns A Promise of ListDomainsResponse
294
+ */
295
+ listDomains = request => enrichForPagination('domains', this.pageOfListDomains, request);
296
+
297
+ /**
298
+ * Get a domain name binding. Get a domain name binding for the container with
299
+ * the specified ID.
300
+ *
301
+ * @param request - The request {@link GetDomainRequest}
302
+ * @returns A Promise of Domain
303
+ */
304
+ getDomain = request => this.client.fetch({
305
+ method: 'GET',
306
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
307
+ }, unmarshalDomain);
308
+
309
+ /**
310
+ * Waits for {@link Domain} to be in a final state.
311
+ *
312
+ * @param request - The request {@link GetDomainRequest}
313
+ * @param options - The waiting options
314
+ * @returns A Promise of Domain
315
+ */
316
+ waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
317
+
318
+ /**
319
+ * Create a domain name binding. Create a domain name binding for the
320
+ * container with the specified ID.
321
+ *
322
+ * @param request - The request {@link CreateDomainRequest}
323
+ * @returns A Promise of Domain
324
+ */
325
+ createDomain = request => this.client.fetch({
326
+ body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
327
+ headers: jsonContentHeaders,
328
+ method: 'POST',
329
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`
330
+ }, unmarshalDomain);
331
+
332
+ /**
333
+ * Delete a domain name binding. Delete the domain name binding with the
334
+ * specific ID.
335
+ *
336
+ * @param request - The request {@link DeleteDomainRequest}
337
+ * @returns A Promise of Domain
338
+ */
339
+ deleteDomain = request => this.client.fetch({
340
+ method: 'DELETE',
341
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
342
+ }, unmarshalDomain);
343
+
344
+ /**
345
+ * @deprecated
346
+ * @param request - The request {@link IssueJWTRequest}
347
+ * @returns A Promise of Token
348
+ */
349
+ issueJWT = (() => {
350
+ var _this4 = this;
351
+ return function (request) {
317
352
  if (request === void 0) {
318
353
  request = {};
319
354
  }
320
- return _this.client.fetch({
355
+ return _this4.client.fetch({
321
356
  method: 'GET',
322
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/issue-jwt`,
357
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/issue-jwt`,
323
358
  urlParams: urlParams(['expires_at', request.expiresAt], ...Object.entries(resolveOneOf([{
324
359
  param: 'container_id',
325
360
  value: request.containerId
@@ -329,77 +364,89 @@ class API extends API$1 {
329
364
  }])))
330
365
  }, unmarshalToken);
331
366
  };
332
- /**
333
- * Create a new revocable token.
334
- *
335
- * @param request - The request {@link CreateTokenRequest}
336
- * @returns A Promise of Token
337
- */
338
- this.createToken = function (request) {
367
+ })();
368
+
369
+ /**
370
+ * Create a new revocable token.
371
+ *
372
+ * @param request - The request {@link CreateTokenRequest}
373
+ * @returns A Promise of Token
374
+ */
375
+ createToken = (() => {
376
+ var _this5 = this;
377
+ return function (request) {
339
378
  if (request === void 0) {
340
379
  request = {};
341
380
  }
342
- return _this.client.fetch({
343
- body: JSON.stringify(marshalCreateTokenRequest(request, _this.client.settings)),
381
+ return _this5.client.fetch({
382
+ body: JSON.stringify(marshalCreateTokenRequest(request, _this5.client.settings)),
344
383
  headers: jsonContentHeaders,
345
384
  method: 'POST',
346
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/tokens`
385
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this5.client.settings.defaultRegion)}/tokens`
347
386
  }, unmarshalToken);
348
387
  };
349
- /**
350
- * Get a token. Get a token with a specified ID.
351
- *
352
- * @param request - The request {@link GetTokenRequest}
353
- * @returns A Promise of Token
354
- */
355
- this.getToken = request => this.client.fetch({
356
- method: 'GET',
357
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
358
- }, unmarshalToken);
359
- /**
360
- * Waits for {@link Token} to be in a final state.
361
- *
362
- * @param request - The request {@link GetTokenRequest}
363
- * @param options - The waiting options
364
- * @returns A Promise of Token
365
- */
366
- this.waitForToken = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
367
- this.pageOfListTokens = function (request) {
388
+ })();
389
+
390
+ /**
391
+ * Get a token. Get a token with a specified ID.
392
+ *
393
+ * @param request - The request {@link GetTokenRequest}
394
+ * @returns A Promise of Token
395
+ */
396
+ getToken = request => this.client.fetch({
397
+ method: 'GET',
398
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
399
+ }, unmarshalToken);
400
+
401
+ /**
402
+ * Waits for {@link Token} to be in a final state.
403
+ *
404
+ * @param request - The request {@link GetTokenRequest}
405
+ * @param options - The waiting options
406
+ * @returns A Promise of Token
407
+ */
408
+ waitForToken = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
409
+ pageOfListTokens = (() => {
410
+ var _this6 = this;
411
+ return function (request) {
368
412
  if (request === void 0) {
369
413
  request = {};
370
414
  }
371
- return _this.client.fetch({
415
+ return _this6.client.fetch({
372
416
  method: 'GET',
373
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/tokens`,
374
- urlParams: urlParams(['container_id', request.containerId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
417
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/tokens`,
418
+ urlParams: urlParams(['container_id', request.containerId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this6.client.settings.defaultPageSize])
375
419
  }, unmarshalListTokensResponse);
376
420
  };
377
- /**
378
- * List all tokens. List all tokens belonging to a specified Organization or
379
- * Project.
380
- *
381
- * @param request - The request {@link ListTokensRequest}
382
- * @returns A Promise of ListTokensResponse
383
- */
384
- this.listTokens = function (request) {
421
+ })();
422
+
423
+ /**
424
+ * List all tokens. List all tokens belonging to a specified Organization or
425
+ * Project.
426
+ *
427
+ * @param request - The request {@link ListTokensRequest}
428
+ * @returns A Promise of ListTokensResponse
429
+ */
430
+ listTokens = (() => {
431
+ var _this7 = this;
432
+ return function (request) {
385
433
  if (request === void 0) {
386
434
  request = {};
387
435
  }
388
- return enrichForPagination('tokens', _this.pageOfListTokens, request);
436
+ return enrichForPagination('tokens', _this7.pageOfListTokens, request);
389
437
  };
390
- /**
391
- * Delete a token. Delete a token with a specified ID.
392
- *
393
- * @param request - The request {@link DeleteTokenRequest}
394
- * @returns A Promise of Token
395
- */
396
- this.deleteToken = request => this.client.fetch({
397
- method: 'DELETE',
398
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
399
- }, unmarshalToken);
400
- }
401
- /** Lists the available regions of the API. */
438
+ })();
439
+
440
+ /**
441
+ * Delete a token. Delete a token with a specified ID.
442
+ *
443
+ * @param request - The request {@link DeleteTokenRequest}
444
+ * @returns A Promise of Token
445
+ */
446
+ deleteToken = request => this.client.fetch({
447
+ method: 'DELETE',
448
+ path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
449
+ }, unmarshalToken);
402
450
  }
403
- API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
404
451
 
405
452
  export { API };