@scaleway/sdk 1.5.0 → 1.7.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 (46) hide show
  1. package/dist/api/applesilicon/v1alpha1/api.gen.js +2 -2
  2. package/dist/api/baremetal/v1/api.gen.js +3 -3
  3. package/dist/api/baremetal/v1/api.utils.js +1 -1
  4. package/dist/api/cockpit/v1beta1/api.gen.js +89 -29
  5. package/dist/api/cockpit/v1beta1/marshalling.gen.js +44 -1
  6. package/dist/api/container/v1beta1/api.gen.js +35 -29
  7. package/dist/api/container/v1beta1/marshalling.gen.js +1 -1
  8. package/dist/api/domain/v2beta1/api.gen.js +2 -2
  9. package/dist/api/flexibleip/v1alpha1/api.gen.js +2 -2
  10. package/dist/api/function/v1beta1/api.gen.js +40 -31
  11. package/dist/api/function/v1beta1/marshalling.gen.js +1 -20
  12. package/dist/api/iam/v1alpha1/api.gen.js +2 -3
  13. package/dist/api/iam/v1alpha1/marshalling.gen.js +1 -0
  14. package/dist/api/iam/v1alpha1/validation-rules.gen.js +10 -10
  15. package/dist/api/instance/v1/api.gen.js +86 -67
  16. package/dist/api/instance/v1/api.utils.js +7 -13
  17. package/dist/api/iot/v1/api.gen.js +2 -2
  18. package/dist/api/k8s/v1/api.gen.js +4 -4
  19. package/dist/api/lb/v1/api.gen.js +6 -6
  20. package/dist/api/lb/v1/api.utils.js +4 -4
  21. package/dist/api/lb/v1/marshalling.gen.js +33 -19
  22. package/dist/api/marketplace/v2/api.gen.js +46 -3
  23. package/dist/api/mnq/v1alpha1/api.gen.js +36 -13
  24. package/dist/api/rdb/v1/api.gen.js +6 -6
  25. package/dist/api/redis/v1/api.gen.js +2 -2
  26. package/dist/api/redis/v1/marshalling.gen.js +2 -0
  27. package/dist/api/registry/v1/api.gen.js +4 -4
  28. package/dist/api/secret/v1alpha1/api.gen.js +27 -16
  29. package/dist/api/secret/v1alpha1/marshalling.gen.js +22 -3
  30. package/dist/api/tem/v1alpha1/api.gen.js +3 -3
  31. package/dist/api/test/v1/api.gen.js +1 -1
  32. package/dist/api/vpc/v1/api.gen.js +15 -7
  33. package/dist/api/vpcgw/v1/api.gen.js +3 -3
  34. package/dist/api/webhosting/v1alpha1/api.gen.js +2 -2
  35. package/dist/helpers/marshalling.js +1 -1
  36. package/dist/index.cjs +513 -234
  37. package/dist/index.d.ts +1469 -736
  38. package/dist/internal/async/interval-retrier.js +8 -2
  39. package/dist/internal/logger/level-resolver.js +3 -3
  40. package/dist/scw/client-ini-factory.js +6 -0
  41. package/dist/scw/client-ini-profile.js +18 -0
  42. package/dist/scw/client-settings.js +12 -0
  43. package/dist/scw/constants.js +1 -1
  44. package/dist/scw/custom-marshalling.js +4 -7
  45. package/dist/scw/errors/standard/quotas-exceeded-error.js +6 -0
  46. package/package.json +2 -2
@@ -71,7 +71,7 @@ class API extends API$1 {
71
71
  * @param options - The waiting options
72
72
  * @returns A Promise of Lb
73
73
  */
74
- this.waitForLb = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
74
+ this.waitForLb = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
75
75
  /**
76
76
  * Update a load balancer.
77
77
  *
@@ -513,7 +513,7 @@ class API extends API$1 {
513
513
  * @param options - The waiting options
514
514
  * @returns A Promise of Certificate
515
515
  */
516
- this.waitForCertificate = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
516
+ this.waitForCertificate = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
517
517
  /**
518
518
  * Update a TLS certificate.
519
519
  *
@@ -670,6 +670,7 @@ class API extends API$1 {
670
670
  path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/detach`
671
671
  });
672
672
  }
673
+ /** Lists the available regions of the API. */
673
674
  }
