@scaleway/sdk 2.0.0-alpha.9 → 2.0.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 (78) hide show
  1. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +12 -12
  2. package/dist/api/baremetal/v1/marshalling.gen.js +63 -52
  3. package/dist/api/billing/v2alpha1/api.gen.js +32 -1
  4. package/dist/api/billing/v2alpha1/marshalling.gen.js +46 -1
  5. package/dist/api/block/v1alpha1/api.gen.js +23 -19
  6. package/dist/api/block/v1alpha1/marshalling.gen.js +47 -40
  7. package/dist/api/block/v1alpha1/validation-rules.gen.js +11 -1
  8. package/dist/api/cockpit/v1beta1/api.gen.js +143 -48
  9. package/dist/api/cockpit/v1beta1/marshalling.gen.js +89 -36
  10. package/dist/api/container/v1beta1/index.gen.js +2 -0
  11. package/dist/api/container/v1beta1/marshalling.gen.js +63 -35
  12. package/dist/api/container/v1beta1/validation-rules.gen.js +44 -0
  13. package/dist/api/document_db/v1beta1/marshalling.gen.js +117 -61
  14. package/dist/api/domain/v2beta1/api.gen.js +29 -37
  15. package/dist/api/domain/v2beta1/index.gen.js +0 -2
  16. package/dist/api/domain/v2beta1/marshalling.gen.js +408 -194
  17. package/dist/api/flexibleip/v1alpha1/api.gen.js +6 -14
  18. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
  19. package/dist/api/function/v1beta1/api.gen.js +36 -0
  20. package/dist/api/function/v1beta1/index.gen.js +2 -0
  21. package/dist/api/function/v1beta1/marshalling.gen.js +64 -36
  22. package/dist/api/function/v1beta1/validation-rules.gen.js +44 -0
  23. package/dist/api/iam/v1alpha1/api.gen.js +54 -44
  24. package/dist/api/iam/v1alpha1/marshalling.gen.js +69 -34
  25. package/dist/api/iam/v1alpha1/validation-rules.gen.js +10 -1
  26. package/dist/api/instance/v1/api.gen.js +1 -1
  27. package/dist/api/instance/v1/content.gen.js +4 -1
  28. package/dist/api/instance/v1/index.js +1 -1
  29. package/dist/api/instance/v1/marshalling.gen.js +414 -205
  30. package/dist/api/iot/v1/api.gen.js +24 -32
  31. package/dist/api/iot/v1/marshalling.gen.js +87 -36
  32. package/dist/api/ipam/index.js +2 -0
  33. package/dist/api/ipam/v1/api.gen.js +113 -0
  34. package/dist/api/ipam/v1/index.gen.js +6 -0
  35. package/dist/api/ipam/v1/marshalling.gen.js +77 -0
  36. package/dist/api/ipam/v1/validation-rules.gen.js +11 -0
  37. package/dist/api/ipfs/v1alpha1/api.gen.js +120 -3
  38. package/dist/api/ipfs/v1alpha1/content.gen.js +4 -1
  39. package/dist/api/ipfs/v1alpha1/index.gen.js +2 -2
  40. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +71 -19
  41. package/dist/api/jobs/index.js +2 -0
  42. package/dist/api/jobs/v1alpha1/api.gen.js +111 -0
  43. package/dist/api/jobs/v1alpha1/content.gen.js +7 -0
  44. package/dist/api/jobs/v1alpha1/index.gen.js +7 -0
  45. package/dist/api/jobs/v1alpha1/marshalling.gen.js +84 -0
  46. package/dist/api/jobs/v1alpha1/validation-rules.gen.js +45 -0
  47. package/dist/api/k8s/v1/marshalling.gen.js +128 -40
  48. package/dist/api/lb/v1/api.gen.js +1 -1
  49. package/dist/api/lb/v1/marshalling.gen.js +268 -152
  50. package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
  51. package/dist/api/marketplace/v2/api.gen.js +3 -3
  52. package/dist/api/mnq/index.js +2 -0
  53. package/dist/api/mnq/v1alpha1/api.gen.js +12 -20
  54. package/dist/api/mnq/v1alpha1/marshalling.gen.js +19 -14
  55. package/dist/api/mnq/v1beta1/api.gen.js +529 -0
  56. package/dist/api/mnq/v1beta1/index.gen.js +6 -0
  57. package/dist/api/mnq/v1beta1/marshalling.gen.js +212 -0
  58. package/dist/api/mnq/v1beta1/validation-rules.gen.js +77 -0
  59. package/dist/api/rdb/v1/marshalling.gen.js +131 -66
  60. package/dist/api/redis/v1/marshalling.gen.js +51 -27
  61. package/dist/api/registry/v1/marshalling.gen.js +6 -4
  62. package/dist/api/secret/v1alpha1/api.gen.js +2 -2
  63. package/dist/api/secret/v1alpha1/marshalling.gen.js +17 -5
  64. package/dist/api/std/index.gen.js +1 -0
  65. package/dist/api/tem/v1alpha1/api.gen.js +8 -2
  66. package/dist/api/tem/v1alpha1/marshalling.gen.js +35 -13
  67. package/dist/api/test/v1/marshalling.gen.js +5 -3
  68. package/dist/api/vpc/v2/marshalling.gen.js +2 -0
  69. package/dist/api/vpcgw/v1/marshalling.gen.js +53 -24
  70. package/dist/api/webhosting/v1alpha1/api.gen.js +2 -54
  71. package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
  72. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +14 -41
  73. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +1 -10
  74. package/dist/index.cjs +4351 -1833
  75. package/dist/index.d.ts +6778 -2542
  76. package/dist/index.js +34 -28
  77. package/dist/scw/constants.js +1 -1
  78. package/package.json +2 -2
