import type { DnsRecordResult, DnsRecordType } from '../domain/model.js';
/**
 * Port for managing DNS records in an external provider (IONOS, Cloudflare, etc.).
 *
 * Swapping providers is done by implementing a new adapter and wiring it in
 * `src/deploy/factories/adapter.factory.ts`. No business logic changes.
 */
export interface DnsPort {
    /**
     * Ensure a DNS record exists and points to `value`.
     *
     * Idempotent: if the record already exists with the same value, returns
     * `action: 'unchanged'`; if it exists with a different value, updates it and
     * returns `action: 'updated'`; otherwise creates it and returns `action: 'created'`.
     *
     * @param params.domain - Fully qualified domain (e.g. `api.example.com`).
     * @param params.type - Record type (`A` or `CNAME`).
     * @param params.value - Target of the record (IP for `A`, hostname for `CNAME`).
     * @param params.zone - DNS zone the record belongs to (e.g. `example.com`).
     */
    upsertRecord(params: {
        domain: string;
        type: DnsRecordType;
        value: string;
        zone: string;
    }): Promise<DnsRecordResult>;
}
