import * as plugins from './plugins.js';
import type { TQueryAttempt, TQueryRecordType, TQueryRecordsResult } from './interfaces.queryrecords.js';
export type TDnsProvider = 'google' | 'cloudflare';
export declare const makeNodeProcessUseDnsProvider: (providerArg: TDnsProvider) => void;
export type TResolutionStrategy = 'doh' | 'udp' | 'system' | 'prefer-system' | 'prefer-udp';
export interface ISmartDnsConstructorOptions {
    strategy?: TResolutionStrategy;
    allowDohFallback?: boolean;
    timeoutMs?: number;
}
/**
 * Smartdns offers methods for working with DNS resolution.
 * Supports system resolver, UDP wire-format, and DoH (DNS-over-HTTPS) via a Rust binary.
 */
export declare class Smartdns {
    private strategy;
    private allowDohFallback;
    private timeoutMs;
    private rustBridge;
    dnsTypeMap: {
        [key: string]: number;
    };
    constructor(optionsArg: ISmartDnsConstructorOptions);
    private getRustBridge;
    /**
     * check a dns record until it has propagated
     */
    checkUntilAvailable(recordNameArg: string, recordTypeArg: plugins.tsclass.network.TDnsRecordType, expectedValue: string, cyclesArg?: number, intervalArg?: number): Promise<boolean>;
    /**
     * get A Dns Record
     */
    getRecordsA(recordNameArg: string): Promise<plugins.tsclass.network.IDnsRecord[]>;
    /**
     * get AAAA Record
     */
    getRecordsAAAA(recordNameArg: string): Promise<plugins.tsclass.network.IDnsRecord[]>;
    /**
     * gets a txt record
     */
    getRecordsTxt(recordNameArg: string): Promise<plugins.tsclass.network.IDnsRecord[]>;
    /**
     * Resolve records for a name. A single attempt per configured transport;
     * bound it with the constructor's `timeoutMs` and retry in the caller if a
     * retry policy is wanted. There is deliberately no built-in retry loop:
     * an unbounded one against a public resolver is a denial-of-service
     * vector against both the caller and the resolver.
     */
    getRecords(recordNameArg: string, recordTypeArg: plugins.tsclass.network.TDnsRecordType): Promise<plugins.tsclass.network.IDnsRecord[]>;
    /**
     * Query DNS without collapsing missing records and operational failures.
     * Legacy getRecords* methods intentionally retain their historical behavior.
     */
    queryRecords(recordNameArg: string, recordTypeArg: TQueryRecordType): Promise<TQueryRecordsResult>;
    protected getNodeDnsPromises(): NonNullable<typeof plugins.dns>['promises'] | undefined;
    protected querySystemStrict(recordNameArg: string, recordTypeArg: TQueryRecordType): Promise<TQueryAttempt>;
    protected queryRustStrict(recordNameArg: string, recordTypeArg: TQueryRecordType, transportArg: 'udp' | 'doh'): Promise<TQueryAttempt>;
    /**
     * gets a record using nodejs dns resolver
     */
    getRecordWithNodeDNS(recordNameArg: string, recordTypeArg: plugins.tsclass.network.TDnsRecordType): Promise<plugins.tsclass.network.IDnsRecord[]>;
    getNameServers(domainNameArg: string): Promise<string[]>;
    convertDnsTypeNameToTypeNumber(dnsTypeNameArg: string): number;
    convertDnsTypeNumberToTypeName(dnsTypeNumberArg: number): plugins.tsclass.network.TDnsRecordType | null;
    private finalizeStrictQuery;
    private withStrictTimeout;
    private makeStrictErrorAttempt;
    private getStrictErrorCode;
    private getStrictErrorMessage;
    /**
     * Convert a DNS type string from Rust (e.g. "A", "AAAA") to the canonical TDnsRecordType.
     */
    private convertDnsTypeNameToCanonical;
    /**
     * Destroy the Rust client bridge and free resources.
     */
    destroy(): void;
}