674
675
 
675
676
  /**
@@ -678,7 +679,6 @@ class API extends API$1 {
678
679
  * This API allows you to manage your Scaleway Load Balancer services. Load
679
680
  * Balancer API.
680
681
  */
681
- /** Lists the available regions of the API. */
682
682
  API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
683
683
  class ZonedAPI extends API$1 {
684
684
  constructor() {
@@ -743,7 +743,7 @@ class ZonedAPI extends API$1 {
743
743
  * @param options - The waiting options
744
744
  * @returns A Promise of Lb
745
745
  */
746
- this.waitForLb = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
746
+ this.waitForLb = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
747
747
  /**
748
748
  * Update a Load Balancer. Update the parameters of an existing Load Balancer,
749
749
  * specified by its Load Balancer ID. Note that the request type is PUT and
@@ -1285,7 +1285,7 @@ class ZonedAPI extends API$1 {
1285
1285
  * @param options - The waiting options
1286
1286
  * @returns A Promise of Certificate
1287
1287
  */
1288
- this.waitForCertificate = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
1288
+ this.waitForCertificate = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
1289
1289
  /**
1290
1290
  * Update an SSL/TLS certificate. Update the name of a particular SSL/TLS
1291
1291
  * certificate, specified by its certificate ID.
@@ -1467,8 +1467,8 @@ class ZonedAPI extends API$1 {
1467
1467
  path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/detach`
1468
1468
  });
1469
1469
  }
1470
+ /** Lists the available zones of the API. */
1470
1471
  }
1471
- /** Lists the available zones of the API. */
1472
1472
  ZonedAPI.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
1473
1473
 
1474
1474
  export { API, ZonedAPI };
@@ -24,7 +24,7 @@ class LbV1UtilsAPI extends API {
24
24
  done: value.privateNetwork.find(elt => PRIVATE_NETWORK_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
25
25
  value
26
26
  };
27
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
27
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
28
28
  /**
29
29
  * Waits for all instances of a load balancer to be in a final state.
30
30
  *
@@ -38,7 +38,7 @@ class LbV1UtilsAPI extends API {
38
38
  done: !LB_TRANSIENT_STATUSES.includes(value.status) && value.instances.find(elt => INSTANCE_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
39
39
  value
40
40
  };
41
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
41
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
42
42
  }
43
43
  }
44
44
  class LbZonedV1UtilsAPI extends ZonedAPI {
@@ -64,7 +64,7 @@ class LbZonedV1UtilsAPI extends ZonedAPI {
64
64
  done: value.privateNetwork.find(elt => PRIVATE_NETWORK_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
65
65
  value
66
66
  };
67
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
67
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
68
68
  /**
69
69
  * Waits for all instances of a (zoned) load balancer to be in a final state.
70
70
  *
@@ -78,7 +78,7 @@ class LbZonedV1UtilsAPI extends ZonedAPI {
78
78
  done: !LB_TRANSIENT_STATUSES.includes(value.status) && value.instances.find(elt => INSTANCE_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
79
79
  value
80
80
  };
81
- }, createExponentialBackoffStrategy((options == null ? void 0 : options.minDelay) ?? 1, (options == null ? void 0 : options.maxDelay) ?? 30), options == null ? void 0 : options.timeout);
81
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
82
82
  }
83
83
  }
84
84
 
@@ -132,7 +132,8 @@ const unmarshalHealthCheck = data => {
132
132
  pgsqlConfig: data.pgsql_config ? unmarshalHealthCheckPgsqlConfig(data.pgsql_config) : undefined,
133
133
  port: data.port,
134
134
  redisConfig: data.redis_config ? unmarshalHealthCheckRedisConfig(data.redis_config) : undefined,
135
- tcpConfig: data.tcp_config ? unmarshalHealthCheckTcpConfig(data.tcp_config) : undefined
135
+ tcpConfig: data.tcp_config ? unmarshalHealthCheckTcpConfig(data.tcp_config) : undefined,
136
+ transientCheckDelay: data.transient_check_delay
136
137
  };
137
138
  };
138
139
  const unmarshalLb = data => {
@@ -186,10 +187,12 @@ const unmarshalBackend = data => {
186
187
  id: data.id,
187
188
  ignoreSslServerVerify: data.ignore_ssl_server_verify,
188
189
  lb: data.lb ? unmarshalLb(data.lb) : undefined,
190
+ maxRetries: data.max_retries,
189
191
  name: data.name,
190
192
  onMarkedDownAction: data.on_marked_down_action,
191
193
  pool: data.pool,
192
194
  proxyProtocol: data.proxy_protocol,
195
+ redispatchAttemptCount: data.redispatch_attempt_count,
193
196
  sendProxyV2: data.send_proxy_v2,
194
197
  sslBridging: data.ssl_bridging,
195
198
  stickySessions: data.sticky_sessions,
@@ -531,21 +534,22 @@ const marshalHealthCheck = (request, defaults) => ({
531
534
  check_send_proxy: request.checkSendProxy,
532
535
  check_timeout: request.checkTimeout,
533
536
  port: request.port,
537
+ transient_check_delay: request.transientCheckDelay,
534
538
  ...resolveOneOf([{
539
+ param: 'tcp_config',
540
+ value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
541
+ }, {
535
542
  param: 'mysql_config',
536
543
  value: request.mysqlConfig ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : undefined
544
+ }, {
545
+ param: 'pgsql_config',
546
+ value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
537
547
  }, {
538
548
  param: 'ldap_config',
539
549
  value: request.ldapConfig ? marshalHealthCheckLdapConfig(request.ldapConfig) : undefined
540
550
  }, {
541
551
  param: 'redis_config',
542
552
  value: request.redisConfig ? marshalHealthCheckRedisConfig(request.redisConfig) : undefined
543
- }, {
544
- param: 'tcp_config',
545
- value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
546
- }, {
547
- param: 'pgsql_config',
548
- value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
549
553
  }, {
550
554
  param: 'http_config',
551
555
  value: request.httpConfig ? marshalHealthCheckHttpConfig(request.httpConfig) : undefined
@@ -603,9 +607,11 @@ const marshalCreateBackendRequest = (request, defaults) => ({
603
607
  forward_protocol: request.forwardProtocol,
604
608
  health_check: marshalHealthCheck(request.healthCheck),
605
609
  ignore_ssl_server_verify: request.ignoreSslServerVerify,
610
+ max_retries: request.maxRetries,
606
611
  name: request.name || randomName('lbb'),
607
612
  on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
608
613
  proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
614
+ redispatch_attempt_count: request.redispatchAttemptCount,
609
615
  send_proxy_v2: request.sendProxyV2,
610
616
  server_ip: request.serverIp,
611
617
  ssl_bridging: request.sslBridging,
@@ -712,9 +718,11 @@ const marshalUpdateBackendRequest = (request, defaults) => ({
712
718
  forward_port_algorithm: request.forwardPortAlgorithm,
713
719
  forward_protocol: request.forwardProtocol,
714
720
  ignore_ssl_server_verify: request.ignoreSslServerVerify,
721
+ max_retries: request.maxRetries,
715
722
  name: request.name,
716
723
  on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
717
724
  proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
725
+ redispatch_attempt_count: request.redispatchAttemptCount,
718
726
  send_proxy_v2: request.sendProxyV2,
719
727
  ssl_bridging: request.sslBridging,
720
728
  sticky_sessions: request.stickySessions,
@@ -741,21 +749,22 @@ const marshalUpdateHealthCheckRequest = (request, defaults) => ({
741
749
  check_send_proxy: request.checkSendProxy,
742
750
  check_timeout: request.checkTimeout,
743
751
  port: request.port,
752
+ transient_check_delay: request.transientCheckDelay,
744
753
  ...resolveOneOf([{
754
+ param: 'tcp_config',
755
+ value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
756
+ }, {
745
757
  param: 'mysql_config',
746
758
  value: request.mysqlConfig ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : undefined
759
+ }, {
760
+ param: 'pgsql_config',
761
+ value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
747
762
  }, {
748
763
  param: 'ldap_config',
749
764
  value: request.ldapConfig ? marshalHealthCheckLdapConfig(request.ldapConfig) : undefined
750
765
  }, {
751
766
  param: 'redis_config',
752
767
  value: request.redisConfig ? marshalHealthCheckRedisConfig(request.redisConfig) : undefined
753
- }, {
754
- param: 'pgsql_config',
755
- value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
756
- }, {
757
- param: 'tcp_config',
758
- value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
759
768
  }, {
760
769
  param: 'http_config',
761
770
  value: request.httpConfig ? marshalHealthCheckHttpConfig(request.httpConfig) : undefined
@@ -816,9 +825,11 @@ const marshalZonedApiCreateBackendRequest = (request, defaults) => ({
816
825
  forward_protocol: request.forwardProtocol,
817
826
  health_check: marshalHealthCheck(request.healthCheck),
818
827
  ignore_ssl_server_verify: request.ignoreSslServerVerify,
828
+ max_retries: request.maxRetries,
819
829
  name: request.name || randomName('lbb'),
820
830
  on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
821
831
  proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
832
+ redispatch_attempt_count: request.redispatchAttemptCount,
822
833
  send_proxy_v2: request.sendProxyV2,
823
834
  server_ip: request.serverIp,
824
835
  ssl_bridging: request.sslBridging,
@@ -928,9 +939,11 @@ const marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
928
939
  forward_port_algorithm: request.forwardPortAlgorithm,
929
940
  forward_protocol: request.forwardProtocol,
930
941
  ignore_ssl_server_verify: request.ignoreSslServerVerify,
942
+ max_retries: request.maxRetries,
931
943
  name: request.name,
932
944
  on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
933
945
  proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
946
+ redispatch_attempt_count: request.redispatchAttemptCount,
934
947
  send_proxy_v2: request.sendProxyV2,
935
948
  ssl_bridging: request.sslBridging,
936
949
  sticky_sessions: request.stickySessions,
@@ -957,21 +970,22 @@ const marshalZonedApiUpdateHealthCheckRequest = (request, defaults) => ({
957
970
  check_send_proxy: request.checkSendProxy,
958
971
  check_timeout: request.checkTimeout,
959
972
  port: request.port,
973
+ transient_check_delay: request.transientCheckDelay,
960
974
  ...resolveOneOf([{
975
+ param: 'tcp_config',
976
+ value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
977
+ }, {
961
978
  param: 'mysql_config',
962
979
  value: request.mysqlConfig ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : undefined
980
+ }, {
981
+ param: 'pgsql_config',
982
+ value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
963
983
  }, {
964
984
  param: 'ldap_config',
965
985
  value: request.ldapConfig ? marshalHealthCheckLdapConfig(request.ldapConfig) : undefined
966
986
  }, {
967
987
  param: 'redis_config',
968
988
  value: request.redisConfig ? marshalHealthCheckRedisConfig(request.redisConfig) : undefined
969
- }, {
970
- param: 'pgsql_config',
971
- value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
972
- }, {
973
- param: 'tcp_config',
974
- value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
975
989
  }, {
976
990
  param: 'http_config',
977
991
  value: request.httpConfig ? marshalHealthCheckHttpConfig(request.httpConfig) : undefined
@@ -16,14 +16,16 @@ class API extends API$1 {
16
16
  urlParams: urlParams(['arch', request.arch], ['category', request.category], ['include_eol', request.includeEol], ['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
17
17
  }, unmarshalListImagesResponse);
18
18
  /**
19
- * List marketplace images.
19
+ * List marketplace images. List all available images on the marketplace,
20
+ * their UUID, CPU architecture and description.
20
21
  *
21
22
  * @param request - The request {@link ListImagesRequest}
22
23
  * @returns A Promise of ListImagesResponse
23
24
  */
24
25
  this.listImages = request => enrichForPagination('images', this.pageOfListImages, request);
25
26
  /**
26
- * Get a specific marketplace image.
27
+ * Get a specific marketplace image. Get detailed information about a
28
+ * marketplace image, specified by its `image_id` (UUID format).
27
29
  *
28
30
  * @param request - The request {@link GetImageRequest}
29
31
  * @returns A Promise of Image
@@ -37,7 +39,22 @@ class API extends API$1 {
37
39
  path: `/marketplace/v2/versions`,
38
40
  urlParams: urlParams(['image_id', request.imageId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
39
41
  }, unmarshalListVersionsResponse);
42
+ /**
43
+ * List versions of an Image. Get a list of all available version of an image,
44
+ * specified by its `image_id` (UUID format).
45
+ *
46
+ * @param request - The request {@link ListVersionsRequest}
47
+ * @returns A Promise of ListVersionsResponse
48
+ */
40
49
  this.listVersions = request => enrichForPagination('versions', this.pageOfListVersions, request);
50
+ /**
51
+ * Get a specific image version. Get information such as the name, creation
52
+ * date, last update and published date for an image version specified by its
53
+ * `version_id` (UUID format).
54
+ *
55
+ * @param request - The request {@link GetVersionRequest}
56
+ * @returns A Promise of Version
57
+ */
41
58
  this.getVersion = request => this.client.fetch({
42
59
  method: 'GET',
43
60
  path: `/marketplace/v2/versions/${validatePathParam('versionId', request.versionId)}`
@@ -62,7 +79,10 @@ class API extends API$1 {
62
79
  }, unmarshalListLocalImagesResponse);
63
80
  };
64
81
  /**
65
- * List local images from a specific image or version.
82
+ * List local images from a specific image or version. List information about
83
+ * local images in a specific Availability Zone, specified by its `image_id`
84
+ * (UUID format), `version_id` (UUID format) or `image_label`. Only one of
85
+ * these three parameters may be set.
66
86
  *
67
87
  * @param request - The request {@link ListLocalImagesRequest}
68
88
  * @returns A Promise of ListLocalImagesResponse
@@ -73,6 +93,15 @@ class API extends API$1 {
73
93
  }
74
94
  return enrichForPagination('localImages', _this.pageOfListLocalImages, request);
75
95
  };
96
+ /**
97
+ * Get a specific local image by ID. Get detailed information about a local
98
+ * image, including compatible commercial types, supported architecture,
99
+ * labels and the Availability Zone of the image, specified by its
100
+ * `local_image_id` (UUID format).
101
+ *
102
+ * @param request - The request {@link GetLocalImageRequest}
103
+ * @returns A Promise of LocalImage
104
+ */
76
105
  this.getLocalImage = request => this.client.fetch({
77
106
  method: 'GET',
78
107
  path: `/marketplace/v2/local-images/${validatePathParam('localImageId', request.localImageId)}`
@@ -87,12 +116,26 @@ class API extends API$1 {
87
116
  urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
88
117
  }, unmarshalListCategoriesResponse);
89
118
  };
119
+ /**
120
+ * List existing image categories. Get a list of all existing categories. The
121
+ * output can be paginated.
122
+ *
123
+ * @param request - The request {@link ListCategoriesRequest}
124
+ * @returns A Promise of ListCategoriesResponse
125
+ */
90
126
  this.listCategories = function (request) {
91
127
  if (request === void 0) {
92
128
  request = {};
93
129
  }
94
130
  return enrichForPagination('categories', _this.pageOfListCategories, request);
95
131
  };
132
+ /**
133
+ * Get a specific category. Get information about a specific category of the
134
+ * marketplace catalog, specified by its `category_id` (UUID format).
135
+ *
136
+ * @param request - The request {@link GetCategoryRequest}
137
+ * @returns A Promise of Category
138
+ */
96
139
  this.getCategory = request => this.client.fetch({
97
140
  method: 'GET',
98
141
  path: `/marketplace/v2/categories/${validatePathParam('categoryId', request.categoryId)}`
@@ -11,7 +11,8 @@ const jsonContentHeaders = {
11
11
  /**
12
12
  * MnQ API (beta).
13
13
  *
14
- * This API allows you to manage Messaging or Queueing brokers. MnQ API (beta).
14
+ * This API allows you to manage Scaleway Messaging and Queueing brokers. MnQ
15
+ * API (beta).
15
16
  */
16
17
  class API extends API$1 {
17
18
  constructor() {
@@ -29,7 +30,10 @@ class API extends API$1 {
29
30
  }, unmarshalListNamespacesResponse);
30
31
  };
31
32
  /**
32
- * List namespaces.
33
+ * List namespaces. List all Messaging and Queuing namespaces in the specified
34
+ * region, for a Scaleway Organization or Project. By default, the namespaces
35
+ * returned in the list are ordered by creation date in ascending order,
36
+ * though this can be modified via the `order_by` field.
33
37
  *
34
38
  * @param request - The request {@link ListNamespacesRequest}
35
39
  * @returns A Promise of ListNamespacesResponse
@@ -41,7 +45,8 @@ class API extends API$1 {
41
45
  return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
42
46
  };
43
47
  /**
44
- * Create a namespace.
48
+ * Create a namespace. Create a Messaging and Queuing namespace, set to the
49
+ * desired protocol.
45
50
  *
46
51
  * @param request - The request {@link CreateNamespaceRequest}
47
52
  * @returns A Promise of Namespace
@@ -53,7 +58,8 @@ class API extends API$1 {
53
58
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
54
59
  }, unmarshalNamespace);
55
60
  /**
56
- * Update the name of a namespace.
61
+ * Update the name of a namespace. Update the name of a Messaging and Queuing
62
+ * namespace, specified by its namespace ID.
57
63
  *
58
64
  * @param request - The request {@link UpdateNamespaceRequest}
59
65
  * @returns A Promise of Namespace
@@ -65,7 +71,9 @@ class API extends API$1 {
65
71
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
66
72
  }, unmarshalNamespace);
67
73
  /**
68
- * Get a namespace.
74
+ * Get a namespace. Retrieve information about an existing Messaging and
75
+ * Queuing namespace, identified by its namespace ID. Its full details,
76
+ * including name, endpoint and protocol, are returned in the response.
69
77
  *
70
78
  * @param request - The request {@link GetNamespaceRequest}
71
79
  * @returns A Promise of Namespace
@@ -75,7 +83,10 @@ class API extends API$1 {
75
83
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
76
84
  }, unmarshalNamespace);
77
85
  /**
78
- * Delete a namespace.
86
+ * Delete a namespace. Delete a Messaging and Queuing namespace, specified by
87
+ * its namespace ID. Note that deleting a namespace is irreversible, and any
88
+ * URLs, credentials and queued messages belonging to this namespace will also
89
+ * be deleted.
79
90
  *
80
91
  * @param request - The request {@link DeleteNamespaceRequest}
81
92
  */
@@ -84,8 +95,11 @@ class API extends API$1 {
84
95
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
85
96
  });
86
97
  /**
87
- * Create a set of credentials. Create a set of credentials for a specific
88
- * namespace.
98
+ * Create credentials. Create a set of credentials for a Messaging and Queuing
99
+ * namespace, specified by its namespace ID. If creating credentials for a
100
+ * NATS namespace, the `permissions` object must not be included in the
101
+ * request. If creating credentials for an SQS/SNS namespace, the
102
+ * `permissions` object is required, with all three of its child attributes.
89
103
  *
90
104
  * @param request - The request {@link CreateCredentialRequest}
91
105
  * @returns A Promise of Credential
@@ -97,7 +111,9 @@ class API extends API$1 {
97
111
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials`
98
112
  }, unmarshalCredential);
99
113
  /**
100
- * Delete credentials.
114
+ * Delete credentials. Delete a set of credentials, specified by their
115
+ * credential ID. Deleting credentials is irreversible and cannot be undone.
116
+ * The credentials can no longer be used to access the namespace.
101
117
  *
102
118
  * @param request - The request {@link DeleteCredentialRequest}
103
119
  */
@@ -116,7 +132,9 @@ class API extends API$1 {
116
132
  }, unmarshalListCredentialsResponse);
117
133
  };
118
134
  /**
119
- * List credentials.
135
+ * List credentials. List existing credentials in the specified region. The
136
+ * response contains only the metadata for the credentials, not the
137
+ * credentials themselves (for this, use **Get Credentials**).
120
138
  *
121
139
  * @param request - The request {@link ListCredentialsRequest}
122
140
  * @returns A Promise of ListCredentialsResponse
@@ -128,7 +146,10 @@ class API extends API$1 {
128
146
  return enrichForPagination('credentials', _this.pageOfListCredentials, request);
129
147
  };
130
148
  /**
131
- * Update a set of credentials.
149
+ * Update credentials. Update a set of credentials. You can update the
150
+ * credentials' name, or (in the case of SQS/SNS credentials only) their
151
+ * permissions. To update the name of NATS credentials, do not include the
152
+ * `permissions` object in your request.
132
153
  *
133
154
  * @param request - The request {@link UpdateCredentialRequest}
134
155
  * @returns A Promise of Credential
@@ -140,7 +161,9 @@ class API extends API$1 {
140
161
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
141
162
  }, unmarshalCredential);
142
163
  /**
143
- * Get a set of credentials.
164
+ * Get credentials. Retrieve an existing set of credentials, identified by the
165
+ * `credential_id`. The credentials themselves, as well as their metadata
166
+ * (protocol, namespace ID etc), are returned in the response.
144
167
  *
145
168
  * @param request - The request {@link GetCredentialRequest}
146
169
  * @returns A Promise of Credential
@@ -150,8 +173,8 @@ class API extends API$1 {
150
173
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
151
174
  }, unmarshalCredential);
152
175
  }
176
+ /** Lists the available regions of the API. */
153
177
  }
154
- /** Lists the available regions of the API. */
155
178
  API.LOCALITIES = ['fr-par'];
156
179
 
157
180
  export { API };
@@ -110,7 +110,7 @@ class API extends API$1 {
110
110
  * @param options - The waiting options
111
111
  * @returns A Promise of DatabaseBackup
112
112
  */
113
- this.waitForDatabaseBackup = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status))), this.getDatabaseBackup, request, options);
113
+ this.waitForDatabaseBackup = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status))), this.getDatabaseBackup, request, options);
114
114
  /**
115
115
  * Update a database backup. Update the parameters of a backup, including name
116
116
  * and expiration date.
@@ -228,7 +228,7 @@ class API extends API$1 {
228
228
  * @param options - The waiting options
229
229
  * @returns A Promise of Instance
230
230
  */
