@scaleway/sdk 2.6.0 → 2.8.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 (65) hide show
  1. package/dist/api/account/v2/api.gen.js +26 -74
  2. package/dist/api/account/v3/api.gen.js +20 -60
  3. package/dist/api/applesilicon/v1alpha1/api.gen.js +16 -56
  4. package/dist/api/baremetal/v1/api.gen.js +36 -132
  5. package/dist/api/billing/v2alpha1/api.gen.js +17 -57
  6. package/dist/api/block/v1alpha1/api.gen.js +20 -74
  7. package/dist/api/block/v1alpha1/marshalling.gen.js +1 -8
  8. package/dist/api/block/v1alpha1/validation-rules.gen.js +1 -6
  9. package/dist/api/cockpit/v1beta1/api.gen.js +95 -279
  10. package/dist/api/container/v1beta1/api.gen.js +51 -123
  11. package/dist/api/document_db/v1beta1/api.gen.js +18 -66
  12. package/dist/api/document_db/v1beta1/marshalling.gen.js +20 -1
  13. package/dist/api/domain/v2beta1/api.gen.js +36 -124
  14. package/dist/api/flexibleip/v1alpha1/api.gen.js +6 -22
  15. package/dist/api/function/v1beta1/api.gen.js +55 -135
  16. package/dist/api/iam/v1alpha1/api.gen.js +66 -226
  17. package/dist/api/instance/v1/api.gen.js +102 -310
  18. package/dist/api/instance/v1/marshalling.gen.js +32 -56
  19. package/dist/api/iot/v1/api.gen.js +24 -88
  20. package/dist/api/ipam/v1/api.gen.js +12 -28
  21. package/dist/api/ipfs/v1alpha1/api.gen.js +12 -44
  22. package/dist/api/jobs/v1alpha1/api.gen.js +12 -44
  23. package/dist/api/jobs/v1alpha1/marshalling.gen.js +2 -0
  24. package/dist/api/k8s/v1/api.gen.js +16 -56
  25. package/dist/api/lb/v1/api.gen.js +72 -248
  26. package/dist/api/marketplace/v1/api.gen.js +7 -31
  27. package/dist/api/marketplace/v1/marshalling.gen.js +1 -18
  28. package/dist/api/marketplace/v2/api.gen.js +21 -53
  29. package/dist/api/mnq/v1beta1/api.gen.js +76 -212
  30. package/dist/api/rdb/v1/api.gen.js +24 -88
  31. package/dist/api/rdb/v1/marshalling.gen.js +11 -1
  32. package/dist/api/redis/v1/api.gen.js +6 -22
  33. package/dist/api/registry/v1/api.gen.js +12 -44
  34. package/dist/api/secret/v1alpha1/api.gen.js +18 -66
  35. package/dist/api/serverless_sqldb/index.js +2 -0
  36. package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +162 -0
  37. package/dist/api/serverless_sqldb/v1alpha1/content.gen.js +7 -0
  38. package/dist/api/serverless_sqldb/v1alpha1/index.gen.js +7 -0
  39. package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.js +77 -0
  40. package/dist/api/serverless_sqldb/v1alpha1/validation-rules.gen.js +60 -0
  41. package/dist/api/tem/v1alpha1/api.gen.js +17 -57
  42. package/dist/api/test/v1/api.gen.js +6 -22
  43. package/dist/api/vpc/v1/api.gen.js +12 -36
  44. package/dist/api/vpc/v2/api.gen.js +30 -86
  45. package/dist/api/vpcgw/v1/api.gen.js +46 -158
  46. package/dist/api/webhosting/v1alpha1/api.gen.js +12 -44
  47. package/dist/helpers/marshalling.js +8 -23
  48. package/dist/index.cjs +925 -621
  49. package/dist/index.d.ts +2045 -1661
  50. package/dist/index.js +12 -10
  51. package/dist/internal/async/interval-retrier.js +8 -16
  52. package/dist/internal/interceptors/helpers.js +3 -4
  53. package/dist/internal/logger/console-logger.js +1 -7
  54. package/dist/internal/logger/index.js +1 -9
  55. package/dist/scw/auth.js +1 -2
  56. package/dist/scw/client.js +2 -10
  57. package/dist/scw/constants.js +1 -1
  58. package/dist/scw/errors/non-standard/invalid-request-mapper.js +5 -8
  59. package/dist/scw/errors/scw-error.js +2 -8
  60. package/dist/scw/errors/standard/permissions-denied-error.js +4 -7
  61. package/dist/scw/fetch/build-fetcher.js +1 -4
  62. package/dist/scw/fetch/http-dumper.js +1 -4
  63. package/dist/scw/fetch/http-interceptors.js +18 -31
  64. package/dist/scw/fetch/resource-paginator.js +3 -17
  65. package/package.json +2 -2
