export interface HostedZone {
    Id: string;
    Name: string;
    CallerReference?: string;
    Config?: {
        Comment?: string;
        PrivateZone?: boolean;
    };
    ResourceRecordSetCount?: number;
}
export interface ResourceRecordSet {
    Name: string;
    Type: string;
    TTL?: number;
    ResourceRecords?: {
        Value: string;
    }[];
    AliasTarget?: {
        HostedZoneId: string;
        DNSName: string;
        EvaluateTargetHealth: boolean;
    };
    SetIdentifier?: string;
    Weight?: number;
    Region?: string;
    GeoLocation?: {
        ContinentCode?: string;
        CountryCode?: string;
        SubdivisionCode?: string;
    };
    Failover?: 'PRIMARY' | 'SECONDARY';
    HealthCheckId?: string;
}
export interface DelegationSet {
    Id?: string;
    CallerReference?: string;
    NameServers: string[];
}
export interface CreateHostedZoneResult {
    HostedZone: HostedZone;
    ChangeInfo: {
        Id: string;
        Status: string;
        SubmittedAt: string;
    };
    DelegationSet: DelegationSet;
    Location: string;
}
export interface ListHostedZonesResult {
    HostedZones: HostedZone[];
    IsTruncated: boolean;
    MaxItems: string;
    Marker?: string;
    NextMarker?: string;
}
export interface GetHostedZoneResult {
    HostedZone: HostedZone;
    DelegationSet: DelegationSet;
    VPCs?: {
        VPCId: string;
        VPCRegion: string;
    }[];
}
export interface ListResourceRecordSetsResult {
    ResourceRecordSets: ResourceRecordSet[];
    IsTruncated: boolean;
    MaxItems: string;
    NextRecordName?: string;
    NextRecordType?: string;
    NextRecordIdentifier?: string;
}
export interface ChangeResourceRecordSetsResult {
    ChangeInfo: {
        Id: string;
        Status: string;
        SubmittedAt: string;
        Comment?: string;
    };
}
export interface Change {
    Action: 'CREATE' | 'DELETE' | 'UPSERT';
    ResourceRecordSet: ResourceRecordSet;
}
export interface ChangeBatch {
    Comment?: string;
    Changes: Change[];
}
/**
 * Route53 Client for DNS management
 */