231
- this.waitForInstance = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))), this.getInstance, request, options);
231
+ this.waitForInstance = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))), this.getInstance, request, options);
232
232
  /**
233
233
  * Create a Database Instance. Create a new Database Instance. You must set
234
234
  * the `engine`, `user_name`, `password` and `node_type` parameters.
@@ -374,7 +374,7 @@ class API extends API$1 {
374
374
  * @param options - The waiting options
375
375
  * @returns A Promise of ReadReplica
376
376
  */
377
- this.waitForReadReplica = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!READ_REPLICA_TRANSIENT_STATUSES.includes(res.status))), this.getReadReplica, request, options);
377
+ this.waitForReadReplica = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!READ_REPLICA_TRANSIENT_STATUSES.includes(res.status))), this.getReadReplica, request, options);
378
378
  /**
379
379
  * Delete a Read Replica. Delete a Read Replica of a Database Instance. You
380
380
  * must specify the `region` and `read_replica_id` parameters of the Read
@@ -468,7 +468,7 @@ class API extends API$1 {
468
468
  * @param options - The waiting options
469
469
  * @returns A Promise of InstanceLog
470
470
  */
471
- this.waitForInstanceLog = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status))), this.getInstanceLog, request, options);
471
+ this.waitForInstanceLog = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status))), this.getInstanceLog, request, options);
472
472
  /**
473
473
  * Purge remote Database Instance logs. Purge a given remote log from a
474
474
  * Database Instance. You can specify the `log_name` of the log you wish to
@@ -759,7 +759,7 @@ class API extends API$1 {
759
759
  * @param options - The waiting options
760
760
  * @returns A Promise of Snapshot
761
761
  */
