@scaleway/sdk-webhosting 2.1.1 → 2.2.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.
@@ -10,11 +10,7 @@ class BackupAPI extends API {
10
10
  * type ∈ {'zone','region','global','unspecified'}
11
11
  */
12
12
  static LOCALITY = toApiLocality({
13
- regions: [
14
- "fr-par",
15
- "nl-ams",
16
- "pl-waw"
17
- ]
13
+ regions: ["fr-par", "nl-ams", "pl-waw"]
18
14
  });
19
15
  pageOfListBackups = (request) => this.client.fetch(
20
16
  {
@@ -23,7 +19,10 @@ class BackupAPI extends API {
23
19
  urlParams: urlParams(
24
20
  ["order_by", request.orderBy],
25
21
  ["page", request.page],
26
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
22
+ [
23
+ "page_size",
24
+ request.pageSize ?? this.client.settings.defaultPageSize
25
+ ]
27
26
  )
28
27
  },
29
28
  unmarshalListBackupsResponse
@@ -56,7 +55,9 @@ class BackupAPI extends API {
56
55
  * @returns A Promise of Backup
57
56
  */
58
57
  waitForBackup = (request, options) => waitForResource(
59
- options?.stop ?? ((res) => Promise.resolve(!BACKUP_TRANSIENT_STATUSES.includes(res.status))),
58
+ options?.stop ?? ((res) => Promise.resolve(
59
+ !BACKUP_TRANSIENT_STATUSES.includes(res.status)
60
+ )),
60
61
  this.getBackup,
61
62
  request,
62
63
  options
@@ -86,9 +87,7 @@ class BackupAPI extends API {
86
87
  {
87
88
  method: "GET",
88
89
  path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/backup-items`,
89
- urlParams: urlParams(
90
- ["backup_id", request.backupId]
91
- )
90
+ urlParams: urlParams(["backup_id", request.backupId])
92
91
  },
93
92
  unmarshalListBackupItemsResponse
94
93
  );
@@ -101,7 +100,10 @@ class BackupAPI extends API {
101
100
  restoreBackupItems = (request) => this.client.fetch(
102
101
  {
103
102
  body: JSON.stringify(
104
- marshalBackupApiRestoreBackupItemsRequest(request, this.client.settings)
103
+ marshalBackupApiRestoreBackupItemsRequest(
104
+ request,
105
+ this.client.settings
106
+ )
105
107
  ),
106
108
  headers: jsonContentHeaders,
107
109
  method: "POST",
@@ -142,11 +144,7 @@ class ControlPanelAPI extends API {
142
144
  * type ∈ {'zone','region','global','unspecified'}
143
145
  */
144
146
  static LOCALITY = toApiLocality({
145
- regions: [
146
- "fr-par",
147
- "nl-ams",
148
- "pl-waw"
149
- ]
147
+ regions: ["fr-par", "nl-ams", "pl-waw"]
150
148
  });
151
149
  pageOfListControlPanels = (request = {}) => this.client.fetch(
152
150
  {
@@ -154,7 +152,10 @@ class ControlPanelAPI extends API {
154
152
  path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/control-panels`,
155
153
  urlParams: urlParams(
156
154
  ["page", request.page],
157
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
155
+ [
156
+ "page_size",
157
+ request.pageSize ?? this.client.settings.defaultPageSize
158
+ ]
158
159
  )
159
160
  },
160
161
  unmarshalListControlPanelsResponse
@@ -173,11 +174,7 @@ class DatabaseAPI extends API {
173
174
  * type ∈ {'zone','region','global','unspecified'}
174
175
  */
175
176
  static LOCALITY = toApiLocality({
176
- regions: [
177
- "fr-par",
178
- "nl-ams",
179
- "pl-waw"
180
- ]
177
+ regions: ["fr-par", "nl-ams", "pl-waw"]
181
178
  });
182
179
  /**
183
180
  * "Create a new database within your hosting plan".
@@ -188,7 +185,10 @@ class DatabaseAPI extends API {
188
185
  createDatabase = (request) => this.client.fetch(
189
186
  {
190
187
  body: JSON.stringify(
191
- marshalDatabaseApiCreateDatabaseRequest(request, this.client.settings)
188
+ marshalDatabaseApiCreateDatabaseRequest(
189
+ request,
190
+ this.client.settings
191
+ )
192
192
  ),
193
193
  headers: jsonContentHeaders,
194
194
  method: "POST",
@@ -203,7 +203,10 @@ class DatabaseAPI extends API {
203
203
  urlParams: urlParams(
204
204
  ["order_by", request.orderBy],
205
205
  ["page", request.page],
206
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
206
+ [
207
+ "page_size",
208
+ request.pageSize ?? this.client.settings.defaultPageSize
209
+ ]
207
210
  )
208
211
  },
209
212
  unmarshalListDatabasesResponse
@@ -250,7 +253,10 @@ class DatabaseAPI extends API {
250
253
  createDatabaseUser = (request) => this.client.fetch(
251
254
  {
252
255
  body: JSON.stringify(
253
- marshalDatabaseApiCreateDatabaseUserRequest(request, this.client.settings)
256
+ marshalDatabaseApiCreateDatabaseUserRequest(
257
+ request,
258
+ this.client.settings
259
+ )
254
260
  ),
255
261
  headers: jsonContentHeaders,
256
262
  method: "POST",
@@ -265,7 +271,10 @@ class DatabaseAPI extends API {
265
271
  urlParams: urlParams(
266
272
  ["order_by", request.orderBy],
267
273
  ["page", request.page],
268
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
274
+ [
275
+ "page_size",
276
+ request.pageSize ?? this.client.settings.defaultPageSize
277
+ ]
269
278
  )
270
279
  },
271
280
  unmarshalListDatabaseUsersResponse
@@ -312,7 +321,10 @@ class DatabaseAPI extends API {
312
321
  changeDatabaseUserPassword = (request) => this.client.fetch(
313
322
  {
314
323
  body: JSON.stringify(
315
- marshalDatabaseApiChangeDatabaseUserPasswordRequest(request, this.client.settings)
324
+ marshalDatabaseApiChangeDatabaseUserPasswordRequest(
325
+ request,
326
+ this.client.settings
327
+ )
316
328
  ),
317
329
  headers: jsonContentHeaders,
318
330
  method: "POST",
@@ -329,7 +341,10 @@ class DatabaseAPI extends API {
329
341
  assignDatabaseUser = (request) => this.client.fetch(
330
342
  {
331
343
  body: JSON.stringify(
332
- marshalDatabaseApiAssignDatabaseUserRequest(request, this.client.settings)
344
+ marshalDatabaseApiAssignDatabaseUserRequest(
345
+ request,
346
+ this.client.settings
347
+ )
333
348
  ),
334
349
  headers: jsonContentHeaders,
335
350
  method: "POST",
@@ -346,7 +361,10 @@ class DatabaseAPI extends API {
346
361
  unassignDatabaseUser = (request) => this.client.fetch(
347
362
  {
348
363
  body: JSON.stringify(
349
- marshalDatabaseApiUnassignDatabaseUserRequest(request, this.client.settings)
364
+ marshalDatabaseApiUnassignDatabaseUserRequest(
365
+ request,
366
+ this.client.settings
367
+ )
350
368
  ),
351
369
  headers: jsonContentHeaders,
352
370
  method: "POST",
@@ -361,11 +379,7 @@ class DnsAPI extends API {
361
379
  * type ∈ {'zone','region','global','unspecified'}
362
380
  */
363
381
  static LOCALITY = toApiLocality({
364
- regions: [
365
- "fr-par",
366
- "nl-ams",
367
- "pl-waw"
368
- ]
382
+ regions: ["fr-par", "nl-ams", "pl-waw"]
369
383
  });
370
384
  /**
371
385
  * Get DNS records. Get the set of DNS records of a specified domain associated with a Web Hosting plan's domain.
@@ -390,7 +404,10 @@ class DnsAPI extends API {
390
404
  checkUserOwnsDomain = (request) => this.client.fetch(
391
405
  {
392
406
  body: JSON.stringify(
393
- marshalDnsApiCheckUserOwnsDomainRequest(request, this.client.settings)
407
+ marshalDnsApiCheckUserOwnsDomainRequest(
408
+ request,
409
+ this.client.settings
410
+ )
394
411
  ),
395
412
  headers: jsonContentHeaders,
396
413
  method: "POST",
@@ -407,7 +424,10 @@ class DnsAPI extends API {
407
424
  syncDomainDnsRecords = (request) => this.client.fetch(
408
425
  {
409
426
  body: JSON.stringify(
410
- marshalDnsApiSyncDomainDnsRecordsRequest(request, this.client.settings)
427
+ marshalDnsApiSyncDomainDnsRecordsRequest(
428
+ request,
429
+ this.client.settings
430
+ )
411
431
  ),
412
432
  headers: jsonContentHeaders,
413
433
  method: "POST",
@@ -427,7 +447,10 @@ class DnsAPI extends API {
427
447
  path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/search-domains`,
428
448
  urlParams: urlParams(
429
449
  ["domain_name", request.domainName],
430
- ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
450
+ [
451
+ "project_id",
452
+ request.projectId ?? this.client.settings.defaultProjectId
453
+ ]
431
454
  )
432
455
  },
433
456
  unmarshalSearchDomainsResponse
@@ -442,9 +465,10 @@ class DnsAPI extends API {
442
465
  {
443
466
  method: "GET",
444
467
  path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainName", request.domainName)}`,
445
- urlParams: urlParams(
446
- ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
447
- )
468
+ urlParams: urlParams([
469
+ "project_id",
470
+ request.projectId ?? this.client.settings.defaultProjectId
471
+ ])
448
472
  },
449
473
  unmarshalDomain
450
474
  );
@@ -456,7 +480,9 @@ class DnsAPI extends API {
456
480
  * @returns A Promise of Domain
457
481
  */
458
482
  waitForDomain = (request, options) => waitForResource(
459
- options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))),
483
+ options?.stop ?? ((res) => Promise.resolve(
484
+ !DOMAIN_TRANSIENT_STATUSES.includes(res.status)
485
+ )),
460
486
  this.getDomain,
461
487
  request,
462
488
  options
@@ -468,11 +494,7 @@ class OfferAPI extends API {
468
494
  * type ∈ {'zone','region','global','unspecified'}
469
495
  */
470
496
  static LOCALITY = toApiLocality({
471
- regions: [
472
- "fr-par",
473
- "nl-ams",
474
- "pl-waw"
475
- ]
497
+ regions: ["fr-par", "nl-ams", "pl-waw"]
476
498
  });
477
499
  pageOfListOffers = (request = {}) => this.client.fetch(
478
500
  {
@@ -483,7 +505,10 @@ class OfferAPI extends API {
483
505
  ["hosting_id", request.hostingId],
484
506
  ["order_by", request.orderBy],
485
507
  ["page", request.page],
486
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
508
+ [
509
+ "page_size",
510
+ request.pageSize ?? this.client.settings.defaultPageSize
511
+ ]
487
512
  )
488
513
  },
489
514
  unmarshalListOffersResponse
@@ -502,11 +527,7 @@ class HostingAPI extends API {
502
527
  * type ∈ {'zone','region','global','unspecified'}
503
528
  */
504
529
  static LOCALITY = toApiLocality({
505
- regions: [
506
- "fr-par",
507
- "nl-ams",
508
- "pl-waw"
509
- ]
530
+ regions: ["fr-par", "nl-ams", "pl-waw"]
510
531
  });
511
532
  /**
512
533
  * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer type required via the `offer_id` parameter.
@@ -535,7 +556,10 @@ class HostingAPI extends API {
535
556
  ["order_by", request.orderBy],
536
557
  ["organization_id", request.organizationId],
537
558
  ["page", request.page],
538
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
559
+ [
560
+ "page_size",
561
+ request.pageSize ?? this.client.settings.defaultPageSize
562
+ ],
539
563
  ["project_id", request.projectId],
540
564
  ["statuses", request.statuses],
541
565
  ["subdomain", request.subdomain],
@@ -572,7 +596,9 @@ class HostingAPI extends API {
572
596
  * @returns A Promise of Hosting
573
597
  */
574
598
  waitForHosting = (request, options) => waitForResource(
575
- options?.stop ?? ((res) => Promise.resolve(!HOSTING_TRANSIENT_STATUSES.includes(res.status))),
599
+ options?.stop ?? ((res) => Promise.resolve(
600
+ !HOSTING_TRANSIENT_STATUSES.includes(res.status)
601
+ )),
576
602
  this.getHosting,
577
603
  request,
578
604
  options
@@ -659,7 +685,10 @@ class HostingAPI extends API {
659
685
  addCustomDomain = (request) => this.client.fetch(
660
686
  {
661
687
  body: JSON.stringify(
662
- marshalHostingApiAddCustomDomainRequest(request, this.client.settings)
688
+ marshalHostingApiAddCustomDomainRequest(
689
+ request,
690
+ this.client.settings
691
+ )
663
692
  ),
664
693
  headers: jsonContentHeaders,
665
694
  method: "POST",
@@ -676,7 +705,10 @@ class HostingAPI extends API {
676
705
  removeCustomDomain = (request) => this.client.fetch(
677
706
  {
678
707
  body: JSON.stringify(
679
- marshalHostingApiRemoveCustomDomainRequest(request, this.client.settings)
708
+ marshalHostingApiRemoveCustomDomainRequest(
709
+ request,
710
+ this.client.settings
711
+ )
680
712
  ),
681
713
  headers: jsonContentHeaders,
682
714
  method: "POST",
@@ -693,7 +725,10 @@ class HostingAPI extends API {
693
725
  migrateControlPanel = (request) => this.client.fetch(
694
726
  {
695
727
  body: JSON.stringify(
696
- marshalHostingApiMigrateControlPanelRequest(request, this.client.settings)
728
+ marshalHostingApiMigrateControlPanelRequest(
729
+ request,
730
+ this.client.settings
731
+ )
697
732
  ),
698
733
  headers: jsonContentHeaders,
699
734
  method: "POST",
@@ -708,11 +743,7 @@ class FreeDomainAPI extends API {
708
743
  * type ∈ {'zone','region','global','unspecified'}
709
744
  */
710
745
  static LOCALITY = toApiLocality({
711
- regions: [
712
- "fr-par",
713
- "nl-ams",
714
- "pl-waw"
715
- ]
746
+ regions: ["fr-par", "nl-ams", "pl-waw"]
716
747
  });
717
748
  /**
718
749
  * Check whether a given slug and free domain combination is available.. Check whether a given slug and free domain combination is available.
@@ -723,7 +754,10 @@ class FreeDomainAPI extends API {
723
754
  checkFreeDomainAvailability = (request) => this.client.fetch(
724
755
  {
725
756
  body: JSON.stringify(
726
- marshalFreeDomainApiCheckFreeDomainAvailabilityRequest(request, this.client.settings)
757
+ marshalFreeDomainApiCheckFreeDomainAvailabilityRequest(
758
+ request,
759
+ this.client.settings
760
+ )
727
761
  ),
728
762
  headers: jsonContentHeaders,
729
763
  method: "POST",
@@ -737,7 +771,10 @@ class FreeDomainAPI extends API {
737
771
  path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/root-domains`,
738
772
  urlParams: urlParams(
739
773
  ["page", request.page],
740
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
774
+ [
775
+ "page_size",
776
+ request.pageSize ?? this.client.settings.defaultPageSize
777
+ ]
741
778
  )
742
779
  },
743
780
  unmarshalListFreeRootDomainsResponse
@@ -756,11 +793,7 @@ class FtpAccountAPI extends API {
756
793
  * type ∈ {'zone','region','global','unspecified'}
757
794
  */
758
795
  static LOCALITY = toApiLocality({
759
- regions: [
760
- "fr-par",
761
- "nl-ams",
762
- "pl-waw"
763
- ]
796
+ regions: ["fr-par", "nl-ams", "pl-waw"]
764
797
  });
765
798
  /**
766
799
  * Create a new FTP account within your hosting plan.. Create a new FTP account within your hosting plan.
@@ -771,7 +804,10 @@ class FtpAccountAPI extends API {
771
804
  createFtpAccount = (request) => this.client.fetch(
772
805
  {
773
806
  body: JSON.stringify(
774
- marshalFtpAccountApiCreateFtpAccountRequest(request, this.client.settings)
807
+ marshalFtpAccountApiCreateFtpAccountRequest(
808
+ request,
809
+ this.client.settings
810
+ )
775
811
  ),
776
812
  headers: jsonContentHeaders,
777
813
  method: "POST",
@@ -787,7 +823,10 @@ class FtpAccountAPI extends API {
787
823
  ["domain", request.domain],
788
824
  ["order_by", request.orderBy],
789
825
  ["page", request.page],
790
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
826
+ [
827
+ "page_size",
828
+ request.pageSize ?? this.client.settings.defaultPageSize
829
+ ]
791
830
  )
792
831
  },
793
832
  unmarshalListFtpAccountsResponse
@@ -815,7 +854,10 @@ class FtpAccountAPI extends API {
815
854
  changeFtpAccountPassword = (request) => this.client.fetch(
816
855
  {
817
856
  body: JSON.stringify(
818
- marshalFtpAccountApiChangeFtpAccountPasswordRequest(request, this.client.settings)
857
+ marshalFtpAccountApiChangeFtpAccountPasswordRequest(
858
+ request,
859
+ this.client.settings
860
+ )
819
861
  ),
820
862
  headers: jsonContentHeaders,
821
863
  method: "POST",
@@ -830,11 +872,7 @@ class MailAccountAPI extends API {
830
872
  * type ∈ {'zone','region','global','unspecified'}
831
873
  */
832
874
  static LOCALITY = toApiLocality({
833
- regions: [
834
- "fr-par",
835
- "nl-ams",
836
- "pl-waw"
837
- ]
875
+ regions: ["fr-par", "nl-ams", "pl-waw"]
838
876
  });
839
877
  /**
840
878
  * Create a new mail account within your hosting plan.. Create a new mail account within your hosting plan.
@@ -845,7 +883,10 @@ class MailAccountAPI extends API {
845
883
  createMailAccount = (request) => this.client.fetch(
846
884
  {
847
885
  body: JSON.stringify(
848
- marshalMailAccountApiCreateMailAccountRequest(request, this.client.settings)
886
+ marshalMailAccountApiCreateMailAccountRequest(
887
+ request,
888
+ this.client.settings
889
+ )
849
890
  ),
850
891
  headers: jsonContentHeaders,
851
892
  method: "POST",
@@ -861,7 +902,10 @@ class MailAccountAPI extends API {
861
902
  ["domain", request.domain],
862
903
  ["order_by", request.orderBy],
863
904
  ["page", request.page],
864
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
905
+ [
906
+ "page_size",
907
+ request.pageSize ?? this.client.settings.defaultPageSize
908
+ ]
865
909
  )
866
910
  },
867
911
  unmarshalListMailAccountsResponse
@@ -882,7 +926,10 @@ class MailAccountAPI extends API {
882
926
  removeMailAccount = (request) => this.client.fetch(
883
927
  {
884
928
  body: JSON.stringify(
885
- marshalMailAccountApiRemoveMailAccountRequest(request, this.client.settings)
929
+ marshalMailAccountApiRemoveMailAccountRequest(
930
+ request,
931
+ this.client.settings
932
+ )
886
933
  ),
887
934
  headers: jsonContentHeaders,
888
935
  method: "POST",
@@ -899,7 +946,10 @@ class MailAccountAPI extends API {
899
946
  changeMailAccountPassword = (request) => this.client.fetch(
900
947
  {
901
948
  body: JSON.stringify(
902
- marshalMailAccountApiChangeMailAccountPasswordRequest(request, this.client.settings)
949
+ marshalMailAccountApiChangeMailAccountPasswordRequest(
950
+ request,
951
+ this.client.settings
952
+ )
903
953
  ),
904
954
  headers: jsonContentHeaders,
905
955
  method: "POST",
@@ -914,11 +964,7 @@ class WebsiteAPI extends API {
914
964
  * type ∈ {'zone','region','global','unspecified'}
915
965
  */
916
966
  static LOCALITY = toApiLocality({
917
- regions: [
918
- "fr-par",
919
- "nl-ams",
920
- "pl-waw"
921
- ]
967
+ regions: ["fr-par", "nl-ams", "pl-waw"]
922
968
  });
923
969
  pageOfListWebsites = (request) => this.client.fetch(
924
970
  {
@@ -927,7 +973,10 @@ class WebsiteAPI extends API {
927
973
  urlParams: urlParams(
928
974
  ["order_by", request.orderBy],
929
975
  ["page", request.page],
930
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
976
+ [
977
+ "page_size",
978
+ request.pageSize ?? this.client.settings.defaultPageSize
979
+ ]
931
980
  )
932
981
  },
933
982
  unmarshalListWebsitesResponse
@@ -961,12 +1010,10 @@ class WebsiteAPI extends API {
961
1010
  *
962
1011
  * @param request - The request {@link WebsiteApiDeleteWebsiteRequest}
963
1012
  */
964
- deleteWebsite = (request) => this.client.fetch(
965
- {
966
- method: "DELETE",
967
- path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/websites/${validatePathParam("domainName", request.domainName)}`
968
- }
969
- );
1013
+ deleteWebsite = (request) => this.client.fetch({
1014
+ method: "DELETE",
1015
+ path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/websites/${validatePathParam("domainName", request.domainName)}`
1016
+ });
970
1017
  }
971
1018
  export {
972
1019
  BackupAPI,
@@ -1,12 +1,6 @@
1
- const BACKUP_TRANSIENT_STATUSES = [
2
- "restoring"
3
- ];
4
- const DOMAIN_AVAILABILITY_TRANSIENT_STATUSES = [
5
- "validating"
6
- ];
7
- const DOMAIN_TRANSIENT_STATUSES = [
8
- "validating"
9
- ];
1
+ const BACKUP_TRANSIENT_STATUSES = ["restoring"];
2
+ const DOMAIN_AVAILABILITY_TRANSIENT_STATUSES = ["validating"];
3
+ const DOMAIN_TRANSIENT_STATUSES = ["validating"];
10
4
  const HOSTING_TRANSIENT_STATUSES = [
11
5
  "delivering",
12
6
  "deleting",
@@ -294,7 +294,10 @@ const unmarshalOffer = (data) => {
294
294
  available: data.available,
295
295
  billingOperationPath: data.billing_operation_path,
296
296
  controlPanelName: data.control_panel_name,
297
- controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
297
+ controlPanels: unmarshalArrayOfObject(
298
+ data.control_panels,
299
+ unmarshalControlPanel
300
+ ),
298
301
  endOfLife: data.end_of_life,
299
302
  id: data.id,
300
303
  name: data.name,
@@ -399,7 +402,10 @@ const unmarshalListControlPanelsResponse = (data) => {
399
402
  );
400
403
  }
401
404
  return {
402
- controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
405
+ controlPanels: unmarshalArrayOfObject(
406
+ data.control_panels,
407
+ unmarshalControlPanel
408
+ ),
403
409
  totalCount: data.total_count
404
410
  };
405
411
  };
@@ -465,7 +471,10 @@ const unmarshalListMailAccountsResponse = (data) => {
465
471
  );
466
472
  }
467
473
  return {
468
- mailAccounts: unmarshalArrayOfObject(data.mail_accounts, unmarshalMailAccount),
474
+ mailAccounts: unmarshalArrayOfObject(
475
+ data.mail_accounts,
476
+ unmarshalMailAccount
477
+ ),
469
478
  totalCount: data.total_count
470
479
  };
471
480
  };
@@ -500,7 +509,10 @@ const unmarshalListRecentProgressesResponse = (data) => {
500
509
  );
501
510
  }
502
511
  return {
503
- progresses: unmarshalArrayOfObject(data.progresses, unmarshalProgressSummary)
512
+ progresses: unmarshalArrayOfObject(
513
+ data.progresses,
514
+ unmarshalProgressSummary
515
+ )
504
516
  };
505
517
  };
506
518
  const unmarshalListWebsitesResponse = (data) => {
@@ -521,7 +533,10 @@ const unmarshalProgress = (data) => {
521
533
  );
522
534
  }
523
535
  return {
524
- backupItemGroups: unmarshalArrayOfObject(data.backup_item_groups, unmarshalBackupItemGroup),
536
+ backupItemGroups: unmarshalArrayOfObject(
537
+ data.backup_item_groups,
538
+ unmarshalBackupItemGroup
539
+ ),
525
540
  id: data.id,
526
541
  percentage: data.percentage,
527
542
  status: data.status
@@ -593,7 +608,10 @@ const unmarshalSearchDomainsResponse = (data) => {
593
608
  );
594
609
  }
595
610
  return {
596
- domainsAvailable: unmarshalArrayOfObject(data.domains_available, unmarshalDomainAvailability)
611
+ domainsAvailable: unmarshalArrayOfObject(
612
+ data.domains_available,
613
+ unmarshalDomainAvailability
614
+ )
597
615
  };
598
616
  };
599
617
  const unmarshalSession = (data) => {
@@ -626,10 +644,7 @@ const marshalDatabaseApiCreateDatabaseRequest = (request, defaults) => ({
626
644
  param: "new_user",
627
645
  value: request.newUser !== void 0 ? marshalCreateDatabaseRequestUser(request.newUser) : void 0
628
646
  },
629
- {
630
- param: "existing_username",
631
- value: request.existingUsername
632
- }
647
+ { param: "existing_username", value: request.existingUsername }
633
648
  ])
634
649
  });
635
650
  const marshalDatabaseApiCreateDatabaseUserRequest = (request, defaults) => ({
@@ -655,7 +670,9 @@ const marshalSyncDomainDnsRecordsRequestRecord = (request, defaults) => ({
655
670
  });
656
671
  const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
657
672
  auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
658
- custom_records: request.customRecords !== void 0 ? request.customRecords.map((elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)) : void 0,
673
+ custom_records: request.customRecords !== void 0 ? request.customRecords.map(
674
+ (elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)
675
+ ) : void 0,
659
676
  update_all_records: request.updateAllRecords,
660
677
  update_mail_records: request.updateMailRecords,
661
678
  update_nameservers: request.updateNameservers,
@@ -689,11 +706,15 @@ const marshalOfferOptionRequest = (request, defaults) => ({
689
706
  const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
690
707
  auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
691
708
  domain: request.domain,
692
- domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(request.domainConfiguration) : void 0,
709
+ domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(
710
+ request.domainConfiguration
711
+ ) : void 0,
693
712
  email: request.email,
694
713
  language: request.language,
695
714
  offer_id: request.offerId,
696
- offer_options: request.offerOptions !== void 0 ? request.offerOptions.map((elt) => marshalOfferOptionRequest(elt)) : void 0,
715
+ offer_options: request.offerOptions !== void 0 ? request.offerOptions.map(
716
+ (elt) => marshalOfferOptionRequest(elt)
717
+ ) : void 0,
697
718
  project_id: request.projectId ?? defaults.defaultProjectId,
698
719
  skip_welcome_email: request.skipWelcomeEmail,
699
720
  subdomain: request.subdomain,
@@ -709,7 +730,9 @@ const marshalHostingApiRemoveCustomDomainRequest = (request, defaults) => ({
709
730
  const marshalHostingApiUpdateHostingRequest = (request, defaults) => ({
710
731
  email: request.email,
711
732
  offer_id: request.offerId,
712
- offer_options: request.offerOptions !== void 0 ? request.offerOptions.map((elt) => marshalOfferOptionRequest(elt)) : void 0,
733
+ offer_options: request.offerOptions !== void 0 ? request.offerOptions.map(
734
+ (elt) => marshalOfferOptionRequest(elt)
735
+ ) : void 0,
713
736
  protected: request.protected,
714
737
  tags: request.tags
715
738
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-webhosting",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Scaleway SDK webhosting",
5
5
  "license": "Apache-2.0",
6
6
  "files": [