@@ -15,19 +15,11 @@ const jsonContentHeaders = {
15
15
  class API extends API$1 {
16
16
  /** Lists the available zones of the API. */
17
17
  static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2', 'pl-waw-3'];
18
- pageOfListGateways = (() => {
19
- var _this = this;
20
- return function (request) {
21
- if (request === void 0) {
22
- request = {};
23
- }
24
- return _this.client.fetch({
25
- method: 'GET',
26
- path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/gateways`,
27
- urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['private_network_id', request.privateNetworkId], ['project_id', request.projectId], ['status', request.status], ['tags', request.tags], ['type', request.type])
28
- }, unmarshalListGatewaysResponse);
29
- };
30
- })();
18
+ pageOfListGateways = (request = {}) => this.client.fetch({
19
+ method: 'GET',
20
+ path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways`,
21
+ urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['private_network_id', request.privateNetworkId], ['project_id', request.projectId], ['status', request.status], ['tags', request.tags], ['type', request.type])
22
+ }, unmarshalListGatewaysResponse);
31
23
 
32
24
  /**
33
25
  * List Public Gateways. List Public Gateways in a given Scaleway Organization
@@ -37,15 +29,7 @@ class API extends API$1 {
37
29
  * @param request - The request {@link ListGatewaysRequest}
38
30
  * @returns A Promise of ListGatewaysResponse
39
31
  */
40
- listGateways = (() => {
41
- var _this2 = this;
42
- return function (request) {
43
- if (request === void 0) {
44
- request = {};
45
- }
46
- return enrichForPagination('gateways', _this2.pageOfListGateways, request);
47
- };
48
- })();
32
+ listGateways = (request = {}) => enrichForPagination('gateways', this.pageOfListGateways, request);
49
33
 
50
34
  /**
51
35
  * Get a Public Gateway. Get details of a Public Gateway, specified by its
@@ -126,19 +110,11 @@ class API extends API$1 {
126
110
  method: 'POST',
127
111
  path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam('gatewayId', request.gatewayId)}/upgrade`
128
112
  }, unmarshalGateway);
129
- pageOfListGatewayNetworks = (() => {
130
- var _this3 = this;
131
- return function (request) {
132
- if (request === void 0) {
133
- request = {};
134
- }
135
- return _this3.client.fetch({
136
- method: 'GET',
137
- path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/gateway-networks`,
138
- urlParams: urlParams(['dhcp_id', request.dhcpId], ['enable_masquerade', request.enableMasquerade], ['gateway_id', request.gatewayId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['private_network_id', request.privateNetworkId], ['status', request.status])
139
- }, unmarshalListGatewayNetworksResponse);
140
- };
141
- })();
113
+ pageOfListGatewayNetworks = (request = {}) => this.client.fetch({
114
+ method: 'GET',
115
+ path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateway-networks`,
116
+ urlParams: urlParams(['dhcp_id', request.dhcpId], ['enable_masquerade', request.enableMasquerade], ['gateway_id', request.gatewayId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['private_network_id', request.privateNetworkId], ['status', request.status])
117
+ }, unmarshalListGatewayNetworksResponse);
142
118
 
143
119
  /**
144
120
  * List Public Gateway connections to Private Networks. List the connections
@@ -153,15 +129,7 @@ class API extends API$1 {
153
129
  * @param request - The request {@link ListGatewayNetworksRequest}
154
130
  * @returns A Promise of ListGatewayNetworksResponse
155
131
  */
156
- listGatewayNetworks = (() => {
157
- var _this4 = this;
158
- return function (request) {
159
- if (request === void 0) {
160
- request = {};
161
- }
162
- return enrichForPagination('gatewayNetworks', _this4.pageOfListGatewayNetworks, request);
163
- };
164
- })();
132
+ listGatewayNetworks = (request = {}) => enrichForPagination('gatewayNetworks', this.pageOfListGatewayNetworks, request);
165
133
 
166
134
  /**
167
135
  * Get a Public Gateway connection to a Private Network. Get details of a
@@ -233,19 +201,11 @@ class API extends API$1 {
233
201
  path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${validatePathParam('gatewayNetworkId', request.gatewayNetworkId)}`,
234
202
  urlParams: urlParams(['cleanup_dhcp', request.cleanupDhcp])
235
203
  });
236
- pageOfListDHCPs = (() => {
237
- var _this5 = this;
238
- return function (request) {
239
- if (request === void 0) {
240
- request = {};
241
- }
242
- return _this5.client.fetch({
243
- method: 'GET',
244
- path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this5.client.settings.defaultZone)}/dhcps`,
245
- urlParams: urlParams(['address', request.address], ['has_address', request.hasAddress], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this5.client.settings.defaultPageSize], ['project_id', request.projectId])
246
- }, unmarshalListDHCPsResponse);
247
- };
248
- })();
204
+ pageOfListDHCPs = (request = {}) => this.client.fetch({
205
+ method: 'GET',
206
+ path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcps`,
207
+ urlParams: urlParams(['address', request.address], ['has_address', request.hasAddress], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
208
+ }, unmarshalListDHCPsResponse);
249
209
 
250
210
  /**
251
211
  * List DHCP configurations. List DHCP configurations, optionally filtering by
@@ -260,15 +220,7 @@ class API extends API$1 {
260
220
  * @param request - The request {@link ListDHCPsRequest}
261
221
  * @returns A Promise of ListDHCPsResponse
262
222
  */
263
- listDHCPs = (() => {
264
- var _this6 = this;
265
- return function (request) {
266
- if (request === void 0) {
267
- request = {};
268
- }
269
- return enrichForPagination('dhcps', _this6.pageOfListDHCPs, request);
270
- };
271
- })();
223
+ listDHCPs = (request = {}) => enrichForPagination('dhcps', this.pageOfListDHCPs, request);
272
224
 
273
225
  /**
274
226
  * Get a DHCP configuration. Get a DHCP configuration object, identified by
@@ -331,19 +283,11 @@ class API extends API$1 {
331
283
  method: 'DELETE',
332
284
  path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcps/${validatePathParam('dhcpId', request.dhcpId)}`
333
285
  });
334
- pageOfListDHCPEntries = (() => {
335
- var _this7 = this;
336
- return function (request) {
337
- if (request === void 0) {
338
- request = {};
339
- }
340
- return _this7.client.fetch({
341
- method: 'GET',
342
- path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this7.client.settings.defaultZone)}/dhcp-entries`,
343
- urlParams: urlParams(['gateway_network_id', request.gatewayNetworkId], ['hostname', request.hostname], ['ip_address', request.ipAddress], ['mac_address', request.macAddress], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['type', request.type])
344
- }, unmarshalListDHCPEntriesResponse);
345
- };
346
- })();
286
+ pageOfListDHCPEntries = (request = {}) => this.client.fetch({
287
+ method: 'GET',
288
+ path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcp-entries`,
289
+ urlParams: urlParams(['gateway_network_id', request.gatewayNetworkId], ['hostname', request.hostname], ['ip_address', request.ipAddress], ['mac_address', request.macAddress], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['type', request.type])
290
+ }, unmarshalListDHCPEntriesResponse);
347
291
 
348
292
  /**
349
293
  * List DHCP entries. List DHCP entries, whether dynamically assigned and/or
@@ -353,15 +297,7 @@ class API extends API$1 {
353
297
  * @param request - The request {@link ListDHCPEntriesRequest}
354
298
  * @returns A Promise of ListDHCPEntriesResponse
355
299
  */
356
- listDHCPEntries = (() => {
357
- var _this8 = this;
358
- return function (request) {
359
- if (request === void 0) {
360
- request = {};
361
- }
362
- return enrichForPagination('dhcpEntries', _this8.pageOfListDHCPEntries, request);
363
- };
364
- })();
300
+ listDHCPEntries = (request = {}) => enrichForPagination('dhcpEntries', this.pageOfListDHCPEntries, request);
365
301
 
366
302
  /**
367
303
  * Get a DHCP entry. Get a DHCP entry, specified by its DHCP entry ID.
@@ -435,19 +371,11 @@ class API extends API$1 {
435
371
  method: 'DELETE',
436
372
  path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcp-entries/${validatePathParam('dhcpEntryId', request.dhcpEntryId)}`
437
373
  });
438
- pageOfListPATRules = (() => {
439
- var _this9 = this;
440
- return function (request) {
441
- if (request === void 0) {
442
- request = {};
443
- }
444
- return _this9.client.fetch({
445
- method: 'GET',
446
- path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this9.client.settings.defaultZone)}/pat-rules`,
447
- urlParams: urlParams(['gateway_id', request.gatewayId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['protocol', request.protocol])
448
- }, unmarshalListPATRulesResponse);
449
- };
450
- })();
374
+ pageOfListPATRules = (request = {}) => this.client.fetch({
375
+ method: 'GET',
376
+ path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/pat-rules`,
377
+ urlParams: urlParams(['gateway_id', request.gatewayId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['protocol', request.protocol])
378
+ }, unmarshalListPATRulesResponse);
451
379
 
452
380
  /**
453
381
  * List PAT rules. List PAT rules. You can filter by gateway ID to list all
@@ -457,15 +385,7 @@ class API extends API$1 {
457
385
  * @param request - The request {@link ListPATRulesRequest}
458
386
  * @returns A Promise of ListPATRulesResponse
459
387
  */
460
- listPATRules = (() => {
461
- var _this10 = this;
462
- return function (request) {
463
- if (request === void 0) {
464
- request = {};
465
- }
466
- return enrichForPagination('patRules', _this10.pageOfListPATRules, request);
467
- };
468
- })();
388
+ listPATRules = (request = {}) => enrichForPagination('patRules', this.pageOfListPATRules, request);
469
389
 
470
390
  /**
471
391
  * Get a PAT rule. Get a PAT rule, specified by its PAT rule ID. The response
@@ -546,31 +466,15 @@ class API extends API$1 {
546
466
  * @param request - The request {@link ListGatewayTypesRequest}
547
467
  * @returns A Promise of ListGatewayTypesResponse
548
468
  */
549
- listGatewayTypes = (() => {
550
- var _this11 = this;
551
- return function (request) {
552
- if (request === void 0) {
553
- request = {};
554
- }
555
- return _this11.client.fetch({
556
- method: 'GET',
557
- path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this11.client.settings.defaultZone)}/gateway-types`
558
- }, unmarshalListGatewayTypesResponse);
559
- };
560
- })();
561
- pageOfListIPs = (() => {
562
- var _this12 = this;
563
- return function (request) {
564
- if (request === void 0) {
565
- request = {};
566
- }
567
- return _this12.client.fetch({
568
- method: 'GET',
569
- path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this12.client.settings.defaultZone)}/ips`,
570
- urlParams: urlParams(['is_free', request.isFree], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this12.client.settings.defaultPageSize], ['project_id', request.projectId], ['reverse', request.reverse], ['tags', request.tags])
571
- }, unmarshalListIPsResponse);
572
- };
573
- })();
469
+ listGatewayTypes = (request = {}) => this.client.fetch({
470
+ method: 'GET',
471
+ path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateway-types`
472
+ }, unmarshalListGatewayTypesResponse);
473
+ pageOfListIPs = (request = {}) => this.client.fetch({
474
+ method: 'GET',
475
+ path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips`,
476
+ urlParams: urlParams(['is_free', request.isFree], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['reverse', request.reverse], ['tags', request.tags])
477
+ }, unmarshalListIPsResponse);
574
478
 
575
479
  /**
576
480
  * List IPs. List Public Gateway flexible IP addresses. A number of filter
@@ -579,15 +483,7 @@ class API extends API$1 {
579
483
  * @param request - The request {@link ListIPsRequest}
580
484
  * @returns A Promise of ListIPsResponse
581
485
  */
582
- listIPs = (() => {
583
- var _this13 = this;
584
- return function (request) {
585
- if (request === void 0) {
586
- request = {};
587
- }
588
- return enrichForPagination('ips', _this13.pageOfListIPs, request);
589
- };
590
- })();
486
+ listIPs = (request = {}) => enrichForPagination('ips', this.pageOfListIPs, request);
591
487
 
592
488
  /**
593
489
  * Get an IP. Get details of a Public Gateway flexible IP address, identified
@@ -610,20 +506,12 @@ class API extends API$1 {
610
506
  * @param request - The request {@link CreateIPRequest}
611
507
  * @returns A Promise of IP
612
508
  */
613
- createIP = (() => {
614
- var _this14 = this;
615
- return function (request) {
616
- if (request === void 0) {
617
- request = {};
618
- }
619
- return _this14.client.fetch({
620
- body: JSON.stringify(marshalCreateIPRequest(request, _this14.client.settings)),
621
- headers: jsonContentHeaders,
622
- method: 'POST',
623
- path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this14.client.settings.defaultZone)}/ips`
624
- }, unmarshalIP);
625
- };
626
- })();
509
+ createIP = (request = {}) => this.client.fetch({
510
+ body: JSON.stringify(marshalCreateIPRequest(request, this.client.settings)),
511
+ headers: jsonContentHeaders,
512
+ method: 'POST',
513
+ path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips`
514
+ }, unmarshalIP);
627
515
 
628
516
  /**
629
517
  * Update an IP. Update details of an existing flexible IP address, including
@@ -29,19 +29,11 @@ class API extends API$1 {
29
29
  method: 'POST',
30
30
  path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings`
31
31
  }, unmarshalHosting);
32
- pageOfListHostings = (() => {
33
- var _this = this;
34
- return function (request) {
35
- if (request === void 0) {
36
- request = {};
37
- }
38
- return _this.client.fetch({
39
- method: 'GET',
40
- path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/hostings`,
41
- urlParams: urlParams(['control_panels', request.controlPanels], ['domain', request.domain], ['order_by', request.orderBy], ['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])
42
- }, unmarshalListHostingsResponse);
43
- };
44
- })();
32
+ pageOfListHostings = (request = {}) => this.client.fetch({
33
+ method: 'GET',
34
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings`,
35
+ urlParams: urlParams(['control_panels', request.controlPanels], ['domain', request.domain], ['order_by', request.orderBy], ['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])
36
+ }, unmarshalListHostingsResponse);
45
37
 
46
38
  /**
47
39
  * List all Web Hosting plans. List all of your existing Web Hosting plans.
@@ -51,15 +43,7 @@ class API extends API$1 {
51
43
  * @param request - The request {@link ListHostingsRequest}
52
44
  * @returns A Promise of ListHostingsResponse
53
45
  */
54
- listHostings = (() => {
55
- var _this2 = this;
56
- return function (request) {
57
- if (request === void 0) {
58
- request = {};
59
- }
60
- return enrichForPagination('hostings', _this2.pageOfListHostings, request);
61
- };
62
- })();
46
+ listHostings = (request = {}) => enrichForPagination('hostings', this.pageOfListHostings, request);
63
47
 
64
48
  /**
65
49
  * Get a Web Hosting plan. Get the details of one of your existing Web Hosting
@@ -153,19 +137,11 @@ class API extends API$1 {
153
137
  path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/offers`,
154
138
  urlParams: urlParams(['control_panels', request.controlPanels], ['hosting_id', request.hostingId], ['only_options', request.onlyOptions], ['order_by', request.orderBy], ['without_options', request.withoutOptions])
155
139
  }, unmarshalListOffersResponse);
156
- pageOfListControlPanels = (() => {
157
- var _this3 = this;
158
- return function (request) {
159
- if (request === void 0) {
160
- request = {};
161
- }
162
- return _this3.client.fetch({
163
- method: 'GET',
164
- path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/control-panels`,
165
- urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize])
166
- }, unmarshalListControlPanelsResponse);
167
- };
168
- })();
140
+ pageOfListControlPanels = (request = {}) => this.client.fetch({
141
+ method: 'GET',
142
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/control-panels`,
143
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
144
+ }, unmarshalListControlPanelsResponse);
169
145
 
170
146
  /**
171
147
  * List all control panels type. List the control panels type: cpanel or
@@ -174,15 +150,7 @@ class API extends API$1 {
174
150
  * @param request - The request {@link ListControlPanelsRequest}
175
151
  * @returns A Promise of ListControlPanelsResponse
176
152
  */
177
- listControlPanels = (() => {
178
- var _this4 = this;
179
- return function (request) {
180
- if (request === void 0) {
181
- request = {};
182
- }
183
- return enrichForPagination('controlPanels', _this4.pageOfListControlPanels, request);
184
- };
185
- })();
153
+ listControlPanels = (request = {}) => enrichForPagination('controlPanels', this.pageOfListControlPanels, request);
186
154
  }
187
155
 
188
156
  export { API };
@@ -29,10 +29,7 @@ function validatePathParam(name, param) {
29
29
  *
30
30
  * @internal
31
31
  */
32
- const resolveOneOf = function (list, isRequired) {
33
- if (isRequired === void 0) {
34
- isRequired = false;
35
- }
32
+ const resolveOneOf = (list, isRequired = false) => {
36
33
  const elt = list.find(obj => obj.value !== undefined) ?? list.find(obj => obj.default !== undefined);
37
34
  const value = elt?.value ?? elt?.default;
38
35
  if (elt && value !== undefined) {
@@ -54,11 +51,8 @@ const resolveOneOf = function (list, isRequired) {
54
51
  *
55
52
  * @internal
56
53
  */
57
- const urlParams = function () {
54
+ const urlParams = (...paramTuples) => {
58
55
  const params = new URLSearchParams();
59
- for (var _len = arguments.length, paramTuples = new Array(_len), _key = 0; _key < _len; _key++) {
60
- paramTuples[_key] = arguments[_key];
61
- }
62
56
  for (const [key, value] of paramTuples) {
63
57
  if (typeof key === 'string' && value != null) {
64
58
  if (Array.isArray(value)) {
@@ -96,10 +90,7 @@ const unmarshalDate = data => {
96
90
  *
97
91
  * @internal
98
92
  */
99
- const unmarshalArrayOfObject = function (data, unmarshaller, emptyFallback) {
100
- if (emptyFallback === void 0) {
101
- emptyFallback = true;
102
- }
93
+ const unmarshalArrayOfObject = (data, unmarshaller, emptyFallback = true) => {
103
94
  if (!Array.isArray(data)) {
104
95
  return emptyFallback ? [] : undefined;
105
96
  }
@@ -111,20 +102,14 @@ const unmarshalArrayOfObject = function (data, unmarshaller, emptyFallback) {
111
102
  *
112
103
  * @internal
113
104
  */
114
- const unmarshalMapOfObject = function (data, unmarshaller, emptyFallback) {
115
- if (emptyFallback === void 0) {
116
- emptyFallback = true;
117
- }
105
+ const unmarshalMapOfObject = (data, unmarshaller, emptyFallback = true) => {
118
106
  if (!data || typeof data !== 'object' || !(data instanceof Object) || Array.isArray(data)) {
119
107
  return emptyFallback ? {} : undefined;
120
108
  }
121
- return Object.entries(data).reduce((acc, _ref) => {
122
- let [key, value] = _ref;
123
- return {
124
- ...acc,
125
- [key]: unmarshaller(value)
126
- };
127
- }, {});
109
+ return Object.entries(data).reduce((acc, [key, value]) => ({
110
+ ...acc,
111
+ [key]: unmarshaller(value)
112
+ }), {});
128
113
  };
129
114
 
130
115
  export { resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, urlParams, validatePathParam };