@scaleway/sdk 2.44.0 → 2.45.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/tem/v1alpha1/api.gen.cjs +17 -0
- package/dist/api/tem/v1alpha1/api.gen.d.ts +8 -1
- package/dist/api/tem/v1alpha1/api.gen.js +18 -1
- package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +4 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +4 -0
- package/dist/api/tem/v1alpha1/types.gen.d.ts +14 -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
|
@@ -257,6 +257,23 @@ class API extends api.API {
|
|
|
257
257
|
},
|
|
258
258
|
marshalling_gen.unmarshalDomainLastStatus
|
|
259
259
|
);
|
|
260
|
+
/**
|
|
261
|
+
* Update a domain. Update a domain auto-configuration.
|
|
262
|
+
*
|
|
263
|
+
* @param request - The request {@link UpdateDomainRequest}
|
|
264
|
+
* @returns A Promise of Domain
|
|
265
|
+
*/
|
|
266
|
+
updateDomain = (request) => this.client.fetch(
|
|
267
|
+
{
|
|
268
|
+
body: JSON.stringify(
|
|
269
|
+
marshalling_gen.marshalUpdateDomainRequest(request, this.client.settings)
|
|
270
|
+
),
|
|
271
|
+
headers: jsonContentHeaders,
|
|
272
|
+
method: "PATCH",
|
|
273
|
+
path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${marshalling.validatePathParam("domainId", request.domainId)}`
|
|
274
|
+
},
|
|
275
|
+
marshalling_gen.unmarshalDomain
|
|
276
|
+
);
|
|
260
277
|
/**
|
|
261
278
|
* Create a Webhook. Create a new Webhook triggered by a list of event types
|
|
262
279
|
* and pushed to a Scaleway SNS ARN.
|
|
@@ -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, 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';
|
|
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, UpdateDomainRequest, UpdateWebhookRequest, Webhook } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Transactional Email API.
|
|
6
6
|
*
|
|
@@ -131,6 +131,13 @@ 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
|
+
* Update a domain. Update a domain auto-configuration.
|
|
136
|
+
*
|
|
137
|
+
* @param request - The request {@link UpdateDomainRequest}
|
|
138
|
+
* @returns A Promise of Domain
|
|
139
|
+
*/
|
|
140
|
+
updateDomain: (request: Readonly<UpdateDomainRequest>) => Promise<Domain>;
|
|
134
141
|
/**
|
|
135
142
|
* Create a Webhook. Create a new Webhook triggered by a list of event types
|
|
136
143
|
* and pushed to a Scaleway SNS ARN.
|
|
@@ -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, marshalCreateWebhookRequest, unmarshalWebhook, unmarshalListWebhooksResponse, marshalUpdateWebhookRequest, unmarshalListWebhookEventsResponse } from "./marshalling.gen.js";
|
|
7
|
+
import { marshalCreateEmailRequest, unmarshalCreateEmailResponse, unmarshalEmail, unmarshalListEmailsResponse, unmarshalStatistics, marshalCreateDomainRequest, unmarshalDomain, unmarshalListDomainsResponse, unmarshalDomainLastStatus, marshalUpdateDomainRequest, 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,23 @@ class API extends API$1 {
|
|
|
255
255
|
},
|
|
256
256
|
unmarshalDomainLastStatus
|
|
257
257
|
);
|
|
258
|
+
/**
|
|
259
|
+
* Update a domain. Update a domain auto-configuration.
|
|
260
|
+
*
|
|
261
|
+
* @param request - The request {@link UpdateDomainRequest}
|
|
262
|
+
* @returns A Promise of Domain
|
|
263
|
+
*/
|
|
264
|
+
updateDomain = (request) => this.client.fetch(
|
|
265
|
+
{
|
|
266
|
+
body: JSON.stringify(
|
|
267
|
+
marshalUpdateDomainRequest(request, this.client.settings)
|
|
268
|
+
),
|
|
269
|
+
headers: jsonContentHeaders,
|
|
270
|
+
method: "PATCH",
|
|
271
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainId", request.domainId)}`
|
|
272
|
+
},
|
|
273
|
+
unmarshalDomain
|
|
274
|
+
);
|
|
258
275
|
/**
|
|
259
276
|
* Create a Webhook. Create a new Webhook triggered by a list of event types
|
|
260
277
|
* and pushed to a Scaleway SNS ARN.
|
|
@@ -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, 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';
|
|
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, UpdateDomainRequest, UpdateWebhookRequest, Webhook, WebhookEvent, WebhookEventStatus, WebhookEventType, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -317,6 +317,9 @@ const marshalCreateWebhookRequest = (request, defaults) => ({
|
|
|
317
317
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
318
318
|
sns_arn: request.snsArn
|
|
319
319
|
});
|
|
320
|
+
const marshalUpdateDomainRequest = (request, defaults) => ({
|
|
321
|
+
autoconfig: request.autoconfig
|
|
322
|
+
});
|
|
320
323
|
const marshalUpdateWebhookRequest = (request, defaults) => ({
|
|
321
324
|
event_types: request.eventTypes !== void 0 ? request.eventTypes : void 0,
|
|
322
325
|
name: request.name,
|
|
@@ -325,6 +328,7 @@ const marshalUpdateWebhookRequest = (request, defaults) => ({
|
|
|
325
328
|
exports.marshalCreateDomainRequest = marshalCreateDomainRequest;
|
|
326
329
|
exports.marshalCreateEmailRequest = marshalCreateEmailRequest;
|
|
327
330
|
exports.marshalCreateWebhookRequest = marshalCreateWebhookRequest;
|
|
331
|
+
exports.marshalUpdateDomainRequest = marshalUpdateDomainRequest;
|
|
328
332
|
exports.marshalUpdateWebhookRequest = marshalUpdateWebhookRequest;
|
|
329
333
|
exports.unmarshalCreateEmailResponse = unmarshalCreateEmailResponse;
|
|
330
334
|
exports.unmarshalDomain = unmarshalDomain;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, CreateWebhookRequest, 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, UpdateDomainRequest, 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;
|
|
@@ -13,4 +13,5 @@ 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
15
|
export declare const marshalCreateWebhookRequest: (request: CreateWebhookRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
16
|
+
export declare const marshalUpdateDomainRequest: (request: UpdateDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
16
17
|
export declare const marshalUpdateWebhookRequest: (request: UpdateWebhookRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -315,6 +315,9 @@ const marshalCreateWebhookRequest = (request, defaults) => ({
|
|
|
315
315
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
316
316
|
sns_arn: request.snsArn
|
|
317
317
|
});
|
|
318
|
+
const marshalUpdateDomainRequest = (request, defaults) => ({
|
|
319
|
+
autoconfig: request.autoconfig
|
|
320
|
+
});
|
|
318
321
|
const marshalUpdateWebhookRequest = (request, defaults) => ({
|
|
319
322
|
event_types: request.eventTypes !== void 0 ? request.eventTypes : void 0,
|
|
320
323
|
name: request.name,
|
|
@@ -324,6 +327,7 @@ export {
|
|
|
324
327
|
marshalCreateDomainRequest,
|
|
325
328
|
marshalCreateEmailRequest,
|
|
326
329
|
marshalCreateWebhookRequest,
|
|
330
|
+
marshalUpdateDomainRequest,
|
|
327
331
|
marshalUpdateWebhookRequest,
|
|
328
332
|
unmarshalCreateEmailResponse,
|
|
329
333
|
unmarshalDomain,
|
|
@@ -545,6 +545,20 @@ export interface Statistics {
|
|
|
545
545
|
*/
|
|
546
546
|
canceledCount: number;
|
|
547
547
|
}
|
|
548
|
+
export type UpdateDomainRequest = {
|
|
549
|
+
/**
|
|
550
|
+
* Region to target. If none is passed will use default region from the
|
|
551
|
+
* config.
|
|
552
|
+
*/
|
|
553
|
+
region?: Region;
|
|
554
|
+
/** ID of the domain to update. */
|
|
555
|
+
domainId: string;
|
|
556
|
+
/**
|
|
557
|
+
* (Optional) If set to true, activate auto-configuration of the domain's DNS
|
|
558
|
+
* zone.
|
|
559
|
+
*/
|
|
560
|
+
autoconfig?: boolean;
|
|
561
|
+
};
|
|
548
562
|
export type UpdateWebhookRequest = {
|
|
549
563
|
/**
|
|
550
564
|
* Region to target. If none is passed will use default region from the
|
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.44.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.44.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.45.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": "ebf37bea086ff3929e2ba023f93535bcb1d8bc4e"
|
|
43
43
|
}
|