@scaleway/sdk-webhosting 1.1.2 → 1.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.
@@ -6,13 +6,122 @@ const marshalling_gen = require("./marshalling.gen.cjs");
6
6
  const jsonContentHeaders = {
7
7
  "Content-Type": "application/json; charset=utf-8"
8
8
  };
9
+ class BackupAPI extends sdkClient.API {
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static LOCALITY = sdkClient.toApiLocality({
15
+ regions: ["fr-par", "nl-ams", "pl-waw"]
16
+ });
17
+ pageOfListBackups = (request) => this.client.fetch(
18
+ {
19
+ method: "GET",
20
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/backups`,
21
+ urlParams: sdkClient.urlParams(
22
+ ["order_by", request.orderBy],
23
+ ["page", request.page],
24
+ [
25
+ "page_size",
26
+ request.pageSize ?? this.client.settings.defaultPageSize
27
+ ]
28
+ )
29
+ },
30
+ marshalling_gen.unmarshalListBackupsResponse
31
+ );
32
+ /**
33
+ * List all available backups for a hosting account.. List all available backups for a hosting account.
34
+ *
35
+ * @param request - The request {@link BackupApiListBackupsRequest}
36
+ * @returns A Promise of ListBackupsResponse
37
+ */
38
+ listBackups = (request) => sdkClient.enrichForPagination("backups", this.pageOfListBackups, request);
39
+ /**
40
+ * Get info about a backup specified by the backup ID.. Get info about a backup specified by the backup ID.
41
+ *
42
+ * @param request - The request {@link BackupApiGetBackupRequest}
43
+ * @returns A Promise of Backup
44
+ */
45
+ getBackup = (request) => this.client.fetch(
46
+ {
47
+ method: "GET",
48
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/backups/${sdkClient.validatePathParam("backupId", request.backupId)}`
49
+ },
50
+ marshalling_gen.unmarshalBackup
51
+ );
52
+ /**
53
+ * Waits for {@link Backup} to be in a final state.
54
+ *
55
+ * @param request - The request {@link BackupApiGetBackupRequest}
56
+ * @param options - The waiting options
57
+ * @returns A Promise of Backup
58
+ */
59
+ waitForBackup = (request, options) => sdkClient.waitForResource(
60
+ options?.stop ?? ((res) => Promise.resolve(
61
+ !content_gen.BACKUP_TRANSIENT_STATUSES.includes(res.status)
62
+ )),
63
+ this.getBackup,
64
+ request,
65
+ options
66
+ );
67
+ /**
68
+ * Restore an entire backup to your hosting environment.. Restore an entire backup to your hosting environment.
69
+ *
70
+ * @param request - The request {@link BackupApiRestoreBackupRequest}
71
+ * @returns A Promise of RestoreBackupResponse
72
+ */
73
+ restoreBackup = (request) => this.client.fetch(
74
+ {
75
+ body: "{}",
76
+ headers: jsonContentHeaders,
77
+ method: "POST",
78
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/backups/${sdkClient.validatePathParam("backupId", request.backupId)}/restore`
79
+ },
80
+ marshalling_gen.unmarshalRestoreBackupResponse
81
+ );
82
+ /**
83
+ * List items within a specific backup, grouped by type.. List items within a specific backup, grouped by type.
84
+ *
85
+ * @param request - The request {@link BackupApiListBackupItemsRequest}
86
+ * @returns A Promise of ListBackupItemsResponse
87
+ */
88
+ listBackupItems = (request) => this.client.fetch(
89
+ {
90
+ method: "GET",
91
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/backup-items`,
92
+ urlParams: sdkClient.urlParams(["backup_id", request.backupId])
93
+ },
94
+ marshalling_gen.unmarshalListBackupItemsResponse
95
+ );
96
+ /**
97
+ * Restore specific items from a backup (e.g., a database or mailbox).. Restore specific items from a backup (e.g., a database or mailbox).
98
+ *
99
+ * @param request - The request {@link BackupApiRestoreBackupItemsRequest}
100
+ * @returns A Promise of RestoreBackupItemsResponse
101
+ */
102
+ restoreBackupItems = (request) => this.client.fetch(
103
+ {
104
+ body: JSON.stringify(
105
+ marshalling_gen.marshalBackupApiRestoreBackupItemsRequest(
106
+ request,
107
+ this.client.settings
108
+ )
109
+ ),
110
+ headers: jsonContentHeaders,
111
+ method: "POST",
112
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/restore-backup-items`
113
+ },
114
+ marshalling_gen.unmarshalRestoreBackupItemsResponse
115
+ );
116
+ }
9
117
  class ControlPanelAPI extends sdkClient.API {
10
- /** Lists the available regions of the API. */
11
- static LOCALITIES = [
12
- "fr-par",
13
- "nl-ams",
14
- "pl-waw"
15
- ];
118
+ /**
119
+ * Locality of this API.
120
+ * type ∈ {'zone','region','global','unspecified'}
121
+ */
122
+ static LOCALITY = sdkClient.toApiLocality({
123
+ regions: ["fr-par", "nl-ams", "pl-waw"]
124
+ });
16
125
  pageOfListControlPanels = (request = {}) => this.client.fetch(
17
126
  {
18
127
  method: "GET",
@@ -36,12 +145,13 @@ class ControlPanelAPI extends sdkClient.API {
36
145
  listControlPanels = (request = {}) => sdkClient.enrichForPagination("controlPanels", this.pageOfListControlPanels, request);
37
146
  }
38
147
  class DatabaseAPI extends sdkClient.API {
39
- /** Lists the available regions of the API. */
40
- static LOCALITIES = [
41
- "fr-par",
42
- "nl-ams",
43
- "pl-waw"
44
- ];
148
+ /**
149
+ * Locality of this API.
150
+ * type ∈ {'zone','region','global','unspecified'}
151
+ */
152
+ static LOCALITY = sdkClient.toApiLocality({
153
+ regions: ["fr-par", "nl-ams", "pl-waw"]
154
+ });
45
155
  /**
46
156
  * "Create a new database within your hosting plan".
47
157
  *
@@ -240,12 +350,13 @@ class DatabaseAPI extends sdkClient.API {
240
350
  );
241
351
  }
242
352
  class DnsAPI extends sdkClient.API {
243
- /** Lists the available regions of the API. */
244
- static LOCALITIES = [
245
- "fr-par",
246
- "nl-ams",
247
- "pl-waw"
248
- ];
353
+ /**
354
+ * Locality of this API.
355
+ * type ∈ {'zone','region','global','unspecified'}
356
+ */
357
+ static LOCALITY = sdkClient.toApiLocality({
358
+ regions: ["fr-par", "nl-ams", "pl-waw"]
359
+ });
249
360
  /**
250
361
  * Get DNS records. Get the set of DNS records of a specified domain associated with a Web Hosting plan's domain.
251
362
  *
@@ -262,6 +373,7 @@ class DnsAPI extends sdkClient.API {
262
373
  /**
263
374
  * Check whether you own this domain or not.. Check whether you own this domain or not.
264
375
  *
376
+ * @deprecated
265
377
  * @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
266
378
  * @returns A Promise of CheckUserOwnsDomainResponse
267
379
  */
@@ -353,12 +465,13 @@ class DnsAPI extends sdkClient.API {
353
465
  );
354
466
  }
355
467
  class OfferAPI extends sdkClient.API {
356
- /** Lists the available regions of the API. */
357
- static LOCALITIES = [
358
- "fr-par",
359
- "nl-ams",
360
- "pl-waw"
361
- ];
468
+ /**
469
+ * Locality of this API.
470
+ * type ∈ {'zone','region','global','unspecified'}
471
+ */
472
+ static LOCALITY = sdkClient.toApiLocality({
473
+ regions: ["fr-par", "nl-ams", "pl-waw"]
474
+ });
362
475
  pageOfListOffers = (request = {}) => this.client.fetch(
363
476
  {
364
477
  method: "GET",
@@ -385,12 +498,13 @@ class OfferAPI extends sdkClient.API {
385
498
  listOffers = (request = {}) => sdkClient.enrichForPagination("offers", this.pageOfListOffers, request);
386
499
  }
387
500
  class HostingAPI extends sdkClient.API {
388
- /** Lists the available regions of the API. */
389
- static LOCALITIES = [
390
- "fr-par",
391
- "nl-ams",
392
- "pl-waw"
393
- ];
501
+ /**
502
+ * Locality of this API.
503
+ * type ∈ {'zone','region','global','unspecified'}
504
+ */
505
+ static LOCALITY = sdkClient.toApiLocality({
506
+ regions: ["fr-par", "nl-ams", "pl-waw"]
507
+ });
394
508
  /**
395
509
  * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer type required via the `offer_id` parameter.
396
510
  *
@@ -424,6 +538,7 @@ class HostingAPI extends sdkClient.API {
424
538
  ],
425
539
  ["project_id", request.projectId],
426
540
  ["statuses", request.statuses],
541
+ ["subdomain", request.subdomain],
427
542
  ["tags", request.tags]
428
543
  )
429
544
  },
@@ -537,14 +652,50 @@ class HostingAPI extends sdkClient.API {
537
652
  },
538
653
  marshalling_gen.unmarshalResourceSummary
539
654
  );
655
+ /**
656
+ * Attach a custom domain to a webhosting.
657
+ *
658
+ * @param request - The request {@link HostingApiAddCustomDomainRequest}
659
+ * @returns A Promise of HostingSummary
660
+ */
661
+ addCustomDomain = (request) => this.client.fetch(
662
+ {
663
+ body: JSON.stringify(
664
+ marshalling_gen.marshalHostingApiAddCustomDomainRequest(
665
+ request,
666
+ this.client.settings
667
+ )
668
+ ),
669
+ headers: jsonContentHeaders,
670
+ method: "POST",
671
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/add-custom-domain`
672
+ },
673
+ marshalling_gen.unmarshalHostingSummary
674
+ );
675
+ /**
676
+ * Detach a custom domain from a webhosting.
677
+ *
678
+ * @param request - The request {@link HostingApiRemoveCustomDomainRequest}
679
+ * @returns A Promise of HostingSummary
680
+ */
681
+ removeCustomDomain = (request) => this.client.fetch(
682
+ {
683
+ body: "{}",
684
+ headers: jsonContentHeaders,
685
+ method: "POST",
686
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/remove-custom-domain`
687
+ },
688
+ marshalling_gen.unmarshalHostingSummary
689
+ );
540
690
  }
541
691
  class FtpAccountAPI extends sdkClient.API {
542
- /** Lists the available regions of the API. */
543
- static LOCALITIES = [
544
- "fr-par",
545
- "nl-ams",
546
- "pl-waw"
547
- ];
692
+ /**
693
+ * Locality of this API.
694
+ * type ∈ {'zone','region','global','unspecified'}
695
+ */
696
+ static LOCALITY = sdkClient.toApiLocality({
697
+ regions: ["fr-par", "nl-ams", "pl-waw"]
698
+ });
548
699
  /**
549
700
  * Create a new FTP account within your hosting plan.. Create a new FTP account within your hosting plan.
550
701
  *
@@ -617,12 +768,13 @@ class FtpAccountAPI extends sdkClient.API {
617
768
  );
618
769
  }
619
770
  class MailAccountAPI extends sdkClient.API {
620
- /** Lists the available regions of the API. */
621
- static LOCALITIES = [
622
- "fr-par",
623
- "nl-ams",
624
- "pl-waw"
625
- ];
771
+ /**
772
+ * Locality of this API.
773
+ * type ∈ {'zone','region','global','unspecified'}
774
+ */
775
+ static LOCALITY = sdkClient.toApiLocality({
776
+ regions: ["fr-par", "nl-ams", "pl-waw"]
777
+ });
626
778
  /**
627
779
  * Create a new mail account within your hosting plan.. Create a new mail account within your hosting plan.
628
780
  *
@@ -708,12 +860,13 @@ class MailAccountAPI extends sdkClient.API {
708
860
  );
709
861
  }
710
862
  class WebsiteAPI extends sdkClient.API {
711
- /** Lists the available regions of the API. */
712
- static LOCALITIES = [
713
- "fr-par",
714
- "nl-ams",
715
- "pl-waw"
716
- ];
863
+ /**
864
+ * Locality of this API.
865
+ * type ∈ {'zone','region','global','unspecified'}
866
+ */
867
+ static LOCALITY = sdkClient.toApiLocality({
868
+ regions: ["fr-par", "nl-ams", "pl-waw"]
869
+ });
717
870
  pageOfListWebsites = (request) => this.client.fetch(
718
871
  {
719
872
  method: "GET",
@@ -737,6 +890,7 @@ class WebsiteAPI extends sdkClient.API {
737
890
  */
738
891
  listWebsites = (request) => sdkClient.enrichForPagination("websites", this.pageOfListWebsites, request);
739
892
  }
893
+ exports.BackupAPI = BackupAPI;
740
894
  exports.ControlPanelAPI = ControlPanelAPI;
741
895
  exports.DatabaseAPI = DatabaseAPI;
742
896
  exports.DnsAPI = DnsAPI;
@@ -1,14 +1,76 @@
1
+ import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
1
2
  import { API as ParentAPI } from '@scaleway/sdk-client';
2
- import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client';
3
- import type { CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, ResourceSummary, SearchDomainsResponse, Session, WebsiteApiListWebsitesRequest } from './types.gen';
3
+ import type { Backup, BackupApiGetBackupRequest, BackupApiListBackupItemsRequest, BackupApiListBackupsRequest, BackupApiRestoreBackupItemsRequest, BackupApiRestoreBackupRequest, CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabasesRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesResponse, ListDatabaseUsersResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, WebsiteApiListWebsitesRequest } from './types.gen';
4
+ /**
5
+ * Web Hosting backup API.
6
+
7
+ This API allows you to list and restore backups for your cPanel and WordPress Web Hosting service.
8
+ */
9
+ export declare class BackupAPI extends ParentAPI {
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static readonly LOCALITY: ApiLocality;
15
+ protected pageOfListBackups: (request: Readonly<BackupApiListBackupsRequest>) => Promise<ListBackupsResponse>;
16
+ /**
17
+ * List all available backups for a hosting account.. List all available backups for a hosting account.
18
+ *
19
+ * @param request - The request {@link BackupApiListBackupsRequest}
20
+ * @returns A Promise of ListBackupsResponse
21
+ */
22
+ listBackups: (request: Readonly<BackupApiListBackupsRequest>) => Promise<ListBackupsResponse> & {
23
+ all: () => Promise<Backup[]>;
24
+ [Symbol.asyncIterator]: () => AsyncGenerator<Backup[], void, void>;
25
+ };
26
+ /**
27
+ * Get info about a backup specified by the backup ID.. Get info about a backup specified by the backup ID.
28
+ *
29
+ * @param request - The request {@link BackupApiGetBackupRequest}
30
+ * @returns A Promise of Backup
31
+ */
32
+ getBackup: (request: Readonly<BackupApiGetBackupRequest>) => Promise<Backup>;
33
+ /**
34
+ * Waits for {@link Backup} to be in a final state.
35
+ *
36
+ * @param request - The request {@link BackupApiGetBackupRequest}
37
+ * @param options - The waiting options
38
+ * @returns A Promise of Backup
39
+ */
40
+ waitForBackup: (request: Readonly<BackupApiGetBackupRequest>, options?: Readonly<WaitForOptions<Backup>>) => Promise<Backup>;
41
+ /**
42
+ * Restore an entire backup to your hosting environment.. Restore an entire backup to your hosting environment.
43
+ *
44
+ * @param request - The request {@link BackupApiRestoreBackupRequest}
45
+ * @returns A Promise of RestoreBackupResponse
46
+ */
47
+ restoreBackup: (request: Readonly<BackupApiRestoreBackupRequest>) => Promise<RestoreBackupResponse>;
48
+ /**
49
+ * List items within a specific backup, grouped by type.. List items within a specific backup, grouped by type.
50
+ *
51
+ * @param request - The request {@link BackupApiListBackupItemsRequest}
52
+ * @returns A Promise of ListBackupItemsResponse
53
+ */
54
+ listBackupItems: (request: Readonly<BackupApiListBackupItemsRequest>) => Promise<ListBackupItemsResponse>;
55
+ /**
56
+ * Restore specific items from a backup (e.g., a database or mailbox).. Restore specific items from a backup (e.g., a database or mailbox).
57
+ *
58
+ * @param request - The request {@link BackupApiRestoreBackupItemsRequest}
59
+ * @returns A Promise of RestoreBackupItemsResponse
60
+ */
61
+ restoreBackupItems: (request: Readonly<BackupApiRestoreBackupItemsRequest>) => Promise<RestoreBackupItemsResponse>;
62
+ }
4
63
  /**
5
64
  * Web Hosting Control Panel API.
6
65
 
7
66
  This API allows you to manage your Web Hosting services.
8
67
  */
9
68
  export declare class ControlPanelAPI extends ParentAPI {
10
- /** Lists the available regions of the API. */
11
- static readonly LOCALITIES: ScwRegion[];
69
+ /**
70
+ * Locality of this API.
71
+ * type ∈ {'zone','region','global','unspecified'}
72
+ */
73
+ static readonly LOCALITY: ApiLocality;
12
74
  protected pageOfListControlPanels: (request?: Readonly<ControlPanelApiListControlPanelsRequest>) => Promise<ListControlPanelsResponse>;
13
75
  /**
14
76
  * "List the control panels type: cpanel or plesk.".
@@ -27,8 +89,11 @@ export declare class ControlPanelAPI extends ParentAPI {
27
89
  This API allows you to manage your databases and database users for your Web Hosting services.
28
90
  */
29
91
  export declare class DatabaseAPI extends ParentAPI {
30
- /** Lists the available regions of the API. */
31
- static readonly LOCALITIES: ScwRegion[];
92
+ /**
93
+ * Locality of this API.
94
+ * type ∈ {'zone','region','global','unspecified'}
95
+ */
96
+ static readonly LOCALITY: ApiLocality;
32
97
  /**
33
98
  * "Create a new database within your hosting plan".
34
99
  *
@@ -121,8 +186,11 @@ export declare class DatabaseAPI extends ParentAPI {
121
186
  This API allows you to manage your Web Hosting services.
122
187
  */
123
188
  export declare class DnsAPI extends ParentAPI {
124
- /** Lists the available regions of the API. */
125
- static readonly LOCALITIES: ScwRegion[];
189
+ /**
190
+ * Locality of this API.
191
+ * type ∈ {'zone','region','global','unspecified'}
192
+ */
193
+ static readonly LOCALITY: ApiLocality;
126
194
  /**
127
195
  * Get DNS records. Get the set of DNS records of a specified domain associated with a Web Hosting plan's domain.
128
196
  *
@@ -133,6 +201,7 @@ export declare class DnsAPI extends ParentAPI {
133
201
  /**
134
202
  * Check whether you own this domain or not.. Check whether you own this domain or not.
135
203
  *
204
+ * @deprecated
136
205
  * @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
137
206
  * @returns A Promise of CheckUserOwnsDomainResponse
138
207
  */
@@ -173,8 +242,11 @@ export declare class DnsAPI extends ParentAPI {
173
242
  This API allows you to manage your offer for your Web Hosting services.
174
243
  */
175
244
  export declare class OfferAPI extends ParentAPI {
176
- /** Lists the available regions of the API. */
177
- static readonly LOCALITIES: ScwRegion[];
245
+ /**
246
+ * Locality of this API.
247
+ * type ∈ {'zone','region','global','unspecified'}
248
+ */
249
+ static readonly LOCALITY: ApiLocality;
178
250
  protected pageOfListOffers: (request?: Readonly<OfferApiListOffersRequest>) => Promise<ListOffersResponse>;
179
251
  /**
180
252
  * List all available hosting offers along with their specific options.. List all available hosting offers along with their specific options.
@@ -193,8 +265,11 @@ export declare class OfferAPI extends ParentAPI {
193
265
  This API allows you to manage your Web Hosting services.
194
266
  */
195
267
  export declare class HostingAPI extends ParentAPI {
196
- /** Lists the available regions of the API. */
197
- static readonly LOCALITIES: ScwRegion[];
268
+ /**
269
+ * Locality of this API.
270
+ * type ∈ {'zone','region','global','unspecified'}
271
+ */
272
+ static readonly LOCALITY: ApiLocality;
198
273
  /**
199
274
  * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer type required via the `offer_id` parameter.
200
275
  *
@@ -210,8 +285,8 @@ export declare class HostingAPI extends ParentAPI {
210
285
  * @returns A Promise of ListHostingsResponse
211
286
  */
212
287
  listHostings: (request?: Readonly<HostingApiListHostingsRequest>) => Promise<ListHostingsResponse> & {
213
- all: () => Promise<import("./types.gen").HostingSummary[]>;
214
- [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").HostingSummary[], void, void>;
288
+ all: () => Promise<HostingSummary[]>;
289
+ [Symbol.asyncIterator]: () => AsyncGenerator<HostingSummary[], void, void>;
215
290
  };
216
291
  /**
217
292
  * Get a Web Hosting plan. Get the details of one of your existing Web Hosting plans, specified by its `hosting_id`.
@@ -263,6 +338,20 @@ export declare class HostingAPI extends ParentAPI {
263
338
  * @returns A Promise of ResourceSummary
264
339
  */
265
340
  getResourceSummary: (request: Readonly<HostingApiGetResourceSummaryRequest>) => Promise<ResourceSummary>;
341
+ /**
342
+ * Attach a custom domain to a webhosting.
343
+ *
344
+ * @param request - The request {@link HostingApiAddCustomDomainRequest}
345
+ * @returns A Promise of HostingSummary
346
+ */
347
+ addCustomDomain: (request: Readonly<HostingApiAddCustomDomainRequest>) => Promise<HostingSummary>;
348
+ /**
349
+ * Detach a custom domain from a webhosting.
350
+ *
351
+ * @param request - The request {@link HostingApiRemoveCustomDomainRequest}
352
+ * @returns A Promise of HostingSummary
353
+ */
354
+ removeCustomDomain: (request: Readonly<HostingApiRemoveCustomDomainRequest>) => Promise<HostingSummary>;
266
355
  }
267
356
  /**
268
357
  * Web Hosting FTP Account API.
@@ -270,8 +359,11 @@ export declare class HostingAPI extends ParentAPI {
270
359
  This API allows you to manage your FTP accounts for your Web Hosting services.
271
360
  */
272
361
  export declare class FtpAccountAPI extends ParentAPI {
273
- /** Lists the available regions of the API. */
274
- static readonly LOCALITIES: ScwRegion[];
362
+ /**
363
+ * Locality of this API.
364
+ * type ∈ {'zone','region','global','unspecified'}
365
+ */
366
+ static readonly LOCALITY: ApiLocality;
275
367
  /**
276
368
  * Create a new FTP account within your hosting plan.. Create a new FTP account within your hosting plan.
277
369
  *
@@ -305,8 +397,11 @@ export declare class FtpAccountAPI extends ParentAPI {
305
397
  This API allows you to manage your mail accounts for your Web Hosting services.
306
398
  */
307
399
  export declare class MailAccountAPI extends ParentAPI {
308
- /** Lists the available regions of the API. */
309
- static readonly LOCALITIES: ScwRegion[];
400
+ /**
401
+ * Locality of this API.
402
+ * type ∈ {'zone','region','global','unspecified'}
403
+ */
404
+ static readonly LOCALITY: ApiLocality;
310
405
  /**
311
406
  * Create a new mail account within your hosting plan.. Create a new mail account within your hosting plan.
312
407
  *
@@ -346,8 +441,11 @@ export declare class MailAccountAPI extends ParentAPI {
346
441
  This API allows you to manage your websites for your Web Hosting services.
347
442
  */
348
443
  export declare class WebsiteAPI extends ParentAPI {
349
- /** Lists the available regions of the API. */
350
- static readonly LOCALITIES: ScwRegion[];
444
+ /**
445
+ * Locality of this API.
446
+ * type ∈ {'zone','region','global','unspecified'}
447
+ */
448
+ static readonly LOCALITY: ApiLocality;
351
449
  protected pageOfListWebsites: (request: Readonly<WebsiteApiListWebsitesRequest>) => Promise<ListWebsitesResponse>;
352
450
  /**
353
451
  * List all websites for a specific hosting.. List all websites for a specific hosting.