@scaleway/sdk 1.6.0 → 1.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.
Files changed (36) hide show
  1. package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
  2. package/dist/api/baremetal/v1/api.gen.js +1 -1
  3. package/dist/api/baremetal/v1/api.utils.js +1 -1
  4. package/dist/api/cockpit/v1beta1/api.gen.js +41 -31
  5. package/dist/api/container/v1beta1/api.gen.js +34 -28
  6. package/dist/api/container/v1beta1/marshalling.gen.js +1 -1
  7. package/dist/api/domain/v2beta1/api.gen.js +2 -2
  8. package/dist/api/flexibleip/v1alpha1/api.gen.js +1 -1
  9. package/dist/api/function/v1beta1/api.gen.js +39 -30
  10. package/dist/api/function/v1beta1/marshalling.gen.js +1 -0
  11. package/dist/api/iam/v1alpha1/api.gen.js +2 -3
  12. package/dist/api/iam/v1alpha1/marshalling.gen.js +1 -0
  13. package/dist/api/instance/v1/api.utils.js +7 -13
  14. package/dist/api/iot/v1/api.gen.js +1 -1
  15. package/dist/api/k8s/v1/api.gen.js +3 -3
  16. package/dist/api/lb/v1/api.gen.js +4 -4
  17. package/dist/api/lb/v1/api.utils.js +4 -4
  18. package/dist/api/marketplace/v2/api.gen.js +46 -3
  19. package/dist/api/mnq/v1alpha1/api.gen.js +35 -12
  20. package/dist/api/rdb/v1/api.gen.js +5 -5
  21. package/dist/api/redis/v1/api.gen.js +1 -1
  22. package/dist/api/registry/v1/api.gen.js +3 -3
  23. package/dist/api/secret/v1alpha1/api.gen.js +26 -15
  24. package/dist/api/secret/v1alpha1/marshalling.gen.js +8 -1
  25. package/dist/api/tem/v1alpha1/api.gen.js +2 -2
  26. package/dist/api/test/v1/api.gen.js +1 -1
  27. package/dist/api/vpc/v1/api.gen.js +13 -5
  28. package/dist/api/vpcgw/v1/api.gen.js +2 -2
  29. package/dist/api/webhosting/v1alpha1/api.gen.js +1 -1
  30. package/dist/helpers/marshalling.js +1 -1
  31. package/dist/index.cjs +241 -117
  32. package/dist/index.d.ts +825 -257
  33. package/dist/internal/async/interval-retrier.js +2 -2
  34. package/dist/scw/constants.js +1 -1
  35. package/dist/scw/custom-marshalling.js +4 -7
  36. package/package.json +2 -2
@@ -31,7 +31,8 @@ class API extends API$1 {
31
31
  }, unmarshalListNamespacesResponse);
32
32
  };
33
33
  /**
34
- * List all your namespaces.
34
+ * List all your namespaces. List all existing namespaces in the specified
35
+ * region.
35
36
  *
36
37
  * @param request - The request {@link ListNamespacesRequest}
37
38
  * @returns A Promise of ListNamespacesResponse
@@ -43,7 +44,7 @@ class API extends API$1 {
43
44
  return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
44
45
  };
45
46
  /**
46
- * Get a namespace. Get the namespace associated with the given id.
47
+ * Get a namespace. Get the namespace associated with the specified ID.
47
48
  *
48
49
  * @param request - The request {@link GetNamespaceRequest}
49
50
  * @returns A Promise of Namespace
@@ -59,9 +60,10 @@ class API extends API$1 {
59
60
  * @param options - The waiting options
60
61
  * @returns A Promise of Namespace
61
62
  */
