@scaleway/sdk 2.41.0 → 2.42.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/applesilicon/v1alpha1/marshalling.gen.cjs +2 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +2 -0
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +5 -1
- package/dist/api/domain/v2beta1/types.gen.d.ts +1 -1
- package/dist/api/instance/v1/types.gen.d.ts +2 -1
- package/dist/api/tem/v1alpha1/api.gen.cjs +60 -0
- package/dist/api/tem/v1alpha1/api.gen.d.ts +45 -1
- package/dist/api/tem/v1alpha1/api.gen.js +61 -1
- package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +8 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +8 -0
- package/dist/api/tem/v1alpha1/types.gen.d.ts +26 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +11 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +10 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.js +11 -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
|
@@ -109,7 +109,9 @@ const unmarshalServer = (data) => {
|
|
|
109
109
|
organizationId: data.organization_id,
|
|
110
110
|
os: data.os ? unmarshalOS(data.os) : void 0,
|
|
111
111
|
projectId: data.project_id,
|
|
112
|
+
sshUsername: data.ssh_username,
|
|
112
113
|
status: data.status,
|
|
114
|
+
sudoPassword: data.sudo_password,
|
|
113
115
|
type: data.type,
|
|
114
116
|
updatedAt: marshalling.unmarshalDate(data.updated_at),
|
|
115
117
|
vncUrl: data.vnc_url,
|
|
@@ -107,7 +107,9 @@ const unmarshalServer = (data) => {
|
|
|
107
107
|
organizationId: data.organization_id,
|
|
108
108
|
os: data.os ? unmarshalOS(data.os) : void 0,
|
|
109
109
|
projectId: data.project_id,
|
|
110
|
+
sshUsername: data.ssh_username,
|
|
110
111
|
status: data.status,
|
|
112
|
+
sudoPassword: data.sudo_password,
|
|
111
113
|
type: data.type,
|
|
112
114
|
updatedAt: unmarshalDate(data.updated_at),
|
|
113
115
|
vncUrl: data.vnc_url,
|
|
@@ -74,8 +74,12 @@ export interface Server {
|
|
|
74
74
|
organizationId: string;
|
|
75
75
|
/** IPv4 address of the server. */
|
|
76
76
|
ip: string;
|
|
77
|
-
/** URL
|
|
77
|
+
/** Vnc:// URL to access Apple Remote Desktop. */
|
|
78
78
|
vncUrl: string;
|
|
79
|
+
/** SSH Username for remote shell. */
|
|
80
|
+
sshUsername: string;
|
|
81
|
+
/** Admin password required to execute commands. */
|
|
82
|
+
sudoPassword: string;
|
|
79
83
|
/**
|
|
80
84
|
* Initially installed OS, this does not necessarily reflect the current OS
|
|
81
85
|
* version.
|
|
@@ -10,7 +10,7 @@ export type DSRecordAlgorithm = 'rsamd5' | 'dh' | 'dsa' | 'rsasha1' | 'dsa_nsec3
|
|
|
10
10
|
export type DSRecordDigestType = 'sha_1' | 'sha_256' | 'gost_r_34_11_94' | 'sha_384';
|
|
11
11
|
export type DomainFeatureStatus = 'feature_status_unknown' | 'enabling' | 'enabled' | 'disabling' | 'disabled';
|
|
12
12
|
export type DomainRecordHTTPServiceConfigStrategy = 'random' | 'hashed' | 'all';
|
|
13
|
-
export type DomainRecordType = 'unknown' | 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'TLSA' | 'MX' | 'NS' | 'PTR' | 'CAA' | 'ALIAS' | 'LOC' | 'SSHFP' | 'HINFO' | 'RP' | 'URI' | 'DS' | 'NAPTR' | 'DNAME';
|
|
13
|
+
export type DomainRecordType = 'unknown' | 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'TLSA' | 'MX' | 'NS' | 'PTR' | 'CAA' | 'ALIAS' | 'LOC' | 'SSHFP' | 'HINFO' | 'RP' | 'URI' | 'DS' | 'NAPTR' | 'DNAME' | 'SVCB' | 'HTTPS';
|
|
14
14
|
export type DomainRegistrationStatusTransferStatus = 'status_unknown' | 'pending' | 'waiting_vote' | 'rejected' | 'processing' | 'done';
|
|
15
15
|
export type DomainStatus = 'status_unknown' | 'active' | 'creating' | 'create_error' | 'renewing' | 'renew_error' | 'xfering' | 'xfer_error' | 'expired' | 'expiring' | 'updating' | 'checking' | 'locked' | 'deleting';
|
|
16
16
|
export type HostStatus = 'unknown_status' | 'active' | 'updating' | 'deleting';
|
|
@@ -257,6 +257,24 @@ class API extends api.API {
|
|
|
257
257
|
},
|
|
258
258
|
marshalling_gen.unmarshalDomainLastStatus
|
|
259
259
|
);
|
|
260
|
+
/**
|
|
261
|
+
* Create a Webhook. Create a new Webhook triggered by a list of event types
|
|
262
|
+
* and pushed to a Scaleway SNS ARN.
|
|
263
|
+
*
|
|
264
|
+
* @param request - The request {@link CreateWebhookRequest}
|
|
265
|
+
* @returns A Promise of Webhook
|
|
266
|
+
*/
|
|
267
|
+
createWebhook = (request) => this.client.fetch(
|
|
268
|
+
{
|
|
269
|
+
body: JSON.stringify(
|
|
270
|
+
marshalling_gen.marshalCreateWebhookRequest(request, this.client.settings)
|
|
271
|
+
),
|
|
272
|
+
headers: jsonContentHeaders,
|
|
273
|
+
method: "POST",
|
|
274
|
+
path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/webhooks`
|
|
275
|
+
},
|
|
276
|
+
marshalling_gen.unmarshalWebhook
|
|
277
|
+
);
|
|
260
278
|
pageOfListWebhooks = (request = {}) => this.client.fetch(
|
|
261
279
|
{
|
|
262
280
|
method: "GET",
|
|
@@ -275,7 +293,34 @@ class API extends api.API {
|
|
|
275
293
|
},
|
|
276
294
|
marshalling_gen.unmarshalListWebhooksResponse
|
|
277
295
|
);
|
|
296
|
+
/**
|
|
297
|
+
* List Webhooks. Retrieve Webhooks in a specific Project or in a specific
|
|
298
|
+
* Organization using the `region` parameter.
|
|
299
|
+
*
|
|
300
|
+
* @param request - The request {@link ListWebhooksRequest}
|
|
301
|
+
* @returns A Promise of ListWebhooksResponse
|
|
302
|
+
*/
|
|
278
303
|
listWebhooks = (request = {}) => resourcePaginator.enrichForPagination("webhooks", this.pageOfListWebhooks, request);
|
|
304
|
+
/**
|
|
305
|
+
* Get information about a Webhook. Retrieve information about a specific
|
|
306
|
+
* Webhook using the `webhook_id` and `region` parameters.
|
|
307
|
+
*
|
|
308
|
+
* @param request - The request {@link GetWebhookRequest}
|
|
309
|
+
* @returns A Promise of Webhook
|
|
310
|
+
*/
|
|
311
|
+
getWebhook = (request) => this.client.fetch(
|
|
312
|
+
{
|
|
313
|
+
method: "GET",
|
|
314
|
+
path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/webhooks/${marshalling.validatePathParam("webhookId", request.webhookId)}`
|
|
315
|
+
},
|
|
316
|
+
marshalling_gen.unmarshalWebhook
|
|
317
|
+
);
|
|
318
|
+
/**
|
|
319
|
+
* Update a Webhook. Update a Webhook events type, SNS ARN or name.
|
|
320
|
+
*
|
|
321
|
+
* @param request - The request {@link UpdateWebhookRequest}
|
|
322
|
+
* @returns A Promise of Webhook
|
|
323
|
+
*/
|
|
279
324
|
updateWebhook = (request) => this.client.fetch(
|
|
280
325
|
{
|
|
281
326
|
body: JSON.stringify(
|
|
@@ -287,6 +332,13 @@ class API extends api.API {
|
|
|
287
332
|
},
|
|
288
333
|
marshalling_gen.unmarshalWebhook
|
|
289
334
|
);
|
|
335
|
+
/**
|
|
336
|
+
* Delete a Webhook. You must specify the Webhook you want to delete by the
|
|
337
|
+
* `region` and `webhook_id`. Deleting a Webhook is permanent and cannot be
|
|
338
|
+
* undone.
|
|
339
|
+
*
|
|
340
|
+
* @param request - The request {@link DeleteWebhookRequest}
|
|
341
|
+
*/
|
|
290
342
|
deleteWebhook = (request) => this.client.fetch({
|
|
291
343
|
method: "DELETE",
|
|
292
344
|
path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/webhooks/${marshalling.validatePathParam("webhookId", request.webhookId)}`
|
|
@@ -312,6 +364,14 @@ class API extends api.API {
|
|
|
312
364
|
},
|
|
313
365
|
marshalling_gen.unmarshalListWebhookEventsResponse
|
|
314
366
|
);
|
|
367
|
+
/**
|
|
368
|
+
* List Webhook triggered events. Retrieve the list of Webhook events
|
|
369
|
+
* triggered from a specific Webhook or for a specific Project or
|
|
370
|
+
* Organization. You must specify the `region`.
|
|
371
|
+
*
|
|
372
|
+
* @param request - The request {@link ListWebhookEventsRequest}
|
|
373
|
+
* @returns A Promise of ListWebhookEventsResponse
|
|
374
|
+
*/
|
|
315
375
|
listWebhookEvents = (request) => resourcePaginator.enrichForPagination("webhookEvents", this.pageOfListWebhookEvents, request);
|
|
316
376
|
}
|
|
317
377
|
exports.API = API;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region, WaitForOptions } from '../../../bridge';
|
|
3
|
-
import type { CancelEmailRequest, CheckDomainRequest, CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, DeleteWebhookRequest, Domain, DomainLastStatus, Email, GetDomainLastStatusRequest, GetDomainRequest, GetEmailRequest, GetStatisticsRequest, ListDomainsRequest, ListDomainsResponse, ListEmailsRequest, ListEmailsResponse, ListWebhookEventsRequest, ListWebhookEventsResponse, ListWebhooksRequest, ListWebhooksResponse, RevokeDomainRequest, Statistics, UpdateWebhookRequest, Webhook } from './types.gen';
|
|
3
|
+
import type { CancelEmailRequest, CheckDomainRequest, CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, CreateWebhookRequest, DeleteWebhookRequest, Domain, DomainLastStatus, Email, GetDomainLastStatusRequest, GetDomainRequest, GetEmailRequest, GetStatisticsRequest, GetWebhookRequest, ListDomainsRequest, ListDomainsResponse, ListEmailsRequest, ListEmailsResponse, ListWebhookEventsRequest, ListWebhookEventsResponse, ListWebhooksRequest, ListWebhooksResponse, RevokeDomainRequest, Statistics, UpdateWebhookRequest, Webhook } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Transactional Email API.
|
|
6
6
|
*
|
|
@@ -131,14 +131,58 @@ export declare class API extends ParentAPI {
|
|
|
131
131
|
* @returns A Promise of DomainLastStatus
|
|
132
132
|
*/
|
|
133
133
|
getDomainLastStatus: (request: Readonly<GetDomainLastStatusRequest>) => Promise<DomainLastStatus>;
|
|
134
|
+
/**
|
|
135
|
+
* Create a Webhook. Create a new Webhook triggered by a list of event types
|
|
136
|
+
* and pushed to a Scaleway SNS ARN.
|
|
137
|
+
*
|
|
138
|
+
* @param request - The request {@link CreateWebhookRequest}
|
|
139
|
+
* @returns A Promise of Webhook
|
|
140
|
+
*/
|
|
141
|
+
createWebhook: (request: Readonly<CreateWebhookRequest>) => Promise<Webhook>;
|
|
134
142
|
protected pageOfListWebhooks: (request?: Readonly<ListWebhooksRequest>) => Promise<ListWebhooksResponse>;
|
|
143
|
+
/**
|
|
144
|
+
* List Webhooks. Retrieve Webhooks in a specific Project or in a specific
|
|
145
|
+
* Organization using the `region` parameter.
|
|
146
|
+
*
|
|
147
|
+
* @param request - The request {@link ListWebhooksRequest}
|
|
148
|
+
* @returns A Promise of ListWebhooksResponse
|
|
149
|
+
*/
|
|
135
150
|
listWebhooks: (request?: Readonly<ListWebhooksRequest>) => Promise<ListWebhooksResponse> & {
|
|
136
151
|
all: () => Promise<Webhook[]>;
|
|
137
152
|
[Symbol.asyncIterator]: () => AsyncGenerator<Webhook[], void, void>;
|
|
138
153
|
};
|
|
154
|
+
/**
|
|
155
|
+
* Get information about a Webhook. Retrieve information about a specific
|
|
156
|
+
* Webhook using the `webhook_id` and `region` parameters.
|
|
157
|
+
*
|
|
158
|
+
* @param request - The request {@link GetWebhookRequest}
|
|
159
|
+
* @returns A Promise of Webhook
|
|
160
|
+
*/
|
|
161
|
+
getWebhook: (request: Readonly<GetWebhookRequest>) => Promise<Webhook>;
|
|
162
|
+
/**
|
|
163
|
+
* Update a Webhook. Update a Webhook events type, SNS ARN or name.
|
|
164
|
+
*
|
|
165
|
+
* @param request - The request {@link UpdateWebhookRequest}
|
|
166
|
+
* @returns A Promise of Webhook
|
|
167
|
+
*/
|
|
139
168
|
updateWebhook: (request: Readonly<UpdateWebhookRequest>) => Promise<Webhook>;
|
|
169
|
+
/**
|
|
170
|
+
* Delete a Webhook. You must specify the Webhook you want to delete by the
|
|
171
|
+
* `region` and `webhook_id`. Deleting a Webhook is permanent and cannot be
|
|
172
|
+
* undone.
|
|
173
|
+
*
|
|
174
|
+
* @param request - The request {@link DeleteWebhookRequest}
|
|
175
|
+
*/
|
|
140
176
|
deleteWebhook: (request: Readonly<DeleteWebhookRequest>) => Promise<void>;
|
|
141
177
|
protected pageOfListWebhookEvents: (request: Readonly<ListWebhookEventsRequest>) => Promise<ListWebhookEventsResponse>;
|
|
178
|
+
/**
|
|
179
|
+
* List Webhook triggered events. Retrieve the list of Webhook events
|
|
180
|
+
* triggered from a specific Webhook or for a specific Project or
|
|
181
|
+
* Organization. You must specify the `region`.
|
|
182
|
+
*
|
|
183
|
+
* @param request - The request {@link ListWebhookEventsRequest}
|
|
184
|
+
* @returns A Promise of ListWebhookEventsResponse
|
|
185
|
+
*/
|
|
142
186
|
listWebhookEvents: (request: Readonly<ListWebhookEventsRequest>) => Promise<ListWebhookEventsResponse> & {
|
|
143
187
|
all: () => Promise<import("./types.gen").WebhookEvent[]>;
|
|
144
188
|
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").WebhookEvent[], void, void>;
|
|
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
6
|
import { EMAIL_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { marshalCreateEmailRequest, unmarshalCreateEmailResponse, unmarshalEmail, unmarshalListEmailsResponse, unmarshalStatistics, marshalCreateDomainRequest, unmarshalDomain, unmarshalListDomainsResponse, unmarshalDomainLastStatus, unmarshalListWebhooksResponse, marshalUpdateWebhookRequest,
|
|
7
|
+
import { marshalCreateEmailRequest, unmarshalCreateEmailResponse, unmarshalEmail, unmarshalListEmailsResponse, unmarshalStatistics, marshalCreateDomainRequest, unmarshalDomain, unmarshalListDomainsResponse, unmarshalDomainLastStatus, marshalCreateWebhookRequest, unmarshalWebhook, unmarshalListWebhooksResponse, marshalUpdateWebhookRequest, unmarshalListWebhookEventsResponse } from "./marshalling.gen.js";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
@@ -255,6 +255,24 @@ class API extends API$1 {
|
|
|
255
255
|
},
|
|
256
256
|
unmarshalDomainLastStatus
|
|
257
257
|
);
|
|
258
|
+
/**
|
|
259
|
+
* Create a Webhook. Create a new Webhook triggered by a list of event types
|
|
260
|
+
* and pushed to a Scaleway SNS ARN.
|
|
261
|
+
*
|
|
262
|
+
* @param request - The request {@link CreateWebhookRequest}
|
|
263
|
+
* @returns A Promise of Webhook
|
|
264
|
+
*/
|
|
265
|
+
createWebhook = (request) => this.client.fetch(
|
|
266
|
+
{
|
|
267
|
+
body: JSON.stringify(
|
|
268
|
+
marshalCreateWebhookRequest(request, this.client.settings)
|
|
269
|
+
),
|
|
270
|
+
headers: jsonContentHeaders,
|
|
271
|
+
method: "POST",
|
|
272
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/webhooks`
|
|
273
|
+
},
|
|
274
|
+
unmarshalWebhook
|
|
275
|
+
);
|
|
258
276
|
pageOfListWebhooks = (request = {}) => this.client.fetch(
|
|
259
277
|
{
|
|
260
278
|
method: "GET",
|
|
@@ -273,7 +291,34 @@ class API extends API$1 {
|
|
|
273
291
|
},
|
|
274
292
|
unmarshalListWebhooksResponse
|
|
275
293
|
);
|
|
294
|
+
/**
|
|
295
|
+
* List Webhooks. Retrieve Webhooks in a specific Project or in a specific
|
|
296
|
+
* Organization using the `region` parameter.
|
|
297
|
+
*
|
|
298
|
+
* @param request - The request {@link ListWebhooksRequest}
|
|
299
|
+
* @returns A Promise of ListWebhooksResponse
|
|
300
|
+
*/
|
|
276
301
|
listWebhooks = (request = {}) => enrichForPagination("webhooks", this.pageOfListWebhooks, request);
|
|
302
|
+
/**
|
|
303
|
+
* Get information about a Webhook. Retrieve information about a specific
|
|
304
|
+
* Webhook using the `webhook_id` and `region` parameters.
|
|
305
|
+
*
|
|
306
|
+
* @param request - The request {@link GetWebhookRequest}
|
|
307
|
+
* @returns A Promise of Webhook
|
|
308
|
+
*/
|
|
309
|
+
getWebhook = (request) => this.client.fetch(
|
|
310
|
+
{
|
|
311
|
+
method: "GET",
|
|
312
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/webhooks/${validatePathParam("webhookId", request.webhookId)}`
|
|
313
|
+
},
|
|
314
|
+
unmarshalWebhook
|
|
315
|
+
);
|
|
316
|
+
/**
|
|
317
|
+
* Update a Webhook. Update a Webhook events type, SNS ARN or name.
|
|
318
|
+
*
|
|
319
|
+
* @param request - The request {@link UpdateWebhookRequest}
|
|
320
|
+
* @returns A Promise of Webhook
|
|
321
|
+
*/
|
|
277
322
|
updateWebhook = (request) => this.client.fetch(
|
|
278
323
|
{
|
|
279
324
|
body: JSON.stringify(
|
|
@@ -285,6 +330,13 @@ class API extends API$1 {
|
|
|
285
330
|
},
|
|
286
331
|
unmarshalWebhook
|
|
287
332
|
);
|
|
333
|
+
/**
|
|
334
|
+
* Delete a Webhook. You must specify the Webhook you want to delete by the
|
|
335
|
+
* `region` and `webhook_id`. Deleting a Webhook is permanent and cannot be
|
|
336
|
+
* undone.
|
|
337
|
+
*
|
|
338
|
+
* @param request - The request {@link DeleteWebhookRequest}
|
|
339
|
+
*/
|
|
288
340
|
deleteWebhook = (request) => this.client.fetch({
|
|
289
341
|
method: "DELETE",
|
|
290
342
|
path: `/transactional-email/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/webhooks/${validatePathParam("webhookId", request.webhookId)}`
|
|
@@ -310,6 +362,14 @@ class API extends API$1 {
|
|
|
310
362
|
},
|
|
311
363
|
unmarshalListWebhookEventsResponse
|
|
312
364
|
);
|
|
365
|
+
/**
|
|
366
|
+
* List Webhook triggered events. Retrieve the list of Webhook events
|
|
367
|
+
* triggered from a specific Webhook or for a specific Project or
|
|
368
|
+
* Organization. You must specify the `region`.
|
|
369
|
+
*
|
|
370
|
+
* @param request - The request {@link ListWebhookEventsRequest}
|
|
371
|
+
* @returns A Promise of ListWebhookEventsResponse
|
|
372
|
+
*/
|
|
313
373
|
listWebhookEvents = (request) => enrichForPagination("webhookEvents", this.pageOfListWebhookEvents, request);
|
|
314
374
|
}
|
|
315
375
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { CancelEmailRequest, CheckDomainRequest, CreateDomainRequest, CreateEmailRequest, CreateEmailRequestAddress, CreateEmailRequestAttachment, CreateEmailRequestHeader, CreateEmailResponse, DeleteWebhookRequest, Domain, DomainLastStatus, DomainLastStatusDkimRecord, DomainLastStatusDmarcRecord, DomainLastStatusRecordStatus, DomainLastStatusSpfRecord, DomainRecords, DomainRecordsDMARC, DomainReputation, DomainReputationStatus, DomainStatistics, DomainStatus, Email, EmailFlag, EmailRcptType, EmailStatus, EmailTry, GetDomainLastStatusRequest, GetDomainRequest, GetEmailRequest, GetStatisticsRequest, ListDomainsRequest, ListDomainsResponse, ListEmailsRequest, ListEmailsRequestOrderBy, ListEmailsResponse, ListWebhookEventsRequest, ListWebhookEventsRequestOrderBy, ListWebhookEventsResponse, ListWebhooksRequest, ListWebhooksRequestOrderBy, ListWebhooksResponse, RevokeDomainRequest, Statistics, UpdateWebhookRequest, Webhook, WebhookEvent, WebhookEventStatus, WebhookEventType, } from './types.gen';
|
|
3
|
+
export type { CancelEmailRequest, CheckDomainRequest, CreateDomainRequest, CreateEmailRequest, CreateEmailRequestAddress, CreateEmailRequestAttachment, CreateEmailRequestHeader, CreateEmailResponse, CreateWebhookRequest, DeleteWebhookRequest, Domain, DomainLastStatus, DomainLastStatusDkimRecord, DomainLastStatusDmarcRecord, DomainLastStatusRecordStatus, DomainLastStatusSpfRecord, DomainRecords, DomainRecordsDMARC, DomainReputation, DomainReputationStatus, DomainStatistics, DomainStatus, Email, EmailFlag, EmailRcptType, EmailStatus, EmailTry, GetDomainLastStatusRequest, GetDomainRequest, GetEmailRequest, GetStatisticsRequest, GetWebhookRequest, ListDomainsRequest, ListDomainsResponse, ListEmailsRequest, ListEmailsRequestOrderBy, ListEmailsResponse, ListWebhookEventsRequest, ListWebhookEventsRequestOrderBy, ListWebhookEventsResponse, ListWebhooksRequest, ListWebhooksRequestOrderBy, ListWebhooksResponse, RevokeDomainRequest, Statistics, UpdateWebhookRequest, Webhook, WebhookEvent, WebhookEventStatus, WebhookEventType, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -308,6 +308,13 @@ const marshalCreateEmailRequest = (request, defaults) => ({
|
|
|
308
308
|
text: request.text,
|
|
309
309
|
to: request.to !== void 0 ? request.to.map((elt) => marshalCreateEmailRequestAddress(elt)) : void 0
|
|
310
310
|
});
|
|
311
|
+
const marshalCreateWebhookRequest = (request, defaults) => ({
|
|
312
|
+
domain_id: request.domainId,
|
|
313
|
+
event_types: request.eventTypes !== void 0 ? request.eventTypes : void 0,
|
|
314
|
+
name: request.name,
|
|
315
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
316
|
+
sns_arn: request.snsArn
|
|
317
|
+
});
|
|
311
318
|
const marshalUpdateWebhookRequest = (request, defaults) => ({
|
|
312
319
|
event_types: request.eventTypes !== void 0 ? request.eventTypes : void 0,
|
|
313
320
|
name: request.name,
|
|
@@ -315,6 +322,7 @@ const marshalUpdateWebhookRequest = (request, defaults) => ({
|
|
|
315
322
|
});
|
|
316
323
|
exports.marshalCreateDomainRequest = marshalCreateDomainRequest;
|
|
317
324
|
exports.marshalCreateEmailRequest = marshalCreateEmailRequest;
|
|
325
|
+
exports.marshalCreateWebhookRequest = marshalCreateWebhookRequest;
|
|
318
326
|
exports.marshalUpdateWebhookRequest = marshalUpdateWebhookRequest;
|
|
319
327
|
exports.unmarshalCreateEmailResponse = unmarshalCreateEmailResponse;
|
|
320
328
|
exports.unmarshalDomain = unmarshalDomain;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, Domain, DomainLastStatus, Email, ListDomainsResponse, ListEmailsResponse, ListWebhookEventsResponse, ListWebhooksResponse, Statistics, UpdateWebhookRequest, Webhook } from './types.gen';
|
|
2
|
+
import type { CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, CreateWebhookRequest, Domain, DomainLastStatus, Email, ListDomainsResponse, ListEmailsResponse, ListWebhookEventsResponse, ListWebhooksResponse, Statistics, UpdateWebhookRequest, Webhook } from './types.gen';
|
|
3
3
|
export declare const unmarshalEmail: (data: unknown) => Email;
|
|
4
4
|
export declare const unmarshalDomain: (data: unknown) => Domain;
|
|
5
5
|
export declare const unmarshalWebhook: (data: unknown) => Webhook;
|
|
@@ -12,4 +12,5 @@ export declare const unmarshalListWebhooksResponse: (data: unknown) => ListWebho
|
|
|
12
12
|
export declare const unmarshalStatistics: (data: unknown) => Statistics;
|
|
13
13
|
export declare const marshalCreateDomainRequest: (request: CreateDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
14
14
|
export declare const marshalCreateEmailRequest: (request: CreateEmailRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
15
|
+
export declare const marshalCreateWebhookRequest: (request: CreateWebhookRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
15
16
|
export declare const marshalUpdateWebhookRequest: (request: UpdateWebhookRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -306,6 +306,13 @@ const marshalCreateEmailRequest = (request, defaults) => ({
|
|
|
306
306
|
text: request.text,
|
|
307
307
|
to: request.to !== void 0 ? request.to.map((elt) => marshalCreateEmailRequestAddress(elt)) : void 0
|
|
308
308
|
});
|
|
309
|
+
const marshalCreateWebhookRequest = (request, defaults) => ({
|
|
310
|
+
domain_id: request.domainId,
|
|
311
|
+
event_types: request.eventTypes !== void 0 ? request.eventTypes : void 0,
|
|
312
|
+
name: request.name,
|
|
313
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
314
|
+
sns_arn: request.snsArn
|
|
315
|
+
});
|
|
309
316
|
const marshalUpdateWebhookRequest = (request, defaults) => ({
|
|
310
317
|
event_types: request.eventTypes !== void 0 ? request.eventTypes : void 0,
|
|
311
318
|
name: request.name,
|
|
@@ -314,6 +321,7 @@ const marshalUpdateWebhookRequest = (request, defaults) => ({
|
|
|
314
321
|
export {
|
|
315
322
|
marshalCreateDomainRequest,
|
|
316
323
|
marshalCreateEmailRequest,
|
|
324
|
+
marshalCreateWebhookRequest,
|
|
317
325
|
marshalUpdateWebhookRequest,
|
|
318
326
|
unmarshalCreateEmailResponse,
|
|
319
327
|
unmarshalDomain,
|
|
@@ -285,6 +285,23 @@ export interface CreateEmailResponse {
|
|
|
285
285
|
/** Single page of emails matching the requested criteria. */
|
|
286
286
|
emails: Email[];
|
|
287
287
|
}
|
|
288
|
+
export type CreateWebhookRequest = {
|
|
289
|
+
/**
|
|
290
|
+
* Region to target. If none is passed will use default region from the
|
|
291
|
+
* config.
|
|
292
|
+
*/
|
|
293
|
+
region?: Region;
|
|
294
|
+
/** ID of the Domain to watch for triggering events. */
|
|
295
|
+
domainId: string;
|
|
296
|
+
/** ID of the project to which the Webhook belongs. */
|
|
297
|
+
projectId?: string;
|
|
298
|
+
/** Name of the Webhook. */
|
|
299
|
+
name: string;
|
|
300
|
+
/** List of event types that will trigger an event. */
|
|
301
|
+
eventTypes?: WebhookEventType[];
|
|
302
|
+
/** Scaleway SNS ARN topic to push the events to. */
|
|
303
|
+
snsArn: string;
|
|
304
|
+
};
|
|
288
305
|
export type DeleteWebhookRequest = {
|
|
289
306
|
/**
|
|
290
307
|
* Region to target. If none is passed will use default region from the
|
|
@@ -353,6 +370,15 @@ export type GetStatisticsRequest = {
|
|
|
353
370
|
/** (Optional) Number of emails sent with this sender's email address. */
|
|
354
371
|
mailFrom?: string;
|
|
355
372
|
};
|
|
373
|
+
export type GetWebhookRequest = {
|
|
374
|
+
/**
|
|
375
|
+
* Region to target. If none is passed will use default region from the
|
|
376
|
+
* config.
|
|
377
|
+
*/
|
|
378
|
+
region?: Region;
|
|
379
|
+
/** ID of the Webhook to check. */
|
|
380
|
+
webhookId: string;
|
|
381
|
+
};
|
|
356
382
|
export type ListDomainsRequest = {
|
|
357
383
|
/**
|
|
358
384
|
* Region to target. If none is passed will use default region from the
|
|
@@ -32,6 +32,16 @@ const CreateEmailRequestHeader = {
|
|
|
32
32
|
minLength: 1
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
+
const CreateWebhookRequest = {
|
|
36
|
+
name: {
|
|
37
|
+
maxLength: 127,
|
|
38
|
+
minLength: 3
|
|
39
|
+
},
|
|
40
|
+
snsArn: {
|
|
41
|
+
maxLength: 127,
|
|
42
|
+
minLength: 3
|
|
43
|
+
}
|
|
44
|
+
};
|
|
35
45
|
const ListDomainsRequest = {
|
|
36
46
|
page: {
|
|
37
47
|
greaterThan: 0
|
|
@@ -90,6 +100,7 @@ exports.CreateEmailRequest = CreateEmailRequest;
|
|
|
90
100
|
exports.CreateEmailRequestAddress = CreateEmailRequestAddress;
|
|
91
101
|
exports.CreateEmailRequestAttachment = CreateEmailRequestAttachment;
|
|
92
102
|
exports.CreateEmailRequestHeader = CreateEmailRequestHeader;
|
|
103
|
+
exports.CreateWebhookRequest = CreateWebhookRequest;
|
|
93
104
|
exports.ListDomainsRequest = ListDomainsRequest;
|
|
94
105
|
exports.ListEmailsRequest = ListEmailsRequest;
|
|
95
106
|
exports.ListWebhookEventsRequest = ListWebhookEventsRequest;
|
|
@@ -30,6 +30,16 @@ export declare const CreateEmailRequestHeader: {
|
|
|
30
30
|
minLength: number;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
+
export declare const CreateWebhookRequest: {
|
|
34
|
+
name: {
|
|
35
|
+
maxLength: number;
|
|
36
|
+
minLength: number;
|
|
37
|
+
};
|
|
38
|
+
snsArn: {
|
|
39
|
+
maxLength: number;
|
|
40
|
+
minLength: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
33
43
|
export declare const ListDomainsRequest: {
|
|
34
44
|
page: {
|
|
35
45
|
greaterThan: number;
|
|
@@ -30,6 +30,16 @@ const CreateEmailRequestHeader = {
|
|
|
30
30
|
minLength: 1
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
+
const CreateWebhookRequest = {
|
|
34
|
+
name: {
|
|
35
|
+
maxLength: 127,
|
|
36
|
+
minLength: 3
|
|
37
|
+
},
|
|
38
|
+
snsArn: {
|
|
39
|
+
maxLength: 127,
|
|
40
|
+
minLength: 3
|
|
41
|
+
}
|
|
42
|
+
};
|
|
33
43
|
const ListDomainsRequest = {
|
|
34
44
|
page: {
|
|
35
45
|
greaterThan: 0
|
|
@@ -89,6 +99,7 @@ export {
|
|
|
89
99
|
CreateEmailRequestAddress,
|
|
90
100
|
CreateEmailRequestAttachment,
|
|
91
101
|
CreateEmailRequestHeader,
|
|
102
|
+
CreateWebhookRequest,
|
|
92
103
|
ListDomainsRequest,
|
|
93
104
|
ListEmailsRequest,
|
|
94
105
|
ListWebhookEventsRequest,
|
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.41.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.41.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.42.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": "089401626b9b04deaf254edf576ee16c09776b13"
|
|
43
43
|
}
|