/** * zynor - A promise-based DNS resolver with multiple DoH providers * * @author Olajide Mathew Ogundare * @company Yuniq Solutions Tech * @license MIT */ import type { IResolver } from './interfaces/overloading.cjs'; import { Zynor } from './resolver.cjs'; export { Zynor } from './resolver.cjs'; export type { ZynorConfig, ProviderConfig, ProviderName, ProviderSelectionOptions, RecordType, AnyRecord, RecordWithTtl, CaaRecord, MxRecord, NaptrRecord, SoaRecord, SrvRecord, TlsaRecord, ResolveOptions, ResolveWithTtlOptions, AbortOptions, } from './types.cjs'; export { LruCache } from './cache.cjs'; export type { CacheConfig } from './cache.cjs'; export { NoEnabledProvidersError, InvalidHostnameError, ProviderNotEnabledError, InvalidProviderError } from './types.cjs'; /** * Resets the default resolver instance. * This is useful for testing or when you want to change the default configuration. */ export declare const resetDefaultResolver: () => void; /** * Sets a custom default resolver instance. * @param resolver - The Zynor instance to use as default */ export declare const setDefaultResolver: (resolver: Zynor) => void; /** * Resolves A records for a hostname using the default resolver. * @param hostname - The hostname to resolve * @param options - Optional resolution options * @param provider - Optional specific provider to use * @returns A promise resolving to an array of IPv4 addresses or records with TTL * @example * ```typescript * import { resolve4 } from 'zynor'; * * const addresses = await resolve4('example.com'); * console.log(addresses); // ['93.184.216.34'] * * const withTtl = await resolve4('example.com', { ttl: true }); * console.log(withTtl); // [{ address: '93.184.216.34', ttl: 300 }] * ``` */ export declare const resolve4: IResolver['resolve4']; /** * Resolves AAAA records for a hostname using the default resolver. * @param hostname - The hostname to resolve * @param options - Optional resolution options * @param provider - Optional specific provider to use * @returns A promise resolving to an array of IPv6 addresses or records with TTL * @example * ```typescript * import { resolve6 } from 'zynor'; * * const addresses = await resolve6('example.com'); * console.log(addresses); // ['2606:2800:220:1:248:1893:25c8:1946'] * ``` */ export declare const resolve6: IResolver['resolve6']; /** * Resolves ANY records for a hostname using the default resolver. * @param hostname - The hostname to resolve * @param provider - Optional specific provider to use * @returns A promise resolving to an array of any DNS records * @example * ```typescript * import { resolveAny } from 'zynor'; * * const records = await resolveAny('example.com'); * console.log(records); // [{ type: 'A', address: '93.184.216.34' }, ...] * ``` */ export declare const resolveAny: IResolver['resolveAny']; /** * Resolves CAA records for a hostname using the default resolver. * @param hostname - The hostname to resolve * @param provider - Optional specific provider to use * @returns A promise resolving to an array of CAA records */ export declare const resolveCaa: IResolver['resolveCaa']; /** * Resolves CNAME records for a hostname using the default resolver. * @param hostname - The hostname to resolve * @param provider - Optional specific provider to use * @returns A promise resolving to an array of CNAME records */ export declare const resolveCname: IResolver['resolveCname']; /** * Resolves MX records for a hostname using the default resolver. * @param hostname - The hostname to resolve * @param provider - Optional specific provider to use * @returns A promise resolving to an array of MX records * @example * ```typescript * import { resolveMx } from 'zynor'; * * const mxRecords = await resolveMx('example.com'); * console.log(mxRecords); // [{ priority: 10, exchange: 'mail.example.com' }] * ``` */ export declare const resolveMx: IResolver['resolveMx']; /** * Resolves NAPTR records for a hostname using the default resolver. * @param hostname - The hostname to resolve * @param provider - Optional specific provider to use * @returns A promise resolving to an array of NAPTR records */ export declare const resolveNaptr: IResolver['resolveNaptr']; /** * Resolves NS records for a hostname using the default resolver. * @param hostname - The hostname to resolve * @param provider - Optional specific provider to use * @returns A promise resolving to an array of NS records */ export declare const resolveNs: IResolver['resolveNs']; export declare const resolvePtr: IResolver['resolvePtr']; export declare const resolveSoa: IResolver['resolveSoa']; export declare const resolveSrv: IResolver['resolveSrv']; /** * Resolves TLSA records for a hostname using the default resolver. * @param hostname - The hostname to resolve * @param provider - Optional specific provider to use * @returns A promise resolving to an array of TLSA records */ export declare const resolveTlsa: IResolver['resolveTlsa']; /** * Resolves TXT records for a hostname using the default resolver. * @param hostname - The hostname to resolve * @param provider - Optional specific provider to use * @returns A promise resolving to an array of TXT records * @example * ```typescript * import { resolveTxt } from 'zynor'; * * const txtRecords = await resolveTxt('example.com'); * console.log(txtRecords); // [['v=spf1 include:_spf.example.com ~all']] * ``` */ export declare const resolveTxt: IResolver['resolveTxt']; /** * Performs reverse DNS lookup for an IP address using the default resolver. * @param ip - The IP address to reverse lookup * @param provider - Optional specific provider to use * @returns A promise resolving to an array of hostnames * @example * ```typescript * import { reverse } from 'zynor'; * * const hostnames = await reverse('8.8.8.8'); * console.log(hostnames); // ['dns.google.'] * ``` */ export declare const reverse: IResolver['reverse']; export declare const resolve: IResolver['resolve']; export { EmailValidator } from './email/index.cjs'; export type { EmailBulkValidationOptions, EmailEachOptions, EmailResponse, EmailResponseWithMx, EmailValidationOptions, ValidationConfig, ValidateCacheEntry, } from './email/index.cjs'; export default Zynor;