@scaleway/sdk 1.13.0 → 1.15.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 (50) hide show
  1. package/dist/api/account/v2/api.gen.js +77 -60
  2. package/dist/api/applesilicon/v1alpha1/api.gen.js +175 -173
  3. package/dist/api/baremetal/v1/api.gen.js +434 -378
  4. package/dist/api/baremetal/v1/api.utils.js +19 -22
  5. package/dist/api/billing/v2alpha1/api.gen.js +21 -17
  6. package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
  7. package/dist/api/container/v1beta1/api.gen.js +384 -337
  8. package/dist/api/domain/v2beta1/api.gen.js +754 -668
  9. package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
  10. package/dist/api/function/v1beta1/api.gen.js +467 -407
  11. package/dist/api/iam/v1alpha1/api.gen.js +641 -557
  12. package/dist/api/instance/v1/api.gen.js +802 -677
  13. package/dist/api/instance/v1/api.utils.js +337 -325
  14. package/dist/api/instance/v1/marshalling.gen.js +2 -1
  15. package/dist/api/iot/v1/api.gen.js +508 -452
  16. package/dist/api/ipfs/index.js +2 -0
  17. package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
  18. package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
  19. package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
  20. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
  21. package/dist/api/k8s/v1/api.gen.js +403 -342
  22. package/dist/api/k8s/v1/api.utils.js +7 -10
  23. package/dist/api/k8s/v1/marshalling.gen.js +19 -1
  24. package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
  25. package/dist/api/lb/v1/api.gen.js +1501 -1363
  26. package/dist/api/lb/v1/api.utils.js +71 -75
  27. package/dist/api/lb/v1/marshalling.gen.js +6 -0
  28. package/dist/api/marketplace/v1/api.gen.js +35 -32
  29. package/dist/api/marketplace/v2/api.gen.js +117 -102
  30. package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
  31. package/dist/api/rdb/v1/api.gen.js +897 -819
  32. package/dist/api/redis/v1/api.gen.js +358 -333
  33. package/dist/api/registry/v1/api.gen.js +211 -189
  34. package/dist/api/secret/v1alpha1/api.gen.js +265 -245
  35. package/dist/api/secret/v1alpha1/marshalling.gen.js +1 -0
  36. package/dist/api/tem/v1alpha1/api.gen.js +183 -156
  37. package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
  38. package/dist/api/test/v1/api.gen.js +116 -104
  39. package/dist/api/vpc/v1/api.gen.js +74 -65
  40. package/dist/api/vpc/v2/api.gen.js +200 -178
  41. package/dist/api/vpc/v2/marshalling.gen.js +2 -0
  42. package/dist/api/vpcgw/v1/api.gen.js +575 -501
  43. package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
  44. package/dist/index.cjs +738 -343
  45. package/dist/index.d.ts +2067 -1592
  46. package/dist/index.js +28 -26
  47. package/dist/internal/logger/console-logger.js +4 -5
  48. package/dist/scw/constants.js +1 -1
  49. package/dist/scw/errors/scw-error.js +0 -1
  50. package/package.json +2 -2
@@ -3,28 +3,25 @@ import { API } from './api.gen.js';
3
3
  import { SERVER_INSTALL_TRANSIENT_STATUSES } from './content.gen.js';
4
4
 
