@scaleway/sdk 1.14.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 (49) hide show
  1. package/dist/api/account/v2/api.gen.js +77 -60
  2. package/dist/api/applesilicon/v1alpha1/api.gen.js +174 -152
  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/tem/v1alpha1/api.gen.js +182 -147
  36. package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
  37. package/dist/api/test/v1/api.gen.js +116 -104
  38. package/dist/api/vpc/v1/api.gen.js +74 -65
  39. package/dist/api/vpc/v2/api.gen.js +200 -178
  40. package/dist/api/vpc/v2/marshalling.gen.js +1 -0
  41. package/dist/api/vpcgw/v1/api.gen.js +575 -501
  42. package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
  43. package/dist/index.cjs +732 -311
  44. package/dist/index.d.ts +2040 -1540
  45. package/dist/index.js +28 -26
  46. package/dist/internal/logger/console-logger.js +4 -5
  47. package/dist/scw/constants.js +1 -1
  48. package/dist/scw/errors/scw-error.js +2 -2
  49. package/package.json +2 -2
@@ -13,24 +13,25 @@ const jsonContentHeaders = {
13
13
 
14
14
  /** Web Hosting API. */
15
15
  class API extends API$1 {
16
- constructor() {
17
- var _this;
18
- super(...arguments);
19
- _this = this;
20
- /**
21
- * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
22
- * type required via the `offer_id` parameter.
23
- *
24
- * @param request - The request {@link CreateHostingRequest}
25
- * @returns A Promise of Hosting
26
- */
27
- this.createHosting = request => this.client.fetch({
28
- body: JSON.stringify(marshalCreateHostingRequest(request, this.client.settings)),
29
- headers: jsonContentHeaders,
30
- method: 'POST',
31
- path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings`
32
- }, unmarshalHosting);
33
- this.pageOfListHostings = function (request) {
16
+ /** Lists the available regions of the API. */
17
+ static LOCALITIES = ['fr-par'];
18
+
19
+ /**
20
+ * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
21
+ * type required via the `offer_id` parameter.
22
+ *
23
+ * @param request - The request {@link CreateHostingRequest}
24
+ * @returns A Promise of Hosting
25
+ */
26
+ createHosting = request => this.client.fetch({
27
+ body: JSON.stringify(marshalCreateHostingRequest(request, this.client.settings)),
28
+ headers: jsonContentHeaders,
29
+ method: 'POST',
30
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings`
31
+ }, unmarshalHosting);
32
+ pageOfListHostings = (() => {
33
+ var _this = this;
34
+ return function (request) {
34
35
  if (request === void 0) {
35
36
  request = {};
36
37
  }
@@ -40,109 +41,118 @@ class API extends API$1 {
40
41
  urlParams: urlParams(['domain', request.domain], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['statuses', request.statuses], ['tags', request.tags])
41
42
  }, unmarshalListHostingsResponse);
42
43
  };
43
- /**
44
- * List all Web Hosting plans. List all of your existing Web Hosting plans.
45
- * Various filters are available to limit the results, including filtering by
46
- * domain, status, tag and Project ID.
47
- *
48
- * @param request - The request {@link ListHostingsRequest}
49
- * @returns A Promise of ListHostingsResponse
50
- */
51
- this.listHostings = function (request) {
44
+ })();
45
+
46
+ /**
47
+ * List all Web Hosting plans. List all of your existing Web Hosting plans.
48
+ * Various filters are available to limit the results, including filtering by
49
+ * domain, status, tag and Project ID.
50
+ *
51
+ * @param request - The request {@link ListHostingsRequest}
52
+ * @returns A Promise of ListHostingsResponse
53
+ */
54
+ listHostings = (() => {
55
+ var _this2 = this;
56
+ return function (request) {
52
57
  if (request === void 0) {
53
58
  request = {};
54
59
  }
55
- return enrichForPagination('hostings', _this.pageOfListHostings, request);
60
+ return enrichForPagination('hostings', _this2.pageOfListHostings, request);
56
61
  };
57
- /**
58
- * Get a Web Hosting plan. Get the details of one of your existing Web Hosting
59
- * plans, specified by its `hosting_id`.
60
- *
61
- * @param request - The request {@link GetHostingRequest}
62
- * @returns A Promise of Hosting
63
- */
64
- this.getHosting = request => this.client.fetch({
65
- method: 'GET',
66
- path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}`
67
- }, unmarshalHosting);
68
- /**
69
- * Waits for {@link Hosting} to be in a final state.
70
- *
71
- * @param request - The request {@link GetHostingRequest}
72
- * @param options - The waiting options
73
- * @returns A Promise of Hosting
74
- */
75
- this.waitForHosting = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HOSTING_TRANSIENT_STATUSES.includes(res.status))), this.getHosting, request, options);
76
- /**
77
- * Update a Web Hosting plan. Update the details of one of your existing Web
78
- * Hosting plans, specified by its `hosting_id`. You can update parameters
79
- * including the contact email address, tags, options and offer.
80
- *
81
- * @param request - The request {@link UpdateHostingRequest}
82
- * @returns A Promise of Hosting
83
- */
84
- this.updateHosting = request => this.client.fetch({
85
- body: JSON.stringify(marshalUpdateHostingRequest(request, this.client.settings)),
86
- headers: jsonContentHeaders,
87
- method: 'PATCH',
88
- path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}`
89
- }, unmarshalHosting);
90
- /**
91
- * Delete a Web Hosting plan. Delete a Web Hosting plan, specified by its
92
- * `hosting_id`. Note that deletion is not immediate: it will take place at
93
- * the end of the calendar month, after which time your Web Hosting plan and
94
- * all its data (files and emails) will be irreversibly lost.
95
- *
96
- * @param request - The request {@link DeleteHostingRequest}
97
- * @returns A Promise of Hosting
98
- */
99
- this.deleteHosting = request => this.client.fetch({
100
- method: 'DELETE',
101
- path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}`
102
- }, unmarshalHosting);
103
- /**
104
- * Restore a Web Hosting plan. When you [delete a Web Hosting
105
- * plan](#path-hostings-delete-a-hosting), definitive deletion does not take
106
- * place until the end of the calendar month. In the time between initiating
107
- * the deletion, and definitive deletion at the end of the month, you can
108
- * choose to **restore** the Web Hosting plan, using this endpoint and
109
- * specifying its `hosting_id`.
110
- *
111
- * @param request - The request {@link RestoreHostingRequest}
112
- * @returns A Promise of Hosting
113
- */
114
- this.restoreHosting = request => this.client.fetch({
115
- body: '{}',
116
- headers: jsonContentHeaders,
117
- method: 'POST',
118
- path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}/restore`
119
- }, unmarshalHosting);
120
- /**
121
- * Get DNS records. Get the set of DNS records of a specified domain
122
- * associated with a Web Hosting plan.
123
- *
124
- * @param request - The request {@link GetDomainDnsRecordsRequest}
125
- * @returns A Promise of DnsRecords
126
- */
127
- this.getDomainDnsRecords = request => this.client.fetch({
128
- method: 'GET',
129
- path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domain', request.domain)}/dns-records`
130
- }, unmarshalDnsRecords);
131
- /**
132
- * List all offers. List the different Web Hosting offers, and their options,
133
- * available to order from Scaleway.
134
- *
135
- * @param request - The request {@link ListOffersRequest}
136
- * @returns A Promise of ListOffersResponse
137
- */
138
- this.listOffers = request => this.client.fetch({
139
- method: 'GET',
140
- path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/offers`,
141
- urlParams: urlParams(['hosting_id', request.hostingId], ['only_options', request.onlyOptions], ['order_by', request.orderBy ?? 'price_asc'], ['without_options', request.withoutOptions])
142
- }, unmarshalListOffersResponse);
143
- }
62
+ })();
63
+
64
+ /**
65
+ * Get a Web Hosting plan. Get the details of one of your existing Web Hosting
66
+ * plans, specified by its `hosting_id`.
67
+ *
68
+ * @param request - The request {@link GetHostingRequest}
69
+ * @returns A Promise of Hosting
70
+ */
71
+ getHosting = request => this.client.fetch({
72
+ method: 'GET',
73
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}`
74
+ }, unmarshalHosting);
75
+
76
+ /**
77
+ * Waits for {@link Hosting} to be in a final state.
78
+ *
79
+ * @param request - The request {@link GetHostingRequest}
80
+ * @param options - The waiting options
81
+ * @returns A Promise of Hosting
82
+ */
83
+ waitForHosting = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HOSTING_TRANSIENT_STATUSES.includes(res.status))), this.getHosting, request, options);
84
+
85
+ /**
86
+ * Update a Web Hosting plan. Update the details of one of your existing Web
87
+ * Hosting plans, specified by its `hosting_id`. You can update parameters
88
+ * including the contact email address, tags, options and offer.
89
+ *
90
+ * @param request - The request {@link UpdateHostingRequest}
91
+ * @returns A Promise of Hosting
92
+ */
93
+ updateHosting = request => this.client.fetch({
94
+ body: JSON.stringify(marshalUpdateHostingRequest(request, this.client.settings)),
95
+ headers: jsonContentHeaders,
96
+ method: 'PATCH',
97
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}`
98
+ }, unmarshalHosting);
99
+
100
+ /**
101
+ * Delete a Web Hosting plan. Delete a Web Hosting plan, specified by its
102
+ * `hosting_id`. Note that deletion is not immediate: it will take place at
103
+ * the end of the calendar month, after which time your Web Hosting plan and
104
+ * all its data (files and emails) will be irreversibly lost.
105
+ *
106
+ * @param request - The request {@link DeleteHostingRequest}
107
+ * @returns A Promise of Hosting
108
+ */
109
+ deleteHosting = request => this.client.fetch({
110
+ method: 'DELETE',
111
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}`
112
+ }, unmarshalHosting);
113
+
114
+ /**
115
+ * Restore a Web Hosting plan. When you [delete a Web Hosting
116
+ * plan](#path-hostings-delete-a-hosting), definitive deletion does not take
117
+ * place until the end of the calendar month. In the time between initiating
118
+ * the deletion, and definitive deletion at the end of the month, you can
119
+ * choose to **restore** the Web Hosting plan, using this endpoint and
120
+ * specifying its `hosting_id`.
121
+ *
122
+ * @param request - The request {@link RestoreHostingRequest}
123
+ * @returns A Promise of Hosting
124
+ */
125
+ restoreHosting = request => this.client.fetch({
126
+ body: '{}',
127
+ headers: jsonContentHeaders,
128
+ method: 'POST',
129
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}/restore`
130
+ }, unmarshalHosting);
131
+
132
+ /**
133
+ * Get DNS records. Get the set of DNS records of a specified domain
134
+ * associated with a Web Hosting plan.
135
+ *
136
+ * @param request - The request {@link GetDomainDnsRecordsRequest}
137
+ * @returns A Promise of DnsRecords
138
+ */
139
+ getDomainDnsRecords = request => this.client.fetch({
140
+ method: 'GET',
141
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domain', request.domain)}/dns-records`
142
+ }, unmarshalDnsRecords);
143
+
144
+ /**
145
+ * List all offers. List the different Web Hosting offers, and their options,
146
+ * available to order from Scaleway.
147
+ *
148
+ * @param request - The request {@link ListOffersRequest}
149
+ * @returns A Promise of ListOffersResponse
150
+ */
151
+ listOffers = request => this.client.fetch({
152
+ method: 'GET',
153
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/offers`,
154
+ urlParams: urlParams(['hosting_id', request.hostingId], ['only_options', request.onlyOptions], ['order_by', request.orderBy ?? 'price_asc'], ['without_options', request.withoutOptions])
155
+ }, unmarshalListOffersResponse);
144
156
  }
145
- /** Lists the available regions of the API. */
146
- API.LOCALITIES = ['fr-par'];
147
157
 
148
158
  export { API };