@scaleway/sdk 0.1.0-beta.21 → 0.1.0-beta.23

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.
@@ -1,7 +1,7 @@
1
1
  import { API } from '../../../scw/api.js';
2
2
  import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
3
3
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
- import { marshalCreateProjectRequest, unmarshalProject, unmarshalListProjectsResponse, marshalUpdateProjectRequest } from './marshalling.gen.js';
4
+ import { marshalCreateProjectRequest, unmarshalProject, unmarshalListProjectsResponse, marshalUpdateProjectRequest, unmarshalListMFAOTPsResponse, marshalCreateMFAOTPRequest, unmarshalMFAOTP, marshalValidateMFAOTPRequest, unmarshalValidateMFAOTPResponse } from './marshalling.gen.js';
5
5
 
6
6
  // This file was automatically generated. DO NOT EDIT.
7
7
  const jsonContentHeaders = {
@@ -69,6 +69,28 @@ class AccountV2GenAPI extends API {
69
69
  path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? _this.client.settings.defaultProjectId)}`
70
70
  }, unmarshalProject);
71
71
  };
72
+ this.pageOfListMFAOTPs = request => this.client.fetch({
73
+ method: 'GET',
74
+ path: `/account/v2/mfa/otps`,
75
+ urlParams: urlParams(['account_root_user_id', request.accountRootUserId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
76
+ }, unmarshalListMFAOTPsResponse);
77
+ this.listMFAOTPs = request => enrichForPagination('mfaOtps', this.pageOfListMFAOTPs, request);
78
+ this.createMFAOTP = request => this.client.fetch({
79
+ body: JSON.stringify(marshalCreateMFAOTPRequest(request, this.client.settings)),
80
+ headers: jsonContentHeaders,
81
+ method: 'POST',
82
+ path: `/account/v2/mfa/otps`
83
+ }, unmarshalMFAOTP);
84
+ this.validateMFAOTP = request => this.client.fetch({
85
+ body: JSON.stringify(marshalValidateMFAOTPRequest(request, this.client.settings)),
86
+ headers: jsonContentHeaders,
87
+ method: 'POST',
88
+ path: `/account/v2/mfa/otps/${validatePathParam('mfaOtpId', request.mfaOtpId)}/validate`
89
+ }, unmarshalValidateMFAOTPResponse);
90
+ this.deleteMFAOTP = request => this.client.fetch({
91
+ method: 'DELETE',
92
+ path: `/account/v2/mfa/otps/${validatePathParam('mfaOtpId', request.mfaOtpId)}`
93
+ });
72
94
  }
73
95
  }
74
96
 
@@ -2,6 +2,14 @@ import { isJSONObject } from '../../../helpers/json.js';
2
2
  import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.js';
3
3
 
4
4
  // This file was automatically generated. DO NOT EDIT.
5
+ const unmarshalMFAOTP = data => {
6
+ if (!isJSONObject(data)) {
7
+ throw new TypeError(`Unmarshalling the type 'MFAOTP' failed as data isn't a dictionary.`);
8
+ }
9
+ return {
10
+ id: data.id
11
+ };
12
+ };
5
13
  const unmarshalProject = data => {
6
14
  if (!isJSONObject(data)) {
7
15
  throw new TypeError(`Unmarshalling the type 'Project' failed as data isn't a dictionary.`);
@@ -15,6 +23,15 @@ const unmarshalProject = data => {
15
23
  updatedAt: unmarshalDate(data.updated_at)
16
24
  };
17
25
  };
26
+ const unmarshalListMFAOTPsResponse = data => {
27
+ if (!isJSONObject(data)) {
28
+ throw new TypeError(`Unmarshalling the type 'ListMFAOTPsResponse' failed as data isn't a dictionary.`);
29
+ }
30
+ return {
31
+ mfaOtps: unmarshalArrayOfObject(data.mfa_otps, unmarshalMFAOTP),
32
+ totalCount: data.total_count
33
+ };
34
+ };
18
35
  const unmarshalListProjectsResponse = data => {
19
36
  if (!isJSONObject(data)) {
20
37
  throw new TypeError(`Unmarshalling the type 'ListProjectsResponse' failed as data isn't a dictionary.`);
@@ -24,6 +41,17 @@ const unmarshalListProjectsResponse = data => {
24
41
  totalCount: data.total_count
25
42
  };
26
43
  };
44
+ const unmarshalValidateMFAOTPResponse = data => {
45
+ if (!isJSONObject(data)) {
46
+ throw new TypeError(`Unmarshalling the type 'ValidateMFAOTPResponse' failed as data isn't a dictionary.`);
47
+ }
48
+ return {
49
+ backupCodes: data.backup_codes
50
+ };
51
+ };
52
+ const marshalCreateMFAOTPRequest = (request, defaults) => ({
53
+ account_root_user_id: request.accountRootUserId
54
+ });
27
55
  const marshalCreateProjectRequest = (request, defaults) => ({
28
56
  description: request.description,
29
57
  name: request.name,
@@ -33,5 +61,8 @@ const marshalUpdateProjectRequest = (request, defaults) => ({
33
61
  description: request.description,
34
62
  name: request.name
35
63
  });
64
+ const marshalValidateMFAOTPRequest = (request, defaults) => ({
65
+ otp: request.otp
66
+ });
36
67
 
37
- export { marshalCreateProjectRequest, marshalUpdateProjectRequest, unmarshalListProjectsResponse, unmarshalProject };
68
+ export { marshalCreateMFAOTPRequest, marshalCreateProjectRequest, marshalUpdateProjectRequest, marshalValidateMFAOTPRequest, unmarshalListMFAOTPsResponse, unmarshalListProjectsResponse, unmarshalMFAOTP, unmarshalProject, unmarshalValidateMFAOTPResponse };
@@ -1,7 +1,9 @@
1
+ import { waitForResource } from '../../../internal/async/interval-retrier.js';
1
2
  import { API } from '../../../scw/api.js';
2
3
  import { unmarshalScwFile } from '../../../scw/custom-marshalling.js';
3
4
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
5
  import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
6
+ import { SSL_CERTIFICATE_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES } from './content.gen.js';
5
7
  import { unmarshalListDNSZonesResponse, marshalCreateDNSZoneRequest, unmarshalDNSZone, marshalUpdateDNSZoneRequest, marshalCloneDNSZoneRequest, unmarshalDeleteDNSZoneResponse, unmarshalListDNSZoneRecordsResponse, marshalUpdateDNSZoneRecordsRequest, unmarshalUpdateDNSZoneRecordsResponse, unmarshalListDNSZoneNameserversResponse, marshalUpdateDNSZoneNameserversRequest, unmarshalUpdateDNSZoneNameserversResponse, unmarshalClearDNSZoneRecordsResponse, marshalImportRawDNSZoneRequest, unmarshalImportRawDNSZoneResponse, marshalImportProviderDNSZoneRequest, unmarshalImportProviderDNSZoneResponse, marshalRefreshDNSZoneRequest, unmarshalRefreshDNSZoneResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, marshalCreateSSLCertificateRequest, unmarshalListSSLCertificatesResponse, unmarshalDeleteSSLCertificateResponse, unmarshalGetDNSZoneTsigKeyResponse, unmarshalListTasksResponse, marshalRegistrarApiBuyDomainsRequest, unmarshalOrderResponse, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiRegisterExternalDomainRequest, unmarshalRegisterExternalDomainResponse, unmarshalDeleteExternalDomainResponse, marshalRegistrarApiCheckContactsCompatibilityRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalListContactsResponse, unmarshalContact, marshalRegistrarApiUpdateContactRequest, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalDomain, marshalRegistrarApiUpdateDomainRequest, unmarshalGetDomainAuthCodeResponse, marshalRegistrarApiEnableDomainDNSSECRequest, unmarshalSearchAvailableDomainsResponse, marshalRegistrarApiCreateDomainHostRequest, unmarshalHost, unmarshalListDomainHostsResponse, marshalRegistrarApiUpdateDomainHostRequest } from './marshalling.gen.js';
6
8
 
7
9
  // This file was automatically generated. DO NOT EDIT.
@@ -122,6 +124,7 @@ class DomainV2Beta1GenAPI extends API {
122
124
  method: 'GET',
123
125
  path: `/domain/v2beta1/ssl-certificates/${validatePathParam('dnsZone', request.dnsZone)}`
124
126
  }, unmarshalSSLCertificate);
127
+ this.waitForSSLCertificate = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SSL_CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getSSLCertificate, request, options);
125
128
  this.createSSLCertificate = request => this.client.fetch({
126
129
  body: JSON.stringify(marshalCreateSSLCertificateRequest(request, this.client.settings)),
127
130
  headers: jsonContentHeaders,
@@ -272,6 +275,7 @@ class DomainRegistrarV2Beta1GenAPI extends API {
272
275
  method: 'GET',
273
276
  path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}`
274
277
  }, unmarshalDomain);
278
+ this.waitForDomain = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
275
279
  this.updateDomain = request => this.client.fetch({
276
280
  body: JSON.stringify(marshalRegistrarApiUpdateDomainRequest(request, this.client.settings)),
277
281
  headers: jsonContentHeaders,
@@ -4,7 +4,25 @@
4
4
  /** Lists transient statutes of the enum {@link DNSZoneStatus}. */
5
5
  const DNS_ZONE_TRANSIENT_STATUSES = ['pending'];
6
6
 
7
+ /** Lists transient statutes of the enum {@link DomainFeatureStatus}. */
8
+ const DOMAIN_FEATURE_TRANSIENT_STATUSES = ['enabling', 'disabling'];
9
+
10
+ /**
11
+ * Lists transient statutes of the enum
12
+ * {@link DomainRegistrationStatusTransferStatus}.
13
+ */
14
+ const DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES = ['pending', 'processing'];
15
+
16
+ /** Lists transient statutes of the enum {@link DomainStatus}. */
17
+ const DOMAIN_TRANSIENT_STATUSES = ['creating', 'renewing', 'xfering', 'expiring', 'updating', 'checking', 'deleting'];
18
+
7
19
  /** Lists transient statutes of the enum {@link HostStatus}. */
8
20
  const HOST_TRANSIENT_STATUSES = ['updating', 'deleting'];
9
21
 
10
- export { DNS_ZONE_TRANSIENT_STATUSES, HOST_TRANSIENT_STATUSES };
22
+ /** Lists transient statutes of the enum {@link SSLCertificateStatus}. */
23
+ const SSL_CERTIFICATE_TRANSIENT_STATUSES = ['pending'];
24
+
25
+ /** Lists transient statutes of the enum {@link TaskStatus}. */
26
+ const TASK_TRANSIENT_STATUSES = ['pending'];
27
+
28
+ export { DNS_ZONE_TRANSIENT_STATUSES, DOMAIN_FEATURE_TRANSIENT_STATUSES, DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, HOST_TRANSIENT_STATUSES, SSL_CERTIFICATE_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES };
@@ -1,2 +1,2 @@
1
1
  export { DomainV2Beta1GenAPI as API, DomainRegistrarV2Beta1GenAPI as RegistrarAPI } from './api.gen.js';
2
- export { DNS_ZONE_TRANSIENT_STATUSES, HOST_TRANSIENT_STATUSES } from './content.gen.js';
2
+ export { DNS_ZONE_TRANSIENT_STATUSES, DOMAIN_FEATURE_TRANSIENT_STATUSES, DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, HOST_TRANSIENT_STATUSES, SSL_CERTIFICATE_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES } from './content.gen.js';
@@ -3,7 +3,7 @@ import { API } from '../../../scw/api.js';
3
3
  import { unmarshalScwFile } from '../../../scw/custom-marshalling.js';
4
4
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
5
5
  import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
6
- import { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES } from './content.gen.js';
6
+ import { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from './content.gen.js';
7
7
  import { unmarshalListDatabaseEnginesResponse, unmarshalListNodeTypesResponse, unmarshalListDatabaseBackupsResponse, marshalCreateDatabaseBackupRequest, unmarshalDatabaseBackup, marshalUpdateDatabaseBackupRequest, marshalRestoreDatabaseBackupRequest, marshalUpgradeInstanceRequest, unmarshalInstance, unmarshalListInstancesResponse, marshalCreateInstanceRequest, marshalUpdateInstanceRequest, marshalCloneInstanceRequest, unmarshalInstanceMetrics, marshalCreateReadReplicaRequest, unmarshalReadReplica, marshalCreateReadReplicaEndpointRequest, marshalPrepareInstanceLogsRequest, unmarshalPrepareInstanceLogsResponse, unmarshalListInstanceLogsResponse, unmarshalInstanceLog, marshalPurgeInstanceLogsRequest, unmarshalListInstanceLogsDetailsResponse, marshalAddInstanceSettingsRequest, unmarshalAddInstanceSettingsResponse, marshalDeleteInstanceSettingsRequest, unmarshalDeleteInstanceSettingsResponse, marshalSetInstanceSettingsRequest, unmarshalSetInstanceSettingsResponse, unmarshalListInstanceACLRulesResponse, marshalAddInstanceACLRulesRequest, unmarshalAddInstanceACLRulesResponse, marshalSetInstanceACLRulesRequest, unmarshalSetInstanceACLRulesResponse, marshalDeleteInstanceACLRulesRequest, unmarshalDeleteInstanceACLRulesResponse, unmarshalListUsersResponse, marshalCreateUserRequest, unmarshalUser, marshalUpdateUserRequest, unmarshalListDatabasesResponse, marshalCreateDatabaseRequest, unmarshalDatabase, unmarshalListPrivilegesResponse, marshalSetPrivilegeRequest, unmarshalPrivilege, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalUpdateSnapshotRequest, marshalCreateInstanceFromSnapshotRequest, marshalCreateEndpointRequest, unmarshalEndpoint } from './marshalling.gen.js';
8
8
 
9
9
  // This file was automatically generated. DO NOT EDIT.
@@ -168,6 +168,7 @@ class RdbV1GenAPI extends API {
168
168
  method: 'GET',
169
169
  path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam('readReplicaId', request.readReplicaId)}`
170
170
  }, unmarshalReadReplica);
171
+ 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);
171
172
  this.deleteReadReplica = request => this.client.fetch({
172
173
  method: 'DELETE',
173
174
  path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam('readReplicaId', request.readReplicaId)}`
@@ -322,6 +323,7 @@ class RdbV1GenAPI extends API {
322
323
  method: 'GET',
323
324
  path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
324
325
  }, unmarshalSnapshot);
326
+ this.waitForSnapshot = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))), this.getSnapshot, request, options);
325
327
  this.createSnapshot = request => this.client.fetch({
326
328
  body: JSON.stringify(marshalCreateSnapshotRequest(request, this.client.settings)),
327
329
  headers: jsonContentHeaders,
@@ -13,4 +13,10 @@ const INSTANCE_TRANSIENT_STATUSES = ['provisioning', 'configuring', 'deleting',
13
13
  /** Lists transient statutes of the enum {@link MaintenanceStatus}. */
14
14
  const MAINTENANCE_TRANSIENT_STATUSES = ['pending'];
15
15
 
16
- export { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES };
16
+ /** Lists transient statutes of the enum {@link ReadReplicaStatus}. */
17
+ const READ_REPLICA_TRANSIENT_STATUSES = ['provisioning', 'initializing', 'deleting', 'configuring'];
18
+
19
+ /** Lists transient statutes of the enum {@link SnapshotStatus}. */
20
+ const SNAPSHOT_TRANSIENT_STATUSES = ['creating', 'restoring', 'deleting'];
21
+
22
+ export { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES };
@@ -1,2 +1,2 @@
1
1
  export { RdbV1GenAPI as API } from './api.gen.js';
2
- export { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES } from './content.gen.js';
2
+ export { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from './content.gen.js';
@@ -145,6 +145,17 @@ const unmarshalReadReplica = data => {
145
145
  status: data.status
146
146
  };
147
147
  };
148
+ const unmarshalUpgradableVersion = data => {
149
+ if (!isJSONObject(data)) {
150
+ throw new TypeError(`Unmarshalling the type 'UpgradableVersion' failed as data isn't a dictionary.`);
151
+ }
152
+ return {
153
+ id: data.id,
154
+ minorVersion: data.minor_version,
155
+ name: data.name,
156
+ version: data.version
157
+ };
158
+ };
148
159
  const unmarshalVolume = data => {
149
160
  if (!isJSONObject(data)) {
150
161
  throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
@@ -235,6 +246,7 @@ const unmarshalInstance = data => {
235
246
  settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting),
236
247
  status: data.status,
237
248
  tags: data.tags,
249
+ upgradableVersion: unmarshalArrayOfObject(data.upgradable_version, unmarshalUpgradableVersion),
238
250
  volume: data.volume ? unmarshalVolume(data.volume) : undefined
239
251
  };
240
252
  };
