@scaleway/sdk-webhosting 1.1.3 → 1.3.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.
@@ -2,4 +2,4 @@
2
2
  * This file is automatically generated
3
3
  * PLEASE DO NOT EDIT HERE
4
4
  */
5
- export * as Webhostingv1 from './v1/index.gen';
5
+ export * as Webhostingv1 from './v1/index.gen.js';
@@ -6,6 +6,140 @@ 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
+ /**
117
+ * Retrieve detailed information about a specific progress by its ID.. Retrieve detailed information about a specific progress by its ID.
118
+ *
119
+ * @param request - The request {@link BackupApiGetProgressRequest}
120
+ * @returns A Promise of Progress
121
+ */
122
+ getProgress = (request) => this.client.fetch(
123
+ {
124
+ method: "GET",
125
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/progresses/${sdkClient.validatePathParam("progressId", request.progressId)}`
126
+ },
127
+ marshalling_gen.unmarshalProgress
128
+ );
129
+ /**
130
+ * List recent progresses associated with a specific backup, grouped by type.. List recent progresses associated with a specific backup, grouped by type.
131
+ *
132
+ * @param request - The request {@link BackupApiListRecentProgressesRequest}
133
+ * @returns A Promise of ListRecentProgressesResponse
134
+ */
135
+ listRecentProgresses = (request) => this.client.fetch(
136
+ {
137
+ method: "GET",
138
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/progresses`
139
+ },
140
+ marshalling_gen.unmarshalListRecentProgressesResponse
141
+ );
142
+ }
9
143
  class ControlPanelAPI extends sdkClient.API {
10
144
  /**
11
145
  * Locality of this API.
@@ -265,6 +399,7 @@ class DnsAPI extends sdkClient.API {
265
399
  /**
266
400
  * Check whether you own this domain or not.. Check whether you own this domain or not.
267
401
  *
402
+ * @deprecated
268
403
  * @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
269
404
  * @returns A Promise of CheckUserOwnsDomainResponse
270
405
  */
@@ -429,6 +564,7 @@ class HostingAPI extends sdkClient.API {
429
564
  ],
430
565
  ["project_id", request.projectId],
431
566
  ["statuses", request.statuses],
567
+ ["subdomain", request.subdomain],
432
568
  ["tags", request.tags]
433
569
  )
434
570
  },
@@ -542,6 +678,96 @@ class HostingAPI extends sdkClient.API {
542
678
  },
543
679
  marshalling_gen.unmarshalResourceSummary
544
680
  );
681
+ /**
682
+ * Attach a custom domain to a webhosting.
683
+ *
684
+ * @param request - The request {@link HostingApiAddCustomDomainRequest}
685
+ * @returns A Promise of HostingSummary
686
+ */
687
+ addCustomDomain = (request) => this.client.fetch(
688
+ {
689
+ body: JSON.stringify(
690
+ marshalling_gen.marshalHostingApiAddCustomDomainRequest(
691
+ request,
692
+ this.client.settings
693
+ )
694
+ ),
695
+ headers: jsonContentHeaders,
696
+ method: "POST",
697
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/add-custom-domain`
698
+ },
699
+ marshalling_gen.unmarshalHostingSummary
700
+ );
701
+ /**
702
+ * Detach a custom domain from a webhosting.
703
+ *
704
+ * @param request - The request {@link HostingApiRemoveCustomDomainRequest}
705
+ * @returns A Promise of HostingSummary
706
+ */
707
+ removeCustomDomain = (request) => this.client.fetch(
708
+ {
709
+ body: JSON.stringify(
710
+ marshalling_gen.marshalHostingApiRemoveCustomDomainRequest(
711
+ request,
712
+ this.client.settings
713
+ )
714
+ ),
715
+ headers: jsonContentHeaders,
716
+ method: "POST",
717
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/remove-custom-domain`
718
+ },
719
+ marshalling_gen.unmarshalHostingSummary
720
+ );
721
+ }
722
+ class FreeDomainAPI extends sdkClient.API {
723
+ /**
724
+ * Locality of this API.
725
+ * type ∈ {'zone','region','global','unspecified'}
726
+ */
727
+ static LOCALITY = sdkClient.toApiLocality({
728
+ regions: ["fr-par", "nl-ams", "pl-waw"]
729
+ });
730
+ /**
731
+ * Check whether a given slug and free domain combination is available.. Check whether a given slug and free domain combination is available.
732
+ *
733
+ * @param request - The request {@link FreeDomainApiCheckFreeDomainAvailabilityRequest}
734
+ * @returns A Promise of CheckFreeDomainAvailabilityResponse
735
+ */
736
+ checkFreeDomainAvailability = (request) => this.client.fetch(
737
+ {
738
+ body: JSON.stringify(
739
+ marshalling_gen.marshalFreeDomainApiCheckFreeDomainAvailabilityRequest(
740
+ request,
741
+ this.client.settings
742
+ )
743
+ ),
744
+ headers: jsonContentHeaders,
745
+ method: "POST",
746
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/check-availability`
747
+ },
748
+ marshalling_gen.unmarshalCheckFreeDomainAvailabilityResponse
749
+ );
750
+ pageOfListFreeRootDomains = (request = {}) => this.client.fetch(
751
+ {
752
+ method: "GET",
753
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/root-domains`,
754
+ urlParams: sdkClient.urlParams(
755
+ ["page", request.page],
756
+ [
757
+ "page_size",
758
+ request.pageSize ?? this.client.settings.defaultPageSize
759
+ ]
760
+ )
761
+ },
762
+ marshalling_gen.unmarshalListFreeRootDomainsResponse
763
+ );
764
+ /**
765
+ * Retrieve the list of free root domains available for a Web Hosting.. Retrieve the list of free root domains available for a Web Hosting.
766
+ *
767
+ * @param request - The request {@link FreeDomainApiListFreeRootDomainsRequest}
768
+ * @returns A Promise of ListFreeRootDomainsResponse
769
+ */
770
+ listFreeRootDomains = (request = {}) => sdkClient.enrichForPagination("rootDomains", this.pageOfListFreeRootDomains, request);
545
771
  }