62
- this.waitForNamespace = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
63
+ this.waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
63
64
  /**
64
- * Create a new namespace.
65
+ * Create a new namespace. Create a new namespace in a specified Organization
66
+ * or Proejct.
65
67
  *
66
68
  * @param request - The request {@link CreateNamespaceRequest}
67
69
  * @returns A Promise of Namespace
@@ -78,8 +80,8 @@ class API extends API$1 {
78
80
  }, unmarshalNamespace);
79
81
  };
80
82
  /**
81
- * Update an existing namespace. Update the space associated with the given
82
- * id.
83
+ * Update an existing namespace. Update the namespace associated with the
84
+ * specified ID.
83
85
  *
84
86
  * @param request - The request {@link UpdateNamespaceRequest}
85
87
  * @returns A Promise of Namespace
@@ -92,7 +94,7 @@ class API extends API$1 {
92
94
  }, unmarshalNamespace);
93
95
  /**
94
96
  * Delete an existing namespace. Delete the namespace associated with the
95
- * given id.
97
+ * specified ID.
96
98
  *
97
99
  * @param request - The request {@link DeleteNamespaceRequest}
98
100
  * @returns A Promise of Namespace
@@ -114,7 +116,7 @@ class API extends API$1 {
114
116
  */
115
117
  this.listFunctions = request => enrichForPagination('functions', this.pageOfListFunctions, request);
116
118
  /**
117
- * Get a function. Get the function associated with the given id.
119
+ * Get a function. Get the function associated with the specified ID.
118
120
  *
119
121
  * @param request - The request {@link GetFunctionRequest}
120
122
  * @returns A Promise of Function
@@ -130,9 +132,10 @@ class API extends API$1 {
130
132
  * @param options - The waiting options
131
133
  * @returns A Promise of Function
132
134
  */
133
- this.waitForFunction = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!FUNCTION_TRANSIENT_STATUSES.includes(res.status))), this.getFunction, request, options);
135
+ this.waitForFunction = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!FUNCTION_TRANSIENT_STATUSES.includes(res.status))), this.getFunction, request, options);
134
136
  /**
135
- * Create a new function.
137
+ * Create a new function. Create a new function in the specified region for a
138
+ * specified Organization or Project.
136
139
  *
137
140
  * @param request - The request {@link CreateFunctionRequest}
138
141
  * @returns A Promise of Function
@@ -144,8 +147,8 @@ class API extends API$1 {
144
147
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions`
145
148
  }, unmarshalFunction);
146
149
  /**
147
- * Update an existing function. Update the function associated with the given
148
- * id.
150
+ * Update an existing function. Update the function associated with the
151
+ * specified ID.
149
152
  *
150
153
  * @param request - The request {@link UpdateFunctionRequest}
151
154
  * @returns A Promise of Function
@@ -157,7 +160,7 @@ class API extends API$1 {
157
160
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
158
161
  }, unmarshalFunction);
159
162
  /**
160
- * Delete a function. Delete the function associated with the given id.
163
+ * Delete a function. Delete the function associated with the specified ID.
161
164
  *
162
165
  * @param request - The request {@link DeleteFunctionRequest}
163
166
  * @returns A Promise of Function
@@ -167,7 +170,7 @@ class API extends API$1 {
167
170
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
168
171
  }, unmarshalFunction);
169
172
  /**
170
- * Deploy a function. Deploy a function associated with the given id.
173
+ * Deploy a function. Deploy a function associated with the specified ID.
171
174
  *
172
175
  * @param request - The request {@link DeployFunctionRequest}
173
176
  * @returns A Promise of Function
@@ -195,7 +198,7 @@ class API extends API$1 {
195
198
  };
196
199
  /**
197
200
  * Get an upload URL of a function. Get an upload URL of a function associated
198
- * with the given id.
201
+ * with the specified ID.
199
202
  *
200
203
  * @param request - The request {@link GetFunctionUploadURLRequest}
201
204
  * @returns A Promise of UploadURL
@@ -207,7 +210,7 @@ class API extends API$1 {
207
210
  }, unmarshalUploadURL);
208
211
  /**
209
212
  * Get a download URL of a function. Get a download URL for a function
210
- * associated with the given id.
213
+ * associated with the specified ID.
211
214
  *
212
215
  * @param request - The request {@link GetFunctionDownloadURLRequest}
213
216
  * @returns A Promise of DownloadURL
@@ -222,14 +225,14 @@ class API extends API$1 {
222
225
  urlParams: urlParams(['function_id', request.functionId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
223
226
  }, unmarshalListCronsResponse);
224
227
  /**
225
- * List all your crons.
228
+ * List all crons. List all the cronjobs in a specified region.
226
229
  *
227
230
  * @param request - The request {@link ListCronsRequest}
228
231
  * @returns A Promise of ListCronsResponse
229
232
  */