@@ -646,6 +658,9 @@ const marshalUpgradeInstanceRequest = (request, defaults) => ({
646
658
  }, {
647
659
  param: 'volume_type',
648
660
  value: request.volumeType
661
+ }, {
662
+ param: 'upgradable_version_id',
663
+ value: request.upgradableVersionId
649
664
  }])
650
665
  });
651
666
 
package/dist/index.cjs CHANGED
@@ -358,7 +358,7 @@ const assertValidSettings = obj => {
358
358
  if (typeof obj.userAgent !== 'string') throw new Error(`Invalid User-Agent`);
359
359
  };
360
360
 
361
- const version = 'v0.1.0-beta.20';
361
+ const version = 'v0.1.0-beta.22';
362
362
  const userAgent = `scaleway-sdk-js/${version}`;
363
363
 
364
364
  const isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';
@@ -1884,6 +1884,14 @@ var index$H = /*#__PURE__*/Object.freeze({
1884
1884
  });
1885
1885
 
1886
1886
  // This file was automatically generated. DO NOT EDIT.
1887
+ const unmarshalMFAOTP = data => {
1888
+ if (!isJSONObject(data)) {
1889
+ throw new TypeError(`Unmarshalling the type 'MFAOTP' failed as data isn't a dictionary.`);
1890
+ }
1891
+ return {
1892
+ id: data.id
1893
+ };
1894
+ };
1887
1895
  const unmarshalProject = data => {
1888
1896
  if (!isJSONObject(data)) {
1889
1897
  throw new TypeError(`Unmarshalling the type 'Project' failed as data isn't a dictionary.`);
@@ -1897,6 +1905,15 @@ const unmarshalProject = data => {
1897
1905
  updatedAt: unmarshalDate(data.updated_at)
1898
1906
  };
1899
1907
  };
1908
+ const unmarshalListMFAOTPsResponse = data => {
1909
+ if (!isJSONObject(data)) {
1910
+ throw new TypeError(`Unmarshalling the type 'ListMFAOTPsResponse' failed as data isn't a dictionary.`);
1911
+ }
1912
+ return {
1913
+ mfaOtps: unmarshalArrayOfObject(data.mfa_otps, unmarshalMFAOTP),
1914
+ totalCount: data.total_count
1915
+ };
1916
+ };
1900
1917
  const unmarshalListProjectsResponse = data => {
1901
1918
  if (!isJSONObject(data)) {
1902
1919
  throw new TypeError(`Unmarshalling the type 'ListProjectsResponse' failed as data isn't a dictionary.`);
@@ -1906,6 +1923,17 @@ const unmarshalListProjectsResponse = data => {
1906
1923
  totalCount: data.total_count
1907
1924
  };
1908
1925
  };
1926
+ const unmarshalValidateMFAOTPResponse = data => {
1927
+ if (!isJSONObject(data)) {
1928
+ throw new TypeError(`Unmarshalling the type 'ValidateMFAOTPResponse' failed as data isn't a dictionary.`);
1929
+ }
1930
+ return {
1931
+ backupCodes: data.backup_codes
1932
+ };
1933
+ };
1934
+ const marshalCreateMFAOTPRequest = (request, defaults) => ({
1935
+ account_root_user_id: request.accountRootUserId
1936
+ });
1909
1937
  const marshalCreateProjectRequest = (request, defaults) => ({
1910
1938
  description: request.description,
1911
1939
  name: request.name,
@@ -1915,6 +1943,9 @@ const marshalUpdateProjectRequest = (request, defaults) => ({
1915
1943
  description: request.description,
1916
1944
  name: request.name
1917
1945
  });
1946
+ const marshalValidateMFAOTPRequest = (request, defaults) => ({
1947
+ otp: request.otp
1948
+ });
1918
1949
 
1919
1950
  // This file was automatically generated. DO NOT EDIT.
1920
1951
  const jsonContentHeaders$k = {
@@ -1986,6 +2017,55 @@ class AccountV2GenAPI extends API {
1986
2017
  method: 'PATCH',
1987
2018
  path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
1988
2019
  }, unmarshalProject);
2020
+ pageOfListMFAOTPs = request => this.client.fetch({
2021
+ method: 'GET',
2022
+ path: `/account/v2/mfa/otps`,
2023
+ urlParams: urlParams(['account_root_user_id', request.accountRootUserId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
2024
+ }, unmarshalListMFAOTPsResponse);
2025
+
2026
+ /**
2027
+ * List MFA OTPs
2028
+ *
2029
+ * @param request - The request {@link ListMFAOTPsRequest}
2030
+ * @returns A Promise of ListMFAOTPsResponse
2031
+ */
2032
+ listMFAOTPs = request => enrichForPagination('mfaOtps', this.pageOfListMFAOTPs, request);
2033
+
2034
+ /**
2035
+ * Create MFA OTP
2036
+ *
2037
+ * @param request - The request {@link CreateMFAOTPRequest}
2038
+ * @returns A Promise of MFAOTP
2039
+ */
2040
+ createMFAOTP = request => this.client.fetch({
2041
+ body: JSON.stringify(marshalCreateMFAOTPRequest(request, this.client.settings)),
2042
+ headers: jsonContentHeaders$k,
2043
+ method: 'POST',
2044
+ path: `/account/v2/mfa/otps`
2045
+ }, unmarshalMFAOTP);
2046
+
2047
+ /**
2048
+ * Validate MFA OTP
2049
+ *
2050
+ * @param request - The request {@link ValidateMFAOTPRequest}
2051
+ * @returns A Promise of ValidateMFAOTPResponse
2052
+ */
2053
+ validateMFAOTP = request => this.client.fetch({
2054
+ body: JSON.stringify(marshalValidateMFAOTPRequest(request, this.client.settings)),
2055
+ headers: jsonContentHeaders$k,
2056
+ method: 'POST',
2057
+ path: `/account/v2/mfa/otps/${validatePathParam('mfaOtpId', request.mfaOtpId)}/validate`
2058
+ }, unmarshalValidateMFAOTPResponse);
2059
+
2060
+ /**
2061
+ * Delete MFA OTP
2062
+ *
2063
+ * @param request - The request {@link DeleteMFAOTPRequest}
2064
+ */
2065
+ deleteMFAOTP = request => this.client.fetch({
2066
+ method: 'DELETE',
2067
+ path: `/account/v2/mfa/otps/${validatePathParam('mfaOtpId', request.mfaOtpId)}`
2068
+ });
1989
2069
  }
1990
2070
 
1991
2071
  var index$G = /*#__PURE__*/Object.freeze({
@@ -3309,7 +3389,7 @@ const CONTAINER_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
3309
3389
  const CRON_TRANSIENT_STATUSES$1 = ['deleting', 'creating', 'pending'];
3310
3390
 
3311
3391
  /** Lists transient statutes of the enum {@link DomainStatus}. */
3312
- const DOMAIN_TRANSIENT_STATUSES$1 = ['deleting', 'creating', 'pending'];
3392
+ const DOMAIN_TRANSIENT_STATUSES$2 = ['deleting', 'creating', 'pending'];
3313
3393
 
3314
3394
  /** Lists transient statutes of the enum {@link NamespaceStatus}. */
3315
3395
  const NAMESPACE_TRANSIENT_STATUSES$2 = ['deleting', 'creating', 'pending'];
@@ -3837,7 +3917,7 @@ class ContainerV1Beta1GenAPI extends API {
3837
3917
  * @param options - The waiting options
3838
3918
  * @returns A Promise of Domain
3839
3919
  */
3840
- waitForDomain = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES$1.includes(res.status))), this.getDomain, request, options);
3920
+ waitForDomain = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES$2.includes(res.status))), this.getDomain, request, options);
3841
3921
 
3842
3922
  /**
3843
3923
  * Create a domain name binding
@@ -3939,7 +4019,7 @@ var index$A = /*#__PURE__*/Object.freeze({
3939
4019
  API: ContainerV1Beta1GenAPI,
3940
4020
  CONTAINER_TRANSIENT_STATUSES: CONTAINER_TRANSIENT_STATUSES,
3941
4021
  CRON_TRANSIENT_STATUSES: CRON_TRANSIENT_STATUSES$1,
3942
- DOMAIN_TRANSIENT_STATUSES: DOMAIN_TRANSIENT_STATUSES$1,
4022
+ DOMAIN_TRANSIENT_STATUSES: DOMAIN_TRANSIENT_STATUSES$2,
3943
4023
  NAMESPACE_TRANSIENT_STATUSES: NAMESPACE_TRANSIENT_STATUSES$2,
3944
4024
  TOKEN_TRANSIENT_STATUSES: TOKEN_TRANSIENT_STATUSES$1
3945
4025
  });
@@ -3949,6 +4029,33 @@ var index$z = /*#__PURE__*/Object.freeze({
3949
4029
  v1beta1: index$A
3950
4030
  });
3951
4031
 
4032
+ // This file was automatically generated. DO NOT EDIT.
4033
+ // If you have any remark or suggestion do not hesitate to open an issue.
4034
+
4035
+ /** Lists transient statutes of the enum {@link DNSZoneStatus}. */
4036
+ const DNS_ZONE_TRANSIENT_STATUSES = ['pending'];
4037
+
4038
+ /** Lists transient statutes of the enum {@link DomainFeatureStatus}. */
4039
+ const DOMAIN_FEATURE_TRANSIENT_STATUSES = ['enabling', 'disabling'];
4040
+
4041
+ /**
4042
+ * Lists transient statutes of the enum
4043
+ * {@link DomainRegistrationStatusTransferStatus}.
4044
+ */
4045
+ const DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES = ['pending', 'processing'];
4046
+
4047
+ /** Lists transient statutes of the enum {@link DomainStatus}. */
4048
+ const DOMAIN_TRANSIENT_STATUSES$1 = ['creating', 'renewing', 'xfering', 'expiring', 'updating', 'checking', 'deleting'];
4049
+
4050
+ /** Lists transient statutes of the enum {@link HostStatus}. */
4051
+ const HOST_TRANSIENT_STATUSES = ['updating', 'deleting'];
4052
+
4053
+ /** Lists transient statutes of the enum {@link SSLCertificateStatus}. */
4054
+ const SSL_CERTIFICATE_TRANSIENT_STATUSES = ['pending'];
4055
+
4056
+ /** Lists transient statutes of the enum {@link TaskStatus}. */
4057
+ const TASK_TRANSIENT_STATUSES$1 = ['pending'];
4058
+
3952
4059
  // This file was automatically generated. DO NOT EDIT.
3953
4060
  const unmarshalDomainRecordGeoIPConfigMatch = data => {
3954
4061
  if (!isJSONObject(data)) {
@@ -5379,6 +5486,15 @@ class DomainV2Beta1GenAPI extends API {
5379
5486
  path: `/domain/v2beta1/ssl-certificates/${validatePathParam('dnsZone', request.dnsZone)}`
5380
5487
  }, unmarshalSSLCertificate);
5381
5488
 
5489
+ /**
5490
+ * Waits for {@link SSLCertificate} to be in a final state.
5491
+ *
5492
+ * @param request - The request {@link GetSSLCertificateRequest}
5493
+ * @param options - The waiting options
5494
+ * @returns A Promise of SSLCertificate
5495
+ */
5496
+ waitForSSLCertificate = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SSL_CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getSSLCertificate, request, options);
5497
+
5382
5498
  /**
5383
5499
  * Create or return the zone TLS certificate
5384
5500
  *
@@ -5632,6 +5748,15 @@ class DomainRegistrarV2Beta1GenAPI extends API {
5632
5748
  path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}`
5633
5749
  }, unmarshalDomain$2);
5634
5750
 
5751
+ /**
5752
+ * Waits for {@link Domain} to be in a final state.
5753
+ *
5754
+ * @param request - The request {@link GetDomainRequest}
5755
+ * @param options - The waiting options
5756
+ * @returns A Promise of Domain
5757
+ */
5758
+ waitForDomain = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES$1.includes(res.status))), this.getDomain, request, options);
5759
+
5635
5760
  /**
5636
5761
  * Update the domain contacts or create a new one.<br/> If you add the same
5637
5762
  * contact for multiple roles. Only one ID will be created and used for all of
@@ -5831,21 +5956,17 @@ class DomainRegistrarV2Beta1GenAPI extends API {
5831
5956
  }, unmarshalHost);
5832
5957
  }
5833
5958
 
5834
- // This file was automatically generated. DO NOT EDIT.
5835
- // If you have any remark or suggestion do not hesitate to open an issue.
5836
-
5837
- /** Lists transient statutes of the enum {@link DNSZoneStatus}. */
5838
- const DNS_ZONE_TRANSIENT_STATUSES = ['pending'];
5839
-
5840
- /** Lists transient statutes of the enum {@link HostStatus}. */
5841
- const HOST_TRANSIENT_STATUSES = ['updating', 'deleting'];
5842
-
5843
5959
  var index$y = /*#__PURE__*/Object.freeze({
5844
5960
  __proto__: null,
5845
5961
  API: DomainV2Beta1GenAPI,
5846
5962
  RegistrarAPI: DomainRegistrarV2Beta1GenAPI,
5847
5963
  DNS_ZONE_TRANSIENT_STATUSES: DNS_ZONE_TRANSIENT_STATUSES,
5848
- HOST_TRANSIENT_STATUSES: HOST_TRANSIENT_STATUSES
5964
+ DOMAIN_FEATURE_TRANSIENT_STATUSES: DOMAIN_FEATURE_TRANSIENT_STATUSES,
5965
+ DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES: DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES,
5966
+ DOMAIN_TRANSIENT_STATUSES: DOMAIN_TRANSIENT_STATUSES$1,
5967
+ HOST_TRANSIENT_STATUSES: HOST_TRANSIENT_STATUSES,
5968
+ SSL_CERTIFICATE_TRANSIENT_STATUSES: SSL_CERTIFICATE_TRANSIENT_STATUSES,
5969
+ TASK_TRANSIENT_STATUSES: TASK_TRANSIENT_STATUSES$1
5849
5970
  });
