diff --git a/packages/clients/src/api/tem/v1alpha1/index.gen.ts b/packages/clients/src/api/tem/v1alpha1/index.gen.ts index 7b2d1ba6e..56cd0e6a2 100644 --- a/packages/clients/src/api/tem/v1alpha1/index.gen.ts +++ b/packages/clients/src/api/tem/v1alpha1/index.gen.ts @@ -14,6 +14,7 @@ export type { Domain, DomainLastStatus, DomainLastStatusDkimRecord, + DomainLastStatusDmarcRecord, DomainLastStatusRecordStatus, DomainLastStatusSpfRecord, DomainReputation, diff --git a/packages/clients/src/api/tem/v1alpha1/marshalling.gen.ts b/packages/clients/src/api/tem/v1alpha1/marshalling.gen.ts index 61bbc0bbe..019743ce0 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 { Domain, DomainLastStatus, DomainLastStatusDkimRecord, + DomainLastStatusDmarcRecord, DomainLastStatusSpfRecord, DomainReputation, DomainStatistics, @@ -158,6 +159,22 @@ const unmarshalDomainLastStatusDkimRecord = ( } as DomainLastStatusDkimRecord } +const unmarshalDomainLastStatusDmarcRecord = ( + data: unknown, +): DomainLastStatusDmarcRecord => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'DomainLastStatusDmarcRecord' failed as data isn't a dictionary.`, + ) + } + + return { + error: data.error, + lastValidAt: unmarshalDate(data.last_valid_at), + status: data.status, + } as DomainLastStatusDmarcRecord +} + const unmarshalDomainLastStatusSpfRecord = ( data: unknown, ): DomainLastStatusSpfRecord => { @@ -185,6 +202,9 @@ export const unmarshalDomainLastStatus = (data: unknown): DomainLastStatus => { 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, spfRecord: data.spf_record diff --git a/packages/clients/src/api/tem/v1alpha1/types.gen.ts b/packages/clients/src/api/tem/v1alpha1/types.gen.ts index f642ca6ef..db30b29d1 100644 --- a/packages/clients/src/api/tem/v1alpha1/types.gen.ts +++ b/packages/clients/src/api/tem/v1alpha1/types.gen.ts @@ -167,6 +167,15 @@ export interface DomainLastStatusDkimRecord { error?: string } +export interface DomainLastStatusDmarcRecord { + /** Status of the DMARC record's configuration. */ + status: DomainLastStatusRecordStatus + /** Time and date the DMARC record was last valid. */ + lastValidAt?: Date + /** An error text displays in case the record is not valid. */ + error?: string +} + export interface DomainLastStatusSpfRecord { /** Status of the SPF record's configuration. */ status: DomainLastStatusRecordStatus @@ -293,6 +302,8 @@ export interface DomainLastStatus { spfRecord?: DomainLastStatusSpfRecord /** The DKIM record verification data. */ dkimRecord?: DomainLastStatusDkimRecord + /** The DMARC record verification data. */ + dmarcRecord?: DomainLastStatusDmarcRecord } export type GetDomainLastStatusRequest = {