@scaleway/sdk 2.58.0 → 2.59.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 (40) hide show
  1. package/dist/api/audit_trail/v1alpha1/index.gen.d.ts +1 -1
  2. package/dist/api/audit_trail/v1alpha1/marshalling.gen.cjs +12 -0
  3. package/dist/api/audit_trail/v1alpha1/marshalling.gen.js +12 -0
  4. package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +9 -0
  5. package/dist/api/iam/v1alpha1/api.gen.cjs +54 -0
  6. package/dist/api/iam/v1alpha1/api.gen.d.ts +26 -1
  7. package/dist/api/iam/v1alpha1/api.gen.js +55 -1
  8. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  9. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +23 -0
  10. package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +4 -1
  11. package/dist/api/iam/v1alpha1/marshalling.gen.js +23 -0
  12. package/dist/api/iam/v1alpha1/types.gen.d.ts +29 -1
  13. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +8 -0
  14. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +7 -0
  15. package/dist/api/iam/v1alpha1/validation-rules.gen.js +9 -1
  16. package/dist/api/marketplace/v2/types.gen.d.ts +5 -2
  17. package/dist/api/vpcgw/index.gen.cjs +2 -0
  18. package/dist/api/vpcgw/index.gen.d.ts +1 -0
  19. package/dist/api/vpcgw/index.gen.js +3 -1
  20. package/dist/api/vpcgw/v2/api.gen.cjs +517 -0
  21. package/dist/api/vpcgw/v2/api.gen.d.ts +267 -0
  22. package/dist/api/vpcgw/v2/api.gen.js +517 -0
  23. package/dist/api/vpcgw/v2/content.gen.cjs +15 -0
  24. package/dist/api/vpcgw/v2/content.gen.d.ts +5 -0
  25. package/dist/api/vpcgw/v2/content.gen.js +15 -0
  26. package/dist/api/vpcgw/v2/index.gen.cjs +7 -0
  27. package/dist/api/vpcgw/v2/index.gen.d.ts +3 -0
  28. package/dist/api/vpcgw/v2/index.gen.js +7 -0
  29. package/dist/api/vpcgw/v2/marshalling.gen.cjs +259 -0
  30. package/dist/api/vpcgw/v2/marshalling.gen.d.ts +22 -0
  31. package/dist/api/vpcgw/v2/marshalling.gen.js +259 -0
  32. package/dist/api/vpcgw/v2/types.gen.d.ts +450 -0
  33. package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
  34. package/dist/api/webhosting/v1/marshalling.gen.cjs +14 -1
  35. package/dist/api/webhosting/v1/marshalling.gen.js +15 -2
  36. package/dist/api/webhosting/v1/types.gen.d.ts +20 -0
  37. package/dist/scw/constants.cjs +1 -1
  38. package/dist/scw/constants.d.ts +2 -2
  39. package/dist/scw/constants.js +1 -1
  40. package/package.json +2 -2
