@scaleway/sdk 2.68.0 → 2.70.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 (96) hide show
  1. package/dist/api/account/v3/api.gen.cjs +23 -0
  2. package/dist/api/account/v3/api.gen.d.ts +11 -1
  3. package/dist/api/account/v3/api.gen.js +24 -1
  4. package/dist/api/account/v3/index.gen.d.ts +1 -1
  5. package/dist/api/account/v3/marshalling.gen.cjs +171 -0
  6. package/dist/api/account/v3/marshalling.gen.d.ts +3 -1
  7. package/dist/api/account/v3/marshalling.gen.js +173 -2
  8. package/dist/api/account/v3/types.gen.d.ts +93 -0
  9. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +3 -2
  10. package/dist/api/audit_trail/v1alpha1/api.gen.cjs +1 -0
  11. package/dist/api/audit_trail/v1alpha1/api.gen.js +1 -0
  12. package/dist/api/audit_trail/v1alpha1/marshalling.gen.cjs +5 -0
  13. package/dist/api/audit_trail/v1alpha1/marshalling.gen.js +5 -0
  14. package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +50 -14
  15. package/dist/api/audit_trail/v1alpha1/validation-rules.gen.cjs +3 -0
  16. package/dist/api/audit_trail/v1alpha1/validation-rules.gen.d.ts +3 -0
  17. package/dist/api/audit_trail/v1alpha1/validation-rules.gen.js +3 -0
  18. package/dist/api/billing/v2beta1/api.gen.cjs +9 -2
  19. package/dist/api/billing/v2beta1/api.gen.d.ts +9 -2
  20. package/dist/api/billing/v2beta1/api.gen.js +9 -2
  21. package/dist/api/billing/v2beta1/types.gen.d.ts +1 -1
  22. package/dist/api/cockpit/v1/marshalling.gen.cjs +4 -4
  23. package/dist/api/cockpit/v1/marshalling.gen.js +4 -4
  24. package/dist/api/cockpit/v1/types.gen.d.ts +3 -3
  25. package/dist/api/edge_services/v1beta1/api.gen.cjs +1 -1
  26. package/dist/api/edge_services/v1beta1/api.gen.js +1 -1
  27. package/dist/api/edge_services/v1beta1/marshalling.gen.cjs +1 -0
  28. package/dist/api/edge_services/v1beta1/marshalling.gen.d.ts +2 -1
  29. package/dist/api/edge_services/v1beta1/marshalling.gen.js +1 -0
  30. package/dist/api/edge_services/v1beta1/types.gen.d.ts +104 -104
  31. package/dist/api/iam/v1alpha1/api.gen.cjs +8 -0
  32. package/dist/api/iam/v1alpha1/api.gen.d.ts +2 -1
  33. package/dist/api/iam/v1alpha1/api.gen.js +9 -1
  34. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  35. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +46 -0
  36. package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +2 -1
  37. package/dist/api/iam/v1alpha1/marshalling.gen.js +46 -0
  38. package/dist/api/iam/v1alpha1/types.gen.d.ts +26 -0
  39. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +23 -12
  40. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +22 -11
  41. package/dist/api/iam/v1alpha1/validation-rules.gen.js +23 -12
  42. package/dist/api/inference/index.gen.cjs +4 -2
  43. package/dist/api/inference/index.gen.d.ts +1 -0
  44. package/dist/api/inference/index.gen.js +4 -2
  45. package/dist/api/inference/v1/api.gen.cjs +274 -0
  46. package/dist/api/inference/v1/api.gen.d.ts +140 -0
  47. package/dist/api/inference/v1/api.gen.js +274 -0
  48. package/dist/api/inference/v1/content.gen.cjs +13 -0
  49. package/dist/api/inference/v1/content.gen.d.ts +5 -0
  50. package/dist/api/inference/v1/content.gen.js +13 -0
  51. package/dist/api/inference/v1/index.gen.cjs +9 -0
  52. package/dist/api/inference/v1/index.gen.d.ts +4 -0
  53. package/dist/api/inference/v1/index.gen.js +9 -0
  54. package/dist/api/inference/v1/marshalling.gen.cjs +260 -0
  55. package/dist/api/inference/v1/marshalling.gen.d.ts +14 -0
  56. package/dist/api/inference/v1/marshalling.gen.js +260 -0
  57. package/dist/api/inference/v1/types.gen.d.ts +395 -0
  58. package/dist/api/inference/v1/validation-rules.gen.cjs +65 -0
  59. package/dist/api/inference/v1/validation-rules.gen.d.ts +57 -0
  60. package/dist/api/inference/v1/validation-rules.gen.js +65 -0
  61. package/dist/api/instance/v1/index.gen.d.ts +1 -1
  62. package/dist/api/instance/v1/marshalling.gen.cjs +13 -0
  63. package/dist/api/instance/v1/marshalling.gen.js +13 -0
  64. package/dist/api/instance/v1/types.gen.d.ts +10 -0
  65. package/dist/api/mongodb/v1alpha1/types.gen.d.ts +1 -1
  66. package/dist/api/secret/v1beta1/api.gen.cjs +2 -34
  67. package/dist/api/secret/v1beta1/api.gen.d.ts +3 -19
  68. package/dist/api/secret/v1beta1/api.gen.js +2 -34
  69. package/dist/api/secret/v1beta1/index.gen.d.ts +1 -1
  70. package/dist/api/secret/v1beta1/types.gen.d.ts +3 -19
  71. package/dist/api/tem/v1alpha1/api.gen.cjs +93 -0
  72. package/dist/api/tem/v1alpha1/api.gen.d.ts +44 -1
  73. package/dist/api/tem/v1alpha1/api.gen.js +94 -1
  74. package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
  75. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +114 -0
  76. package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +7 -1
  77. package/dist/api/tem/v1alpha1/marshalling.gen.js +114 -0
  78. package/dist/api/tem/v1alpha1/types.gen.d.ts +162 -6
  79. package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +10 -0
  80. package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +9 -0
  81. package/dist/api/tem/v1alpha1/validation-rules.gen.js +10 -0
  82. package/dist/api/vpcgw/v1/api.gen.cjs +7 -0
  83. package/dist/api/vpcgw/v1/api.gen.d.ts +7 -0
  84. package/dist/api/vpcgw/v1/api.gen.js +7 -0
  85. package/dist/api/vpcgw/v1/types.gen.d.ts +1 -0
  86. package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
  87. package/dist/api/webhosting/v1/marshalling.gen.cjs +23 -1
  88. package/dist/api/webhosting/v1/marshalling.gen.js +23 -1
  89. package/dist/api/webhosting/v1/types.gen.d.ts +51 -12
  90. package/dist/scw/constants.cjs +1 -1
  91. package/dist/scw/constants.d.ts +2 -2
  92. package/dist/scw/constants.js +1 -1
  93. package/dist/scw/errors/standard/quotas-exceeded-error.cjs +1 -1
  94. package/dist/scw/errors/standard/quotas-exceeded-error.d.ts +4 -4
  95. package/dist/scw/errors/standard/quotas-exceeded-error.js +1 -1
  96. package/package.json +2 -2
