import type { IEmailDomainConfig } from '@push.rocks/smartmta';
import type { IEmailDomain, IEmailDnsRecord } from '../../dist_ts_interfaces/data/email-domain.js';
/**
 * EmailDomainManager — orchestrates email domain setup.
 *
 * Wires smartmta's DKIMCreator (key generation) with dcrouter's DnsManager
 * (record creation for dcrouter-hosted and provider-managed zones) to provide
 * a single entry point for setting up an email domain from A to Z.
 */
export declare class EmailDomainManager {
    private dcRouter;
    private baseEmailDomains;
    constructor(dcRouterRef: any);
    setBaseEmailDomains(domains: IEmailDomainConfig[] | undefined): void;
    private get dnsManager();
    private get dkimCreator();
    private get emailHostname();
    start(): Promise<void>;
    stop(): Promise<void>;
    getAll(): Promise<IEmailDomain[]>;
    getById(id: string): Promise<IEmailDomain | null>;
    getByDomain(domainName: string): Promise<IEmailDomain | null>;
    ensureEmailDomainForDomainName(domainName: string): Promise<IEmailDomain | null>;
    createEmailDomain(opts: {
        linkedDomainId: string;
        subdomain?: string;
        dkimSelector?: string;
        dkimKeySize?: number;
        rotateKeys?: boolean;
        rotationIntervalDays?: number;
    }): Promise<IEmailDomain>;
    updateEmailDomain(id: string, changes: {
        rotateKeys?: boolean;
        rotationIntervalDays?: number;
        rateLimits?: IEmailDomain['rateLimits'];
    }): Promise<void>;
    deleteEmailDomain(id: string): Promise<void>;
    /**
     * Compute the 4 required DNS records for an email domain.
     */
    getRequiredDnsRecords(id: string): Promise<IEmailDnsRecord[]>;
    /**
     * Auto-create missing DNS records via the linked domain's DNS path.
     */
    provisionDnsRecords(id: string): Promise<number>;
    /**
     * Validate DNS records via live lookups.
     */
    validateDns(id: string): Promise<IEmailDnsRecord[]>;
    private recordMatchesRequired;
    private checkMx;
    private checkTxtRecord;
    private docToInterface;
    private isDomainAlreadyConfigured;
    private findLinkedDnsDomain;
    private buildManagedDomainConfigs;
    syncManagedDomainsToRuntime(): Promise<void>;
}