546
772
  class FtpAccountAPI extends sdkClient.API {
547
773
  /**
@@ -745,9 +971,11 @@ class WebsiteAPI extends sdkClient.API {
745
971
  */
746
972
  listWebsites = (request) => sdkClient.enrichForPagination("websites", this.pageOfListWebsites, request);
747
973
  }
974
+ exports.BackupAPI = BackupAPI;
748
975
  exports.ControlPanelAPI = ControlPanelAPI;
749
976
  exports.DatabaseAPI = DatabaseAPI;
750
977
  exports.DnsAPI = DnsAPI;
978
+ exports.FreeDomainAPI = FreeDomainAPI;
751
979
  exports.FtpAccountAPI = FtpAccountAPI;
752
980
  exports.HostingAPI = HostingAPI;
753
981
  exports.MailAccountAPI = MailAccountAPI;
@@ -1,6 +1,79 @@
1
1
  import { API as ParentAPI } from '@scaleway/sdk-client';
2
2
  import type { ApiLocality, 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, BackupApiGetProgressRequest, BackupApiListBackupItemsRequest, BackupApiListBackupsRequest, BackupApiListRecentProgressesRequest, BackupApiRestoreBackupItemsRequest, BackupApiRestoreBackupRequest, CheckFreeDomainAvailabilityResponse, CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FreeDomainApiListFreeRootDomainsRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFreeRootDomainsResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListRecentProgressesResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, Progress, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, WebsiteApiListWebsitesRequest } from './types.gen.js';
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
+ /**
63
+ * Retrieve detailed information about a specific progress by its ID.. Retrieve detailed information about a specific progress by its ID.
64
+ *
65
+ * @param request - The request {@link BackupApiGetProgressRequest}
66
+ * @returns A Promise of Progress
67
+ */
68
+ getProgress: (request: Readonly<BackupApiGetProgressRequest>) => Promise<Progress>;
69
+ /**
70
+ * List recent progresses associated with a specific backup, grouped by type.. List recent progresses associated with a specific backup, grouped by type.
71
+ *
72
+ * @param request - The request {@link BackupApiListRecentProgressesRequest}
73
+ * @returns A Promise of ListRecentProgressesResponse
74
+ */
75
+ listRecentProgresses: (request: Readonly<BackupApiListRecentProgressesRequest>) => Promise<ListRecentProgressesResponse>;
76
+ }
4
77
  /**
5
78
  * Web Hosting Control Panel API.
6
79
 
@@ -20,8 +93,8 @@ export declare class ControlPanelAPI extends ParentAPI {
20
93
  * @returns A Promise of ListControlPanelsResponse
21
94
  */
22
95
  listControlPanels: (request?: Readonly<ControlPanelApiListControlPanelsRequest>) => Promise<ListControlPanelsResponse> & {
23
- all: () => Promise<import("./types.gen").ControlPanel[]>;
24
- [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ControlPanel[], void, void>;
96
+ all: () => Promise<import("./types.gen.js").ControlPanel[]>;
97
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").ControlPanel[], void, void>;
25
98
  };
26
99
  }
27
100
  /**
@@ -142,6 +215,7 @@ export declare class DnsAPI extends ParentAPI {
142
215
  /**
143
216
  * Check whether you own this domain or not.. Check whether you own this domain or not.
144
217
  *
218
+ * @deprecated
145
219
  * @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
146
220
  * @returns A Promise of CheckUserOwnsDomainResponse
147
221
  */
