@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
@@ -11,7 +11,8 @@ const jsonContentHeaders = {
11
11
  /**
12
12
  * MnQ API (beta).
13
13
  *
14
- * This API allows you to manage Messaging or Queueing brokers. MnQ API (beta).
14
+ * This API allows you to manage Scaleway Messaging and Queueing brokers. MnQ
15
+ * API (beta).
15
16
  */
16
17
  class API extends API$1 {
17
18
  constructor() {
@@ -29,7 +30,10 @@ class API extends API$1 {
29
30
  }, unmarshalListNamespacesResponse);
30
31
  };
31
32
  /**
32
- * List namespaces.
33
+ * List namespaces. List all Messaging and Queuing namespaces in the specified
34
+ * region, for a Scaleway Organization or Project. By default, the namespaces
35
+ * returned in the list are ordered by creation date in ascending order,
36
+ * though this can be modified via the `order_by` field.
33
37
  *
34
38
  * @param request - The request {@link ListNamespacesRequest}
35
39
  * @returns A Promise of ListNamespacesResponse
@@ -41,7 +45,8 @@ class API extends API$1 {
41
45
  return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
42
46
  };
43
47
  /**
44
- * Create a namespace.
48
+ * Create a namespace. Create a Messaging and Queuing namespace, set to the
49
+ * desired protocol.
45
50
  *
46
51
  * @param request - The request {@link CreateNamespaceRequest}
47
52
  * @returns A Promise of Namespace
@@ -53,7 +58,8 @@ class API extends API$1 {
53
58
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
54
59
  }, unmarshalNamespace);
55
60
  /**
56
- * Update the name of a namespace.
61
+ * Update the name of a namespace. Update the name of a Messaging and Queuing
62
+ * namespace, specified by its namespace ID.
57
63
  *
58
64
  * @param request - The request {@link UpdateNamespaceRequest}
59
65
  * @returns A Promise of Namespace
@@ -65,7 +71,9 @@ class API extends API$1 {
65
71
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
66
72
  }, unmarshalNamespace);
67
73
  /**
68
- * Get a namespace.
74
+ * Get a namespace. Retrieve information about an existing Messaging and
75
+ * Queuing namespace, identified by its namespace ID. Its full details,
76
+ * including name, endpoint and protocol, are returned in the response.
69
77
  *
70
78
  * @param request - The request {@link GetNamespaceRequest}
71
79
  * @returns A Promise of Namespace
@@ -75,7 +83,10 @@ class API extends API$1 {
75
83
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
76
84
  }, unmarshalNamespace);
77
85
  /**
78
- * Delete a namespace.
86
+ * Delete a namespace. Delete a Messaging and Queuing namespace, specified by
87
+ * its namespace ID. Note that deleting a namespace is irreversible, and any
88
+ * URLs, credentials and queued messages belonging to this namespace will also
89
+ * be deleted.
79
90
  *
80
91
  * @param request - The request {@link DeleteNamespaceRequest}
81
92
  */
@@ -84,8 +95,11 @@ class API extends API$1 {
84
95
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
85
96
  });
86
97
  /**
87
- * Create a set of credentials. Create a set of credentials for a specific
88
- * namespace.
98
+ * Create credentials. Create a set of credentials for a Messaging and Queuing
99
+ * namespace, specified by its namespace ID. If creating credentials for a
100
+ * NATS namespace, the `permissions` object must not be included in the
101
+ * request. If creating credentials for an SQS/SNS namespace, the
102
+ * `permissions` object is required, with all three of its child attributes.
89
103
  *
90
104
  * @param request - The request {@link CreateCredentialRequest}
91
105
  * @returns A Promise of Credential
@@ -97,7 +111,9 @@ class API extends API$1 {
97
111
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials`
98
112
  }, unmarshalCredential);
99
113
  /**
100
- * Delete credentials.
114
+ * Delete credentials. Delete a set of credentials, specified by their
115
+ * credential ID. Deleting credentials is irreversible and cannot be undone.
116
+ * The credentials can no longer be used to access the namespace.
101
117
  *
102
118
  * @param request - The request {@link DeleteCredentialRequest}
103
119
  */
