export type DomainDeployStatus = 'started' | 'failed'

export interface DomainListItem {
  id: number
  host: string
  businessId: number
  businessName: string
  sslEnabled: boolean
  isActive: boolean
  expiresAt: string | null
  createdAt: string
  /** Present when this apex has a storefront on the websites VM */
  deploySlug: string | null
  lastDeployedAt: string | null
  lastDeployStatus: DomainDeployStatus | null
}

export interface DomainsListResponse {
  items: DomainListItem[]
  total: number
  page: number
  pageSize: number
}

export interface DeployDomainResponse {
  status: 'accepted'
  slug: string
  host: string
  message: string
  lastDeployedAt: string | null
  lastDeployStatus: DomainDeployStatus | null
}

export interface SyncSslResponse {
  status: 'accepted'
  message: string
}