@@ -195,8 +269,8 @@ export declare class OfferAPI extends ParentAPI {
195
269
  * @returns A Promise of ListOffersResponse
196
270
  */
197
271
  listOffers: (request?: Readonly<OfferApiListOffersRequest>) => Promise<ListOffersResponse> & {
198
- all: () => Promise<import("./types.gen").Offer[]>;
199
- [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Offer[], void, void>;
272
+ all: () => Promise<import("./types.gen.js").Offer[]>;
273
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").Offer[], void, void>;
200
274
  };
201
275
  }
202
276
  /**
@@ -225,8 +299,8 @@ export declare class HostingAPI extends ParentAPI {
225
299
  * @returns A Promise of ListHostingsResponse
226
300
  */
227
301
  listHostings: (request?: Readonly<HostingApiListHostingsRequest>) => Promise<ListHostingsResponse> & {
228
- all: () => Promise<import("./types.gen").HostingSummary[]>;
229
- [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").HostingSummary[], void, void>;
302
+ all: () => Promise<HostingSummary[]>;
303
+ [Symbol.asyncIterator]: () => AsyncGenerator<HostingSummary[], void, void>;
230
304
  };
231
305
  /**
232
306
  * Get a Web Hosting plan. Get the details of one of your existing Web Hosting plans, specified by its `hosting_id`.
@@ -278,6 +352,50 @@ export declare class HostingAPI extends ParentAPI {
278
352
  * @returns A Promise of ResourceSummary
279
353
  */
280
354
  getResourceSummary: (request: Readonly<HostingApiGetResourceSummaryRequest>) => Promise<ResourceSummary>;
355
+ /**
356
+ * Attach a custom domain to a webhosting.
357
+ *
358
+ * @param request - The request {@link HostingApiAddCustomDomainRequest}
359
+ * @returns A Promise of HostingSummary
360
+ */
361
+ addCustomDomain: (request: Readonly<HostingApiAddCustomDomainRequest>) => Promise<HostingSummary>;
362
+ /**
363
+ * Detach a custom domain from a webhosting.
364
+ *
365
+ * @param request - The request {@link HostingApiRemoveCustomDomainRequest}
366
+ * @returns A Promise of HostingSummary
367
+ */
368
+ removeCustomDomain: (request: Readonly<HostingApiRemoveCustomDomainRequest>) => Promise<HostingSummary>;
369
+ }
370
+ /**
371
+ * Web Hosting free domain API.
372
+
373
+ This API allows you to list and check a free domain's validity.
374
+ */
375
+ export declare class FreeDomainAPI extends ParentAPI {
376
+ /**
377
+ * Locality of this API.
378
+ * type ∈ {'zone','region','global','unspecified'}
379
+ */
380
+ static readonly LOCALITY: ApiLocality;
381
+ /**
382
+ * Check whether a given slug and free domain combination is available.. Check whether a given slug and free domain combination is available.
383
+ *
384
+ * @param request - The request {@link FreeDomainApiCheckFreeDomainAvailabilityRequest}
385
+ * @returns A Promise of CheckFreeDomainAvailabilityResponse
386
+ */
387
+ checkFreeDomainAvailability: (request: Readonly<FreeDomainApiCheckFreeDomainAvailabilityRequest>) => Promise<CheckFreeDomainAvailabilityResponse>;
388
+ protected pageOfListFreeRootDomains: (request?: Readonly<FreeDomainApiListFreeRootDomainsRequest>) => Promise<ListFreeRootDomainsResponse>;
389
+ /**
390
+ * Retrieve the list of free root domains available for a Web Hosting.. Retrieve the list of free root domains available for a Web Hosting.
391
+ *
392
+ * @param request - The request {@link FreeDomainApiListFreeRootDomainsRequest}
393
+ * @returns A Promise of ListFreeRootDomainsResponse
394
+ */
395
+ listFreeRootDomains: (request?: Readonly<FreeDomainApiListFreeRootDomainsRequest>) => Promise<ListFreeRootDomainsResponse> & {
396
+ all: () => Promise<string[]>;
397
+ [Symbol.asyncIterator]: () => AsyncGenerator<string[], void, void>;
398
+ };
281
399
  }
282
400
  /**
283
401
  * Web Hosting FTP Account API.
@@ -380,7 +498,7 @@ export declare class WebsiteAPI extends ParentAPI {
380
498
  * @returns A Promise of ListWebsitesResponse
381
499
  */
382
500
  listWebsites: (request: Readonly<WebsiteApiListWebsitesRequest>) => Promise<ListWebsitesResponse> & {
383
- all: () => Promise<import("./types.gen").Website[]>;
384
- [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Website[], void, void>;
501
+ all: () => Promise<import("./types.gen.js").Website[]>;
502
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").Website[], void, void>;
385
503
  };
386
504
  }