import type * as plugins from './plugins.js';
export type TQueryRecordType = 'A' | 'AAAA' | 'CNAME' | 'MX' | 'NS' | 'PTR' | 'SOA' | 'SRV' | 'TXT';
export type TQueryTransport = 'system' | 'udp' | 'doh';
export type TQueryMissingReason = 'nodata' | 'nxdomain';
export type TQueryErrorKind = 'timeout' | 'transport' | 'protocol' | 'server' | 'unsupported' | 'internal';
export interface IQueryError {
    kind: TQueryErrorKind;
    code: string;
    message: string;
    retryable: boolean;
}
export interface IQueryAttemptSuccess {
    status: 'success';
    transport: TQueryTransport;
    records: plugins.tsclass.network.IDnsRecord[];
    rcode?: number;
}
export interface IQueryAttemptMissing {
    status: 'missing';
    transport: TQueryTransport;
    records: [];
    missingReason: TQueryMissingReason;
    rcode?: number;
}
export interface IQueryAttemptError {
    status: 'error';
    transport: TQueryTransport;
    records: [];
    error: IQueryError;
    rcode?: number;
}
export type TQueryAttempt = IQueryAttemptSuccess | IQueryAttemptMissing | IQueryAttemptError;
export interface IQueryRecordsSuccess extends IQueryAttemptSuccess {
    attempts: TQueryAttempt[];
}
export interface IQueryRecordsMissing extends IQueryAttemptMissing {
    attempts: TQueryAttempt[];
}
export interface IQueryRecordsError extends IQueryAttemptError {
    attempts: TQueryAttempt[];
}
export type TQueryRecordsResult = IQueryRecordsSuccess | IQueryRecordsMissing | IQueryRecordsError;
