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
2 changes: 1 addition & 1 deletion packages_generated/tem/src/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ export class API extends ParentAPI {
)

/**
* Display SPF and DKIM records status and potential errors. Display SPF and DKIM records status and potential errors, including the found records to make debugging easier.
* 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.
*
* @param request - The request {@link GetDomainLastStatusRequest}
* @returns A Promise of DomainLastStatus
Expand Down
1 change: 1 addition & 0 deletions packages_generated/tem/src/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type {
DomainLastStatusAutoconfigStateReason,
DomainLastStatusDkimRecord,
DomainLastStatusDmarcRecord,
DomainLastStatusMXRecord,
DomainLastStatusRecordStatus,
DomainLastStatusSpfRecord,
DomainRecords,
Expand Down
20 changes: 20 additions & 0 deletions packages_generated/tem/src/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import type {
DomainLastStatusAutoconfigState,
DomainLastStatusDkimRecord,
DomainLastStatusDmarcRecord,
DomainLastStatusMXRecord,
DomainLastStatusSpfRecord,
DomainRecords,
DomainRecordsDMARC,
Expand Down Expand Up @@ -323,6 +324,22 @@ const unmarshalDomainLastStatusDmarcRecord = (
} as DomainLastStatusDmarcRecord
}

const unmarshalDomainLastStatusMXRecord = (
data: unknown,
): DomainLastStatusMXRecord => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'DomainLastStatusMXRecord' failed as data isn't a dictionary.`,
)
}

return {
error: data.error,
lastValidAt: unmarshalDate(data.last_valid_at),
status: data.status,
} as DomainLastStatusMXRecord
}

const unmarshalDomainLastStatusSpfRecord = (
data: unknown,
): DomainLastStatusSpfRecord => {
Expand Down Expand Up @@ -358,6 +375,9 @@ export const unmarshalDomainLastStatus = (data: unknown): DomainLastStatus => {
: 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,
Expand Down
21 changes: 20 additions & 1 deletion packages_generated/tem/src/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,21 @@ 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.
*/
status: DomainLastStatusRecordStatus
/**
* Time and date the MX 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.
Expand Down Expand Up @@ -891,6 +906,10 @@ export interface DomainLastStatus {
* The DMARC record verification data.
*/
dmarcRecord?: DomainLastStatusDmarcRecord
/**
* The MX record verification data.
*/
mxRecord?: DomainLastStatusMXRecord
/**
* The verification state of domain auto-configuration.
*/
Expand All @@ -903,7 +922,7 @@ export type GetDomainLastStatusRequest = {
*/
region?: ScwRegion
/**
* ID of the domain to delete.
* ID of the domain to get records status.
*/
domainId: string
}
Expand Down
Loading