@scaleway/sdk 2.69.0 → 2.71.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 (131) hide show
  1. package/dist/api/account/v3/api.gen.cjs +23 -0
  2. package/dist/api/account/v3/api.gen.d.ts +11 -1
  3. package/dist/api/account/v3/api.gen.js +24 -1
  4. package/dist/api/account/v3/index.gen.d.ts +1 -1
  5. package/dist/api/account/v3/marshalling.gen.cjs +171 -0
  6. package/dist/api/account/v3/marshalling.gen.d.ts +3 -1
  7. package/dist/api/account/v3/marshalling.gen.js +173 -2
  8. package/dist/api/account/v3/types.gen.d.ts +93 -0
  9. package/dist/api/applesilicon/v1alpha1/api.gen.cjs +3 -1
  10. package/dist/api/applesilicon/v1alpha1/api.gen.js +3 -1
  11. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +3 -2
  12. package/dist/api/baremetal/v1/api.gen.cjs +3 -1
  13. package/dist/api/baremetal/v1/api.gen.js +3 -1
  14. package/dist/api/baremetal/v1/marshalling.gen.cjs +4 -2
  15. package/dist/api/baremetal/v1/marshalling.gen.js +4 -2
  16. package/dist/api/baremetal/v1/types.gen.d.ts +65 -64
  17. package/dist/api/block/v1/api.gen.cjs +6 -2
  18. package/dist/api/block/v1/api.gen.js +6 -2
  19. package/dist/api/block/v1alpha1/api.gen.cjs +6 -2
  20. package/dist/api/block/v1alpha1/api.gen.js +6 -2
  21. package/dist/api/block/v1alpha1/marshalling.gen.cjs +0 -1
  22. package/dist/api/block/v1alpha1/marshalling.gen.d.ts +1 -2
  23. package/dist/api/block/v1alpha1/marshalling.gen.js +0 -1
  24. package/dist/api/cockpit/v1/marshalling.gen.cjs +4 -4
  25. package/dist/api/cockpit/v1/marshalling.gen.js +4 -4
  26. package/dist/api/cockpit/v1/types.gen.d.ts +3 -3
  27. package/dist/api/container/v1beta1/api.gen.cjs +18 -6
  28. package/dist/api/container/v1beta1/api.gen.js +18 -6
  29. package/dist/api/dedibox/v1/api.gen.cjs +9 -3
  30. package/dist/api/dedibox/v1/api.gen.js +9 -3
  31. package/dist/api/domain/v2beta1/api.gen.cjs +3 -1
  32. package/dist/api/domain/v2beta1/api.gen.js +3 -1
  33. package/dist/api/edge_services/v1beta1/api.gen.cjs +6 -2
  34. package/dist/api/edge_services/v1beta1/api.gen.js +6 -2
  35. package/dist/api/edge_services/v1beta1/types.gen.d.ts +1 -1
  36. package/dist/api/function/v1beta1/api.gen.cjs +18 -6
  37. package/dist/api/function/v1beta1/api.gen.js +18 -6
  38. package/dist/api/function/v1beta1/types.gen.d.ts +1 -1
  39. package/dist/api/iam/v1alpha1/api.gen.cjs +1 -0
  40. package/dist/api/iam/v1alpha1/api.gen.js +1 -0
  41. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  42. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +21 -14
  43. package/dist/api/iam/v1alpha1/marshalling.gen.js +21 -14
  44. package/dist/api/iam/v1alpha1/types.gen.d.ts +32 -6
  45. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +38 -12
  46. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +36 -11
  47. package/dist/api/iam/v1alpha1/validation-rules.gen.js +38 -12
  48. package/dist/api/inference/index.gen.cjs +4 -2
  49. package/dist/api/inference/index.gen.d.ts +1 -0
  50. package/dist/api/inference/index.gen.js +4 -2
  51. package/dist/api/inference/v1/api.gen.cjs +278 -0
  52. package/dist/api/inference/v1/api.gen.d.ts +140 -0
  53. package/dist/api/inference/v1/api.gen.js +278 -0
  54. package/dist/api/inference/v1/content.gen.cjs +13 -0
  55. package/dist/api/inference/v1/content.gen.d.ts +5 -0
  56. package/dist/api/inference/v1/content.gen.js +13 -0
  57. package/dist/api/inference/v1/index.gen.cjs +9 -0
  58. package/dist/api/inference/v1/index.gen.d.ts +4 -0
  59. package/dist/api/inference/v1/index.gen.js +9 -0
  60. package/dist/api/inference/v1/marshalling.gen.cjs +260 -0
  61. package/dist/api/inference/v1/marshalling.gen.d.ts +14 -0
  62. package/dist/api/inference/v1/marshalling.gen.js +260 -0
  63. package/dist/api/inference/v1/types.gen.d.ts +397 -0
  64. package/dist/api/inference/v1/validation-rules.gen.cjs +65 -0
  65. package/dist/api/inference/v1/validation-rules.gen.d.ts +57 -0
  66. package/dist/api/inference/v1/validation-rules.gen.js +65 -0
  67. package/dist/api/inference/v1beta1/api.gen.cjs +3 -1
  68. package/dist/api/inference/v1beta1/api.gen.js +3 -1
  69. package/dist/api/instance/v1/index.gen.d.ts +1 -1
  70. package/dist/api/instance/v1/marshalling.gen.cjs +13 -1
  71. package/dist/api/instance/v1/marshalling.gen.js +13 -1
  72. package/dist/api/instance/v1/types.gen.d.ts +10 -2
  73. package/dist/api/k8s/v1/api.gen.cjs +3 -1
  74. package/dist/api/k8s/v1/api.gen.js +3 -1
  75. package/dist/api/k8s/v1/marshalling.gen.cjs +1 -0
  76. package/dist/api/k8s/v1/marshalling.gen.js +1 -0
  77. package/dist/api/k8s/v1/types.gen.d.ts +5 -0
  78. package/dist/api/lb/v1/types.gen.d.ts +3 -3
  79. package/dist/api/mongodb/v1alpha1/api.gen.cjs +6 -2
  80. package/dist/api/mongodb/v1alpha1/api.gen.js +6 -2
  81. package/dist/api/qaas/v1alpha1/api.gen.cjs +6 -2
  82. package/dist/api/qaas/v1alpha1/api.gen.js +6 -2
  83. package/dist/api/rdb/v1/api.gen.cjs +6 -2
  84. package/dist/api/rdb/v1/api.gen.js +6 -2
  85. package/dist/api/redis/v1/api.gen.cjs +3 -1
  86. package/dist/api/redis/v1/api.gen.js +3 -1
  87. package/dist/api/registry/v1/api.gen.cjs +9 -3
  88. package/dist/api/registry/v1/api.gen.js +9 -3
  89. package/dist/api/secret/v1beta1/api.gen.cjs +32 -0
  90. package/dist/api/secret/v1beta1/api.gen.d.ts +17 -1
  91. package/dist/api/secret/v1beta1/api.gen.js +32 -0
  92. package/dist/api/secret/v1beta1/index.gen.d.ts +1 -1
  93. package/dist/api/secret/v1beta1/types.gen.d.ts +17 -0
  94. package/dist/api/serverless_sqldb/v1alpha1/api.gen.cjs +3 -1
  95. package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +3 -1
  96. package/dist/api/tem/v1alpha1/api.gen.cjs +93 -0
  97. package/dist/api/tem/v1alpha1/api.gen.d.ts +44 -1
  98. package/dist/api/tem/v1alpha1/api.gen.js +94 -1
  99. package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
  100. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +114 -0
  101. package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +7 -1
  102. package/dist/api/tem/v1alpha1/marshalling.gen.js +114 -0
  103. package/dist/api/tem/v1alpha1/types.gen.d.ts +157 -1
  104. package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +10 -0
  105. package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +9 -0
  106. package/dist/api/tem/v1alpha1/validation-rules.gen.js +10 -0
  107. package/dist/api/vpc/v2/api.gen.cjs +33 -0
  108. package/dist/api/vpc/v2/api.gen.d.ts +17 -1
  109. package/dist/api/vpc/v2/api.gen.js +34 -1
  110. package/dist/api/vpc/v2/index.gen.d.ts +1 -1
  111. package/dist/api/vpc/v2/marshalling.gen.cjs +59 -0
  112. package/dist/api/vpc/v2/marshalling.gen.d.ts +4 -1
  113. package/dist/api/vpc/v2/marshalling.gen.js +59 -0
  114. package/dist/api/vpc/v2/types.gen.d.ts +80 -0
  115. package/dist/api/vpc/v2/validation-rules.gen.cjs +18 -0
  116. package/dist/api/vpc/v2/validation-rules.gen.d.ts +17 -0
  117. package/dist/api/vpc/v2/validation-rules.gen.js +18 -0
  118. package/dist/api/vpcgw/v1/api.gen.cjs +3 -1
  119. package/dist/api/vpcgw/v1/api.gen.js +3 -1
  120. package/dist/api/vpcgw/v2/api.gen.cjs +3 -1
  121. package/dist/api/vpcgw/v2/api.gen.js +3 -1
  122. package/dist/api/webhosting/v1/api.gen.cjs +6 -2
  123. package/dist/api/webhosting/v1/api.gen.js +6 -2
  124. package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
  125. package/dist/api/webhosting/v1/marshalling.gen.cjs +27 -2
  126. package/dist/api/webhosting/v1/marshalling.gen.js +27 -2
  127. package/dist/api/webhosting/v1/types.gen.d.ts +64 -15
  128. package/dist/scw/constants.cjs +1 -1
  129. package/dist/scw/constants.d.ts +2 -2
  130. package/dist/scw/constants.js +1 -1
  131. package/package.json +2 -2
