@scaleway/sdk-mnq 2.1.1 → 2.2.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.
@@ -9,10 +9,7 @@ class NatsAPI extends API {
9
9
  * type ∈ {'zone','region','global','unspecified'}
10
10
  */
11
11
  static LOCALITY = toApiLocality({
12
- regions: [
13
- "fr-par",
14
- "nl-ams"
15
- ]
12
+ regions: ["fr-par", "nl-ams"]
16
13
  });
17
14
  /**
18
15
  * Create a NATS account. Create a NATS account associated with a Project.
@@ -36,12 +33,10 @@ class NatsAPI extends API {
36
33
  *
37
34
  * @param request - The request {@link NatsApiDeleteNatsAccountRequest}
38
35
  */
39
- deleteNatsAccount = (request) => this.client.fetch(
40
- {
41
- method: "DELETE",
42
- path: `/mnq/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/nats-accounts/${validatePathParam("natsAccountId", request.natsAccountId)}`
43
- }
44
- );
36
+ deleteNatsAccount = (request) => this.client.fetch({
37
+ method: "DELETE",
38
+ path: `/mnq/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/nats-accounts/${validatePathParam("natsAccountId", request.natsAccountId)}`
39
+ });
45
40
  /**
46
41
  * Update the name of a NATS account. Update the name of a NATS account, specified by its NATS account ID.
47
42
  *
@@ -79,7 +74,10 @@ class NatsAPI extends API {
79
74
  urlParams: urlParams(
80
75
  ["order_by", request.orderBy],
81
76
  ["page", request.page],
82
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
77
+ [
78
+ "page_size",
79
+ request.pageSize ?? this.client.settings.defaultPageSize
80
+ ],
83
81
  ["project_id", request.projectId]
84
82
  )
85
83
  },
@@ -101,7 +99,10 @@ class NatsAPI extends API {
101
99
  createNatsCredentials = (request) => this.client.fetch(
102
100
  {
103
101
  body: JSON.stringify(
104
- marshalNatsApiCreateNatsCredentialsRequest(request, this.client.settings)
102
+ marshalNatsApiCreateNatsCredentialsRequest(
103
+ request,
104
+ this.client.settings
105
+ )
105
106
  ),
106
107
  headers: jsonContentHeaders,
107
108
  method: "POST",
@@ -114,12 +115,10 @@ class NatsAPI extends API {
114
115
  *
115
116
  * @param request - The request {@link NatsApiDeleteNatsCredentialsRequest}
116
117
  */
117
- deleteNatsCredentials = (request) => this.client.fetch(
118
- {
119
- method: "DELETE",
120
- path: `/mnq/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/nats-credentials/${validatePathParam("natsCredentialsId", request.natsCredentialsId)}`
121
- }
122
- );
118
+ deleteNatsCredentials = (request) => this.client.fetch({
119
+ method: "DELETE",
120
+ path: `/mnq/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/nats-credentials/${validatePathParam("natsCredentialsId", request.natsCredentialsId)}`
121
+ });
123
122
  /**
124
123
  * Get NATS credentials. Retrieve an existing set of credentials, identified by the `nats_credentials_id`. The credentials themselves are NOT returned, only their metadata (NATS account ID, credentials name, etc), are returned in the response.
125
124
  *
@@ -141,7 +140,10 @@ class NatsAPI extends API {
141
140
  ["nats_account_id", request.natsAccountId],
142
141
  ["order_by", request.orderBy],
143
142
  ["page", request.page],
144
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
143
+ [
144
+ "page_size",
145
+ request.pageSize ?? this.client.settings.defaultPageSize
146
+ ],
145
147
  ["project_id", request.projectId]
146
148
  )
147
149
  },
@@ -153,7 +155,11 @@ class NatsAPI extends API {
153
155
  * @param request - The request {@link NatsApiListNatsCredentialsRequest}
154
156
  * @returns A Promise of ListNatsCredentialsResponse
155
157
  */
156
- listNatsCredentials = (request = {}) => enrichForPagination("natsCredentials", this.pageOfListNatsCredentials, request);
158
+ listNatsCredentials = (request = {}) => enrichForPagination(
159
+ "natsCredentials",
160
+ this.pageOfListNatsCredentials,
161
+ request
162
+ );
157
163
  }
