import type { IDomain } from './domain.js'; export interface IGatewayCapabilities { routes: { read: boolean; write: boolean; idempotentSync: boolean; }; domains: { read: boolean; write: boolean; }; certificates: { read: boolean; export: boolean; forceRenew: boolean; }; email: { domains: boolean; inbound: boolean; outbound: boolean; }; remoteIngress: { enabled: boolean; }; dns: { authoritative: boolean; providerManaged: boolean; }; http3: { enabled: boolean; }; } export interface IWorkHosterDomain extends IDomain { capabilities: { canCreateSubdomains: boolean; canManageDnsRecords: boolean; canIssueCertificates: boolean; canHostEmail: boolean; }; } export interface IWorkAppRouteOwnership { workHosterType: 'onebox' | 'cloudly' | 'custom'; workHosterId: string; workAppId: string; hostname: string; } export interface IWorkAppRouteSyncResult { success: boolean; action?: 'created' | 'updated' | 'deleted' | 'unchanged'; routeId?: string; message?: string; } export interface IWorkAppMailOwnership { workHosterType: 'onebox' | 'cloudly' | 'custom'; workHosterId: string; workAppId: string; } export interface IWorkAppMailInboundRoute { enabled: boolean; targetHost: string; targetPort: number; preserveHeaders?: boolean; addHeaders?: Record; } export interface IWorkAppMailIdentity { id: string; externalKey: string; ownership: IWorkAppMailOwnership; address: string; localPart: string; domain: string; enabled: boolean; displayName?: string; inbound?: IWorkAppMailInboundRoute; smtp: { enabled: boolean; username: string; }; createdAt: number; updatedAt: number; createdBy: string; } export interface IWorkAppMailCredentials { username: string; password: string; host?: string; ports?: { smtp?: number; submission?: number; smtps?: number; }; } export interface IWorkAppMailIdentitySyncResult { success: boolean; action?: 'created' | 'updated' | 'deleted' | 'unchanged'; identity?: IWorkAppMailIdentity; smtpCredentials?: IWorkAppMailCredentials; message?: string; }