@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.
- package/LICENSE +191 -0
- package/dist/index.gen.cjs +4 -0
- package/dist/index.gen.d.ts +5 -0
- package/dist/index.gen.js +4 -0
- package/dist/v1/api.gen.cjs +747 -0
- package/dist/v1/api.gen.d.ts +362 -0
- package/dist/v1/api.gen.js +747 -0
- package/dist/v1/content.gen.cjs +12 -0
- package/dist/v1/content.gen.d.ts +7 -0
- package/dist/v1/content.gen.js +12 -0
- package/dist/v1/index.gen.cjs +52 -0
- package/dist/v1/index.gen.d.ts +5 -0
- package/dist/v1/index.gen.js +52 -0
- package/dist/v1/marshalling.gen.cjs +578 -0
- package/dist/v1/marshalling.gen.d.ts +36 -0
- package/dist/v1/marshalling.gen.js +578 -0
- package/dist/v1/types.gen.d.ts +1303 -0
- package/dist/v1/validation-rules.gen.cjs +82 -0
- package/dist/v1/validation-rules.gen.d.ts +72 -0
- package/dist/v1/validation-rules.gen.js +82 -0
- package/package.json +51 -0
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const sdkClient = require("@scaleway/sdk-client");
|
|
4
|
+
const unmarshalDatabaseUser = (data) => {
|
|
5
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
6
|
+
throw new TypeError(
|
|
7
|
+
`Unmarshalling the type 'DatabaseUser' failed as data isn't a dictionary.`
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
databases: data.databases,
|
|
12
|
+
username: data.username
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const unmarshalDatabase = (data) => {
|
|
16
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
17
|
+
throw new TypeError(
|
|
18
|
+
`Unmarshalling the type 'Database' failed as data isn't a dictionary.`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
databaseName: data.database_name,
|
|
23
|
+
users: data.users
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
const unmarshalFtpAccount = (data) => {
|
|
27
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
28
|
+
throw new TypeError(
|
|
29
|
+
`Unmarshalling the type 'FtpAccount' failed as data isn't a dictionary.`
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
path: data.path,
|
|
34
|
+
username: data.username
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const unmarshalMailAccount = (data) => {
|
|
38
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
39
|
+
throw new TypeError(
|
|
40
|
+
`Unmarshalling the type 'MailAccount' failed as data isn't a dictionary.`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
domain: data.domain,
|
|
45
|
+
username: data.username
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
const unmarshalCheckUserOwnsDomainResponse = (data) => {
|
|
49
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
50
|
+
throw new TypeError(
|
|
51
|
+
`Unmarshalling the type 'CheckUserOwnsDomainResponse' failed as data isn't a dictionary.`
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
ownsDomain: data.owns_domain
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
const unmarshalAutoConfigDomainDns = (data) => {
|
|
59
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
60
|
+
throw new TypeError(
|
|
61
|
+
`Unmarshalling the type 'AutoConfigDomainDns' failed as data isn't a dictionary.`
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
allRecords: data.all_records,
|
|
66
|
+
mailRecords: data.mail_records,
|
|
67
|
+
nameservers: data.nameservers,
|
|
68
|
+
none: data.none,
|
|
69
|
+
webRecords: data.web_records
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
const unmarshalDnsRecord = (data) => {
|
|
73
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
74
|
+
throw new TypeError(
|
|
75
|
+
`Unmarshalling the type 'DnsRecord' failed as data isn't a dictionary.`
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
name: data.name,
|
|
80
|
+
priority: data.priority,
|
|
81
|
+
rawData: data.raw_data,
|
|
82
|
+
status: data.status,
|
|
83
|
+
ttl: data.ttl,
|
|
84
|
+
type: data.type,
|
|
85
|
+
value: data.value
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
const unmarshalNameserver = (data) => {
|
|
89
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
90
|
+
throw new TypeError(
|
|
91
|
+
`Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
hostname: data.hostname,
|
|
96
|
+
isDefault: data.is_default,
|
|
97
|
+
status: data.status
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
const unmarshalDnsRecords = (data) => {
|
|
101
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
102
|
+
throw new TypeError(
|
|
103
|
+
`Unmarshalling the type 'DnsRecords' failed as data isn't a dictionary.`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
|
|
108
|
+
dnsConfig: data.dns_config ? data.dns_config : void 0,
|
|
109
|
+
nameServers: sdkClient.unmarshalArrayOfObject(data.name_servers, unmarshalNameserver),
|
|
110
|
+
records: sdkClient.unmarshalArrayOfObject(data.records, unmarshalDnsRecord),
|
|
111
|
+
status: data.status
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
const unmarshalDomain = (data) => {
|
|
115
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
116
|
+
throw new TypeError(
|
|
117
|
+
`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
|
|
122
|
+
availableActions: data.available_actions,
|
|
123
|
+
availableDnsActions: data.available_dns_actions ? data.available_dns_actions : void 0,
|
|
124
|
+
name: data.name,
|
|
125
|
+
owner: data.owner,
|
|
126
|
+
status: data.status
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
const unmarshalPlatformControlPanelUrls = (data) => {
|
|
130
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
131
|
+
throw new TypeError(
|
|
132
|
+
`Unmarshalling the type 'PlatformControlPanelUrls' failed as data isn't a dictionary.`
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
dashboard: data.dashboard,
|
|
137
|
+
webmail: data.webmail
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
const unmarshalOfferOption = (data) => {
|
|
141
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
142
|
+
throw new TypeError(
|
|
143
|
+
`Unmarshalling the type 'OfferOption' failed as data isn't a dictionary.`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
billingOperationPath: data.billing_operation_path,
|
|
148
|
+
currentValue: data.current_value,
|
|
149
|
+
id: data.id,
|
|
150
|
+
maxValue: data.max_value,
|
|
151
|
+
minValue: data.min_value,
|
|
152
|
+
name: data.name,
|
|
153
|
+
price: data.price ? sdkClient.unmarshalMoney(data.price) : void 0,
|
|
154
|
+
quotaWarning: data.quota_warning
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
const unmarshalPlatformControlPanel = (data) => {
|
|
158
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
159
|
+
throw new TypeError(
|
|
160
|
+
`Unmarshalling the type 'PlatformControlPanel' failed as data isn't a dictionary.`
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
name: data.name,
|
|
165
|
+
urls: data.urls ? unmarshalPlatformControlPanelUrls(data.urls) : void 0
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
const unmarshalHostingUser = (data) => {
|
|
169
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
170
|
+
throw new TypeError(
|
|
171
|
+
`Unmarshalling the type 'HostingUser' failed as data isn't a dictionary.`
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
contactEmail: data.contact_email,
|
|
176
|
+
oneTimePassword: data.one_time_password,
|
|
177
|
+
username: data.username
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
const unmarshalOffer = (data) => {
|
|
181
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
182
|
+
throw new TypeError(
|
|
183
|
+
`Unmarshalling the type 'Offer' failed as data isn't a dictionary.`
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
return {
|
|
187
|
+
available: data.available,
|
|
188
|
+
billingOperationPath: data.billing_operation_path,
|
|
189
|
+
controlPanelName: data.control_panel_name,
|
|
190
|
+
endOfLife: data.end_of_life,
|
|
191
|
+
id: data.id,
|
|
192
|
+
name: data.name,
|
|
193
|
+
options: sdkClient.unmarshalArrayOfObject(data.options, unmarshalOfferOption),
|
|
194
|
+
price: data.price ? sdkClient.unmarshalMoney(data.price) : void 0,
|
|
195
|
+
quotaWarning: data.quota_warning
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
const unmarshalPlatform = (data) => {
|
|
199
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
200
|
+
throw new TypeError(
|
|
201
|
+
`Unmarshalling the type 'Platform' failed as data isn't a dictionary.`
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
controlPanel: data.control_panel ? unmarshalPlatformControlPanel(data.control_panel) : void 0,
|
|
206
|
+
groupName: data.group_name,
|
|
207
|
+
hostname: data.hostname,
|
|
208
|
+
ipv4: data.ipv4,
|
|
209
|
+
ipv6: data.ipv6,
|
|
210
|
+
number: data.number
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
const unmarshalHosting = (data) => {
|
|
214
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
215
|
+
throw new TypeError(
|
|
216
|
+
`Unmarshalling the type 'Hosting' failed as data isn't a dictionary.`
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
221
|
+
dnsStatus: data.dns_status ? data.dns_status : void 0,
|
|
222
|
+
domain: data.domain,
|
|
223
|
+
domainStatus: data.domain_status,
|
|
224
|
+
id: data.id,
|
|
225
|
+
ipv4: data.ipv4,
|
|
226
|
+
offer: data.offer ? unmarshalOffer(data.offer) : void 0,
|
|
227
|
+
platform: data.platform ? unmarshalPlatform(data.platform) : void 0,
|
|
228
|
+
projectId: data.project_id,
|
|
229
|
+
protected: data.protected,
|
|
230
|
+
region: data.region,
|
|
231
|
+
status: data.status,
|
|
232
|
+
tags: data.tags,
|
|
233
|
+
updatedAt: sdkClient.unmarshalDate(data.updated_at),
|
|
234
|
+
user: data.user ? unmarshalHostingUser(data.user) : void 0
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
const unmarshalControlPanel = (data) => {
|
|
238
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
239
|
+
throw new TypeError(
|
|
240
|
+
`Unmarshalling the type 'ControlPanel' failed as data isn't a dictionary.`
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
return {
|
|
244
|
+
available: data.available,
|
|
245
|
+
availableLanguages: data.available_languages,
|
|
246
|
+
logoUrl: data.logo_url,
|
|
247
|
+
name: data.name
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
const unmarshalListControlPanelsResponse = (data) => {
|
|
251
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
252
|
+
throw new TypeError(
|
|
253
|
+
`Unmarshalling the type 'ListControlPanelsResponse' failed as data isn't a dictionary.`
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
controlPanels: sdkClient.unmarshalArrayOfObject(
|
|
258
|
+
data.control_panels,
|
|
259
|
+
unmarshalControlPanel
|
|
260
|
+
),
|
|
261
|
+
totalCount: data.total_count
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
const unmarshalListDatabaseUsersResponse = (data) => {
|
|
265
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
266
|
+
throw new TypeError(
|
|
267
|
+
`Unmarshalling the type 'ListDatabaseUsersResponse' failed as data isn't a dictionary.`
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
return {
|
|
271
|
+
totalCount: data.total_count,
|
|
272
|
+
users: sdkClient.unmarshalArrayOfObject(data.users, unmarshalDatabaseUser)
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
const unmarshalListDatabasesResponse = (data) => {
|
|
276
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
277
|
+
throw new TypeError(
|
|
278
|
+
`Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
return {
|
|
282
|
+
databases: sdkClient.unmarshalArrayOfObject(data.databases, unmarshalDatabase),
|
|
283
|
+
totalCount: data.total_count
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
const unmarshalListFtpAccountsResponse = (data) => {
|
|
287
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
288
|
+
throw new TypeError(
|
|
289
|
+
`Unmarshalling the type 'ListFtpAccountsResponse' failed as data isn't a dictionary.`
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
return {
|
|
293
|
+
ftpAccounts: sdkClient.unmarshalArrayOfObject(data.ftp_accounts, unmarshalFtpAccount),
|
|
294
|
+
totalCount: data.total_count
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
const unmarshalHostingSummary = (data) => {
|
|
298
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
299
|
+
throw new TypeError(
|
|
300
|
+
`Unmarshalling the type 'HostingSummary' failed as data isn't a dictionary.`
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
305
|
+
dnsStatus: data.dns_status ? data.dns_status : void 0,
|
|
306
|
+
domain: data.domain,
|
|
307
|
+
domainStatus: data.domain_status,
|
|
308
|
+
id: data.id,
|
|
309
|
+
offerName: data.offer_name,
|
|
310
|
+
projectId: data.project_id,
|
|
311
|
+
protected: data.protected,
|
|
312
|
+
region: data.region,
|
|
313
|
+
status: data.status,
|
|
314
|
+
updatedAt: sdkClient.unmarshalDate(data.updated_at)
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
const unmarshalListHostingsResponse = (data) => {
|
|
318
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
319
|
+
throw new TypeError(
|
|
320
|
+
`Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary.`
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
return {
|
|
324
|
+
hostings: sdkClient.unmarshalArrayOfObject(data.hostings, unmarshalHostingSummary),
|
|
325
|
+
totalCount: data.total_count
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
const unmarshalListMailAccountsResponse = (data) => {
|
|
329
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
330
|
+
throw new TypeError(
|
|
331
|
+
`Unmarshalling the type 'ListMailAccountsResponse' failed as data isn't a dictionary.`
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
return {
|
|
335
|
+
mailAccounts: sdkClient.unmarshalArrayOfObject(
|
|
336
|
+
data.mail_accounts,
|
|
337
|
+
unmarshalMailAccount
|
|
338
|
+
),
|
|
339
|
+
totalCount: data.total_count
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
const unmarshalListOffersResponse = (data) => {
|
|
343
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
344
|
+
throw new TypeError(
|
|
345
|
+
`Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
return {
|
|
349
|
+
offers: sdkClient.unmarshalArrayOfObject(data.offers, unmarshalOffer),
|
|
350
|
+
totalCount: data.total_count
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
const unmarshalWebsite = (data) => {
|
|
354
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
355
|
+
throw new TypeError(
|
|
356
|
+
`Unmarshalling the type 'Website' failed as data isn't a dictionary.`
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
return {
|
|
360
|
+
domain: data.domain,
|
|
361
|
+
path: data.path,
|
|
362
|
+
sslStatus: data.ssl_status
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
const unmarshalListWebsitesResponse = (data) => {
|
|
366
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
367
|
+
throw new TypeError(
|
|
368
|
+
`Unmarshalling the type 'ListWebsitesResponse' failed as data isn't a dictionary.`
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
return {
|
|
372
|
+
totalCount: data.total_count,
|
|
373
|
+
websites: sdkClient.unmarshalArrayOfObject(data.websites, unmarshalWebsite)
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
const unmarshalResetHostingPasswordResponse = (data) => {
|
|
377
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
378
|
+
throw new TypeError(
|
|
379
|
+
`Unmarshalling the type 'ResetHostingPasswordResponse' failed as data isn't a dictionary.`
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
return {
|
|
383
|
+
oneTimePassword: data.one_time_password
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
const unmarshalResourceSummary = (data) => {
|
|
387
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
388
|
+
throw new TypeError(
|
|
389
|
+
`Unmarshalling the type 'ResourceSummary' failed as data isn't a dictionary.`
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
return {
|
|
393
|
+
databasesCount: data.databases_count,
|
|
394
|
+
ftpAccountsCount: data.ftp_accounts_count,
|
|
395
|
+
mailAccountsCount: data.mail_accounts_count,
|
|
396
|
+
websitesCount: data.websites_count
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
const unmarshalDomainAvailability = (data) => {
|
|
400
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
401
|
+
throw new TypeError(
|
|
402
|
+
`Unmarshalling the type 'DomainAvailability' failed as data isn't a dictionary.`
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
return {
|
|
406
|
+
availableActions: data.available_actions,
|
|
407
|
+
canCreateHosting: data.can_create_hosting,
|
|
408
|
+
name: data.name,
|
|
409
|
+
price: data.price ? sdkClient.unmarshalMoney(data.price) : void 0,
|
|
410
|
+
status: data.status,
|
|
411
|
+
zoneName: data.zone_name
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
const unmarshalSearchDomainsResponse = (data) => {
|
|
415
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
416
|
+
throw new TypeError(
|
|
417
|
+
`Unmarshalling the type 'SearchDomainsResponse' failed as data isn't a dictionary.`
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
return {
|
|
421
|
+
domainsAvailable: sdkClient.unmarshalArrayOfObject(
|
|
422
|
+
data.domains_available,
|
|
423
|
+
unmarshalDomainAvailability
|
|
424
|
+
)
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
const unmarshalSession = (data) => {
|
|
428
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
429
|
+
throw new TypeError(
|
|
430
|
+
`Unmarshalling the type 'Session' failed as data isn't a dictionary.`
|
|
431
|
+
);
|
|
432
|
+
}
|
|
433
|
+
return {
|
|
434
|
+
url: data.url
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
const marshalDatabaseApiAssignDatabaseUserRequest = (request, defaults) => ({
|
|
438
|
+
username: request.username
|
|
439
|
+
});
|
|
440
|
+
const marshalDatabaseApiChangeDatabaseUserPasswordRequest = (request, defaults) => ({
|
|
441
|
+
password: request.password
|
|
442
|
+
});
|
|
443
|
+
const marshalCreateDatabaseRequestUser = (request, defaults) => ({
|
|
444
|
+
password: request.password,
|
|
445
|
+
username: request.username
|
|
446
|
+
});
|
|
447
|
+
const marshalDatabaseApiCreateDatabaseRequest = (request, defaults) => ({
|
|
448
|
+
database_name: request.databaseName,
|
|
449
|
+
...sdkClient.resolveOneOf([
|
|
450
|
+
{
|
|
451
|
+
param: "new_user",
|
|
452
|
+
value: request.newUser !== void 0 ? marshalCreateDatabaseRequestUser(request.newUser) : void 0
|
|
453
|
+
},
|
|
454
|
+
{ param: "existing_username", value: request.existingUsername }
|
|
455
|
+
])
|
|
456
|
+
});
|
|
457
|
+
const marshalDatabaseApiCreateDatabaseUserRequest = (request, defaults) => ({
|
|
458
|
+
password: request.password,
|
|
459
|
+
username: request.username
|
|
460
|
+
});
|
|
461
|
+
const marshalDatabaseApiUnassignDatabaseUserRequest = (request, defaults) => ({
|
|
462
|
+
username: request.username
|
|
463
|
+
});
|
|
464
|
+
const marshalDnsApiCheckUserOwnsDomainRequest = (request, defaults) => ({
|
|
465
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
466
|
+
});
|
|
467
|
+
const marshalAutoConfigDomainDns = (request, defaults) => ({
|
|
468
|
+
all_records: request.allRecords,
|
|
469
|
+
mail_records: request.mailRecords,
|
|
470
|
+
nameservers: request.nameservers,
|
|
471
|
+
none: request.none,
|
|
472
|
+
web_records: request.webRecords
|
|
473
|
+
});
|
|
474
|
+
const marshalSyncDomainDnsRecordsRequestRecord = (request, defaults) => ({
|
|
475
|
+
name: request.name,
|
|
476
|
+
type: request.type
|
|
477
|
+
});
|
|
478
|
+
const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
|
|
479
|
+
auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
|
|
480
|
+
custom_records: request.customRecords !== void 0 ? request.customRecords.map(
|
|
481
|
+
(elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)
|
|
482
|
+
) : void 0,
|
|
483
|
+
update_all_records: request.updateAllRecords,
|
|
484
|
+
update_mail_records: request.updateMailRecords,
|
|
485
|
+
update_nameservers: request.updateNameservers,
|
|
486
|
+
update_web_records: request.updateWebRecords
|
|
487
|
+
});
|
|
488
|
+
const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({
|
|
489
|
+
password: request.password
|
|
490
|
+
});
|
|
491
|
+
const marshalFtpAccountApiCreateFtpAccountRequest = (request, defaults) => ({
|
|
492
|
+
password: request.password,
|
|
493
|
+
path: request.path,
|
|
494
|
+
username: request.username
|
|
495
|
+
});
|
|
496
|
+
const marshalCreateHostingRequestDomainConfiguration = (request, defaults) => ({
|
|
497
|
+
update_all_records: request.updateAllRecords,
|
|
498
|
+
update_mail_record: request.updateMailRecord,
|
|
499
|
+
update_nameservers: request.updateNameservers,
|
|
500
|
+
update_web_record: request.updateWebRecord
|
|
501
|
+
});
|
|
502
|
+
const marshalOfferOptionRequest = (request, defaults) => ({
|
|
503
|
+
id: request.id,
|
|
504
|
+
quantity: request.quantity
|
|
505
|
+
});
|
|
506
|
+
const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
|
|
507
|
+
auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
|
|
508
|
+
domain: request.domain,
|
|
509
|
+
domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(
|
|
510
|
+
request.domainConfiguration
|
|
511
|
+
) : void 0,
|
|
512
|
+
email: request.email,
|
|
513
|
+
language: request.language,
|
|
514
|
+
offer_id: request.offerId,
|
|
515
|
+
offer_options: request.offerOptions !== void 0 ? request.offerOptions.map(
|
|
516
|
+
(elt) => marshalOfferOptionRequest(elt)
|
|
517
|
+
) : void 0,
|
|
518
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
519
|
+
skip_welcome_email: request.skipWelcomeEmail,
|
|
520
|
+
tags: request.tags
|
|
521
|
+
});
|
|
522
|
+
const marshalHostingApiUpdateHostingRequest = (request, defaults) => ({
|
|
523
|
+
email: request.email,
|
|
524
|
+
offer_id: request.offerId,
|
|
525
|
+
offer_options: request.offerOptions !== void 0 ? request.offerOptions.map(
|
|
526
|
+
(elt) => marshalOfferOptionRequest(elt)
|
|
527
|
+
) : void 0,
|
|
528
|
+
protected: request.protected,
|
|
529
|
+
tags: request.tags
|
|
530
|
+
});
|
|
531
|
+
const marshalMailAccountApiChangeMailAccountPasswordRequest = (request, defaults) => ({
|
|
532
|
+
domain: request.domain,
|
|
533
|
+
password: request.password,
|
|
534
|
+
username: request.username
|
|
535
|
+
});
|
|
536
|
+
const marshalMailAccountApiCreateMailAccountRequest = (request, defaults) => ({
|
|
537
|
+
domain: request.domain,
|
|
538
|
+
password: request.password,
|
|
539
|
+
username: request.username
|
|
540
|
+
});
|
|
541
|
+
const marshalMailAccountApiRemoveMailAccountRequest = (request, defaults) => ({
|
|
542
|
+
domain: request.domain,
|
|
543
|
+
username: request.username
|
|
544
|
+
});
|
|
545
|
+
exports.marshalDatabaseApiAssignDatabaseUserRequest = marshalDatabaseApiAssignDatabaseUserRequest;
|
|
546
|
+
exports.marshalDatabaseApiChangeDatabaseUserPasswordRequest = marshalDatabaseApiChangeDatabaseUserPasswordRequest;
|
|
547
|
+
exports.marshalDatabaseApiCreateDatabaseRequest = marshalDatabaseApiCreateDatabaseRequest;
|
|
548
|
+
exports.marshalDatabaseApiCreateDatabaseUserRequest = marshalDatabaseApiCreateDatabaseUserRequest;
|
|
549
|
+
exports.marshalDatabaseApiUnassignDatabaseUserRequest = marshalDatabaseApiUnassignDatabaseUserRequest;
|
|
550
|
+
exports.marshalDnsApiCheckUserOwnsDomainRequest = marshalDnsApiCheckUserOwnsDomainRequest;
|
|
551
|
+
exports.marshalDnsApiSyncDomainDnsRecordsRequest = marshalDnsApiSyncDomainDnsRecordsRequest;
|
|
552
|
+
exports.marshalFtpAccountApiChangeFtpAccountPasswordRequest = marshalFtpAccountApiChangeFtpAccountPasswordRequest;
|
|
553
|
+
exports.marshalFtpAccountApiCreateFtpAccountRequest = marshalFtpAccountApiCreateFtpAccountRequest;
|
|
554
|
+
exports.marshalHostingApiCreateHostingRequest = marshalHostingApiCreateHostingRequest;
|
|
555
|
+
exports.marshalHostingApiUpdateHostingRequest = marshalHostingApiUpdateHostingRequest;
|
|
556
|
+
exports.marshalMailAccountApiChangeMailAccountPasswordRequest = marshalMailAccountApiChangeMailAccountPasswordRequest;
|
|
557
|
+
exports.marshalMailAccountApiCreateMailAccountRequest = marshalMailAccountApiCreateMailAccountRequest;
|
|
558
|
+
exports.marshalMailAccountApiRemoveMailAccountRequest = marshalMailAccountApiRemoveMailAccountRequest;
|
|
559
|
+
exports.unmarshalCheckUserOwnsDomainResponse = unmarshalCheckUserOwnsDomainResponse;
|
|
560
|
+
exports.unmarshalDatabase = unmarshalDatabase;
|
|
561
|
+
exports.unmarshalDatabaseUser = unmarshalDatabaseUser;
|
|
562
|
+
exports.unmarshalDnsRecords = unmarshalDnsRecords;
|
|
563
|
+
exports.unmarshalDomain = unmarshalDomain;
|
|
564
|
+
exports.unmarshalFtpAccount = unmarshalFtpAccount;
|
|
565
|
+
exports.unmarshalHosting = unmarshalHosting;
|
|
566
|
+
exports.unmarshalListControlPanelsResponse = unmarshalListControlPanelsResponse;
|
|
567
|
+
exports.unmarshalListDatabaseUsersResponse = unmarshalListDatabaseUsersResponse;
|
|
568
|
+
exports.unmarshalListDatabasesResponse = unmarshalListDatabasesResponse;
|
|
569
|
+
exports.unmarshalListFtpAccountsResponse = unmarshalListFtpAccountsResponse;
|
|
570
|
+
exports.unmarshalListHostingsResponse = unmarshalListHostingsResponse;
|
|
571
|
+
exports.unmarshalListMailAccountsResponse = unmarshalListMailAccountsResponse;
|
|
572
|
+
exports.unmarshalListOffersResponse = unmarshalListOffersResponse;
|
|
573
|
+
exports.unmarshalListWebsitesResponse = unmarshalListWebsitesResponse;
|
|
574
|
+
exports.unmarshalMailAccount = unmarshalMailAccount;
|
|
575
|
+
exports.unmarshalResetHostingPasswordResponse = unmarshalResetHostingPasswordResponse;
|
|
576
|
+
exports.unmarshalResourceSummary = unmarshalResourceSummary;
|
|
577
|
+
exports.unmarshalSearchDomainsResponse = unmarshalSearchDomainsResponse;
|
|
578
|
+
exports.unmarshalSession = unmarshalSession;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
+
import type { CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, ResourceSummary, SearchDomainsResponse, Session } from './types.gen';
|
|
3
|
+
export declare const unmarshalDatabaseUser: (data: unknown) => DatabaseUser;
|
|
4
|
+
export declare const unmarshalDatabase: (data: unknown) => Database;
|
|
5
|
+
export declare const unmarshalFtpAccount: (data: unknown) => FtpAccount;
|
|
6
|
+
export declare const unmarshalMailAccount: (data: unknown) => MailAccount;
|
|
7
|
+
export declare const unmarshalCheckUserOwnsDomainResponse: (data: unknown) => CheckUserOwnsDomainResponse;
|
|
8
|
+
export declare const unmarshalDnsRecords: (data: unknown) => DnsRecords;
|
|
9
|
+
export declare const unmarshalDomain: (data: unknown) => Domain;
|
|
10
|
+
export declare const unmarshalHosting: (data: unknown) => Hosting;
|
|
11
|
+
export declare const unmarshalListControlPanelsResponse: (data: unknown) => ListControlPanelsResponse;
|
|
12
|
+
export declare const unmarshalListDatabaseUsersResponse: (data: unknown) => ListDatabaseUsersResponse;
|
|
13
|
+
export declare const unmarshalListDatabasesResponse: (data: unknown) => ListDatabasesResponse;
|
|
14
|
+
export declare const unmarshalListFtpAccountsResponse: (data: unknown) => ListFtpAccountsResponse;
|
|
15
|
+
export declare const unmarshalListHostingsResponse: (data: unknown) => ListHostingsResponse;
|
|
16
|
+
export declare const unmarshalListMailAccountsResponse: (data: unknown) => ListMailAccountsResponse;
|
|
17
|
+
export declare const unmarshalListOffersResponse: (data: unknown) => ListOffersResponse;
|
|
18
|
+
export declare const unmarshalListWebsitesResponse: (data: unknown) => ListWebsitesResponse;
|
|
19
|
+
export declare const unmarshalResetHostingPasswordResponse: (data: unknown) => ResetHostingPasswordResponse;
|
|
20
|
+
export declare const unmarshalResourceSummary: (data: unknown) => ResourceSummary;
|
|
21
|
+
export declare const unmarshalSearchDomainsResponse: (data: unknown) => SearchDomainsResponse;
|
|
22
|
+
export declare const unmarshalSession: (data: unknown) => Session;
|
|
23
|
+
export declare const marshalDatabaseApiAssignDatabaseUserRequest: (request: DatabaseApiAssignDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
24
|
+
export declare const marshalDatabaseApiChangeDatabaseUserPasswordRequest: (request: DatabaseApiChangeDatabaseUserPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
25
|
+
export declare const marshalDatabaseApiCreateDatabaseRequest: (request: DatabaseApiCreateDatabaseRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
26
|
+
export declare const marshalDatabaseApiCreateDatabaseUserRequest: (request: DatabaseApiCreateDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
27
|
+
export declare const marshalDatabaseApiUnassignDatabaseUserRequest: (request: DatabaseApiUnassignDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
28
|
+
export declare const marshalDnsApiCheckUserOwnsDomainRequest: (request: DnsApiCheckUserOwnsDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
29
|
+
export declare const marshalDnsApiSyncDomainDnsRecordsRequest: (request: DnsApiSyncDomainDnsRecordsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
30
|
+
export declare const marshalFtpAccountApiChangeFtpAccountPasswordRequest: (request: FtpAccountApiChangeFtpAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
31
|
+
export declare const marshalFtpAccountApiCreateFtpAccountRequest: (request: FtpAccountApiCreateFtpAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
32
|
+
export declare const marshalHostingApiCreateHostingRequest: (request: HostingApiCreateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
33
|
+
export declare const marshalHostingApiUpdateHostingRequest: (request: HostingApiUpdateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
34
|
+
export declare const marshalMailAccountApiChangeMailAccountPasswordRequest: (request: MailAccountApiChangeMailAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
35
|
+
export declare const marshalMailAccountApiCreateMailAccountRequest: (request: MailAccountApiCreateMailAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
36
|
+
export declare const marshalMailAccountApiRemoveMailAccountRequest: (request: MailAccountApiRemoveMailAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
|