@scaleway/sdk 1.5.0 → 1.6.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 (35) hide show
  1. package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
  2. package/dist/api/baremetal/v1/api.gen.js +2 -2
  3. package/dist/api/cockpit/v1beta1/api.gen.js +51 -1
  4. package/dist/api/cockpit/v1beta1/marshalling.gen.js +44 -1
  5. package/dist/api/container/v1beta1/api.gen.js +1 -1
  6. package/dist/api/flexibleip/v1alpha1/api.gen.js +1 -1
  7. package/dist/api/function/v1beta1/api.gen.js +1 -1
  8. package/dist/api/function/v1beta1/marshalling.gen.js +0 -20
  9. package/dist/api/iam/v1alpha1/validation-rules.gen.js +10 -10
  10. package/dist/api/instance/v1/api.gen.js +86 -67
  11. package/dist/api/iot/v1/api.gen.js +1 -1
  12. package/dist/api/k8s/v1/api.gen.js +1 -1
  13. package/dist/api/lb/v1/api.gen.js +2 -2
  14. package/dist/api/lb/v1/marshalling.gen.js +33 -19
  15. package/dist/api/mnq/v1alpha1/api.gen.js +1 -1
  16. package/dist/api/rdb/v1/api.gen.js +1 -1
  17. package/dist/api/redis/v1/api.gen.js +1 -1
  18. package/dist/api/redis/v1/marshalling.gen.js +2 -0
  19. package/dist/api/registry/v1/api.gen.js +1 -1
  20. package/dist/api/secret/v1alpha1/api.gen.js +1 -1
  21. package/dist/api/secret/v1alpha1/marshalling.gen.js +14 -2
  22. package/dist/api/tem/v1alpha1/api.gen.js +1 -1
  23. package/dist/api/vpc/v1/api.gen.js +2 -2
  24. package/dist/api/vpcgw/v1/api.gen.js +1 -1
  25. package/dist/api/webhosting/v1alpha1/api.gen.js +1 -1
  26. package/dist/index.cjs +276 -121
  27. package/dist/index.d.ts +669 -504
  28. package/dist/internal/async/interval-retrier.js +6 -0
  29. package/dist/internal/logger/level-resolver.js +3 -3
  30. package/dist/scw/client-ini-factory.js +6 -0
  31. package/dist/scw/client-ini-profile.js +18 -0
  32. package/dist/scw/client-settings.js +12 -0
  33. package/dist/scw/constants.js +1 -1
  34. package/dist/scw/errors/standard/quotas-exceeded-error.js +6 -0
  35. package/package.json +2 -2
@@ -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
@@ -150,8 +150,8 @@ class API extends API$1 {
150
150
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
151
151
  }, unmarshalCredential);
152
152
  }
153
+ /** Lists the available regions of the API. */
153
154
  }
154
- /** Lists the available regions of the API. */
155
155
  API.LOCALITIES = ['fr-par'];
156
156
 
157
157
  export { API };
@@ -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 };
@@ -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) => ({});
@@ -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 };
@@ -243,8 +243,8 @@ class API extends API$1 {
243
243
  path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets-by-name/${validatePathParam('secretName', request.secretName)}/versions/${validatePathParam('revision', request.revision)}/access`
244
244
  }, unmarshalAccessSecretVersionResponse);
245
245
  }
246
+ /** Lists the available regions of the API. */
246
247
  }
247
- /** Lists the available regions of the API. */
248
248
  API.LOCALITIES = ['fr-par'];
249
249
 
250
250
  export { API };
@@ -1,5 +1,5 @@
1
1
  import { isJSONObject } from '../../../helpers/json.js';
2
- import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.js';
2
+ import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
3
3
 
4
4
  // This file was automatically generated. DO NOT EDIT.
5
5
  const unmarshalSecret = data => {
@@ -60,6 +60,13 @@ const unmarshalListSecretsResponse = data => {
60
60
  totalCount: data.total_count
61
61
  };
62
62
  };
63
+ const marshalPasswordGenerationParams = (request, defaults) => ({
64
+ additional_chars: request.additionalChars,
65
+ length: request.length,
66
+ no_digits: request.noDigits,
67
+ no_lowercase_letters: request.noLowercaseLetters,
68
+ no_uppercase_letters: request.noUppercaseLetters
69
+ });
63
70
  const marshalCreateSecretRequest = (request, defaults) => ({
64
71
  description: request.description,
65
72
  name: request.name,
@@ -68,7 +75,12 @@ const marshalCreateSecretRequest = (request, defaults) => ({
68
75
  });
69
76
  const marshalCreateSecretVersionRequest = (request, defaults) => ({
70
77
  data: request.data,
71
- description: request.description
78
+ description: request.description,
79
+ disable_previous: request.disablePrevious,
80
+ ...resolveOneOf([{
81
+ param: 'password_generation',
82
+ value: request.passwordGeneration ? marshalPasswordGenerationParams(request.passwordGeneration) : undefined
83
+ }])
72
84
  });
73
85
  const marshalUpdateSecretRequest = (request, defaults) => ({
74
86
  description: request.description,
@@ -190,8 +190,8 @@ class API extends API$1 {
190
190
  path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}/check`
191
191
  }, unmarshalDomain);
192
192
  }
193
+ /** Lists the available regions of the API. */
193
194
  }
194
- /** Lists the available regions of the API. */
195
195
  API.LOCALITIES = ['fr-par'];
196
196
 
197
197
  export { API };
@@ -21,7 +21,7 @@ class API extends API$1 {
21
21
  return _this.client.fetch({
22
22
  method: 'GET',
23
23
  path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/private-networks`,
24
- urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags])
24
+ urlParams: urlParams(['include_regional', request.includeRegional], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags])
25
25
  }, unmarshalListPrivateNetworksResponse);
26
26
  };
27
27
  /**
@@ -85,8 +85,8 @@ class API extends API$1 {
85
85
  path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
86
86
  });
87
87
  }
88
+ /** Lists the available zones of the API. */
88
89
  }
89
- /** Lists the available zones of the API. */
90
90
  API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
91
91
 
92
92
  export { API };
@@ -587,8 +587,8 @@ class API extends API$1 {
587
587
  path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam('gatewayId', request.gatewayId)}/refresh-ssh-keys`
588
588
  }, unmarshalGateway);
589
589
  }
590
+ /** Lists the available zones of the API. */
590
591
  }
591
- /** Lists the available zones of the API. */
592
592
  API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
593
593
 
594
594
  export { API };
@@ -125,8 +125,8 @@ class API extends API$1 {
125
125
  urlParams: urlParams(['hosting_id', request.hostingId], ['only_options', request.onlyOptions], ['order_by', request.orderBy ?? 'price_asc'], ['without_options', request.withoutOptions])
126
126
  }, unmarshalListOffersResponse);
127
127
  }
128
+ /** Lists the available regions of the API. */
128
129
  }
129
- /** Lists the available regions of the API. */
130
130
  API.LOCALITIES = ['fr-par'];
131
131
 
132
132
  export { API };