@@ -116,7 +132,9 @@ class API extends API$1 {
116
132
  }, unmarshalListCredentialsResponse);
117
133
  };
118
134
  /**
119
- * List credentials.
135
+ * List credentials. List existing credentials in the specified region. The
136
+ * response contains only the metadata for the credentials, not the
137
+ * credentials themselves (for this, use **Get Credentials**).
120
138
  *
121
139
  * @param request - The request {@link ListCredentialsRequest}
122
140
  * @returns A Promise of ListCredentialsResponse
@@ -128,7 +146,10 @@ class API extends API$1 {
128
146
  return enrichForPagination('credentials', _this.pageOfListCredentials, request);
129
147
  };
130
148
  /**
131
- * Update a set of credentials.
149
+ * Update credentials. Update a set of credentials. You can update the
150
+ * credentials' name, or (in the case of SQS/SNS credentials only) their
151
+ * permissions. To update the name of NATS credentials, do not include the
152
+ * `permissions` object in your request.
132
153
  *
133
154
  * @param request - The request {@link UpdateCredentialRequest}
134
155
  * @returns A Promise of Credential
@@ -140,7 +161,9 @@ class API extends API$1 {
140
161
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
141
162
  }, unmarshalCredential);
142
163
  /**
143
- * Get a set of credentials.
164
+ * Get credentials. Retrieve an existing set of credentials, identified by the
165
+ * `credential_id`. The credentials themselves, as well as their metadata
166
+ * (protocol, namespace ID etc), are returned in the response.
144
167
  *
145
168
  * @param request - The request {@link GetCredentialRequest}
146
169
  * @returns A Promise of Credential
@@ -110,7 +110,7 @@ class API extends API$1 {
110
110
  * @param options - The waiting options
111
111
  * @returns A Promise of DatabaseBackup
112
112
  */
113
- this.waitForDatabaseBackup = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status))), this.getDatabaseBackup, request, options);
113
+ this.waitForDatabaseBackup = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status))), this.getDatabaseBackup, request, options);
114
114
  /**
115
115
  * Update a database backup. Update the parameters of a backup, including name
116
116
  * and expiration date.
@@ -228,7 +228,7 @@ class API extends API$1 {
228
228
  * @param options - The waiting options
229
229
  * @returns A Promise of Instance
230
230
  */
231
- this.waitForInstance = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))), this.getInstance, request, options);
231
+ this.waitForInstance = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))), this.getInstance, request, options);
232
232
  /**
233
233
  * Create a Database Instance. Create a new Database Instance. You must set
234
234
  * the `engine`, `user_name`, `password` and `node_type` parameters.
@@ -374,7 +374,7 @@ class API extends API$1 {
374
374
  * @param options - The waiting options
375
375
  * @returns A Promise of ReadReplica
376
376
  */
377
- this.waitForReadReplica = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!READ_REPLICA_TRANSIENT_STATUSES.includes(res.status))), this.getReadReplica, request, options);
377
+ this.waitForReadReplica = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!READ_REPLICA_TRANSIENT_STATUSES.includes(res.status))), this.getReadReplica, request, options);
378
378
  /**
379
379
  * Delete a Read Replica. Delete a Read Replica of a Database Instance. You
380
380
  * must specify the `region` and `read_replica_id` parameters of the Read
@@ -468,7 +468,7 @@ class API extends API$1 {
468
468
  * @param options - The waiting options
469
469
  * @returns A Promise of InstanceLog
470
470
  */