export declare class Route53Client {
    private client;
    private region;
    constructor(region?: string);
    /**
     * Create a new hosted zone
     */
    createHostedZone(params: {
        Name: string;
        CallerReference?: string;
        HostedZoneConfig?: {
            Comment?: string;
            PrivateZone?: boolean;
        };
        VPC?: {
            VPCRegion: string;
            VPCId: string;
        };
        DelegationSetId?: string;
    }): Promise<CreateHostedZoneResult>;
    /**
     * List hosted zones
     */
    listHostedZones(params?: {
        Marker?: string;
        MaxItems?: string;
    }): Promise<ListHostedZonesResult>;
    /**
     * List hosted zones by name (more efficient for finding specific zone)
     */
    listHostedZonesByName(params?: {
        DNSName?: string;
        HostedZoneId?: string;
        MaxItems?: string;
    }): Promise<ListHostedZonesResult>;
    /**
     * Get a hosted zone
     */
    getHostedZone(params: {
        Id: string;
    }): Promise<GetHostedZoneResult>;
    /**
     * Delete a hosted zone
     */
    deleteHostedZone(params: {
        Id: string;
    }): Promise<void>;
    /**
     * List resource record sets in a hosted zone
     */
    listResourceRecordSets(params: {
        HostedZoneId: string;
        StartRecordName?: string;
        StartRecordType?: string;
        StartRecordIdentifier?: string;
        MaxItems?: string;
    }): Promise<ListResourceRecordSetsResult>;
    /**
     * Change resource record sets (create, delete, or upsert)
     */
    changeResourceRecordSets(params: {
        HostedZoneId: string;
        ChangeBatch: ChangeBatch;
    }): Promise<ChangeResourceRecordSetsResult>;
    /**
     * Escape XML special characters
     */
    private escapeXml;
    /**
     * Parse CreateHostedZone response
     */
    private parseCreateHostedZoneResponse;
    /**
     * Parse ListHostedZones response
     */
    private parseListHostedZonesResponse;
    /**
     * Parse GetHostedZone response
     */
    private parseGetHostedZoneResponse;
    /**
     * Parse ListResourceRecordSets response
     */
    private parseListResourceRecordSetsResponse;
    /**
     * Parse ChangeResourceRecordSets response
     */
    private parseChangeResourceRecordSetsResponse;
    /**
     * Parse a hosted zone object
     */
    private parseHostedZone;
    /**
     * Parse a delegation set object
     */
    private parseDelegationSet;
    /**
     * Parse a resource record set object
     */
    private parseResourceRecordSet;
    /**
     * Find hosted zone by domain name
     */
    findHostedZoneByName(domainName: string): Promise<HostedZone | null>;
    /**
     * Create an A record
     */
    createARecord(params: {
        HostedZoneId: string;
        Name: string;
        Value: string | string[];
        TTL?: number;
    }): Promise<ChangeResourceRecordSetsResult>;
    /**
     * Create a CNAME record
     */
    createCnameRecord(params: {
        HostedZoneId: string;
        Name: string;
        Value: string;
        TTL?: number;
    }): Promise<ChangeResourceRecordSetsResult>;
    /**
     * Create an alias record (for CloudFront, ALB, etc.)
     */
    createAliasRecord(params: {
        HostedZoneId: string;
        Name: string;
        TargetHostedZoneId: string;
        TargetDNSName: string;
        EvaluateTargetHealth?: boolean;
        Type?: 'A' | 'AAAA';
    }): Promise<ChangeResourceRecordSetsResult>;
    /**
     * Create a TXT record
     */
    createTxtRecord(params: {
        HostedZoneId: string;
        Name: string;
        Value: string | string[];
        TTL?: number;
    }): Promise<ChangeResourceRecordSetsResult>;
    /**
     * Create an MX record
     */
    createMxRecord(params: {
        HostedZoneId: string;
        Name: string;
        Values: Array<{
            priority: number;
            mailServer: string;
        }>;
        TTL?: number;
    }): Promise<ChangeResourceRecordSetsResult>;
    /**
     * Delete a record
     */
    deleteRecord(params: {
        HostedZoneId: string;
        RecordSet: ResourceRecordSet;
    }): Promise<ChangeResourceRecordSetsResult>;
    /**
     * Wait for a change to become INSYNC
     */
    waitForChange(changeId: string, maxAttempts?: number, delayMs?: number): Promise<boolean>;
    /**
     * Find or create a hosted zone for a domain
     * Automatically creates the zone if it doesn't exist
     */
    findOrCreateHostedZone(params: {
        domainName: string;
        comment?: string;
        privateZone?: boolean;
        vpc?: {
            VPCRegion: string;
            VPCId: string;
        };
    }): Promise<{
        hostedZone: HostedZone;
        nameServers: string[];
        isNew: boolean;
    }>;
    /**
     * Get the root domain from a subdomain
     * e.g., "api.example.com" -> "example.com"
     */
    static getRootDomain(domain: string): string;
    /**
     * Find the hosted zone for a domain or its parent domain
     * Useful when you have a subdomain and need to find the zone
     */
    findHostedZoneForDomain(domain: string): Promise<HostedZone | null>;
    /**
     * Ensure a hosted zone exists for a domain, creating it if necessary
     * Returns the hosted zone ID suitable for use in CloudFormation
     */
    ensureHostedZone(params: {
        domainName: string;
        comment?: string;
    }): Promise<{
        hostedZoneId: string;
        nameServers: string[];
        isNew: boolean;
        action: 'found' | 'created';
    }>;
    /**
     * Setup DNS for a domain with automatic hosted zone creation
     * Creates the hosted zone if needed and returns setup information
     */
    setupDomainDns(params: {
        domain: string;
        createIfNotExists?: boolean;
    }): Promise<{
        success: boolean;
        hostedZoneId: string | null;
        nameServers: string[];
        isNew: boolean;
        message: string;
    }>;
    /**
     * CloudFront hosted zone ID (global)
     */
    static readonly CloudFrontHostedZoneId = "Z2FDTNDATAQYW2";
    /**
     * S3 website hosting hosted zone IDs by region
     */
    static readonly S3WebsiteHostedZoneIds: Record<string, string>;
    /**
     * ALB hosted zone IDs by region
     */
    static readonly ALBHostedZoneIds: Record<string, string>;
    /**
     * API Gateway hosted zone IDs by region
     */
    static readonly APIGatewayHostedZoneIds: Record<string, string>;
}
