@scaleway/sdk 2.0.0-alpha.7 → 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
@@ -129,20 +129,12 @@ class API extends API$1 {
129
129
  * @param request - The request {@link DetachFlexibleIPRequest}
130
130
  * @returns A Promise of DetachFlexibleIPsResponse
131
131
  */
132
- detachFlexibleIP = (() => {
133
- var _this3 = this;
134
- return function (request) {
135
- if (request === void 0) {
136
- request = {};
137
- }
138
- return _this3.client.fetch({
139
- body: JSON.stringify(marshalDetachFlexibleIPRequest(request, _this3.client.settings)),
140
- headers: jsonContentHeaders,
141
- method: 'POST',
142
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/fips/detach`
143
- }, unmarshalDetachFlexibleIPsResponse);
144
- };
145
- })();
132
+ detachFlexibleIP = request => this.client.fetch({
133
+ body: JSON.stringify(marshalDetachFlexibleIPRequest(request, this.client.settings)),
134
+ headers: jsonContentHeaders,
135
+ method: 'POST',
136
+ path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/detach`
137
+ }, unmarshalDetachFlexibleIPsResponse);
146
138
 
147
139
  /**
148
140
  * Generate a virtual MAC address on an existing flexible IP. Generate a
@@ -26,11 +26,11 @@ const unmarshalFlexibleIP = data => {
26
26
  description: data.description,
27
27
  id: data.id,
28
28
  ipAddress: data.ip_address,
29
- macAddress: unmarshalMACAddress(data.mac_address),
29
+ macAddress: data.mac_address ? unmarshalMACAddress(data.mac_address) : undefined,
30
30
  organizationId: data.organization_id,
31
31
  projectId: data.project_id,
32
32
  reverse: data.reverse,
33
- serverId: data.server_id ? data.server_id : undefined,
33
+ serverId: data.server_id,
34
34
  status: data.status,
35
35
  tags: data.tags,
36
36
  updatedAt: unmarshalDate(data.updated_at),
@@ -494,12 +494,26 @@ class API extends API$1 {
494
494
  method: 'DELETE',
495
495
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
496
496
  }, unmarshalToken);
497
+
498
+ /**
499
+ * Create a trigger. Create a new trigger for a specified function.
500
+ *
501
+ * @param request - The request {@link CreateTriggerRequest}
502
+ * @returns A Promise of Trigger
503
+ */
497
504
  createTrigger = request => this.client.fetch({
498
505
  body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
499
506
  headers: jsonContentHeaders,
500
507
  method: 'POST',
501
508
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers`
502
509
  }, unmarshalTrigger);
510
+
511
+ /**
512
+ * Get a trigger. Get a trigger with a specified ID.
513
+ *
514
+ * @param request - The request {@link GetTriggerRequest}
515
+ * @returns A Promise of Trigger
516
+ */
503
517
  getTrigger = request => this.client.fetch({
504
518
  method: 'GET',
505
519
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
@@ -536,6 +550,14 @@ class API extends API$1 {
536
550
  }, unmarshalListTriggersResponse);
537
551
  };
538
552
  })();
553
+
554
+ /**
555
+ * List all triggers. List all triggers belonging to a specified Organization
556
+ * or Project.
557
+ *
558
+ * @param request - The request {@link ListTriggersRequest}
559
+ * @returns A Promise of ListTriggersResponse
560
+ */
539
561
  listTriggers = (() => {
540
562
  var _this10 = this;
541
563
  return function (request) {
@@ -545,12 +567,26 @@ class API extends API$1 {
545
567
  return enrichForPagination('triggers', _this10.pageOfListTriggers, request);
546
568
  };
547
569
  })();
570
+
571
+ /**
572
+ * Update a trigger. Update a trigger with a specified ID.
573
+ *
574
+ * @param request - The request {@link UpdateTriggerRequest}
575
+ * @returns A Promise of Trigger
576
+ */
548
577
  updateTrigger = request => this.client.fetch({
549
578
  body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
550
579
  headers: jsonContentHeaders,
551
580
  method: 'PATCH',
552
581
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
553
582
  }, unmarshalTrigger);
583
+
584
+ /**
585
+ * Delete a trigger. Delete a trigger with a specified ID.
586
+ *
587
+ * @param request - The request {@link DeleteTriggerRequest}
588
+ * @returns A Promise of Trigger
589
+ */
554
590
  deleteTrigger = request => this.client.fetch({
555
591
  method: 'DELETE',
556
592
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
@@ -1,5 +1,7 @@
1
1
  export { API } from './api.gen.js';
2
2
  export { CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from './content.gen.js';
3
+ import * as validationRules_gen from './validation-rules.gen.js';
4
+ export { validationRules_gen as ValidationRules };
3
5
 
4
6
  // This file was automatically generated. DO NOT EDIT.
5
7
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -9,7 +9,7 @@ const unmarshalCron = data => {
9
9
  throw new TypeError(`Unmarshalling the type 'Cron' failed as data isn't a dictionary.`);
10
10
  }
11
11
  return {
12
- args: data.args ? data.args : undefined,
12
+ args: data.args,
13
13
  functionId: data.function_id,
14
14
  id: data.id,
15
15
  name: data.name,
@@ -22,7 +22,7 @@ const unmarshalDomain = data => {
22
22
  throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
23
23
  }
24
24
  return {
25
- errorMessage: data.error_message ? data.error_message : undefined,
25
+ errorMessage: data.error_message,
26
26
  functionId: data.function_id,
27
27
  hostname: data.hostname,
28
28
  id: data.id,
@@ -44,12 +44,12 @@ const unmarshalFunction = data => {
44
44
  throw new TypeError(`Unmarshalling the type 'Function' failed as data isn't a dictionary.`);
45
45
  }
46
46
  return {
47
- buildMessage: data.build_message ? data.build_message : undefined,
47
+ buildMessage: data.build_message,
48
48
  cpuLimit: data.cpu_limit,
49
- description: data.description ? data.description : undefined,
49
+ description: data.description,
50
50
  domainName: data.domain_name,
51
51
  environmentVariables: data.environment_variables,
52
- errorMessage: data.error_message ? data.error_message : undefined,
52
+ errorMessage: data.error_message,
53
53
  handler: data.handler,
54
54
  httpOption: data.http_option,
55
55
  id: data.id,
@@ -64,7 +64,7 @@ const unmarshalFunction = data => {
64
64
  runtimeMessage: data.runtime_message,
65
65
  secretEnvironmentVariables: unmarshalArrayOfObject(data.secret_environment_variables, unmarshalSecretHashedValue),
66
66
  status: data.status,
67
- timeout: data.timeout ? data.timeout : undefined
67
+ timeout: data.timeout
68
68
  };
69
69
  };
70
70
  const unmarshalNamespace = data => {
@@ -72,9 +72,9 @@ const unmarshalNamespace = data => {
72
72
  throw new TypeError(`Unmarshalling the type 'Namespace' failed as data isn't a dictionary.`);
73
73
  }
74
74
  return {
75
- description: data.description ? data.description : undefined,
75
+ description: data.description,
76
76
  environmentVariables: data.environment_variables,
77
- errorMessage: data.error_message ? data.error_message : undefined,
77
+ errorMessage: data.error_message,
78
78
  id: data.id,
79
79
  name: data.name,
80
80
  organizationId: data.organization_id,
@@ -91,12 +91,12 @@ const unmarshalToken = data => {
91
91
  throw new TypeError(`Unmarshalling the type 'Token' failed as data isn't a dictionary.`);
92
92
  }
93
93
  return {
94
- description: data.description ? data.description : undefined,
94
+ description: data.description,
95
95
  expiresAt: unmarshalDate(data.expires_at),
96
- functionId: data.function_id ? data.function_id : undefined,
96
+ functionId: data.function_id,
97
97
  id: data.id,
98
- namespaceId: data.namespace_id ? data.namespace_id : undefined,
99
- publicKey: data.public_key ? data.public_key : undefined,
98
+ namespaceId: data.namespace_id,
99
+ publicKey: data.public_key,
100
100
  status: data.status,
101
101
  token: data.token
102
102
  };
@@ -106,43 +106,44 @@ const unmarshalTriggerMnqNatsClientConfig = data => {
106
106
  throw new TypeError(`Unmarshalling the type 'TriggerMnqNatsClientConfig' failed as data isn't a dictionary.`);
107
107
  }
108
108
  return {
109
- mnqCredentialId: data.mnq_credential_id ? data.mnq_credential_id : undefined,
109
+ mnqCredentialId: data.mnq_credential_id,
110
110
  mnqNamespaceId: data.mnq_namespace_id,
111
+ mnqNatsAccountId: data.mnq_nats_account_id,
111
112
  mnqProjectId: data.mnq_project_id,
112
113
  mnqRegion: data.mnq_region,
113
114
  subject: data.subject
114
115
  };
115
116
  };
116
- const unmarshalTriggerSqsClientConfig = data => {
117
- if (!isJSONObject(data)) {
118
- throw new TypeError(`Unmarshalling the type 'TriggerSqsClientConfig' failed as data isn't a dictionary.`);
119
- }
120
- return {
121
- accessKey: data.access_key,
122
- endpoint: data.endpoint,
123
- queueUrl: data.queue_url,
124
- secretKey: data.secret_key
125
- };
126
- };
127
117
  const unmarshalTriggerMnqSqsClientConfig = data => {
128
118
  if (!isJSONObject(data)) {
129
119
  throw new TypeError(`Unmarshalling the type 'TriggerMnqSqsClientConfig' failed as data isn't a dictionary.`);
130
120
  }
131
121
  return {
132
- mnqCredentialId: data.mnq_credential_id ? data.mnq_credential_id : undefined,
122
+ mnqCredentialId: data.mnq_credential_id,
133
123
  mnqNamespaceId: data.mnq_namespace_id,
134
124
  mnqProjectId: data.mnq_project_id,
135
125
  mnqRegion: data.mnq_region,
136
126
  queue: data.queue
137
127
  };
138
128
  };
129
+ const unmarshalTriggerSqsClientConfig = data => {
130
+ if (!isJSONObject(data)) {
131
+ throw new TypeError(`Unmarshalling the type 'TriggerSqsClientConfig' failed as data isn't a dictionary.`);
132
+ }
133
+ return {
134
+ accessKey: data.access_key,
135
+ endpoint: data.endpoint,
136
+ queueUrl: data.queue_url,
137
+ secretKey: data.secret_key
138
+ };
139
+ };
139
140
  const unmarshalTrigger = data => {
140
141
  if (!isJSONObject(data)) {
141
142
  throw new TypeError(`Unmarshalling the type 'Trigger' failed as data isn't a dictionary.`);
142
143
  }
143
144
  return {
144
145
  description: data.description,
145
- errorMessage: data.error_message ? data.error_message : undefined,
146
+ errorMessage: data.error_message,
146
147
  functionId: data.function_id,
147
148
  id: data.id,
148
149
  inputType: data.input_type,
@@ -283,6 +284,10 @@ const marshalCreateDomainRequest = (request, defaults) => ({
283
284
  function_id: request.functionId,
284
285
  hostname: request.hostname
285
286
  });
287
+ const marshalSecret = (request, defaults) => ({
288
+ key: request.key,
289
+ value: request.value
290
+ });
286
291
  const marshalCreateFunctionRequest = (request, defaults) => ({
287
292
  description: request.description,
288
293
  environment_variables: request.environmentVariables,
@@ -295,7 +300,7 @@ const marshalCreateFunctionRequest = (request, defaults) => ({
295
300
  namespace_id: request.namespaceId,
296
301
  privacy: request.privacy,
297
302
  runtime: request.runtime,
298
- secret_environment_variables: request.secretEnvironmentVariables,
303
+ secret_environment_variables: request.secretEnvironmentVariables !== undefined ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined,
299
304
  timeout: request.timeout
300
305
  });
301
306
  const marshalCreateNamespaceRequest = (request, defaults) => ({
@@ -303,7 +308,7 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
303
308
  environment_variables: request.environmentVariables,
304
309
  name: request.name || randomName('ns'),
305
310
  project_id: request.projectId ?? defaults.defaultProjectId,
306
- secret_environment_variables: request.secretEnvironmentVariables
311
+ secret_environment_variables: request.secretEnvironmentVariables !== undefined ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined
307
312
  });
308
313
  const marshalCreateTokenRequest = (request, defaults) => ({
309
314
  description: request.description,
@@ -316,19 +321,38 @@ const marshalCreateTokenRequest = (request, defaults) => ({
316
321
  value: request.namespaceId
317
322
  }])
318
323
  });
324
+ const marshalCreateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
325
+ mnq_namespace_id: request.mnqNamespaceId,
326
+ mnq_nats_account_id: request.mnqNatsAccountId,
327
+ mnq_project_id: request.mnqProjectId,
328
+ mnq_region: request.mnqRegion,
329
+ subject: request.subject
330
+ });
331
+ const marshalCreateTriggerRequestMnqSqsClientConfig = (request, defaults) => ({
332
+ mnq_namespace_id: request.mnqNamespaceId,
333
+ mnq_project_id: request.mnqProjectId,
334
+ mnq_region: request.mnqRegion,
335
+ queue: request.queue
336
+ });
337
+ const marshalCreateTriggerRequestSqsClientConfig = (request, defaults) => ({
338
+ access_key: request.accessKey,
339
+ endpoint: request.endpoint,
340
+ queue_url: request.queueUrl,
341
+ secret_key: request.secretKey
342
+ });
319
343
  const marshalCreateTriggerRequest = (request, defaults) => ({
320
344
  description: request.description,
321
345
  function_id: request.functionId,
322
346
  name: request.name,
323
347
  ...resolveOneOf([{
324
- param: 'scw_nats_config',
325
- value: request.scwNatsConfig
326
- }, {
327
348
  param: 'scw_sqs_config',
328
- value: request.scwSqsConfig
349
+ value: request.scwSqsConfig !== undefined ? marshalCreateTriggerRequestMnqSqsClientConfig(request.scwSqsConfig) : undefined
350
+ }, {
351
+ param: 'scw_nats_config',
352
+ value: request.scwNatsConfig !== undefined ? marshalCreateTriggerRequestMnqNatsClientConfig(request.scwNatsConfig) : undefined
329
353
  }, {
330
354
  param: 'sqs_config',
331
- value: request.sqsConfig
355
+ value: request.sqsConfig !== undefined ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
332
356
  }])
333
357
  });
334
358
  const marshalUpdateCronRequest = (request, defaults) => ({
@@ -348,20 +372,24 @@ const marshalUpdateFunctionRequest = (request, defaults) => ({
348
372
  privacy: request.privacy,
349
373
  redeploy: request.redeploy,
350
374
  runtime: request.runtime,
351
- secret_environment_variables: request.secretEnvironmentVariables,
375
+ secret_environment_variables: request.secretEnvironmentVariables !== undefined ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined,
352
376
  timeout: request.timeout
353
377
  });
354
378
  const marshalUpdateNamespaceRequest = (request, defaults) => ({
355
379
  description: request.description,
356
380
  environment_variables: request.environmentVariables,
357
- secret_environment_variables: request.secretEnvironmentVariables
381
+ secret_environment_variables: request.secretEnvironmentVariables !== undefined ? request.secretEnvironmentVariables.map(elt => marshalSecret(elt)) : undefined
382
+ });
383
+ const marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
384
+ access_key: request.accessKey,
385
+ secret_key: request.secretKey
358
386
  });
359
387
  const marshalUpdateTriggerRequest = (request, defaults) => ({
360
388
  description: request.description,
361
389
  name: request.name,
362
390
  ...resolveOneOf([{
363
391
  param: 'sqs_config',
364
- value: request.sqsConfig
392
+ value: request.sqsConfig !== undefined ? marshalUpdateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
365
393
  }])
366
394
  });
367
395
 
@@ -0,0 +1,44 @@
1
+ // This file was automatically generated. DO NOT EDIT.
2
+ // If you have any remark or suggestion do not hesitate to open an issue.
3
+
4
+ const CreateTriggerRequest = {
5
+ description: {
6
+ maxLength: 255
7
+ },
8
+ name: {
9
+ maxLength: 50,
10
+ minLength: 1
11
+ }
12
+ };
13
+ const CreateTriggerRequestMnqNatsClientConfig = {
14
+ mnqRegion: {
15
+ maxLength: 20,
16
+ minLength: 1
17
+ },
18
+ subject: {
19
+ maxLength: 100,
20
+ minLength: 1,
21
+ pattern: /^[^\s]+$/
22
+ }
23
+ };
24
+ const CreateTriggerRequestMnqSqsClientConfig = {
25
+ mnqRegion: {
26
+ maxLength: 20,
27
+ minLength: 1
28
+ },
29
+ queue: {
30
+ maxLength: 100,
31
+ minLength: 1
32
+ }
33
+ };
34
+ const UpdateTriggerRequest = {
35
+ description: {
36
+ maxLength: 255
37
+ },
38
+ name: {
39
+ maxLength: 50,
40
+ minLength: 1
41
+ }
42
+ };
43
+
44
+ export { CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, UpdateTriggerRequest };
@@ -1,7 +1,7 @@
1
1
  import { API as API$1 } from '../../../scw/api.js';
2
2
  import { urlParams, validatePathParam, resolveOneOf } from '../../../helpers/marshalling.js';
3
3
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
- import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalCreateUserRequest, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, unmarshalJWT } from './marshalling.gen.js';
4
+ import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalCreateUserRequest, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, unmarshalJWT, unmarshalListLogsResponse, unmarshalLog } from './marshalling.gen.js';
5
5
 
6
6
  // This file was automatically generated. DO NOT EDIT.
7
7
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -268,7 +268,7 @@ class API extends API$1 {
268
268
  return _this7.client.fetch({
269
269
  method: 'GET',
270
270
  path: `/iam/v1alpha1/groups`,
271
- urlParams: urlParams(['application_ids', request.applicationIds], ['group_ids', request.groupIds], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['user_ids', request.userIds])
271
+ urlParams: urlParams(['application_ids', request.applicationIds], ['group_ids', request.groupIds], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this7.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['user_ids', request.userIds])
272
272
  }, unmarshalListGroupsResponse);
273
273
  };
274
274
  })();
@@ -536,19 +536,11 @@ class API extends API$1 {
536
536
  method: 'PUT',
537
537
  path: `/iam/v1alpha1/rules`
538
538
  }, unmarshalSetRulesResponse);
539
- pageOfListRules = (() => {
540
- var _this11 = this;
541
- return function (request) {
542
- if (request === void 0) {
543
- request = {};
544
- }
545
- return _this11.client.fetch({
546
- method: 'GET',
547
- path: `/iam/v1alpha1/rules`,
548
- urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize], ['policy_id', request.policyId])
549
- }, unmarshalListRulesResponse);
550
- };
551
- })();
539
+ pageOfListRules = request => this.client.fetch({
540
+ method: 'GET',
541
+ path: `/iam/v1alpha1/rules`,
542
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['policy_id', request.policyId])
543
+ }, unmarshalListRulesResponse);
552
544
 
553
545
  /**
554
546
  * List rules of a given policy. List the rules of a given policy. By default,
@@ -559,25 +551,17 @@ class API extends API$1 {
559
551
  * @param request - The request {@link ListRulesRequest}
560
552
  * @returns A Promise of ListRulesResponse
561
553
  */
562
- listRules = (() => {
563
- var _this12 = this;
564
- return function (request) {
565
- if (request === void 0) {
566
- request = {};
567
- }
568
- return enrichForPagination('rules', _this12.pageOfListRules, request);
569
- };
570
- })();
554
+ listRules = request => enrichForPagination('rules', this.pageOfListRules, request);
571
555
  pageOfListPermissionSets = (() => {
572
- var _this13 = this;
556
+ var _this11 = this;
573
557
  return function (request) {
574
558
  if (request === void 0) {
575
559
  request = {};
576
560
  }
577
- return _this13.client.fetch({
561
+ return _this11.client.fetch({
578
562
  method: 'GET',
579
563
  path: `/iam/v1alpha1/permission-sets`,
580
- urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this13.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this13.client.settings.defaultPageSize])
564
+ urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this11.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize])
581
565
  }, unmarshalListPermissionSetsResponse);
582
566
  };
583
567
  })();
