@scaleway/sdk 2.46.0 → 2.48.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/api/baremetal/v1/api.gen.cjs +36 -1
- package/dist/api/baremetal/v1/api.gen.d.ts +17 -1
- package/dist/api/baremetal/v1/api.gen.js +37 -2
- package/dist/api/baremetal/v1/index.gen.d.ts +1 -1
- package/dist/api/baremetal/v1/marshalling.gen.cjs +200 -0
- package/dist/api/baremetal/v1/marshalling.gen.d.ts +4 -1
- package/dist/api/baremetal/v1/marshalling.gen.js +200 -0
- package/dist/api/baremetal/v1/types.gen.d.ts +74 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.cjs +1 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.js +1 -0
- package/dist/api/billing/v2alpha1/types.gen.d.ts +2 -0
- package/dist/api/billing/v2beta1/marshalling.gen.cjs +1 -0
- package/dist/api/billing/v2beta1/marshalling.gen.js +1 -0
- package/dist/api/billing/v2beta1/types.gen.d.ts +2 -0
- package/dist/api/edge_services/v1alpha1/api.gen.cjs +636 -0
- package/dist/api/edge_services/v1alpha1/api.gen.d.ts +5 -1
- package/dist/api/edge_services/v1alpha1/api.gen.js +636 -0
- package/dist/api/edge_services/v1alpha1/content.gen.cjs +8 -0
- package/dist/api/edge_services/v1alpha1/content.gen.js +8 -0
- package/dist/api/edge_services/v1alpha1/index.gen.cjs +7 -0
- package/dist/api/edge_services/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/edge_services/v1alpha1/index.gen.js +7 -0
- package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +474 -0
- package/dist/api/edge_services/v1alpha1/marshalling.gen.d.ts +5 -2
- package/dist/api/edge_services/v1alpha1/marshalling.gen.js +474 -0
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +51 -28
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +1 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/iam/v1alpha1/types.gen.d.ts +2 -0
- package/dist/api/index.d.ts +65 -35
- package/dist/api/inference/v1beta1/api.gen.cjs +306 -0
- package/dist/api/inference/v1beta1/api.gen.js +306 -0
- package/dist/api/inference/v1beta1/content.gen.cjs +8 -0
- package/dist/api/inference/v1beta1/content.gen.js +8 -0
- package/dist/api/inference/v1beta1/index.gen.cjs +8 -0
- package/dist/api/inference/v1beta1/index.gen.js +8 -0
- package/dist/api/inference/v1beta1/marshalling.gen.cjs +273 -0
- package/dist/api/inference/v1beta1/marshalling.gen.js +273 -0
- package/dist/api/inference/v1beta1/validation-rules.gen.cjs +56 -0
- package/dist/api/inference/v1beta1/validation-rules.gen.js +56 -0
- package/dist/api/k8s/v1/marshalling.gen.cjs +1 -0
- package/dist/api/k8s/v1/marshalling.gen.js +1 -0
- package/dist/api/k8s/v1/types.gen.d.ts +2 -0
- package/dist/api/k8s/v1/validation-rules.gen.cjs +63 -0
- package/dist/api/k8s/v1/validation-rules.gen.d.ts +60 -0
- package/dist/api/k8s/v1/validation-rules.gen.js +64 -1
- package/dist/api/mnq/index.gen.cjs +4 -0
- package/dist/api/mnq/index.gen.js +4 -0
- package/dist/api/qaas/v1alpha1/api.gen.cjs +527 -0
- package/dist/api/qaas/v1alpha1/api.gen.js +527 -0
- package/dist/api/qaas/v1alpha1/content.gen.cjs +19 -0
- package/dist/api/qaas/v1alpha1/content.gen.js +19 -0
- package/dist/api/qaas/v1alpha1/index.gen.cjs +10 -0
- package/dist/api/qaas/v1alpha1/index.gen.js +10 -0
- package/dist/api/qaas/v1alpha1/marshalling.gen.cjs +320 -0
- package/dist/api/qaas/v1alpha1/marshalling.gen.js +320 -0
- package/dist/api/qaas/v1alpha1/validation-rules.gen.cjs +14 -0
- package/dist/api/qaas/v1alpha1/validation-rules.gen.js +14 -0
- package/dist/api/tem/index.gen.cjs +4 -0
- package/dist/api/tem/index.gen.js +4 -0
- package/dist/api/tem/v1alpha1/api.gen.cjs +32 -0
- package/dist/api/tem/v1alpha1/api.gen.d.ts +17 -1
- package/dist/api/tem/v1alpha1/api.gen.js +33 -1
- package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +36 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +3 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +36 -0
- package/dist/api/tem/v1alpha1/types.gen.d.ts +51 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +11 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +10 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.js +11 -0
- package/dist/api/webhosting/index.gen.cjs +6 -0
- package/dist/api/webhosting/index.gen.js +6 -0
- package/dist/api/webhosting/v1/api.gen.cjs +620 -0
- package/dist/api/webhosting/v1/api.gen.js +620 -0
- package/dist/api/webhosting/v1/content.gen.cjs +14 -0
- package/dist/api/webhosting/v1/content.gen.js +14 -0
- package/dist/api/webhosting/v1/index.gen.cjs +15 -0
- package/dist/api/webhosting/v1/index.gen.js +15 -0
- package/dist/api/webhosting/v1/marshalling.gen.cjs +391 -0
- package/dist/api/webhosting/v1/marshalling.gen.js +391 -0
- package/dist/api/webhosting/v1/types.gen.d.ts +5 -0
- package/dist/api/webhosting/v1/validation-rules.gen.cjs +82 -0
- package/dist/api/webhosting/v1/validation-rules.gen.js +82 -0
- package/dist/index.cjs +92 -70
- package/dist/index.js +92 -70
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
- package/dist/api/account/index.d.ts +0 -2
- package/dist/api/applesilicon/index.d.ts +0 -1
- package/dist/api/baremetal/index.d.ts +0 -1
- package/dist/api/billing/index.d.ts +0 -2
- package/dist/api/block/index.d.ts +0 -1
- package/dist/api/cockpit/index.d.ts +0 -2
- package/dist/api/container/index.d.ts +0 -1
- package/dist/api/dedibox/index.d.ts +0 -1
- package/dist/api/document_db/index.d.ts +0 -1
- package/dist/api/domain/index.d.ts +0 -1
- package/dist/api/edge_services/index.d.ts +0 -1
- package/dist/api/flexibleip/index.d.ts +0 -1
- package/dist/api/function/index.d.ts +0 -1
- package/dist/api/iam/index.d.ts +0 -1
- package/dist/api/instance/index.d.ts +0 -1
- package/dist/api/iot/index.d.ts +0 -1
- package/dist/api/ipam/index.d.ts +0 -1
- package/dist/api/ipfs/index.d.ts +0 -1
- package/dist/api/jobs/index.d.ts +0 -1
- package/dist/api/k8s/index.d.ts +0 -1
- package/dist/api/key_manager/index.d.ts +0 -1
- package/dist/api/lb/index.d.ts +0 -1
- package/dist/api/llm_inference/index.d.ts +0 -1
- package/dist/api/marketplace/index.d.ts +0 -1
- package/dist/api/mnq/index.d.ts +0 -1
- package/dist/api/rdb/index.d.ts +0 -1
- package/dist/api/redis/index.d.ts +0 -1
- package/dist/api/registry/index.d.ts +0 -1
- package/dist/api/secret/index.d.ts +0 -2
- package/dist/api/serverless_sqldb/index.d.ts +0 -1
- package/dist/api/tem/index.d.ts +0 -1
- package/dist/api/test/index.d.ts +0 -1
- package/dist/api/vpc/index.d.ts +0 -2
- package/dist/api/vpcgw/index.d.ts +0 -1
- package/dist/api/webhosting/index.d.ts +0 -1
- /package/dist/api/account/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/account/{index.js → index.gen.js} +0 -0
- /package/dist/api/applesilicon/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/applesilicon/{index.js → index.gen.js} +0 -0
- /package/dist/api/baremetal/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/baremetal/{index.js → index.gen.js} +0 -0
- /package/dist/api/billing/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/billing/{index.js → index.gen.js} +0 -0
- /package/dist/api/block/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/block/{index.js → index.gen.js} +0 -0
- /package/dist/api/cockpit/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/cockpit/{index.js → index.gen.js} +0 -0
- /package/dist/api/container/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/container/{index.js → index.gen.js} +0 -0
- /package/dist/api/dedibox/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/dedibox/{index.js → index.gen.js} +0 -0
- /package/dist/api/document_db/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/document_db/{index.js → index.gen.js} +0 -0
- /package/dist/api/domain/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/domain/{index.js → index.gen.js} +0 -0
- /package/dist/api/{flexibleip/index.cjs → edge_services/index.gen.cjs} +0 -0
- /package/dist/api/{flexibleip/index.js → edge_services/index.gen.js} +0 -0
- /package/dist/api/{iam/index.cjs → flexibleip/index.gen.cjs} +0 -0
- /package/dist/api/{iam/index.js → flexibleip/index.gen.js} +0 -0
- /package/dist/api/function/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/function/{index.js → index.gen.js} +0 -0
- /package/dist/api/{ipfs/index.cjs → iam/index.gen.cjs} +0 -0
- /package/dist/api/{ipfs/index.js → iam/index.gen.js} +0 -0
- /package/dist/api/{llm_inference/index.cjs → inference/index.gen.cjs} +0 -0
- /package/dist/api/{llm_inference/index.js → inference/index.gen.js} +0 -0
- /package/dist/api/instance/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/instance/{index.js → index.gen.js} +0 -0
- /package/dist/api/iot/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/iot/{index.js → index.gen.js} +0 -0
- /package/dist/api/ipam/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/ipam/{index.js → index.gen.js} +0 -0
- /package/dist/api/{jobs/index.cjs → ipfs/index.gen.cjs} +0 -0
- /package/dist/api/{jobs/index.js → ipfs/index.gen.js} +0 -0
- /package/dist/api/{key_manager/index.cjs → jobs/index.gen.cjs} +0 -0
- /package/dist/api/{key_manager/index.js → jobs/index.gen.js} +0 -0
- /package/dist/api/k8s/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/k8s/{index.js → index.gen.js} +0 -0
- /package/dist/api/{serverless_sqldb/index.cjs → key_manager/index.gen.cjs} +0 -0
- /package/dist/api/{serverless_sqldb/index.js → key_manager/index.gen.js} +0 -0
- /package/dist/api/lb/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/lb/{index.js → index.gen.js} +0 -0
- /package/dist/api/{mnq/index.cjs → llm_inference/index.gen.cjs} +0 -0
- /package/dist/api/{mnq/index.js → llm_inference/index.gen.js} +0 -0
- /package/dist/api/marketplace/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/marketplace/{index.js → index.gen.js} +0 -0
- /package/dist/api/{tem/index.cjs → qaas/index.gen.cjs} +0 -0
- /package/dist/api/{tem/index.js → qaas/index.gen.js} +0 -0
- /package/dist/api/rdb/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/rdb/{index.js → index.gen.js} +0 -0
- /package/dist/api/redis/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/redis/{index.js → index.gen.js} +0 -0
- /package/dist/api/registry/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/registry/{index.js → index.gen.js} +0 -0
- /package/dist/api/secret/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/secret/{index.js → index.gen.js} +0 -0
- /package/dist/api/{webhosting/index.cjs → serverless_sqldb/index.gen.cjs} +0 -0
- /package/dist/api/{webhosting/index.js → serverless_sqldb/index.gen.js} +0 -0
- /package/dist/api/test/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/test/{index.js → index.gen.js} +0 -0
- /package/dist/api/vpc/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/vpc/{index.js → index.gen.js} +0 -0
- /package/dist/api/vpcgw/{index.cjs → index.gen.cjs} +0 -0
- /package/dist/api/vpcgw/{index.js → index.gen.js} +0 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const json = require("../../../helpers/json.cjs");
|
|
4
|
+
const customMarshalling = require("../../../scw/custom-marshalling.cjs");
|
|
5
|
+
const marshalling = require("../../../helpers/marshalling.cjs");
|
|
6
|
+
const unmarshalDatabaseUser = (data) => {
|
|
7
|
+
if (!json.isJSONObject(data)) {
|
|
8
|
+
throw new TypeError(
|
|
9
|
+
`Unmarshalling the type 'DatabaseUser' failed as data isn't a dictionary.`
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
databases: data.databases,
|
|
14
|
+
username: data.username
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const unmarshalDatabase = (data) => {
|
|
18
|
+
if (!json.isJSONObject(data)) {
|
|
19
|
+
throw new TypeError(
|
|
20
|
+
`Unmarshalling the type 'Database' failed as data isn't a dictionary.`
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
databaseName: data.database_name,
|
|
25
|
+
users: data.users
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
const unmarshalFtpAccount = (data) => {
|
|
29
|
+
if (!json.isJSONObject(data)) {
|
|
30
|
+
throw new TypeError(
|
|
31
|
+
`Unmarshalling the type 'FtpAccount' failed as data isn't a dictionary.`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
path: data.path,
|
|
36
|
+
username: data.username
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
const unmarshalMailAccount = (data) => {
|
|
40
|
+
if (!json.isJSONObject(data)) {
|
|
41
|
+
throw new TypeError(
|
|
42
|
+
`Unmarshalling the type 'MailAccount' failed as data isn't a dictionary.`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
domain: data.domain,
|
|
47
|
+
username: data.username
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
const unmarshalHostingCpanelUrls = (data) => {
|
|
51
|
+
if (!json.isJSONObject(data)) {
|
|
52
|
+
throw new TypeError(
|
|
53
|
+
`Unmarshalling the type 'HostingCpanelUrls' failed as data isn't a dictionary.`
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
dashboard: data.dashboard,
|
|
58
|
+
webmail: data.webmail
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
const unmarshalHostingOption = (data) => {
|
|
62
|
+
if (!json.isJSONObject(data)) {
|
|
63
|
+
throw new TypeError(
|
|
64
|
+
`Unmarshalling the type 'HostingOption' failed as data isn't a dictionary.`
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
id: data.id,
|
|
69
|
+
name: data.name,
|
|
70
|
+
quantity: data.quantity
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
const unmarshalHosting = (data) => {
|
|
74
|
+
if (!json.isJSONObject(data)) {
|
|
75
|
+
throw new TypeError(
|
|
76
|
+
`Unmarshalling the type 'Hosting' failed as data isn't a dictionary.`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
contactEmail: data.contact_email,
|
|
81
|
+
controlPanelName: data.control_panel_name,
|
|
82
|
+
cpanelUrls: data.cpanel_urls ? unmarshalHostingCpanelUrls(data.cpanel_urls) : void 0,
|
|
83
|
+
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
84
|
+
dnsStatus: data.dns_status,
|
|
85
|
+
domain: data.domain,
|
|
86
|
+
id: data.id,
|
|
87
|
+
ipv4: data.ipv4,
|
|
88
|
+
ipv6: data.ipv6,
|
|
89
|
+
offerEndOfLife: data.offer_end_of_life,
|
|
90
|
+
offerId: data.offer_id,
|
|
91
|
+
offerName: data.offer_name,
|
|
92
|
+
oneTimePassword: data.one_time_password,
|
|
93
|
+
options: marshalling.unmarshalArrayOfObject(data.options, unmarshalHostingOption),
|
|
94
|
+
platformGroup: data.platform_group,
|
|
95
|
+
platformHostname: data.platform_hostname,
|
|
96
|
+
platformNumber: data.platform_number,
|
|
97
|
+
projectId: data.project_id,
|
|
98
|
+
protected: data.protected,
|
|
99
|
+
region: data.region,
|
|
100
|
+
status: data.status,
|
|
101
|
+
tags: data.tags,
|
|
102
|
+
updatedAt: marshalling.unmarshalDate(data.updated_at),
|
|
103
|
+
username: data.username
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
const unmarshalControlPanel = (data) => {
|
|
107
|
+
if (!json.isJSONObject(data)) {
|
|
108
|
+
throw new TypeError(
|
|
109
|
+
`Unmarshalling the type 'ControlPanel' failed as data isn't a dictionary.`
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
available: data.available,
|
|
114
|
+
availableLanguages: data.available_languages,
|
|
115
|
+
logoUrl: data.logo_url,
|
|
116
|
+
name: data.name
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
const unmarshalListControlPanelsResponse = (data) => {
|
|
120
|
+
if (!json.isJSONObject(data)) {
|
|
121
|
+
throw new TypeError(
|
|
122
|
+
`Unmarshalling the type 'ListControlPanelsResponse' failed as data isn't a dictionary.`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
controlPanels: marshalling.unmarshalArrayOfObject(
|
|
127
|
+
data.control_panels,
|
|
128
|
+
unmarshalControlPanel
|
|
129
|
+
),
|
|
130
|
+
totalCount: data.total_count
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
const unmarshalListDatabaseUsersResponse = (data) => {
|
|
134
|
+
if (!json.isJSONObject(data)) {
|
|
135
|
+
throw new TypeError(
|
|
136
|
+
`Unmarshalling the type 'ListDatabaseUsersResponse' failed as data isn't a dictionary.`
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
totalCount: data.total_count,
|
|
141
|
+
users: marshalling.unmarshalArrayOfObject(data.users, unmarshalDatabaseUser)
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
const unmarshalListDatabasesResponse = (data) => {
|
|
145
|
+
if (!json.isJSONObject(data)) {
|
|
146
|
+
throw new TypeError(
|
|
147
|
+
`Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
databases: marshalling.unmarshalArrayOfObject(data.databases, unmarshalDatabase),
|
|
152
|
+
totalCount: data.total_count
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
const unmarshalListFtpAccountsResponse = (data) => {
|
|
156
|
+
if (!json.isJSONObject(data)) {
|
|
157
|
+
throw new TypeError(
|
|
158
|
+
`Unmarshalling the type 'ListFtpAccountsResponse' failed as data isn't a dictionary.`
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
ftpAccounts: marshalling.unmarshalArrayOfObject(data.ftp_accounts, unmarshalFtpAccount),
|
|
163
|
+
totalCount: data.total_count
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
const unmarshalHostingSummary = (data) => {
|
|
167
|
+
if (!json.isJSONObject(data)) {
|
|
168
|
+
throw new TypeError(
|
|
169
|
+
`Unmarshalling the type 'HostingSummary' failed as data isn't a dictionary.`
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
domain: data.domain,
|
|
174
|
+
id: data.id,
|
|
175
|
+
projectId: data.project_id,
|
|
176
|
+
protected: data.protected,
|
|
177
|
+
region: data.region,
|
|
178
|
+
status: data.status,
|
|
179
|
+
updatedAt: marshalling.unmarshalDate(data.updated_at)
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
const unmarshalListHostingsResponse = (data) => {
|
|
183
|
+
if (!json.isJSONObject(data)) {
|
|
184
|
+
throw new TypeError(
|
|
185
|
+
`Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary.`
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
hostings: marshalling.unmarshalArrayOfObject(data.hostings, unmarshalHostingSummary),
|
|
190
|
+
totalCount: data.total_count
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
const unmarshalListMailAccountsResponse = (data) => {
|
|
194
|
+
if (!json.isJSONObject(data)) {
|
|
195
|
+
throw new TypeError(
|
|
196
|
+
`Unmarshalling the type 'ListMailAccountsResponse' failed as data isn't a dictionary.`
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
mailAccounts: marshalling.unmarshalArrayOfObject(
|
|
201
|
+
data.mail_accounts,
|
|
202
|
+
unmarshalMailAccount
|
|
203
|
+
),
|
|
204
|
+
totalCount: data.total_count
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
const unmarshalOfferOption = (data) => {
|
|
208
|
+
if (!json.isJSONObject(data)) {
|
|
209
|
+
throw new TypeError(
|
|
210
|
+
`Unmarshalling the type 'OfferOption' failed as data isn't a dictionary.`
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
billingOperationPath: data.billing_operation_path,
|
|
215
|
+
currentValue: data.current_value,
|
|
216
|
+
id: data.id,
|
|
217
|
+
maxValue: data.max_value,
|
|
218
|
+
minValue: data.min_value,
|
|
219
|
+
name: data.name,
|
|
220
|
+
quotaWarning: data.quota_warning
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
const unmarshalOffer = (data) => {
|
|
224
|
+
if (!json.isJSONObject(data)) {
|
|
225
|
+
throw new TypeError(
|
|
226
|
+
`Unmarshalling the type 'Offer' failed as data isn't a dictionary.`
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
return {
|
|
230
|
+
available: data.available,
|
|
231
|
+
billingOperationPath: data.billing_operation_path,
|
|
232
|
+
controlPanelName: data.control_panel_name,
|
|
233
|
+
endOfLife: data.end_of_life,
|
|
234
|
+
id: data.id,
|
|
235
|
+
options: marshalling.unmarshalArrayOfObject(data.options, unmarshalOfferOption),
|
|
236
|
+
price: data.price ? customMarshalling.unmarshalMoney(data.price) : void 0
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
const unmarshalListOffersResponse = (data) => {
|
|
240
|
+
if (!json.isJSONObject(data)) {
|
|
241
|
+
throw new TypeError(
|
|
242
|
+
`Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
return {
|
|
246
|
+
offers: marshalling.unmarshalArrayOfObject(data.offers, unmarshalOffer),
|
|
247
|
+
totalCount: data.total_count
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
const unmarshalWebsite = (data) => {
|
|
251
|
+
if (!json.isJSONObject(data)) {
|
|
252
|
+
throw new TypeError(
|
|
253
|
+
`Unmarshalling the type 'Website' failed as data isn't a dictionary.`
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
domain: data.domain,
|
|
258
|
+
path: data.path,
|
|
259
|
+
sslStatus: data.ssl_status
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
const unmarshalListWebsitesResponse = (data) => {
|
|
263
|
+
if (!json.isJSONObject(data)) {
|
|
264
|
+
throw new TypeError(
|
|
265
|
+
`Unmarshalling the type 'ListWebsitesResponse' failed as data isn't a dictionary.`
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
return {
|
|
269
|
+
totalCount: data.total_count,
|
|
270
|
+
websites: marshalling.unmarshalArrayOfObject(data.websites, unmarshalWebsite)
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
const unmarshalResetHostingPasswordResponse = (data) => {
|
|
274
|
+
if (!json.isJSONObject(data)) {
|
|
275
|
+
throw new TypeError(
|
|
276
|
+
`Unmarshalling the type 'ResetHostingPasswordResponse' failed as data isn't a dictionary.`
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
return {
|
|
280
|
+
oneTimePassword: data.one_time_password
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
const unmarshalSession = (data) => {
|
|
284
|
+
if (!json.isJSONObject(data)) {
|
|
285
|
+
throw new TypeError(
|
|
286
|
+
`Unmarshalling the type 'Session' failed as data isn't a dictionary.`
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
return {
|
|
290
|
+
url: data.url
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
const marshalDatabaseApiAssignDatabaseUserRequest = (request, defaults) => ({
|
|
294
|
+
username: request.username
|
|
295
|
+
});
|
|
296
|
+
const marshalDatabaseApiChangeDatabaseUserPasswordRequest = (request, defaults) => ({
|
|
297
|
+
password: request.password
|
|
298
|
+
});
|
|
299
|
+
const marshalDatabaseApiCreateDatabaseRequest = (request, defaults) => ({
|
|
300
|
+
database_name: request.databaseName
|
|
301
|
+
});
|
|
302
|
+
const marshalDatabaseApiCreateDatabaseUserRequest = (request, defaults) => ({
|
|
303
|
+
password: request.password,
|
|
304
|
+
username: request.username
|
|
305
|
+
});
|
|
306
|
+
const marshalDatabaseApiUnassignDatabaseUserRequest = (request, defaults) => ({
|
|
307
|
+
username: request.username
|
|
308
|
+
});
|
|
309
|
+
const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({
|
|
310
|
+
password: request.password
|
|
311
|
+
});
|
|
312
|
+
const marshalFtpAccountApiCreateFtpAccountRequest = (request, defaults) => ({
|
|
313
|
+
password: request.password,
|
|
314
|
+
path: request.path,
|
|
315
|
+
username: request.username
|
|
316
|
+
});
|
|
317
|
+
const marshalCreateHostingRequestDomainConfiguration = (request, defaults) => ({
|
|
318
|
+
update_all_records: request.updateAllRecords,
|
|
319
|
+
update_mail_record: request.updateMailRecord,
|
|
320
|
+
update_nameservers: request.updateNameservers,
|
|
321
|
+
update_web_record: request.updateWebRecord
|
|
322
|
+
});
|
|
323
|
+
const marshalOfferOptionRequest = (request, defaults) => ({
|
|
324
|
+
id: request.id,
|
|
325
|
+
quantity: request.quantity
|
|
326
|
+
});
|
|
327
|
+
const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
|
|
328
|
+
domain: request.domain,
|
|
329
|
+
domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(
|
|
330
|
+
request.domainConfiguration
|
|
331
|
+
) : void 0,
|
|
332
|
+
email: request.email,
|
|
333
|
+
language: request.language,
|
|
334
|
+
offer_id: request.offerId,
|
|
335
|
+
offer_options: request.offerOptions !== void 0 ? request.offerOptions.map(
|
|
336
|
+
(elt) => marshalOfferOptionRequest(elt)
|
|
337
|
+
) : void 0,
|
|
338
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
339
|
+
skip_welcome_email: request.skipWelcomeEmail,
|
|
340
|
+
tags: request.tags
|
|
341
|
+
});
|
|
342
|
+
const marshalHostingApiUpdateHostingRequest = (request, defaults) => ({
|
|
343
|
+
email: request.email,
|
|
344
|
+
offer_id: request.offerId,
|
|
345
|
+
offer_options: request.offerOptions !== void 0 ? request.offerOptions.map(
|
|
346
|
+
(elt) => marshalOfferOptionRequest(elt)
|
|
347
|
+
) : void 0,
|
|
348
|
+
protected: request.protected,
|
|
349
|
+
tags: request.tags
|
|
350
|
+
});
|
|
351
|
+
const marshalMailAccountApiChangeMailAccountPasswordRequest = (request, defaults) => ({
|
|
352
|
+
domain: request.domain,
|
|
353
|
+
password: request.password,
|
|
354
|
+
username: request.username
|
|
355
|
+
});
|
|
356
|
+
const marshalMailAccountApiCreateMailAccountRequest = (request, defaults) => ({
|
|
357
|
+
domain: request.domain,
|
|
358
|
+
password: request.password,
|
|
359
|
+
username: request.username
|
|
360
|
+
});
|
|
361
|
+
const marshalMailAccountApiRemoveMailAccountRequest = (request, defaults) => ({
|
|
362
|
+
domain: request.domain,
|
|
363
|
+
username: request.username
|
|
364
|
+
});
|
|
365
|
+
exports.marshalDatabaseApiAssignDatabaseUserRequest = marshalDatabaseApiAssignDatabaseUserRequest;
|
|
366
|
+
exports.marshalDatabaseApiChangeDatabaseUserPasswordRequest = marshalDatabaseApiChangeDatabaseUserPasswordRequest;
|
|
367
|
+
exports.marshalDatabaseApiCreateDatabaseRequest = marshalDatabaseApiCreateDatabaseRequest;
|
|
368
|
+
exports.marshalDatabaseApiCreateDatabaseUserRequest = marshalDatabaseApiCreateDatabaseUserRequest;
|
|
369
|
+
exports.marshalDatabaseApiUnassignDatabaseUserRequest = marshalDatabaseApiUnassignDatabaseUserRequest;
|
|
370
|
+
exports.marshalFtpAccountApiChangeFtpAccountPasswordRequest = marshalFtpAccountApiChangeFtpAccountPasswordRequest;
|
|
371
|
+
exports.marshalFtpAccountApiCreateFtpAccountRequest = marshalFtpAccountApiCreateFtpAccountRequest;
|
|
372
|
+
exports.marshalHostingApiCreateHostingRequest = marshalHostingApiCreateHostingRequest;
|
|
373
|
+
exports.marshalHostingApiUpdateHostingRequest = marshalHostingApiUpdateHostingRequest;
|
|
374
|
+
exports.marshalMailAccountApiChangeMailAccountPasswordRequest = marshalMailAccountApiChangeMailAccountPasswordRequest;
|
|
375
|
+
exports.marshalMailAccountApiCreateMailAccountRequest = marshalMailAccountApiCreateMailAccountRequest;
|
|
376
|
+
exports.marshalMailAccountApiRemoveMailAccountRequest = marshalMailAccountApiRemoveMailAccountRequest;
|
|
377
|
+
exports.unmarshalDatabase = unmarshalDatabase;
|
|
378
|
+
exports.unmarshalDatabaseUser = unmarshalDatabaseUser;
|
|
379
|
+
exports.unmarshalFtpAccount = unmarshalFtpAccount;
|
|
380
|
+
exports.unmarshalHosting = unmarshalHosting;
|
|
381
|
+
exports.unmarshalListControlPanelsResponse = unmarshalListControlPanelsResponse;
|
|
382
|
+
exports.unmarshalListDatabaseUsersResponse = unmarshalListDatabaseUsersResponse;
|
|
383
|
+
exports.unmarshalListDatabasesResponse = unmarshalListDatabasesResponse;
|
|
384
|
+
exports.unmarshalListFtpAccountsResponse = unmarshalListFtpAccountsResponse;
|
|
385
|
+
exports.unmarshalListHostingsResponse = unmarshalListHostingsResponse;
|
|
386
|
+
exports.unmarshalListMailAccountsResponse = unmarshalListMailAccountsResponse;
|
|
387
|
+
exports.unmarshalListOffersResponse = unmarshalListOffersResponse;
|
|
388
|
+
exports.unmarshalListWebsitesResponse = unmarshalListWebsitesResponse;
|
|
389
|
+
exports.unmarshalMailAccount = unmarshalMailAccount;
|
|
390
|
+
exports.unmarshalResetHostingPasswordResponse = unmarshalResetHostingPasswordResponse;
|
|
391
|
+
exports.unmarshalSession = unmarshalSession;
|