@scaleway/sdk-mnq 1.0.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.
@@ -0,0 +1,627 @@
1
+ import type { Region as ScwRegion } from '@scaleway/sdk-client';
2
+ export type ListNatsAccountsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'name_asc' | 'name_desc';
3
+ export type ListNatsCredentialsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'name_asc' | 'name_desc';
4
+ export type ListSnsCredentialsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'name_asc' | 'name_desc';
5
+ export type ListSqsCredentialsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'name_asc' | 'name_desc';
6
+ export type SnsInfoStatus = 'unknown_status' | 'enabled' | 'disabled';
7
+ export type SqsInfoStatus = 'unknown_status' | 'enabled' | 'disabled';
8
+ export interface File {
9
+ /**
10
+ * File name.
11
+ */
12
+ name: string;
13
+ /**
14
+ * File content.
15
+ */
16
+ content: string;
17
+ }
18
+ export interface SnsPermissions {
19
+ /**
20
+ * Defines whether the credentials bearer can publish messages to the service (publish to Topics and Events topics).
21
+ */
22
+ canPublish?: boolean;
23
+ /**
24
+ * Defines whether the credentials bearer can receive messages from the service (configure subscriptions).
25
+ */
26
+ canReceive?: boolean;
27
+ /**
28
+ * Defines whether the credentials bearer can manage the associated Topics and Events topics or subscriptions.
29
+ */
30
+ canManage?: boolean;
31
+ }
32
+ export interface SqsPermissions {
33
+ /**
34
+ * Defines whether the credentials bearer can publish messages to the service (send messages to Queues queues).
35
+ */
36
+ canPublish?: boolean;
37
+ /**
38
+ * Defines whether the credentials bearer can receive messages from Queues queues.
39
+ */
40
+ canReceive?: boolean;
41
+ /**
42
+ * Defines whether the credentials bearer can manage the associated Queues queues.
43
+ */
44
+ canManage?: boolean;
45
+ }
46
+ export interface NatsAccount {
47
+ /**
48
+ * NATS account ID.
49
+ */
50
+ id: string;
51
+ /**
52
+ * NATS account name.
53
+ */
54
+ name: string;
55
+ /**
56
+ * Endpoint of the NATS service for this account.
57
+ */
58
+ endpoint: string;
59
+ /**
60
+ * Project ID of the Project containing the NATS account.
61
+ */
62
+ projectId: string;
63
+ /**
64
+ * Region where the NATS account is deployed.
65
+ */
66
+ region: ScwRegion;
67
+ /**
68
+ * NATS account creation date.
69
+ */
70
+ createdAt?: Date;
71
+ /**
72
+ * NATS account last modification date.
73
+ */
74
+ updatedAt?: Date;
75
+ }
76
+ export interface NatsCredentials {
77
+ /**
78
+ * ID of the credentials.
79
+ */
80
+ id: string;
81
+ /**
82
+ * Name of the credentials.
83
+ */
84
+ name: string;
85
+ /**
86
+ * NATS account containing the credentials.
87
+ */
88
+ natsAccountId: string;
89
+ /**
90
+ * NATS credentials creation date.
91
+ */
92
+ createdAt?: Date;
93
+ /**
94
+ * NATS credentials last modification date.
95
+ */
96
+ updatedAt?: Date;
97
+ /**
98
+ * Object containing the credentials file (Only returned by **Create Nats Credentials** call).
99
+ */
100
+ credentials?: File;
101
+ /**
102
+ * Checksum of the credentials file.
103
+ */
104
+ checksum: string;
105
+ }
106
+ export interface SnsCredentials {
107
+ /**
108
+ * ID of the credentials.
109
+ */
110
+ id: string;
111
+ /**
112
+ * Name of the credentials.
113
+ */
114
+ name: string;
115
+ /**
116
+ * Project ID of the Project containing the credentials.
117
+ */
118
+ projectId: string;
119
+ /**
120
+ * Region where the credentials exists.
121
+ */
122
+ region: ScwRegion;
123
+ /**
124
+ * Credentials creation date.
125
+ */
126
+ createdAt?: Date;
127
+ /**
128
+ * Credentials last modification date.
129
+ */
130
+ updatedAt?: Date;
131
+ /**
132
+ * Access key ID.
133
+ */
134
+ accessKey: string;
135
+ /**
136
+ * Secret key ID (Only returned by **Create Topics and Events Credentials** call).
137
+ */
138
+ secretKey: string;
139
+ /**
140
+ * Checksum of the Secret key.
141
+ */
142
+ secretChecksum: string;
143
+ /**
144
+ * Permissions associated with these credentials.
145
+ */
146
+ permissions?: SnsPermissions;
147
+ }
148
+ export interface SqsCredentials {
149
+ /**
150
+ * ID of the credentials.
151
+ */
152
+ id: string;
153
+ /**
154
+ * Name of the credentials.
155
+ */
156
+ name: string;
157
+ /**
158
+ * Project ID of the Project containing the credentials.
159
+ */
160
+ projectId: string;
161
+ /**
162
+ * Region where the credentials exists.
163
+ */
164
+ region: ScwRegion;
165
+ /**
166
+ * Credentials creation date.
167
+ */
168
+ createdAt?: Date;
169
+ /**
170
+ * Credentials last modification date.
171
+ */
172
+ updatedAt?: Date;
173
+ /**
174
+ * Access key ID.
175
+ */
176
+ accessKey: string;
177
+ /**
178
+ * Secret key ID (Only returned by **Create Queues Credentials** call).
179
+ */
180
+ secretKey: string;
181
+ /**
182
+ * Checksum of the Secret key.
183
+ */
184
+ secretChecksum: string;
185
+ /**
186
+ * Permissions associated with these credentials.
187
+ */
188
+ permissions?: SqsPermissions;
189
+ }
190
+ export interface ListNatsAccountsResponse {
191
+ /**
192
+ * Total count of existing NATS accounts (matching any filters specified).
193
+ */
194
+ totalCount: number;
195
+ /**
196
+ * NATS accounts on this page.
197
+ */
198
+ natsAccounts: NatsAccount[];
199
+ }
200
+ export interface ListNatsCredentialsResponse {
201
+ /**
202
+ * Total count of existing credentials (matching any filters specified).
203
+ */
204
+ totalCount: number;
205
+ /**
206
+ * Credentials on this page.
207
+ */
208
+ natsCredentials: NatsCredentials[];
209
+ }
210
+ export interface ListSnsCredentialsResponse {
211
+ /**
212
+ * Total count of existing credentials (matching any filters specified).
213
+ */
214
+ totalCount: number;
215
+ /**
216
+ * Topics and Events credentials on this page.
217
+ */
218
+ snsCredentials: SnsCredentials[];
219
+ }
220
+ export interface ListSqsCredentialsResponse {
221
+ /**
222
+ * Total count of existing credentials (matching any filters specified).
223
+ */
224
+ totalCount: number;
225
+ /**
226
+ * Queues credentials on this page.
227
+ */
228
+ sqsCredentials: SqsCredentials[];
229
+ }
230
+ export type NatsApiCreateNatsAccountRequest = {
231
+ /**
232
+ * Region to target. If none is passed will use default region from the config.
233
+ */
234
+ region?: ScwRegion;
235
+ /**
236
+ * NATS account name.
237
+ */
238
+ name?: string;
239
+ /**
240
+ * Project containing the NATS account.
241
+ */
242
+ projectId?: string;
243
+ };
244
+ export type NatsApiCreateNatsCredentialsRequest = {
245
+ /**
246
+ * Region to target. If none is passed will use default region from the config.
247
+ */
248
+ region?: ScwRegion;
249
+ /**
250
+ * NATS account containing the credentials.
251
+ */
252
+ natsAccountId: string;
253
+ /**
254
+ * Name of the credentials.
255
+ */
256
+ name?: string;
257
+ };
258
+ export type NatsApiDeleteNatsAccountRequest = {
259
+ /**
260
+ * Region to target. If none is passed will use default region from the config.
261
+ */
262
+ region?: ScwRegion;
263
+ /**
264
+ * ID of the NATS account to delete.
265
+ */
266
+ natsAccountId: string;
267
+ };
268
+ export type NatsApiDeleteNatsCredentialsRequest = {
269
+ /**
270
+ * Region to target. If none is passed will use default region from the config.
271
+ */
272
+ region?: ScwRegion;
273
+ /**
274
+ * ID of the credentials to delete.
275
+ */
276
+ natsCredentialsId: string;
277
+ };
278
+ export type NatsApiGetNatsAccountRequest = {
279
+ /**
280
+ * Region to target. If none is passed will use default region from the config.
281
+ */
282
+ region?: ScwRegion;
283
+ /**
284
+ * ID of the NATS account to get.
285
+ */
286
+ natsAccountId: string;
287
+ };
288
+ export type NatsApiGetNatsCredentialsRequest = {
289
+ /**
290
+ * Region to target. If none is passed will use default region from the config.
291
+ */
292
+ region?: ScwRegion;
293
+ /**
294
+ * ID of the credentials to get.
295
+ */
296
+ natsCredentialsId: string;
297
+ };
298
+ export type NatsApiListNatsAccountsRequest = {
299
+ /**
300
+ * Region to target. If none is passed will use default region from the config.
301
+ */
302
+ region?: ScwRegion;
303
+ /**
304
+ * Include only NATS accounts in this Project.
305
+ */
306
+ projectId?: string;
307
+ /**
308
+ * Page number to return.
309
+ */
310
+ page?: number;
311
+ /**
312
+ * Maximum number of NATS accounts to return per page.
313
+ */
314
+ pageSize?: number;
315
+ /**
316
+ * Order in which to return results.
317
+ */
318
+ orderBy?: ListNatsAccountsRequestOrderBy;
319
+ };
320
+ export type NatsApiListNatsCredentialsRequest = {
321
+ /**
322
+ * Region to target. If none is passed will use default region from the config.
323
+ */
324
+ region?: ScwRegion;
325
+ /**
326
+ * Include only NATS accounts in this Project.
327
+ */
328
+ projectId?: string;
329
+ /**
330
+ * Include only credentials for this NATS account.
331
+ */
332
+ natsAccountId?: string;
333
+ /**
334
+ * Page number to return.
335
+ */
336
+ page?: number;
337
+ /**
338
+ * Maximum number of credentials to return per page.
339
+ */
340
+ pageSize?: number;
341
+ /**
342
+ * Order in which to return results.
343
+ */
344
+ orderBy?: ListNatsCredentialsRequestOrderBy;
345
+ };
346
+ export type NatsApiUpdateNatsAccountRequest = {
347
+ /**
348
+ * Region to target. If none is passed will use default region from the config.
349
+ */
350
+ region?: ScwRegion;
351
+ /**
352
+ * ID of the NATS account to update.
353
+ */
354
+ natsAccountId: string;
355
+ /**
356
+ * NATS account name.
357
+ */
358
+ name?: string;
359
+ };
360
+ export type SnsApiActivateSnsRequest = {
361
+ /**
362
+ * Region to target. If none is passed will use default region from the config.
363
+ */
364
+ region?: ScwRegion;
365
+ /**
366
+ * Project on which to activate the Topics and Events service.
367
+ */
368
+ projectId?: string;
369
+ };
370
+ export type SnsApiCreateSnsCredentialsRequest = {
371
+ /**
372
+ * Region to target. If none is passed will use default region from the config.
373
+ */
374
+ region?: ScwRegion;
375
+ /**
376
+ * Project containing the Topics and Events credentials.
377
+ */
378
+ projectId?: string;
379
+ /**
380
+ * Name of the credentials.
381
+ */
382
+ name?: string;
383
+ /**
384
+ * Permissions associated with these credentials.
385
+ */
386
+ permissions?: SnsPermissions;
387
+ };
388
+ export type SnsApiDeactivateSnsRequest = {
389
+ /**
390
+ * Region to target. If none is passed will use default region from the config.
391
+ */
392
+ region?: ScwRegion;
393
+ /**
394
+ * Project on which to deactivate the Topics and Events service.
395
+ */
396
+ projectId?: string;
397
+ };
398
+ export type SnsApiDeleteSnsCredentialsRequest = {
399
+ /**
400
+ * Region to target. If none is passed will use default region from the config.
401
+ */
402
+ region?: ScwRegion;
403
+ /**
404
+ * ID of the credentials to delete.
405
+ */
406
+ snsCredentialsId: string;
407
+ };
408
+ export type SnsApiGetSnsCredentialsRequest = {
409
+ /**
410
+ * Region to target. If none is passed will use default region from the config.
411
+ */
412
+ region?: ScwRegion;
413
+ /**
414
+ * ID of the Topics and Events credentials to get.
415
+ */
416
+ snsCredentialsId: string;
417
+ };
418
+ export type SnsApiGetSnsInfoRequest = {
419
+ /**
420
+ * Region to target. If none is passed will use default region from the config.
421
+ */
422
+ region?: ScwRegion;
423
+ /**
424
+ * Project to retrieve Topics and Events info from.
425
+ */
426
+ projectId?: string;
427
+ };
428
+ export type SnsApiListSnsCredentialsRequest = {
429
+ /**
430
+ * Region to target. If none is passed will use default region from the config.
431
+ */
432
+ region?: ScwRegion;
433
+ /**
434
+ * Include only Topics and Events credentials in this Project.
435
+ */
436
+ projectId?: string;
437
+ /**
438
+ * Page number to return.
439
+ */
440
+ page?: number;
441
+ /**
442
+ * Maximum number of credentials to return per page.
443
+ */
444
+ pageSize?: number;
445
+ /**
446
+ * Order in which to return results.
447
+ */
448
+ orderBy?: ListSnsCredentialsRequestOrderBy;
449
+ };
450
+ export type SnsApiUpdateSnsCredentialsRequest = {
451
+ /**
452
+ * Region to target. If none is passed will use default region from the config.
453
+ */
454
+ region?: ScwRegion;
455
+ /**
456
+ * ID of the Topics and Events credentials to update.
457
+ */
458
+ snsCredentialsId: string;
459
+ /**
460
+ * Name of the credentials.
461
+ */
462
+ name?: string;
463
+ /**
464
+ * Permissions associated with these credentials.
465
+ */
466
+ permissions?: SnsPermissions;
467
+ };
468
+ export interface SnsInfo {
469
+ /**
470
+ * Project ID of the Project containing the service.
471
+ */
472
+ projectId: string;
473
+ /**
474
+ * Region of the service.
475
+ */
476
+ region: ScwRegion;
477
+ /**
478
+ * Topics and Events creation date.
479
+ */
480
+ createdAt?: Date;
481
+ /**
482
+ * Topics and Events last modification date.
483
+ */
484
+ updatedAt?: Date;
485
+ /**
486
+ * Topics and Events activation status.
487
+ */
488
+ status: SnsInfoStatus;
489
+ /**
490
+ * Endpoint of the Topics and Events service for this region and project.
491
+ */
492
+ snsEndpointUrl: string;
493
+ }
494
+ export type SqsApiActivateSqsRequest = {
495
+ /**
496
+ * Region to target. If none is passed will use default region from the config.
497
+ */
498
+ region?: ScwRegion;
499
+ /**
500
+ * Project on which to activate the Queues service.
501
+ */
502
+ projectId?: string;
503
+ };
504
+ export type SqsApiCreateSqsCredentialsRequest = {
505
+ /**
506
+ * Region to target. If none is passed will use default region from the config.
507
+ */
508
+ region?: ScwRegion;
509
+ /**
510
+ * Project containing the Queues credentials.
511
+ */
512
+ projectId?: string;
513
+ /**
514
+ * Name of the credentials.
515
+ */
516
+ name?: string;
517
+ /**
518
+ * Permissions associated with these credentials.
519
+ */
520
+ permissions?: SqsPermissions;
521
+ };
522
+ export type SqsApiDeactivateSqsRequest = {
523
+ /**
524
+ * Region to target. If none is passed will use default region from the config.
525
+ */
526
+ region?: ScwRegion;
527
+ /**
528
+ * Project on which to deactivate the Queues service.
529
+ */
530
+ projectId?: string;
531
+ };
532
+ export type SqsApiDeleteSqsCredentialsRequest = {
533
+ /**
534
+ * Region to target. If none is passed will use default region from the config.
535
+ */
536
+ region?: ScwRegion;
537
+ /**
538
+ * ID of the credentials to delete.
539
+ */
540
+ sqsCredentialsId: string;
541
+ };
542
+ export type SqsApiGetSqsCredentialsRequest = {
543
+ /**
544
+ * Region to target. If none is passed will use default region from the config.
545
+ */
546
+ region?: ScwRegion;
547
+ /**
548
+ * ID of the Queues credentials to get.
549
+ */
550
+ sqsCredentialsId: string;
551
+ };
552
+ export type SqsApiGetSqsInfoRequest = {
553
+ /**
554
+ * Region to target. If none is passed will use default region from the config.
555
+ */
556
+ region?: ScwRegion;
557
+ /**
558
+ * Project to retrieve Queues info from.
559
+ */
560
+ projectId?: string;
561
+ };
562
+ export type SqsApiListSqsCredentialsRequest = {
563
+ /**
564
+ * Region to target. If none is passed will use default region from the config.
565
+ */
566
+ region?: ScwRegion;
567
+ /**
568
+ * Include only Queues credentials in this Project.
569
+ */
570
+ projectId?: string;
571
+ /**
572
+ * Page number to return.
573
+ */
574
+ page?: number;
575
+ /**
576
+ * Maximum number of credentials to return per page.
577
+ */
578
+ pageSize?: number;
579
+ /**
580
+ * Order in which to return results.
581
+ */
582
+ orderBy?: ListSqsCredentialsRequestOrderBy;
583
+ };
584
+ export type SqsApiUpdateSqsCredentialsRequest = {
585
+ /**
586
+ * Region to target. If none is passed will use default region from the config.
587
+ */
588
+ region?: ScwRegion;
589
+ /**
590
+ * ID of the Queues credentials to update.
591
+ */
592
+ sqsCredentialsId: string;
593
+ /**
594
+ * Name of the credentials.
595
+ */
596
+ name?: string;
597
+ /**
598
+ * Permissions associated with these credentials.
599
+ */
600
+ permissions?: SqsPermissions;
601
+ };
602
+ export interface SqsInfo {
603
+ /**
604
+ * Project ID of the Project containing the service.
605
+ */
606
+ projectId: string;
607
+ /**
608
+ * Region of the service.
609
+ */
610
+ region: ScwRegion;
611
+ /**
612
+ * Queues creation date.
613
+ */
614
+ createdAt?: Date;
615
+ /**
616
+ * Queues last modification date.
617
+ */
618
+ updatedAt?: Date;
619
+ /**
620
+ * Queues activation status.
621
+ */
622
+ status: SqsInfoStatus;
623
+ /**
624
+ * Endpoint of the Queues service for this region and project.
625
+ */
626
+ sqsEndpointUrl: string;
627
+ }
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const NatsAccount = {
4
+ name: {
5
+ maxLength: 64,
6
+ minLength: 1
7
+ }
8
+ };
9
+ const NatsApiCreateNatsAccountRequest = {
10
+ name: {
11
+ maxLength: 64,
12
+ minLength: 1
13
+ }
14
+ };
15
+ const NatsApiCreateNatsCredentialsRequest = {
16
+ name: {
17
+ maxLength: 500,
18
+ minLength: 1
19
+ }
20
+ };
21
+ const NatsApiUpdateNatsAccountRequest = {
22
+ name: {
23
+ maxLength: 64,
24
+ minLength: 1
25
+ }
26
+ };
27
+ const NatsCredentials = {
28
+ name: {
29
+ maxLength: 500,
30
+ minLength: 1
31
+ }
32
+ };
33
+ const SnsApiCreateSnsCredentialsRequest = {
34
+ name: {
35
+ maxLength: 500,
36
+ minLength: 1
37
+ }
38
+ };
39
+ const SnsApiUpdateSnsCredentialsRequest = {
40
+ name: {
41
+ maxLength: 500,
42
+ minLength: 1
43
+ }
44
+ };
45
+ const SnsCredentials = {
46
+ accessKey: {
47
+ minLength: 1
48
+ },
49
+ name: {
50
+ maxLength: 500,
51
+ minLength: 1
52
+ }
53
+ };
54
+ const SqsApiCreateSqsCredentialsRequest = {
55
+ name: {
56
+ maxLength: 500,
57
+ minLength: 1
58
+ }
59
+ };
60
+ const SqsApiUpdateSqsCredentialsRequest = {
61
+ name: {
62
+ maxLength: 500,
63
+ minLength: 1
64
+ }
65
+ };
66
+ const SqsCredentials = {
67
+ accessKey: {
68
+ minLength: 1
69
+ },
70
+ name: {
71
+ maxLength: 500,
72
+ minLength: 1
73
+ }
74
+ };
75
+ exports.NatsAccount = NatsAccount;
76
+ exports.NatsApiCreateNatsAccountRequest = NatsApiCreateNatsAccountRequest;
77
+ exports.NatsApiCreateNatsCredentialsRequest = NatsApiCreateNatsCredentialsRequest;
78
+ exports.NatsApiUpdateNatsAccountRequest = NatsApiUpdateNatsAccountRequest;
79
+ exports.NatsCredentials = NatsCredentials;
80
+ exports.SnsApiCreateSnsCredentialsRequest = SnsApiCreateSnsCredentialsRequest;
81
+ exports.SnsApiUpdateSnsCredentialsRequest = SnsApiUpdateSnsCredentialsRequest;
82
+ exports.SnsCredentials = SnsCredentials;
83
+ exports.SqsApiCreateSqsCredentialsRequest = SqsApiCreateSqsCredentialsRequest;
84
+ exports.SqsApiUpdateSqsCredentialsRequest = SqsApiUpdateSqsCredentialsRequest;
85
+ exports.SqsCredentials = SqsCredentials;