5850
5971
 
5851
5972
  var index$x = /*#__PURE__*/Object.freeze({
@@ -7548,7 +7669,7 @@ class IamV1Alpha1GenAPI extends API {
7548
7669
  }, unmarshalUser$1);
7549
7670
 
7550
7671
  /**
7551
- * Delete a user
7672
+ * Delete a guest user from an organization
7552
7673
  *
7553
7674
  * @param request - The request {@link DeleteUserRequest}
7554
7675
  */
@@ -9944,7 +10065,7 @@ const SECURITY_GROUP_TRANSIENT_STATUSES = ['syncing'];
9944
10065
  const SERVER_TRANSIENT_STATUSES = ['starting', 'stopping'];
9945
10066
 
9946
10067
  /** Lists transient statutes of the enum {@link SnapshotState}. */
9947
- const SNAPSHOT_TRANSIENT_STATUSES = ['snapshotting', 'importing', 'exporting'];
10068
+ const SNAPSHOT_TRANSIENT_STATUSES$1 = ['snapshotting', 'importing', 'exporting'];
9948
10069
 
9949
10070
  /** Lists transient statutes of the enum {@link TaskStatus}. */
9950
10071
  const TASK_TRANSIENT_STATUSES = ['pending', 'started', 'retry'];
@@ -10015,7 +10136,7 @@ class InstanceV1UtilsAPI extends InstanceV1GenAPI {
10015
10136
  waitForSnapshot = (request, options) => tryAtIntervals(async () => {
10016
10137
  const value = await this.getSnapshot(request).then(res => res.snapshot);
10017
10138
  return {
10018
- done: !SNAPSHOT_TRANSIENT_STATUSES.includes(value.state),
10139
+ done: !SNAPSHOT_TRANSIENT_STATUSES$1.includes(value.state),
10019
10140
  value
10020
10141
  };
10021
10142
  }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
@@ -10279,7 +10400,7 @@ var index$q = /*#__PURE__*/Object.freeze({
10279
10400
  PRIVATE_NIC_TRANSIENT_STATUSES: PRIVATE_NIC_TRANSIENT_STATUSES,
10280
10401
  SECURITY_GROUP_TRANSIENT_STATUSES: SECURITY_GROUP_TRANSIENT_STATUSES,
10281
10402
  SERVER_TRANSIENT_STATUSES: SERVER_TRANSIENT_STATUSES,
10282
- SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES,
10403
+ SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES$1,
10283
10404
  TASK_TRANSIENT_STATUSES: TASK_TRANSIENT_STATUSES,
10284
10405
  VOLUME_SERVER_TRANSIENT_STATUSES: VOLUME_SERVER_TRANSIENT_STATUSES,
10285
10406
  VOLUME_TRANSIENT_STATUSES: VOLUME_TRANSIENT_STATUSES
@@ -14760,6 +14881,12 @@ const INSTANCE_TRANSIENT_STATUSES = ['provisioning', 'configuring', 'deleting',
14760
14881
  /** Lists transient statutes of the enum {@link MaintenanceStatus}. */
14761
14882
  const MAINTENANCE_TRANSIENT_STATUSES = ['pending'];
14762
14883
 
14884
+ /** Lists transient statutes of the enum {@link ReadReplicaStatus}. */
14885
+ const READ_REPLICA_TRANSIENT_STATUSES = ['provisioning', 'initializing', 'deleting', 'configuring'];
14886
+
14887
+ /** Lists transient statutes of the enum {@link SnapshotStatus}. */
14888
+ const SNAPSHOT_TRANSIENT_STATUSES = ['creating', 'restoring', 'deleting'];
14889
+
14763
14890
  // This file was automatically generated. DO NOT EDIT.
14764
14891
  const unmarshalEndpointDirectAccessDetails = data => {
14765
14892
  if (!isJSONObject(data)) {
@@ -14902,6 +15029,17 @@ const unmarshalReadReplica = data => {
14902
15029
  status: data.status
14903
15030
  };
14904
15031
  };
15032
+ const unmarshalUpgradableVersion = data => {
15033
+ if (!isJSONObject(data)) {
15034
+ throw new TypeError(`Unmarshalling the type 'UpgradableVersion' failed as data isn't a dictionary.`);
15035
+ }
15036
+ return {
15037
+ id: data.id,
15038
+ minorVersion: data.minor_version,
15039
+ name: data.name,
15040
+ version: data.version
15041
+ };
15042
+ };
14905
15043
  const unmarshalVolume = data => {
14906
15044
  if (!isJSONObject(data)) {
14907
15045
  throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
@@ -14992,6 +15130,7 @@ const unmarshalInstance = data => {
14992
15130
  settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting),
14993
15131
  status: data.status,
14994
15132
  tags: data.tags,
15133
+ upgradableVersion: unmarshalArrayOfObject(data.upgradable_version, unmarshalUpgradableVersion),
14995
15134
  volume: data.volume ? unmarshalVolume(data.volume) : undefined
14996
15135
  };
14997
15136
  };
@@ -15403,6 +15542,9 @@ const marshalUpgradeInstanceRequest = (request, defaults) => ({
15403
15542
  }, {
15404
15543
  param: 'volume_type',
15405
15544
  value: request.volumeType
15545
+ }, {
15546
+ param: 'upgradable_version_id',
15547
+ value: request.upgradableVersionId
15406
15548
  }])
15407
15549
  });
15408
15550
 
@@ -15539,8 +15681,8 @@ class RdbV1GenAPI extends API {
15539
15681
  }, unmarshalDatabaseBackup);
15540
15682
 
15541
15683
  /**
15542
- * Upgrade your current `node_type` or enable high availability on your
15543
- * standalone database instance.
15684
+ * Upgrade your current instance specifications like node type, high
15685
+ * availability, volume, or db engine version.
15544
15686
  *
15545
15687
  * @param request - The request {@link UpgradeInstanceRequest}
15546
15688
  * @returns A Promise of Instance
@@ -15707,6 +15849,15 @@ class RdbV1GenAPI extends API {
15707
15849
  path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/read-replicas/${validatePathParam('readReplicaId', request.readReplicaId)}`
15708
15850
  }, unmarshalReadReplica);
15709
15851
 
15852
+ /**
15853
+ * Waits for {@link ReadReplica} to be in a final state.
15854
+ *
15855
+ * @param request - The request {@link GetReadReplicaRequest}
15856
+ * @param options - The waiting options
15857
+ * @returns A Promise of ReadReplica
15858
+ */
15859
+ waitForReadReplica = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!READ_REPLICA_TRANSIENT_STATUSES.includes(res.status))), this.getReadReplica, request, options);
15860
+
15710
15861
  /**
15711
15862
  * Delete a read replica
15712
15863
  *
@@ -16043,6 +16194,15 @@ class RdbV1GenAPI extends API {
16043
16194
  path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
16044
16195
  }, unmarshalSnapshot);
16045
16196
 
16197
+ /**
16198
+ * Waits for {@link Snapshot} to be in a final state.
16199
+ *
16200
+ * @param request - The request {@link GetSnapshotRequest}
16201
+ * @param options - The waiting options
16202
+ * @returns A Promise of Snapshot
16203
+ */
16204
+ waitForSnapshot = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))), this.getSnapshot, request, options);
16205
+
16046
16206
  /**
16047
16207
  * Create an instance snapshot
16048
16208
  *
@@ -16134,7 +16294,9 @@ var index$e = /*#__PURE__*/Object.freeze({
16134
16294
  DATABASE_BACKUP_TRANSIENT_STATUSES: DATABASE_BACKUP_TRANSIENT_STATUSES,
16135
16295
  INSTANCE_LOG_TRANSIENT_STATUSES: INSTANCE_LOG_TRANSIENT_STATUSES,
16136
16296
  INSTANCE_TRANSIENT_STATUSES: INSTANCE_TRANSIENT_STATUSES,
16137
- MAINTENANCE_TRANSIENT_STATUSES: MAINTENANCE_TRANSIENT_STATUSES
16297
+ MAINTENANCE_TRANSIENT_STATUSES: MAINTENANCE_TRANSIENT_STATUSES,
16298
+ READ_REPLICA_TRANSIENT_STATUSES: READ_REPLICA_TRANSIENT_STATUSES,
16299
+ SNAPSHOT_TRANSIENT_STATUSES: SNAPSHOT_TRANSIENT_STATUSES
16138
16300
  });
