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: 2 additions & 0 deletions packages/clients/src/api/tem/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export type {
DeleteWebhookRequest,
Domain,
DomainLastStatus,
DomainLastStatusAutoconfigState,
DomainLastStatusAutoconfigStateReason,
DomainLastStatusDkimRecord,
DomainLastStatusDmarcRecord,
DomainLastStatusRecordStatus,
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 {
CreateWebhookRequest,
Domain,
DomainLastStatus,
DomainLastStatusAutoconfigState,
DomainLastStatusDkimRecord,
DomainLastStatusDmarcRecord,
DomainLastStatusSpfRecord,
Expand Down Expand Up @@ -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 => {
Expand Down Expand Up @@ -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,
Expand Down
20 changes: 18 additions & 2 deletions packages/clients/src/api/tem/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = {
Expand Down
Loading