230
233
  this.listCrons = request => enrichForPagination('crons', this.pageOfListCrons, request);
231
234
  /**
232
- * Get a cron. Get the cron associated with the given id.
235
+ * Get a cron. Get the cron associated with the specified ID.
233
236
  *
234
237
  * @param request - The request {@link GetCronRequest}
235
238
  * @returns A Promise of Cron
@@ -245,9 +248,10 @@ class API extends API$1 {
245
248
  * @param options - The waiting options
246
249
  * @returns A Promise of Cron
247
250
  */
248
- this.waitForCron = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
251
+ this.waitForCron = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
249
252
  /**
250
- * Create a new cron.
253
+ * Create a new cron. Create a new cronjob for a function with the specified
254
+ * ID.
251
255
  *
252
256
  * @param request - The request {@link CreateCronRequest}
253
257
  * @returns A Promise of Cron
@@ -259,7 +263,7 @@ class API extends API$1 {
259
263
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`
260
264
  }, unmarshalCron);
261
265
  /**
262
- * Update an existing cron. Update the cron associated with the given id.
266
+ * Update an existing cron. Update the cron associated with the specified ID.
263
267
  *
264
268
  * @param request - The request {@link UpdateCronRequest}
265
269
  * @returns A Promise of Cron
@@ -271,7 +275,7 @@ class API extends API$1 {
271
275
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
272
276
  }, unmarshalCron);
273
277
  /**
274
- * Delete an existing cron. Delete the cron associated with the given id.
278
+ * Delete an existing cron. Delete the cron associated with the specified ID.
275
279
  *
276
280
  * @param request - The request {@link DeleteCronRequest}
277
281
  * @returns A Promise of Cron
@@ -286,7 +290,8 @@ class API extends API$1 {
286
290
  urlParams: urlParams(['order_by', request.orderBy ?? 'timestamp_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
287
291
  }, unmarshalListLogsResponse);
288
292
  /**
289
- * List your application logs.
293
+ * List application logs. List the application logs of the function with the
294
+ * specified ID.
290
295
  *
291
296
  * @param request - The request {@link ListLogsRequest}
292
297
  * @returns A Promise of ListLogsResponse
@@ -298,14 +303,16 @@ class API extends API$1 {
298
303
  urlParams: urlParams(['function_id', request.functionId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
299
304
  }, unmarshalListDomainsResponse);
300
305
  /**
301
- * List all domain name bindings.
306
+ * List all domain name bindings. List all domain name bindings in a specified
307
+ * region.
302
308
  *
303
309
  * @param request - The request {@link ListDomainsRequest}
304
310
  * @returns A Promise of ListDomainsResponse
305
311
  */
306
312
  this.listDomains = request => enrichForPagination('domains', this.pageOfListDomains, request);
307
313
  /**
308
- * Get a domain name binding.
314
+ * Get a domain name binding. Get a domain name binding for the function with
315
+ * the specified ID.
309
316
  *
310
317
  * @param request - The request {@link GetDomainRequest}
311
318
  * @returns A Promise of Domain
@@ -321,9 +328,10 @@ class API extends API$1 {
321
328
  * @param options - The waiting options
322
329
  * @returns A Promise of Domain
323
330
  */
