diff --git a/packages/clients/src/api/tem/v1alpha1/index.gen.ts b/packages/clients/src/api/tem/v1alpha1/index.gen.ts index 3c8406a62..7a6dcaeb0 100644 --- a/packages/clients/src/api/tem/v1alpha1/index.gen.ts +++ b/packages/clients/src/api/tem/v1alpha1/index.gen.ts @@ -15,6 +15,8 @@ export type { DeleteWebhookRequest, Domain, DomainLastStatus, + DomainLastStatusAutoconfigState, + DomainLastStatusAutoconfigStateReason, DomainLastStatusDkimRecord, DomainLastStatusDmarcRecord, DomainLastStatusRecordStatus, diff --git a/packages/clients/src/api/tem/v1alpha1/marshalling.gen.ts b/packages/clients/src/api/tem/v1alpha1/marshalling.gen.ts index 488aa74a9..52abf4dcb 100644 --- a/packages/clients/src/api/tem/v1alpha1/marshalling.gen.ts +++ b/packages/clients/src/api/tem/v1alpha1/marshalling.gen.ts @@ -16,6 +16,7 @@ import type { CreateWebhookRequest, Domain, DomainLastStatus, + DomainLastStatusAutoconfigState, DomainLastStatusDkimRecord, DomainLastStatusDmarcRecord, DomainLastStatusSpfRecord, @@ -203,6 +204,22 @@ export const unmarshalCreateEmailResponse = ( } as CreateEmailResponse } +const unmarshalDomainLastStatusAutoconfigState = ( + data: unknown, +): DomainLastStatusAutoconfigState => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'DomainLastStatusAutoconfigState' failed as data isn't a dictionary.`, + ) + } + + return { + autoconfigurable: data.autoconfigurable, + enabled: data.enabled, + reason: data.reason ? data.reason : undefined, + } as DomainLastStatusAutoconfigState +} + const unmarshalDomainLastStatusDkimRecord = ( data: unknown, ): DomainLastStatusDkimRecord => { @@ -259,6 +276,9 @@ 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, diff --git a/packages/clients/src/api/tem/v1alpha1/types.gen.ts b/packages/clients/src/api/tem/v1alpha1/types.gen.ts index 620e39940..422179f99 100644 --- a/packages/clients/src/api/tem/v1alpha1/types.gen.ts +++ b/packages/clients/src/api/tem/v1alpha1/types.gen.ts @@ -2,6 +2,11 @@ // If you have any remark or suggestion do not hesitate to open an issue. import type { Region } from '../../../bridge' +export type DomainLastStatusAutoconfigStateReason = + | 'unknown_reason' + | 'permission_denied' + | 'domain_not_found' + export type DomainLastStatusRecordStatus = | 'unknown_record_status' | 'valid' @@ -198,6 +203,15 @@ export interface Email { flags: EmailFlag[] } +export interface DomainLastStatusAutoconfigState { + /** Enable or disable the auto-configuration of domain DNS records. */ + enabled: boolean + /** Whether the domain can be auto-configured or not. */ + autoconfigurable: boolean + /** The reason that the domain cannot be auto-configurable. */ + reason?: DomainLastStatusAutoconfigStateReason +} + export interface DomainLastStatusDkimRecord { /** Status of the DKIM record's configuration. */ status: DomainLastStatusRecordStatus @@ -331,9 +345,9 @@ export interface ProjectSettingsPeriodicReport { export interface UpdateProjectSettingsRequestUpdatePeriodicReport { /** (Optional) Enable or disable periodic report notifications. */ enabled?: boolean - /** (Optional) At which frequency you receive periodic report notifications. */ + /** (Optional) Frequency at which you receive periodic report notifications. */ frequency?: ProjectSettingsPeriodicReportFrequency - /** (Optional) At which hour you receive periodic report notifications. */ + /** (Optional) Hour at which you receive periodic report notifications. */ sendingHour?: number /** * (Optional) On which day you receive periodic report notifications (1-7 @@ -452,6 +466,8 @@ export interface DomainLastStatus { dkimRecord?: DomainLastStatusDkimRecord /** The DMARC record verification data. */ dmarcRecord?: DomainLastStatusDmarcRecord + /** The verification state of domain auto-configuration. */ + autoconfigState?: DomainLastStatusAutoconfigState } export type GetDomainLastStatusRequest = {