762
- this.waitForSnapshot = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))), this.getSnapshot, request, options);
762
+ this.waitForSnapshot = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))), this.getSnapshot, request, options);
763
763
  /**
764
764
  * Create a Database Instance snapshot. Create a new snapshot of a Database
765
765
  * Instance. You must define the `name` parameter in the request.
@@ -872,8 +872,8 @@ class API extends API$1 {
872
872
  path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam('endpointId', request.endpointId)}/migrate`
873
873
  }, unmarshalEndpoint);
874
874
  }
875
+ /** Lists the available regions of the API. */
875
876
  }
876
- /** Lists the available regions of the API. */
877
877
  API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
878
878
 
879
879
  export { API };
@@ -66,7 +66,7 @@ class API extends API$1 {
66
66
  * @param options - The waiting options
67
67
  * @returns A Promise of Cluster
68
68
  */
69
- this.waitForCluster = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))), this.getCluster, request, options);
69
+ this.waitForCluster = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CLUSTER_TRANSIENT_STATUSES.includes(res.status))), this.getCluster, request, options);
70
70
  this.pageOfListClusters = function (request) {
71
71
  if (request === void 0) {
72
72
  request = {};
@@ -356,8 +356,8 @@ class API extends API$1 {
356
356
  path: `/redis/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/endpoints/${validatePathParam('endpointId', request.endpointId)}`
357
357
  }, unmarshalEndpoint);
358
358
  }