16139
16301
 
16140
16302
  var index$d = /*#__PURE__*/Object.freeze({
package/dist/index.d.ts CHANGED
@@ -1026,7 +1026,15 @@ declare namespace index$H {
1026
1026
  };
1027
1027
  }
1028
1028
 
1029
+ declare type ListMFAOTPsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
1029
1030
  declare type ListProjectsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
1031
+ /** List mfaot ps response */
1032
+ interface ListMFAOTPsResponse {
1033
+ /** The total number of MFA OTPs */
1034
+ totalCount: number;
1035
+ /** The paginated returned MFA OTPs */
1036
+ mfaOtps: Array<MFAOTP>;
1037
+ }
1030
1038
  /** List projects response */
1031
1039
  interface ListProjectsResponse {
1032
1040
  /** The total number of projects */
@@ -1034,6 +1042,11 @@ interface ListProjectsResponse {
1034
1042
  /** The paginated returned projects */
1035
1043
  projects: Array<Project>;
1036
1044
  }
1045
+ /** Mfaotp */
1046
+ interface MFAOTP {
1047
+ /** The ID of the MFA OTP */
1048
+ id: string;
1049
+ }
1037
1050
  /** Project */
1038
1051
  interface Project {
1039
1052
  /** The ID of the project */
@@ -1049,6 +1062,11 @@ interface Project {
1049
1062
  /** The description of the project */
1050
1063
  description: string;
1051
1064
  }
1065
+ /** Validate mfaotp response */
1066
+ interface ValidateMFAOTPResponse {
1067
+ /** The backup codes of the MFA OTP */
1068
+ backupCodes: Array<string>;
1069
+ }
1052
1070
  declare type CreateProjectRequest = {
1053
1071
  /** The name of the project */
1054
1072
  name: string;
@@ -1087,6 +1105,30 @@ declare type UpdateProjectRequest = {
1087
1105
  /** The description of the project */
1088
1106
  description?: string;
1089
1107
  };
1108
+ declare type ListMFAOTPsRequest = {
1109
+ /** The page number for the returned MFA OTPs */
1110
+ page?: number;
1111
+ /** The maximum number of MFA OTP per page */
1112
+ pageSize?: number;
1113
+ /** The sort order of the returned MFA OTPs */
1114
+ orderBy?: ListMFAOTPsRequestOrderBy;
1115
+ /** Filter out by a account root user ID */
1116
+ accountRootUserId: string;
1117
+ };
1118
+ declare type CreateMFAOTPRequest = {
1119
+ /** The account root user ID of the MFA OTP */
1120
+ accountRootUserId: string;
1121
+ };
1122
+ declare type ValidateMFAOTPRequest = {
1123
+ /** The MFA OTP ID */
1124
+ mfaOtpId: string;
1125
+ /** The code of the MFA OTP */
1126
+ otp: string;
1127
+ };
1128
+ declare type DeleteMFAOTPRequest = {
1129
+ /** The MFA OTP ID */
1130
+ mfaOtpId: string;
1131
+ };
1090
1132
 
1091
1133
  /**
1092
1134
  * Account API.
@@ -1132,27 +1174,74 @@ declare class AccountV2GenAPI extends API {
1132
1174
  * @returns A Promise of Project
1133
1175
  */
1134
1176
  updateProject: (request?: Readonly<UpdateProjectRequest>) => Promise<Project>;
1177
+ protected pageOfListMFAOTPs: (request: Readonly<ListMFAOTPsRequest>) => Promise<ListMFAOTPsResponse>;
1178
+ /**
1179
+ * List MFA OTPs
1180
+ *
1181
+ * @param request - The request {@link ListMFAOTPsRequest}
1182
+ * @returns A Promise of ListMFAOTPsResponse
1183
+ */
1184
+ listMFAOTPs: (request: Readonly<ListMFAOTPsRequest>) => Promise<ListMFAOTPsResponse> & {
1185
+ all: () => Promise<MFAOTP[]>;
1186
+ [Symbol.asyncIterator]: () => AsyncGenerator<MFAOTP[], void, void>;
1187
+ };
1188
+ /**
1189
+ * Create MFA OTP
1190
+ *
1191
+ * @param request - The request {@link CreateMFAOTPRequest}
1192
+ * @returns A Promise of MFAOTP
1193
+ */
1194
+ createMFAOTP: (request: Readonly<CreateMFAOTPRequest>) => Promise<MFAOTP>;
1195
+ /**
1196
+ * Validate MFA OTP
1197
+ *
1198
+ * @param request - The request {@link ValidateMFAOTPRequest}
1199
+ * @returns A Promise of ValidateMFAOTPResponse
1200
+ */
1201
+ validateMFAOTP: (request: Readonly<ValidateMFAOTPRequest>) => Promise<ValidateMFAOTPResponse>;
1202
+ /**
1203
+ * Delete MFA OTP
1204
+ *
1205
+ * @param request - The request {@link DeleteMFAOTPRequest}
1206
+ */
1207
+ deleteMFAOTP: (request: Readonly<DeleteMFAOTPRequest>) => Promise<void>;
1135
1208
  }
1136
1209
 
1210
+ type index$G_ListMFAOTPsRequestOrderBy = ListMFAOTPsRequestOrderBy;
1137
1211
  type index$G_ListProjectsRequestOrderBy = ListProjectsRequestOrderBy;
1212
+ type index$G_ListMFAOTPsResponse = ListMFAOTPsResponse;
1138
1213
  type index$G_ListProjectsResponse = ListProjectsResponse;
1214
+ type index$G_MFAOTP = MFAOTP;
1139
1215
  type index$G_Project = Project;
1216
+ type index$G_ValidateMFAOTPResponse = ValidateMFAOTPResponse;
1140
1217
  type index$G_CreateProjectRequest = CreateProjectRequest;
1141
1218
  type index$G_ListProjectsRequest = ListProjectsRequest;
1142
1219
  type index$G_GetProjectRequest = GetProjectRequest;
1143
1220
  type index$G_DeleteProjectRequest = DeleteProjectRequest;
1144
1221
  type index$G_UpdateProjectRequest = UpdateProjectRequest;
1222
+ type index$G_ListMFAOTPsRequest = ListMFAOTPsRequest;
1223
+ type index$G_CreateMFAOTPRequest = CreateMFAOTPRequest;
1224
+ type index$G_ValidateMFAOTPRequest = ValidateMFAOTPRequest;
1225
+ type index$G_DeleteMFAOTPRequest = DeleteMFAOTPRequest;
1145
1226
  declare namespace index$G {
1146
1227
  export {
1147
1228
  AccountV2GenAPI as API,
1229
+ index$G_ListMFAOTPsRequestOrderBy as ListMFAOTPsRequestOrderBy,
1148
1230
  index$G_ListProjectsRequestOrderBy as ListProjectsRequestOrderBy,
1231
+ index$G_ListMFAOTPsResponse as ListMFAOTPsResponse,
1149
1232
  index$G_ListProjectsResponse as ListProjectsResponse,
1233
+ index$G_MFAOTP as MFAOTP,
1150
1234
  index$G_Project as Project,
1235
+ index$G_ValidateMFAOTPResponse as ValidateMFAOTPResponse,
1151
1236
  index$G_CreateProjectRequest as CreateProjectRequest,
1152
1237
  index$G_ListProjectsRequest as ListProjectsRequest,
1153
1238
  index$G_GetProjectRequest as GetProjectRequest,
1154
1239
  index$G_DeleteProjectRequest as DeleteProjectRequest,
1155
1240
  index$G_UpdateProjectRequest as UpdateProjectRequest,
1241
+ index$G_ListMFAOTPsRequest as ListMFAOTPsRequest,
1242
+ index$G_CreateMFAOTPRequest as CreateMFAOTPRequest,
1243
+ index$G_ValidateMFAOTPRequest as ValidateMFAOTPRequest,
1244
+ index$G_DeleteMFAOTPRequest as DeleteMFAOTPRequest,
1156
1245
  };
1157
1246
  }
1158
1247
 
@@ -3219,7 +3308,7 @@ declare const CONTAINER_TRANSIENT_STATUSES: ContainerStatus[];
3219
3308
  /** Lists transient statutes of the enum {@link CronStatus}. */
3220
3309
  declare const CRON_TRANSIENT_STATUSES$1: CronStatus$1[];
3221
3310
  /** Lists transient statutes of the enum {@link DomainStatus}. */
3222
- declare const DOMAIN_TRANSIENT_STATUSES$1: DomainStatus$3[];
3311
+ declare const DOMAIN_TRANSIENT_STATUSES$2: DomainStatus$3[];
3223
3312
  /** Lists transient statutes of the enum {@link NamespaceStatus}. */
3224
3313
  declare const NAMESPACE_TRANSIENT_STATUSES$2: NamespaceStatus$2[];
3225
3314
  /** Lists transient statutes of the enum {@link TokenStatus}. */
@@ -3243,7 +3332,7 @@ declare namespace index$A {
3243
3332
  ContainerV1Beta1GenAPI as API,
3244
3333
  index$A_CONTAINER_TRANSIENT_STATUSES as CONTAINER_TRANSIENT_STATUSES,
3245
3334
  CRON_TRANSIENT_STATUSES$1 as CRON_TRANSIENT_STATUSES,
3246
- DOMAIN_TRANSIENT_STATUSES$1 as DOMAIN_TRANSIENT_STATUSES,
3335
+ DOMAIN_TRANSIENT_STATUSES$2 as DOMAIN_TRANSIENT_STATUSES,
3247
3336
  NAMESPACE_TRANSIENT_STATUSES$2 as NAMESPACE_TRANSIENT_STATUSES,
3248
3337
  TOKEN_TRANSIENT_STATUSES$1 as TOKEN_TRANSIENT_STATUSES,
3249
3338
  index$A_ContainerPrivacy as ContainerPrivacy,
@@ -3323,7 +3412,7 @@ declare type DomainRecordType = 'unknown' | 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SR
3323
3412
  declare type DomainRegistrationStatusTransferStatus = 'status_unknown' | 'pending' | 'waiting_vote' | 'rejected' | 'processing' | 'done';
3324
3413
  declare type DomainStatus$2 = 'status_unknown' | 'active' | 'creating' | 'create_error' | 'renewing' | 'renew_error' | 'xfering' | 'xfer_error' | 'expired' | 'expiring' | 'updating' | 'checking' | 'locked' | 'deleting';
3325
3414
  declare type HostStatus = 'unknown_status' | 'active' | 'updating' | 'deleting';
3326
- declare type LanguageCode = 'unknown_language_code' | 'en_US' | 'fr_FR';
3415
+ declare type LanguageCode = 'unknown_language_code' | 'en_US' | 'fr_FR' | 'de_DE';
3327
3416
  declare type ListDNSZoneRecordsRequestOrderBy = 'name_asc' | 'name_desc';
3328
3417
  declare type ListDNSZonesRequestOrderBy = 'domain_asc' | 'domain_desc' | 'subdomain_asc' | 'subdomain_desc';
3329
3418
  declare type ListDomainsRequestOrderBy$1 = 'domain_asc' | 'domain_desc';
@@ -4512,6 +4601,14 @@ declare class DomainV2Beta1GenAPI extends API {
4512
4601
  * @returns A Promise of SSLCertificate
4513
4602
  */
4514
4603
  getSSLCertificate: (request: Readonly<GetSSLCertificateRequest>) => Promise<SSLCertificate>;
4604
+ /**
4605
+ * Waits for {@link SSLCertificate} to be in a final state.
4606
+ *
4607
+ * @param request - The request {@link GetSSLCertificateRequest}
4608
+ * @param options - The waiting options
4609
+ * @returns A Promise of SSLCertificate
4610
+ */
4611
+ waitForSSLCertificate: (request: Readonly<GetSSLCertificateRequest>, options?: Readonly<WaitForOptions<SSLCertificate>>) => Promise<SSLCertificate>;
4515
4612
  /**
4516
4613
  * Create or return the zone TLS certificate
4517
4614
  *
@@ -4682,6 +4779,14 @@ declare class DomainRegistrarV2Beta1GenAPI extends API {
4682
4779
  * @returns A Promise of Domain
4683
4780
  */
4684
4781
  getDomain: (request: Readonly<RegistrarApiGetDomainRequest>) => Promise<Domain$2>;
4782
+ /**
4783
+ * Waits for {@link Domain} to be in a final state.
4784
+ *
4785
+ * @param request - The request {@link GetDomainRequest}
4786
+ * @param options - The waiting options
4787
+ * @returns A Promise of Domain
4788
+ */
4789
+ waitForDomain: (request: Readonly<RegistrarApiGetDomainRequest>, options?: Readonly<WaitForOptions<Domain$2>>) => Promise<Domain$2>;
4685
4790
  /**
4686
4791
  * Update the domain contacts or create a new one.<br/> If you add the same
4687
4792
  * contact for multiple roles. Only one ID will be created and used for all of
@@ -4815,11 +4920,27 @@ declare class DomainRegistrarV2Beta1GenAPI extends API {
4815
4920
 
4816
4921
  /** Lists transient statutes of the enum {@link DNSZoneStatus}. */
4817
4922
  declare const DNS_ZONE_TRANSIENT_STATUSES: DNSZoneStatus[];
4923
+ /** Lists transient statutes of the enum {@link DomainFeatureStatus}. */
4924
+ declare const DOMAIN_FEATURE_TRANSIENT_STATUSES: DomainFeatureStatus[];
4925
+ /**
4926
+ * Lists transient statutes of the enum
4927
+ * {@link DomainRegistrationStatusTransferStatus}.
4928
+ */
4929
+ declare const DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES: DomainRegistrationStatusTransferStatus[];
4930
+ /** Lists transient statutes of the enum {@link DomainStatus}. */
4931
+ declare const DOMAIN_TRANSIENT_STATUSES$1: DomainStatus$2[];
4818
4932
  /** Lists transient statutes of the enum {@link HostStatus}. */
4819
4933
  declare const HOST_TRANSIENT_STATUSES: HostStatus[];
4934
+ /** Lists transient statutes of the enum {@link SSLCertificateStatus}. */
4935
+ declare const SSL_CERTIFICATE_TRANSIENT_STATUSES: SSLCertificateStatus[];
4936
+ /** Lists transient statutes of the enum {@link TaskStatus}. */
4937
+ declare const TASK_TRANSIENT_STATUSES$1: TaskStatus$1[];
4820
4938
 
4821
4939
  declare const index$y_DNS_ZONE_TRANSIENT_STATUSES: typeof DNS_ZONE_TRANSIENT_STATUSES;
4940
+ declare const index$y_DOMAIN_FEATURE_TRANSIENT_STATUSES: typeof DOMAIN_FEATURE_TRANSIENT_STATUSES;
4941
+ declare const index$y_DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES: typeof DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES;
4822
4942
  declare const index$y_HOST_TRANSIENT_STATUSES: typeof HOST_TRANSIENT_STATUSES;
4943
+ declare const index$y_SSL_CERTIFICATE_TRANSIENT_STATUSES: typeof SSL_CERTIFICATE_TRANSIENT_STATUSES;
4823
4944
  type index$y_ContactEmailStatus = ContactEmailStatus;
4824
4945
  type index$y_ContactExtensionFRMode = ContactExtensionFRMode;
4825
4946
  type index$y_ContactExtensionNLLegalForm = ContactExtensionNLLegalForm;
@@ -4973,7 +5094,12 @@ declare namespace index$y {
4973
5094
  DomainV2Beta1GenAPI as API,
4974
5095
  DomainRegistrarV2Beta1GenAPI as RegistrarAPI,
4975
5096
  index$y_DNS_ZONE_TRANSIENT_STATUSES as DNS_ZONE_TRANSIENT_STATUSES,
5097
+ index$y_DOMAIN_FEATURE_TRANSIENT_STATUSES as DOMAIN_FEATURE_TRANSIENT_STATUSES,
5098
+ index$y_DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES as DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES,
5099
+ DOMAIN_TRANSIENT_STATUSES$1 as DOMAIN_TRANSIENT_STATUSES,
4976
5100
  index$y_HOST_TRANSIENT_STATUSES as HOST_TRANSIENT_STATUSES,
5101
+ index$y_SSL_CERTIFICATE_TRANSIENT_STATUSES as SSL_CERTIFICATE_TRANSIENT_STATUSES,
5102
+ TASK_TRANSIENT_STATUSES$1 as TASK_TRANSIENT_STATUSES,
4977
5103
  index$y_ContactEmailStatus as ContactEmailStatus,
4978
5104
  index$y_ContactExtensionFRMode as ContactExtensionFRMode,
4979
5105
  index$y_ContactExtensionNLLegalForm as ContactExtensionNLLegalForm,
@@ -5481,7 +5607,7 @@ declare namespace index$v {
5481
5607
  declare type CronStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked' | 'creating' | 'pending';
5482
5608
  declare type DomainStatus$1 = 'unknown' | 'ready' | 'deleting' | 'error' | 'creating' | 'pending';
5483
5609
  declare type FunctionPrivacy = 'unknown_privacy' | 'public' | 'private';
5484
- declare type FunctionRuntime = 'unknown_runtime' | 'golang' | 'python' | 'python3' | 'node8' | 'node10' | 'node14' | 'node16' | 'node17' | 'python37' | 'python38' | 'python39' | 'python310' | 'go113' | 'go117' | 'go118' | 'node18';
5610
+ declare type FunctionRuntime = 'unknown_runtime' | 'golang' | 'python' | 'python3' | 'node8' | 'node10' | 'node14' | 'node16' | 'node17' | 'python37' | 'python38' | 'python39' | 'python310' | 'go113' | 'go117' | 'go118' | 'node18' | 'rust165' | 'go119' | 'python311';
5485
5611
  declare type FunctionStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked' | 'creating' | 'pending' | 'created';
5486
5612
  declare type ListCronsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
5487
5613
  declare type ListDomainsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'hostname_asc' | 'hostname_desc';
@@ -7366,7 +7492,7 @@ declare class IamV1Alpha1GenAPI extends API {
7366
7492
  */
7367
7493
  getUser: (request: Readonly<GetUserRequest>) => Promise<User$1>;
7368
7494
  /**
7369
- * Delete a user
7495
+ * Delete a guest user from an organization
7370
7496
  *
7371
7497
  * @param request - The request {@link DeleteUserRequest}
7372
7498
  */
@@ -9980,7 +10106,7 @@ declare const SECURITY_GROUP_TRANSIENT_STATUSES: SecurityGroupState[];
9980
10106
  /** Lists transient statutes of the enum {@link ServerState}. */
9981
10107
  declare const SERVER_TRANSIENT_STATUSES: ServerState[];
9982
10108
  /** Lists transient statutes of the enum {@link SnapshotState}. */
9983
- declare const SNAPSHOT_TRANSIENT_STATUSES: SnapshotState[];
10109
+ declare const SNAPSHOT_TRANSIENT_STATUSES$1: SnapshotState[];
9984
10110
  /** Lists transient statutes of the enum {@link TaskStatus}. */
9985
10111
  declare const TASK_TRANSIENT_STATUSES: TaskStatus[];
9986
10112
  /** Lists transient statutes of the enum {@link VolumeServerState}. */
@@ -9991,7 +10117,6 @@ declare const VOLUME_TRANSIENT_STATUSES: VolumeState[];
9991
10117
  declare const index$q_PRIVATE_NIC_TRANSIENT_STATUSES: typeof PRIVATE_NIC_TRANSIENT_STATUSES;
9992
10118
  declare const index$q_SECURITY_GROUP_TRANSIENT_STATUSES: typeof SECURITY_GROUP_TRANSIENT_STATUSES;
9993
10119
  declare const index$q_SERVER_TRANSIENT_STATUSES: typeof SERVER_TRANSIENT_STATUSES;
9994
- declare const index$q_SNAPSHOT_TRANSIENT_STATUSES: typeof SNAPSHOT_TRANSIENT_STATUSES;
9995
10120
  declare const index$q_TASK_TRANSIENT_STATUSES: typeof TASK_TRANSIENT_STATUSES;
9996
10121
  declare const index$q_VOLUME_SERVER_TRANSIENT_STATUSES: typeof VOLUME_SERVER_TRANSIENT_STATUSES;
9997
10122
  declare const index$q_VOLUME_TRANSIENT_STATUSES: typeof VOLUME_TRANSIENT_STATUSES;
@@ -10155,7 +10280,7 @@ declare namespace index$q {
10155
10280
  index$q_PRIVATE_NIC_TRANSIENT_STATUSES as PRIVATE_NIC_TRANSIENT_STATUSES,
10156
10281
  index$q_SECURITY_GROUP_TRANSIENT_STATUSES as SECURITY_GROUP_TRANSIENT_STATUSES,
10157
10282
  index$q_SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES,
10158
- index$q_SNAPSHOT_TRANSIENT_STATUSES as SNAPSHOT_TRANSIENT_STATUSES,
10283
+ SNAPSHOT_TRANSIENT_STATUSES$1 as SNAPSHOT_TRANSIENT_STATUSES,
10159
10284
  index$q_TASK_TRANSIENT_STATUSES as TASK_TRANSIENT_STATUSES,
10160
10285
  index$q_VOLUME_SERVER_TRANSIENT_STATUSES as VOLUME_SERVER_TRANSIENT_STATUSES,
10161
10286
  index$q_VOLUME_TRANSIENT_STATUSES as VOLUME_TRANSIENT_STATUSES,
@@ -17022,6 +17147,8 @@ interface Instance {
17022
17147
  status: InstanceStatus;
17023
17148
  /** Database engine of the database (PostgreSQL, MySQL, ...) */
17024
17149
  engine: string;
17150
+ /** Available database engine versions for upgrade */
17151
+ upgradableVersion: Array<UpgradableVersion>;
17025
17152
  /** @deprecated Endpoint of the instance */
17026
17153
  endpoint?: Endpoint$2;
17027
17154
  /** List of tags applied to the instance */
@@ -17304,6 +17431,12 @@ interface Snapshot {
17304
17431
  /** Region of this snapshot */
17305
17432
  region: Region;
17306
17433
  }
17434
+ interface UpgradableVersion {
17435
+ id: string;
17436
+ name: string;
17437
+ version: string;
17438
+ minorVersion: string;
17439
+ }
17307
17440
  /** User */
17308
17441
  interface User {
17309
17442
  /**
@@ -17419,30 +17552,38 @@ declare type UpgradeInstanceRequest = {
17419
17552
  * Node type of the instance you want to upgrade to.
17420
17553
  *
17421
17554
  * One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
17422
- * 'volumeSize', 'volumeType' could be set.
17555
+ * 'volumeSize', 'volumeType', 'upgradableVersionId' could be set.
17423
17556
  */
17424
17557
  nodeType?: string;
17425
17558
  /**
17426
17559
  * Set to true to enable high availability on your instance.
17427
17560
  *
17428
17561
  * One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
17429
- * 'volumeSize', 'volumeType' could be set.
17562
+ * 'volumeSize', 'volumeType', 'upgradableVersionId' could be set.
17430
17563
  */
17431
17564
  enableHa?: boolean;
17432
17565
  /**
17433
17566
  * Increase your block storage volume size.
17434
17567
  *
17435
17568
  * One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
17436
- * 'volumeSize', 'volumeType' could be set.
17569
+ * 'volumeSize', 'volumeType', 'upgradableVersionId' could be set.
17437
17570
  */
17438
17571
  volumeSize?: number;
17439
17572
  /**
17440
17573
  * Change your instance storage type.
17441
17574
  *
17442
17575
  * One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
17443
- * 'volumeSize', 'volumeType' could be set.
17576
+ * 'volumeSize', 'volumeType', 'upgradableVersionId' could be set.
17444
17577
  */
17445
17578
  volumeType?: VolumeType;
17579
+ /**
17580
+ * This will create a new Database Instance with same instance specification
17581
+ * as the current one and perform a Database Engine upgrade.
17582
+ *
17583
+ * One-of ('upgradeTarget'): at most one of 'nodeType', 'enableHa',
17584
+ * 'volumeSize', 'volumeType', 'upgradableVersionId' could be set.
17585
+ */
17586
+ upgradableVersionId?: string;
17446
17587
  };
17447
17588
  declare type ListInstancesRequest = {
17448
17589
  /** Region to target. If none is passed will use default region from the config */
@@ -17981,8 +18122,8 @@ declare class RdbV1GenAPI extends API {
17981
18122
  */
17982
18123
  exportDatabaseBackup: (request: Readonly<ExportDatabaseBackupRequest>) => Promise<DatabaseBackup>;
17983
18124
  /**
17984
- * Upgrade your current `node_type` or enable high availability on your
17985
- * standalone database instance.
18125
+ * Upgrade your current instance specifications like node type, high
18126
+ * availability, volume, or db engine version.
17986
18127
  *
17987
18128
  * @param request - The request {@link UpgradeInstanceRequest}
17988
18129
  * @returns A Promise of Instance
@@ -18083,6 +18224,14 @@ declare class RdbV1GenAPI extends API {
18083
18224
  * @returns A Promise of ReadReplica
18084
18225
  */
18085
18226
  getReadReplica: (request: Readonly<GetReadReplicaRequest>) => Promise<ReadReplica>;
18227
+ /**
18228
+ * Waits for {@link ReadReplica} to be in a final state.
18229
+ *
18230
+ * @param request - The request {@link GetReadReplicaRequest}
18231
+ * @param options - The waiting options
18232
+ * @returns A Promise of ReadReplica
18233
+ */
18234
+ waitForReadReplica: (request: Readonly<GetReadReplicaRequest>, options?: Readonly<WaitForOptions<ReadReplica>>) => Promise<ReadReplica>;
18086
18235
  /**
18087
18236
  * Delete a read replica
18088
18237
  *
@@ -18295,6 +18444,14 @@ declare class RdbV1GenAPI extends API {
18295
18444
  * @returns A Promise of Snapshot
18296
18445
  */
18297
18446
  getSnapshot: (request: Readonly<GetSnapshotRequest>) => Promise<Snapshot>;
18447
+ /**
18448
+ * Waits for {@link Snapshot} to be in a final state.
18449
+ *
18450
+ * @param request - The request {@link GetSnapshotRequest}
18451
+ * @param options - The waiting options
18452
+ * @returns A Promise of Snapshot
18453
+ */
18454
+ waitForSnapshot: (request: Readonly<GetSnapshotRequest>, options?: Readonly<WaitForOptions<Snapshot>>) => Promise<Snapshot>;
18298
18455
  /**
18299
18456
  * Create an instance snapshot
18300
18457
  *
@@ -18353,11 +18510,17 @@ declare const INSTANCE_LOG_TRANSIENT_STATUSES: InstanceLogStatus[];
18353
18510
  declare const INSTANCE_TRANSIENT_STATUSES: InstanceStatus[];
18354
18511
  /** Lists transient statutes of the enum {@link MaintenanceStatus}. */
18355
18512
  declare const MAINTENANCE_TRANSIENT_STATUSES: MaintenanceStatus[];
18513
+ /** Lists transient statutes of the enum {@link ReadReplicaStatus}. */
18514
+ declare const READ_REPLICA_TRANSIENT_STATUSES: ReadReplicaStatus[];
18515
+ /** Lists transient statutes of the enum {@link SnapshotStatus}. */
18516
+ declare const SNAPSHOT_TRANSIENT_STATUSES: SnapshotStatus[];
18356
18517
 
18357
18518
  declare const index$e_DATABASE_BACKUP_TRANSIENT_STATUSES: typeof DATABASE_BACKUP_TRANSIENT_STATUSES;
18358
18519
  declare const index$e_INSTANCE_LOG_TRANSIENT_STATUSES: typeof INSTANCE_LOG_TRANSIENT_STATUSES;
18359
18520
  declare const index$e_INSTANCE_TRANSIENT_STATUSES: typeof INSTANCE_TRANSIENT_STATUSES;
18360
18521
  declare const index$e_MAINTENANCE_TRANSIENT_STATUSES: typeof MAINTENANCE_TRANSIENT_STATUSES;
18522
+ declare const index$e_READ_REPLICA_TRANSIENT_STATUSES: typeof READ_REPLICA_TRANSIENT_STATUSES;
18523
+ declare const index$e_SNAPSHOT_TRANSIENT_STATUSES: typeof SNAPSHOT_TRANSIENT_STATUSES;
18361
18524
  type index$e_ACLRuleAction = ACLRuleAction;
18362
18525
  type index$e_ACLRuleDirection = ACLRuleDirection;
18363
18526
  type index$e_ACLRuleProtocol = ACLRuleProtocol;
@@ -18421,6 +18584,7 @@ type index$e_ReadReplicaEndpointSpecPrivateNetwork = ReadReplicaEndpointSpecPriv
18421
18584
  type index$e_SetInstanceACLRulesResponse = SetInstanceACLRulesResponse;
18422
18585
  type index$e_SetInstanceSettingsResponse = SetInstanceSettingsResponse;
18423
18586
  type index$e_Snapshot = Snapshot;
18587
+ type index$e_UpgradableVersion = UpgradableVersion;
18424
18588
  type index$e_User = User;
18425
18589
  type index$e_Volume = Volume;
18426
18590
  type index$e_ListDatabaseEnginesRequest = ListDatabaseEnginesRequest;
@@ -18482,6 +18646,8 @@ declare namespace index$e {
18482
18646
  index$e_INSTANCE_LOG_TRANSIENT_STATUSES as INSTANCE_LOG_TRANSIENT_STATUSES,
18483
18647
  index$e_INSTANCE_TRANSIENT_STATUSES as INSTANCE_TRANSIENT_STATUSES,
18484
18648
  index$e_MAINTENANCE_TRANSIENT_STATUSES as MAINTENANCE_TRANSIENT_STATUSES,
18649
+ index$e_READ_REPLICA_TRANSIENT_STATUSES as READ_REPLICA_TRANSIENT_STATUSES,
18650
+ index$e_SNAPSHOT_TRANSIENT_STATUSES as SNAPSHOT_TRANSIENT_STATUSES,
18485
18651
  index$e_ACLRuleAction as ACLRuleAction,
18486
18652
  index$e_ACLRuleDirection as ACLRuleDirection,
18487
18653
  index$e_ACLRuleProtocol as ACLRuleProtocol,
@@ -18551,6 +18717,7 @@ declare namespace index$e {
18551
18717
  index$e_SetInstanceACLRulesResponse as SetInstanceACLRulesResponse,
18552
18718
  index$e_SetInstanceSettingsResponse as SetInstanceSettingsResponse,
18553
18719
  index$e_Snapshot as Snapshot,
18720
+ index$e_UpgradableVersion as UpgradableVersion,
18554
18721
  index$e_User as User,
18555
18722
  index$e_Volume as Volume,
18556
18723
  index$e_ListDatabaseEnginesRequest as ListDatabaseEnginesRequest,
@@ -1,4 +1,4 @@
1
- const version = 'v0.1.0-beta.20';
1
+ const version = 'v0.1.0-beta.22';
2
2
  const userAgent = `scaleway-sdk-js/${version}`;
3
3
 
4
4
  export { userAgent, version };
@@ -32,11 +32,17 @@ function* pages(key, fetcher, request, firstPage) {
32
32
  * @param initial - The first page
33
33
  * @returns An async generator of resources arrays
34
34
  */
35
- async function* fetchPaginated(key, fetcher, request, initial) {
36
- if (initial === void 0) {
37
- initial = fetcher(request);
35
+ function fetchPaginated(key, fetcher, request, initial) {
36
+ try {
37
+ if (initial === void 0) {
38
+ initial = fetcher(request);
39
+ }
40
+ return async function* () {
41
+ yield* pages(key, fetcher, request, await initial);
42
+ }();
43
+ } catch (e) {
44
+ return Promise.reject(e);
38
45
  }
39
- yield* pages(key, fetcher, request, await initial);
40
46
  }
41
47
 
42
48
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk",
3
- "version": "0.1.0-beta.21",
3
+ "version": "0.1.0-beta.23",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Scaleway SDK.",
6
6
  "keywords": [
@@ -36,5 +36,5 @@
36
36
  "bundledDependencies": [
37
37
  "@scaleway/random-name"
38
38
  ],
39
- "gitHead": "3a524c526779830f3d1387073b857c9220e2c159"
39
+ "gitHead": "07d0b43461320b91752e77bacbcc2f6a3fdc95bf"
40
40
  }