From ebcd4ff99b2971fbd3fdd95452118e2ef2bd4e6e Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Tue, 18 Nov 2025 15:32:05 +0000 Subject: [PATCH] feat: update generated APIs --- .../tem/src/v1alpha1/api.gen.ts | 179 +++++++------- .../tem/src/v1alpha1/content.gen.ts | 12 +- .../tem/src/v1alpha1/index.gen.ts | 4 +- .../tem/src/v1alpha1/marshalling.gen.ts | 218 +++++------------- .../tem/src/v1alpha1/types.gen.ts | 87 ++++++- 5 files changed, 247 insertions(+), 253 deletions(-) diff --git a/packages_generated/tem/src/v1alpha1/api.gen.ts b/packages_generated/tem/src/v1alpha1/api.gen.ts index 4ea7c7cb7..785ac68cb 100644 --- a/packages_generated/tem/src/v1alpha1/api.gen.ts +++ b/packages_generated/tem/src/v1alpha1/api.gen.ts @@ -3,27 +3,20 @@ import { API as ParentAPI, enrichForPagination, - toApiLocality, urlParams, validatePathParam, waitForResource, + toApiLocality, } from '@scaleway/sdk-client' -import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client' -import { - DOMAIN_TRANSIENT_STATUSES as DOMAIN_TRANSIENT_STATUSES_TEM, - EMAIL_TRANSIENT_STATUSES as EMAIL_TRANSIENT_STATUSES_TEM, -} from './content.gen.js' +import type { WaitForOptions, ApiLocality,} from '@scaleway/sdk-client' +import {DOMAIN_TRANSIENT_STATUSES as DOMAIN_TRANSIENT_STATUSES_TEM,EMAIL_TRANSIENT_STATUSES as EMAIL_TRANSIENT_STATUSES_TEM,} from './content.gen.js' import { marshalBulkCreateBlocklistsRequest, + unmarshalBulkCreateBlocklistsResponse, marshalCreateDomainRequest, marshalCreateEmailRequest, - marshalCreateWebhookRequest, - marshalUpdateDomainRequest, - marshalUpdateOfferSubscriptionRequest, - marshalUpdateProjectSettingsRequest, - marshalUpdateWebhookRequest, - unmarshalBulkCreateBlocklistsResponse, unmarshalCreateEmailResponse, + marshalCreateWebhookRequest, unmarshalDomain, unmarshalDomainLastStatus, unmarshalEmail, @@ -39,6 +32,10 @@ import { unmarshalProjectConsumption, unmarshalProjectSettings, unmarshalStatistics, + marshalUpdateDomainRequest, + marshalUpdateOfferSubscriptionRequest, + marshalUpdateProjectSettingsRequest, + marshalUpdateWebhookRequest, unmarshalWebhook, } from './marshalling.gen.js' import type { @@ -104,10 +101,13 @@ export class API extends ParentAPI { * Locality of this API. * type ∈ {'zone','region','global','unspecified'} */ - public static readonly LOCALITY: ApiLocality = toApiLocality({ - regions: ['fr-par'], - }) - + public static readonly LOCALITY: ApiLocality = + toApiLocality({ + regions: [ + 'fr-par', + ], + }) + /** * Send an email. You must specify the `region`, the sender and the recipient's information and the `project_id` to send an email from a checked domain. * @@ -127,6 +127,7 @@ export class API extends ParentAPI { unmarshalCreateEmailResponse, ) + /** * Get an email. Retrieve information about a specific email using the `email_id` and `region` parameters. * @@ -141,7 +142,7 @@ export class API extends ParentAPI { }, unmarshalEmail, ) - + /** * Waits for {@link Email} to be in a final state. * @@ -154,14 +155,13 @@ export class API extends ParentAPI { options?: Readonly>, ) => waitForResource( - options?.stop ?? - (res => - Promise.resolve(!EMAIL_TRANSIENT_STATUSES_TEM.includes(res.status))), + options?.stop ?? (res => Promise.resolve(!EMAIL_TRANSIENT_STATUSES_TEM.includes(res.status))), this.getEmail, request, options, ) + protected pageOfListEmails = (request: Readonly = {}) => this.client.fetch( { @@ -176,10 +176,7 @@ export class API extends ParentAPI { ['message_id', request.messageId], ['order_by', request.orderBy], ['page', request.page], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['search', request.search], ['since', request.since], @@ -190,7 +187,7 @@ export class API extends ParentAPI { }, unmarshalListEmailsResponse, ) - + /** * List emails. Retrieve the list of emails sent from a specific domain or for a specific Project or Organization. You must specify the `region`. * @@ -200,6 +197,7 @@ export class API extends ParentAPI { listEmails = (request: Readonly = {}) => enrichForPagination('emails', this.pageOfListEmails, request) + /** * Email statuses. Get information on your emails' statuses. * @@ -222,6 +220,7 @@ export class API extends ParentAPI { unmarshalStatistics, ) + /** * Cancel an email. You can cancel the sending of an email if it has not been sent yet. You must specify the `region` and the `email_id` of the email you want to cancel. * @@ -239,6 +238,7 @@ export class API extends ParentAPI { unmarshalEmail, ) + /** * Register a domain in a project. You must specify the `region`, `project_id` and `domain_name` to register a domain in a specific Project. * @@ -258,6 +258,7 @@ export class API extends ParentAPI { unmarshalDomain, ) + /** * Get information about a domain. Retrieve information about a specific domain using the `region` and `domain_id` parameters. Monitor your domain's reputation and improve **average** and **bad** reputation statuses, using your domain's **Email activity** tab on the [Scaleway console](https://console.scaleway.com/transactional-email/domains) to get a more detailed report. Check out our [dedicated documentation](https://www.scaleway.com/en/docs/managed-services/transactional-email/reference-content/understanding-tem-reputation-score/) to improve your domain's reputation. * @@ -272,7 +273,7 @@ export class API extends ParentAPI { }, unmarshalDomain, ) - + /** * Waits for {@link Domain} to be in a final state. * @@ -285,14 +286,13 @@ export class API extends ParentAPI { options?: Readonly>, ) => waitForResource( - options?.stop ?? - (res => - Promise.resolve(!DOMAIN_TRANSIENT_STATUSES_TEM.includes(res.status))), + options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES_TEM.includes(res.status))), this.getDomain, request, options, ) + protected pageOfListDomains = (request: Readonly = {}) => this.client.fetch( { @@ -302,17 +302,14 @@ export class API extends ParentAPI { ['name', request.name], ['organization_id', request.organizationId], ['page', request.page], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['status', request.status], ), }, unmarshalListDomainsResponse, ) - + /** * List domains. Retrieve domains in a specific Project or in a specific Organization using the `region` parameter. * @@ -322,6 +319,7 @@ export class API extends ParentAPI { listDomains = (request: Readonly = {}) => enrichForPagination('domains', this.pageOfListDomains, request) + /** * Delete a domain. You must specify the domain you want to delete by the `region` and `domain_id`. Deleting a domain is permanent and cannot be undone. * @@ -339,6 +337,7 @@ export class API extends ParentAPI { unmarshalDomain, ) + /** * Domain DNS check. Perform an immediate DNS check of a domain using the `region` and `domain_id` parameters. * @@ -356,6 +355,7 @@ export class API extends ParentAPI { unmarshalDomain, ) + /** * Display SPF, DKIM, DMARC and MX records status and potential errors. Display SPF, DKIM, DMARC and MX records status and potential errors, including the found records to make debugging easier. * @@ -371,6 +371,7 @@ export class API extends ParentAPI { unmarshalDomainLastStatus, ) + /** * Update a domain. Update a domain auto-configuration. * @@ -390,6 +391,7 @@ export class API extends ParentAPI { unmarshalDomain, ) + /** * Create a Webhook. Create a new Webhook triggered by a list of event types and pushed to a Scaleway SNS ARN. * @@ -409,9 +411,8 @@ export class API extends ParentAPI { unmarshalWebhook, ) - protected pageOfListWebhooks = ( - request: Readonly = {}, - ) => + + protected pageOfListWebhooks = (request: Readonly = {}) => this.client.fetch( { method: 'GET', @@ -421,16 +422,13 @@ export class API extends ParentAPI { ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ), }, unmarshalListWebhooksResponse, ) - + /** * List Webhooks. Retrieve Webhooks in a specific Project or in a specific Organization using the `region` parameter. * @@ -440,6 +438,7 @@ export class API extends ParentAPI { listWebhooks = (request: Readonly = {}) => enrichForPagination('webhooks', this.pageOfListWebhooks, request) + /** * Get information about a Webhook. Retrieve information about a specific Webhook using the `webhook_id` and `region` parameters. * @@ -455,6 +454,7 @@ export class API extends ParentAPI { unmarshalWebhook, ) + /** * Update a Webhook. Update a Webhook events type, SNS ARN or name. * @@ -474,20 +474,22 @@ export class API extends ParentAPI { unmarshalWebhook, ) + /** * Delete a Webhook. You must specify the Webhook you want to delete by the `region` and `webhook_id`. Deleting a Webhook is permanent and cannot be undone. * * @param request - The request {@link DeleteWebhookRequest} */ deleteWebhook = (request: Readonly) => - this.client.fetch({ - method: 'DELETE', - path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/webhooks/${validatePathParam('webhookId', request.webhookId)}`, - }) + this.client.fetch( + { + method: 'DELETE', + path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/webhooks/${validatePathParam('webhookId', request.webhookId)}`, + }, + ) - protected pageOfListWebhookEvents = ( - request: Readonly, - ) => + + protected pageOfListWebhookEvents = (request: Readonly) => this.client.fetch( { method: 'GET', @@ -499,17 +501,14 @@ export class API extends ParentAPI { ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['statuses', request.statuses], ), }, unmarshalListWebhookEventsResponse, ) - + /** * List Webhook triggered events. Retrieve the list of Webhook events triggered from a specific Webhook or for a specific Project or Organization. You must specify the `region`. * @@ -519,6 +518,7 @@ export class API extends ParentAPI { listWebhookEvents = (request: Readonly) => enrichForPagination('webhookEvents', this.pageOfListWebhookEvents, request) + /** * List project settings. Retrieve the project settings including periodic reports. * @@ -534,15 +534,14 @@ export class API extends ParentAPI { unmarshalProjectSettings, ) + /** * Update project settings. Update the project settings including periodic reports. * * @param request - The request {@link UpdateProjectSettingsRequest} * @returns A Promise of ProjectSettings */ - updateProjectSettings = ( - request: Readonly = {}, - ) => + updateProjectSettings = (request: Readonly = {}) => this.client.fetch( { body: JSON.stringify( @@ -555,6 +554,7 @@ export class API extends ParentAPI { unmarshalProjectSettings, ) + protected pageOfListBlocklists = (request: Readonly) => this.client.fetch( { @@ -566,16 +566,13 @@ export class API extends ParentAPI { ['email', request.email], ['order_by', request.orderBy], ['page', request.page], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['type', request.type], ), }, unmarshalListBlocklistsResponse, ) - + /** * List blocklists. Retrieve the list of blocklists. * @@ -585,6 +582,7 @@ export class API extends ParentAPI { listBlocklists = (request: Readonly) => enrichForPagination('blocklists', this.pageOfListBlocklists, request) + /** * Bulk create blocklists. Create multiple blocklists in a specific Project or Organization using the `region` parameter. * @@ -604,47 +602,47 @@ export class API extends ParentAPI { unmarshalBulkCreateBlocklistsResponse, ) + /** * Delete a blocklist. You must specify the blocklist you want to delete by the `region` and `blocklist_id`. * * @param request - The request {@link DeleteBlocklistRequest} */ deleteBlocklist = (request: Readonly) => - this.client.fetch({ - method: 'DELETE', - path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/blocklists/${validatePathParam('blocklistId', request.blocklistId)}`, - }) + this.client.fetch( + { + method: 'DELETE', + path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/blocklists/${validatePathParam('blocklistId', request.blocklistId)}`, + }, + ) + /** * Get information about subscribed offers. Retrieve information about the offers you are subscribed to using the `project_id` and `region` parameters. * * @param request - The request {@link ListOfferSubscriptionsRequest} * @returns A Promise of ListOfferSubscriptionsResponse */ - listOfferSubscriptions = ( - request: Readonly = {}, - ) => + listOfferSubscriptions = (request: Readonly = {}) => this.client.fetch( { method: 'GET', path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/offer-subscriptions`, - urlParams: urlParams([ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ]), + urlParams: urlParams( + ['project_id', request.projectId ?? this.client.settings.defaultProjectId], + ), }, unmarshalListOfferSubscriptionsResponse, ) + /** * Update a subscribed offer. * * @param request - The request {@link UpdateOfferSubscriptionRequest} * @returns A Promise of OfferSubscription */ - updateOfferSubscription = ( - request: Readonly = {}, - ) => + updateOfferSubscription = (request: Readonly = {}) => this.client.fetch( { body: JSON.stringify( @@ -657,6 +655,7 @@ export class API extends ParentAPI { unmarshalOfferSubscription, ) + /** * List the available offers.. Retrieve the list of the available and free-of-charge offers you can subscribe to. * @@ -672,6 +671,7 @@ export class API extends ParentAPI { unmarshalListOffersResponse, ) + protected pageOfListPools = (request: Readonly = {}) => this.client.fetch( { @@ -679,19 +679,13 @@ export class API extends ParentAPI { path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pools`, urlParams: urlParams( ['page', request.page], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], - [ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], + ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ), }, unmarshalListPoolsResponse, ) - + /** * Get information about a sending pool.. Retrieve information about a sending pool, including its creation status and configuration parameters. * @@ -701,24 +695,25 @@ export class API extends ParentAPI { listPools = (request: Readonly = {}) => enrichForPagination('pools', this.pageOfListPools, request) + /** * Get project resource consumption.. Get project resource consumption. * * @param request - The request {@link GetProjectConsumptionRequest} * @returns A Promise of ProjectConsumption */ - getProjectConsumption = ( - request: Readonly = {}, - ) => + getProjectConsumption = (request: Readonly = {}) => this.client.fetch( { method: 'GET', path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/project-consumption`, - urlParams: urlParams([ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ]), + urlParams: urlParams( + ['project_id', request.projectId ?? this.client.settings.defaultProjectId], + ), }, unmarshalProjectConsumption, ) + + } + diff --git a/packages_generated/tem/src/v1alpha1/content.gen.ts b/packages_generated/tem/src/v1alpha1/content.gen.ts index adabcbea0..b677b6953 100644 --- a/packages_generated/tem/src/v1alpha1/content.gen.ts +++ b/packages_generated/tem/src/v1alpha1/content.gen.ts @@ -1,6 +1,10 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. -import type { DomainStatus, EmailStatus } from './types.gen.js' +import type { + DomainStatus, + EmailStatus, +} from './types.gen.js' + /** Lists transient statutes of the enum {@link DomainStatus}. */ export const DOMAIN_TRANSIENT_STATUSES: DomainStatus[] = [ @@ -9,4 +13,8 @@ export const DOMAIN_TRANSIENT_STATUSES: DomainStatus[] = [ ] /** Lists transient statutes of the enum {@link EmailStatus}. */ -export const EMAIL_TRANSIENT_STATUSES: EmailStatus[] = ['new', 'sending'] +export const EMAIL_TRANSIENT_STATUSES: EmailStatus[] = [ + 'new', + 'sending', +] + diff --git a/packages_generated/tem/src/v1alpha1/index.gen.ts b/packages_generated/tem/src/v1alpha1/index.gen.ts index 39bc3aa21..b6b04c52b 100644 --- a/packages_generated/tem/src/v1alpha1/index.gen.ts +++ b/packages_generated/tem/src/v1alpha1/index.gen.ts @@ -1,6 +1,8 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. -export { API } from './api.gen.js' +export { + API, +} from './api.gen.js' export * from './content.gen.js' export * from './marshalling.gen.js' export type { diff --git a/packages_generated/tem/src/v1alpha1/marshalling.gen.ts b/packages_generated/tem/src/v1alpha1/marshalling.gen.ts index 8e6b1ffe7..447f9f6b6 100644 --- a/packages_generated/tem/src/v1alpha1/marshalling.gen.ts +++ b/packages_generated/tem/src/v1alpha1/marshalling.gen.ts @@ -1,60 +1,55 @@ -// This file was automatically generated. DO NOT EDIT. -// If you have any remark or suggestion do not hesitate to open an issue. -import { - isJSONObject, - unmarshalArrayOfObject, - unmarshalDate, -} from '@scaleway/sdk-client' + +import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, } from '@scaleway/sdk-client' import type { DefaultValues } from '@scaleway/sdk-client' import type { + EmailTry, + Email, + DomainRecordsDKIM, + DomainRecordsDMARC, + DomainRecordsMX, + DomainRecordsSPF, + DomainRecords, + DomainReputation, + DomainStatistics, + Domain, + OfferSubscription, + Webhook, Blocklist, - BulkCreateBlocklistsRequest, BulkCreateBlocklistsResponse, - CreateDomainRequest, - CreateEmailRequest, - CreateEmailRequestAddress, - CreateEmailRequestAttachment, - CreateEmailRequestHeader, CreateEmailResponse, - CreateWebhookRequest, - Domain, - DomainLastStatus, DomainLastStatusAutoconfigState, DomainLastStatusDkimRecord, DomainLastStatusDmarcRecord, DomainLastStatusMXRecord, DomainLastStatusSpfRecord, - DomainRecords, - DomainRecordsDKIM, - DomainRecordsDMARC, - DomainRecordsMX, - DomainRecordsSPF, - DomainReputation, - DomainStatistics, - Email, - EmailTry, + DomainLastStatus, ListBlocklistsResponse, ListDomainsResponse, ListEmailsResponse, ListOfferSubscriptionsResponse, + Offer, ListOffersResponse, + Pool, ListPoolsResponse, + WebhookEvent, ListWebhookEventsResponse, ListWebhooksResponse, - Offer, - OfferSubscription, - Pool, ProjectConsumption, - ProjectSettings, ProjectSettingsPeriodicReport, + ProjectSettings, Statistics, + BulkCreateBlocklistsRequest, + CreateDomainRequest, + CreateEmailRequestAddress, + CreateEmailRequestAttachment, + CreateEmailRequestHeader, + CreateEmailRequest, + CreateWebhookRequest, UpdateDomainRequest, UpdateOfferSubscriptionRequest, - UpdateProjectSettingsRequest, UpdateProjectSettingsRequestUpdatePeriodicReport, + UpdateProjectSettingsRequest, UpdateWebhookRequest, - Webhook, - WebhookEvent, } from './types.gen.js' const unmarshalEmailTry = (data: unknown): EmailTry => { @@ -216,21 +211,15 @@ export const unmarshalDomain = (data: unknown): Domain => { projectId: data.project_id, records: data.records ? unmarshalDomainRecords(data.records) : undefined, region: data.region, - reputation: data.reputation - ? unmarshalDomainReputation(data.reputation) - : undefined, + reputation: data.reputation ? unmarshalDomainReputation(data.reputation) : undefined, revokedAt: unmarshalDate(data.revoked_at), spfConfig: data.spf_config, - statistics: data.statistics - ? unmarshalDomainStatistics(data.statistics) - : undefined, + statistics: data.statistics ? unmarshalDomainStatistics(data.statistics) : undefined, status: data.status, } as Domain } -export const unmarshalOfferSubscription = ( - data: unknown, -): OfferSubscription => { +export const unmarshalOfferSubscription = (data: unknown): OfferSubscription => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'OfferSubscription' failed as data isn't a dictionary.`, @@ -292,9 +281,7 @@ const unmarshalBlocklist = (data: unknown): Blocklist => { } as Blocklist } -export const unmarshalBulkCreateBlocklistsResponse = ( - data: unknown, -): BulkCreateBlocklistsResponse => { +export const unmarshalBulkCreateBlocklistsResponse = (data: unknown): BulkCreateBlocklistsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'BulkCreateBlocklistsResponse' failed as data isn't a dictionary.`, @@ -306,9 +293,7 @@ export const unmarshalBulkCreateBlocklistsResponse = ( } as BulkCreateBlocklistsResponse } -export const unmarshalCreateEmailResponse = ( - data: unknown, -): CreateEmailResponse => { +export const unmarshalCreateEmailResponse = (data: unknown): CreateEmailResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'CreateEmailResponse' failed as data isn't a dictionary.`, @@ -320,9 +305,7 @@ export const unmarshalCreateEmailResponse = ( } as CreateEmailResponse } -const unmarshalDomainLastStatusAutoconfigState = ( - data: unknown, -): DomainLastStatusAutoconfigState => { +const unmarshalDomainLastStatusAutoconfigState = (data: unknown): DomainLastStatusAutoconfigState => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'DomainLastStatusAutoconfigState' failed as data isn't a dictionary.`, @@ -336,9 +319,7 @@ const unmarshalDomainLastStatusAutoconfigState = ( } as DomainLastStatusAutoconfigState } -const unmarshalDomainLastStatusDkimRecord = ( - data: unknown, -): DomainLastStatusDkimRecord => { +const unmarshalDomainLastStatusDkimRecord = (data: unknown): DomainLastStatusDkimRecord => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'DomainLastStatusDkimRecord' failed as data isn't a dictionary.`, @@ -352,9 +333,7 @@ const unmarshalDomainLastStatusDkimRecord = ( } as DomainLastStatusDkimRecord } -const unmarshalDomainLastStatusDmarcRecord = ( - data: unknown, -): DomainLastStatusDmarcRecord => { +const unmarshalDomainLastStatusDmarcRecord = (data: unknown): DomainLastStatusDmarcRecord => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'DomainLastStatusDmarcRecord' failed as data isn't a dictionary.`, @@ -368,9 +347,7 @@ const unmarshalDomainLastStatusDmarcRecord = ( } as DomainLastStatusDmarcRecord } -const unmarshalDomainLastStatusMXRecord = ( - data: unknown, -): DomainLastStatusMXRecord => { +const unmarshalDomainLastStatusMXRecord = (data: unknown): DomainLastStatusMXRecord => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'DomainLastStatusMXRecord' failed as data isn't a dictionary.`, @@ -384,9 +361,7 @@ const unmarshalDomainLastStatusMXRecord = ( } as DomainLastStatusMXRecord } -const unmarshalDomainLastStatusSpfRecord = ( - data: unknown, -): DomainLastStatusSpfRecord => { +const unmarshalDomainLastStatusSpfRecord = (data: unknown): DomainLastStatusSpfRecord => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'DomainLastStatusSpfRecord' failed as data isn't a dictionary.`, @@ -408,29 +383,17 @@ export const unmarshalDomainLastStatus = (data: unknown): DomainLastStatus => { } return { - autoconfigState: data.autoconfig_state - ? unmarshalDomainLastStatusAutoconfigState(data.autoconfig_state) - : undefined, - dkimRecord: data.dkim_record - ? unmarshalDomainLastStatusDkimRecord(data.dkim_record) - : undefined, - dmarcRecord: data.dmarc_record - ? unmarshalDomainLastStatusDmarcRecord(data.dmarc_record) - : undefined, + autoconfigState: data.autoconfig_state ? unmarshalDomainLastStatusAutoconfigState(data.autoconfig_state) : undefined, + dkimRecord: data.dkim_record ? unmarshalDomainLastStatusDkimRecord(data.dkim_record) : undefined, + dmarcRecord: data.dmarc_record ? unmarshalDomainLastStatusDmarcRecord(data.dmarc_record) : undefined, domainId: data.domain_id, domainName: data.domain_name, - mxRecord: data.mx_record - ? unmarshalDomainLastStatusMXRecord(data.mx_record) - : undefined, - spfRecord: data.spf_record - ? unmarshalDomainLastStatusSpfRecord(data.spf_record) - : undefined, + mxRecord: data.mx_record ? unmarshalDomainLastStatusMXRecord(data.mx_record) : undefined, + spfRecord: data.spf_record ? unmarshalDomainLastStatusSpfRecord(data.spf_record) : undefined, } as DomainLastStatus } -export const unmarshalListBlocklistsResponse = ( - data: unknown, -): ListBlocklistsResponse => { +export const unmarshalListBlocklistsResponse = (data: unknown): ListBlocklistsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListBlocklistsResponse' failed as data isn't a dictionary.`, @@ -443,9 +406,7 @@ export const unmarshalListBlocklistsResponse = ( } as ListBlocklistsResponse } -export const unmarshalListDomainsResponse = ( - data: unknown, -): ListDomainsResponse => { +export const unmarshalListDomainsResponse = (data: unknown): ListDomainsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`, @@ -458,9 +419,7 @@ export const unmarshalListDomainsResponse = ( } as ListDomainsResponse } -export const unmarshalListEmailsResponse = ( - data: unknown, -): ListEmailsResponse => { +export const unmarshalListEmailsResponse = (data: unknown): ListEmailsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListEmailsResponse' failed as data isn't a dictionary.`, @@ -473,9 +432,7 @@ export const unmarshalListEmailsResponse = ( } as ListEmailsResponse } -export const unmarshalListOfferSubscriptionsResponse = ( - data: unknown, -): ListOfferSubscriptionsResponse => { +export const unmarshalListOfferSubscriptionsResponse = (data: unknown): ListOfferSubscriptionsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListOfferSubscriptionsResponse' failed as data isn't a dictionary.`, @@ -483,10 +440,7 @@ export const unmarshalListOfferSubscriptionsResponse = ( } return { - offerSubscriptions: unmarshalArrayOfObject( - data.offer_subscriptions, - unmarshalOfferSubscription, - ), + offerSubscriptions: unmarshalArrayOfObject(data.offer_subscriptions, unmarshalOfferSubscription), totalCount: data.total_count, } as ListOfferSubscriptionsResponse } @@ -511,9 +465,7 @@ const unmarshalOffer = (data: unknown): Offer => { } as Offer } -export const unmarshalListOffersResponse = ( - data: unknown, -): ListOffersResponse => { +export const unmarshalListOffersResponse = (data: unknown): ListOffersResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`, @@ -543,9 +495,7 @@ const unmarshalPool = (data: unknown): Pool => { } as Pool } -export const unmarshalListPoolsResponse = ( - data: unknown, -): ListPoolsResponse => { +export const unmarshalListPoolsResponse = (data: unknown): ListPoolsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListPoolsResponse' failed as data isn't a dictionary.`, @@ -580,9 +530,7 @@ const unmarshalWebhookEvent = (data: unknown): WebhookEvent => { } as WebhookEvent } -export const unmarshalListWebhookEventsResponse = ( - data: unknown, -): ListWebhookEventsResponse => { +export const unmarshalListWebhookEventsResponse = (data: unknown): ListWebhookEventsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListWebhookEventsResponse' failed as data isn't a dictionary.`, @@ -591,16 +539,11 @@ export const unmarshalListWebhookEventsResponse = ( return { totalCount: data.total_count, - webhookEvents: unmarshalArrayOfObject( - data.webhook_events, - unmarshalWebhookEvent, - ), + webhookEvents: unmarshalArrayOfObject(data.webhook_events, unmarshalWebhookEvent), } as ListWebhookEventsResponse } -export const unmarshalListWebhooksResponse = ( - data: unknown, -): ListWebhooksResponse => { +export const unmarshalListWebhooksResponse = (data: unknown): ListWebhooksResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListWebhooksResponse' failed as data isn't a dictionary.`, @@ -613,9 +556,7 @@ export const unmarshalListWebhooksResponse = ( } as ListWebhooksResponse } -export const unmarshalProjectConsumption = ( - data: unknown, -): ProjectConsumption => { +export const unmarshalProjectConsumption = (data: unknown): ProjectConsumption => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ProjectConsumption' failed as data isn't a dictionary.`, @@ -632,9 +573,7 @@ export const unmarshalProjectConsumption = ( } as ProjectConsumption } -const unmarshalProjectSettingsPeriodicReport = ( - data: unknown, -): ProjectSettingsPeriodicReport => { +const unmarshalProjectSettingsPeriodicReport = (data: unknown): ProjectSettingsPeriodicReport => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ProjectSettingsPeriodicReport' failed as data isn't a dictionary.`, @@ -657,9 +596,7 @@ export const unmarshalProjectSettings = (data: unknown): ProjectSettings => { } return { - periodicReport: data.periodic_report - ? unmarshalProjectSettingsPeriodicReport(data.periodic_report) - : undefined, + periodicReport: data.periodic_report ? unmarshalProjectSettingsPeriodicReport(data.periodic_report) : undefined, } as ProjectSettings } @@ -729,36 +666,17 @@ export const marshalCreateEmailRequest = ( request: CreateEmailRequest, defaults: DefaultValues, ): Record => ({ - additional_headers: - request.additionalHeaders !== undefined - ? request.additionalHeaders.map(elt => - marshalCreateEmailRequestHeader(elt, defaults), - ) - : undefined, - attachments: - request.attachments !== undefined - ? request.attachments.map(elt => - marshalCreateEmailRequestAttachment(elt, defaults), - ) - : undefined, - bcc: - request.bcc !== undefined - ? request.bcc.map(elt => marshalCreateEmailRequestAddress(elt, defaults)) - : undefined, - cc: - request.cc !== undefined - ? request.cc.map(elt => marshalCreateEmailRequestAddress(elt, defaults)) - : undefined, - from: marshalCreateEmailRequestAddress(request.from, defaults), + additional_headers: ((request.additionalHeaders !== undefined) ? request.additionalHeaders.map(elt => marshalCreateEmailRequestHeader(elt, defaults)): undefined), + attachments: ((request.attachments !== undefined) ? request.attachments.map(elt => marshalCreateEmailRequestAttachment(elt, defaults)): undefined), + bcc: ((request.bcc !== undefined) ? request.bcc.map(elt => marshalCreateEmailRequestAddress(elt, defaults)): undefined), + cc: ((request.cc !== undefined) ? request.cc.map(elt => marshalCreateEmailRequestAddress(elt, defaults)): undefined), + from: marshalCreateEmailRequestAddress(request.from, defaults), html: request.html, project_id: request.projectId ?? defaults.defaultProjectId, send_before: request.sendBefore, subject: request.subject, text: request.text, - to: - request.to !== undefined - ? request.to.map(elt => marshalCreateEmailRequestAddress(elt, defaults)) - : undefined, + to: ((request.to !== undefined) ? request.to.map(elt => marshalCreateEmailRequestAddress(elt, defaults)): undefined), }) export const marshalCreateWebhookRequest = ( @@ -766,8 +684,7 @@ export const marshalCreateWebhookRequest = ( defaults: DefaultValues, ): Record => ({ domain_id: request.domainId, - event_types: - request.eventTypes !== undefined ? request.eventTypes : undefined, + event_types: ((request.eventTypes !== undefined) ? request.eventTypes: undefined), name: request.name, project_id: request.projectId ?? defaults.defaultProjectId, sns_arn: request.snsArn, @@ -802,21 +719,14 @@ export const marshalUpdateProjectSettingsRequest = ( request: UpdateProjectSettingsRequest, defaults: DefaultValues, ): Record => ({ - periodic_report: - request.periodicReport !== undefined - ? marshalUpdateProjectSettingsRequestUpdatePeriodicReport( - request.periodicReport, - defaults, - ) - : undefined, + periodic_report: ((request.periodicReport !== undefined) ? marshalUpdateProjectSettingsRequestUpdatePeriodicReport(request.periodicReport, defaults): undefined), }) export const marshalUpdateWebhookRequest = ( request: UpdateWebhookRequest, defaults: DefaultValues, ): Record => ({ - event_types: - request.eventTypes !== undefined ? request.eventTypes : undefined, + event_types: ((request.eventTypes !== undefined) ? request.eventTypes: undefined), name: request.name, sns_arn: request.snsArn, }) diff --git a/packages_generated/tem/src/v1alpha1/types.gen.ts b/packages_generated/tem/src/v1alpha1/types.gen.ts index a1646540e..ac924ed9b 100644 --- a/packages_generated/tem/src/v1alpha1/types.gen.ts +++ b/packages_generated/tem/src/v1alpha1/types.gen.ts @@ -1,6 +1,7 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. -import type { Region as ScwRegion, Zone as ScwZone } from '@scaleway/sdk-client' +import type { Region as ScwRegion, Zone as ScwZone} from '@scaleway/sdk-client' + export type BlocklistType = | 'unknown_type' @@ -46,7 +47,11 @@ export type EmailFlag = | 'send_before_expiration' | 'blocklisted' -export type EmailRcptType = 'unknown_rcpt_type' | 'to' | 'cc' | 'bcc' +export type EmailRcptType = + | 'unknown_rcpt_type' + | 'to' + | 'cc' + | 'bcc' export type EmailStatus = | 'unknown' @@ -80,9 +85,14 @@ export type ListWebhookEventsRequestOrderBy = | 'created_at_desc' | 'created_at_asc' -export type ListWebhooksRequestOrderBy = 'created_at_desc' | 'created_at_asc' +export type ListWebhooksRequestOrderBy = + | 'created_at_desc' + | 'created_at_asc' -export type OfferName = 'unknown_name' | 'essential' | 'scale' +export type OfferName = + | 'unknown_name' + | 'essential' + | 'scale' export type PoolStatus = | 'unknown_status' @@ -125,6 +135,7 @@ export interface DomainRecordsDKIM { value: string } + export interface DomainRecordsDMARC { /** * Name of the DMARC TXT record. @@ -136,6 +147,7 @@ export interface DomainRecordsDMARC { value: string } + export interface DomainRecordsMX { /** * Name of the MX record. @@ -147,6 +159,7 @@ export interface DomainRecordsMX { value: string } + export interface DomainRecordsSPF { /** * Name of the SPF TXT record. @@ -158,6 +171,7 @@ export interface DomainRecordsSPF { value: string } + export interface EmailTry { /** * Rank number of this attempt to send the email. @@ -177,6 +191,7 @@ export interface EmailTry { message: string } + export interface DomainRecords { /** * DMARC TXT record specification. @@ -196,6 +211,7 @@ export interface DomainRecords { mx?: DomainRecordsMX } + export interface DomainReputation { /** * Status of your domain's reputation. @@ -219,6 +235,7 @@ export interface DomainReputation { previousScoredAt?: Date } + export interface DomainStatistics { totalCount: number sentCount: number @@ -226,6 +243,7 @@ export interface DomainStatistics { canceledCount: number } + export interface Blocklist { /** * ID of the blocklist. @@ -265,6 +283,7 @@ export interface Blocklist { custom: boolean } + export interface CreateEmailRequestAddress { /** * Email address. @@ -276,6 +295,7 @@ export interface CreateEmailRequestAddress { name?: string } + export interface CreateEmailRequestAttachment { /** * Filename of the attachment. @@ -291,6 +311,7 @@ export interface CreateEmailRequestAttachment { content: string } + export interface CreateEmailRequestHeader { /** * Email header key. @@ -302,6 +323,7 @@ export interface CreateEmailRequestHeader { value: string } + export interface Email { /** * Technical ID of the email. @@ -365,6 +387,7 @@ export interface Email { flags: EmailFlag[] } + export interface DomainLastStatusAutoconfigState { /** * Enable or disable the auto-configuration of domain DNS records. @@ -380,6 +403,7 @@ export interface DomainLastStatusAutoconfigState { reason?: DomainLastStatusAutoconfigStateReason } + export interface DomainLastStatusDkimRecord { /** * Status of the DKIM record's configuration. @@ -395,6 +419,7 @@ export interface DomainLastStatusDkimRecord { error?: string } + export interface DomainLastStatusDmarcRecord { /** * Status of the DMARC record's configuration. @@ -410,6 +435,7 @@ export interface DomainLastStatusDmarcRecord { error?: string } + export interface DomainLastStatusMXRecord { /** * Status of the MX record's configuration. This record is optional to validate a domain, but highly recommended. @@ -425,6 +451,7 @@ export interface DomainLastStatusMXRecord { error?: string } + export interface DomainLastStatusSpfRecord { /** * Status of the SPF record's configuration. @@ -440,6 +467,7 @@ export interface DomainLastStatusSpfRecord { error?: string } + export interface Domain { /** * ID of the domain. @@ -511,6 +539,7 @@ export interface Domain { region: ScwRegion } + export interface OfferSubscription { /** * ID of the offer-subscription Organization. @@ -558,6 +587,7 @@ export interface OfferSubscription { includedMonthlyEmails: number } + export interface Offer { /** * Name of the offer. @@ -597,6 +627,7 @@ export interface Offer { maxCustomBlocklistsPerDomain: number } + export interface Pool { /** * ID of the Project. @@ -624,6 +655,7 @@ export interface Pool { reverse?: string } + export interface WebhookEvent { /** * ID of the Webhook Event. @@ -671,6 +703,7 @@ export interface WebhookEvent { emailId?: string } + export interface Webhook { /** * ID of the Webhook. @@ -710,6 +743,7 @@ export interface Webhook { updatedAt?: Date } + export interface ProjectSettingsPeriodicReport { /** * Enable or disable periodic report notifications. @@ -729,6 +763,7 @@ export interface ProjectSettingsPeriodicReport { sendingDay: number } + export interface UpdateProjectSettingsRequestUpdatePeriodicReport { /** * (Optional) Enable or disable periodic report notifications. @@ -748,6 +783,7 @@ export interface UpdateProjectSettingsRequestUpdatePeriodicReport { sendingDay?: number } + export type BulkCreateBlocklistsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -771,6 +807,7 @@ export type BulkCreateBlocklistsRequest = { reason?: string } + export interface BulkCreateBlocklistsResponse { /** * List of blocklist created. @@ -778,6 +815,7 @@ export interface BulkCreateBlocklistsResponse { blocklists: Blocklist[] } + export type CancelEmailRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -789,6 +827,7 @@ export type CancelEmailRequest = { emailId: string } + export type CheckDomainRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -800,6 +839,7 @@ export type CheckDomainRequest = { domainId: string } + export type CreateDomainRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -823,6 +863,7 @@ export type CreateDomainRequest = { autoconfig: boolean } + export type CreateEmailRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -874,6 +915,7 @@ export type CreateEmailRequest = { additionalHeaders?: CreateEmailRequestHeader[] } + export interface CreateEmailResponse { /** * Single page of emails matching the requested criteria. @@ -881,6 +923,7 @@ export interface CreateEmailResponse { emails: Email[] } + export type CreateWebhookRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -908,6 +951,7 @@ export type CreateWebhookRequest = { snsArn: string } + export type DeleteBlocklistRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -919,6 +963,7 @@ export type DeleteBlocklistRequest = { blocklistId: string } + export type DeleteWebhookRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -930,6 +975,7 @@ export type DeleteWebhookRequest = { webhookId: string } + export interface DomainLastStatus { /** * The ID of the domain. @@ -961,6 +1007,7 @@ export interface DomainLastStatus { autoconfigState?: DomainLastStatusAutoconfigState } + export type GetDomainLastStatusRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -972,6 +1019,7 @@ export type GetDomainLastStatusRequest = { domainId: string } + export type GetDomainRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -983,6 +1031,7 @@ export type GetDomainRequest = { domainId: string } + export type GetEmailRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -994,6 +1043,7 @@ export type GetEmailRequest = { emailId: string } + export type GetProjectConsumptionRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1005,6 +1055,7 @@ export type GetProjectConsumptionRequest = { projectId?: string } + export type GetProjectSettingsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1016,6 +1067,7 @@ export type GetProjectSettingsRequest = { projectId?: string } + export type GetStatisticsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1043,6 +1095,7 @@ export type GetStatisticsRequest = { mailFrom?: string } + export type GetWebhookRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1054,6 +1107,7 @@ export type GetWebhookRequest = { webhookId: string } + export type ListBlocklistsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1089,6 +1143,7 @@ export type ListBlocklistsRequest = { custom?: boolean } + export interface ListBlocklistsResponse { /** * Number of blocklists matching the requested criteria. @@ -1100,6 +1155,7 @@ export interface ListBlocklistsResponse { blocklists: Blocklist[] } + export type ListDomainsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1131,6 +1187,7 @@ export type ListDomainsRequest = { name?: string } + export interface ListDomainsResponse { /** * Number of domains that match the request (without pagination). @@ -1142,6 +1199,7 @@ export interface ListDomainsResponse { domains: Domain[] } + export type ListEmailsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1203,6 +1261,7 @@ export type ListEmailsRequest = { flags?: EmailFlag[] } + export interface ListEmailsResponse { /** * Number of emails matching the requested criteria. @@ -1214,6 +1273,7 @@ export interface ListEmailsResponse { emails: Email[] } + export type ListOfferSubscriptionsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1225,6 +1285,7 @@ export type ListOfferSubscriptionsRequest = { projectId?: string } + export interface ListOfferSubscriptionsResponse { /** * Number of offer-subscriptions matching the requested criteria. @@ -1236,6 +1297,7 @@ export interface ListOfferSubscriptionsResponse { offerSubscriptions: OfferSubscription[] } + export type ListOffersRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1243,6 +1305,7 @@ export type ListOffersRequest = { region?: ScwRegion } + export interface ListOffersResponse { /** * Number of offers matching the requested criteria. @@ -1254,6 +1317,7 @@ export interface ListOffersResponse { offers: Offer[] } + export type ListPoolsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1273,6 +1337,7 @@ export type ListPoolsRequest = { projectId?: string } + export interface ListPoolsResponse { /** * Number of pools matching the requested criteria. @@ -1284,6 +1349,7 @@ export interface ListPoolsResponse { pools: Pool[] } + export type ListWebhookEventsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1331,6 +1397,7 @@ export type ListWebhookEventsRequest = { domainId?: string } + export interface ListWebhookEventsResponse { /** * Number of Webhook events matching the requested criteria. @@ -1342,6 +1409,7 @@ export interface ListWebhookEventsResponse { webhookEvents: WebhookEvent[] } + export type ListWebhooksRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1373,6 +1441,7 @@ export type ListWebhooksRequest = { domainId?: string } + export interface ListWebhooksResponse { /** * Number of Webhooks matching the requested criteria. @@ -1384,6 +1453,7 @@ export interface ListWebhooksResponse { webhooks: Webhook[] } + export interface ProjectConsumption { /** * ID of the project. @@ -1411,6 +1481,7 @@ export interface ProjectConsumption { customBlocklistsCount: number } + export interface ProjectSettings { /** * Information about your periodic report. @@ -1418,6 +1489,7 @@ export interface ProjectSettings { periodicReport?: ProjectSettingsPeriodicReport } + export type RevokeDomainRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1429,6 +1501,7 @@ export type RevokeDomainRequest = { domainId: string } + export interface Statistics { /** * Total number of emails matching the requested criteria. @@ -1456,6 +1529,7 @@ export interface Statistics { canceledCount: number } + export type UpdateDomainRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1471,6 +1545,7 @@ export type UpdateDomainRequest = { autoconfig?: boolean } + export type UpdateOfferSubscriptionRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1486,6 +1561,7 @@ export type UpdateOfferSubscriptionRequest = { name?: OfferName } + export type UpdateProjectSettingsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1501,6 +1577,7 @@ export type UpdateProjectSettingsRequest = { periodicReport?: UpdateProjectSettingsRequestUpdatePeriodicReport } + export type UpdateWebhookRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -1523,3 +1600,5 @@ export type UpdateWebhookRequest = { */ snsArn?: string } + +