158
164
  class SnsAPI extends API {
159
165
  /**
@@ -161,10 +167,7 @@ class SnsAPI extends API {
161
167
  * type ∈ {'zone','region','global','unspecified'}
162
168
  */
163
169
  static LOCALITY = toApiLocality({
164
- regions: [
165
- "fr-par",
166
- "nl-ams"
167
- ]
170
+ regions: ["fr-par", "nl-ams"]
168
171
  });
169
172
  /**
170
173
  * Activate Topics and Events. Activate Topics and Events for the specified Project ID. Topics and Events must be activated before any usage. Activating Topics and Events does not trigger any billing, and you can deactivate at any time.
@@ -193,9 +196,10 @@ class SnsAPI extends API {
193
196
  {
194
197
  method: "GET",
195
198
  path: `/mnq/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/sns-info`,
196
- urlParams: urlParams(
197
- ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
198
- )
199
+ urlParams: urlParams([
200
+ "project_id",
201
+ request.projectId ?? this.client.settings.defaultProjectId
202
+ ])
199
203
  },
200
204
  unmarshalSnsInfo
201
205
  );
@@ -225,7 +229,10 @@ class SnsAPI extends API {
225
229
  createSnsCredentials = (request = {}) => this.client.fetch(
226
230
  {
227
231
  body: JSON.stringify(
228
- marshalSnsApiCreateSnsCredentialsRequest(request, this.client.settings)
232
+ marshalSnsApiCreateSnsCredentialsRequest(
233
+ request,
234
+ this.client.settings
235
+ )
229
236
  ),
230
237
  headers: jsonContentHeaders,
231
238
  method: "POST",
@@ -238,12 +245,10 @@ class SnsAPI extends API {
238
245
  *
239
246
  * @param request - The request {@link SnsApiDeleteSnsCredentialsRequest}
240
247
  */
241
- deleteSnsCredentials = (request) => this.client.fetch(
242
- {
243
- method: "DELETE",
244
- path: `/mnq/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/sns-credentials/${validatePathParam("snsCredentialsId", request.snsCredentialsId)}`
245
- }
246
- );
248
+ deleteSnsCredentials = (request) => this.client.fetch({
249
+ method: "DELETE",
250
+ path: `/mnq/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/sns-credentials/${validatePathParam("snsCredentialsId", request.snsCredentialsId)}`
251
+ });
247
252
  /**
248
253
  * Update Topics and Events credentials. Update a set of Topics and Events credentials. You can update the credentials' name, or their permissions.
249
254
  *
@@ -253,7 +258,10 @@ class SnsAPI extends API {
253
258
  updateSnsCredentials = (request) => this.client.fetch(
254
259
  {
255
260
  body: JSON.stringify(
256
- marshalSnsApiUpdateSnsCredentialsRequest(request, this.client.settings)
261
+ marshalSnsApiUpdateSnsCredentialsRequest(
262
+ request,
263
+ this.client.settings
264
+ )
257
265
  ),
258
266
  headers: jsonContentHeaders,
259
267
  method: "PATCH",
@@ -281,7 +289,10 @@ class SnsAPI extends API {
281
289
  urlParams: urlParams(
282
290
  ["order_by", request.orderBy],
283
291
  ["page", request.page],
284
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
292
+ [
293
+ "page_size",
294
+ request.pageSize ?? this.client.settings.defaultPageSize
295
+ ],
285
296
  ["project_id", request.projectId]
286
297
  )
287
298
  },
@@ -293,7 +304,11 @@ class SnsAPI extends API {
293
304
  * @param request - The request {@link SnsApiListSnsCredentialsRequest}
294
305
  * @returns A Promise of ListSnsCredentialsResponse
295
306
  */
296
- listSnsCredentials = (request = {}) => enrichForPagination("snsCredentials", this.pageOfListSnsCredentials, request);
307
+ listSnsCredentials = (request = {}) => enrichForPagination(
308
+ "snsCredentials",
309
+ this.pageOfListSnsCredentials,
310
+ request
311
+ );
297
312
  }