@@ -1,7 +1,8 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { BulkCreateBlocklistsRequest, BulkCreateBlocklistsResponse, CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, CreateWebhookRequest, Domain, DomainLastStatus, Email, ListBlocklistsResponse, ListDomainsResponse, ListEmailsResponse, ListWebhookEventsResponse, ListWebhooksResponse, ProjectSettings, Statistics, UpdateDomainRequest, UpdateProjectSettingsRequest, UpdateWebhookRequest, Webhook } from './types.gen';
2
+ import type { BulkCreateBlocklistsRequest, BulkCreateBlocklistsResponse, CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, CreateWebhookRequest, Domain, DomainLastStatus, Email, ListBlocklistsResponse, ListDomainsResponse, ListEmailsResponse, ListOfferSubscriptionsResponse, ListOffersResponse, ListPoolsResponse, ListWebhookEventsResponse, ListWebhooksResponse, OfferSubscription, ProjectConsumption, ProjectSettings, Statistics, UpdateDomainRequest, UpdateOfferSubscriptionRequest, UpdateProjectSettingsRequest, UpdateWebhookRequest, Webhook } from './types.gen';
3
3
  export declare const unmarshalEmail: (data: unknown) => Email;
4
4
  export declare const unmarshalDomain: (data: unknown) => Domain;
5
+ export declare const unmarshalOfferSubscription: (data: unknown) => OfferSubscription;
5
6
  export declare const unmarshalWebhook: (data: unknown) => Webhook;
6
7
  export declare const unmarshalBulkCreateBlocklistsResponse: (data: unknown) => BulkCreateBlocklistsResponse;
7
8
  export declare const unmarshalCreateEmailResponse: (data: unknown) => CreateEmailResponse;
@@ -9,8 +10,12 @@ export declare const unmarshalDomainLastStatus: (data: unknown) => DomainLastSta
9
10
  export declare const unmarshalListBlocklistsResponse: (data: unknown) => ListBlocklistsResponse;
10
11
  export declare const unmarshalListDomainsResponse: (data: unknown) => ListDomainsResponse;
11
12
  export declare const unmarshalListEmailsResponse: (data: unknown) => ListEmailsResponse;
13
+ export declare const unmarshalListOfferSubscriptionsResponse: (data: unknown) => ListOfferSubscriptionsResponse;
14
+ export declare const unmarshalListOffersResponse: (data: unknown) => ListOffersResponse;
15
+ export declare const unmarshalListPoolsResponse: (data: unknown) => ListPoolsResponse;
12
16
  export declare const unmarshalListWebhookEventsResponse: (data: unknown) => ListWebhookEventsResponse;
13
17
  export declare const unmarshalListWebhooksResponse: (data: unknown) => ListWebhooksResponse;
18
+ export declare const unmarshalProjectConsumption: (data: unknown) => ProjectConsumption;
14
19
  export declare const unmarshalProjectSettings: (data: unknown) => ProjectSettings;