324
- this.waitForDomain = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
331
+ this.waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
325
332
  /**
326
- * Create a domain name binding.
333
+ * Create a domain name binding. Create a domain name binding for the function
334
+ * with the specified ID.
327
335
  *
328
336
  * @param request - The request {@link CreateDomainRequest}
329
337
  * @returns A Promise of Domain
@@ -335,7 +343,8 @@ class API extends API$1 {
335
343
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`
336
344
  }, unmarshalDomain);
337
345
  /**
338
- * Delete a domain name binding.
346
+ * Delete a domain name binding. Delete a domain name binding for the function
347
+ * with the specified ID.
339
348
  *
340
349
  * @param request - The request {@link DeleteDomainRequest}
341
350
  * @returns A Promise of Domain
@@ -399,7 +408,7 @@ class API extends API$1 {
399
408
  * @param options - The waiting options
400
409
  * @returns A Promise of Token
401
410
  */
402
- this.waitForToken = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
411
+ this.waitForToken = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
403
412
  this.pageOfListTokens = function (request) {
404
413
  if (request === void 0) {
405
414
  request = {};
@@ -449,7 +458,7 @@ class API extends API$1 {
449
458
  * @param options - The waiting options
450
459
  * @returns A Promise of Trigger
451
460
  */
452
- this.waitForTrigger = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
461
+ this.waitForTrigger = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
453
462
  this.pageOfListTriggers = function (request) {
454
463
  if (request === void 0) {
455
464
  request = {};
@@ -78,6 +78,7 @@ const unmarshalFunction = data => {
78
78
  throw new TypeError(`Unmarshalling the type 'Function' failed as data isn't a dictionary.`);
79
79
  }
80
80
  return {
81
+ buildMessage: data.build_message,
81
82
  cpuLimit: data.cpu_limit,
82
83
  description: data.description,
83
84
  domainName: data.domain_name,
@@ -95,7 +95,7 @@ class API extends API$1 {
95
95
  return _this.client.fetch({
96
96
  method: 'GET',
97
97
  path: `/iam/v1alpha1/users`,
98
- urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['user_ids', request.userIds])
98
+ urlParams: urlParams(['mfa', request.mfa], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['user_ids', request.userIds])
99
99
  }, unmarshalListUsersResponse);
100
100
  };
101
101
  /**
@@ -117,8 +117,7 @@ class API extends API$1 {
117
117
  /**
118
118
  * Get a given user. Retrieve information about a user, specified by the
119
119
  * `user_id` parameter. The user's full details, including `id`, `email`,
120
- * `organization_id`, `status` and `two_factor_enabled` are returned in the
121
- * response.
120
+ * `organization_id`, `status` and `mfa` are returned in the response.
122
121
  *
123
122
  * @param request - The request {@link GetUserRequest}
124
123
  * @returns A Promise of User
@@ -148,6 +148,7 @@ const unmarshalUser = data => {
148
148
  email: data.email,
149
149
  id: data.id,
150
150
  lastLoginAt: unmarshalDate(data.last_login_at),
151
+ mfa: data.mfa,
151
152
  organizationId: data.organization_id,
152
153
  status: data.status,
153
154
  twoFactorEnabled: data.two_factor_enabled,
@@ -25,7 +25,7 @@ class InstanceV1UtilsAPI extends API {
25
25
  done: !IMAGE_TRANSIENT_STATUSES.includes(value.state),
26
26
  value
27
27
  };
28
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
28
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
29
29
  /**
30
30
  * Waits for {@link PrivateNIC} to be in a final state.
31
31
  *
@@ -39,7 +39,7 @@ class InstanceV1UtilsAPI extends API {
39
39
  done: !PRIVATE_NIC_TRANSIENT_STATUSES.includes(value.state),
40
40
  value
41
41
  };
42
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
42
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
43
43
  /**
44
44
  * Waits for {@link Server} to be in a final state.
45
45
  *
@@ -53,7 +53,7 @@ class InstanceV1UtilsAPI extends API {
53
53
  done: !SERVER_TRANSIENT_STATUSES.includes(value.state),
54
54
  value
55
55
  };
56
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
56
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
57
57
  /**
58
58
  * Waits for {@link Server} to be in a final state.
59
59
  *
@@ -67,7 +67,7 @@ class InstanceV1UtilsAPI extends API {
67
67
  done: !SNAPSHOT_TRANSIENT_STATUSES.includes(value.state),
68
68
  value
69
69
  };
70
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
70
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
71
71
  /**
72
72
  * Waits for {@link Volume} to be in a final state.
73
73
  *
@@ -81,7 +81,7 @@ class InstanceV1UtilsAPI extends API {
81
81
  done: !VOLUME_TRANSIENT_STATUSES.includes(value.state),
82
82
  value
83
83
  };
84
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
84
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
85
85
  /**
86
86
  * Updates a snapshot.
87
87
  *
@@ -233,10 +233,7 @@ class InstanceV1UtilsAPI extends API {
233
233
  const volumes = await this.getServer({
234
234
  serverId: request.serverId,
235
235
  zone: request.zone
236
- }).then(res => {
237
- var _res$server;
238
- return validateNotUndefined((_res$server = res.server) == null ? void 0 : _res$server.volumes);
239
- });
236
+ }).then(res => validateNotUndefined(res.server?.volumes));
240
237
  const newVolumes = {};
241
238
  for (const [key, server] of Object.entries(volumes)) {
242
239
  newVolumes[key] = {
@@ -284,10 +281,7 @@ class InstanceV1UtilsAPI extends API {
284
281
  const server = await this.getVolume({
285
282
  volumeId: request.volumeId,
286
283
  zone: request.zone
287
- }).then(res => {
288
- var _res$volume, _res$volume$server;
289
- return validateNotUndefined((_res$volume = res.volume) == null ? void 0 : (_res$volume$server = _res$volume.server) == null ? void 0 : _res$volume$server.id);
290
- }).then(serverId => this.getServer({
284
+ }).then(res => validateNotUndefined(res.volume?.server?.id)).then(serverId => this.getServer({
291
285
  serverId,
292
286
  zone: request.zone
293
287
  })).then(res => validateNotUndefined(res.server));
@@ -71,7 +71,7 @@ class API extends API$1 {
71
71
  * @param options - The waiting options
72
72
  * @returns A Promise of Hub
73
73
  */
74
- this.waitForHub = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!HUB_TRANSIENT_STATUSES.includes(res.status))), this.getHub, request, options);
74
+ this.waitForHub = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HUB_TRANSIENT_STATUSES.includes(res.status))), this.getHub, request, options);
75
75
  /**
76
76
  * Update a hub.
77
77
  *
@@ -70,7 +70,7 @@ class API extends API$1 {
70
70
  * @param options - The waiting options
71
71
  * @returns A Promise of Cluster
72
72
  */