359
+ /** Lists the available zones of the API. */
359
360
  }
360
- /** Lists the available zones of the API. */
361
361
  API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
362
362
 
363
363
  export { API };
@@ -194,8 +194,10 @@ const unmarshalSetEndpointsResponse = data => {
194
194
  endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint)
195
195
  };
196
196
  };
197
+ const marshalEndpointSpecPrivateNetworkSpecIpamConfig = (request, defaults) => ({});
197
198
  const marshalEndpointSpecPrivateNetworkSpec = (request, defaults) => ({
198
199
  id: request.id,
200
+ ipam_config: request.ipamConfig ? marshalEndpointSpecPrivateNetworkSpecIpamConfig(request.ipamConfig) : undefined,
199
201
  service_ips: request.serviceIps
200
202
  });
201
203
  const marshalEndpointSpecPublicNetworkSpec = (request, defaults) => ({});
@@ -59,7 +59,7 @@ class API extends API$1 {
59
59
  * @param options - The waiting options
60
60
  * @returns A Promise of Namespace
61
61
  */
62
- this.waitForNamespace = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
62
+ this.waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
63
63
  /**
64
64
  * Create a new namespace.
65
65
  *
@@ -135,7 +135,7 @@ class API extends API$1 {
135
135
  * @param options - The waiting options
136
136
  * @returns A Promise of Image
137
137
  */
138
- this.waitForImage = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!IMAGE_TRANSIENT_STATUSES.includes(res.status))), this.getImage, request, options);
138
+ this.waitForImage = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!IMAGE_TRANSIENT_STATUSES.includes(res.status))), this.getImage, request, options);
139
139
  /**
140
140
  * Update an existing image. Update the image associated with the given id.
141
141
  *
@@ -187,7 +187,7 @@ class API extends API$1 {
187
187
  * @param options - The waiting options
188
188
  * @returns A Promise of Tag
189
189
  */
190
- this.waitForTag = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!TAG_TRANSIENT_STATUSES.includes(res.status))), this.getTag, request, options);
190
+ this.waitForTag = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TAG_TRANSIENT_STATUSES.includes(res.status))), this.getTag, request, options);
191
191
  /**
192
192
  * Delete a tag. Delete the tag associated with the given id.
193
193
  *
@@ -200,8 +200,8 @@ class API extends API$1 {
200
200
  urlParams: urlParams(['force', request.force])
201
201
  }, unmarshalTag);
202
202
  }
203
+ /** Lists the available regions of the API. */
203
204
  }
204
- /** Lists the available regions of the API. */
205
205
  API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
206
206
 
207
207
  export { API };