@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.
Files changed (193) hide show
  1. package/dist/api/baremetal/v1/api.gen.cjs +36 -1
  2. package/dist/api/baremetal/v1/api.gen.d.ts +17 -1
  3. package/dist/api/baremetal/v1/api.gen.js +37 -2
  4. package/dist/api/baremetal/v1/index.gen.d.ts +1 -1
  5. package/dist/api/baremetal/v1/marshalling.gen.cjs +200 -0
  6. package/dist/api/baremetal/v1/marshalling.gen.d.ts +4 -1
  7. package/dist/api/baremetal/v1/marshalling.gen.js +200 -0
  8. package/dist/api/baremetal/v1/types.gen.d.ts +74 -0
  9. package/dist/api/billing/v2alpha1/marshalling.gen.cjs +1 -0
  10. package/dist/api/billing/v2alpha1/marshalling.gen.js +1 -0
  11. package/dist/api/billing/v2alpha1/types.gen.d.ts +2 -0
  12. package/dist/api/billing/v2beta1/marshalling.gen.cjs +1 -0
  13. package/dist/api/billing/v2beta1/marshalling.gen.js +1 -0
  14. package/dist/api/billing/v2beta1/types.gen.d.ts +2 -0
  15. package/dist/api/edge_services/v1alpha1/api.gen.cjs +636 -0
  16. package/dist/api/edge_services/v1alpha1/api.gen.d.ts +5 -1
  17. package/dist/api/edge_services/v1alpha1/api.gen.js +636 -0
  18. package/dist/api/edge_services/v1alpha1/content.gen.cjs +8 -0
  19. package/dist/api/edge_services/v1alpha1/content.gen.js +8 -0
  20. package/dist/api/edge_services/v1alpha1/index.gen.cjs +7 -0
  21. package/dist/api/edge_services/v1alpha1/index.gen.d.ts +1 -1
  22. package/dist/api/edge_services/v1alpha1/index.gen.js +7 -0
  23. package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +474 -0
  24. package/dist/api/edge_services/v1alpha1/marshalling.gen.d.ts +5 -2
  25. package/dist/api/edge_services/v1alpha1/marshalling.gen.js +474 -0
  26. package/dist/api/edge_services/v1alpha1/types.gen.d.ts +51 -28
  27. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +1 -0
  28. package/dist/api/iam/v1alpha1/marshalling.gen.js +1 -0
  29. package/dist/api/iam/v1alpha1/types.gen.d.ts +2 -0
  30. package/dist/api/index.d.ts +65 -35
  31. package/dist/api/inference/v1beta1/api.gen.cjs +306 -0
  32. package/dist/api/inference/v1beta1/api.gen.js +306 -0
  33. package/dist/api/inference/v1beta1/content.gen.cjs +8 -0
  34. package/dist/api/inference/v1beta1/content.gen.js +8 -0
  35. package/dist/api/inference/v1beta1/index.gen.cjs +8 -0
  36. package/dist/api/inference/v1beta1/index.gen.js +8 -0
  37. package/dist/api/inference/v1beta1/marshalling.gen.cjs +273 -0
  38. package/dist/api/inference/v1beta1/marshalling.gen.js +273 -0
  39. package/dist/api/inference/v1beta1/validation-rules.gen.cjs +56 -0
  40. package/dist/api/inference/v1beta1/validation-rules.gen.js +56 -0
  41. package/dist/api/k8s/v1/marshalling.gen.cjs +1 -0
  42. package/dist/api/k8s/v1/marshalling.gen.js +1 -0
  43. package/dist/api/k8s/v1/types.gen.d.ts +2 -0
  44. package/dist/api/k8s/v1/validation-rules.gen.cjs +63 -0
  45. package/dist/api/k8s/v1/validation-rules.gen.d.ts +60 -0
  46. package/dist/api/k8s/v1/validation-rules.gen.js +64 -1
  47. package/dist/api/mnq/index.gen.cjs +4 -0
  48. package/dist/api/mnq/index.gen.js +4 -0
  49. package/dist/api/qaas/v1alpha1/api.gen.cjs +527 -0
  50. package/dist/api/qaas/v1alpha1/api.gen.js +527 -0
  51. package/dist/api/qaas/v1alpha1/content.gen.cjs +19 -0
  52. package/dist/api/qaas/v1alpha1/content.gen.js +19 -0
  53. package/dist/api/qaas/v1alpha1/index.gen.cjs +10 -0
  54. package/dist/api/qaas/v1alpha1/index.gen.js +10 -0
  55. package/dist/api/qaas/v1alpha1/marshalling.gen.cjs +320 -0
  56. package/dist/api/qaas/v1alpha1/marshalling.gen.js +320 -0
  57. package/dist/api/qaas/v1alpha1/validation-rules.gen.cjs +14 -0
  58. package/dist/api/qaas/v1alpha1/validation-rules.gen.js +14 -0
  59. package/dist/api/tem/index.gen.cjs +4 -0
  60. package/dist/api/tem/index.gen.js +4 -0
  61. package/dist/api/tem/v1alpha1/api.gen.cjs +32 -0
  62. package/dist/api/tem/v1alpha1/api.gen.d.ts +17 -1
  63. package/dist/api/tem/v1alpha1/api.gen.js +33 -1
  64. package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
  65. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +36 -0
  66. package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +3 -1
  67. package/dist/api/tem/v1alpha1/marshalling.gen.js +36 -0
  68. package/dist/api/tem/v1alpha1/types.gen.d.ts +51 -0
  69. package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +11 -0
  70. package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +10 -0
  71. package/dist/api/tem/v1alpha1/validation-rules.gen.js +11 -0
  72. package/dist/api/webhosting/index.gen.cjs +6 -0
  73. package/dist/api/webhosting/index.gen.js +6 -0
  74. package/dist/api/webhosting/v1/api.gen.cjs +620 -0
  75. package/dist/api/webhosting/v1/api.gen.js +620 -0
  76. package/dist/api/webhosting/v1/content.gen.cjs +14 -0
  77. package/dist/api/webhosting/v1/content.gen.js +14 -0
  78. package/dist/api/webhosting/v1/index.gen.cjs +15 -0
  79. package/dist/api/webhosting/v1/index.gen.js +15 -0
  80. package/dist/api/webhosting/v1/marshalling.gen.cjs +391 -0
  81. package/dist/api/webhosting/v1/marshalling.gen.js +391 -0
  82. package/dist/api/webhosting/v1/types.gen.d.ts +5 -0
  83. package/dist/api/webhosting/v1/validation-rules.gen.cjs +82 -0
  84. package/dist/api/webhosting/v1/validation-rules.gen.js +82 -0
  85. package/dist/index.cjs +92 -70
  86. package/dist/index.js +92 -70
  87. package/dist/scw/constants.cjs +1 -1
  88. package/dist/scw/constants.d.ts +2 -2
  89. package/dist/scw/constants.js +1 -1
  90. package/package.json +2 -2
  91. package/dist/api/account/index.d.ts +0 -2
  92. package/dist/api/applesilicon/index.d.ts +0 -1
  93. package/dist/api/baremetal/index.d.ts +0 -1
  94. package/dist/api/billing/index.d.ts +0 -2
  95. package/dist/api/block/index.d.ts +0 -1
  96. package/dist/api/cockpit/index.d.ts +0 -2
  97. package/dist/api/container/index.d.ts +0 -1
  98. package/dist/api/dedibox/index.d.ts +0 -1
  99. package/dist/api/document_db/index.d.ts +0 -1
  100. package/dist/api/domain/index.d.ts +0 -1
  101. package/dist/api/edge_services/index.d.ts +0 -1
  102. package/dist/api/flexibleip/index.d.ts +0 -1
  103. package/dist/api/function/index.d.ts +0 -1
  104. package/dist/api/iam/index.d.ts +0 -1
  105. package/dist/api/instance/index.d.ts +0 -1
  106. package/dist/api/iot/index.d.ts +0 -1
  107. package/dist/api/ipam/index.d.ts +0 -1
  108. package/dist/api/ipfs/index.d.ts +0 -1
  109. package/dist/api/jobs/index.d.ts +0 -1
  110. package/dist/api/k8s/index.d.ts +0 -1
  111. package/dist/api/key_manager/index.d.ts +0 -1
  112. package/dist/api/lb/index.d.ts +0 -1
  113. package/dist/api/llm_inference/index.d.ts +0 -1
  114. package/dist/api/marketplace/index.d.ts +0 -1
  115. package/dist/api/mnq/index.d.ts +0 -1
  116. package/dist/api/rdb/index.d.ts +0 -1
  117. package/dist/api/redis/index.d.ts +0 -1
  118. package/dist/api/registry/index.d.ts +0 -1
  119. package/dist/api/secret/index.d.ts +0 -2
  120. package/dist/api/serverless_sqldb/index.d.ts +0 -1
  121. package/dist/api/tem/index.d.ts +0 -1
  122. package/dist/api/test/index.d.ts +0 -1
  123. package/dist/api/vpc/index.d.ts +0 -2
  124. package/dist/api/vpcgw/index.d.ts +0 -1
  125. package/dist/api/webhosting/index.d.ts +0 -1
  126. /package/dist/api/account/{index.cjs → index.gen.cjs} +0 -0
  127. /package/dist/api/account/{index.js → index.gen.js} +0 -0
  128. /package/dist/api/applesilicon/{index.cjs → index.gen.cjs} +0 -0
  129. /package/dist/api/applesilicon/{index.js → index.gen.js} +0 -0
  130. /package/dist/api/baremetal/{index.cjs → index.gen.cjs} +0 -0
  131. /package/dist/api/baremetal/{index.js → index.gen.js} +0 -0
  132. /package/dist/api/billing/{index.cjs → index.gen.cjs} +0 -0
  133. /package/dist/api/billing/{index.js → index.gen.js} +0 -0
  134. /package/dist/api/block/{index.cjs → index.gen.cjs} +0 -0
  135. /package/dist/api/block/{index.js → index.gen.js} +0 -0
  136. /package/dist/api/cockpit/{index.cjs → index.gen.cjs} +0 -0
  137. /package/dist/api/cockpit/{index.js → index.gen.js} +0 -0
  138. /package/dist/api/container/{index.cjs → index.gen.cjs} +0 -0
  139. /package/dist/api/container/{index.js → index.gen.js} +0 -0
  140. /package/dist/api/dedibox/{index.cjs → index.gen.cjs} +0 -0
  141. /package/dist/api/dedibox/{index.js → index.gen.js} +0 -0
  142. /package/dist/api/document_db/{index.cjs → index.gen.cjs} +0 -0
  143. /package/dist/api/document_db/{index.js → index.gen.js} +0 -0
  144. /package/dist/api/domain/{index.cjs → index.gen.cjs} +0 -0
  145. /package/dist/api/domain/{index.js → index.gen.js} +0 -0
  146. /package/dist/api/{flexibleip/index.cjs → edge_services/index.gen.cjs} +0 -0
  147. /package/dist/api/{flexibleip/index.js → edge_services/index.gen.js} +0 -0
  148. /package/dist/api/{iam/index.cjs → flexibleip/index.gen.cjs} +0 -0
  149. /package/dist/api/{iam/index.js → flexibleip/index.gen.js} +0 -0
  150. /package/dist/api/function/{index.cjs → index.gen.cjs} +0 -0
  151. /package/dist/api/function/{index.js → index.gen.js} +0 -0
  152. /package/dist/api/{ipfs/index.cjs → iam/index.gen.cjs} +0 -0
  153. /package/dist/api/{ipfs/index.js → iam/index.gen.js} +0 -0
  154. /package/dist/api/{llm_inference/index.cjs → inference/index.gen.cjs} +0 -0
  155. /package/dist/api/{llm_inference/index.js → inference/index.gen.js} +0 -0
  156. /package/dist/api/instance/{index.cjs → index.gen.cjs} +0 -0
  157. /package/dist/api/instance/{index.js → index.gen.js} +0 -0
  158. /package/dist/api/iot/{index.cjs → index.gen.cjs} +0 -0
  159. /package/dist/api/iot/{index.js → index.gen.js} +0 -0
  160. /package/dist/api/ipam/{index.cjs → index.gen.cjs} +0 -0
  161. /package/dist/api/ipam/{index.js → index.gen.js} +0 -0
  162. /package/dist/api/{jobs/index.cjs → ipfs/index.gen.cjs} +0 -0
  163. /package/dist/api/{jobs/index.js → ipfs/index.gen.js} +0 -0
  164. /package/dist/api/{key_manager/index.cjs → jobs/index.gen.cjs} +0 -0
  165. /package/dist/api/{key_manager/index.js → jobs/index.gen.js} +0 -0
  166. /package/dist/api/k8s/{index.cjs → index.gen.cjs} +0 -0
  167. /package/dist/api/k8s/{index.js → index.gen.js} +0 -0
  168. /package/dist/api/{serverless_sqldb/index.cjs → key_manager/index.gen.cjs} +0 -0
  169. /package/dist/api/{serverless_sqldb/index.js → key_manager/index.gen.js} +0 -0
  170. /package/dist/api/lb/{index.cjs → index.gen.cjs} +0 -0
  171. /package/dist/api/lb/{index.js → index.gen.js} +0 -0
  172. /package/dist/api/{mnq/index.cjs → llm_inference/index.gen.cjs} +0 -0
  173. /package/dist/api/{mnq/index.js → llm_inference/index.gen.js} +0 -0
  174. /package/dist/api/marketplace/{index.cjs → index.gen.cjs} +0 -0
  175. /package/dist/api/marketplace/{index.js → index.gen.js} +0 -0
  176. /package/dist/api/{tem/index.cjs → qaas/index.gen.cjs} +0 -0
  177. /package/dist/api/{tem/index.js → qaas/index.gen.js} +0 -0
  178. /package/dist/api/rdb/{index.cjs → index.gen.cjs} +0 -0
  179. /package/dist/api/rdb/{index.js → index.gen.js} +0 -0
  180. /package/dist/api/redis/{index.cjs → index.gen.cjs} +0 -0
  181. /package/dist/api/redis/{index.js → index.gen.js} +0 -0
  182. /package/dist/api/registry/{index.cjs → index.gen.cjs} +0 -0
  183. /package/dist/api/registry/{index.js → index.gen.js} +0 -0
  184. /package/dist/api/secret/{index.cjs → index.gen.cjs} +0 -0
  185. /package/dist/api/secret/{index.js → index.gen.js} +0 -0
  186. /package/dist/api/{webhosting/index.cjs → serverless_sqldb/index.gen.cjs} +0 -0
  187. /package/dist/api/{webhosting/index.js → serverless_sqldb/index.gen.js} +0 -0
  188. /package/dist/api/test/{index.cjs → index.gen.cjs} +0 -0
  189. /package/dist/api/test/{index.js → index.gen.js} +0 -0
  190. /package/dist/api/vpc/{index.cjs → index.gen.cjs} +0 -0
  191. /package/dist/api/vpc/{index.js → index.gen.js} +0 -0
  192. /package/dist/api/vpcgw/{index.cjs → index.gen.cjs} +0 -0
  193. /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
+ };