@@ -0,0 +1,529 @@
1
+ import { API as API$1 } from '../../../scw/api.js';
2
+ import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
3
+ import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
+ import { marshalNatsApiCreateNatsAccountRequest, unmarshalNatsAccount, marshalNatsApiUpdateNatsAccountRequest, unmarshalListNatsAccountsResponse, marshalNatsApiCreateNatsCredentialsRequest, unmarshalNatsCredentials, unmarshalListNatsCredentialsResponse, marshalSnsApiActivateSnsRequest, unmarshalSnsInfo, marshalSnsApiDeactivateSnsRequest, marshalSnsApiCreateSnsCredentialsRequest, unmarshalSnsCredentials, marshalSnsApiUpdateSnsCredentialsRequest, unmarshalListSnsCredentialsResponse, marshalSqsApiActivateSqsRequest, unmarshalSqsInfo, marshalSqsApiDeactivateSqsRequest, marshalSqsApiCreateSqsCredentialsRequest, unmarshalSqsCredentials, marshalSqsApiUpdateSqsCredentialsRequest, unmarshalListSqsCredentialsResponse } from './marshalling.gen.js';
5
+
6
+ // This file was automatically generated. DO NOT EDIT.
7
+ // If you have any remark or suggestion do not hesitate to open an issue.
8
+ const jsonContentHeaders = {
9
+ 'Content-Type': 'application/json; charset=utf-8'
10
+ };
11
+
12
+ /**
13
+ * Messaging and Queuing NATS API.
14
+ *
15
+ * This API allows you to manage Scaleway Messaging and Queueing NATS accounts.
16
+ */
17
+ class NatsAPI extends API$1 {
18
+ /** Lists the available regions of the API. */
19
+ static LOCALITIES = ['fr-par'];
20
+
21
+ /**
22
+ * Create a NATS account. Create a NATS account associated with a Project.
23
+ *
24
+ * @param request - The request {@link NatsApiCreateNatsAccountRequest}
25
+ * @returns A Promise of NatsAccount
26
+ */
27
+ createNatsAccount = (() => {
28
+ var _this = this;
29
+ return function (request) {
30
+ if (request === void 0) {
31
+ request = {};
32
+ }
33
+ return _this.client.fetch({
34
+ body: JSON.stringify(marshalNatsApiCreateNatsAccountRequest(request, _this.client.settings)),
35
+ headers: jsonContentHeaders,
36
+ method: 'POST',
37
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/nats-accounts`
38
+ }, unmarshalNatsAccount);
39
+ };
40
+ })();
41
+
42
+ /**
43
+ * Delete a NATS account. Delete a NATS account, specified by its NATS account
44
+ * ID. Note that deleting a NATS account is irreversible, and any credentials,
45
+ * streams, consumer and stored messages belonging to this NATS account will
46
+ * also be deleted.
47
+ *
48
+ * @param request - The request {@link NatsApiDeleteNatsAccountRequest}
49
+ */
50
+ deleteNatsAccount = request => this.client.fetch({
51
+ method: 'DELETE',
52
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-accounts/${validatePathParam('natsAccountId', request.natsAccountId)}`
53
+ });
54
+
55
+ /**
56
+ * Update the name of a NATS account. Update the name of a NATS account,
57
+ * specified by its NATS account ID.
58
+ *
59
+ * @param request - The request {@link NatsApiUpdateNatsAccountRequest}
60
+ * @returns A Promise of NatsAccount
61
+ */
62
+ updateNatsAccount = request => this.client.fetch({
63
+ body: JSON.stringify(marshalNatsApiUpdateNatsAccountRequest(request, this.client.settings)),
64
+ headers: jsonContentHeaders,
65
+ method: 'PATCH',
66
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-accounts/${validatePathParam('natsAccountId', request.natsAccountId)}`
67
+ }, unmarshalNatsAccount);
68
+
69
+ /**
70
+ * Get a NATS account. Retrieve information about an existing NATS account
71
+ * identified by its NATS account ID. Its full details, including name and
72
+ * endpoint, are returned in the response.
73
+ *
74
+ * @param request - The request {@link NatsApiGetNatsAccountRequest}
75
+ * @returns A Promise of NatsAccount
76
+ */
77
+ getNatsAccount = request => this.client.fetch({
78
+ method: 'GET',
79
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-accounts/${validatePathParam('natsAccountId', request.natsAccountId)}`
80
+ }, unmarshalNatsAccount);
81
+ pageOfListNatsAccounts = (() => {
82
+ var _this2 = this;
83
+ return function (request) {
84
+ if (request === void 0) {
85
+ request = {};
86
+ }
87
+ return _this2.client.fetch({
88
+ method: 'GET',
89
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this2.client.settings.defaultRegion)}/nats-accounts`,
90
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this2.client.settings.defaultPageSize], ['project_id', request.projectId])
91
+ }, unmarshalListNatsAccountsResponse);
92
+ };
93
+ })();
94
+
95
+ /**
96
+ * List NATS accounts. List all NATS accounts in the specified region, for a
97
+ * Scaleway Organization or Project. By default, the NATS accounts returned in
98
+ * the list are ordered by creation date in ascending order, though this can
99
+ * be modified via the `order_by` field.
100
+ *
101
+ * @param request - The request {@link NatsApiListNatsAccountsRequest}
102
+ * @returns A Promise of ListNatsAccountsResponse
103
+ */
104
+ listNatsAccounts = (() => {
105
+ var _this3 = this;
106
+ return function (request) {
107
+ if (request === void 0) {
108
+ request = {};
109
+ }
110
+ return enrichForPagination('natsAccounts', _this3.pageOfListNatsAccounts, request);
111
+ };
112
+ })();
113
+
114
+ /**
115
+ * Create NATS credentials. Create a set of credentials for a NATS account,
116
+ * specified by its NATS account ID.
117
+ *
118
+ * @param request - The request {@link NatsApiCreateNatsCredentialsRequest}
119
+ * @returns A Promise of NatsCredentials
120
+ */
121
+ createNatsCredentials = request => this.client.fetch({
122
+ body: JSON.stringify(marshalNatsApiCreateNatsCredentialsRequest(request, this.client.settings)),
123
+ headers: jsonContentHeaders,
124
+ method: 'POST',
125
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-credentials`
126
+ }, unmarshalNatsCredentials);
127
+
128
+ /**
129
+ * Delete NATS credentials. Delete a set of credentials, specified by their
130
+ * credentials ID. Deleting credentials is irreversible and cannot be undone.
131
+ * The credentials can no longer be used to access the NATS account, and
132
+ * active connections using this credentials will be closed.
133
+ *
134
+ * @param request - The request {@link NatsApiDeleteNatsCredentialsRequest}
135
+ */
136
+ deleteNatsCredentials = request => this.client.fetch({
137
+ method: 'DELETE',
138
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-credentials/${validatePathParam('natsCredentialsId', request.natsCredentialsId)}`
139
+ });
140
+
141
+ /**
142
+ * Get NATS credentials. Retrieve an existing set of credentials, identified
143
+ * by the `nats_credentials_id`. The credentials themselves are NOT returned,
144
+ * only their metadata (NATS account ID, credentials name, etc), are returned
145
+ * in the response.
146
+ *
147
+ * @param request - The request {@link NatsApiGetNatsCredentialsRequest}
148
+ * @returns A Promise of NatsCredentials
149
+ */
150
+ getNatsCredentials = request => this.client.fetch({
151
+ method: 'GET',
152
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-credentials/${validatePathParam('natsCredentialsId', request.natsCredentialsId)}`
153
+ }, unmarshalNatsCredentials);
154
+ pageOfListNatsCredentials = (() => {
155
+ var _this4 = this;
156
+ return function (request) {
157
+ if (request === void 0) {
158
+ request = {};
159
+ }
160
+ return _this4.client.fetch({
161
+ method: 'GET',
162
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/nats-credentials`,
163
+ urlParams: urlParams(['nats_account_id', request.natsAccountId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize])
164
+ }, unmarshalListNatsCredentialsResponse);
165
+ };
166
+ })();
167
+
168
+ /**
169
+ * List NATS credentials. List existing credentials in the specified NATS
170
+ * account. The response contains only the metadata for the credentials, not
171
+ * the credentials themselves, which are only returned after a **Create
172
+ * Credentials** call.
173
+ *
174
+ * @param request - The request {@link NatsApiListNatsCredentialsRequest}
175
+ * @returns A Promise of ListNatsCredentialsResponse
176
+ */
177
+ listNatsCredentials = (() => {
178
+ var _this5 = this;
179
+ return function (request) {
180
+ if (request === void 0) {
181
+ request = {};
182
+ }
183
+ return enrichForPagination('natsCredentials', _this5.pageOfListNatsCredentials, request);
184
+ };
185
+ })();
186
+ }
187
+
188
+ /**
189
+ * Messaging and Queuing SNS API.
190
+ *
191
+ * This API allows you to manage Scaleway Messaging and Queueing SNS brokers.
192
+ */
193
+ class SnsAPI extends API$1 {
194
+ /** Lists the available regions of the API. */
195
+ static LOCALITIES = ['fr-par'];
196
+
197
+ /**
198
+ * Activate SNS. Activate SNS for the specified Project ID. SNS must be
199
+ * activated before any usage. Activating SNS does not trigger any billing,
200
+ * and you can deactivate at any time.
201
+ *
202
+ * @param request - The request {@link SnsApiActivateSnsRequest}
203
+ * @returns A Promise of SnsInfo
204
+ */
205
+ activateSns = (() => {
206
+ var _this6 = this;
207
+ return function (request) {
208
+ if (request === void 0) {
209
+ request = {};
210
+ }
211
+ return _this6.client.fetch({
212
+ body: JSON.stringify(marshalSnsApiActivateSnsRequest(request, _this6.client.settings)),
213
+ headers: jsonContentHeaders,
214
+ method: 'POST',
215
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/activate-sns`
216
+ }, unmarshalSnsInfo);
217
+ };
218
+ })();
219
+
220
+ /**
221
+ * Get SNS info. Retrieve the SNS information of the specified Project ID.
222
+ * Informations include the activation status and the SNS API endpoint URL.
223
+ *
224
+ * @param request - The request {@link SnsApiGetSnsInfoRequest}
225
+ * @returns A Promise of SnsInfo
226
+ */
227
+ getSnsInfo = (() => {
228
+ var _this7 = this;
229
+ return function (request) {
230
+ if (request === void 0) {
231
+ request = {};
232
+ }
233
+ return _this7.client.fetch({
234
+ method: 'GET',
235
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this7.client.settings.defaultRegion)}/sns-info`,
236
+ urlParams: urlParams(['project_id', request.projectId ?? _this7.client.settings.defaultProjectId])
237
+ }, unmarshalSnsInfo);
238
+ };
239
+ })();
240
+
241
+ /**
242
+ * Deactivate SNS. Deactivate SNS for the specified Project ID.You must delete
243
+ * all topics and credentials before this call or you need to set the
244
+ * force_delete parameter.
245
+ *
246
+ * @param request - The request {@link SnsApiDeactivateSnsRequest}
247
+ * @returns A Promise of SnsInfo
248
+ */
249
+ deactivateSns = (() => {
250
+ var _this8 = this;
251
+ return function (request) {
252
+ if (request === void 0) {
253
+ request = {};
254
+ }
255
+ return _this8.client.fetch({
256
+ body: JSON.stringify(marshalSnsApiDeactivateSnsRequest(request, _this8.client.settings)),
257
+ headers: jsonContentHeaders,
258
+ method: 'POST',
259
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this8.client.settings.defaultRegion)}/deactivate-sns`
260
+ }, unmarshalSnsInfo);
261
+ };
262
+ })();
263
+
264
+ /**
265
+ * Create SNS credentials. Create a set of credentials for SNS, specified by a
266
+ * Project ID. Credentials give the bearer access to topics, and the level of
267
+ * permissions can be defined granularly.
268
+ *
269
+ * @param request - The request {@link SnsApiCreateSnsCredentialsRequest}
270
+ * @returns A Promise of SnsCredentials
271
+ */
272
+ createSnsCredentials = (() => {
273
+ var _this9 = this;
274
+ return function (request) {
275
+ if (request === void 0) {
276
+ request = {};
277
+ }
278
+ return _this9.client.fetch({
279
+ body: JSON.stringify(marshalSnsApiCreateSnsCredentialsRequest(request, _this9.client.settings)),
280
+ headers: jsonContentHeaders,
281
+ method: 'POST',
282
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this9.client.settings.defaultRegion)}/sns-credentials`
283
+ }, unmarshalSnsCredentials);
284
+ };
285
+ })();
286
+
287
+ /**
288
+ * Delete SNS credentials. Delete a set of SNS credentials, specified by their
289
+ * credentials ID. Deleting credentials is irreversible and cannot be undone.
290
+ * The credentials can then no longer be used to access SNS.
291
+ *
292
+ * @param request - The request {@link SnsApiDeleteSnsCredentialsRequest}
293
+ */
294
+ deleteSnsCredentials = request => this.client.fetch({
295
+ method: 'DELETE',
296
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sns-credentials/${validatePathParam('snsCredentialsId', request.snsCredentialsId)}`
297
+ });
298
+
299
+ /**
300
+ * Update SNS credentials. Update a set of SNS credentials. You can update the
301
+ * credentials' name, or their permissions.
302
+ *
303
+ * @param request - The request {@link SnsApiUpdateSnsCredentialsRequest}
304
+ * @returns A Promise of SnsCredentials
305
+ */
306
+ updateSnsCredentials = request => this.client.fetch({
307
+ body: JSON.stringify(marshalSnsApiUpdateSnsCredentialsRequest(request, this.client.settings)),
308
+ headers: jsonContentHeaders,
309
+ method: 'PATCH',
310
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sns-credentials/${validatePathParam('snsCredentialsId', request.snsCredentialsId)}`
311
+ }, unmarshalSnsCredentials);
312
+
313
+ /**
314
+ * Get SNS credentials. Retrieve an existing set of credentials, identified by
315
+ * the `credentials_id`. The credentials themselves, as well as their metadata
316
+ * (name, project ID etc), are returned in the response.
317
+ *
318
+ * @param request - The request {@link SnsApiGetSnsCredentialsRequest}
319
+ * @returns A Promise of SnsCredentials
320
+ */
321
+ getSnsCredentials = request => this.client.fetch({
322
+ method: 'GET',
323
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sns-credentials/${validatePathParam('snsCredentialsId', request.snsCredentialsId)}`
324
+ }, unmarshalSnsCredentials);
325
+ pageOfListSnsCredentials = (() => {
326
+ var _this10 = this;
327
+ return function (request) {
328
+ if (request === void 0) {
329
+ request = {};
330
+ }
331
+ return _this10.client.fetch({
332
+ method: 'GET',
333
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this10.client.settings.defaultRegion)}/sns-credentials`,
334
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this10.client.settings.defaultPageSize], ['project_id', request.projectId])
335
+ }, unmarshalListSnsCredentialsResponse);
336
+ };
337
+ })();
338
+
339
+ /**
340
+ * List SNS credentials. List existing SNS credentials in the specified
341
+ * region. The response contains only the metadata for the credentials, not
342
+ * the credentials themselves.
343
+ *
344
+ * @param request - The request {@link SnsApiListSnsCredentialsRequest}
345
+ * @returns A Promise of ListSnsCredentialsResponse
346
+ */
347
+ listSnsCredentials = (() => {
348
+ var _this11 = this;
349
+ return function (request) {
350
+ if (request === void 0) {
351
+ request = {};
352
+ }
353
+ return enrichForPagination('snsCredentials', _this11.pageOfListSnsCredentials, request);
354
+ };
355
+ })();
356
+ }
357
+
358
+ /**
359
+ * Messaging and Queuing SQS API.
360
+ *
361
+ * This API allows you to manage Scaleway Messaging and Queueing SQS brokers.
362
+ */
363
+ class SqsAPI extends API$1 {
364
+ /** Lists the available regions of the API. */
365
+ static LOCALITIES = ['fr-par'];
366
+
367
+ /**
368
+ * Activate SQS. Activate SQS for the specified Project ID. SQS must be
369
+ * activated before any usage such as creating credentials and queues.
370
+ * Activating SQS does not trigger any billing, and you can deactivate at any
371
+ * time.
372
+ *
373
+ * @param request - The request {@link SqsApiActivateSqsRequest}
374
+ * @returns A Promise of SqsInfo
375
+ */
376
+ activateSqs = (() => {
377
+ var _this12 = this;
378
+ return function (request) {
379
+ if (request === void 0) {
380
+ request = {};
381
+ }
382
+ return _this12.client.fetch({
383
+ body: JSON.stringify(marshalSqsApiActivateSqsRequest(request, _this12.client.settings)),
384
+ headers: jsonContentHeaders,
385
+ method: 'POST',
386
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this12.client.settings.defaultRegion)}/activate-sqs`
387
+ }, unmarshalSqsInfo);
388
+ };
389
+ })();
390
+
391
+ /**
392
+ * Get SQS info. Retrieve the SQS information of the specified Project ID.
393
+ * Informations include the activation status and the SQS API endpoint URL.
394
+ *
395
+ * @param request - The request {@link SqsApiGetSqsInfoRequest}
396
+ * @returns A Promise of SqsInfo
397
+ */
398
+ getSqsInfo = (() => {
399
+ var _this13 = this;
400
+ return function (request) {
401
+ if (request === void 0) {
402
+ request = {};
403
+ }
404
+ return _this13.client.fetch({
405
+ method: 'GET',
406
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this13.client.settings.defaultRegion)}/sqs-info`,
407
+ urlParams: urlParams(['project_id', request.projectId ?? _this13.client.settings.defaultProjectId])
408
+ }, unmarshalSqsInfo);
409
+ };
410
+ })();
411
+
412
+ /**
413
+ * Deactivate SQS. Deactivate SQS for the specified Project ID. You must
414
+ * delete all queues and credentials before this call or you need to set the
415
+ * force_delete parameter.
416
+ *
417
+ * @param request - The request {@link SqsApiDeactivateSqsRequest}
418
+ * @returns A Promise of SqsInfo
419
+ */
420
+ deactivateSqs = (() => {
421
+ var _this14 = this;
422
+ return function (request) {
423
+ if (request === void 0) {
424
+ request = {};
425
+ }
426
+ return _this14.client.fetch({
427
+ body: JSON.stringify(marshalSqsApiDeactivateSqsRequest(request, _this14.client.settings)),
428
+ headers: jsonContentHeaders,
429
+ method: 'POST',
430
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this14.client.settings.defaultRegion)}/deactivate-sqs`
431
+ }, unmarshalSqsInfo);
432
+ };
433
+ })();
434
+
435
+ /**
436
+ * Create SQS credentials. Create a set of credentials for SQS, specified by a
437
+ * Project ID. Credentials give the bearer access to queues, and the level of
438
+ * permissions can be defined granularly.
439
+ *
440
+ * @param request - The request {@link SqsApiCreateSqsCredentialsRequest}
441
+ * @returns A Promise of SqsCredentials
442
+ */
443
+ createSqsCredentials = (() => {
444
+ var _this15 = this;
445
+ return function (request) {
446
+ if (request === void 0) {
447
+ request = {};
448
+ }
449
+ return _this15.client.fetch({
450
+ body: JSON.stringify(marshalSqsApiCreateSqsCredentialsRequest(request, _this15.client.settings)),
451
+ headers: jsonContentHeaders,
452
+ method: 'POST',
453
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this15.client.settings.defaultRegion)}/sqs-credentials`
454
+ }, unmarshalSqsCredentials);
455
+ };
456
+ })();
457
+
458
+ /**
459
+ * Delete SQS credentials. Delete a set of SQS credentials, specified by their
460
+ * credentials ID. Deleting credentials is irreversible and cannot be undone.
461
+ * The credentials can then no longer be used to access SQS.
462
+ *
463
+ * @param request - The request {@link SqsApiDeleteSqsCredentialsRequest}
464
+ */
465
+ deleteSqsCredentials = request => this.client.fetch({
466
+ method: 'DELETE',
467
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sqs-credentials/${validatePathParam('sqsCredentialsId', request.sqsCredentialsId)}`
468
+ });
469
+
470
+ /**
471
+ * Update SQS credentials. Update a set of SQS credentials. You can update the
472
+ * credentials' name, or their permissions.
473
+ *
474
+ * @param request - The request {@link SqsApiUpdateSqsCredentialsRequest}
475
+ * @returns A Promise of SqsCredentials
476
+ */
477
+ updateSqsCredentials = request => this.client.fetch({
478
+ body: JSON.stringify(marshalSqsApiUpdateSqsCredentialsRequest(request, this.client.settings)),
479
+ headers: jsonContentHeaders,
480
+ method: 'PATCH',
481
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sqs-credentials/${validatePathParam('sqsCredentialsId', request.sqsCredentialsId)}`
482
+ }, unmarshalSqsCredentials);
483
+
484
+ /**
485
+ * Get SQS credentials. Retrieve an existing set of credentials, identified by
486
+ * the `credentials_id`. The credentials themselves, as well as their metadata
487
+ * (name, project ID etc), are returned in the response.
488
+ *
489
+ * @param request - The request {@link SqsApiGetSqsCredentialsRequest}
490
+ * @returns A Promise of SqsCredentials
491
+ */
492
+ getSqsCredentials = request => this.client.fetch({
493
+ method: 'GET',
494
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sqs-credentials/${validatePathParam('sqsCredentialsId', request.sqsCredentialsId)}`
495
+ }, unmarshalSqsCredentials);
496
+ pageOfListSqsCredentials = (() => {
497
+ var _this16 = this;
498
+ return function (request) {
499
+ if (request === void 0) {
500
+ request = {};
501
+ }
502
+ return _this16.client.fetch({
503
+ method: 'GET',
504
+ path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this16.client.settings.defaultRegion)}/sqs-credentials`,
505
+ urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this16.client.settings.defaultPageSize], ['project_id', request.projectId])
506
+ }, unmarshalListSqsCredentialsResponse);
507
+ };
508
+ })();
509
+
510
+ /**
511
+ * List SQS credentials. List existing SQS credentials in the specified
512
+ * region. The response contains only the metadata for the credentials, not
513
+ * the credentials themselves.
514
+ *
515
+ * @param request - The request {@link SqsApiListSqsCredentialsRequest}
516
+ * @returns A Promise of ListSqsCredentialsResponse
517
+ */
518
+ listSqsCredentials = (() => {
519
+ var _this17 = this;
520
+ return function (request) {
521
+ if (request === void 0) {
522
+ request = {};
523
+ }
524
+ return enrichForPagination('sqsCredentials', _this17.pageOfListSqsCredentials, request);
525
+ };
526
+ })();
527
+ }
528
+
529
+ export { NatsAPI, SnsAPI, SqsAPI };
@@ -0,0 +1,6 @@
1
+ export { NatsAPI, SnsAPI, SqsAPI } from './api.gen.js';
2
+ import * as validationRules_gen from './validation-rules.gen.js';
3
+ export { validationRules_gen as ValidationRules };
4
+
5
+ // This file was automatically generated. DO NOT EDIT.
6
+ // If you have any remark or suggestion do not hesitate to open an issue.