471
- this.waitForInstanceLog = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status))), this.getInstanceLog, request, options);
471
+ this.waitForInstanceLog = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status))), this.getInstanceLog, request, options);
472
472
  /**
473
473
  * Purge remote Database Instance logs. Purge a given remote log from a
474
474
  * Database Instance. You can specify the `log_name` of the log you wish to
@@ -759,7 +759,7 @@ class API extends API$1 {
759
759
  * @param options - The waiting options
760
760
  * @returns A Promise of Snapshot
761
761
  */
762
- this.waitForSnapshot = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))), this.getSnapshot, request, options);
762
+ this.waitForSnapshot = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))), this.getSnapshot, request, options);
763
763
  /**
764
764
  * Create a Database Instance snapshot. Create a new snapshot of a Database
765
765
  * Instance. You must define the `name` parameter in the request.
@@ -66,7 +66,7 @@ class API extends API$1 {
66
66
  * @param options - The waiting options
67
67
  * @returns A Promise of Cluster
68
68
  */
69
- this.waitForCluster = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))), this.getCluster, request, options);
69
+ this.waitForCluster = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))), this.getCluster, request, options);
70
70
  this.pageOfListClusters = function (request) {
71
71
  if (request === void 0) {
72
72
  request = {};
@@ -59,7 +59,7 @@ class API extends API$1 {
59
59
  * @param options - The waiting options
60
60
  * @returns A Promise of Namespace
61
61
  */
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);
62
+ this.waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
63
63
  /**
64
64
  * Create a new namespace.
65
65
  *
@@ -135,7 +135,7 @@ class API extends API$1 {
135
135
  * @param options - The waiting options
136
136
  * @returns A Promise of Image
137
137
  */
138
- this.waitForImage = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!IMAGE_TRANSIENT_STATUSES.includes(res.status))), this.getImage, request, options);
138
+ this.waitForImage = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!IMAGE_TRANSIENT_STATUSES.includes(res.status))), this.getImage, request, options);
139
139
  /**
140
140
  * Update an existing image. Update the image associated with the given id.
141
141
  *
@@ -187,7 +187,7 @@ class API extends API$1 {
187
187
  * @param options - The waiting options
188
188
  * @returns A Promise of Tag
189
189
  */