73
- this.waitForCluster = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))), this.getCluster, request, options);
73
+ this.waitForCluster = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))), this.getCluster, request, options);
74
74
  /**
75
75
  * Update a cluster. Update a specific Kubernetes cluster. Note that this
76
76
  * method is designed to update details such as name, description, tags and
@@ -202,7 +202,7 @@ class API extends API$1 {
202
202
  * @param options - The waiting options
203
203
  * @returns A Promise of Pool
204
204
  */
205
- this.waitForPool = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!POOL_TRANSIENT_STATUSES.includes(res.status))), this.getPool, request, options);
205
+ this.waitForPool = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!POOL_TRANSIENT_STATUSES.includes(res.status))), this.getPool, request, options);
206
206
  /**
207
207
  * Upgrade a pool in a cluster. Upgrade the Kubernetes version of a specific
208
208
  * pool. Note that this will work when the targeted version is the same than
@@ -285,7 +285,7 @@ class API extends API$1 {
285
285
  * @param options - The waiting options
286
286
  * @returns A Promise of Node
287
287
  */
288
- this.waitForNode = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!NODE_TRANSIENT_STATUSES.includes(res.status))), this.getNode, request, options);
288
+ this.waitForNode = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NODE_TRANSIENT_STATUSES.includes(res.status))), this.getNode, request, options);
289
289
  /**
290
290
  * Replace a node in a cluster. Replace a specific node. The node will be set
291
291
  * cordoned, meaning that scheduling will be disabled. Then the existing pods
@@ -71,7 +71,7 @@ class API extends API$1 {
71
71
  * @param options - The waiting options
72
72
  * @returns A Promise of Lb
73
73
  */
