@scaleway/sdk 2.42.0 → 2.43.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 (54) hide show
  1. package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +3 -1
  2. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +3 -1
  3. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +9 -1
  4. package/dist/api/block/v1alpha1/api.gen.cjs +4 -3
  5. package/dist/api/block/v1alpha1/api.gen.d.ts +4 -3
  6. package/dist/api/block/v1alpha1/api.gen.js +4 -3
  7. package/dist/api/container/v1beta1/marshalling.gen.cjs +3 -0
  8. package/dist/api/container/v1beta1/marshalling.gen.js +3 -0
  9. package/dist/api/container/v1beta1/types.gen.d.ts +6 -0
  10. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +2 -0
  11. package/dist/api/iam/v1alpha1/marshalling.gen.js +2 -0
  12. package/dist/api/iam/v1alpha1/types.gen.d.ts +4 -0
  13. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +6 -0
  14. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +5 -0
  15. package/dist/api/iam/v1alpha1/validation-rules.gen.js +6 -0
  16. package/dist/api/k8s/v1/api.gen.cjs +32 -0
  17. package/dist/api/k8s/v1/api.gen.d.ts +19 -1
  18. package/dist/api/k8s/v1/api.gen.js +33 -1
  19. package/dist/api/k8s/v1/index.gen.d.ts +1 -1
  20. package/dist/api/k8s/v1/marshalling.gen.cjs +53 -0
  21. package/dist/api/k8s/v1/marshalling.gen.d.ts +3 -1
  22. package/dist/api/k8s/v1/marshalling.gen.js +53 -0
  23. package/dist/api/k8s/v1/types.gen.d.ts +48 -0
  24. package/dist/api/key_manager/v1alpha1/types.gen.d.ts +7 -7
  25. package/dist/api/secret/v1beta1/marshalling.gen.cjs +1 -0
  26. package/dist/api/secret/v1beta1/marshalling.gen.js +1 -0
  27. package/dist/api/secret/v1beta1/types.gen.d.ts +2 -0
  28. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +2 -0
  29. package/dist/api/tem/v1alpha1/marshalling.gen.js +2 -0
  30. package/dist/api/tem/v1alpha1/types.gen.d.ts +4 -0
  31. package/dist/api/vpcgw/v1/api.gen.cjs +8 -5
  32. package/dist/api/vpcgw/v1/api.gen.d.ts +5 -4
  33. package/dist/api/vpcgw/v1/api.gen.js +9 -6
  34. package/dist/api/vpcgw/v1/marshalling.gen.cjs +4 -0
  35. package/dist/api/vpcgw/v1/marshalling.gen.d.ts +2 -1
  36. package/dist/api/vpcgw/v1/marshalling.gen.js +4 -0
  37. package/dist/api/vpcgw/v1/types.gen.d.ts +2 -0
  38. package/dist/api/webhosting/v1alpha1/api.gen.cjs +91 -0
  39. package/dist/api/webhosting/v1alpha1/api.gen.d.ts +47 -1
  40. package/dist/api/webhosting/v1alpha1/api.gen.js +93 -2
  41. package/dist/api/webhosting/v1alpha1/index.gen.cjs +1 -0
  42. package/dist/api/webhosting/v1alpha1/index.gen.d.ts +2 -2
  43. package/dist/api/webhosting/v1alpha1/index.gen.js +2 -1
  44. package/dist/api/webhosting/v1alpha1/marshalling.gen.cjs +48 -0
  45. package/dist/api/webhosting/v1alpha1/marshalling.gen.d.ts +5 -1
  46. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +48 -0
  47. package/dist/api/webhosting/v1alpha1/types.gen.d.ts +84 -0
  48. package/dist/api/webhosting/v1alpha1/validation-rules.gen.cjs +10 -0
  49. package/dist/api/webhosting/v1alpha1/validation-rules.gen.d.ts +9 -0
  50. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -0
  51. package/dist/scw/constants.cjs +1 -1
  52. package/dist/scw/constants.d.ts +2 -2
  53. package/dist/scw/constants.js +1 -1
  54. package/package.json +2 -2
@@ -58,6 +58,28 @@ const unmarshalHosting = (data) => {
58
58
  username: data.username
59
59
  };
60
60
  };