@@ -228,6 +228,14 @@ export interface ServerTypeCapabilities {
228
228
  /** List of supported boot types. */
229
229
  bootTypes: BootType[];
230
230
  }
231
+ export interface ServerTypeGPUInfo {
232
+ /** GPU manufacturer. */
233
+ gpuManufacturer: string;
234
+ /** GPU model name. */
235
+ gpuName: string;
236
+ /** RAM of a single GPU, in bytes. */
237
+ gpuMemory: number;
238
+ }
231
239
  export interface ServerTypeNetwork {
232
240
  /** List of available network interfaces. */
233
241
  interfaces: ServerTypeNetworkInterface[];
@@ -545,10 +553,10 @@ export interface ServerType {
545
553
  gpu?: number;
546
554
  /** Available RAM in bytes. */
547
555
  ram: number;
556
+ /** GPU information. */
557
+ gpuInfo?: ServerTypeGPUInfo;
548
558
  /** CPU architecture. */
549
559
  arch: Arch;
550
- /** True if it is a baremetal Instance. */
551
- baremetal: boolean;
552
560
  /** Network available for the Instance. */
553
561
  network?: ServerTypeNetwork;
554
562
  /** Capabilities. */
@@ -83,7 +83,9 @@ class API extends api.API {
83
83
  * @returns A Promise of Cluster
84
84
  */
85
85
  waitForCluster = (request, options) => intervalRetrier.waitForResource(
86
- options?.stop ?? ((res) => Promise.resolve(!content_gen.CLUSTER_TRANSIENT_STATUSES.includes(res.status))),
86
+ options?.stop ?? ((res) => Promise.resolve(
87
+ !content_gen.CLUSTER_TRANSIENT_STATUSES.includes(res.status)
88
+ )),
87
89
  this.getCluster,
88
90
  request,
89
91
  options
@@ -81,7 +81,9 @@ class API extends API$1 {
81
81
  * @returns A Promise of Cluster
82
82
  */
83
83
  waitForCluster = (request, options) => waitForResource(
84
- options?.stop ?? ((res) => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))),
84
+ options?.stop ?? ((res) => Promise.resolve(
85
+ !CLUSTER_TRANSIENT_STATUSES.includes(res.status)
86
+ )),
85
87
  this.getCluster,
86
88
  request,
87
89
  options
@@ -140,6 +140,7 @@ const unmarshalCluster = (data) => {
140
140
  description: data.description,
141
141
  dnsWildcard: data.dns_wildcard,
142
142
  featureGates: data.feature_gates,
143
+ iamNodesGroupId: data.iam_nodes_group_id,
143
144
  id: data.id,
144
145
  name: data.name,
145
146
  openIdConnectConfig: data.open_id_connect_config ? unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config) : void 0,
@@ -138,6 +138,7 @@ const unmarshalCluster = (data) => {
138
138
  description: data.description,
139
139
  dnsWildcard: data.dns_wildcard,
140
140
  featureGates: data.feature_gates,
141
+ iamNodesGroupId: data.iam_nodes_group_id,
141
142
  id: data.id,
142
143
  name: data.name,
143
144
  openIdConnectConfig: data.open_id_connect_config ? unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config) : void 0,
@@ -493,6 +493,11 @@ export interface Cluster {
493
493
  sbsCsiEnabled?: boolean;
494
494
  /** @deprecated Defines whether ACL is available on the cluster. */
495
495
  aclAvailable?: boolean;
496
+ /**
497
+ * IAM group that nodes are members of (this field might be empty during early
498
+ * stage of cluster creation).
499
+ */
500
+ iamNodesGroupId: string;
496
501
  }
497
502
  export interface Node {
498
503
  /** Node ID. */
@@ -35,7 +35,7 @@ export interface SubscriberWebhookConfig {
35
35
  uri: string;
36
36
  }
37
37
  export interface HealthCheckHttpConfig {
38
- /** The HTTP URI to use when performing a health check on backend servers. */
38
+ /** The HTTP path to use when performing a health check on backend servers. */
39
39
  uri: string;
40
40
  /** The HTTP method used when performing a health check on backend servers. */
41
41
  method: string;
@@ -51,7 +51,7 @@ export interface HealthCheckHttpConfig {
51
51
  hostHeader: string;
52
52
  }
53
53
  export interface HealthCheckHttpsConfig {
54
- /** The HTTP URI to use when performing a health check on backend servers. */
54
+ /** The HTTP path to use when performing a health check on backend servers. */
55
55
  uri: string;
56
56
  /** The HTTP method used when performing a health check on backend servers. */
57
57
  method: string;
@@ -477,7 +477,7 @@ export interface RouteMatch {
477
477
  */
478
478
  sni?: string;
479
479
  /**
480
- * Value to match in the HTTP Host request header from an incoming connection.
480
+ * Value to match in the HTTP Host request header from an incoming request.
481
481
  * This field should be set for routes on HTTP Load Balancers.
482
482
  *
483
483
  * One-of ('matchType'): at most one of 'sni', 'hostHeader' could be set.
@@ -113,7 +113,9 @@ class API extends api.API {
113
113
  * @returns A Promise of Instance
114
114
  */
115
115
  waitForInstance = (request, options) => intervalRetrier.waitForResource(
116
- options?.stop ?? ((res) => Promise.resolve(!content_gen.INSTANCE_TRANSIENT_STATUSES.includes(res.status))),
116
+ options?.stop ?? ((res) => Promise.resolve(
117
+ !content_gen.INSTANCE_TRANSIENT_STATUSES.includes(res.status)
118
+ )),
117
119
  this.getInstance,
118
120
  request,
119
121
  options
@@ -243,7 +245,9 @@ class API extends api.API {
243
245
  * @returns A Promise of Snapshot
244
246
  */
245
247
  waitForSnapshot = (request, options) => intervalRetrier.waitForResource(
246
- options?.stop ?? ((res) => Promise.resolve(!content_gen.SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))),
248
+ options?.stop ?? ((res) => Promise.resolve(
249
+ !content_gen.SNAPSHOT_TRANSIENT_STATUSES.includes(res.status)
250
+ )),
247
251
  this.getSnapshot,
248
252
  request,
249
253
  options
@@ -111,7 +111,9 @@ class API extends API$1 {
111
111
  * @returns A Promise of Instance
112
112
  */
113
113
  waitForInstance = (request, options) => waitForResource(
114
- options?.stop ?? ((res) => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))),
114
+ options?.stop ?? ((res) => Promise.resolve(
115
+ !INSTANCE_TRANSIENT_STATUSES.includes(res.status)
116
+ )),
115
117
  this.getInstance,
116
118
  request,
117
119
  options
@@ -241,7 +243,9 @@ class API extends API$1 {
241
243
  * @returns A Promise of Snapshot
242
244
  */
243
245
  waitForSnapshot = (request, options) => waitForResource(
244
- options?.stop ?? ((res) => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))),
246
+ options?.stop ?? ((res) => Promise.resolve(
247
+ !SNAPSHOT_TRANSIENT_STATUSES.includes(res.status)
248
+ )),
245
249
  this.getSnapshot,
246
250
  request,
247
251
  options
@@ -230,7 +230,9 @@ class API extends api.API {
230
230
  * @returns A Promise of Session
231
231
  */
232
232
  waitForSession = (request, options) => intervalRetrier.waitForResource(
233
- options?.stop ?? ((res) => Promise.resolve(!content_gen.SESSION_TRANSIENT_STATUSES.includes(res.status))),
233
+ options?.stop ?? ((res) => Promise.resolve(
234
+ !content_gen.SESSION_TRANSIENT_STATUSES.includes(res.status)
235
+ )),
234
236
  this.getSession,
235
237
  request,
236
238
  options
@@ -380,7 +382,9 @@ class API extends api.API {
380
382
  * @returns A Promise of Process
381
383
  */
382
384
  waitForProcess = (request, options) => intervalRetrier.waitForResource(
383
- options?.stop ?? ((res) => Promise.resolve(!content_gen.PROCESS_TRANSIENT_STATUSES.includes(res.status))),
385
+ options?.stop ?? ((res) => Promise.resolve(
386
+ !content_gen.PROCESS_TRANSIENT_STATUSES.includes(res.status)
387
+ )),
384
388
  this.getProcess,
385
389
  request,
386
390
  options
@@ -228,7 +228,9 @@ class API extends API$1 {
228
228
  * @returns A Promise of Session
229
229
  */
230
230
  waitForSession = (request, options) => waitForResource(
231
- options?.stop ?? ((res) => Promise.resolve(!SESSION_TRANSIENT_STATUSES.includes(res.status))),
231
+ options?.stop ?? ((res) => Promise.resolve(
232
+ !SESSION_TRANSIENT_STATUSES.includes(res.status)
233
+ )),
232
234
  this.getSession,
233
235
  request,
234
236
  options
@@ -378,7 +380,9 @@ class API extends API$1 {
378
380
  * @returns A Promise of Process
379
381
  */
380
382
  waitForProcess = (request, options) => waitForResource(
381
- options?.stop ?? ((res) => Promise.resolve(!PROCESS_TRANSIENT_STATUSES.includes(res.status))),
383
+ options?.stop ?? ((res) => Promise.resolve(
384
+ !PROCESS_TRANSIENT_STATUSES.includes(res.status)
385
+ )),
382
386
  this.getProcess,
383
387
  request,
384
388
  options
@@ -292,7 +292,9 @@ class API extends api.API {
292
292
  * @returns A Promise of Instance
293
293
  */
294
294
  waitForInstance = (request, options) => intervalRetrier.waitForResource(
295
- options?.stop ?? ((res) => Promise.resolve(!content_gen.INSTANCE_TRANSIENT_STATUSES.includes(res.status))),
295
+ options?.stop ?? ((res) => Promise.resolve(
296
+ !content_gen.INSTANCE_TRANSIENT_STATUSES.includes(res.status)
297
+ )),
296
298
  this.getInstance,
297
299
  request,
298
300
  options
@@ -1026,7 +1028,9 @@ class API extends api.API {
1026
1028
  * @returns A Promise of Snapshot
1027
1029
  */
1028
1030
  waitForSnapshot = (request, options) => intervalRetrier.waitForResource(
1029
- options?.stop ?? ((res) => Promise.resolve(!content_gen.SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))),
1031
+ options?.stop ?? ((res) => Promise.resolve(
1032
+ !content_gen.SNAPSHOT_TRANSIENT_STATUSES.includes(res.status)
1033
+ )),
1030
1034
  this.getSnapshot,
1031
1035
  request,
1032
1036
  options
@@ -290,7 +290,9 @@ class API extends API$1 {
290
290
  * @returns A Promise of Instance
291
291
  */
292
292
  waitForInstance = (request, options) => waitForResource(
293
- options?.stop ?? ((res) => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))),
293
+ options?.stop ?? ((res) => Promise.resolve(
294
+ !INSTANCE_TRANSIENT_STATUSES.includes(res.status)
295
+ )),
294
296
  this.getInstance,
295
297
  request,
296
298
  options
@@ -1024,7 +1026,9 @@ class API extends API$1 {
1024
1026
  * @returns A Promise of Snapshot
1025
1027
  */
1026
1028
  waitForSnapshot = (request, options) => waitForResource(
1027
- options?.stop ?? ((res) => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))),
1029
+ options?.stop ?? ((res) => Promise.resolve(
1030
+ !SNAPSHOT_TRANSIENT_STATUSES.includes(res.status)
1031
+ )),
1028
1032
  this.getSnapshot,
1029
1033
  request,
1030
1034
  options
@@ -84,7 +84,9 @@ class API extends api.API {
84
84
  * @returns A Promise of Cluster
85
85
  */
86
86
  waitForCluster = (request, options) => intervalRetrier.waitForResource(
87
- options?.stop ?? ((res) => Promise.resolve(!content_gen.CLUSTER_TRANSIENT_STATUSES.includes(res.status))),
87
+ options?.stop ?? ((res) => Promise.resolve(
88
+ !content_gen.CLUSTER_TRANSIENT_STATUSES.includes(res.status)
89
+ )),
88
90
  this.getCluster,
89
91
  request,
90
92
  options
@@ -82,7 +82,9 @@ class API extends API$1 {
82
82
  * @returns A Promise of Cluster
83
83
  */
84
84
  waitForCluster = (request, options) => waitForResource(
85
- options?.stop ?? ((res) => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))),
85
+ options?.stop ?? ((res) => Promise.resolve(
86
+ !CLUSTER_TRANSIENT_STATUSES.includes(res.status)
87
+ )),
86
88
  this.getCluster,
87
89
  request,
88
90
  options
@@ -70,7 +70,9 @@ class API extends api.API {
70
70
  * @returns A Promise of Namespace
71
71
  */
72
72
  waitForNamespace = (request, options) => intervalRetrier.waitForResource(
73
- options?.stop ?? ((res) => Promise.resolve(!content_gen.NAMESPACE_TRANSIENT_STATUSES.includes(res.status))),
73
+ options?.stop ?? ((res) => Promise.resolve(
74
+ !content_gen.NAMESPACE_TRANSIENT_STATUSES.includes(res.status)
75
+ )),
74
76
  this.getNamespace,
75
77
  request,
76
78
  options
@@ -182,7 +184,9 @@ class API extends api.API {
182
184
  * @returns A Promise of Image
183
185
  */
184
186
  waitForImage = (request, options) => intervalRetrier.waitForResource(
185
- options?.stop ?? ((res) => Promise.resolve(!content_gen.IMAGE_TRANSIENT_STATUSES.includes(res.status))),
187
+ options?.stop ?? ((res) => Promise.resolve(
188
+ !content_gen.IMAGE_TRANSIENT_STATUSES.includes(res.status)
189
+ )),
186
190
  this.getImage,
187
191
  request,
188
192
  options
@@ -268,7 +272,9 @@ class API extends api.API {
268
272
  * @returns A Promise of Tag
269
273
  */
270
274
  waitForTag = (request, options) => intervalRetrier.waitForResource(
271
- options?.stop ?? ((res) => Promise.resolve(!content_gen.TAG_TRANSIENT_STATUSES.includes(res.status))),
275
+ options?.stop ?? ((res) => Promise.resolve(
276
+ !content_gen.TAG_TRANSIENT_STATUSES.includes(res.status)
277
+ )),
272
278
  this.getTag,
273
279
  request,
274
280
  options
@@ -68,7 +68,9 @@ class API extends API$1 {
68
68
  * @returns A Promise of Namespace
69
69
  */
70
70
  waitForNamespace = (request, options) => waitForResource(
71
- options?.stop ?? ((res) => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))),
71
+ options?.stop ?? ((res) => Promise.resolve(
72
+ !NAMESPACE_TRANSIENT_STATUSES.includes(res.status)
73
+ )),
72
74
  this.getNamespace,
73
75
  request,
74
76
  options
@@ -180,7 +182,9 @@ class API extends API$1 {
180
182
  * @returns A Promise of Image
181
183
  */
182
184
  waitForImage = (request, options) => waitForResource(
183
- options?.stop ?? ((res) => Promise.resolve(!IMAGE_TRANSIENT_STATUSES.includes(res.status))),
185
+ options?.stop ?? ((res) => Promise.resolve(
186
+ !IMAGE_TRANSIENT_STATUSES.includes(res.status)
187
+ )),
184
188
  this.getImage,
185
189
  request,
186
190
  options
@@ -266,7 +270,9 @@ class API extends API$1 {
266
270
  * @returns A Promise of Tag
267
271
  */
268
272
  waitForTag = (request, options) => waitForResource(
269
- options?.stop ?? ((res) => Promise.resolve(!TAG_TRANSIENT_STATUSES.includes(res.status))),
273
+ options?.stop ?? ((res) => Promise.resolve(
274
+ !TAG_TRANSIENT_STATUSES.includes(res.status)
275
+ )),
270
276
  this.getTag,
271
277
  request,
272
278
  options
@@ -387,5 +387,37 @@ class API extends api.API {
387
387
  * @returns A Promise of ListSecretTypesResponse
388
388
  */
389
389
  listSecretTypes = (request = {}) => resourcePaginator.enrichForPagination("types", this.pageOfListSecretTypes, request);
390
+ /**
391
+ * Restore a version. Restore a secret's version specified by the `region`,
392
+ * `secret_id` and `revision` parameters.
393
+ *
394
+ * @param request - The request {@link RestoreSecretVersionRequest}
395
+ * @returns A Promise of SecretVersion
396
+ */
397
+ restoreSecretVersion = (request) => this.client.fetch(
398
+ {
399
+ body: "{}",
400
+ headers: jsonContentHeaders,
401
+ method: "POST",
402
+ path: `/secret-manager/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${marshalling.validatePathParam("secretId", request.secretId)}/versions/${marshalling.validatePathParam("revision", request.revision)}/restore`
403
+ },
404
+ marshalling_gen.unmarshalSecretVersion
405
+ );
406
+ /**
407
+ * Restore a secret. Restore a secret and all its versions scheduled for
408
+ * deletion specified by the `region` and `secret_id` parameters.
409
+ *
410
+ * @param request - The request {@link RestoreSecretRequest}
411
+ * @returns A Promise of Secret
412
+ */
413
+ restoreSecret = (request) => this.client.fetch(
414
+ {
415
+ body: "{}",
416
+ headers: jsonContentHeaders,
417
+ method: "POST",
418
+ path: `/secret-manager/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${marshalling.validatePathParam("secretId", request.secretId)}/restore`
419
+ },
420
+ marshalling_gen.unmarshalSecret
421
+ );
390
422
  }
391
423
  exports.API = API;
@@ -1,6 +1,6 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
2
  import type { Region as ScwRegion } from '../../../bridge';
3
- import type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BrowseSecretsRequest, BrowseSecretsResponse, CreateSecretRequest, CreateSecretVersionRequest, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsResponse, ListTagsRequest, ListTagsResponse, ProtectSecretRequest, Secret, SecretVersion, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest } from './types.gen';
3
+ import type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BrowseSecretsRequest, BrowseSecretsResponse, CreateSecretRequest, CreateSecretVersionRequest, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsResponse, ListTagsRequest, ListTagsResponse, ProtectSecretRequest, RestoreSecretRequest, RestoreSecretVersionRequest, Secret, SecretVersion, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest } from './types.gen';
4
4
  /**
5
5
  * Secret Manager API.
6
6
  *
@@ -190,4 +190,20 @@ export declare class API extends ParentAPI {
190
190
  all: () => Promise<import("./types.gen").SecretType[]>;
191
191
  [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").SecretType[], void, void>;
192
192
  };
193
+ /**
194
+ * Restore a version. Restore a secret's version specified by the `region`,
195
+ * `secret_id` and `revision` parameters.
196
+ *
197
+ * @param request - The request {@link RestoreSecretVersionRequest}
198
+ * @returns A Promise of SecretVersion
199
+ */
200
+ restoreSecretVersion: (request: Readonly<RestoreSecretVersionRequest>) => Promise<SecretVersion>;
201
+ /**
202
+ * Restore a secret. Restore a secret and all its versions scheduled for
203
+ * deletion specified by the `region` and `secret_id` parameters.
204
+ *
205
+ * @param request - The request {@link RestoreSecretRequest}
206
+ * @returns A Promise of Secret
207
+ */
208
+ restoreSecret: (request: Readonly<RestoreSecretRequest>) => Promise<Secret>;
193
209
  }
@@ -385,6 +385,38 @@ class API extends API$1 {
385
385
  * @returns A Promise of ListSecretTypesResponse
386
386
  */
387
387
  listSecretTypes = (request = {}) => enrichForPagination("types", this.pageOfListSecretTypes, request);
388
+ /**
389
+ * Restore a version. Restore a secret's version specified by the `region`,
390
+ * `secret_id` and `revision` parameters.
391
+ *
392
+ * @param request - The request {@link RestoreSecretVersionRequest}
393
+ * @returns A Promise of SecretVersion
394
+ */
395
+ restoreSecretVersion = (request) => this.client.fetch(
396
+ {
397
+ body: "{}",
398
+ headers: jsonContentHeaders,
399
+ method: "POST",
400
+ path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/versions/${validatePathParam("revision", request.revision)}/restore`
401
+ },
402
+ unmarshalSecretVersion
403
+ );
404
+ /**
405
+ * Restore a secret. Restore a secret and all its versions scheduled for
406
+ * deletion specified by the `region` and `secret_id` parameters.
407
+ *
408
+ * @param request - The request {@link RestoreSecretRequest}
409
+ * @returns A Promise of Secret
410
+ */
411
+ restoreSecret = (request) => this.client.fetch(
412
+ {
413
+ body: "{}",
414
+ headers: jsonContentHeaders,
415
+ method: "POST",
416
+ path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/restore`
417
+ },
418
+ unmarshalSecret
419
+ );
388
420
  }
389
421
  export {
390
422
  API
@@ -1,3 +1,3 @@
1
1
  export { API } from './api.gen.js';
2
- export type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BasicCredentials, BrowseSecretsRequest, BrowseSecretsRequestOrderBy, BrowseSecretsResponse, BrowseSecretsResponseItem, BrowseSecretsResponseItemFolderDetails, BrowseSecretsResponseItemSecretDetails, CreateSecretRequest, CreateSecretVersionRequest, DatabaseCredentials, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, EphemeralPolicy, EphemeralPolicyAction, EphemeralProperties, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsRequestOrderBy, ListSecretsResponse, ListTagsRequest, ListTagsResponse, Product, ProtectSecretRequest, SSHKey, Secret, SecretStatus, SecretType, SecretVersion, SecretVersionStatus, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest, } from './types.gen';
2
+ export type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BasicCredentials, BrowseSecretsRequest, BrowseSecretsRequestOrderBy, BrowseSecretsResponse, BrowseSecretsResponseItem, BrowseSecretsResponseItemFolderDetails, BrowseSecretsResponseItemSecretDetails, CreateSecretRequest, CreateSecretVersionRequest, DatabaseCredentials, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, EphemeralPolicy, EphemeralPolicyAction, EphemeralProperties, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsRequestOrderBy, ListSecretsResponse, ListTagsRequest, ListTagsResponse, Product, ProtectSecretRequest, RestoreSecretRequest, RestoreSecretVersionRequest, SSHKey, Secret, SecretStatus, SecretType, SecretVersion, SecretVersionStatus, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest, } from './types.gen';
3
3
  export * as ValidationRules from './validation-rules.gen.js';
@@ -485,6 +485,23 @@ export type ProtectSecretRequest = {
485
485
  /** ID of the secret to enable secret protection for. */
486
486
  secretId: string;
487
487
  };
488
+ export type RestoreSecretRequest = {
489
+ /**
490
+ * Region to target. If none is passed will use default region from the
491
+ * config.
492
+ */
493
+ region?: ScwRegion;
494
+ secretId: string;
495
+ };
496
+ export type RestoreSecretVersionRequest = {
497
+ /**
498
+ * Region to target. If none is passed will use default region from the
499
+ * config.
500
+ */
501
+ region?: ScwRegion;
502
+ secretId: string;
503
+ revision: string;
504
+ };
488
505
  export interface SSHKey {
489
506
  /** The private SSH key. */
490
507
  sshPrivateKey: string;
@@ -54,7 +54,9 @@ class API extends api.API {
54
54
  * @returns A Promise of Database
55
55
  */
56
56
  waitForDatabase = (request, options) => intervalRetrier.waitForResource(
57
- options?.stop ?? ((res) => Promise.resolve(!content_gen.DATABASE_TRANSIENT_STATUSES.includes(res.status))),
57
+ options?.stop ?? ((res) => Promise.resolve(
58
+ !content_gen.DATABASE_TRANSIENT_STATUSES.includes(res.status)
59
+ )),
58
60
  this.getDatabase,
59
61
  request,
60
62
  options
@@ -52,7 +52,9 @@ class API extends API$1 {
52
52
  * @returns A Promise of Database
53
53
  */
54
54
  waitForDatabase = (request, options) => waitForResource(
55
- options?.stop ?? ((res) => Promise.resolve(!DATABASE_TRANSIENT_STATUSES.includes(res.status))),
55
+ options?.stop ?? ((res) => Promise.resolve(
56
+ !DATABASE_TRANSIENT_STATUSES.includes(res.status)
57
+ )),
56
58
  this.getDatabase,
57
59
  request,
58
60
  options
@@ -476,5 +476,98 @@ class API extends api.API {
476
476
  method: "DELETE",
477
477
  path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/blocklists/${marshalling.validatePathParam("blocklistId", request.blocklistId)}`
478
478
  });
479
+ /**
480
+ * Get information about subscribed offers. Retrieve information about the
481
+ * offers you are subscribed to using the `project_id` and `region`
482
+ * parameters.
483
+ *
484
+ * @param request - The request {@link ListOfferSubscriptionsRequest}
485
+ * @returns A Promise of ListOfferSubscriptionsResponse
486
+ */
487
+ listOfferSubscriptions = (request = {}) => this.client.fetch(
488
+ {
489
+ method: "GET",
490
+ path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/offer-subscriptions`,
491
+ urlParams: marshalling.urlParams([
492
+ "project_id",
493
+ request.projectId ?? this.client.settings.defaultProjectId
494
+ ])
495
+ },
496
+ marshalling_gen.unmarshalListOfferSubscriptionsResponse
497
+ );
498
+ /**
499
+ * Update a subscribed offer.
500
+ *
501
+ * @param request - The request {@link UpdateOfferSubscriptionRequest}
502
+ * @returns A Promise of OfferSubscription
503
+ */
504
+ updateOfferSubscription = (request = {}) => this.client.fetch(
505
+ {
506
+ body: JSON.stringify(
507
+ marshalling_gen.marshalUpdateOfferSubscriptionRequest(request, this.client.settings)
508
+ ),
509
+ headers: jsonContentHeaders,
510
+ method: "PATCH",
511
+ path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/offer-subscriptions`
512
+ },
513
+ marshalling_gen.unmarshalOfferSubscription
514
+ );
515
+ /**
516
+ * List the available offers.. Retrieve the list of the available and
517
+ * free-of-charge offers you can subscribe to.
518
+ *
519
+ * @param request - The request {@link ListOffersRequest}
520
+ * @returns A Promise of ListOffersResponse
521
+ */
522
+ listOffers = (request = {}) => this.client.fetch(
523
+ {
524
+ method: "GET",
525
+ path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/offers`
526
+ },
527
+ marshalling_gen.unmarshalListOffersResponse
528
+ );
529
+ pageOfListPools = (request = {}) => this.client.fetch(
530
+ {
531
+ method: "GET",
532
+ path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pools`,
533
+ urlParams: marshalling.urlParams(
534
+ ["page", request.page],
535
+ [
536
+ "page_size",
537
+ request.pageSize ?? this.client.settings.defaultPageSize
538
+ ],
539
+ [
540
+ "project_id",
541
+ request.projectId ?? this.client.settings.defaultProjectId
542
+ ]
543
+ )
544
+ },
545
+ marshalling_gen.unmarshalListPoolsResponse
546
+ );
547
+ /**
548
+ * Get information about a sending pool.. Retrieve information about a sending
549
+ * pool, including its creation status and configuration parameters.
550
+ *
551
+ * @param request - The request {@link ListPoolsRequest}
552
+ * @returns A Promise of ListPoolsResponse
553
+ */
554
+ listPools = (request = {}) => resourcePaginator.enrichForPagination("pools", this.pageOfListPools, request);
555
+ /**
556
+ * Get project resource consumption.. Get project resource consumption.
557
+ *
558
+ * @param request - The request {@link GetProjectConsumptionRequest}
559
+ * @returns A Promise of ProjectConsumption
560
+ */
561
+ getProjectConsumption = (request = {}) => this.client.fetch(
562
+ {
563
+ method: "GET",
564
+ path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/project-consumption`,
565
+ urlParams: marshalling.urlParams([
566
+ "project_id",
567
+ request.projectId ?? this.client.settings.defaultProjectId
568
+ ])
569
+ },
570
+ marshalling_gen.unmarshalProjectConsumption
571
+ );
479
572
  }
480
573
  exports.API = API;