74
- this.waitForLb = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
74
+ this.waitForLb = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
75
75
  /**
76
76
  * Update a load balancer.
77
77
  *
@@ -513,7 +513,7 @@ class API extends API$1 {
513
513
  * @param options - The waiting options
514
514
  * @returns A Promise of Certificate
515
515
  */
516
- this.waitForCertificate = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
516
+ this.waitForCertificate = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
517
517
  /**
518
518
  * Update a TLS certificate.
519
519
  *
@@ -743,7 +743,7 @@ class ZonedAPI extends API$1 {
743
743
  * @param options - The waiting options
744
744
  * @returns A Promise of Lb
745
745
  */
746
- this.waitForLb = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
746
+ this.waitForLb = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
747
747
  /**
748
748
  * Update a Load Balancer. Update the parameters of an existing Load Balancer,
749
749
  * specified by its Load Balancer ID. Note that the request type is PUT and
@@ -1285,7 +1285,7 @@ class ZonedAPI extends API$1 {
1285
1285
  * @param options - The waiting options
1286
1286
  * @returns A Promise of Certificate
1287
1287
  */
1288
- this.waitForCertificate = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
1288
+ this.waitForCertificate = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
1289
1289
  /**
1290
1290
  * Update an SSL/TLS certificate. Update the name of a particular SSL/TLS
1291
1291
  * certificate, specified by its certificate ID.
@@ -24,7 +24,7 @@ class LbV1UtilsAPI extends API {
24
24
  done: value.privateNetwork.find(elt => PRIVATE_NETWORK_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
25
25
  value
26
26
  };
27
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
27
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
28
28
  /**
29
29
  * Waits for all instances of a load balancer to be in a final state.
30
30
  *
@@ -38,7 +38,7 @@ class LbV1UtilsAPI extends API {
38
38
  done: !LB_TRANSIENT_STATUSES.includes(value.status) && value.instances.find(elt => INSTANCE_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
39
39
  value
40
40
  };
41
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
41
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
42
42
  }
43
43
  }
44
44
  class LbZonedV1UtilsAPI extends ZonedAPI {
@@ -64,7 +64,7 @@ class LbZonedV1UtilsAPI extends ZonedAPI {
64
64
  done: value.privateNetwork.find(elt => PRIVATE_NETWORK_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
65
65
  value
66
66
  };
67
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
67
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
68
68
  /**
69
69
  * Waits for all instances of a (zoned) load balancer to be in a final state.
70
70
  *
@@ -78,7 +78,7 @@ class LbZonedV1UtilsAPI extends ZonedAPI {
78
78
  done: !LB_TRANSIENT_STATUSES.includes(value.status) && value.instances.find(elt => INSTANCE_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
79
79
  value
80
80
  };
81
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
81
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
82
82
  }
83
83
  }
84
84
 
@@ -16,14 +16,16 @@ class API extends API$1 {
16
16
  urlParams: urlParams(['arch', request.arch], ['category', request.category], ['include_eol', request.includeEol], ['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
17
17
  }, unmarshalListImagesResponse);
18
18
  /**
19
- * List marketplace images.
19
+ * List marketplace images. List all available images on the marketplace,
20
+ * their UUID, CPU architecture and description.
20
21
  *
21
22
  * @param request - The request {@link ListImagesRequest}
22
23
  * @returns A Promise of ListImagesResponse
23
24
  */
24
25
  this.listImages = request => enrichForPagination('images', this.pageOfListImages, request);