190
- this.waitForTag = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!TAG_TRANSIENT_STATUSES.includes(res.status))), this.getTag, request, options);
190
+ this.waitForTag = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TAG_TRANSIENT_STATUSES.includes(res.status))), this.getTag, request, options);
191
191
  /**
192
192
  * Delete a tag. Delete the tag associated with the given id.
193
193
  *
@@ -1,7 +1,7 @@
1
1
  import { API as API$1 } from '../../../scw/api.js';
2
2
  import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
3
3
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
- import { marshalCreateSecretRequest, unmarshalSecret, marshalUpdateSecretRequest, unmarshalListSecretsResponse, marshalCreateSecretVersionRequest, unmarshalSecretVersion, marshalUpdateSecretVersionRequest, unmarshalListSecretVersionsResponse, unmarshalAccessSecretVersionResponse } from './marshalling.gen.js';
4
+ import { marshalCreateSecretRequest, unmarshalSecret, marshalUpdateSecretRequest, unmarshalListSecretsResponse, marshalAddSecretOwnerRequest, marshalCreateSecretVersionRequest, unmarshalSecretVersion, marshalUpdateSecretVersionRequest, unmarshalListSecretVersionsResponse, unmarshalAccessSecretVersionResponse } from './marshalling.gen.js';
5
5
 
6
6
  // This file was automatically generated. DO NOT EDIT.
7
7
  const jsonContentHeaders = {
@@ -74,7 +74,7 @@ class API extends API$1 {
74
74
  return _this.client.fetch({
75
75
  method: 'GET',
76
76
  path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/secrets`,
77
- urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['tags', request.tags])
77
+ urlParams: urlParams(['is_managed', request.isManaged], ['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['tags', request.tags])
78
78
  }, unmarshalListSecretsResponse);
79
79
  };
80
80
  /**
@@ -101,6 +101,17 @@ class API extends API$1 {
101
101
  method: 'DELETE',
102
102
  path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}`
103
103
  });
104
+ /**
105
+ * Allow a product to use the secret.
106
+ *
107
+ * @param request - The request {@link AddSecretOwnerRequest}
108
+ */
109
+ this.addSecretOwner = request => this.client.fetch({
110
+ body: JSON.stringify(marshalAddSecretOwnerRequest(request, this.client.settings)),
111
+ headers: jsonContentHeaders,
112
+ method: 'POST',
113
+ path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/add-owner`
114
+ });
104
115
  /**
105
116
  * Create a version. Create a version of a given secret specified by the
106
117
  * `region` and `secret_id` parameters.
@@ -179,19 +190,6 @@ class API extends API$1 {
179
190
  * @returns A Promise of ListSecretVersionsResponse
180
191
  */
181
192
  this.listSecretVersionsByName = request => enrichForPagination('versions', this.pageOfListSecretVersionsByName, request);
182
- /**
183
- * Delete a version. Delete a secret's version and the sensitive data
184
- * contained in it. Deleting a version is permanent and cannot be undone.
185
- *
186
- * @param request - The request {@link DestroySecretVersionRequest}
187
- * @returns A Promise of SecretVersion
188
- */
189
- this.destroySecretVersion = request => this.client.fetch({
190
- body: '{}',
191
- headers: jsonContentHeaders,
192
- method: 'POST',
193
- path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/destroy`
194
- }, unmarshalSecretVersion);
195
193
  /**
196
194
  * Enable a version. Make a specific version accessible. You must specify the
197
195
  * `region`, `secret_id` and `revision` parameters.
@@ -242,6 +240,19 @@ class API extends API$1 {
242
240
  method: 'GET',
243
241
  path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}/versions/${validatePathParam('revision', request.revision)}/access`
244
242
  }, unmarshalAccessSecretVersionResponse);
243
+ /**
244
+ * Delete a version. Delete a secret's version and the sensitive data
245
+ * contained in it. Deleting a version is permanent and cannot be undone.
246
+ *
247
+ * @param request - The request {@link DestroySecretVersionRequest}
248
+ * @returns A Promise of SecretVersion
249
+ */
250
+ this.destroySecretVersion = request => this.client.fetch({
251
+ body: '{}',
252
+ headers: jsonContentHeaders,
253
+ method: 'POST',
254
+ path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam('secretId', request.secretId)}/versions/${validatePathParam('revision', request.revision)}/destroy`
255
+ }, unmarshalSecretVersion);
245
256
  }
246
257
  /** Lists the available regions of the API. */
247
258
  }
@@ -10,6 +10,7 @@ const unmarshalSecret = data => {
10
10
  createdAt: unmarshalDate(data.created_at),
11
11
  description: data.description,
12
12
  id: data.id,
13
+ isManaged: data.is_managed,
13
14
  name: data.name,
14
15
  projectId: data.project_id,
15
16
  region: data.region,
@@ -26,6 +27,7 @@ const unmarshalSecretVersion = data => {
26
27
  return {
27
28
  createdAt: unmarshalDate(data.created_at),
28
29
  description: data.description,
30
+ isLatest: data.is_latest,
29
31
  revision: data.revision,
30
32
  secretId: data.secret_id,
31
33
  status: data.status,
@@ -38,6 +40,7 @@ const unmarshalAccessSecretVersionResponse = data => {
38
40
  }
39
41
  return {
40
42
  data: data.data,
43
+ dataCrc32: data.data_crc32,
41
44
  revision: data.revision,
42
45
  secretId: data.secret_id
43
46
  };
@@ -67,6 +70,9 @@ const marshalPasswordGenerationParams = (request, defaults) => ({
67
70
  no_lowercase_letters: request.noLowercaseLetters,
68
71
  no_uppercase_letters: request.noUppercaseLetters
69
72
  });
73
+ const marshalAddSecretOwnerRequest = (request, defaults) => ({
74
+ product_name: request.productName
75
+ });
70
76
  const marshalCreateSecretRequest = (request, defaults) => ({
71
77
  description: request.description,
72
78
  name: request.name,
@@ -75,6 +81,7 @@ const marshalCreateSecretRequest = (request, defaults) => ({
75
81
  });
76
82
  const marshalCreateSecretVersionRequest = (request, defaults) => ({
77
83
  data: request.data,
84
+ data_crc32: request.dataCrc32,
78
85
  description: request.description,
79
86
  disable_previous: request.disablePrevious,
80
87
  ...resolveOneOf([{
@@ -91,4 +98,4 @@ const marshalUpdateSecretVersionRequest = (request, defaults) => ({
91
98
  description: request.description
92
99
  });
93
100
 
94
- export { marshalCreateSecretRequest, marshalCreateSecretVersionRequest, marshalUpdateSecretRequest, marshalUpdateSecretVersionRequest, unmarshalAccessSecretVersionResponse, unmarshalListSecretVersionsResponse, unmarshalListSecretsResponse, unmarshalSecret, unmarshalSecretVersion };
101
+ export { marshalAddSecretOwnerRequest, marshalCreateSecretRequest, marshalCreateSecretVersionRequest, marshalUpdateSecretRequest, marshalUpdateSecretVersionRequest, unmarshalAccessSecretVersionResponse, unmarshalListSecretVersionsResponse, unmarshalListSecretsResponse, unmarshalSecret, unmarshalSecretVersion };
@@ -53,7 +53,7 @@ class API extends API$1 {
53
53
  * @param options - The waiting options
54
54
  * @returns A Promise of Email
55
55
  */
56
- this.waitForEmail = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!EMAIL_TRANSIENT_STATUSES.includes(res.status))), this.getEmail, request, options);
56
+ this.waitForEmail = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!EMAIL_TRANSIENT_STATUSES.includes(res.status))), this.getEmail, request, options);
57
57
  this.pageOfListEmails = function (request) {
58
58
  if (request === void 0) {
59
59
  request = {};
@@ -138,7 +138,7 @@ class API extends API$1 {
138
138
  * @param options - The waiting options
139
139
  * @returns A Promise of Domain
140
140
  */
141
- this.waitForDomain = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
141
+ this.waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
142
142
  this.pageOfListDomains = function (request) {
143
143
  if (request === void 0) {
144
144
  request = {};
@@ -84,7 +84,7 @@ class API extends API$1 {
84
84
  * @param options - The waiting options
85
85
  * @returns A Promise of Human
86
86
  */
87
- this.waitForHuman = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!HUMAN_TRANSIENT_STATUSES.includes(res.status))), this.getHuman, request, options);
87
+ this.waitForHuman = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HUMAN_TRANSIENT_STATUSES.includes(res.status))), this.getHuman, request, options);
88
88
  /**
89
89
  * Create a new human.
90
90
  *
@@ -25,7 +25,10 @@ class API extends API$1 {
25
25
  }, unmarshalListPrivateNetworksResponse);
26
26
  };
27
27
  /**
28
- * List private networks.
28
+ * List Private Networks. List existing Private Networks in a specified
29
+ * Availability Zone. By default, the Private Networks returned in the list
30
+ * are ordered by creation date in ascending order, though this can be
31
+ * modified via the order_by field.
29
32
  *
30
33
  * @param request - The request {@link ListPrivateNetworksRequest}
31
34
  * @returns A Promise of ListPrivateNetworksResponse
@@ -37,7 +40,8 @@ class API extends API$1 {
37
40
  return enrichForPagination('privateNetworks', _this.pageOfListPrivateNetworks, request);
38
41
  };
39
42
  /**
40
- * Create a private network.
43
+ * Create a Private Network. Create a new Private Network. Once created, you
44
+ * can attach Scaleway resources in the same Availability Zone.
41
45
  *
42
46
  * @param request - The request {@link CreatePrivateNetworkRequest}
43
47
  * @returns A Promise of PrivateNetwork
@@ -54,7 +58,9 @@ class API extends API$1 {
54
58
  }, unmarshalPrivateNetwork);
55
59
  };
56
60
  /**
57
- * Get a private network.
61
+ * Get a Private Network. Retrieve information about an existing Private
62
+ * Network, specified by its Private Network ID. Its full details are returned
63
+ * in the response object.
58
64
  *
59
65
  * @param request - The request {@link GetPrivateNetworkRequest}
60
66
  * @returns A Promise of PrivateNetwork
@@ -64,7 +70,8 @@ class API extends API$1 {
64
70
  path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
65
71
  }, unmarshalPrivateNetwork);
66
72
  /**
67
- * Update private network.
73
+ * Update Private Network. Update parameters (such as name or tags) of an
74
+ * existing Private Network, specified by its Private Network ID.
68
75
  *
69
76
  * @param request - The request {@link UpdatePrivateNetworkRequest}
70
77
  * @returns A Promise of PrivateNetwork
@@ -76,7 +83,8 @@ class API extends API$1 {
76
83
  path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
77
84
  }, unmarshalPrivateNetwork);
78
85
  /**
79
- * Delete a private network.
86
+ * Delete a Private Network. Delete an existing Private Network. Note that you
87
+ * must first detach all resources from the network, in order to delete it.
80
88
  *
81
89
  * @param request - The request {@link DeletePrivateNetworkRequest}
82
90
  */
@@ -59,7 +59,7 @@ class API extends API$1 {
59
59
  * @param options - The waiting options
60
60
  * @returns A Promise of Gateway
61
61
  */
62
- this.waitForGateway = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!GATEWAY_TRANSIENT_STATUSES.includes(res.status))), this.getGateway, request, options);
62
+ this.waitForGateway = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!GATEWAY_TRANSIENT_STATUSES.includes(res.status))), this.getGateway, request, options);
63
63
  /**
64
64
  * Create a Public Gateway. Create a new Public Gateway in the specified
65
65
  * Scaleway Project, defining its **name**, **type** and other configuration
@@ -165,7 +165,7 @@ class API extends API$1 {
165
165
  * @param options - The waiting options
166
166
  * @returns A Promise of GatewayNetwork
167
167
  */
168
- this.waitForGatewayNetwork = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!GATEWAY_NETWORK_TRANSIENT_STATUSES.includes(res.status))), this.getGatewayNetwork, request, options);
168
+ this.waitForGatewayNetwork = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!GATEWAY_NETWORK_TRANSIENT_STATUSES.includes(res.status))), this.getGatewayNetwork, request, options);
169
169
  /**
170
170
  * Attach a Public Gateway to a Private Network. Attach a specific Public
171
171
  * Gateway to a specific Private Network (create a GatewayNetwork). You can
@@ -67,7 +67,7 @@ class API extends API$1 {
67
67
  * @param options - The waiting options
68
68
  * @returns A Promise of Hosting
69
69
  */
70
- this.waitForHosting = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!HOSTING_TRANSIENT_STATUSES.includes(res.status))), this.getHosting, request, options);
70
+ this.waitForHosting = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HOSTING_TRANSIENT_STATUSES.includes(res.status))), this.getHosting, request, options);
71
71
  /**
72
72
  * Update a hosting.
73
73
  *
@@ -34,7 +34,7 @@ const resolveOneOf = function (list, isRequired) {
34
34
  isRequired = false;
35
35
  }
36
36
  const elt = list.find(obj => obj.value) || list.find(obj => obj.default);
37
- const value = (elt == null ? void 0 : elt.value) || (elt == null ? void 0 : elt.default);
37
+ const value = elt?.value || elt?.default;
38
38
  if (value) return {
39
39
  [elt.param]: value
40
40
  };