@scaleway/sdk-webhosting 1.0.1

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.
@@ -0,0 +1,362 @@
1
+ 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';
4
+ /**
5
+ * Web Hosting Control Panel API.
6
+
7
+ This API allows you to manage your Web Hosting services.
8
+ */
9
+ export declare class ControlPanelAPI extends ParentAPI {
10
+ /** Lists the available regions of the API. */
11
+ static readonly LOCALITIES: ScwRegion[];
12
+ protected pageOfListControlPanels: (request?: Readonly<ControlPanelApiListControlPanelsRequest>) => Promise<ListControlPanelsResponse>;
13
+ /**
14
+ * "List the control panels type: cpanel or plesk.".
15
+ *
16
+ * @param request - The request {@link ControlPanelApiListControlPanelsRequest}
17
+ * @returns A Promise of ListControlPanelsResponse
18
+ */
19
+ listControlPanels: (request?: Readonly<ControlPanelApiListControlPanelsRequest>) => Promise<ListControlPanelsResponse> & {
20
+ all: () => Promise<import("./types.gen").ControlPanel[]>;
21
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ControlPanel[], void, void>;
22
+ };
23
+ }
24
+ /**
25
+ * Web Hosting Database API.
26
+
27
+ This API allows you to manage your databases and database users for your Web Hosting services.
28
+ */
29
+ export declare class DatabaseAPI extends ParentAPI {
30
+ /** Lists the available regions of the API. */
31
+ static readonly LOCALITIES: ScwRegion[];
32
+ /**
33
+ * "Create a new database within your hosting plan".
34
+ *
35
+ * @param request - The request {@link DatabaseApiCreateDatabaseRequest}
36
+ * @returns A Promise of Database
37
+ */
38
+ createDatabase: (request: Readonly<DatabaseApiCreateDatabaseRequest>) => Promise<Database>;
39
+ protected pageOfListDatabases: (request: Readonly<DatabaseApiListDatabasesRequest>) => Promise<ListDatabasesResponse>;
40
+ /**
41
+ * "List all databases within your hosting plan".
42
+ *
43
+ * @param request - The request {@link DatabaseApiListDatabasesRequest}
44
+ * @returns A Promise of ListDatabasesResponse
45
+ */
46
+ listDatabases: (request: Readonly<DatabaseApiListDatabasesRequest>) => Promise<ListDatabasesResponse> & {
47
+ all: () => Promise<Database[]>;
48
+ [Symbol.asyncIterator]: () => AsyncGenerator<Database[], void, void>;
49
+ };
50
+ /**
51
+ * "Get details of a database within your hosting plan".
52
+ *
53
+ * @param request - The request {@link DatabaseApiGetDatabaseRequest}
54
+ * @returns A Promise of Database
55
+ */
56
+ getDatabase: (request: Readonly<DatabaseApiGetDatabaseRequest>) => Promise<Database>;
57
+ /**
58
+ * "Delete a database within your hosting plan".
59
+ *
60
+ * @param request - The request {@link DatabaseApiDeleteDatabaseRequest}
61
+ * @returns A Promise of Database
62
+ */
63
+ deleteDatabase: (request: Readonly<DatabaseApiDeleteDatabaseRequest>) => Promise<Database>;
64
+ /**
65
+ * "Create a new database user".
66
+ *
67
+ * @param request - The request {@link DatabaseApiCreateDatabaseUserRequest}
68
+ * @returns A Promise of DatabaseUser
69
+ */
70
+ createDatabaseUser: (request: Readonly<DatabaseApiCreateDatabaseUserRequest>) => Promise<DatabaseUser>;
71
+ protected pageOfListDatabaseUsers: (request: Readonly<DatabaseApiListDatabaseUsersRequest>) => Promise<ListDatabaseUsersResponse>;
72
+ /**
73
+ * "List all database users".
74
+ *
75
+ * @param request - The request {@link DatabaseApiListDatabaseUsersRequest}
76
+ * @returns A Promise of ListDatabaseUsersResponse
77
+ */
78
+ listDatabaseUsers: (request: Readonly<DatabaseApiListDatabaseUsersRequest>) => Promise<ListDatabaseUsersResponse> & {
79
+ all: () => Promise<DatabaseUser[]>;
80
+ [Symbol.asyncIterator]: () => AsyncGenerator<DatabaseUser[], void, void>;
81
+ };
82
+ /**
83
+ * "Get details of a database user".
84
+ *
85
+ * @param request - The request {@link DatabaseApiGetDatabaseUserRequest}
86
+ * @returns A Promise of DatabaseUser
87
+ */
88
+ getDatabaseUser: (request: Readonly<DatabaseApiGetDatabaseUserRequest>) => Promise<DatabaseUser>;
89
+ /**
90
+ * "Delete a database user".
91
+ *
92
+ * @param request - The request {@link DatabaseApiDeleteDatabaseUserRequest}
93
+ * @returns A Promise of DatabaseUser
94
+ */
95
+ deleteDatabaseUser: (request: Readonly<DatabaseApiDeleteDatabaseUserRequest>) => Promise<DatabaseUser>;
96
+ /**
97
+ * "Change the password of a database user".
98
+ *
99
+ * @param request - The request {@link DatabaseApiChangeDatabaseUserPasswordRequest}
100
+ * @returns A Promise of DatabaseUser
101
+ */
102
+ changeDatabaseUserPassword: (request: Readonly<DatabaseApiChangeDatabaseUserPasswordRequest>) => Promise<DatabaseUser>;
103
+ /**
104
+ * "Assign a database user to a database".
105
+ *
106
+ * @param request - The request {@link DatabaseApiAssignDatabaseUserRequest}
107
+ * @returns A Promise of DatabaseUser
108
+ */
109
+ assignDatabaseUser: (request: Readonly<DatabaseApiAssignDatabaseUserRequest>) => Promise<DatabaseUser>;
110
+ /**
111
+ * "Unassign a database user from a database".
112
+ *
113
+ * @param request - The request {@link DatabaseApiUnassignDatabaseUserRequest}
114
+ * @returns A Promise of DatabaseUser
115
+ */
116
+ unassignDatabaseUser: (request: Readonly<DatabaseApiUnassignDatabaseUserRequest>) => Promise<DatabaseUser>;
117
+ }
118
+ /**
119
+ * Web Hosting Dns API.
120
+
121
+ This API allows you to manage your Web Hosting services.
122
+ */
123
+ export declare class DnsAPI extends ParentAPI {
124
+ /** Lists the available regions of the API. */
125
+ static readonly LOCALITIES: ScwRegion[];
126
+ /**
127
+ * Get DNS records. Get the set of DNS records of a specified domain associated with a Web Hosting plan's domain.
128
+ *
129
+ * @param request - The request {@link DnsApiGetDomainDnsRecordsRequest}
130
+ * @returns A Promise of DnsRecords
131
+ */
132
+ getDomainDnsRecords: (request: Readonly<DnsApiGetDomainDnsRecordsRequest>) => Promise<DnsRecords>;
133
+ /**
134
+ * Check whether you own this domain or not.. Check whether you own this domain or not.
135
+ *
136
+ * @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
137
+ * @returns A Promise of CheckUserOwnsDomainResponse
138
+ */
139
+ checkUserOwnsDomain: (request: Readonly<DnsApiCheckUserOwnsDomainRequest>) => Promise<CheckUserOwnsDomainResponse>;
140
+ /**
141
+ * Synchronize your DNS records on the Elements Console and on cPanel.. Synchronize your DNS records on the Elements Console and on cPanel.
142
+ *
143
+ * @param request - The request {@link DnsApiSyncDomainDnsRecordsRequest}
144
+ * @returns A Promise of DnsRecords
145
+ */
146
+ syncDomainDnsRecords: (request: Readonly<DnsApiSyncDomainDnsRecordsRequest>) => Promise<DnsRecords>;
147
+ /**
148
+ * Search for available domains based on domain name.. Search for available domains based on domain name.
149
+ *
150
+ * @param request - The request {@link DnsApiSearchDomainsRequest}
151
+ * @returns A Promise of SearchDomainsResponse
152
+ */
153
+ searchDomains: (request: Readonly<DnsApiSearchDomainsRequest>) => Promise<SearchDomainsResponse>;
154
+ /**
155
+ * Retrieve detailed information about a specific domain, including its status, DNS configuration, and ownership.. Retrieve detailed information about a specific domain, including its status, DNS configuration, and ownership.
156
+ *
157
+ * @param request - The request {@link DnsApiGetDomainRequest}
158
+ * @returns A Promise of Domain
159
+ */
160
+ getDomain: (request: Readonly<DnsApiGetDomainRequest>) => Promise<Domain>;
161
+ /**
162
+ * Waits for {@link Domain} to be in a final state.
163
+ *
164
+ * @param request - The request {@link DnsApiGetDomainRequest}
165
+ * @param options - The waiting options
166
+ * @returns A Promise of Domain
167
+ */
168
+ waitForDomain: (request: Readonly<DnsApiGetDomainRequest>, options?: Readonly<WaitForOptions<Domain>>) => Promise<Domain>;
169
+ }
170
+ /**
171
+ * Web Hosting Offer API.
172
+
173
+ This API allows you to manage your offer for your Web Hosting services.
174
+ */
175
+ export declare class OfferAPI extends ParentAPI {
176
+ /** Lists the available regions of the API. */
177
+ static readonly LOCALITIES: ScwRegion[];
178
+ protected pageOfListOffers: (request?: Readonly<OfferApiListOffersRequest>) => Promise<ListOffersResponse>;
179
+ /**
180
+ * List all available hosting offers along with their specific options.. List all available hosting offers along with their specific options.
181
+ *
182
+ * @param request - The request {@link OfferApiListOffersRequest}
183
+ * @returns A Promise of ListOffersResponse
184
+ */
185
+ listOffers: (request?: Readonly<OfferApiListOffersRequest>) => Promise<ListOffersResponse> & {
186
+ all: () => Promise<import("./types.gen").Offer[]>;
187
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Offer[], void, void>;
188
+ };
189
+ }
190
+ /**
191
+ * Web Hosting API.
192
+
193
+ This API allows you to manage your Web Hosting services.
194
+ */
195
+ export declare class HostingAPI extends ParentAPI {
196
+ /** Lists the available regions of the API. */
197
+ static readonly LOCALITIES: ScwRegion[];
198
+ /**
199
+ * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer type required via the `offer_id` parameter.
200
+ *
201
+ * @param request - The request {@link HostingApiCreateHostingRequest}
202
+ * @returns A Promise of Hosting
203
+ */
204
+ createHosting: (request: Readonly<HostingApiCreateHostingRequest>) => Promise<Hosting>;
205
+ protected pageOfListHostings: (request?: Readonly<HostingApiListHostingsRequest>) => Promise<ListHostingsResponse>;
206
+ /**
207
+ * List all Web Hosting plans. List all of your existing Web Hosting plans. Various filters are available to limit the results, including filtering by domain, status, tag and Project ID.
208
+ *
209
+ * @param request - The request {@link HostingApiListHostingsRequest}
210
+ * @returns A Promise of ListHostingsResponse
211
+ */
212
+ listHostings: (request?: Readonly<HostingApiListHostingsRequest>) => Promise<ListHostingsResponse> & {
213
+ all: () => Promise<import("./types.gen").HostingSummary[]>;
214
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").HostingSummary[], void, void>;
215
+ };
216
+ /**
217
+ * Get a Web Hosting plan. Get the details of one of your existing Web Hosting plans, specified by its `hosting_id`.
218
+ *
219
+ * @param request - The request {@link HostingApiGetHostingRequest}
220
+ * @returns A Promise of Hosting
221
+ */
222
+ getHosting: (request: Readonly<HostingApiGetHostingRequest>) => Promise<Hosting>;
223
+ /**
224
+ * Waits for {@link Hosting} to be in a final state.
225
+ *
226
+ * @param request - The request {@link HostingApiGetHostingRequest}
227
+ * @param options - The waiting options
228
+ * @returns A Promise of Hosting
229
+ */
230
+ waitForHosting: (request: Readonly<HostingApiGetHostingRequest>, options?: Readonly<WaitForOptions<Hosting>>) => Promise<Hosting>;
231
+ /**
232
+ * Update a Web Hosting plan. Update the details of one of your existing Web Hosting plans, specified by its `hosting_id`. You can update parameters including the contact email address, tags, options and offer.
233
+ *
234
+ * @param request - The request {@link HostingApiUpdateHostingRequest}
235
+ * @returns A Promise of Hosting
236
+ */
237
+ updateHosting: (request: Readonly<HostingApiUpdateHostingRequest>) => Promise<Hosting>;
238
+ /**
239
+ * Delete a Web Hosting plan. Delete a Web Hosting plan, specified by its `hosting_id`. Note that deletion is not immediate: it will take place at the end of the calendar month, after which time your Web Hosting plan and all its data (files and emails) will be irreversibly lost.
240
+ *
241
+ * @param request - The request {@link HostingApiDeleteHostingRequest}
242
+ * @returns A Promise of Hosting
243
+ */
244
+ deleteHosting: (request: Readonly<HostingApiDeleteHostingRequest>) => Promise<Hosting>;
245
+ /**
246
+ * Create a user session.
247
+ *
248
+ * @param request - The request {@link HostingApiCreateSessionRequest}
249
+ * @returns A Promise of Session
250
+ */
251
+ createSession: (request: Readonly<HostingApiCreateSessionRequest>) => Promise<Session>;
252
+ /**
253
+ * Reset a Web Hosting plan password.
254
+ *
255
+ * @param request - The request {@link HostingApiResetHostingPasswordRequest}
256
+ * @returns A Promise of ResetHostingPasswordResponse
257
+ */
258
+ resetHostingPassword: (request: Readonly<HostingApiResetHostingPasswordRequest>) => Promise<ResetHostingPasswordResponse>;
259
+ /**
260
+ * Get the total counts of websites, databases, email accounts, and FTP accounts of a Web Hosting plan.
261
+ *
262
+ * @param request - The request {@link HostingApiGetResourceSummaryRequest}
263
+ * @returns A Promise of ResourceSummary
264
+ */
265
+ getResourceSummary: (request: Readonly<HostingApiGetResourceSummaryRequest>) => Promise<ResourceSummary>;
266
+ }
267
+ /**
268
+ * Web Hosting FTP Account API.
269
+
270
+ This API allows you to manage your FTP accounts for your Web Hosting services.
271
+ */
272
+ export declare class FtpAccountAPI extends ParentAPI {
273
+ /** Lists the available regions of the API. */
274
+ static readonly LOCALITIES: ScwRegion[];
275
+ /**
276
+ * Create a new FTP account within your hosting plan.. Create a new FTP account within your hosting plan.
277
+ *
278
+ * @param request - The request {@link FtpAccountApiCreateFtpAccountRequest}
279
+ * @returns A Promise of FtpAccount
280
+ */
281
+ createFtpAccount: (request: Readonly<FtpAccountApiCreateFtpAccountRequest>) => Promise<FtpAccount>;
282
+ protected pageOfListFtpAccounts: (request: Readonly<FtpAccountApiListFtpAccountsRequest>) => Promise<ListFtpAccountsResponse>;
283
+ /**
284
+ * List all FTP accounts within your hosting plan.. List all FTP accounts within your hosting plan.
285
+ *
286
+ * @param request - The request {@link FtpAccountApiListFtpAccountsRequest}
287
+ * @returns A Promise of ListFtpAccountsResponse
288
+ */
289
+ listFtpAccounts: (request: Readonly<FtpAccountApiListFtpAccountsRequest>) => Promise<ListFtpAccountsResponse> & {
290
+ all: () => Promise<FtpAccount[]>;
291
+ [Symbol.asyncIterator]: () => AsyncGenerator<FtpAccount[], void, void>;
292
+ };
293
+ /**
294
+ * Delete a specific FTP account within your hosting plan.. Delete a specific FTP account within your hosting plan.
295
+ *
296
+ * @param request - The request {@link FtpAccountApiRemoveFtpAccountRequest}
297
+ * @returns A Promise of FtpAccount
298
+ */
299
+ removeFtpAccount: (request: Readonly<FtpAccountApiRemoveFtpAccountRequest>) => Promise<FtpAccount>;
300
+ changeFtpAccountPassword: (request: Readonly<FtpAccountApiChangeFtpAccountPasswordRequest>) => Promise<FtpAccount>;
301
+ }
302
+ /**
303
+ * Web Hosting Mail Account API.
304
+
305
+ This API allows you to manage your mail accounts for your Web Hosting services.
306
+ */
307
+ export declare class MailAccountAPI extends ParentAPI {
308
+ /** Lists the available regions of the API. */
309
+ static readonly LOCALITIES: ScwRegion[];
310
+ /**
311
+ * Create a new mail account within your hosting plan.. Create a new mail account within your hosting plan.
312
+ *
313
+ * @param request - The request {@link MailAccountApiCreateMailAccountRequest}
314
+ * @returns A Promise of MailAccount
315
+ */
316
+ createMailAccount: (request: Readonly<MailAccountApiCreateMailAccountRequest>) => Promise<MailAccount>;
317
+ protected pageOfListMailAccounts: (request: Readonly<MailAccountApiListMailAccountsRequest>) => Promise<ListMailAccountsResponse>;
318
+ /**
319
+ * List all mail accounts within your hosting plan.. List all mail accounts within your hosting plan.
320
+ *
321
+ * @param request - The request {@link MailAccountApiListMailAccountsRequest}
322
+ * @returns A Promise of ListMailAccountsResponse
323
+ */
324
+ listMailAccounts: (request: Readonly<MailAccountApiListMailAccountsRequest>) => Promise<ListMailAccountsResponse> & {
325
+ all: () => Promise<MailAccount[]>;
326
+ [Symbol.asyncIterator]: () => AsyncGenerator<MailAccount[], void, void>;
327
+ };
328
+ /**
329
+ * Delete a mail account within your hosting plan.. Delete a mail account within your hosting plan.
330
+ *
331
+ * @param request - The request {@link MailAccountApiRemoveMailAccountRequest}
332
+ * @returns A Promise of MailAccount
333
+ */
334
+ removeMailAccount: (request: Readonly<MailAccountApiRemoveMailAccountRequest>) => Promise<MailAccount>;
335
+ /**
336
+ * Update the password of a mail account within your hosting plan.. Update the password of a mail account within your hosting plan.
337
+ *
338
+ * @param request - The request {@link MailAccountApiChangeMailAccountPasswordRequest}
339
+ * @returns A Promise of MailAccount
340
+ */
341
+ changeMailAccountPassword: (request: Readonly<MailAccountApiChangeMailAccountPasswordRequest>) => Promise<MailAccount>;
342
+ }
343
+ /**
344
+ * Web Hosting Website API.
345
+
346
+ This API allows you to manage your websites for your Web Hosting services.
347
+ */
348
+ export declare class WebsiteAPI extends ParentAPI {
349
+ /** Lists the available regions of the API. */
350
+ static readonly LOCALITIES: ScwRegion[];
351
+ protected pageOfListWebsites: (request: Readonly<WebsiteApiListWebsitesRequest>) => Promise<ListWebsitesResponse>;
352
+ /**
353
+ * List all websites for a specific hosting.. List all websites for a specific hosting.
354
+ *
355
+ * @param request - The request {@link WebsiteApiListWebsitesRequest}
356
+ * @returns A Promise of ListWebsitesResponse
357
+ */
358
+ listWebsites: (request: Readonly<WebsiteApiListWebsitesRequest>) => Promise<ListWebsitesResponse> & {
359
+ all: () => Promise<import("./types.gen").Website[]>;
360
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Website[], void, void>;
361
+ };
362
+ }