/** * Verification-code (OTP/2FA) extraction from email subject + plain body text. * * A bare `\d{6}` regex matches order numbers, phone fragments, years, and * prices, so extraction is two-phase instead: generate shaped candidates, * then score each by keyword proximity (English + German) minus negative * context and shape penalties. Only candidates clearing a threshold are * returned — no hit is better than a wrong hit landing on the clipboard. * * The caller is responsible for preparing `bodyText` * (`bodyText ?? stripHtml(bodyHtml)`, then `stripReplyChain`). */ export interface VerificationCodeMatch { /** Canonical code to copy/paste (separators stripped, `G-` prefix removed). */ code: string; /** The code exactly as it appeared in the mail. */ display: string; confidence: 'high' | 'medium' | 'low'; score: number; /** Trimmed line the code was found on (≤120 chars) — never log this blindly. */ evidence: string; source: 'subject' | 'body'; } /** * Extract the most likely verification code. Returns `undefined` when no * candidate clears the acceptance threshold. */ export declare function extractVerificationCode(subject: string, bodyText: string): VerificationCodeMatch | undefined; //# sourceMappingURL=verification-code.d.ts.map