@@ -591,24 +575,24 @@ class API extends API$1 {
591
575
  * @returns A Promise of ListPermissionSetsResponse
592
576
  */
593
577
  listPermissionSets = (() => {
594
- var _this14 = this;
578
+ var _this12 = this;
595
579
  return function (request) {
596
580
  if (request === void 0) {
597
581
  request = {};
598
582
  }
599
- return enrichForPagination('permissionSets', _this14.pageOfListPermissionSets, request);
583
+ return enrichForPagination('permissionSets', _this12.pageOfListPermissionSets, request);
600
584
  };
601
585
  })();
602
586
  pageOfListAPIKeys = (() => {
603
- var _this15 = this;
587
+ var _this13 = this;
604
588
  return function (request) {
605
589
  if (request === void 0) {
606
590
  request = {};
607
591
  }
608
- return _this15.client.fetch({
592
+ return _this13.client.fetch({
609
593
  method: 'GET',
610
594
  path: `/iam/v1alpha1/api-keys`,
611
- urlParams: urlParams(['access_key', request.accessKey], ['bearer_id', request.bearerId], ['bearer_type', request.bearerType], ['description', request.description], ['editable', request.editable], ['expired', request.expired], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this15.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this15.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
595
+ urlParams: urlParams(['access_key', request.accessKey], ['bearer_id', request.bearerId], ['bearer_type', request.bearerType], ['description', request.description], ['editable', request.editable], ['expired', request.expired], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this13.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this13.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
612
596
  param: 'application_id',
613
597
  value: request.applicationId
614
598
  }, {
@@ -629,12 +613,12 @@ class API extends API$1 {
629
613
  * @returns A Promise of ListAPIKeysResponse
630
614
  */
631
615
  listAPIKeys = (() => {
632
- var _this16 = this;
616
+ var _this14 = this;
633
617
  return function (request) {
634
618
  if (request === void 0) {
635
619
  request = {};
636
620
  }
637
- return enrichForPagination('apiKeys', _this16.pageOfListAPIKeys, request);
621
+ return enrichForPagination('apiKeys', _this14.pageOfListAPIKeys, request);
638
622
  };
639
623
  })();
640
624
 
@@ -698,15 +682,15 @@ class API extends API$1 {
698
682
  path: `/iam/v1alpha1/api-keys/${validatePathParam('accessKey', request.accessKey)}`
699
683
  });
700
684
  pageOfListQuota = (() => {
701
- var _this17 = this;
685
+ var _this15 = this;
702
686
  return function (request) {
703
687
  if (request === void 0) {
704
688
  request = {};
705
689
  }
706
- return _this17.client.fetch({
690
+ return _this15.client.fetch({
707
691
  method: 'GET',
708
692
  path: `/iam/v1alpha1/quota`,
709
- urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this17.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize])
693
+ urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this15.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this15.client.settings.defaultPageSize])
710
694
  }, unmarshalListQuotaResponse);
711
695
  };
712
696
  })();
@@ -722,12 +706,12 @@ class API extends API$1 {
722
706
  * @returns A Promise of ListQuotaResponse
723
707
  */
724
708
  listQuota = (() => {
725
- var _this18 = this;
709
+ var _this16 = this;
726
710
  return function (request) {
727
711
  if (request === void 0) {
728
712
  request = {};
729
713
  }
730
- return enrichForPagination('quota', _this18.pageOfListQuota, request);
714
+ return enrichForPagination('quota', _this16.pageOfListQuota, request);
731
715
  };
732
716
  })();
733
717
 
@@ -745,15 +729,15 @@ class API extends API$1 {
745
729
  urlParams: urlParams(['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId])
746
730
  }, unmarshalQuotum);
747
731
  pageOfListJWTs = (() => {
748
- var _this19 = this;
732
+ var _this17 = this;
749
733
  return function (request) {
750
734
  if (request === void 0) {
751
735
  request = {};
752
736
  }
753
- return _this19.client.fetch({
737
+ return _this17.client.fetch({
754
738
  method: 'GET',
755
739
  path: `/iam/v1alpha1/jwts`,
756
- urlParams: urlParams(['audience_id', request.audienceId], ['expired', request.expired], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize])
740
+ urlParams: urlParams(['audience_id', request.audienceId], ['expired', request.expired], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize])
757
741
  }, unmarshalListJWTsResponse);
758
742
  };
759
743
  })();
@@ -765,12 +749,12 @@ class API extends API$1 {
765
749
  * @returns A Promise of ListJWTsResponse
766
750
  */
767
751
  listJWTs = (() => {
768
- var _this20 = this;
752
+ var _this18 = this;
769
753
  return function (request) {
770
754
  if (request === void 0) {
771
755
  request = {};
772
756
  }
773
- return enrichForPagination('jwts', _this20.pageOfListJWTs, request);
757
+ return enrichForPagination('jwts', _this18.pageOfListJWTs, request);
774
758
  };
775
759
  })();
776
760
 
@@ -794,6 +778,32 @@ class API extends API$1 {
794
778
  method: 'DELETE',
795
779
  path: `/iam/v1alpha1/jwts/${validatePathParam('jti', request.jti)}`
796
780
  });
781
+ pageOfListLogs = (() => {
782
+ var _this19 = this;
783
+ return function (request) {
784
+ if (request === void 0) {
785
+ request = {};
786
+ }
787
+ return _this19.client.fetch({
788
+ method: 'GET',
789
+ path: `/iam/v1alpha1/logs`,
790
+ urlParams: urlParams(['action', request.action], ['created_after', request.createdAfter], ['created_before', request.createdBefore], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this19.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize], ['resource_type', request.resourceType], ['search', request.search])
791
+ }, unmarshalListLogsResponse);
792
+ };
793
+ })();
794
+ listLogs = (() => {
795
+ var _this20 = this;
796
+ return function (request) {
797
+ if (request === void 0) {
798
+ request = {};
799
+ }
800
+ return enrichForPagination('logs', _this20.pageOfListLogs, request);
801
+ };
802
+ })();
803
+ getLog = request => this.client.fetch({
804
+ method: 'GET',
805
+ path: `/iam/v1alpha1/logs/${validatePathParam('logId', request.logId)}`
806
+ }, unmarshalLog);
797
807
  }
798
808
 
799
809
  export { API };