@scaleway/sdk 2.31.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/baremetal/v1/api.gen.cjs +1 -0
- package/dist/api/baremetal/v1/api.gen.js +1 -0
- package/dist/api/baremetal/v1/types.gen.d.ts +2 -0
- package/dist/api/block/v1alpha1/api.gen.cjs +44 -0
- package/dist/api/block/v1alpha1/api.gen.d.ts +19 -1
- package/dist/api/block/v1alpha1/api.gen.js +45 -1
- package/dist/api/block/v1alpha1/content.gen.cjs +2 -1
- package/dist/api/block/v1alpha1/content.gen.js +2 -1
- package/dist/api/block/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/block/v1alpha1/marshalling.gen.cjs +14 -0
- package/dist/api/block/v1alpha1/marshalling.gen.d.ts +3 -1
- package/dist/api/block/v1alpha1/marshalling.gen.js +14 -0
- package/dist/api/block/v1alpha1/types.gen.d.ts +27 -1
- package/dist/api/block/v1alpha1/validation-rules.gen.cjs +6 -0
- package/dist/api/block/v1alpha1/validation-rules.gen.d.ts +5 -0
- package/dist/api/block/v1alpha1/validation-rules.gen.js +6 -0
- package/dist/api/instance/v1/api.gen.cjs +0 -25
- package/dist/api/instance/v1/api.gen.d.ts +1 -17
- package/dist/api/instance/v1/api.gen.js +1 -26
- package/dist/api/instance/v1/index.gen.d.ts +1 -1
- package/dist/api/instance/v1/marshalling.gen.cjs +4 -13
- package/dist/api/instance/v1/marshalling.gen.d.ts +1 -2
- package/dist/api/instance/v1/marshalling.gen.js +4 -13
- package/dist/api/instance/v1/types.gen.d.ts +20 -24
- package/dist/api/instance/v1/types.private.gen.d.ts +7 -0
- package/dist/api/k8s/v1/api.gen.cjs +0 -22
- package/dist/api/k8s/v1/api.gen.d.ts +1 -10
- package/dist/api/k8s/v1/api.gen.js +1 -23
- package/dist/api/k8s/v1/index.gen.d.ts +1 -1
- package/dist/api/k8s/v1/marshalling.gen.cjs +0 -4
- package/dist/api/k8s/v1/marshalling.gen.d.ts +1 -2
- package/dist/api/k8s/v1/marshalling.gen.js +0 -4
- package/dist/api/k8s/v1/types.gen.d.ts +0 -11
- package/dist/api/secret/v1beta1/types.gen.d.ts +4 -4
- package/dist/api/tem/v1alpha1/api.gen.cjs +49 -0
- package/dist/api/tem/v1alpha1/api.gen.d.ts +13 -1
- package/dist/api/tem/v1alpha1/api.gen.js +50 -1
- package/dist/api/tem/v1alpha1/index.gen.cjs +2 -0
- package/dist/api/tem/v1alpha1/index.gen.d.ts +2 -1
- package/dist/api/tem/v1alpha1/index.gen.js +3 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +71 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +5 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +72 -1
- package/dist/api/tem/v1alpha1/types.gen.d.ts +115 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +33 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +28 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.js +33 -0
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -110,6 +110,24 @@ const unmarshalDomain = (data) => {
|
|
|
110
110
|
status: data.status
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
|
+
const unmarshalWebhook = (data) => {
|
|
114
|
+
if (!isJSONObject(data)) {
|
|
115
|
+
throw new TypeError(
|
|
116
|
+
`Unmarshalling the type 'Webhook' failed as data isn't a dictionary.`
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
createdAt: unmarshalDate(data.created_at),
|
|
121
|
+
domainId: data.domain_id,
|
|
122
|
+
eventTypes: data.event_types,
|
|
123
|
+
id: data.id,
|
|
124
|
+
name: data.name,
|
|
125
|
+
organizationId: data.organization_id,
|
|
126
|
+
projectId: data.project_id,
|
|
127
|
+
snsArn: data.sns_arn,
|
|
128
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
129
|
+
};
|
|
130
|
+
};
|
|
113
131
|
const unmarshalCreateEmailResponse = (data) => {
|
|
114
132
|
if (!isJSONObject(data)) {
|
|
115
133
|
throw new TypeError(
|
|
@@ -192,6 +210,50 @@ const unmarshalListEmailsResponse = (data) => {
|
|
|
192
210
|
totalCount: data.total_count
|
|
193
211
|
};
|
|
194
212
|
};
|
|
213
|
+
const unmarshalWebhookEvent = (data) => {
|
|
214
|
+
if (!isJSONObject(data)) {
|
|
215
|
+
throw new TypeError(
|
|
216
|
+
`Unmarshalling the type 'WebhookEvent' failed as data isn't a dictionary.`
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
createdAt: unmarshalDate(data.created_at),
|
|
221
|
+
data: data.data,
|
|
222
|
+
emailId: data.email_id,
|
|
223
|
+
id: data.id,
|
|
224
|
+
organizationId: data.organization_id,
|
|
225
|
+
projectId: data.project_id,
|
|
226
|
+
status: data.status,
|
|
227
|
+
type: data.type,
|
|
228
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
229
|
+
webhookId: data.webhook_id
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
const unmarshalListWebhookEventsResponse = (data) => {
|
|
233
|
+
if (!isJSONObject(data)) {
|
|
234
|
+
throw new TypeError(
|
|
235
|
+
`Unmarshalling the type 'ListWebhookEventsResponse' failed as data isn't a dictionary.`
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
return {
|
|
239
|
+
totalCount: data.total_count,
|
|
240
|
+
webhookEvents: unmarshalArrayOfObject(
|
|
241
|
+
data.webhook_events,
|
|
242
|
+
unmarshalWebhookEvent
|
|
243
|
+
)
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
const unmarshalListWebhooksResponse = (data) => {
|
|
247
|
+
if (!isJSONObject(data)) {
|
|
248
|
+
throw new TypeError(
|
|
249
|
+
`Unmarshalling the type 'ListWebhooksResponse' failed as data isn't a dictionary.`
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
return {
|
|
253
|
+
totalCount: data.total_count,
|
|
254
|
+
webhooks: unmarshalArrayOfObject(data.webhooks, unmarshalWebhook)
|
|
255
|
+
};
|
|
256
|
+
};
|
|
195
257
|
const unmarshalStatistics = (data) => {
|
|
196
258
|
if (!isJSONObject(data)) {
|
|
197
259
|
throw new TypeError(
|
|
@@ -242,14 +304,23 @@ const marshalCreateEmailRequest = (request, defaults) => ({
|
|
|
242
304
|
text: request.text,
|
|
243
305
|
to: request.to !== void 0 ? request.to.map((elt) => marshalCreateEmailRequestAddress(elt)) : void 0
|
|
244
306
|
});
|
|
307
|
+
const marshalUpdateWebhookRequest = (request, defaults) => ({
|
|
308
|
+
event_types: request.eventTypes !== void 0 ? request.eventTypes : void 0,
|
|
309
|
+
name: request.name,
|
|
310
|
+
sns_arn: request.snsArn
|
|
311
|
+
});
|
|
245
312
|
export {
|
|
246
313
|
marshalCreateDomainRequest,
|
|
247
314
|
marshalCreateEmailRequest,
|
|
315
|
+
marshalUpdateWebhookRequest,
|
|
248
316
|
unmarshalCreateEmailResponse,
|
|
249
317
|
unmarshalDomain,
|
|
250
318
|
unmarshalDomainLastStatus,
|
|
251
319
|
unmarshalEmail,
|
|
252
320
|
unmarshalListDomainsResponse,
|
|
253
321
|
unmarshalListEmailsResponse,
|
|
254
|
-
|
|
322
|
+
unmarshalListWebhookEventsResponse,
|
|
323
|
+
unmarshalListWebhooksResponse,
|
|
324
|
+
unmarshalStatistics,
|
|
325
|
+
unmarshalWebhook
|
|
255
326
|
};
|
|
@@ -6,6 +6,10 @@ export type EmailFlag = 'unknown_flag' | 'soft_bounce' | 'hard_bounce' | 'spam'
|
|
|
6
6
|
export type EmailRcptType = 'unknown_rcpt_type' | 'to' | 'cc' | 'bcc';
|
|
7
7
|
export type EmailStatus = 'unknown' | 'new' | 'sending' | 'sent' | 'failed' | 'canceled';
|
|
8
8
|
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';
|
|
9
|
+
export type ListWebhookEventsRequestOrderBy = 'created_at_desc' | 'created_at_asc';
|
|
10
|
+
export type ListWebhooksRequestOrderBy = 'created_at_desc' | 'created_at_asc';
|
|
11
|
+
export type WebhookEventStatus = 'unknown_status' | 'waiting' | 'sending' | 'sent' | 'error';
|
|
12
|
+
export type WebhookEventType = 'unknown_type' | 'email_queued' | 'email_dropped' | 'email_deferred' | 'email_delivered' | 'email_spam' | 'email_mailbox_not_found';
|
|
9
13
|
export interface DomainRecordsDMARC {
|
|
10
14
|
/** Name of the DMARC TXT record. */
|
|
11
15
|
name: string;
|
|
@@ -173,6 +177,48 @@ export interface Domain {
|
|
|
173
177
|
*/
|
|
174
178
|
region: Region;
|
|
175
179
|
}
|
|
180
|
+
export interface WebhookEvent {
|
|
181
|
+
/** ID of the Webhook Event. */
|
|
182
|
+
id: string;
|
|
183
|
+
/** ID of the Webhook that triggers the Event. */
|
|
184
|
+
webhookId: string;
|
|
185
|
+
/** ID of the Webhook Event Organization. */
|
|
186
|
+
organizationId: string;
|
|
187
|
+
/** ID of the Webhook Event Project. */
|
|
188
|
+
projectId: string;
|
|
189
|
+
/** Type of the Webhook Event. */
|
|
190
|
+
type: WebhookEventType;
|
|
191
|
+
/** Status of the Webhook Event. */
|
|
192
|
+
status: WebhookEventStatus;
|
|
193
|
+
/** Data sent to the Webhook destination. */
|
|
194
|
+
data: string;
|
|
195
|
+
/** Date and time of the Webhook Event creation. */
|
|
196
|
+
createdAt?: Date;
|
|
197
|
+
/** Date and time of last Webhook Event updates. */
|
|
198
|
+
updatedAt?: Date;
|
|
199
|
+
/** Optional Email ID if the event is triggered by an Email resource. */
|
|
200
|
+
emailId?: string;
|
|
201
|
+
}
|
|
202
|
+
export interface Webhook {
|
|
203
|
+
/** ID of the Webhook. */
|
|
204
|
+
id: string;
|
|
205
|
+
/** ID of the Domain to watch for triggering events. */
|
|
206
|
+
domainId: string;
|
|
207
|
+
/** ID of the Webhook Organization. */
|
|
208
|
+
organizationId: string;
|
|
209
|
+
/** ID of the Webhook Project. */
|
|
210
|
+
projectId: string;
|
|
211
|
+
/** Name of the Webhook. */
|
|
212
|
+
name: string;
|
|
213
|
+
/** List of event types that will trigger a Webhook Event. */
|
|
214
|
+
eventTypes: WebhookEventType[];
|
|
215
|
+
/** Scaleway SNS ARN topic to push the events to. */
|
|
216
|
+
snsArn: string;
|
|
217
|
+
/** Date and time of the Webhook creation. */
|
|
218
|
+
createdAt?: Date;
|
|
219
|
+
/** Date and time of last Webhook updates. */
|
|
220
|
+
updatedAt?: Date;
|
|
221
|
+
}
|
|
176
222
|
export type CancelEmailRequest = {
|
|
177
223
|
/**
|
|
178
224
|
* Region to target. If none is passed will use default region from the
|
|
@@ -237,6 +283,15 @@ export interface CreateEmailResponse {
|
|
|
237
283
|
/** Single page of emails matching the requested criteria. */
|
|
238
284
|
emails: Email[];
|
|
239
285
|
}
|
|
286
|
+
export type DeleteWebhookRequest = {
|
|
287
|
+
/**
|
|
288
|
+
* Region to target. If none is passed will use default region from the
|
|
289
|
+
* config.
|
|
290
|
+
*/
|
|
291
|
+
region?: Region;
|
|
292
|
+
/** ID of the Webhook to delete. */
|
|
293
|
+
webhookId: string;
|
|
294
|
+
};
|
|
240
295
|
export interface DomainLastStatus {
|
|
241
296
|
/** The ID of the domain. */
|
|
242
297
|
domainId: string;
|
|
@@ -318,6 +373,7 @@ export type ListDomainsRequest = {
|
|
|
318
373
|
export interface ListDomainsResponse {
|
|
319
374
|
/** Number of domains that match the request (without pagination). */
|
|
320
375
|
totalCount: number;
|
|
376
|
+
/** Single page of domains matching the requested criteria. */
|
|
321
377
|
domains: Domain[];
|
|
322
378
|
}
|
|
323
379
|
export type ListEmailsRequest = {
|
|
@@ -361,6 +417,50 @@ export interface ListEmailsResponse {
|
|
|
361
417
|
/** Single page of emails matching the requested criteria. */
|
|
362
418
|
emails: Email[];
|
|
363
419
|
}
|
|
420
|
+
export type ListWebhookEventsRequest = {
|
|
421
|
+
/**
|
|
422
|
+
* Region to target. If none is passed will use default region from the
|
|
423
|
+
* config.
|
|
424
|
+
*/
|
|
425
|
+
region?: Region;
|
|
426
|
+
/** ID of the Webhook linked to the events. */
|
|
427
|
+
webhookId: string;
|
|
428
|
+
/** (Optional) List Webhook events corresponding to specific criteria. */
|
|
429
|
+
orderBy?: ListWebhookEventsRequestOrderBy;
|
|
430
|
+
/** Requested page number. Value must be greater or equal to 1. */
|
|
431
|
+
page?: number;
|
|
432
|
+
/** Requested page size. Value must be between 1 and 100. */
|
|
433
|
+
pageSize?: number;
|
|
434
|
+
};
|
|
435
|
+
export interface ListWebhookEventsResponse {
|
|
436
|
+
/** Number of Webhook events matching the requested criteria. */
|
|
437
|
+
totalCount: number;
|
|
438
|
+
/** Single page of Webhook events matching the requested criteria. */
|
|
439
|
+
webhookEvents: WebhookEvent[];
|
|
440
|
+
}
|
|
441
|
+
export type ListWebhooksRequest = {
|
|
442
|
+
/**
|
|
443
|
+
* Region to target. If none is passed will use default region from the
|
|
444
|
+
* config.
|
|
445
|
+
*/
|
|
446
|
+
region?: Region;
|
|
447
|
+
/** (Optional) List Webhooks corresponding to specific criteria. */
|
|
448
|
+
orderBy?: ListWebhooksRequestOrderBy;
|
|
449
|
+
/** (Optional) Requested page number. Value must be greater or equal to 1. */
|
|
450
|
+
page?: number;
|
|
451
|
+
/** (Optional) Requested page size. Value must be between 1 and 100. */
|
|
452
|
+
pageSize?: number;
|
|
453
|
+
/** (Optional) ID of the Project for which to list the Webhooks. */
|
|
454
|
+
projectId?: string;
|
|
455
|
+
/** (Optional) ID of the Organization for which to list the Webhooks. */
|
|
456
|
+
organizationId?: string;
|
|
457
|
+
};
|
|
458
|
+
export interface ListWebhooksResponse {
|
|
459
|
+
/** Number of Webhooks matching the requested criteria. */
|
|
460
|
+
totalCount: number;
|
|
461
|
+
/** Single page of Webhooks matching the requested criteria. */
|
|
462
|
+
webhooks: Webhook[];
|
|
463
|
+
}
|
|
364
464
|
export type RevokeDomainRequest = {
|
|
365
465
|
/**
|
|
366
466
|
* Region to target. If none is passed will use default region from the
|
|
@@ -399,3 +499,18 @@ export interface Statistics {
|
|
|
399
499
|
*/
|
|
400
500
|
canceledCount: number;
|
|
401
501
|
}
|
|
502
|
+
export type UpdateWebhookRequest = {
|
|
503
|
+
/**
|
|
504
|
+
* Region to target. If none is passed will use default region from the
|
|
505
|
+
* config.
|
|
506
|
+
*/
|
|
507
|
+
region?: Region;
|
|
508
|
+
/** ID of the Webhook to update. */
|
|
509
|
+
webhookId: string;
|
|
510
|
+
/** Name of the Webhook to update. */
|
|
511
|
+
name?: string;
|
|
512
|
+
/** List of event types to update. */
|
|
513
|
+
eventTypes?: WebhookEventType[];
|
|
514
|
+
/** Scaleway SNS ARN topic to update. */
|
|
515
|
+
snsArn?: string;
|
|
516
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const ListWebhookEventsRequest = {
|
|
4
|
+
page: {
|
|
5
|
+
greaterThan: 0
|
|
6
|
+
},
|
|
7
|
+
pageSize: {
|
|
8
|
+
greaterThanOrEqual: 1,
|
|
9
|
+
lessThanOrEqual: 100
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const ListWebhooksRequest = {
|
|
13
|
+
page: {
|
|
14
|
+
greaterThan: 0
|
|
15
|
+
},
|
|
16
|
+
pageSize: {
|
|
17
|
+
greaterThanOrEqual: 1,
|
|
18
|
+
lessThanOrEqual: 100
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const UpdateWebhookRequest = {
|
|
22
|
+
name: {
|
|
23
|
+
maxLength: 127,
|
|
24
|
+
minLength: 3
|
|
25
|
+
},
|
|
26
|
+
snsArn: {
|
|
27
|
+
maxLength: 127,
|
|
28
|
+
minLength: 3
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.ListWebhookEventsRequest = ListWebhookEventsRequest;
|
|
32
|
+
exports.ListWebhooksRequest = ListWebhooksRequest;
|
|
33
|
+
exports.UpdateWebhookRequest = UpdateWebhookRequest;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const ListWebhookEventsRequest: {
|
|
2
|
+
page: {
|
|
3
|
+
greaterThan: number;
|
|
4
|
+
};
|
|
5
|
+
pageSize: {
|
|
6
|
+
greaterThanOrEqual: number;
|
|
7
|
+
lessThanOrEqual: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const ListWebhooksRequest: {
|
|
11
|
+
page: {
|
|
12
|
+
greaterThan: number;
|
|
13
|
+
};
|
|
14
|
+
pageSize: {
|
|
15
|
+
greaterThanOrEqual: number;
|
|
16
|
+
lessThanOrEqual: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const UpdateWebhookRequest: {
|
|
20
|
+
name: {
|
|
21
|
+
maxLength: number;
|
|
22
|
+
minLength: number;
|
|
23
|
+
};
|
|
24
|
+
snsArn: {
|
|
25
|
+
maxLength: number;
|
|
26
|
+
minLength: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const ListWebhookEventsRequest = {
|
|
2
|
+
page: {
|
|
3
|
+
greaterThan: 0
|
|
4
|
+
},
|
|
5
|
+
pageSize: {
|
|
6
|
+
greaterThanOrEqual: 1,
|
|
7
|
+
lessThanOrEqual: 100
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
const ListWebhooksRequest = {
|
|
11
|
+
page: {
|
|
12
|
+
greaterThan: 0
|
|
13
|
+
},
|
|
14
|
+
pageSize: {
|
|
15
|
+
greaterThanOrEqual: 1,
|
|
16
|
+
lessThanOrEqual: 100
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const UpdateWebhookRequest = {
|
|
20
|
+
name: {
|
|
21
|
+
maxLength: 127,
|
|
22
|
+
minLength: 3
|
|
23
|
+
},
|
|
24
|
+
snsArn: {
|
|
25
|
+
maxLength: 127,
|
|
26
|
+
minLength: 3
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
ListWebhookEventsRequest,
|
|
31
|
+
ListWebhooksRequest,
|
|
32
|
+
UpdateWebhookRequest
|
|
33
|
+
};
|
package/dist/scw/constants.cjs
CHANGED
package/dist/scw/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
2
|
-
export declare const userAgent = "scaleway-sdk-js/v2.
|
|
1
|
+
export declare const version = "v2.31.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.31.0";
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.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": "
|
|
42
|
+
"gitHead": "8cdb5b0a6e64ec28b1e39627fb0de8b6ce0ef2e8"
|
|
43
43
|
}
|