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