@scaleway/sdk-webhosting 2.6.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/license.md +3 -0
- package/dist/metadata.gen.d.ts +12 -0
- package/dist/metadata.gen.js +13 -0
- package/dist/v1/api.gen.d.ts +3 -3
- package/dist/v1/api.gen.js +393 -717
- package/dist/v1/content.gen.js +4 -4
- package/dist/v1/marshalling.gen.js +77 -77
- package/dist/v1/metadata.gen.js +1 -1
- package/dist/v1/validation-rules.gen.js +10 -10
- package/package.json +16 -6
- package/LICENSE +0 -191
package/dist/v1/api.gen.js
CHANGED
|
@@ -2,107 +2,59 @@ import { BACKUP_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, HOSTING_TRANSIENT
|
|
|
2
2
|
import { marshalBackupApiRestoreBackupItemsRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiCreateDatabaseRequest, marshalDatabaseApiCreateDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, marshalDnsApiCheckUserOwnsDomainRequest, marshalDnsApiSyncDomainDnsRecordsRequest, marshalFreeDomainApiCheckFreeDomainAvailabilityRequest, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalFtpAccountApiCreateFtpAccountRequest, marshalHostingApiAddCustomDomainRequest, marshalHostingApiCreateHostingRequest, marshalHostingApiDeleteHostingDomainsRequest, marshalHostingApiMigrateControlPanelRequest, marshalHostingApiRemoveCustomDomainRequest, marshalHostingApiUpdateHostingFreeDomainRequest, marshalHostingApiUpdateHostingRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, marshalMailAccountApiRemoveMailAccountRequest, marshalWebsiteApiCreateWebsiteRequest, unmarshalBackup, unmarshalCheckFreeDomainAvailabilityResponse, unmarshalCheckUserOwnsDomainResponse, unmarshalDatabase, unmarshalDatabaseUser, unmarshalDnsRecords, unmarshalDomain, unmarshalFtpAccount, unmarshalHosting, unmarshalHostingSummary, unmarshalListBackupItemsResponse, unmarshalListBackupsResponse, unmarshalListControlPanelsResponse, unmarshalListDatabaseUsersResponse, unmarshalListDatabasesResponse, unmarshalListFreeRootDomainsResponse, unmarshalListFtpAccountsResponse, unmarshalListHostingsResponse, unmarshalListMailAccountsResponse, unmarshalListOffersResponse, unmarshalListRecentProgressesResponse, unmarshalListWebsitesResponse, unmarshalMailAccount, unmarshalProgress, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, unmarshalRestoreBackupItemsResponse, unmarshalRestoreBackupResponse, unmarshalSearchDomainsResponse, unmarshalSession, unmarshalWebsite } from "./marshalling.gen.js";
|
|
3
3
|
import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
4
|
//#region src/v1/api.gen.ts
|
|
5
|
-
|
|
5
|
+
const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
6
6
|
/**
|
|
7
7
|
* Web Hosting backup API.
|
|
8
8
|
|
|
9
9
|
This API allows you to list and restore backups for your cPanel and WordPress Web Hosting service.
|
|
10
10
|
*/
|
|
11
11
|
var BackupAPI = class extends API {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
body: "{}",
|
|
59
|
-
headers: jsonContentHeaders,
|
|
60
|
-
method: "POST",
|
|
61
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/backups/${validatePathParam("backupId", request.backupId)}/restore`
|
|
62
|
-
}, unmarshalRestoreBackupResponse);
|
|
63
|
-
/**
|
|
64
|
-
* List items within a specific backup, grouped by type.. List items within a specific backup, grouped by type.
|
|
65
|
-
*
|
|
66
|
-
* @param request - The request {@link BackupApiListBackupItemsRequest}
|
|
67
|
-
* @returns A Promise of ListBackupItemsResponse
|
|
68
|
-
*/
|
|
69
|
-
listBackupItems = (request) => this.client.fetch({
|
|
70
|
-
method: "GET",
|
|
71
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/backup-items`,
|
|
72
|
-
urlParams: urlParams(["backup_id", request.backupId])
|
|
73
|
-
}, unmarshalListBackupItemsResponse);
|
|
74
|
-
/**
|
|
75
|
-
* Restore specific items from a backup (e.g., a database or mailbox).. Restore specific items from a backup (e.g., a database or mailbox).
|
|
76
|
-
*
|
|
77
|
-
* @param request - The request {@link BackupApiRestoreBackupItemsRequest}
|
|
78
|
-
* @returns A Promise of RestoreBackupItemsResponse
|
|
79
|
-
*/
|
|
80
|
-
restoreBackupItems = (request) => this.client.fetch({
|
|
81
|
-
body: JSON.stringify(marshalBackupApiRestoreBackupItemsRequest(request, this.client.settings)),
|
|
82
|
-
headers: jsonContentHeaders,
|
|
83
|
-
method: "POST",
|
|
84
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/restore-backup-items`
|
|
85
|
-
}, unmarshalRestoreBackupItemsResponse);
|
|
86
|
-
/**
|
|
87
|
-
* Retrieve detailed information about a specific progress by its ID.. Retrieve detailed information about a specific progress by its ID.
|
|
88
|
-
*
|
|
89
|
-
* @param request - The request {@link BackupApiGetProgressRequest}
|
|
90
|
-
* @returns A Promise of Progress
|
|
91
|
-
*/
|
|
92
|
-
getProgress = (request) => this.client.fetch({
|
|
93
|
-
method: "GET",
|
|
94
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/progresses/${validatePathParam("progressId", request.progressId)}`
|
|
95
|
-
}, unmarshalProgress);
|
|
96
|
-
/**
|
|
97
|
-
* List recent progresses associated with a specific backup, grouped by type.. List recent progresses associated with a specific backup, grouped by type.
|
|
98
|
-
*
|
|
99
|
-
* @param request - The request {@link BackupApiListRecentProgressesRequest}
|
|
100
|
-
* @returns A Promise of ListRecentProgressesResponse
|
|
101
|
-
*/
|
|
102
|
-
listRecentProgresses = (request) => this.client.fetch({
|
|
103
|
-
method: "GET",
|
|
104
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/progresses`
|
|
105
|
-
}, unmarshalListRecentProgressesResponse);
|
|
12
|
+
constructor(..._args) {
|
|
13
|
+
super(..._args);
|
|
14
|
+
this.pageOfListBackups = (request) => this.client.fetch({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/backups`,
|
|
17
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
18
|
+
}, unmarshalListBackupsResponse);
|
|
19
|
+
this.listBackups = (request) => enrichForPagination("backups", this.pageOfListBackups, request);
|
|
20
|
+
this.getBackup = (request) => this.client.fetch({
|
|
21
|
+
method: "GET",
|
|
22
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/backups/${validatePathParam("backupId", request.backupId)}`
|
|
23
|
+
}, unmarshalBackup);
|
|
24
|
+
this.waitForBackup = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!BACKUP_TRANSIENT_STATUSES.includes(res.status))), this.getBackup, request, options);
|
|
25
|
+
this.restoreBackup = (request) => this.client.fetch({
|
|
26
|
+
body: "{}",
|
|
27
|
+
headers: jsonContentHeaders,
|
|
28
|
+
method: "POST",
|
|
29
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/backups/${validatePathParam("backupId", request.backupId)}/restore`
|
|
30
|
+
}, unmarshalRestoreBackupResponse);
|
|
31
|
+
this.listBackupItems = (request) => this.client.fetch({
|
|
32
|
+
method: "GET",
|
|
33
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/backup-items`,
|
|
34
|
+
urlParams: urlParams(["backup_id", request.backupId])
|
|
35
|
+
}, unmarshalListBackupItemsResponse);
|
|
36
|
+
this.restoreBackupItems = (request) => this.client.fetch({
|
|
37
|
+
body: JSON.stringify(marshalBackupApiRestoreBackupItemsRequest(request, this.client.settings)),
|
|
38
|
+
headers: jsonContentHeaders,
|
|
39
|
+
method: "POST",
|
|
40
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/restore-backup-items`
|
|
41
|
+
}, unmarshalRestoreBackupItemsResponse);
|
|
42
|
+
this.getProgress = (request) => this.client.fetch({
|
|
43
|
+
method: "GET",
|
|
44
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/progresses/${validatePathParam("progressId", request.progressId)}`
|
|
45
|
+
}, unmarshalProgress);
|
|
46
|
+
this.listRecentProgresses = (request) => this.client.fetch({
|
|
47
|
+
method: "GET",
|
|
48
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/progresses`
|
|
49
|
+
}, unmarshalListRecentProgressesResponse);
|
|
50
|
+
}
|
|
51
|
+
static {
|
|
52
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
53
|
+
"fr-par",
|
|
54
|
+
"nl-ams",
|
|
55
|
+
"pl-waw"
|
|
56
|
+
] });
|
|
57
|
+
}
|
|
106
58
|
};
|
|
107
59
|
/**
|
|
108
60
|
* Web Hosting Control Panel API.
|
|
@@ -110,27 +62,22 @@ var BackupAPI = class extends API {
|
|
|
110
62
|
This API allows you to manage your Web Hosting services.
|
|
111
63
|
*/
|
|
112
64
|
var ControlPanelAPI = class extends API {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
*
|
|
130
|
-
* @param request - The request {@link ControlPanelApiListControlPanelsRequest}
|
|
131
|
-
* @returns A Promise of ListControlPanelsResponse
|
|
132
|
-
*/
|
|
133
|
-
listControlPanels = (request = {}) => enrichForPagination("controlPanels", this.pageOfListControlPanels, request);
|
|
65
|
+
constructor(..._args2) {
|
|
66
|
+
super(..._args2);
|
|
67
|
+
this.pageOfListControlPanels = (request = {}) => this.client.fetch({
|
|
68
|
+
method: "GET",
|
|
69
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/control-panels`,
|
|
70
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
71
|
+
}, unmarshalListControlPanelsResponse);
|
|
72
|
+
this.listControlPanels = (request = {}) => enrichForPagination("controlPanels", this.pageOfListControlPanels, request);
|
|
73
|
+
}
|
|
74
|
+
static {
|
|
75
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
76
|
+
"fr-par",
|
|
77
|
+
"nl-ams",
|
|
78
|
+
"pl-waw"
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
134
81
|
};
|
|
135
82
|
/**
|
|
136
83
|
* Web Hosting Database API.
|
|
@@ -138,139 +85,74 @@ var ControlPanelAPI = class extends API {
|
|
|
138
85
|
This API allows you to manage your databases and database users for your Web Hosting services.
|
|
139
86
|
*/
|
|
140
87
|
var DatabaseAPI = class extends API {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
210
|
-
}, unmarshalListDatabaseUsersResponse);
|
|
211
|
-
/**
|
|
212
|
-
* "List all database users".
|
|
213
|
-
*
|
|
214
|
-
* @param request - The request {@link DatabaseApiListDatabaseUsersRequest}
|
|
215
|
-
* @returns A Promise of ListDatabaseUsersResponse
|
|
216
|
-
*/
|
|
217
|
-
listDatabaseUsers = (request) => enrichForPagination("users", this.pageOfListDatabaseUsers, request);
|
|
218
|
-
/**
|
|
219
|
-
* "Get details of a database user".
|
|
220
|
-
*
|
|
221
|
-
* @param request - The request {@link DatabaseApiGetDatabaseUserRequest}
|
|
222
|
-
* @returns A Promise of DatabaseUser
|
|
223
|
-
*/
|
|
224
|
-
getDatabaseUser = (request) => this.client.fetch({
|
|
225
|
-
method: "GET",
|
|
226
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases-users/${validatePathParam("username", request.username)}`
|
|
227
|
-
}, unmarshalDatabaseUser);
|
|
228
|
-
/**
|
|
229
|
-
* "Delete a database user".
|
|
230
|
-
*
|
|
231
|
-
* @param request - The request {@link DatabaseApiDeleteDatabaseUserRequest}
|
|
232
|
-
* @returns A Promise of DatabaseUser
|
|
233
|
-
*/
|
|
234
|
-
deleteDatabaseUser = (request) => this.client.fetch({
|
|
235
|
-
method: "DELETE",
|
|
236
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/database-users/${validatePathParam("username", request.username)}`
|
|
237
|
-
}, unmarshalDatabaseUser);
|
|
238
|
-
/**
|
|
239
|
-
* "Change the password of a database user".
|
|
240
|
-
*
|
|
241
|
-
* @param request - The request {@link DatabaseApiChangeDatabaseUserPasswordRequest}
|
|
242
|
-
* @returns A Promise of DatabaseUser
|
|
243
|
-
*/
|
|
244
|
-
changeDatabaseUserPassword = (request) => this.client.fetch({
|
|
245
|
-
body: JSON.stringify(marshalDatabaseApiChangeDatabaseUserPasswordRequest(request, this.client.settings)),
|
|
246
|
-
headers: jsonContentHeaders,
|
|
247
|
-
method: "POST",
|
|
248
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases-users/${validatePathParam("username", request.username)}/change-password`
|
|
249
|
-
}, unmarshalDatabaseUser);
|
|
250
|
-
/**
|
|
251
|
-
* "Assign a database user to a database".
|
|
252
|
-
*
|
|
253
|
-
* @param request - The request {@link DatabaseApiAssignDatabaseUserRequest}
|
|
254
|
-
* @returns A Promise of DatabaseUser
|
|
255
|
-
*/
|
|
256
|
-
assignDatabaseUser = (request) => this.client.fetch({
|
|
257
|
-
body: JSON.stringify(marshalDatabaseApiAssignDatabaseUserRequest(request, this.client.settings)),
|
|
258
|
-
headers: jsonContentHeaders,
|
|
259
|
-
method: "POST",
|
|
260
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases/${validatePathParam("databaseName", request.databaseName)}/assign-user`
|
|
261
|
-
}, unmarshalDatabaseUser);
|
|
262
|
-
/**
|
|
263
|
-
* "Unassign a database user from a database".
|
|
264
|
-
*
|
|
265
|
-
* @param request - The request {@link DatabaseApiUnassignDatabaseUserRequest}
|
|
266
|
-
* @returns A Promise of DatabaseUser
|
|
267
|
-
*/
|
|
268
|
-
unassignDatabaseUser = (request) => this.client.fetch({
|
|
269
|
-
body: JSON.stringify(marshalDatabaseApiUnassignDatabaseUserRequest(request, this.client.settings)),
|
|
270
|
-
headers: jsonContentHeaders,
|
|
271
|
-
method: "POST",
|
|
272
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases/${validatePathParam("databaseName", request.databaseName)}/unassign-user`
|
|
273
|
-
}, unmarshalDatabaseUser);
|
|
88
|
+
constructor(..._args3) {
|
|
89
|
+
super(..._args3);
|
|
90
|
+
this.createDatabase = (request) => this.client.fetch({
|
|
91
|
+
body: JSON.stringify(marshalDatabaseApiCreateDatabaseRequest(request, this.client.settings)),
|
|
92
|
+
headers: jsonContentHeaders,
|
|
93
|
+
method: "POST",
|
|
94
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases`
|
|
95
|
+
}, unmarshalDatabase);
|
|
96
|
+
this.pageOfListDatabases = (request) => this.client.fetch({
|
|
97
|
+
method: "GET",
|
|
98
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases`,
|
|
99
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
100
|
+
}, unmarshalListDatabasesResponse);
|
|
101
|
+
this.listDatabases = (request) => enrichForPagination("databases", this.pageOfListDatabases, request);
|
|
102
|
+
this.getDatabase = (request) => this.client.fetch({
|
|
103
|
+
method: "GET",
|
|
104
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases/${validatePathParam("databaseName", request.databaseName)}`
|
|
105
|
+
}, unmarshalDatabase);
|
|
106
|
+
this.deleteDatabase = (request) => this.client.fetch({
|
|
107
|
+
method: "DELETE",
|
|
108
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases/${validatePathParam("databaseName", request.databaseName)}`
|
|
109
|
+
}, unmarshalDatabase);
|
|
110
|
+
this.createDatabaseUser = (request) => this.client.fetch({
|
|
111
|
+
body: JSON.stringify(marshalDatabaseApiCreateDatabaseUserRequest(request, this.client.settings)),
|
|
112
|
+
headers: jsonContentHeaders,
|
|
113
|
+
method: "POST",
|
|
114
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases-users`
|
|
115
|
+
}, unmarshalDatabaseUser);
|
|
116
|
+
this.pageOfListDatabaseUsers = (request) => this.client.fetch({
|
|
117
|
+
method: "GET",
|
|
118
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/database-users`,
|
|
119
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
120
|
+
}, unmarshalListDatabaseUsersResponse);
|
|
121
|
+
this.listDatabaseUsers = (request) => enrichForPagination("users", this.pageOfListDatabaseUsers, request);
|
|
122
|
+
this.getDatabaseUser = (request) => this.client.fetch({
|
|
123
|
+
method: "GET",
|
|
124
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases-users/${validatePathParam("username", request.username)}`
|
|
125
|
+
}, unmarshalDatabaseUser);
|
|
126
|
+
this.deleteDatabaseUser = (request) => this.client.fetch({
|
|
127
|
+
method: "DELETE",
|
|
128
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/database-users/${validatePathParam("username", request.username)}`
|
|
129
|
+
}, unmarshalDatabaseUser);
|
|
130
|
+
this.changeDatabaseUserPassword = (request) => this.client.fetch({
|
|
131
|
+
body: JSON.stringify(marshalDatabaseApiChangeDatabaseUserPasswordRequest(request, this.client.settings)),
|
|
132
|
+
headers: jsonContentHeaders,
|
|
133
|
+
method: "POST",
|
|
134
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases-users/${validatePathParam("username", request.username)}/change-password`
|
|
135
|
+
}, unmarshalDatabaseUser);
|
|
136
|
+
this.assignDatabaseUser = (request) => this.client.fetch({
|
|
137
|
+
body: JSON.stringify(marshalDatabaseApiAssignDatabaseUserRequest(request, this.client.settings)),
|
|
138
|
+
headers: jsonContentHeaders,
|
|
139
|
+
method: "POST",
|
|
140
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases/${validatePathParam("databaseName", request.databaseName)}/assign-user`
|
|
141
|
+
}, unmarshalDatabaseUser);
|
|
142
|
+
this.unassignDatabaseUser = (request) => this.client.fetch({
|
|
143
|
+
body: JSON.stringify(marshalDatabaseApiUnassignDatabaseUserRequest(request, this.client.settings)),
|
|
144
|
+
headers: jsonContentHeaders,
|
|
145
|
+
method: "POST",
|
|
146
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/databases/${validatePathParam("databaseName", request.databaseName)}/unassign-user`
|
|
147
|
+
}, unmarshalDatabaseUser);
|
|
148
|
+
}
|
|
149
|
+
static {
|
|
150
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
151
|
+
"fr-par",
|
|
152
|
+
"nl-ams",
|
|
153
|
+
"pl-waw"
|
|
154
|
+
] });
|
|
155
|
+
}
|
|
274
156
|
};
|
|
275
157
|
/**
|
|
276
158
|
* Web Hosting Dns API.
|
|
@@ -278,80 +160,43 @@ var DatabaseAPI = class extends API {
|
|
|
278
160
|
This API allows you to manage your Web Hosting services.
|
|
279
161
|
*/
|
|
280
162
|
var DnsAPI = class extends API {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
*/
|
|
319
|
-
syncDomainDnsRecords = (request) => this.client.fetch({
|
|
320
|
-
body: JSON.stringify(marshalDnsApiSyncDomainDnsRecordsRequest(request, this.client.settings)),
|
|
321
|
-
headers: jsonContentHeaders,
|
|
322
|
-
method: "POST",
|
|
323
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domain", request.domain)}/sync-domain-dns-records`
|
|
324
|
-
}, unmarshalDnsRecords);
|
|
325
|
-
/**
|
|
326
|
-
* Search for available domains based on domain name.. Search for available domains based on domain name.
|
|
327
|
-
*
|
|
328
|
-
* @param request - The request {@link DnsApiSearchDomainsRequest}
|
|
329
|
-
* @returns A Promise of SearchDomainsResponse
|
|
330
|
-
*/
|
|
331
|
-
searchDomains = (request) => this.client.fetch({
|
|
332
|
-
method: "GET",
|
|
333
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/search-domains`,
|
|
334
|
-
urlParams: urlParams(["domain_name", request.domainName], ["project_id", request.projectId ?? this.client.settings.defaultProjectId])
|
|
335
|
-
}, unmarshalSearchDomainsResponse);
|
|
336
|
-
/**
|
|
337
|
-
* 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.
|
|
338
|
-
*
|
|
339
|
-
* @param request - The request {@link DnsApiGetDomainRequest}
|
|
340
|
-
* @returns A Promise of Domain
|
|
341
|
-
*/
|
|
342
|
-
getDomain = (request) => this.client.fetch({
|
|
343
|
-
method: "GET",
|
|
344
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainName", request.domainName)}`,
|
|
345
|
-
urlParams: urlParams(["project_id", request.projectId ?? this.client.settings.defaultProjectId])
|
|
346
|
-
}, unmarshalDomain);
|
|
347
|
-
/**
|
|
348
|
-
* Waits for {@link Domain} to be in a final state.
|
|
349
|
-
*
|
|
350
|
-
* @param request - The request {@link DnsApiGetDomainRequest}
|
|
351
|
-
* @param options - The waiting options
|
|
352
|
-
* @returns A Promise of Domain
|
|
353
|
-
*/
|
|
354
|
-
waitForDomain = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
163
|
+
constructor(..._args4) {
|
|
164
|
+
super(..._args4);
|
|
165
|
+
this.getDomainDnsRecords = (request) => this.client.fetch({
|
|
166
|
+
method: "GET",
|
|
167
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domain", request.domain)}/dns-records`
|
|
168
|
+
}, unmarshalDnsRecords);
|
|
169
|
+
this.checkUserOwnsDomain = (request) => this.client.fetch({
|
|
170
|
+
body: JSON.stringify(marshalDnsApiCheckUserOwnsDomainRequest(request, this.client.settings)),
|
|
171
|
+
headers: jsonContentHeaders,
|
|
172
|
+
method: "POST",
|
|
173
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domain", request.domain)}/check-ownership`
|
|
174
|
+
}, unmarshalCheckUserOwnsDomainResponse);
|
|
175
|
+
this.syncDomainDnsRecords = (request) => this.client.fetch({
|
|
176
|
+
body: JSON.stringify(marshalDnsApiSyncDomainDnsRecordsRequest(request, this.client.settings)),
|
|
177
|
+
headers: jsonContentHeaders,
|
|
178
|
+
method: "POST",
|
|
179
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domain", request.domain)}/sync-domain-dns-records`
|
|
180
|
+
}, unmarshalDnsRecords);
|
|
181
|
+
this.searchDomains = (request) => this.client.fetch({
|
|
182
|
+
method: "GET",
|
|
183
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/search-domains`,
|
|
184
|
+
urlParams: urlParams(["domain_name", request.domainName], ["project_id", request.projectId ?? this.client.settings.defaultProjectId])
|
|
185
|
+
}, unmarshalSearchDomainsResponse);
|
|
186
|
+
this.getDomain = (request) => this.client.fetch({
|
|
187
|
+
method: "GET",
|
|
188
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainName", request.domainName)}`,
|
|
189
|
+
urlParams: urlParams(["project_id", request.projectId ?? this.client.settings.defaultProjectId])
|
|
190
|
+
}, unmarshalDomain);
|
|
191
|
+
this.waitForDomain = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
192
|
+
}
|
|
193
|
+
static {
|
|
194
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
195
|
+
"fr-par",
|
|
196
|
+
"nl-ams",
|
|
197
|
+
"pl-waw"
|
|
198
|
+
] });
|
|
199
|
+
}
|
|
355
200
|
};
|
|
356
201
|
/**
|
|
357
202
|
* Web Hosting Offer API.
|
|
@@ -359,27 +204,22 @@ var DnsAPI = class extends API {
|
|
|
359
204
|
This API allows you to manage your offer for your Web Hosting services.
|
|
360
205
|
*/
|
|
361
206
|
var OfferAPI = class extends API {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
"
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
*
|
|
379
|
-
* @param request - The request {@link OfferApiListOffersRequest}
|
|
380
|
-
* @returns A Promise of ListOffersResponse
|
|
381
|
-
*/
|
|
382
|
-
listOffers = (request = {}) => enrichForPagination("offers", this.pageOfListOffers, request);
|
|
207
|
+
constructor(..._args5) {
|
|
208
|
+
super(..._args5);
|
|
209
|
+
this.pageOfListOffers = (request = {}) => this.client.fetch({
|
|
210
|
+
method: "GET",
|
|
211
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/offers`,
|
|
212
|
+
urlParams: urlParams(["control_panels", request.controlPanels], ["hosting_id", request.hostingId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
213
|
+
}, unmarshalListOffersResponse);
|
|
214
|
+
this.listOffers = (request = {}) => enrichForPagination("offers", this.pageOfListOffers, request);
|
|
215
|
+
}
|
|
216
|
+
static {
|
|
217
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
218
|
+
"fr-par",
|
|
219
|
+
"nl-ams",
|
|
220
|
+
"pl-waw"
|
|
221
|
+
] });
|
|
222
|
+
}
|
|
383
223
|
};
|
|
384
224
|
/**
|
|
385
225
|
* Web Hosting API.
|
|
@@ -387,185 +227,95 @@ var OfferAPI = class extends API {
|
|
|
387
227
|
This API allows you to manage your Web Hosting services.
|
|
388
228
|
*/
|
|
389
229
|
var HostingAPI = class extends API {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
* @returns A Promise of ResetHostingPasswordResponse
|
|
480
|
-
*/
|
|
481
|
-
resetHostingPassword = (request) => this.client.fetch({
|
|
482
|
-
body: "{}",
|
|
483
|
-
headers: jsonContentHeaders,
|
|
484
|
-
method: "POST",
|
|
485
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/reset-password`
|
|
486
|
-
}, unmarshalResetHostingPasswordResponse);
|
|
487
|
-
/**
|
|
488
|
-
* Get the total counts of websites, databases, email accounts, and FTP accounts of a Web Hosting plan.
|
|
489
|
-
*
|
|
490
|
-
* @param request - The request {@link HostingApiGetResourceSummaryRequest}
|
|
491
|
-
* @returns A Promise of ResourceSummary
|
|
492
|
-
*/
|
|
493
|
-
getResourceSummary = (request) => this.client.fetch({
|
|
494
|
-
method: "GET",
|
|
495
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/resource-summary`
|
|
496
|
-
}, unmarshalResourceSummary);
|
|
497
|
-
/**
|
|
498
|
-
* Attach a custom domain to a webhosting as an alias to the main domain.
|
|
499
|
-
*
|
|
500
|
-
* @param request - The request {@link HostingApiAddCustomDomainRequest}
|
|
501
|
-
* @returns A Promise of HostingSummary
|
|
502
|
-
*/
|
|
503
|
-
addCustomDomain = (request) => this.client.fetch({
|
|
504
|
-
body: JSON.stringify(marshalHostingApiAddCustomDomainRequest(request, this.client.settings)),
|
|
505
|
-
headers: jsonContentHeaders,
|
|
506
|
-
method: "POST",
|
|
507
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/add-custom-domain`
|
|
508
|
-
}, unmarshalHostingSummary);
|
|
509
|
-
/**
|
|
510
|
-
* Detach a custom domain from a webhosting.
|
|
511
|
-
*
|
|
512
|
-
* @param request - The request {@link HostingApiRemoveCustomDomainRequest}
|
|
513
|
-
* @returns A Promise of HostingSummary
|
|
514
|
-
*/
|
|
515
|
-
removeCustomDomain = (request) => this.client.fetch({
|
|
516
|
-
body: JSON.stringify(marshalHostingApiRemoveCustomDomainRequest(request, this.client.settings)),
|
|
517
|
-
headers: jsonContentHeaders,
|
|
518
|
-
method: "POST",
|
|
519
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/remove-custom-domain`
|
|
520
|
-
}, unmarshalHostingSummary);
|
|
521
|
-
/**
|
|
522
|
-
* Migrate a hosting to a new control panel.. Migrate a hosting to a new control panel.
|
|
523
|
-
*
|
|
524
|
-
* @param request - The request {@link HostingApiMigrateControlPanelRequest}
|
|
525
|
-
* @returns A Promise of HostingSummary
|
|
526
|
-
*/
|
|
527
|
-
migrateControlPanel = (request) => this.client.fetch({
|
|
528
|
-
body: JSON.stringify(marshalHostingApiMigrateControlPanelRequest(request, this.client.settings)),
|
|
529
|
-
headers: jsonContentHeaders,
|
|
530
|
-
method: "POST",
|
|
531
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/migrate-control-panel`
|
|
532
|
-
}, unmarshalHostingSummary);
|
|
533
|
-
/**
|
|
534
|
-
* Reset a Web Hosting plan. Reset a Web Hosting plan to its initial state, specified by its `hosting_id`. This permanently deletes all hosting data including files, databases and emails. The hosting will be re-provisioned.
|
|
535
|
-
*
|
|
536
|
-
* @param request - The request {@link HostingApiResetHostingRequest}
|
|
537
|
-
* @returns A Promise of Hosting
|
|
538
|
-
*/
|
|
539
|
-
resetHosting = (request) => this.client.fetch({
|
|
540
|
-
body: "{}",
|
|
541
|
-
headers: jsonContentHeaders,
|
|
542
|
-
method: "POST",
|
|
543
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/reset`
|
|
544
|
-
}, unmarshalHosting);
|
|
545
|
-
/**
|
|
546
|
-
* Delete domains from a Web Hosting plan. Remove one or more domains from a Web Hosting plan, specified by its `hosting_id`. This permanently deletes the domains and all services tied to them, including mailboxes, FTP accounts and DNS zones.
|
|
547
|
-
*
|
|
548
|
-
* @param request - The request {@link HostingApiDeleteHostingDomainsRequest}
|
|
549
|
-
* @returns A Promise of Hosting
|
|
550
|
-
*/
|
|
551
|
-
deleteHostingDomains = (request) => this.client.fetch({
|
|
552
|
-
body: JSON.stringify(marshalHostingApiDeleteHostingDomainsRequest(request, this.client.settings)),
|
|
553
|
-
headers: jsonContentHeaders,
|
|
554
|
-
method: "POST",
|
|
555
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/delete-domains`
|
|
556
|
-
}, unmarshalHosting);
|
|
557
|
-
/**
|
|
558
|
-
* Update the free domain of a Web Hosting plan. Change the free domain associated with a Web Hosting plan, specified by its `hosting_id`.
|
|
559
|
-
*
|
|
560
|
-
* @param request - The request {@link HostingApiUpdateHostingFreeDomainRequest}
|
|
561
|
-
* @returns A Promise of Hosting
|
|
562
|
-
*/
|
|
563
|
-
updateHostingFreeDomain = (request) => this.client.fetch({
|
|
564
|
-
body: JSON.stringify(marshalHostingApiUpdateHostingFreeDomainRequest(request, this.client.settings)),
|
|
565
|
-
headers: jsonContentHeaders,
|
|
566
|
-
method: "PATCH",
|
|
567
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/update-free-domain`
|
|
568
|
-
}, unmarshalHosting);
|
|
230
|
+
constructor(..._args6) {
|
|
231
|
+
super(..._args6);
|
|
232
|
+
this.createHosting = (request) => this.client.fetch({
|
|
233
|
+
body: JSON.stringify(marshalHostingApiCreateHostingRequest(request, this.client.settings)),
|
|
234
|
+
headers: jsonContentHeaders,
|
|
235
|
+
method: "POST",
|
|
236
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings`
|
|
237
|
+
}, unmarshalHosting);
|
|
238
|
+
this.pageOfListHostings = (request = {}) => this.client.fetch({
|
|
239
|
+
method: "GET",
|
|
240
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings`,
|
|
241
|
+
urlParams: urlParams(["control_panels", request.controlPanels], ["domain", request.domain], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["statuses", request.statuses], ["subdomain", request.subdomain], ["tags", request.tags])
|
|
242
|
+
}, unmarshalListHostingsResponse);
|
|
243
|
+
this.listHostings = (request = {}) => enrichForPagination("hostings", this.pageOfListHostings, request);
|
|
244
|
+
this.getHosting = (request) => this.client.fetch({
|
|
245
|
+
method: "GET",
|
|
246
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}`
|
|
247
|
+
}, unmarshalHosting);
|
|
248
|
+
this.waitForHosting = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!HOSTING_TRANSIENT_STATUSES.includes(res.status))), this.getHosting, request, options);
|
|
249
|
+
this.updateHosting = (request) => this.client.fetch({
|
|
250
|
+
body: JSON.stringify(marshalHostingApiUpdateHostingRequest(request, this.client.settings)),
|
|
251
|
+
headers: jsonContentHeaders,
|
|
252
|
+
method: "PATCH",
|
|
253
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}`
|
|
254
|
+
}, unmarshalHosting);
|
|
255
|
+
this.deleteHosting = (request) => this.client.fetch({
|
|
256
|
+
method: "DELETE",
|
|
257
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}`
|
|
258
|
+
}, unmarshalHosting);
|
|
259
|
+
this.createSession = (request) => this.client.fetch({
|
|
260
|
+
body: "{}",
|
|
261
|
+
headers: jsonContentHeaders,
|
|
262
|
+
method: "POST",
|
|
263
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/sessions`
|
|
264
|
+
}, unmarshalSession);
|
|
265
|
+
this.resetHostingPassword = (request) => this.client.fetch({
|
|
266
|
+
body: "{}",
|
|
267
|
+
headers: jsonContentHeaders,
|
|
268
|
+
method: "POST",
|
|
269
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/reset-password`
|
|
270
|
+
}, unmarshalResetHostingPasswordResponse);
|
|
271
|
+
this.getResourceSummary = (request) => this.client.fetch({
|
|
272
|
+
method: "GET",
|
|
273
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/resource-summary`
|
|
274
|
+
}, unmarshalResourceSummary);
|
|
275
|
+
this.addCustomDomain = (request) => this.client.fetch({
|
|
276
|
+
body: JSON.stringify(marshalHostingApiAddCustomDomainRequest(request, this.client.settings)),
|
|
277
|
+
headers: jsonContentHeaders,
|
|
278
|
+
method: "POST",
|
|
279
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/add-custom-domain`
|
|
280
|
+
}, unmarshalHostingSummary);
|
|
281
|
+
this.removeCustomDomain = (request) => this.client.fetch({
|
|
282
|
+
body: JSON.stringify(marshalHostingApiRemoveCustomDomainRequest(request, this.client.settings)),
|
|
283
|
+
headers: jsonContentHeaders,
|
|
284
|
+
method: "POST",
|
|
285
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/remove-custom-domain`
|
|
286
|
+
}, unmarshalHostingSummary);
|
|
287
|
+
this.migrateControlPanel = (request) => this.client.fetch({
|
|
288
|
+
body: JSON.stringify(marshalHostingApiMigrateControlPanelRequest(request, this.client.settings)),
|
|
289
|
+
headers: jsonContentHeaders,
|
|
290
|
+
method: "POST",
|
|
291
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/migrate-control-panel`
|
|
292
|
+
}, unmarshalHostingSummary);
|
|
293
|
+
this.resetHosting = (request) => this.client.fetch({
|
|
294
|
+
body: "{}",
|
|
295
|
+
headers: jsonContentHeaders,
|
|
296
|
+
method: "POST",
|
|
297
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/reset`
|
|
298
|
+
}, unmarshalHosting);
|
|
299
|
+
this.deleteHostingDomains = (request) => this.client.fetch({
|
|
300
|
+
body: JSON.stringify(marshalHostingApiDeleteHostingDomainsRequest(request, this.client.settings)),
|
|
301
|
+
headers: jsonContentHeaders,
|
|
302
|
+
method: "POST",
|
|
303
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/delete-domains`
|
|
304
|
+
}, unmarshalHosting);
|
|
305
|
+
this.updateHostingFreeDomain = (request) => this.client.fetch({
|
|
306
|
+
body: JSON.stringify(marshalHostingApiUpdateHostingFreeDomainRequest(request, this.client.settings)),
|
|
307
|
+
headers: jsonContentHeaders,
|
|
308
|
+
method: "PATCH",
|
|
309
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/update-free-domain`
|
|
310
|
+
}, unmarshalHosting);
|
|
311
|
+
}
|
|
312
|
+
static {
|
|
313
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
314
|
+
"fr-par",
|
|
315
|
+
"nl-ams",
|
|
316
|
+
"pl-waw"
|
|
317
|
+
] });
|
|
318
|
+
}
|
|
569
319
|
};
|
|
570
320
|
/**
|
|
571
321
|
* Web Hosting free domain API.
|
|
@@ -573,39 +323,28 @@ var HostingAPI = class extends API {
|
|
|
573
323
|
This API allows you to list and check a free domain's validity.
|
|
574
324
|
*/
|
|
575
325
|
var FreeDomainAPI = class extends API {
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
method: "GET",
|
|
599
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/root-domains`,
|
|
600
|
-
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
601
|
-
}, unmarshalListFreeRootDomainsResponse);
|
|
602
|
-
/**
|
|
603
|
-
* Retrieve the list of free root domains available for a Web Hosting.. Retrieve the list of free root domains available for a Web Hosting.
|
|
604
|
-
*
|
|
605
|
-
* @param request - The request {@link FreeDomainApiListFreeRootDomainsRequest}
|
|
606
|
-
* @returns A Promise of ListFreeRootDomainsResponse
|
|
607
|
-
*/
|
|
608
|
-
listFreeRootDomains = (request = {}) => enrichForPagination("rootDomains", this.pageOfListFreeRootDomains, request);
|
|
326
|
+
constructor(..._args7) {
|
|
327
|
+
super(..._args7);
|
|
328
|
+
this.checkFreeDomainAvailability = (request) => this.client.fetch({
|
|
329
|
+
body: JSON.stringify(marshalFreeDomainApiCheckFreeDomainAvailabilityRequest(request, this.client.settings)),
|
|
330
|
+
headers: jsonContentHeaders,
|
|
331
|
+
method: "POST",
|
|
332
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/check-availability`
|
|
333
|
+
}, unmarshalCheckFreeDomainAvailabilityResponse);
|
|
334
|
+
this.pageOfListFreeRootDomains = (request = {}) => this.client.fetch({
|
|
335
|
+
method: "GET",
|
|
336
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/root-domains`,
|
|
337
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
338
|
+
}, unmarshalListFreeRootDomainsResponse);
|
|
339
|
+
this.listFreeRootDomains = (request = {}) => enrichForPagination("rootDomains", this.pageOfListFreeRootDomains, request);
|
|
340
|
+
}
|
|
341
|
+
static {
|
|
342
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
343
|
+
"fr-par",
|
|
344
|
+
"nl-ams",
|
|
345
|
+
"pl-waw"
|
|
346
|
+
] });
|
|
347
|
+
}
|
|
609
348
|
};
|
|
610
349
|
/**
|
|
611
350
|
* Web Hosting FTP Account API.
|
|
@@ -613,55 +352,38 @@ var FreeDomainAPI = class extends API {
|
|
|
613
352
|
This API allows you to manage your FTP accounts for your Web Hosting services.
|
|
614
353
|
*/
|
|
615
354
|
var FtpAccountAPI = class extends API {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
listFtpAccounts = (request) => enrichForPagination("ftpAccounts", this.pageOfListFtpAccounts, request);
|
|
649
|
-
/**
|
|
650
|
-
* Delete a specific FTP account within your hosting plan.. Delete a specific FTP account within your hosting plan.
|
|
651
|
-
*
|
|
652
|
-
* @param request - The request {@link FtpAccountApiRemoveFtpAccountRequest}
|
|
653
|
-
* @returns A Promise of FtpAccount
|
|
654
|
-
*/
|
|
655
|
-
removeFtpAccount = (request) => this.client.fetch({
|
|
656
|
-
method: "DELETE",
|
|
657
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/ftp-accounts/${validatePathParam("username", request.username)}`
|
|
658
|
-
}, unmarshalFtpAccount);
|
|
659
|
-
changeFtpAccountPassword = (request) => this.client.fetch({
|
|
660
|
-
body: JSON.stringify(marshalFtpAccountApiChangeFtpAccountPasswordRequest(request, this.client.settings)),
|
|
661
|
-
headers: jsonContentHeaders,
|
|
662
|
-
method: "POST",
|
|
663
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/ftp-accounts/${validatePathParam("username", request.username)}/change-password`
|
|
664
|
-
}, unmarshalFtpAccount);
|
|
355
|
+
constructor(..._args8) {
|
|
356
|
+
super(..._args8);
|
|
357
|
+
this.createFtpAccount = (request) => this.client.fetch({
|
|
358
|
+
body: JSON.stringify(marshalFtpAccountApiCreateFtpAccountRequest(request, this.client.settings)),
|
|
359
|
+
headers: jsonContentHeaders,
|
|
360
|
+
method: "POST",
|
|
361
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/ftp-accounts`
|
|
362
|
+
}, unmarshalFtpAccount);
|
|
363
|
+
this.pageOfListFtpAccounts = (request) => this.client.fetch({
|
|
364
|
+
method: "GET",
|
|
365
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/ftp-accounts`,
|
|
366
|
+
urlParams: urlParams(["domain", request.domain], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
367
|
+
}, unmarshalListFtpAccountsResponse);
|
|
368
|
+
this.listFtpAccounts = (request) => enrichForPagination("ftpAccounts", this.pageOfListFtpAccounts, request);
|
|
369
|
+
this.removeFtpAccount = (request) => this.client.fetch({
|
|
370
|
+
method: "DELETE",
|
|
371
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/ftp-accounts/${validatePathParam("username", request.username)}`
|
|
372
|
+
}, unmarshalFtpAccount);
|
|
373
|
+
this.changeFtpAccountPassword = (request) => this.client.fetch({
|
|
374
|
+
body: JSON.stringify(marshalFtpAccountApiChangeFtpAccountPasswordRequest(request, this.client.settings)),
|
|
375
|
+
headers: jsonContentHeaders,
|
|
376
|
+
method: "POST",
|
|
377
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/ftp-accounts/${validatePathParam("username", request.username)}/change-password`
|
|
378
|
+
}, unmarshalFtpAccount);
|
|
379
|
+
}
|
|
380
|
+
static {
|
|
381
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
382
|
+
"fr-par",
|
|
383
|
+
"nl-ams",
|
|
384
|
+
"pl-waw"
|
|
385
|
+
] });
|
|
386
|
+
}
|
|
665
387
|
};
|
|
666
388
|
/**
|
|
667
389
|
* Web Hosting Mail Account API.
|
|
@@ -669,63 +391,40 @@ var FtpAccountAPI = class extends API {
|
|
|
669
391
|
This API allows you to manage your mail accounts for your Web Hosting services.
|
|
670
392
|
*/
|
|
671
393
|
var MailAccountAPI = class extends API {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
* Delete a mail account within your hosting plan.. Delete a mail account within your hosting plan.
|
|
707
|
-
*
|
|
708
|
-
* @param request - The request {@link MailAccountApiRemoveMailAccountRequest}
|
|
709
|
-
* @returns A Promise of MailAccount
|
|
710
|
-
*/
|
|
711
|
-
removeMailAccount = (request) => this.client.fetch({
|
|
712
|
-
body: JSON.stringify(marshalMailAccountApiRemoveMailAccountRequest(request, this.client.settings)),
|
|
713
|
-
headers: jsonContentHeaders,
|
|
714
|
-
method: "POST",
|
|
715
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/remove-mail-account`
|
|
716
|
-
}, unmarshalMailAccount);
|
|
717
|
-
/**
|
|
718
|
-
* Update the password of a mail account within your hosting plan.. Update the password of a mail account within your hosting plan.
|
|
719
|
-
*
|
|
720
|
-
* @param request - The request {@link MailAccountApiChangeMailAccountPasswordRequest}
|
|
721
|
-
* @returns A Promise of MailAccount
|
|
722
|
-
*/
|
|
723
|
-
changeMailAccountPassword = (request) => this.client.fetch({
|
|
724
|
-
body: JSON.stringify(marshalMailAccountApiChangeMailAccountPasswordRequest(request, this.client.settings)),
|
|
725
|
-
headers: jsonContentHeaders,
|
|
726
|
-
method: "POST",
|
|
727
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/change-mail-password`
|
|
728
|
-
}, unmarshalMailAccount);
|
|
394
|
+
constructor(..._args9) {
|
|
395
|
+
super(..._args9);
|
|
396
|
+
this.createMailAccount = (request) => this.client.fetch({
|
|
397
|
+
body: JSON.stringify(marshalMailAccountApiCreateMailAccountRequest(request, this.client.settings)),
|
|
398
|
+
headers: jsonContentHeaders,
|
|
399
|
+
method: "POST",
|
|
400
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/mail-accounts`
|
|
401
|
+
}, unmarshalMailAccount);
|
|
402
|
+
this.pageOfListMailAccounts = (request) => this.client.fetch({
|
|
403
|
+
method: "GET",
|
|
404
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/mail-accounts`,
|
|
405
|
+
urlParams: urlParams(["domain", request.domain], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
406
|
+
}, unmarshalListMailAccountsResponse);
|
|
407
|
+
this.listMailAccounts = (request) => enrichForPagination("mailAccounts", this.pageOfListMailAccounts, request);
|
|
408
|
+
this.removeMailAccount = (request) => this.client.fetch({
|
|
409
|
+
body: JSON.stringify(marshalMailAccountApiRemoveMailAccountRequest(request, this.client.settings)),
|
|
410
|
+
headers: jsonContentHeaders,
|
|
411
|
+
method: "POST",
|
|
412
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/remove-mail-account`
|
|
413
|
+
}, unmarshalMailAccount);
|
|
414
|
+
this.changeMailAccountPassword = (request) => this.client.fetch({
|
|
415
|
+
body: JSON.stringify(marshalMailAccountApiChangeMailAccountPasswordRequest(request, this.client.settings)),
|
|
416
|
+
headers: jsonContentHeaders,
|
|
417
|
+
method: "POST",
|
|
418
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/change-mail-password`
|
|
419
|
+
}, unmarshalMailAccount);
|
|
420
|
+
}
|
|
421
|
+
static {
|
|
422
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
423
|
+
"fr-par",
|
|
424
|
+
"nl-ams",
|
|
425
|
+
"pl-waw"
|
|
426
|
+
] });
|
|
427
|
+
}
|
|
729
428
|
};
|
|
730
429
|
/**
|
|
731
430
|
* Web Hosting Website API.
|
|
@@ -733,61 +432,38 @@ var MailAccountAPI = class extends API {
|
|
|
733
432
|
This API allows you to manage your websites for your Web Hosting services.
|
|
734
433
|
*/
|
|
735
434
|
var WebsiteAPI = class extends API {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
"
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
}, unmarshalWebsite);
|
|
769
|
-
/**
|
|
770
|
-
* Delete a website from a webhosting.
|
|
771
|
-
*
|
|
772
|
-
* @param request - The request {@link WebsiteApiDeleteWebsiteRequest}
|
|
773
|
-
*/
|
|
774
|
-
deleteWebsite = (request) => this.client.fetch({
|
|
775
|
-
method: "DELETE",
|
|
776
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/websites/${validatePathParam("domainName", request.domainName)}`
|
|
777
|
-
});
|
|
778
|
-
/**
|
|
779
|
-
* Delete a website's content, all files and directories. This. Permanently deletes data including files and configurations. The
|
|
780
|
-
website will display the default welcome page.
|
|
781
|
-
*
|
|
782
|
-
* @param request - The request {@link WebsiteApiResetWebsiteRequest}
|
|
783
|
-
* @returns A Promise of Website
|
|
784
|
-
*/
|
|
785
|
-
resetWebsite = (request) => this.client.fetch({
|
|
786
|
-
body: "{}",
|
|
787
|
-
headers: jsonContentHeaders,
|
|
788
|
-
method: "POST",
|
|
789
|
-
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/websites/${validatePathParam("domainName", request.domainName)}/reset`
|
|
790
|
-
}, unmarshalWebsite);
|
|
435
|
+
constructor(..._args10) {
|
|
436
|
+
super(..._args10);
|
|
437
|
+
this.pageOfListWebsites = (request) => this.client.fetch({
|
|
438
|
+
method: "GET",
|
|
439
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/websites`,
|
|
440
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
441
|
+
}, unmarshalListWebsitesResponse);
|
|
442
|
+
this.listWebsites = (request) => enrichForPagination("websites", this.pageOfListWebsites, request);
|
|
443
|
+
this.createWebsite = (request) => this.client.fetch({
|
|
444
|
+
body: JSON.stringify(marshalWebsiteApiCreateWebsiteRequest(request, this.client.settings)),
|
|
445
|
+
headers: jsonContentHeaders,
|
|
446
|
+
method: "POST",
|
|
447
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/websites`
|
|
448
|
+
}, unmarshalWebsite);
|
|
449
|
+
this.deleteWebsite = (request) => this.client.fetch({
|
|
450
|
+
method: "DELETE",
|
|
451
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/websites/${validatePathParam("domainName", request.domainName)}`
|
|
452
|
+
});
|
|
453
|
+
this.resetWebsite = (request) => this.client.fetch({
|
|
454
|
+
body: "{}",
|
|
455
|
+
headers: jsonContentHeaders,
|
|
456
|
+
method: "POST",
|
|
457
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/websites/${validatePathParam("domainName", request.domainName)}/reset`
|
|
458
|
+
}, unmarshalWebsite);
|
|
459
|
+
}
|
|
460
|
+
static {
|
|
461
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
462
|
+
"fr-par",
|
|
463
|
+
"nl-ams",
|
|
464
|
+
"pl-waw"
|
|
465
|
+
] });
|
|
466
|
+
}
|
|
791
467
|
};
|
|
792
468
|
//#endregion
|
|
793
469
|
export { BackupAPI, ControlPanelAPI, DatabaseAPI, DnsAPI, FreeDomainAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI };
|