/** * Email validation engine * * Native implementation with music-industry extras: * - RFC 5322 format validation (pure) * - Configurable domain typo correction (pure) * - Role-based email detection (press@, info@, etc.) (pure) * - Disposable domain detection via a vendored list (pure) * - Catch-all domain flagging (pure) * - MX record verification with a cache layer (Node-only, see net.ts) * - Domain-grouped batch validation for efficiency * * The pure checks have no Node dependencies; everything network-bound is * isolated in net.ts so this module can back a browser build with the MX * check stubbed out. */ import { MxCache } from '../../utils/mx-cache.js'; import type { ScrubResult } from '../../types.js'; type EmailResult = ScrubResult['email']; export interface ValidateConfig { /** * Accepted for backwards compatibility; SMTP verification was removed in * 0.3.0 (see net.ts). MX-level checks always run. */ smtp?: boolean; /** Accepted for backwards compatibility; unused since SMTP removal. */ smtpTimeout?: number; rolePrefixes?: string[]; catchAllDomains?: string[]; musicTLDs?: string[]; mxCacheTTL?: number; onProgress?: (email: string, result: EmailResult, index: number, total: number) => void; } export declare function validateEmail(email: string, config: ValidateConfig & { mxCache: MxCache; }): Promise; /** * Validate a batch of emails efficiently. * Groups emails by domain so each domain's MX lookup happens once and is * served from cache for every other address at that domain. */ export declare function validateEmailBatch(emails: string[], config?: ValidateConfig): Promise>; export {};