/**
 * DNS tools: WHOIS/RDAP lookup, DNS propagation, SSL check, zone file import/export,
 * subdomain discovery, and DNS validation
 */
import type { DnsRecord } from "./dns-records.js";
export declare class DnsToolValidationError extends Error {
    constructor(message: string);
}
export declare function normalizeDomainName(value: string): string;
export interface RdapEntity {
    handle?: string;
    vcardArray?: [string, unknown[]];
    roles?: string[];
    entities?: RdapEntity[];
    remarks?: {
        title?: string;
        description?: string | string[];
    }[];
}
export interface RdapNameserver {
    ldhName?: string;
    unicodeName?: string;
}
export interface RdapEvent {
    eventAction: string;
    eventDate?: string;
    eventActor?: string;
}
export interface RdapResponse {
    handle?: string;
    rdapConformance?: string[];
    status?: string[];
    entities?: RdapEntity[];
    nameservers?: RdapNameserver[];
    events?: RdapEvent[];
    links?: {
        rel: string;
        href: string;
        type?: string;
    }[];
    [key: string]: unknown;
}
/**
 * Query RDAP for a domain via rdap.org public bootstrap.
 * Returns structured JSON with registrant, registrar, expiry, nameservers.
 * Throws if the RDAP server returns an error.
 */
export declare function rdapLookup(domainName: string): Promise<RdapResponse>;
/**
 * Extract registrant contact info from RDAP entities.
 * Looks for entities with role "registrant" and parses vCard data.
 */
export declare function extractRegistrantFromRdap(rdap: RdapResponse): {
    name: string | null;
    email: string | null;
    phone: string | null;
    organization: string | null;
};
/**
 * Extract registrar name from RDAP data.
 * Looks for entities with role "registrar" or "sponsor".
 */
export declare function extractRegistrarFromRdap(rdap: RdapResponse): string | null;
/**
 * Extract expiry date from RDAP events.
 */
export declare function extractExpiryFromRdap(rdap: RdapResponse): string | null;
/**
 * Extract nameservers from RDAP response.
 */
export declare function extractNameserversFromRdap(rdap: RdapResponse): string[];
export interface WhoisResult {
    domain: string;
    registrar: string | null;
    expires_at: string | null;
    nameservers: string[];
    raw: string;
    source: "rdap" | "cli";
    registrant: {
        name: string | null;
        email: string | null;
        phone: string | null;
        organization: string | null;
    };
}
export declare function whoisLookup(domainName: string): Promise<WhoisResult>;
export interface DnsPropagationResult {
    domain: string;
    record_type: string;
    servers: {
        server: string;
        name: string;
        values: string[];
        status: "ok" | "error";
        error?: string;
    }[];
    consistent: boolean;
}
export declare function checkDnsPropagation(domain: string, recordType?: string): DnsPropagationResult;
export interface SslCheckResult {
    domain: string;
    issuer: string | null;
    expires_at: string | null;
    subject: string | null;
    error?: string;
}
export declare function checkSsl(domainName: string): Promise<SslCheckResult>;
export declare function exportZoneFile(domainId: string): Promise<string | null>;
export interface ZoneImportResult {
    imported: number;
    skipped: number;
    errors: string[];
    records: DnsRecord[];
}
export declare function importZoneFile(domainId: string, content: string): Promise<ZoneImportResult | null>;
export interface SubdomainResult {
    domain: string;
    subdomains: string[];
    source: string;
    error?: string;
}
export declare function discoverSubdomains(domain: string): Promise<SubdomainResult>;
export interface DnsValidationIssue {
    type: "error" | "warning";
    record_id?: string;
    message: string;
}
export interface DnsValidationResult {
    domain_id: string;
    domain_name: string;
    issues: DnsValidationIssue[];
    valid: boolean;
}
export declare function validateDns(domainId: string): Promise<DnsValidationResult | null>;
//# sourceMappingURL=dns-tools.d.ts.map