Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/clients/src/api/tem/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type {
Domain,
DomainLastStatus,
DomainLastStatusDkimRecord,
DomainLastStatusDmarcRecord,
DomainLastStatusRecordStatus,
DomainLastStatusSpfRecord,
DomainReputation,
Expand Down
20 changes: 20 additions & 0 deletions packages/clients/src/api/tem/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import type {
Domain,
DomainLastStatus,
DomainLastStatusDkimRecord,
DomainLastStatusDmarcRecord,
DomainLastStatusSpfRecord,
DomainReputation,
DomainStatistics,
Expand Down Expand Up @@ -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 => {
Expand Down Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions packages/clients/src/api/tem/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = {
Expand Down