15
20
  export declare const unmarshalStatistics: (data: unknown) => Statistics;
16
21
  export declare const marshalBulkCreateBlocklistsRequest: (request: BulkCreateBlocklistsRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -18,5 +23,6 @@ export declare const marshalCreateDomainRequest: (request: CreateDomainRequest,
18
23
  export declare const marshalCreateEmailRequest: (request: CreateEmailRequest, defaults: DefaultValues) => Record<string, unknown>;
19
24
  export declare const marshalCreateWebhookRequest: (request: CreateWebhookRequest, defaults: DefaultValues) => Record<string, unknown>;
20
25
  export declare const marshalUpdateDomainRequest: (request: UpdateDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
26
+ export declare const marshalUpdateOfferSubscriptionRequest: (request: UpdateOfferSubscriptionRequest, defaults: DefaultValues) => Record<string, unknown>;
21
27
  export declare const marshalUpdateProjectSettingsRequest: (request: UpdateProjectSettingsRequest, defaults: DefaultValues) => Record<string, unknown>;
22
28
  export declare const marshalUpdateWebhookRequest: (request: UpdateWebhookRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -112,6 +112,26 @@ const unmarshalDomain = (data) => {
112
112
  status: data.status
113
113
  };
114
114
  };
115
+ const unmarshalOfferSubscription = (data) => {
116
+ if (!isJSONObject(data)) {
117
+ throw new TypeError(
118
+ `Unmarshalling the type 'OfferSubscription' failed as data isn't a dictionary.`
119
+ );
120
+ }
121
+ return {
122
+ cancellationAvailableAt: unmarshalDate(data.cancellation_available_at),
123
+ includedMonthlyEmails: data.included_monthly_emails,
124
+ maxCustomBlocklistsPerDomain: data.max_custom_blocklists_per_domain,
125
+ maxDedicatedIps: data.max_dedicated_ips,
126
+ maxDomains: data.max_domains,
127
+ maxWebhooksPerDomain: data.max_webhooks_per_domain,
128
+ offerName: data.offer_name,
129
+ organizationId: data.organization_id,
130
+ projectId: data.project_id,
131
+ sla: data.sla,
132
+ subscribedAt: unmarshalDate(data.subscribed_at)
133
+ };
134
+ };
115
135
  const unmarshalWebhook = (data) => {
116
136
  if (!isJSONObject(data)) {
117
137
  throw new TypeError(
@@ -264,6 +284,75 @@ const unmarshalListEmailsResponse = (data) => {
264
284
  totalCount: data.total_count
265
285
  };
266
286
  };
287
+ const unmarshalListOfferSubscriptionsResponse = (data) => {
288
+ if (!isJSONObject(data)) {
289
+ throw new TypeError(
290
+ `Unmarshalling the type 'ListOfferSubscriptionsResponse' failed as data isn't a dictionary.`
291
+ );
292
+ }
293
+ return {
294
+ offerSubscriptions: unmarshalArrayOfObject(
295
+ data.offer_subscriptions,
296
+ unmarshalOfferSubscription
297
+ ),
298
+ totalCount: data.total_count
299
+ };
300
+ };
301
+ const unmarshalOffer = (data) => {
302
+ if (!isJSONObject(data)) {
303
+ throw new TypeError(
304
+ `Unmarshalling the type 'Offer' failed as data isn't a dictionary.`
305
+ );
306
+ }
307
+ return {
308
+ commitmentPeriod: data.commitment_period,
309
+ createdAt: unmarshalDate(data.created_at),
310
+ includedMonthlyEmails: data.included_monthly_emails,
311
+ maxCustomBlocklistsPerDomain: data.max_custom_blocklists_per_domain,
312
+ maxDedicatedIps: data.max_dedicated_ips,
313
+ maxDomains: data.max_domains,
314
+ maxWebhooksPerDomain: data.max_webhooks_per_domain,
315
+ name: data.name,
316
+ sla: data.sla
317
+ };
318
+ };
319
+ const unmarshalListOffersResponse = (data) => {
320
+ if (!isJSONObject(data)) {
321
+ throw new TypeError(
322
+ `Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`
323
+ );
324
+ }
325
+ return {
326
+ offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
327
+ totalCount: data.total_count
328
+ };
329
+ };
330
+ const unmarshalPool = (data) => {
331
+ if (!isJSONObject(data)) {
332
+ throw new TypeError(
333
+ `Unmarshalling the type 'Pool' failed as data isn't a dictionary.`
334
+ );
335
+ }
336
+ return {
337
+ details: data.details,
338
+ ips: data.ips,
339
+ projectId: data.project_id,
340
+ reverse: data.reverse,
341
+ status: data.status,
342
+ zone: data.zone
343
+ };
344
+ };
345
+ const unmarshalListPoolsResponse = (data) => {
346
+ if (!isJSONObject(data)) {
347
+ throw new TypeError(
348
+ `Unmarshalling the type 'ListPoolsResponse' failed as data isn't a dictionary.`
349
+ );
350
+ }
351
+ return {
352
+ pools: unmarshalArrayOfObject(data.pools, unmarshalPool),
353
+ totalCount: data.total_count
354
+ };
355
+ };
267
356
  const unmarshalWebhookEvent = (data) => {
268
357
  if (!isJSONObject(data)) {
269
358
  throw new TypeError(
@@ -309,6 +398,21 @@ const unmarshalListWebhooksResponse = (data) => {
309
398
  webhooks: unmarshalArrayOfObject(data.webhooks, unmarshalWebhook)
310
399
  };
311
400
  };
401
+ const unmarshalProjectConsumption = (data) => {
402
+ if (!isJSONObject(data)) {
403
+ throw new TypeError(
404
+ `Unmarshalling the type 'ProjectConsumption' failed as data isn't a dictionary.`
405
+ );
406
+ }
407
+ return {
408
+ customBlocklistsCount: data.custom_blocklists_count,
409
+ dedicatedIpsCount: data.dedicated_ips_count,
410
+ domainsCount: data.domains_count,
411
+ monthlyEmailsCount: data.monthly_emails_count,
412
+ projectId: data.project_id,
413
+ webhooksCount: data.webhooks_count
414
+ };
415
+ };
312
416
  const unmarshalProjectSettingsPeriodicReport = (data) => {
313
417
  if (!isJSONObject(data)) {
314
418
  throw new TypeError(
@@ -399,6 +503,10 @@ const marshalCreateWebhookRequest = (request, defaults) => ({
399
503
  const marshalUpdateDomainRequest = (request, defaults) => ({
400
504
  autoconfig: request.autoconfig
401
505
  });
506
+ const marshalUpdateOfferSubscriptionRequest = (request, defaults) => ({
507
+ name: request.name,
508
+ project_id: request.projectId ?? defaults.defaultProjectId
509
+ });
402
510
  const marshalUpdateProjectSettingsRequestUpdatePeriodicReport = (request, defaults) => ({
403
511
  enabled: request.enabled,
404
512
  frequency: request.frequency,
@@ -421,6 +529,7 @@ export {
421
529
  marshalCreateEmailRequest,
422
530
  marshalCreateWebhookRequest,
423
531
  marshalUpdateDomainRequest,
532
+ marshalUpdateOfferSubscriptionRequest,
424
533
  marshalUpdateProjectSettingsRequest,
425
534
  marshalUpdateWebhookRequest,
426
535
  unmarshalBulkCreateBlocklistsResponse,
@@ -431,8 +540,13 @@ export {
431
540
  unmarshalListBlocklistsResponse,
432
541
  unmarshalListDomainsResponse,
433
542
  unmarshalListEmailsResponse,
543
+ unmarshalListOfferSubscriptionsResponse,
544
+ unmarshalListOffersResponse,
545
+ unmarshalListPoolsResponse,
434
546
  unmarshalListWebhookEventsResponse,
435
547
  unmarshalListWebhooksResponse,
548
+ unmarshalOfferSubscription,
549
+ unmarshalProjectConsumption,
436
550
  unmarshalProjectSettings,
437
551
  unmarshalStatistics,
438
552
  unmarshalWebhook
@@ -1,4 +1,4 @@
1
- import type { Region as ScwRegion } from '../../../bridge';
1
+ import type { Region as ScwRegion, Zone as ScwZone } from '../../../bridge';
2
2
  export type BlocklistType = 'unknown_type' | 'mailbox_full' | 'mailbox_not_found';
3
3
  export type DomainLastStatusAutoconfigStateReason = 'unknown_reason' | 'permission_denied' | 'domain_not_found';
4
4
  export type DomainLastStatusRecordStatus = 'unknown_record_status' | 'valid' | 'invalid' | 'not_found';
@@ -11,6 +11,8 @@ export type ListBlocklistsRequestOrderBy = 'created_at_desc' | 'created_at_asc'
11
11
  export type ListEmailsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'updated_at_desc' | 'updated_at_asc' | 'status_desc' | 'status_asc' | 'mail_from_desc' | 'mail_from_asc' | 'mail_rcpt_desc' | 'mail_rcpt_asc' | 'subject_desc' | 'subject_asc';
12
12
  export type ListWebhookEventsRequestOrderBy = 'created_at_desc' | 'created_at_asc';
13
13
  export type ListWebhooksRequestOrderBy = 'created_at_desc' | 'created_at_asc';
14
+ export type OfferName = 'unknown_name' | 'essential' | 'scale';
15
+ export type PoolStatus = 'unknown_status' | 'disabled' | 'creating' | 'ready' | 'error';
14
16
  export type ProjectSettingsPeriodicReportFrequency = 'unknown_frequency' | 'monthly' | 'weekly' | 'daily';
15
17
  export type WebhookEventStatus = 'unknown_status' | 'sending' | 'sent' | 'failed';
16
18
  export type WebhookEventType = 'unknown_type' | 'email_queued' | 'email_dropped' | 'email_deferred' | 'email_delivered' | 'email_spam' | 'email_mailbox_not_found' | 'email_blocklisted' | 'blocklist_created';
@@ -114,7 +116,7 @@ export interface Email {
114
116
  projectId: string;
115
117
  /** Email address of the sender. */
116
118
  mailFrom: string;
117
- /** @deprecated Email address of the recipient. */
119
+ /** @deprecated Deprecated. Email address of the recipient. */
118
120
  rcptTo?: string;
119
121
  /** Email address of the recipient. */
120
122
  mailRcpt: string;
@@ -191,7 +193,7 @@ export interface Domain {
191
193
  lastValidAt?: Date;
192
194
  /** Date and time of the domain's deletion. */
193
195
  revokedAt?: Date;
194
- /** @deprecated Error message returned if the last check failed. */
196
+ /** @deprecated Deprecated. Error message returned if the last check failed. */
195
197
  lastError?: string;
196
198
  /** Snippet of the SPF record to register in the DNS zone. */
197
199
  spfConfig: string;
@@ -214,6 +216,79 @@ export interface Domain {
214
216
  */
215
217
  region: ScwRegion;
216
218
  }
219
+ export interface OfferSubscription {
220
+ /** ID of the offer-subscription Organization. */
221
+ organizationId: string;
222
+ /** ID of the offer-subscription Project. */
223
+ projectId: string;
224
+ /** Name of the offer associated with the Project. */
225
+ offerName: OfferName;
226
+ /** Date and time of the subscription. */
227
+ subscribedAt?: Date;
228
+ /** Date and time of the end of the offer-subscription commitment. */
229
+ cancellationAvailableAt?: Date;
230
+ /** Service Level Agreement percentage of the offer-subscription. */
231
+ sla: number;
232
+ /**
233
+ * Max number of domains that can be associated with the offer-subscription
234
+ * for a particular Project.
235
+ */
236
+ maxDomains: number;
237
+ /**
238
+ * Max number of dedicated IPs that can be associated with the
239
+ * offer-subscription for a particular Project.
240
+ */
241
+ maxDedicatedIps: number;
242
+ /**
243
+ * Max number of webhooks that can be associated with the offer-subscription
244
+ * for a particular Project.
245
+ */
246
+ maxWebhooksPerDomain: number;
247
+ /**
248
+ * Max number of custom blocklists that can be associated with the
249
+ * offer-subscription for a particular Project.
250
+ */
251
+ maxCustomBlocklistsPerDomain: number;
252
+ /** Number of emails included in the offer-subscription per month. */
253
+ includedMonthlyEmails: number;
254
+ }
255
+ export interface Offer {
256
+ /** Name of the offer. */
257
+ name: OfferName;
258
+ /** Date and time of the offer creation. */
259
+ createdAt?: Date;
260
+ /** Period of commitment. */
261
+ commitmentPeriod?: string;
262
+ /** Service Level Agreement percentage of the offer. */
263
+ sla: number;
264
+ /** Max number of checked domains that can be associated with the offer. */
265
+ maxDomains: number;
266
+ /** Max number of dedicated IPs that can be associated with the offer. */
267
+ maxDedicatedIps: number;
268
+ /** Number of emails included in the offer per month. */
269
+ includedMonthlyEmails: number;
270
+ /** Max number of webhooks that can be associated with the offer. */
271
+ maxWebhooksPerDomain: number;
272
+ /**
273
+ * Max number of active custom blocklists that can be associated with the
274
+ * offer.
275
+ */
276
+ maxCustomBlocklistsPerDomain: number;
277
+ }
278
+ export interface Pool {
279
+ /** ID of the Project. */
280
+ projectId: string;
281
+ /** Status of the pool. */
282
+ status: PoolStatus;
283
+ /** Details of the pool. */
284
+ details?: string;
285
+ /** Zone of the pool. */
286
+ zone?: ScwZone;
287
+ /** IPs of the pool. */
288
+ ips: string[];
289
+ /** Reverse hostname of all IPs of the pool. */
290
+ reverse?: string;
291
+ }
217
292
  export interface WebhookEvent {
218
293
  /** ID of the Webhook Event. */
219
294
  id: string;
@@ -331,8 +406,8 @@ export type CreateDomainRequest = {
331
406
  projectId?: string;
332
407
  /** Fully qualified domain dame. */
333
408
  domainName: string;
334
- /** Accept Scaleway's Terms of Service. */
335
- acceptTos: boolean;
409
+ /** @deprecated Deprecated. Accept Scaleway's Terms of Service. */
410
+ acceptTos?: boolean;
336
411
  /** Activate auto-configuration of the domain's DNS zone. */
337
412
  autoconfig: boolean;
338
413
  };
@@ -445,6 +520,15 @@ export type GetEmailRequest = {
445
520
  /** ID of the email to retrieve. */
446
521
  emailId: string;
447
522
  };
523
+ export type GetProjectConsumptionRequest = {
524
+ /**
525
+ * Region to target. If none is passed will use default region from the
526
+ * config.
527
+ */
528
+ region?: ScwRegion;
529
+ /** ID of the project. */
530
+ projectId?: string;
531
+ };
448
532
  export type GetProjectSettingsRequest = {
449
533
  /**
450
534
  * Region to target. If none is passed will use default region from the
@@ -558,7 +642,7 @@ export type ListEmailsRequest = {
558
642
  until?: Date;
559
643
  /** (Optional) List emails sent with this sender's email address. */
560
644
  mailFrom?: string;
561
- /** @deprecated List emails sent to this recipient's email address. */
645
+ /** @deprecated Deprecated. List emails sent to this recipient's email address. */
562
646
  mailTo?: string;
563
647
  /** (Optional) List emails sent to this recipient's email address. */
564
648
  mailRcpt?: string;
@@ -579,6 +663,53 @@ export interface ListEmailsResponse {
579
663
  /** Single page of emails matching the requested criteria. */
580
664
  emails: Email[];
581
665
  }
666
+ export type ListOfferSubscriptionsRequest = {
667
+ /**
668
+ * Region to target. If none is passed will use default region from the
669
+ * config.
670
+ */
671
+ region?: ScwRegion;
672
+ /** ID of the Project. */
673
+ projectId?: string;
674
+ };
675
+ export interface ListOfferSubscriptionsResponse {
676
+ /** Number of offer-subscriptions matching the requested criteria. */
677
+ totalCount: number;
678
+ /** Single page of offer-subscriptions matching the requested criteria. */
679
+ offerSubscriptions: OfferSubscription[];
680
+ }
681
+ export type ListOffersRequest = {
682
+ /**
683
+ * Region to target. If none is passed will use default region from the
684
+ * config.
685
+ */
686
+ region?: ScwRegion;
687
+ };
688
+ export interface ListOffersResponse {
689
+ /** Number of offers matching the requested criteria. */
690
+ totalCount: number;
691
+ /** Single page of offers matching the requested criteria. */
692
+ offers: Offer[];
693
+ }
694
+ export type ListPoolsRequest = {
695
+ /**
696
+ * Region to target. If none is passed will use default region from the
697
+ * config.
698
+ */
699
+ region?: ScwRegion;
700
+ /** Requested page number. Value must be greater or equal to 1. */
701
+ page?: number;
702
+ /** Requested page size. Value must be between 1 and 1000. */
703
+ pageSize?: number;
704
+ /** ID of the Project. */
705
+ projectId?: string;
706
+ };
707
+ export interface ListPoolsResponse {
708
+ /** Number of pools matching the requested criteria. */
709
+ totalCount: number;
710
+ /** Single page of pools matching the requested criteria. */
711
+ pools: Pool[];
712
+ }
582
713
  export type ListWebhookEventsRequest = {
583
714
  /**
584
715
  * Region to target. If none is passed will use default region from the
@@ -637,6 +768,20 @@ export interface ListWebhooksResponse {
637
768
  /** Single page of Webhooks matching the requested criteria. */
638
769
  webhooks: Webhook[];
639
770
  }
771
+ export interface ProjectConsumption {
772
+ /** ID of the project. */
773
+ projectId: string;
774
+ /** Number of domains in the project. */
775
+ domainsCount: number;
776
+ /** Number of dedicated IP in the project. */
777
+ dedicatedIpsCount: number;
778
+ /** Number of emails sent during the current month in the project. */
779
+ monthlyEmailsCount: number;
780
+ /** Number of webhooks in the project. */
781
+ webhooksCount: number;
782
+ /** Number of custom blocklists in the project. */
783
+ customBlocklistsCount: number;
784
+ }
640
785
  export interface ProjectSettings {
641
786
  /** Information about your periodic report. */
642
787
  periodicReport?: ProjectSettingsPeriodicReport;
@@ -693,6 +838,17 @@ export type UpdateDomainRequest = {
693
838
  */
694
839
  autoconfig?: boolean;
695
840
  };
841
+ export type UpdateOfferSubscriptionRequest = {
842
+ /**
843
+ * Region to target. If none is passed will use default region from the
844
+ * config.
845
+ */
846
+ region?: ScwRegion;
847
+ /** ID of the Project. */
848
+ projectId?: string;
849
+ /** Name of the offer-subscription. */
850
+ name?: OfferName;
851
+ };
696
852
  export type UpdateProjectSettingsRequest = {
697
853
  /**
698
854
  * Region to target. If none is passed will use default region from the
@@ -81,6 +81,15 @@ const ListEmailsRequest = {
81
81
  minLength: 6
82
82
  }
83
83
  };
84
+ const ListPoolsRequest = {
85
+ page: {
86
+ greaterThanOrEqual: 1
87
+ },
88
+ pageSize: {
89
+ greaterThanOrEqual: 1,
90
+ lessThanOrEqual: 1e3
91
+ }
92
+ };
84
93
  const ListWebhookEventsRequest = {
85
94
  page: {
86
95
  greaterThan: 0
@@ -129,6 +138,7 @@ exports.CreateWebhookRequest = CreateWebhookRequest;
129
138
  exports.ListBlocklistsRequest = ListBlocklistsRequest;
130
139
  exports.ListDomainsRequest = ListDomainsRequest;
131
140
  exports.ListEmailsRequest = ListEmailsRequest;
141
+ exports.ListPoolsRequest = ListPoolsRequest;
132
142
  exports.ListWebhookEventsRequest = ListWebhookEventsRequest;
133
143
  exports.ListWebhooksRequest = ListWebhooksRequest;
134
144
  exports.UpdateProjectSettingsRequestUpdatePeriodicReport = UpdateProjectSettingsRequestUpdatePeriodicReport;
@@ -79,6 +79,15 @@ export declare const ListEmailsRequest: {
79
79
  minLength: number;
80
80
  };
81
81
  };
82
+ export declare const ListPoolsRequest: {
83
+ page: {
84
+ greaterThanOrEqual: number;
85
+ };
86
+ pageSize: {
87
+ greaterThanOrEqual: number;
88
+ lessThanOrEqual: number;
89
+ };
90
+ };
82
91
  export declare const ListWebhookEventsRequest: {
83
92
  page: {
84
93
  greaterThan: number;
@@ -79,6 +79,15 @@ const ListEmailsRequest = {
79
79
  minLength: 6
80
80
  }
81
81
  };
82
+ const ListPoolsRequest = {
83
+ page: {
84
+ greaterThanOrEqual: 1
85
+ },
86
+ pageSize: {
87
+ greaterThanOrEqual: 1,
88
+ lessThanOrEqual: 1e3
89
+ }
90
+ };
82
91
  const ListWebhookEventsRequest = {
83
92
  page: {
84
93
  greaterThan: 0
@@ -128,6 +137,7 @@ export {
128
137
  ListBlocklistsRequest,
129
138
  ListDomainsRequest,
130
139
  ListEmailsRequest,
140
+ ListPoolsRequest,
131
141
  ListWebhookEventsRequest,
132
142
  ListWebhooksRequest,
133
143
  UpdateProjectSettingsRequestUpdatePeriodicReport,
@@ -740,6 +740,13 @@ class API extends api.API {
740
740
  },
741
741
  marshalling_gen.unmarshalGateway
742
742
  );
743
+ /**
744
+ * Put a Public Gateway in IPAM mode. Put a Public Gateway in IPAM mode, so
745
+ * that it can be used with the Public Gateways API v2. This call is
746
+ * idempotent.
747
+ *
748
+ * @param request - The request {@link MigrateToV2Request}
749
+ */
743
750
  migrateToV2 = (request) => this.client.fetch({
744
751
  body: "{}",
745
752
  headers: jsonContentHeaders,
@@ -391,5 +391,12 @@ export declare class API extends ParentAPI {
391
391
  * @returns A Promise of Gateway
392
392
  */
393
393
  refreshSSHKeys: (request: Readonly<RefreshSSHKeysRequest>) => Promise<Gateway>;
394
+ /**
395
+ * Put a Public Gateway in IPAM mode. Put a Public Gateway in IPAM mode, so
396
+ * that it can be used with the Public Gateways API v2. This call is
397
+ * idempotent.
398
+ *
399
+ * @param request - The request {@link MigrateToV2Request}
400
+ */
394
401
  migrateToV2: (request: Readonly<MigrateToV2Request>) => Promise<void>;
395
402
  }
@@ -738,6 +738,13 @@ class API extends API$1 {
738
738
  },
739
739
  unmarshalGateway
740
740
  );
741
+ /**
742
+ * Put a Public Gateway in IPAM mode. Put a Public Gateway in IPAM mode, so
743
+ * that it can be used with the Public Gateways API v2. This call is
744
+ * idempotent.
745
+ *
746
+ * @param request - The request {@link MigrateToV2Request}
747
+ */
741
748
  migrateToV2 = (request) => this.client.fetch({
742
749
  body: "{}",
743
750
  headers: jsonContentHeaders,
@@ -711,6 +711,7 @@ export interface ListPATRulesResponse {
711
711
  export type MigrateToV2Request = {
712
712
  /** Zone to target. If none is passed will use default zone from the config. */
713
713
  zone?: ScwZone;
714
+ /** ID of the gateway to put into IPAM mode. */
714
715
  gatewayId: string;
715
716
  };
716
717
  export type RefreshSSHKeysRequest = {
@@ -1,4 +1,4 @@
1
1
  export { ControlPanelAPI, DatabaseAPI, DnsAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen.js';
2
2
  export * from './content.gen.js';
3
- export type { CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, Domain, DomainAction, DomainAvailability, DomainAvailabilityAction, DomainAvailabilityStatus, DomainDnsAction, DomainStatus, DomainZoneOwner, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingStatus, HostingSummary, 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, SearchDomainsResponse, Session, SyncDomainDnsRecordsRequestRecord, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
3
+ export type { AutoConfigDomainDns, CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, Domain, DomainAction, DomainAvailability, DomainAvailabilityAction, DomainAvailabilityStatus, DomainDnsAction, DomainStatus, DomainZoneOwner, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingStatus, HostingSummary, 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, SearchDomainsResponse, Session, SyncDomainDnsRecordsRequestRecord, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
4
4
  export * as ValidationRules from './validation-rules.gen.js';
@@ -98,6 +98,19 @@ const unmarshalDnsRecords = (data) => {
98
98
  status: data.status
99
99
  };
100
100
  };
101
+ const unmarshalAutoConfigDomainDns = (data) => {
102
+ if (!json.isJSONObject(data)) {
103
+ throw new TypeError(
104
+ `Unmarshalling the type 'AutoConfigDomainDns' failed as data isn't a dictionary.`
105
+ );
106
+ }
107
+ return {
108
+ allRecords: data.all_records,
109
+ mailRecords: data.mail_records,
110
+ nameservers: data.nameservers,
111
+ webRecords: data.web_records
112
+ };
113
+ };
101
114
  const unmarshalDomain = (data) => {
102
115
  if (!json.isJSONObject(data)) {
103
116
  throw new TypeError(
@@ -105,8 +118,9 @@ const unmarshalDomain = (data) => {
105
118
  );
106
119
  }
107
120
  return {
121
+ autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
108
122
  availableActions: data.available_actions,
109
- availableDnsActions: data.available_dns_actions,
123
+ availableDnsActions: data.available_dns_actions ? data.available_dns_actions : void 0,
110
124
  name: data.name,
111
125
  owner: data.owner,
112
126
  status: data.status
@@ -450,11 +464,18 @@ const marshalDatabaseApiUnassignDatabaseUserRequest = (request, defaults) => ({
450
464
  const marshalDnsApiCheckUserOwnsDomainRequest = (request, defaults) => ({
451
465
  project_id: request.projectId ?? defaults.defaultProjectId
452
466
  });
467
+ const marshalAutoConfigDomainDns = (request, defaults) => ({
468
+ all_records: request.allRecords,
469
+ mail_records: request.mailRecords,
470
+ nameservers: request.nameservers,
471
+ web_records: request.webRecords
472
+ });
453
473
  const marshalSyncDomainDnsRecordsRequestRecord = (request, defaults) => ({
454
474
  name: request.name,
455
475
  type: request.type
456
476
  });
457
477
  const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
478
+ auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
458
479
  custom_records: request.customRecords !== void 0 ? request.customRecords.map(
459
480
  (elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)
460
481
  ) : void 0,
@@ -482,6 +503,7 @@ const marshalOfferOptionRequest = (request, defaults) => ({
482
503
  quantity: request.quantity
483
504
  });
484
505
  const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
506
+ auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
485
507
  domain: request.domain,
486
508
  domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(
487
509
  request.domainConfiguration
@@ -96,6 +96,19 @@ const unmarshalDnsRecords = (data) => {
96
96
  status: data.status
97
97
  };
98
98
  };
99
+ const unmarshalAutoConfigDomainDns = (data) => {
100
+ if (!isJSONObject(data)) {
101
+ throw new TypeError(
102
+ `Unmarshalling the type 'AutoConfigDomainDns' failed as data isn't a dictionary.`
103
+ );
104
+ }
105
+ return {
106
+ allRecords: data.all_records,
107
+ mailRecords: data.mail_records,
108
+ nameservers: data.nameservers,
109
+ webRecords: data.web_records
110
+ };
111
+ };
99
112
  const unmarshalDomain = (data) => {
100
113
  if (!isJSONObject(data)) {
101
114
  throw new TypeError(
@@ -103,8 +116,9 @@ const unmarshalDomain = (data) => {
103
116
  );
104
117
  }
105
118
  return {
119
+ autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
106
120
  availableActions: data.available_actions,
107
- availableDnsActions: data.available_dns_actions,
121
+ availableDnsActions: data.available_dns_actions ? data.available_dns_actions : void 0,
108
122
  name: data.name,
109
123
  owner: data.owner,
110
124
  status: data.status
@@ -448,11 +462,18 @@ const marshalDatabaseApiUnassignDatabaseUserRequest = (request, defaults) => ({
448
462
  const marshalDnsApiCheckUserOwnsDomainRequest = (request, defaults) => ({
449
463
  project_id: request.projectId ?? defaults.defaultProjectId
450
464
  });
465
+ const marshalAutoConfigDomainDns = (request, defaults) => ({
466
+ all_records: request.allRecords,
467
+ mail_records: request.mailRecords,
468
+ nameservers: request.nameservers,
469
+ web_records: request.webRecords
470
+ });
451
471
  const marshalSyncDomainDnsRecordsRequestRecord = (request, defaults) => ({
452
472
  name: request.name,
453
473
  type: request.type
454
474
  });
455
475
  const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
476
+ auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
456
477
  custom_records: request.customRecords !== void 0 ? request.customRecords.map(
457
478
  (elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)
458
479
  ) : void 0,
@@ -480,6 +501,7 @@ const marshalOfferOptionRequest = (request, defaults) => ({
480
501
  quantity: request.quantity
481
502
  });
482
503
  const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
504
+ auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
483
505
  domain: request.domain,
484
506
  domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(
485
507
  request.domainConfiguration