61
+ const unmarshalEmailAddress = (data) => {
62
+ if (!json.isJSONObject(data)) {
63
+ throw new TypeError(
64
+ `Unmarshalling the type 'EmailAddress' failed as data isn't a dictionary.`
65
+ );
66
+ }
67
+ return {
68
+ domain: data.domain,
69
+ login: data.login
70
+ };
71
+ };
72
+ const unmarshalMailbox = (data) => {
73
+ if (!json.isJSONObject(data)) {
74
+ throw new TypeError(
75
+ `Unmarshalling the type 'Mailbox' failed as data isn't a dictionary.`
76
+ );
77
+ }
78
+ return {
79
+ email: data.email ? unmarshalEmailAddress(data.email) : void 0,
80
+ mailboxId: data.mailbox_id
81
+ };
82
+ };
61
83
  const unmarshalCheckUserOwnsDomainResponse = (data) => {
62
84
  if (!json.isJSONObject(data)) {
63
85
  throw new TypeError(
@@ -145,6 +167,17 @@ const unmarshalListHostingsResponse = (data) => {
145
167
  totalCount: data.total_count
146
168
  };
147
169
  };
170
+ const unmarshalListMailboxesResponse = (data) => {
171
+ if (!json.isJSONObject(data)) {
172
+ throw new TypeError(
173
+ `Unmarshalling the type 'ListMailboxesResponse' failed as data isn't a dictionary.`
174
+ );
175
+ }
176
+ return {
177
+ mailboxes: marshalling.unmarshalArrayOfObject(data.mailboxes, unmarshalMailbox),
178
+ totalCount: data.total_count
179
+ };
180
+ };
148
181
  const unmarshalOfferProduct = (data) => {
149
182
  if (!json.isJSONObject(data)) {
150
183
  throw new TypeError(
@@ -214,6 +247,17 @@ const unmarshalSession = (data) => {
214
247
  const marshalCheckUserOwnsDomainRequest = (request, defaults) => ({
215
248
  project_id: request.projectId ?? defaults.defaultProjectId
216
249
  });
250
+ const marshalEmailAddress = (request, defaults) => ({
251
+ domain: request.domain,
252
+ login: request.login
253
+ });
254
+ const marshalClassicMailApiCreateMailboxRequest = (request, defaults) => ({
255
+ email: request.email !== void 0 ? marshalEmailAddress(request.email) : void 0,
256
+ password: request.password
257
+ });
258
+ const marshalClassicMailApiUpdateMailboxRequest = (request, defaults) => ({
259
+ password: request.password
260
+ });
217
261
  const marshalCreateHostingRequestDomainConfiguration = (request, defaults) => ({
218
262
  update_all_records: request.updateAllRecords,
219
263
  update_mail_record: request.updateMailRecord,
@@ -240,6 +284,8 @@ const marshalUpdateHostingRequest = (request, defaults) => ({
240
284
  tags: request.tags
241
285
  });
242
286
  exports.marshalCheckUserOwnsDomainRequest = marshalCheckUserOwnsDomainRequest;
287
+ exports.marshalClassicMailApiCreateMailboxRequest = marshalClassicMailApiCreateMailboxRequest;
288
+ exports.marshalClassicMailApiUpdateMailboxRequest = marshalClassicMailApiUpdateMailboxRequest;
243
289
  exports.marshalCreateHostingRequest = marshalCreateHostingRequest;
244
290
  exports.marshalUpdateHostingRequest = marshalUpdateHostingRequest;
245
291
  exports.unmarshalCheckUserOwnsDomainResponse = unmarshalCheckUserOwnsDomainResponse;
@@ -247,6 +293,8 @@ exports.unmarshalDnsRecords = unmarshalDnsRecords;
247
293
  exports.unmarshalHosting = unmarshalHosting;
248
294
  exports.unmarshalListControlPanelsResponse = unmarshalListControlPanelsResponse;
249
295
  exports.unmarshalListHostingsResponse = unmarshalListHostingsResponse;
296
+ exports.unmarshalListMailboxesResponse = unmarshalListMailboxesResponse;
250
297
  exports.unmarshalListOffersResponse = unmarshalListOffersResponse;
298
+ exports.unmarshalMailbox = unmarshalMailbox;
251
299
  exports.unmarshalResetHostingPasswordResponse = unmarshalResetHostingPasswordResponse;
252
300
  exports.unmarshalSession = unmarshalSession;
@@ -1,13 +1,17 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { CheckUserOwnsDomainRequest, CheckUserOwnsDomainResponse, CreateHostingRequest, DnsRecords, Hosting, ListControlPanelsResponse, ListHostingsResponse, ListOffersResponse, ResetHostingPasswordResponse, Session, UpdateHostingRequest } from './types.gen';
2
+ import type { CheckUserOwnsDomainRequest, CheckUserOwnsDomainResponse, ClassicMailApiCreateMailboxRequest, ClassicMailApiUpdateMailboxRequest, CreateHostingRequest, DnsRecords, Hosting, ListControlPanelsResponse, ListHostingsResponse, ListMailboxesResponse, ListOffersResponse, Mailbox, ResetHostingPasswordResponse, Session, UpdateHostingRequest } from './types.gen';
3
3
  export declare const unmarshalHosting: (data: unknown) => Hosting;
4
+ export declare const unmarshalMailbox: (data: unknown) => Mailbox;
4
5
  export declare const unmarshalCheckUserOwnsDomainResponse: (data: unknown) => CheckUserOwnsDomainResponse;
5
6
  export declare const unmarshalDnsRecords: (data: unknown) => DnsRecords;
6
7
  export declare const unmarshalListControlPanelsResponse: (data: unknown) => ListControlPanelsResponse;
7
8
  export declare const unmarshalListHostingsResponse: (data: unknown) => ListHostingsResponse;
9
+ export declare const unmarshalListMailboxesResponse: (data: unknown) => ListMailboxesResponse;
8
10
  export declare const unmarshalListOffersResponse: (data: unknown) => ListOffersResponse;
9
11
  export declare const unmarshalResetHostingPasswordResponse: (data: unknown) => ResetHostingPasswordResponse;
10
12
  export declare const unmarshalSession: (data: unknown) => Session;
11
13
  export declare const marshalCheckUserOwnsDomainRequest: (request: CheckUserOwnsDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
14
+ export declare const marshalClassicMailApiCreateMailboxRequest: (request: ClassicMailApiCreateMailboxRequest, defaults: DefaultValues) => Record<string, unknown>;
15
+ export declare const marshalClassicMailApiUpdateMailboxRequest: (request: ClassicMailApiUpdateMailboxRequest, defaults: DefaultValues) => Record<string, unknown>;
12
16
  export declare const marshalCreateHostingRequest: (request: CreateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
13
17
  export declare const marshalUpdateHostingRequest: (request: UpdateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -56,6 +56,28 @@ const unmarshalHosting = (data) => {
56
56
  username: data.username
57
57
  };
58
58
  };
59
+ const unmarshalEmailAddress = (data) => {
60
+ if (!isJSONObject(data)) {
61
+ throw new TypeError(
62
+ `Unmarshalling the type 'EmailAddress' failed as data isn't a dictionary.`
63
+ );
64
+ }
65
+ return {
66
+ domain: data.domain,
67
+ login: data.login
68
+ };
69
+ };
70
+ const unmarshalMailbox = (data) => {
71
+ if (!isJSONObject(data)) {
72
+ throw new TypeError(
73
+ `Unmarshalling the type 'Mailbox' failed as data isn't a dictionary.`
74
+ );
75
+ }
76
+ return {
77
+ email: data.email ? unmarshalEmailAddress(data.email) : void 0,
78
+ mailboxId: data.mailbox_id
79
+ };
80
+ };
59
81
  const unmarshalCheckUserOwnsDomainResponse = (data) => {
60
82
  if (!isJSONObject(data)) {
61
83
  throw new TypeError(
@@ -143,6 +165,17 @@ const unmarshalListHostingsResponse = (data) => {
143
165
  totalCount: data.total_count
144
166
  };
145
167
  };
168
+ const unmarshalListMailboxesResponse = (data) => {
169
+ if (!isJSONObject(data)) {
170
+ throw new TypeError(
171
+ `Unmarshalling the type 'ListMailboxesResponse' failed as data isn't a dictionary.`
172
+ );
173
+ }
174
+ return {
175
+ mailboxes: unmarshalArrayOfObject(data.mailboxes, unmarshalMailbox),
176
+ totalCount: data.total_count
177
+ };
178
+ };
146
179
  const unmarshalOfferProduct = (data) => {
147
180
  if (!isJSONObject(data)) {
148
181
  throw new TypeError(
@@ -212,6 +245,17 @@ const unmarshalSession = (data) => {
212
245
  const marshalCheckUserOwnsDomainRequest = (request, defaults) => ({
213
246
  project_id: request.projectId ?? defaults.defaultProjectId
214
247
  });
248
+ const marshalEmailAddress = (request, defaults) => ({
249
+ domain: request.domain,
250
+ login: request.login
251
+ });
252
+ const marshalClassicMailApiCreateMailboxRequest = (request, defaults) => ({
253
+ email: request.email !== void 0 ? marshalEmailAddress(request.email) : void 0,
254
+ password: request.password
255
+ });
256
+ const marshalClassicMailApiUpdateMailboxRequest = (request, defaults) => ({
257
+ password: request.password
258
+ });
215
259
  const marshalCreateHostingRequestDomainConfiguration = (request, defaults) => ({
216
260
  update_all_records: request.updateAllRecords,
217
261
  update_mail_record: request.updateMailRecord,
@@ -239,6 +283,8 @@ const marshalUpdateHostingRequest = (request, defaults) => ({
239
283
  });
240
284
  export {
241
285
  marshalCheckUserOwnsDomainRequest,
286
+ marshalClassicMailApiCreateMailboxRequest,
287
+ marshalClassicMailApiUpdateMailboxRequest,
242
288
  marshalCreateHostingRequest,
243
289
  marshalUpdateHostingRequest,
244
290
  unmarshalCheckUserOwnsDomainResponse,
@@ -246,7 +292,9 @@ export {
246
292
  unmarshalHosting,
247
293
  unmarshalListControlPanelsResponse,
248
294
  unmarshalListHostingsResponse,
295
+ unmarshalListMailboxesResponse,
249
296
  unmarshalListOffersResponse,
297
+ unmarshalMailbox,
250
298
  unmarshalResetHostingPasswordResponse,
251
299
  unmarshalSession
252
300
  };
@@ -19,6 +19,12 @@ export interface HostingOption {
19
19
  /** Option name. */
20
20
  name: string;
21
21
  }
22
+ export interface EmailAddress {
23
+ /** Domain part of the mailbox address. */
24
+ domain: string;
25
+ /** Username part address of the mailbox address. */
26
+ login: string;
27
+ }
22
28
  export interface OfferProduct {
23
29
  /** Product name. */
24
30
  name: string;
@@ -132,6 +138,12 @@ export interface Hosting {
132
138
  /** Region where the Web Hosting plan is hosted. */
133
139
  region: Region;
134
140
  }
141
+ export interface Mailbox {
142
+ /** The ID of the mailbox. */
143
+ mailboxId: number;
144
+ /** The email address of the mailbox. */
145
+ email?: EmailAddress;
146
+ }
135
147
  export interface Offer {
136
148
  /** Offer ID. */
137
149
  id: string;
@@ -168,6 +180,72 @@ export interface CheckUserOwnsDomainResponse {
168
180
  /** Indicates whether the specified project owns the domain. */
169
181
  ownsDomain: boolean;
170
182
  }
183
+ export type ClassicMailApiCreateMailboxRequest = {
184
+ /**
185
+ * Region to target. If none is passed will use default region from the
186
+ * config.
187
+ */
188
+ region?: Region;
189
+ /** The Online hosting ID. */
190
+ onlineId: number;
191
+ /** The email address of the mailbox. */
192
+ email?: EmailAddress;
193
+ /** Password for the new mailbox. */
194
+ password: string;
195
+ };
196
+ export type ClassicMailApiDeleteMailboxRequest = {
197
+ /**
198
+ * Region to target. If none is passed will use default region from the
199
+ * config.
200
+ */
201
+ region?: Region;
202
+ /** The Online hosting ID. */
203
+ onlineId: number;
204
+ /** The ID of the mailbox to delete. */
205
+ mailboxId: number;
206
+ };
207
+ export type ClassicMailApiGetMailboxRequest = {
208
+ /**
209
+ * Region to target. If none is passed will use default region from the
210
+ * config.
211
+ */
212
+ region?: Region;
213
+ /** The Online hosting ID. */
214
+ onlineId: number;
215
+ /** The ID of the mailbox to get. */
216
+ mailboxId: number;
217
+ };
218
+ export type ClassicMailApiListMailboxesRequest = {
219
+ /**
220
+ * Region to target. If none is passed will use default region from the
221
+ * config.
222
+ */
223
+ region?: Region;
224
+ /** The Online hosting ID. */
225
+ onlineId: number;
226
+ /** Page number (must be a positive integer). */
227
+ page?: number;
228
+ /**
229
+ * Number of mailboxes to return (must be a positive integer lower or equal to
230
+ * 100).
231
+ */
232
+ pageSize?: number;
233
+ /** Domain to filter the mailboxes. */
234
+ domain?: string;
235
+ };
236
+ export type ClassicMailApiUpdateMailboxRequest = {
237
+ /**
238
+ * Region to target. If none is passed will use default region from the
239
+ * config.
240
+ */
241
+ region?: Region;
242
+ /** The Online hosting ID. */
243
+ onlineId: number;
244
+ /** The ID of the mailbox to update. */
245
+ mailboxId: number;
246
+ /** New password for the mailbox. */
247
+ password?: string;
248
+ };
171
249
  export type CreateHostingRequest = {
172
250
  /**
173
251
  * Region to target. If none is passed will use default region from the
@@ -319,6 +397,12 @@ export interface ListHostingsResponse {
319
397
  /** List of Web Hosting plans. */
320
398
  hostings: Hosting[];
321
399
  }
400
+ export interface ListMailboxesResponse {
401
+ /** Total number of mailboxes. */
402
+ totalCount: number;
403
+ /** List of mailboxes. */
404
+ mailboxes: Mailbox[];
405
+ }
322
406
  export type ListOffersRequest = {
323
407
  /**
324
408
  * Region to target. If none is passed will use default region from the
@@ -1,5 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const ClassicMailApiListMailboxesRequest = {
4
+ page: {
5
+ greaterThan: 0
6
+ },
7
+ pageSize: {
8
+ greaterThan: 0,
9
+ lessThanOrEqual: 100
10
+ }
11
+ };
3
12
  const ListControlPanelsRequest = {
4
13
  page: {
5
14
  greaterThan: 0
@@ -18,5 +27,6 @@ const ListHostingsRequest = {
18
27
  lessThanOrEqual: 100
19
28
  }
20
29
  };
30
+ exports.ClassicMailApiListMailboxesRequest = ClassicMailApiListMailboxesRequest;
21
31
  exports.ListControlPanelsRequest = ListControlPanelsRequest;
22
32
  exports.ListHostingsRequest = ListHostingsRequest;
@@ -1,3 +1,12 @@
1
+ export declare const ClassicMailApiListMailboxesRequest: {
2
+ page: {
3
+ greaterThan: number;
4
+ };
5
+ pageSize: {
6
+ greaterThan: number;
7
+ lessThanOrEqual: number;
8
+ };
9
+ };
1
10
  export declare const ListControlPanelsRequest: {
2
11
  page: {
3
12
  greaterThan: number;
@@ -1,3 +1,12 @@
1
+ const ClassicMailApiListMailboxesRequest = {
2
+ page: {
3
+ greaterThan: 0
4
+ },
5
+ pageSize: {
6
+ greaterThan: 0,
7
+ lessThanOrEqual: 100
8
+ }
9
+ };
1
10
  const ListControlPanelsRequest = {
2
11
  page: {
3
12
  greaterThan: 0
@@ -17,6 +26,7 @@ const ListHostingsRequest = {
17
26
  }
18
27
  };
19
28
  export {
29
+ ClassicMailApiListMailboxesRequest,
20
30
  ListControlPanelsRequest,
21
31
  ListHostingsRequest
22
32
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "v2.41.0";
3
+ const version = "v2.42.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.41.0";
2
- export declare const userAgent = "scaleway-sdk-js/v2.41.0";
1
+ export declare const version = "v2.42.0";
2
+ export declare const userAgent = "scaleway-sdk-js/v2.42.0";
@@ -1,4 +1,4 @@
1
- const version = "v2.41.0";
1
+ const version = "v2.42.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.42.0",
3
+ "version": "2.43.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": "089401626b9b04deaf254edf576ee16c09776b13"
42
+ "gitHead": "b76c60686842c92f35cadea75bdb5c5c65a3b76b"
43
43
  }