25
26
  /**
26
- * Get a specific marketplace image.
27
+ * Get a specific marketplace image. Get detailed information about a
28
+ * marketplace image, specified by its `image_id` (UUID format).
27
29
  *
28
30
  * @param request - The request {@link GetImageRequest}
29
31
  * @returns A Promise of Image
@@ -37,7 +39,22 @@ class API extends API$1 {
37
39
  path: `/marketplace/v2/versions`,
38
40
  urlParams: urlParams(['image_id', request.imageId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
39
41
  }, unmarshalListVersionsResponse);
42
+ /**
43
+ * List versions of an Image. Get a list of all available version of an image,
44
+ * specified by its `image_id` (UUID format).
45
+ *
46
+ * @param request - The request {@link ListVersionsRequest}
47
+ * @returns A Promise of ListVersionsResponse
48
+ */
40
49
  this.listVersions = request => enrichForPagination('versions', this.pageOfListVersions, request);
50
+ /**
51
+ * Get a specific image version. Get information such as the name, creation
52
+ * date, last update and published date for an image version specified by its
53
+ * `version_id` (UUID format).
54
+ *
55
+ * @param request - The request {@link GetVersionRequest}
56
+ * @returns A Promise of Version
57
+ */
41
58
  this.getVersion = request => this.client.fetch({
42
59
  method: 'GET',
43
60
  path: `/marketplace/v2/versions/${validatePathParam('versionId', request.versionId)}`
@@ -62,7 +79,10 @@ class API extends API$1 {
62
79
  }, unmarshalListLocalImagesResponse);
63
80
  };
64
81
  /**
65
- * List local images from a specific image or version.
82
+ * List local images from a specific image or version. List information about
83
+ * local images in a specific Availability Zone, specified by its `image_id`
84
+ * (UUID format), `version_id` (UUID format) or `image_label`. Only one of
85
+ * these three parameters may be set.
66
86
  *
67
87
  * @param request - The request {@link ListLocalImagesRequest}
68
88
  * @returns A Promise of ListLocalImagesResponse
@@ -73,6 +93,15 @@ class API extends API$1 {
73
93
  }
74
94
  return enrichForPagination('localImages', _this.pageOfListLocalImages, request);
75
95
  };
96
+ /**
97
+ * Get a specific local image by ID. Get detailed information about a local
98
+ * image, including compatible commercial types, supported architecture,
99
+ * labels and the Availability Zone of the image, specified by its
100
+ * `local_image_id` (UUID format).
101
+ *
102
+ * @param request - The request {@link GetLocalImageRequest}
103
+ * @returns A Promise of LocalImage
104
+ */
76
105
  this.getLocalImage = request => this.client.fetch({
77
106
  method: 'GET',
78
107
  path: `/marketplace/v2/local-images/${validatePathParam('localImageId', request.localImageId)}`
@@ -87,12 +116,26 @@ class API extends API$1 {
87
116
  urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
88
117
  }, unmarshalListCategoriesResponse);
89
118
  };
119
+ /**
120
+ * List existing image categories. Get a list of all existing categories. The
121
+ * output can be paginated.
122
+ *
123
+ * @param request - The request {@link ListCategoriesRequest}
124
+ * @returns A Promise of ListCategoriesResponse
125
+ */
90
126
  this.listCategories = function (request) {
91
127
  if (request === void 0) {
92
128
  request = {};
93
129
  }
94
130
  return enrichForPagination('categories', _this.pageOfListCategories, request);
95
131
  };
132
+ /**
133
+ * Get a specific category. Get information about a specific category of the
134
+ * marketplace catalog, specified by its `category_id` (UUID format).
135
+ *
136
+ * @param request - The request {@link GetCategoryRequest}
137
+ * @returns A Promise of Category
138
+ */
96
139
  this.getCategory = request => this.client.fetch({
97
140
  method: 'GET',
98
141
  path: `/marketplace/v2/categories/${validatePathParam('categoryId', request.categoryId)}`