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