5
5
  class BaremetalV1UtilsAPI extends API {
6
- constructor() {
7
- super(...arguments);
8
- /**
9
- * Waits for {@link ServerInstall} to be in a final state.
10
- *
11
- * @param request - The request {@link GetServerRequest}
12
- * @param options - The waiting options
13
- * @returns A Promise of ServerInstall
14
- */
15
- this.waitForServerInstall = (request, options) => tryAtIntervals(async () => {
16
- const value = await this.getServer(request).then(server => {
17
- if (!server.install) {
18
- throw new Error(`Server creation has not begun for server ${request.serverId}`);
19
- }
20
- return server.install;
21
- });
22
- return {
23
- done: !SERVER_INSTALL_TRANSIENT_STATUSES.includes(value.status),
24
- value
25
- };
26
- }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
27
- }
6
+ /**
7
+ * Waits for {@link ServerInstall} to be in a final state.
8
+ *
9
+ * @param request - The request {@link GetServerRequest}
10
+ * @param options - The waiting options
11
+ * @returns A Promise of ServerInstall
12
+ */
13
+ waitForServerInstall = (request, options) => tryAtIntervals(async () => {
14
+ const value = await this.getServer(request).then(server => {
15
+ if (!server.install) {
16
+ throw new Error(`Server creation has not begun for server ${request.serverId}`);
17
+ }
18
+ return server.install;
19
+ });
20
+ return {
21
+ done: !SERVER_INSTALL_TRANSIENT_STATUSES.includes(value.status),
22
+ value
23
+ };
24
+ }, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
28
25
  }
29
26
 
30
27
  export { BaremetalV1UtilsAPI };
@@ -11,11 +11,9 @@ import { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse } from '
11
11
  * This API allows you to query your consumption. Billing API.
12
12
  */
13
13
  class API extends API$1 {
14
- constructor() {
15
- var _this;
16
- super(...arguments);
17
- _this = this;
18
- this.getConsumption = function (request) {
14
+ getConsumption = (() => {
15
+ var _this = this;
16
+ return function (request) {
19
17
  if (request === void 0) {
20
18
  request = {};
21
19
  }
@@ -25,29 +23,35 @@ class API extends API$1 {
25
23
  urlParams: urlParams(['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId])
26
24
  }, unmarshalGetConsumptionResponse);
27
25
  };
28
- this.pageOfListInvoices = function (request) {
26
+ })();
27
+ pageOfListInvoices = (() => {
28
+ var _this2 = this;
29
+ return function (request) {
29
30
  if (request === void 0) {
30
31
  request = {};
31
32
  }
32
- return _this.client.fetch({
33
+ return _this2.client.fetch({
33
34
  method: 'GET',
34
35
  path: `/billing/v2alpha1/invoices`,
35
- urlParams: urlParams(['invoice_type', request.invoiceType ?? 'unknown_type'], ['order_by', request.orderBy ?? 'invoice_number_desc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['started_after', request.startedAfter], ['started_before', request.startedBefore])
36
+ urlParams: urlParams(['invoice_type', request.invoiceType ?? 'unknown_type'], ['order_by', request.orderBy ?? 'invoice_number_desc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this2.client.settings.defaultPageSize], ['started_after', request.startedAfter], ['started_before', request.startedBefore])
36
37
  }, unmarshalListInvoicesResponse);
37
38
  };
38
- this.listInvoices = function (request) {
39
+ })();
40
+ listInvoices = (() => {
41
+ var _this3 = this;
42
+ return function (request) {
39
43
  if (request === void 0) {
40
44
  request = {};
41
45
  }
42
- return enrichForPagination('invoices', _this.pageOfListInvoices, request);
46
+ return enrichForPagination('invoices', _this3.pageOfListInvoices, request);
43
47
  };
44
- this.downloadInvoice = request => this.client.fetch({
45
- method: 'GET',
46
- path: `/billing/v2alpha1/invoices/${validatePathParam('invoiceId', request.invoiceId)}/download`,
47
- urlParams: urlParams(['dl', 1], ['file_type', request.fileType ?? 'pdf']),
48
- responseType: 'blob'
49
- });
50
- }
48
+ })();
49
+ downloadInvoice = request => this.client.fetch({
50
+ method: 'GET',
51
+ path: `/billing/v2alpha1/invoices/${validatePathParam('invoiceId', request.invoiceId)}/download`,
52
+ urlParams: urlParams(['dl', 1], ['file_type', request.fileType ?? 'pdf']),
53
+ responseType: 'blob'
54
+ });
51
55
  }
52
56
 
53
57
  export { API };