@@ -0,0 +1,450 @@
1
+ import type { Zone } from '../../../bridge';
2
+ export type GatewayNetworkStatus = 'unknown_status' | 'created' | 'attaching' | 'configuring' | 'ready' | 'detaching';
3
+ export type GatewayStatus = 'unknown_status' | 'stopped' | 'allocating' | 'configuring' | 'running' | 'stopping' | 'failed' | 'deleting' | 'locked';
4
+ export type ListGatewayNetworksRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'status_asc' | 'status_desc';
5
+ export type ListGatewaysRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'type_asc' | 'type_desc' | 'status_asc' | 'status_desc';
6
+ export type ListIPsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'address_asc' | 'address_desc' | 'reverse_asc' | 'reverse_desc';
7
+ export type ListPatRulesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'public_port_asc' | 'public_port_desc';
8
+ export type PatRuleProtocol = 'unknown_protocol' | 'both' | 'tcp' | 'udp';
9
+ export interface GatewayNetwork {
10
+ /** ID of the Public Gateway-Private Network connection. */
11
+ id: string;
12
+ /** Connection creation date. */
13
+ createdAt?: Date;
14
+ /** Connection last modification date. */
15
+ updatedAt?: Date;
16
+ /** ID of the connected Public Gateway. */
17
+ gatewayId: string;
18
+ /** ID of the connected Private Network. */
19
+ privateNetworkId: string;
20
+ /**
21
+ * MAC address of the gateway in the Private Network (if the gateway is up and
22
+ * running).
23
+ */
24
+ macAddress?: string;
25
+ /**
26
+ * Defines whether the gateway masquerades traffic for this Private Network
27
+ * (Dynamic NAT).
28
+ */
29
+ masqueradeEnabled: boolean;
30
+ /** Current status of the Public Gateway's connection to the Private Network. */
31
+ status: GatewayNetworkStatus;
32
+ /** Enabling the default route also enables masquerading. */
33
+ pushDefaultRoute: boolean;
34
+ /** Use this IPAM-booked IP ID as the Gateway's IP in this Private Network. */
35
+ ipamIpId: string;
36
+ /** Zone of the GatewayNetwork connection. */
37
+ zone: Zone;
38
+ }
39
+ export interface IP {
40
+ /** IP address ID. */
41
+ id: string;
42
+ /** Owning Organization. */
43
+ organizationId: string;
44
+ /** Owning Project. */
45
+ projectId: string;
46
+ /** IP address creation date. */
47
+ createdAt?: Date;
48
+ /** IP address last modification date. */
49
+ updatedAt?: Date;
50
+ /** Tags associated with the IP address. */
51
+ tags: string[];
52
+ /** The IP address itself. */
53
+ address: string;
54
+ /** Reverse domain name for the IP address. */
55
+ reverse?: string;
56
+ /** Public Gateway associated with the IP address. */
57
+ gatewayId?: string;
58
+ /** Zone of the IP address. */
59
+ zone: Zone;
60
+ }
61
+ export interface GatewayType {
62
+ /** Public Gateway type name. */
63
+ name: string;
64
+ /**
65
+ * Bandwidth, in bps, of the Public Gateway. This is the public bandwidth to
66
+ * the outer Internet, and the internal bandwidth to each connected Private
67
+ * Networks.
68
+ */
69
+ bandwidth: number;
70
+ /** Zone the Public Gateway type is available in. */
71
+ zone: Zone;
72
+ }
73
+ export interface Gateway {
74
+ /** ID of the gateway. */
75
+ id: string;
76
+ /** Owning Organization. */
77
+ organizationId: string;
78
+ /** Owning Project. */
79
+ projectId: string;
80
+ /** Gateway creation date. */
81
+ createdAt?: Date;
82
+ /** Gateway last modification date. */
83
+ updatedAt?: Date;
84
+ /** Gateway type name (commercial offer). */
85
+ type: string;
86
+ /** Bandwidth available of the gateway. */
87
+ bandwidth: number;
88
+ /** Current status of the gateway. */
89
+ status: GatewayStatus;
90
+ /** Name of the gateway. */
91
+ name: string;
92
+ /** Tags associated with the gateway. */
93
+ tags: string[];
94
+ /** Public IPv4 address of the gateway. */
95
+ ipv4?: IP;
96
+ /**
97
+ * GatewayNetwork objects attached to the gateway (each one represents a
98
+ * connection to a Private Network).
99
+ */
100
+ gatewayNetworks: GatewayNetwork[];
101
+ /** Version of the running gateway software. */
102
+ version?: string;
103
+ /** Newly available gateway software version that can be updated to. */
104
+ canUpgradeTo?: string;
105
+ /** Defines whether SSH bastion is enabled on the gateway. */
106
+ bastionEnabled: boolean;
107
+ /** Port of the SSH bastion. */
108
+ bastionPort: number;
109
+ /** Defines whether SMTP traffic is allowed to pass through the gateway. */
110
+ smtpEnabled: boolean;
111
+ /** Defines whether the gateway uses non-IPAM IP configurations. */
112
+ isLegacy: boolean;
113
+ /** Zone of the gateway. */
114
+ zone: Zone;
115
+ }
116
+ export interface PatRule {
117
+ /** PAT rule ID. */
118
+ id: string;
119
+ /** Gateway the PAT rule applies to. */
120
+ gatewayId: string;
121
+ /** PAT rule creation date. */
122
+ createdAt?: Date;
123
+ /** PAT rule last modification date. */
124
+ updatedAt?: Date;
125
+ /** Public port to listen on. */
126
+ publicPort: number;
127
+ /** Private IP address to forward data to. */
128
+ privateIp: string;
129
+ /** Private port to translate to. */
130
+ privatePort: number;
131
+ /** Protocol the rule applies to. */
132
+ protocol: PatRuleProtocol;
133
+ /** Zone of the PAT rule. */
134
+ zone: Zone;
135
+ }
136
+ export interface SetPatRulesRequestRule {
137
+ /**
138
+ * Public port to listen on. Uniquely identifies the rule, and a matching rule
139
+ * will be updated with the new parameters.
140
+ */
141
+ publicPort: number;
142
+ /** Private IP to forward data to. */
143
+ privateIp: string;
144
+ /** Private port to translate to. */
145
+ privatePort: number;
146
+ /** Protocol the rule should apply to. */
147
+ protocol: PatRuleProtocol;
148
+ }
149
+ export type CreateGatewayNetworkRequest = {
150
+ /** Zone to target. If none is passed will use default zone from the config. */
151
+ zone?: Zone;
152
+ /** Public Gateway to connect. */
153
+ gatewayId: string;
154
+ /** Private Network to connect. */
155
+ privateNetworkId: string;
156
+ /** Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork. */
157
+ enableMasquerade: boolean;
158
+ /** Enabling the default route also enables masquerading. */
159
+ pushDefaultRoute: boolean;
160
+ /** Use this IPAM-booked IP ID as the Gateway's IP in this Private Network. */
161
+ ipamIpId?: string;
162
+ };
163
+ export type CreateGatewayRequest = {
164
+ /** Zone to target. If none is passed will use default zone from the config. */
165
+ zone?: Zone;
166
+ /** Scaleway Project to create the gateway in. */
167
+ projectId?: string;
168
+ /** Name for the gateway. */
169
+ name?: string;
170
+ /** Tags for the gateway. */
171
+ tags?: string[];
172
+ /** Gateway type (commercial offer type). */
173
+ type: string;
174
+ /** Existing IP address to attach to the gateway. */
175
+ ipId?: string;
176
+ /** Defines whether SMTP traffic should be allowed pass through the gateway. */
177
+ enableSmtp: boolean;
178
+ /** Defines whether SSH bastion should be enabled the gateway. */
179
+ enableBastion: boolean;
180
+ /** Port of the SSH bastion. */
181
+ bastionPort?: number;
182
+ };
183
+ export type CreateIPRequest = {
184
+ /** Zone to target. If none is passed will use default zone from the config. */
185
+ zone?: Zone;
186
+ /** Project to create the IP address in. */
187
+ projectId?: string;
188
+ /** Tags to give to the IP address. */
189
+ tags?: string[];
190
+ };
191
+ export type CreatePatRuleRequest = {
192
+ /** Zone to target. If none is passed will use default zone from the config. */
193
+ zone?: Zone;
194
+ /** ID of the Gateway on which to create the rule. */
195
+ gatewayId: string;
196
+ /** Public port to listen on. */
197
+ publicPort: number;
198
+ /** Private IP to forward data to. */
199
+ privateIp: string;
200
+ /** Private port to translate to. */
201
+ privatePort: number;
202
+ /** Protocol the rule should apply to. */
203
+ protocol?: PatRuleProtocol;
204
+ };
205
+ export type DeleteGatewayNetworkRequest = {
206
+ /** Zone to target. If none is passed will use default zone from the config. */
207
+ zone?: Zone;
208
+ /** ID of the GatewayNetwork to delete. */
209
+ gatewayNetworkId: string;
210
+ };
211
+ export type DeleteGatewayRequest = {
212
+ /** Zone to target. If none is passed will use default zone from the config. */
213
+ zone?: Zone;
214
+ /** ID of the gateway to delete. */
215
+ gatewayId: string;
216
+ };
217
+ export type DeleteIPRequest = {
218
+ /** Zone to target. If none is passed will use default zone from the config. */
219
+ zone?: Zone;
220
+ /** ID of the IP address to delete. */
221
+ ipId: string;
222
+ };
223
+ export type DeletePatRuleRequest = {
224
+ /** Zone to target. If none is passed will use default zone from the config. */
225
+ zone?: Zone;
226
+ /** ID of the PAT rule to delete. */
227
+ patRuleId: string;
228
+ };
229
+ export type GetGatewayNetworkRequest = {
230
+ /** Zone to target. If none is passed will use default zone from the config. */
231
+ zone?: Zone;
232
+ /** ID of the GatewayNetwork to fetch. */
233
+ gatewayNetworkId: string;
234
+ };
235
+ export type GetGatewayRequest = {
236
+ /** Zone to target. If none is passed will use default zone from the config. */
237
+ zone?: Zone;
238
+ /** ID of the gateway to fetch. */
239
+ gatewayId: string;
240
+ };
241
+ export type GetIPRequest = {
242
+ /** Zone to target. If none is passed will use default zone from the config. */
243
+ zone?: Zone;
244
+ /** ID of the IP address to get. */
245
+ ipId: string;
246
+ };
247
+ export type GetPatRuleRequest = {
248
+ /** Zone to target. If none is passed will use default zone from the config. */
249
+ zone?: Zone;
250
+ /** ID of the PAT rule to get. */
251
+ patRuleId: string;
252
+ };
253
+ export type ListGatewayNetworksRequest = {
254
+ /** Zone to target. If none is passed will use default zone from the config. */
255
+ zone?: Zone;
256
+ /** Order in which to return results. */
257
+ orderBy?: ListGatewayNetworksRequestOrderBy;
258
+ /** Page number. */
259
+ page?: number;
260
+ /** GatewayNetworks per page. */
261
+ pageSize?: number;
262
+ /**
263
+ * Filter for GatewayNetworks with these status. Use `unknown` to include all
264
+ * statuses.
265
+ */
266
+ status?: GatewayNetworkStatus[];
267
+ /** Filter for GatewayNetworks connected to these gateways. */
268
+ gatewayIds?: string[];
269
+ /** Filter for GatewayNetworks connected to these Private Networks. */
270
+ privateNetworkIds?: string[];
271
+ /** Filter for GatewayNetworks with this `enable_masquerade` setting. */
272
+ masqueradeEnabled?: boolean;
273
+ };
274
+ export interface ListGatewayNetworksResponse {
275
+ /** GatewayNetworks on this page. */
276
+ gatewayNetworks: GatewayNetwork[];
277
+ /** Total GatewayNetworks count matching the filter. */
278
+ totalCount: number;
279
+ }
280
+ export type ListGatewayTypesRequest = {
281
+ /** Zone to target. If none is passed will use default zone from the config. */
282
+ zone?: Zone;
283
+ };
284
+ export interface ListGatewayTypesResponse {
285
+ /** Available types of Public Gateway. */
286
+ types: GatewayType[];
287
+ }
288
+ export type ListGatewaysRequest = {
289
+ /** Zone to target. If none is passed will use default zone from the config. */
290
+ zone?: Zone;
291
+ /** Order in which to return results. */
292
+ orderBy?: ListGatewaysRequestOrderBy;
293
+ /** Page number to return. */
294
+ page?: number;
295
+ /** Gateways per page. */
296
+ pageSize?: number;
297
+ /** Include only gateways in this Organization. */
298
+ organizationId?: string;
299
+ /** Include only gateways in this Project. */
300
+ projectId?: string;
301
+ /** Filter for gateways which have this search term in their name. */
302
+ name?: string;
303
+ /** Filter for gateways with these tags. */
304
+ tags?: string[];
305
+ /** Filter for gateways of these types. */
306
+ types?: string[];
307
+ /**
308
+ * Filter for gateways with these status. Use `unknown` to include all
309
+ * statuses.
310
+ */
311
+ status?: GatewayStatus[];
312
+ /** Filter for gateways attached to these Private Networks. */
313
+ privateNetworkIds?: string[];
314
+ /** Include also legacy gateways. */
315
+ includeLegacy?: boolean;
316
+ };
317
+ export interface ListGatewaysResponse {
318
+ /** Gateways on this page. */
319
+ gateways: Gateway[];
320
+ /** Total count of gateways matching the filter. */
321
+ totalCount: number;
322
+ }
323
+ export type ListIPsRequest = {
324
+ /** Zone to target. If none is passed will use default zone from the config. */
325
+ zone?: Zone;
326
+ /** Order in which to return results. */
327
+ orderBy?: ListIPsRequestOrderBy;
328
+ /** Page number. */
329
+ page?: number;
330
+ /** IP addresses per page. */
331
+ pageSize?: number;
332
+ /** Include only gateways in this Organization. */
333
+ organizationId?: string;
334
+ /** Filter for IP addresses in this Project. */
335
+ projectId?: string;
336
+ /** Filter for IP addresses with these tags. */
337
+ tags?: string[];
338
+ /** Filter for IP addresses that have a reverse containing this string. */
339
+ reverse?: string;
340
+ /** Filter based on whether the IP is attached to a gateway or not. */
341
+ isFree?: boolean;
342
+ };
343
+ export interface ListIPsResponse {
344
+ /** IP addresses on this page. */
345
+ ips: IP[];
346
+ /** Total count of IP addresses matching the filter. */
347
+ totalCount: number;
348
+ }
349
+ export type ListPatRulesRequest = {
350
+ /** Zone to target. If none is passed will use default zone from the config. */
351
+ zone?: Zone;
352
+ /** Order in which to return results. */
353
+ orderBy?: ListPatRulesRequestOrderBy;
354
+ /** Page number. */
355
+ page?: number;
356
+ /** PAT rules per page. */
357
+ pageSize?: number;
358
+ /** Filter for PAT rules on these gateways. */
359
+ gatewayIds?: string[];
360
+ /** Filter for PAT rules targeting these private ips. */
361
+ privateIps?: string[];
362
+ /** Filter for PAT rules with this protocol. */
363
+ protocol?: PatRuleProtocol;
364
+ };
365
+ export interface ListPatRulesResponse {
366
+ /** Array of PAT rules matching the filter. */
367
+ patRules: PatRule[];
368
+ /** Total count of PAT rules matching the filter. */
369
+ totalCount: number;
370
+ }
371
+ export type RefreshSSHKeysRequest = {
372
+ /** Zone to target. If none is passed will use default zone from the config. */
373
+ zone?: Zone;
374
+ /** ID of the gateway to refresh SSH keys on. */
375
+ gatewayId: string;
376
+ };
377
+ export type SetPatRulesRequest = {
378
+ /** Zone to target. If none is passed will use default zone from the config. */
379
+ zone?: Zone;
380
+ /** ID of the gateway on which to set the PAT rules. */
381
+ gatewayId: string;
382
+ /** New list of PAT rules. */
383
+ patRules: SetPatRulesRequestRule[];
384
+ };
385
+ export interface SetPatRulesResponse {
386
+ /** List of PAT rules. */
387
+ patRules: PatRule[];
388
+ }
389
+ export type UpdateGatewayNetworkRequest = {
390
+ /** Zone to target. If none is passed will use default zone from the config. */
391
+ zone?: Zone;
392
+ /** ID of the GatewayNetwork to update. */
393
+ gatewayNetworkId: string;
394
+ /** Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork. */
395
+ enableMasquerade?: boolean;
396
+ /** Enabling the default route also enables masquerading. */
397
+ pushDefaultRoute?: boolean;
398
+ /** Use this IPAM-booked IP ID as the Gateway's IP in this Private Network. */
399
+ ipamIpId?: string;
400
+ };
401
+ export type UpdateGatewayRequest = {
402
+ /** Zone to target. If none is passed will use default zone from the config. */
403
+ zone?: Zone;
404
+ /** ID of the gateway to update. */
405
+ gatewayId: string;
406
+ /** Name for the gateway. */
407
+ name?: string;
408
+ /** Tags for the gateway. */
409
+ tags?: string[];
410
+ /** Defines whether SSH bastion should be enabled the gateway. */
411
+ enableBastion?: boolean;
412
+ /** Port of the SSH bastion. */
413
+ bastionPort?: number;
414
+ /** Defines whether SMTP traffic should be allowed to pass through the gateway. */
415
+ enableSmtp?: boolean;
416
+ };
417
+ export type UpdateIPRequest = {
418
+ /** Zone to target. If none is passed will use default zone from the config. */
419
+ zone?: Zone;
420
+ /** ID of the IP address to update. */
421
+ ipId: string;
422
+ /** Tags to give to the IP address. */
423
+ tags?: string[];
424
+ /** Reverse to set on the address. Empty string to unset. */
425
+ reverse?: string;
426
+ /** Gateway to attach the IP address to. Empty string to detach. */
427
+ gatewayId?: string;
428
+ };
429
+ export type UpdatePatRuleRequest = {
430
+ /** Zone to target. If none is passed will use default zone from the config. */
431
+ zone?: Zone;
432
+ /** ID of the PAT rule to update. */
433
+ patRuleId: string;
434
+ /** Public port to listen on. */
435
+ publicPort?: number;
436
+ /** Private IP to forward data to. */
437
+ privateIp?: string;
438
+ /** Private port to translate to. */
439
+ privatePort?: number;
440
+ /** Protocol the rule should apply to. */
441
+ protocol?: PatRuleProtocol;
442
+ };
443
+ export type UpgradeGatewayRequest = {
444
+ /** Zone to target. If none is passed will use default zone from the config. */
445
+ zone?: Zone;
446
+ /** ID of the gateway to upgrade. */
447
+ gatewayId: string;
448
+ /** Gateway type (commercial offer). */
449
+ type?: string;
450
+ };
@@ -1,4 +1,4 @@
1
1
  export { ControlPanelAPI, DatabaseAPI, DnsAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingStatus, HostingSummary, HostingSummaryStatus, HostingUser, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, ResetHostingPasswordResponse, ResourceSummary, Session, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
3
+ export type { CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingStatus, HostingSummary, HostingSummaryStatus, HostingUser, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, ResetHostingPasswordResponse, ResourceSummary, Session, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
4
4
  export * as ValidationRules from './validation-rules.gen';
@@ -269,8 +269,10 @@ const unmarshalHostingSummary = (data) => {
269
269
  }
270
270
  return {
271
271
  createdAt: marshalling.unmarshalDate(data.created_at),
272
+ dnsStatus: data.dns_status,
272
273
  domain: data.domain,
273
274
  id: data.id,
275
+ offerName: data.offer_name,
274
276
  projectId: data.project_id,
275
277
  protected: data.protected,
276
278
  region: data.region,
@@ -376,8 +378,19 @@ const marshalDatabaseApiAssignDatabaseUserRequest = (request, defaults) => ({
376
378
  const marshalDatabaseApiChangeDatabaseUserPasswordRequest = (request, defaults) => ({
377
379
  password: request.password
378
380
  });
381
+ const marshalCreateDatabaseRequestUser = (request, defaults) => ({
382
+ password: request.password,
383
+ username: request.username
384
+ });
379
385
  const marshalDatabaseApiCreateDatabaseRequest = (request, defaults) => ({
380
- database_name: request.databaseName
386
+ database_name: request.databaseName,
387
+ ...marshalling.resolveOneOf([
388
+ {
389
+ param: "new_user",
390
+ value: request.newUser !== void 0 ? marshalCreateDatabaseRequestUser(request.newUser) : void 0
391
+ },
392
+ { param: "existing_username", value: request.existingUsername }
393
+ ])
381
394
  });
382
395
  const marshalDatabaseApiCreateDatabaseUserRequest = (request, defaults) => ({
383
396
  password: request.password,
@@ -1,6 +1,6 @@
1
1
  import { isJSONObject } from "../../../helpers/json.js";
2
2
  import { unmarshalMoney } from "../../../scw/custom-marshalling.js";
3
- import { unmarshalArrayOfObject, unmarshalDate } from "../../../helpers/marshalling.js";
3
+ import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf } from "../../../helpers/marshalling.js";
4
4
  const unmarshalDatabaseUser = (data) => {
5
5
  if (!isJSONObject(data)) {
6
6
  throw new TypeError(
@@ -267,8 +267,10 @@ const unmarshalHostingSummary = (data) => {
267
267
  }
268
268
  return {
269
269
  createdAt: unmarshalDate(data.created_at),
270
+ dnsStatus: data.dns_status,
270
271
  domain: data.domain,
271
272
  id: data.id,
273
+ offerName: data.offer_name,
272
274
  projectId: data.project_id,
273
275
  protected: data.protected,
274
276
  region: data.region,
@@ -374,8 +376,19 @@ const marshalDatabaseApiAssignDatabaseUserRequest = (request, defaults) => ({
374
376
  const marshalDatabaseApiChangeDatabaseUserPasswordRequest = (request, defaults) => ({
375
377
  password: request.password
376
378
  });
379
+ const marshalCreateDatabaseRequestUser = (request, defaults) => ({
380
+ password: request.password,
381
+ username: request.username
382
+ });
377
383
  const marshalDatabaseApiCreateDatabaseRequest = (request, defaults) => ({
378
- database_name: request.databaseName
384
+ database_name: request.databaseName,
385
+ ...resolveOneOf([
386
+ {
387
+ param: "new_user",
388
+ value: request.newUser !== void 0 ? marshalCreateDatabaseRequestUser(request.newUser) : void 0
389
+ },
390
+ { param: "existing_username", value: request.existingUsername }
391
+ ])
379
392
  });
380
393
  const marshalDatabaseApiCreateDatabaseUserRequest = (request, defaults) => ({
381
394
  password: request.password,
@@ -49,6 +49,10 @@ export interface PlatformControlPanel {
49
49
  /** URL to connect to cPanel dashboard and to Webmail interface. */
50
50
  urls?: PlatformControlPanelUrls;
51
51
  }
52
+ export interface CreateDatabaseRequestUser {
53
+ username: string;
54
+ password: string;
55
+ }
52
56
  export interface CreateHostingRequestDomainConfiguration {
53
57
  updateNameservers: boolean;
54
58
  updateWebRecord: boolean;
@@ -170,6 +174,10 @@ export interface HostingSummary {
170
174
  domain: string;
171
175
  /** Whether the hosting is protected or not. */
172
176
  protected: boolean;
177
+ /** DNS status of the Web Hosting plan. */
178
+ dnsStatus: DnsRecordsStatus;
179
+ /** Name of the active offer for the Web Hosting plan. */
180
+ offerName: string;
173
181
  /** Region where the Web Hosting plan is hosted. */
174
182
  region: Region;
175
183
  }
@@ -241,6 +249,18 @@ export type DatabaseApiCreateDatabaseRequest = {
241
249
  hostingId: string;
242
250
  /** Name of the database to be created. */
243
251
  databaseName: string;
252
+ /**
253
+ * (Optional) Username and password to create a user and link to the database.
254
+ *
255
+ * One-of ('user'): at most one of 'newUser', 'existingUsername' could be set.
256
+ */
257
+ newUser?: CreateDatabaseRequestUser;
258
+ /**
259
+ * (Optional) Username to link an existing user to the database.
260
+ *
261
+ * One-of ('user'): at most one of 'newUser', 'existingUsername' could be set.
262
+ */
263
+ existingUsername?: string;
244
264
  };
245
265
  export type DatabaseApiCreateDatabaseUserRequest = {
246
266
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "v2.57.0";
3
+ const version = "v2.58.0";
4
4
  const userAgent = `scaleway-sdk-js/${version}`;
5
5
  exports.userAgent = userAgent;
6
6
  exports.version = version;
@@ -1,2 +1,2 @@
1
- export declare const version = "v2.57.0";
2
- export declare const userAgent = "scaleway-sdk-js/v2.57.0";
1
+ export declare const version = "v2.58.0";
2
+ export declare const userAgent = "scaleway-sdk-js/v2.58.0";
@@ -1,4 +1,4 @@
1
- const version = "v2.57.0";
1
+ const version = "v2.58.0";
2
2
  const userAgent = `scaleway-sdk-js/${version}`;
3
3
  export {
4
4
  userAgent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk",
3
- "version": "2.58.0",
3
+ "version": "2.59.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Scaleway SDK.",
6
6
  "keywords": [
@@ -39,5 +39,5 @@
39
39
  "bundledDependencies": [
40
40
  "@scaleway/random-name"
41
41
  ],
42
- "gitHead": "62bf1f104066d4ef19d4ce5adca02b3c5f4b937e"
42
+ "gitHead": "7a604bd8a0f9bd48cee89c4ed009d808b91b24e6"
43
43
  }