298
313
  class SqsAPI extends API {
299
314
  /**
@@ -301,10 +316,7 @@ class SqsAPI extends API {
301
316
  * type ∈ {'zone','region','global','unspecified'}
302
317
  */
303
318
  static LOCALITY = toApiLocality({
304
- regions: [
305
- "fr-par",
306
- "nl-ams"
307
- ]
319
+ regions: ["fr-par", "nl-ams"]
308
320
  });
309
321
  /**
310
322
  * Activate Queues. Activate Queues for the specified Project ID. Queues must be activated before any usage such as creating credentials and queues. Activating Queues does not trigger any billing, and you can deactivate at any time.
@@ -333,9 +345,10 @@ class SqsAPI extends API {
333
345
  {
334
346
  method: "GET",
335
347
  path: `/mnq/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/sqs-info`,
336
- urlParams: urlParams(
337
- ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
338
- )
348
+ urlParams: urlParams([
349
+ "project_id",
350
+ request.projectId ?? this.client.settings.defaultProjectId
351
+ ])
339
352
  },
340
353
  unmarshalSqsInfo
341
354
  );
@@ -365,7 +378,10 @@ class SqsAPI extends API {
365
378
  createSqsCredentials = (request = {}) => this.client.fetch(
366
379
  {
367
380
  body: JSON.stringify(
368
- marshalSqsApiCreateSqsCredentialsRequest(request, this.client.settings)
381
+ marshalSqsApiCreateSqsCredentialsRequest(
382
+ request,
383
+ this.client.settings
384
+ )
369
385
  ),
370
386
  headers: jsonContentHeaders,
371
387
  method: "POST",
@@ -378,12 +394,10 @@ class SqsAPI extends API {
378
394
  *
379
395
  * @param request - The request {@link SqsApiDeleteSqsCredentialsRequest}
380
396
  */
381
- deleteSqsCredentials = (request) => this.client.fetch(
382
- {
383
- method: "DELETE",
384
- path: `/mnq/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/sqs-credentials/${validatePathParam("sqsCredentialsId", request.sqsCredentialsId)}`
385
- }
386
- );
397
+ deleteSqsCredentials = (request) => this.client.fetch({
398
+ method: "DELETE",
399
+ path: `/mnq/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/sqs-credentials/${validatePathParam("sqsCredentialsId", request.sqsCredentialsId)}`
400
+ });
387
401
  /**
388
402
  * Update Queues credentials. Update a set of Queues credentials. You can update the credentials' name, or their permissions.
389
403
  *
@@ -393,7 +407,10 @@ class SqsAPI extends API {
393
407
  updateSqsCredentials = (request) => this.client.fetch(
394
408
  {
395
409
  body: JSON.stringify(
396
- marshalSqsApiUpdateSqsCredentialsRequest(request, this.client.settings)
410
+ marshalSqsApiUpdateSqsCredentialsRequest(
411
+ request,
412
+ this.client.settings
413
+ )
397
414
  ),
398
415
  headers: jsonContentHeaders,
399
416
  method: "PATCH",
@@ -421,7 +438,10 @@ class SqsAPI extends API {
421
438
  urlParams: urlParams(
422
439
  ["order_by", request.orderBy],
423
440
  ["page", request.page],
424
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
441
+ [
442
+ "page_size",
443
+ request.pageSize ?? this.client.settings.defaultPageSize
444
+ ],
425
445
  ["project_id", request.projectId]
426
446
  )
427
447
  },
@@ -433,7 +453,11 @@ class SqsAPI extends API {
433
453
  * @param request - The request {@link SqsApiListSqsCredentialsRequest}
434
454
  * @returns A Promise of ListSqsCredentialsResponse
435
455
  */
436
- listSqsCredentials = (request = {}) => enrichForPagination("sqsCredentials", this.pageOfListSqsCredentials, request);
456
+ listSqsCredentials = (request = {}) => enrichForPagination(
457
+ "sqsCredentials",
458
+ this.pageOfListSqsCredentials,
459
+ request
460
+ );
437
461
  }
438
462
  export {
439
463
  NatsAPI,
@@ -113,7 +113,10 @@ const unmarshalListNatsAccountsResponse = (data) => {
113
113
  );
114
114
  }
115
115
  return {
116
- natsAccounts: unmarshalArrayOfObject(data.nats_accounts, unmarshalNatsAccount),
116
+ natsAccounts: unmarshalArrayOfObject(
117
+ data.nats_accounts,
118
+ unmarshalNatsAccount
119
+ ),
117
120
  totalCount: data.total_count
118
121
  };
119
122
  };
@@ -124,7 +127,10 @@ const unmarshalListNatsCredentialsResponse = (data) => {
124
127
  );
125
128
  }
126
129
  return {
127
- natsCredentials: unmarshalArrayOfObject(data.nats_credentials, unmarshalNatsCredentials),
130
+ natsCredentials: unmarshalArrayOfObject(
131
+ data.nats_credentials,
132
+ unmarshalNatsCredentials
133
+ ),
128
134
  totalCount: data.total_count
129
135
  };
130
136
  };
@@ -135,7 +141,10 @@ const unmarshalListSnsCredentialsResponse = (data) => {
135
141
  );
136
142
  }
137
143
  return {
138
- snsCredentials: unmarshalArrayOfObject(data.sns_credentials, unmarshalSnsCredentials),
144
+ snsCredentials: unmarshalArrayOfObject(
145
+ data.sns_credentials,
146
+ unmarshalSnsCredentials
147
+ ),
139
148
  totalCount: data.total_count
140
149
  };
141
150
  };
@@ -146,7 +155,10 @@ const unmarshalListSqsCredentialsResponse = (data) => {
146
155
  );
147
156
  }
148
157
  return {
149
- sqsCredentials: unmarshalArrayOfObject(data.sqs_credentials, unmarshalSqsCredentials),
158
+ sqsCredentials: unmarshalArrayOfObject(
159
+ data.sqs_credentials,
160
+ unmarshalSqsCredentials
161
+ ),
150
162
  totalCount: data.total_count
151
163
  };
152
164
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-mnq",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Scaleway SDK mnq",
5
5
  "license": "Apache-2.0",
6
6
  "files": [