export { C as CrossCheckResult, D as DocumentValidationDetail, m as FraudDetectionResult, F as FraudRisk, n as FraudSignal, o as FraudSignalType, K as KYCBundleInput, a as KYCBundleResult, b as detectAadhaarFraud, d as detectFraudSignals, e as detectGSTINFraud, f as detectIFSCFraud, l as detectMSMEFraud, c as detectPANFraud, j as detectPhoneFraud, g as detectPincodeFraud, h as detectTANFraud, i as detectUANFraud, k as detectUPIFraud, v as validateKYCBundle } from './kycBundle-Ch6x7ZB0.mjs'; /** * Validates an Aadhaar number. * @param aadhaar The 12-digit Aadhaar number string. * @returns True if valid, false otherwise. */ declare const isValidAadhaar: (aadhaar: any) => boolean; /** * Validates a Permanent Account Number (PAN). * @param pan The 10-character PAN string. * @returns True if valid, false otherwise. */ declare const isValidPAN: (pan: any) => boolean; interface PANInfo { valid: boolean; category?: string; categoryDesc?: string; } /** * Extracts metadata from a PAN number. * @param pan The PAN string. * @returns Object containing validity and metadata. */ declare const getPANInfo: (pan: string) => PANInfo; interface TANInfo { raw: string; normalized: string; cityCode: string; sequenceNumber: string; lastChar: string; deductorType: string; } /** * Validates a Tax Deduction and Collection Account Number (TAN). * * Validation rules: * - Input must be a non-empty string * - Normalized structure must be exactly `AAAA99999A` * - Position 4 is TAN-specific name-initial character (alphabet), * not PAN entity-type logic * * @param input TAN input from caller. * @returns True for valid TAN, false for invalid input. Never throws. */ declare const isValidTAN: (input: unknown) => boolean; /** * Returns parsed TAN metadata for valid input. * * @param input TAN string. * @returns Parsed TANInfo object, or null when TAN is invalid. */ declare const getTANInfo: (input: string) => TANInfo | null; interface UANInfo { raw: string; normalized: string; isAllocated: boolean; rangeNote: string; } /** * Validates an EPFO Universal Account Number (UAN). * * Validation rules: * - Input must be a non-empty string * - Normalized value must be exactly 12 digits * - Reject known synthetic invalid patterns (all zeros / all same digit) * - Prefix must fall in a known allocated EPFO range * * @param input UAN input from caller. * @returns True for valid UAN, false for invalid input. Never throws. */ declare const isValidUAN: (input: unknown) => boolean; /** * Returns parsed UAN metadata for valid input. * * @param input UAN string. * @returns Parsed UANInfo object, or null when UAN is invalid. */ declare const getUANInfo: (input: string) => UANInfo | null; /** * Validates a GSTIN. * @param gstin The 15-character GSTIN string. * @returns True if valid, false otherwise. */ declare const isValidGSTIN: (gstin: any) => boolean; interface GSTINInfo { valid: boolean; state?: string; stateCode?: string; } /** * Extracts metadata from a GSTIN. * @param gstin The GSTIN string. * @returns Object containing validity and metadata (State Name). */ declare const getGSTINInfo: (gstin: string) => GSTINInfo; /** * Validates an IFSC Code. * @param ifsc The 11-character IFSC string. * @returns True if valid, false otherwise. */ declare const isValidIFSC: (ifsc: any) => boolean; /** * Validates an Indian Pincode. * @param pincode The 6-digit Pincode string. * @returns True if valid, false otherwise. */ declare const isValidPincode: (pincode: any) => boolean; interface PincodeInfo { valid: boolean; region?: string; } /** * Extracts metadata from a Pincode. * @param pincode The Pincode string. * @returns Object containing validity and region info. */ declare const getPincodeInfo: (pincode: string) => PincodeInfo; interface VoterIDInfo { raw: string; normalized: string; stateCode: string; stateName: string; sequenceNumber: string; } /** * Validates an EPIC / Voter ID number. * * Validation rules: * - Input must be a non-empty string * - Normalized value must be exactly 10 characters * - Structure must match `AAA9999999` * - Numeric suffix cannot be all zeros * * Note: * - The first three letters are FUSN (Assembly Constituency-level), not a * publicly published state-code mapping. A complete official public prefix * whitelist is not available, so no state-prefix whitelist check is applied. * * @param input Voter ID input from caller. * @returns True for valid Voter ID, false for invalid input. Never throws. */ declare const isValidVoterID: (input: unknown) => boolean; /** * Returns parsed Voter ID metadata for valid input. * * @param input Voter ID string. * @returns Parsed VoterIDInfo object, or null when Voter ID is invalid. */ declare const getVoterIDInfo: (input: string) => VoterIDInfo | null; interface DLInfo { raw: string; normalized: string; stateCode: string; stateName: string; rtoCode: string; rtoNumber: number; format: 'pre-2021' | 'post-2021' | 'unknown'; yearHint: number | null; } /** * Validates Indian Driving Licence numbers. * * Supported normalized formats: * - Post-2021: SSRRYYYYNNNNNNN * - Pre-2021: SSRRXYYYYNNNNNNN * * Where: * - SS: State code * - RR: RTO code (01-99) * - X: Legacy extra area code digit (pre-2021 only) * - YYYY: Year hint * - NNNNNNN: Running serial * * Returns false for any invalid input and never throws. */ declare const isValidDrivingLicense: (input: unknown) => boolean; /** * Returns parsed metadata for a valid Indian Driving Licence. */ declare const getDrivingLicenseInfo: (input: string) => DLInfo | null; interface PassportInfo { raw: string; normalized: string; series: string; seriesType: 'Regular' | 'Official' | 'Diplomatic' | 'Unknown'; sequenceNumber: string; mrzValid: boolean | null; } /** * Validates Indian passport number. * * Supported normalized format: A1234567 * - 1 letter prefix (series) * - 7 numeric digits * - digit block cannot be all zeros * * Note: * - MRZ check digit is not part of the passport number itself and therefore * cannot be validated from this standalone field. */ declare const isValidPassport: (input: unknown) => boolean; /** * Returns parsed metadata for a valid Indian passport number. */ declare const getPassportInfo: (input: string) => PassportInfo | null; interface UPIInfo { raw: string; normalized: string; handle: string; provider: string; bank: string; type: 'personal' | 'merchant' | 'unknown'; } /** * Validates UPI ID in format: handle@provider. * * Rules: * - Accepts unknown input and never throws. * - Normalizes by trim + lowercase. * - Exactly one @ is required. * - Handle must be 3..256 chars, alphanumeric/dot/underscore/hyphen, * cannot start/end with special chars, and cannot have consecutive special chars. * - Provider must match researched NPCI handle whitelist. */ declare const isValidUPI: (input: unknown) => boolean; /** * Returns normalized UPI metadata for valid input. */ declare const getUPIInfo: (input: string) => UPIInfo | null; interface PhoneInfo { raw: string; normalized: string; withCountryCode: string; series: string; isValid: boolean; } /** * Normalizes an Indian phone candidate to a 10-digit NSN. * * Supported cleanup: * - Removes spaces, hyphens, dots, and parentheses * - Strips +91 / 0091 / 91 country prefixes when applicable * - Strips a local leading 0 when present * * Returns null when normalization is impossible or cannot produce 10 digits. */ declare const normalisePhone: (input: string) => string | null; /** * Validates an Indian mobile number candidate. * * Returns false for invalid input and never throws. */ declare const isValidIndianPhone: (input: unknown) => boolean; /** * Returns normalized metadata for Indian phone input. * * Returns null if the value cannot be normalized to a 10-digit candidate. */ declare const getPhoneInfo: (input: string) => PhoneInfo | null; interface MSMEInfo { raw: string; normalized: string; format: 'udyam' | 'uam'; stateCode: string; stateName: string; districtCode: string; serialNumber: string; } /** * Validates MSME Udyam Registration Number. * * Expected normalized format: UDYAM-XX-00-0000000 */ declare const isValidMSME: (input: unknown) => boolean; /** * Validates legacy UAM (Udyog Aadhaar Memorandum) identifier. * * Expected format: XX00A0000000 (12 chars total). */ declare const isValidUAM: (input: unknown) => boolean; /** * Returns parsed metadata for valid MSME IDs (Udyam or UAM). */ declare const getMSMEInfo: (input: string) => MSMEInfo | null; /** * Validates a number string using the Verhoeff algorithm. * @param numStr The number string to validate. * @returns True if valid, false otherwise. */ declare const validateVerhoeff: (numStr: any) => boolean; /** * Generates the Verhoeff checksum digit for a given number string. * @param numStr The number string (without the checksum). * @returns The checksum digit. */ declare const generateVerhoeff: (numStr: any) => number; /** * Validates a number string using the Luhn algorithm (Mod 10). * Used for credit cards, IMEI, etc. * @param numStr The number string to validate. * @returns True if valid, false otherwise. */ declare const validateLuhn: (numStr: any) => boolean; /** * Generates the Mod-36 check digit for a 14-character GSTIN base. * * Algorithm: * 1. For each of the 14 characters (left to right, 0-indexed): * - Convert character to numeric value (0-35) * - Multiply by weight: weight = (index % 2) + 1, alternating 1, 2, 1, 2... * - Calculate: quotient = product / 36, remainder = product % 36 * - Add quotient + remainder to sum * 2. Calculate check digit index: (36 - (sum % 36)) % 36 * 3. Map index back to character * * Reference: Official GSTIN format specification (Ministry of Finance, India) * * @param gstinBase The first 14 characters of GSTIN (excluding check digit) * @returns The check digit index (0-35), or -1 if input is invalid */ declare const generateGSTCheckDigit: (gstinBase: any) => number; /** * Validates a GSTIN using Mod-36 Checksum Algorithm. * * @param gstin The 15-character GSTIN string to validate * @returns True if the check digit is valid, false otherwise */ declare const validateGSTCheckDigit: (gstin: any) => boolean; /** * Safely slices text respecting grapheme cluster boundaries. * Prevents breaking combined characters (e.g., consonant + matra in Devanagari). * Uses Intl.Segmenter (Node 16+, modern browsers). * * @param text The input string. * @param start Start index (grapheme-based, 0-indexed). * @param end End index (grapheme-based, exclusive). * @returns Sliced string without breaking graphemes. * * @complexity O(n) where n is the number of graphemes. */ declare const safeSlice: (text: string, start: number, end?: number) => string; /** * Returns the number of grapheme clusters in a string. * Useful for accurate length measurement of Indic text. * * @param text The input string. * @returns Number of grapheme clusters. */ declare const graphemeLength: (text: string) => number; /** * Normalizes Indic text for NLP and LLM preprocessing. * - Converts to NFC Normalization Form. * - Removes Zero Width Joiners (ZWJ) and Non-Joiners (ZWNJ). * - Standardizes whitespace. * * @param text The input string (e.g., Devanagari text). * @returns Cleaned and normalized string. * * @complexity O(n) where n is string length. */ declare const normalizeIndic: (text: string) => string; /** * Calculates phonetic similarity score (0-1) between two Indian names. * Uses modified Soundex + Levenshtein distance. * * @param str1 First string. * @param str2 Second string. * @returns Similarity score between 0 and 1. * * @complexity O(m*n) time, O(min(m,n)) space where m,n are phonetic code lengths. */ declare const phoneticMatch: (str1: string, str2: string) => number; interface AddressObject { pincode: string | null; city: string | null; state: string | null; landmarks: string[]; } /** * Heuristically parses an Indian address string. * @param address The raw address string. */ declare const parseAddress: (address: string) => AddressObject; interface ScrubOptions { maskChar?: string; scrubAadhaar?: boolean; scrubPAN?: boolean; scrubGSTIN?: boolean; } /** * Scans text for sensitive Indian PII (Aadhaar, PAN, GSTIN) and redacts them. * * **Security Features**: * - Strips invisible Unicode characters before detection (prevents obfuscation). * - Uses strict checksum verification (Verhoeff for Aadhaar, Mod-36 for GSTIN). * - Prevents false positives on random numbers. * * @param text Input text. * @param options Configuration for scrubbing. * @returns Sanitized text with PII replaced by mask tokens. * * @complexity O(n) where n is text length. */ declare const scrubPII: (text: string, options?: ScrubOptions) => string; type VerificationType = 'VOTER_ID' | 'RC' | 'UDID'; /** * Deep Verification for government IDs. * Goes beyond simple Regex by validating component logic (State codes, Structure). * @param id The ID string. * @param type The ID type. */ declare const deepVerify: (id: string, type: VerificationType) => boolean; type CorrectionConfidence = 'EXACT' | 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE'; interface CorrectionCandidate { corrected: string; changedPosition: number; changedFrom: string; changedTo: string; verificationAlgorithm: string; } interface CorrectionResult { original: string; normalizedInput: string; documentType: string; isAlreadyValid: boolean; confidence: CorrectionConfidence; candidates: CorrectionCandidate[]; primarySuggestion: string | null; note: string; } /** * Suggests corrections for invalid document numbers using checksum recovery. * * PRIVACY NOTE: This function processes potentially real identity document * numbers. Never log or persist the input, corrections, or results. * Results are returned to the caller - no data leaves this function. */ declare const suggestCorrection: (documentType: string, input: string) => CorrectionResult; export { type AddressObject, type CorrectionCandidate, type CorrectionConfidence, type CorrectionResult, type DLInfo, type GSTINInfo, type MSMEInfo, type PANInfo, type PassportInfo, type PhoneInfo, type PincodeInfo, type ScrubOptions, type TANInfo, type UANInfo, type UPIInfo, type VerificationType, type VoterIDInfo, deepVerify, generateGSTCheckDigit, generateVerhoeff, getDrivingLicenseInfo, getGSTINInfo, getMSMEInfo, getPANInfo, getPassportInfo, getPhoneInfo, getPincodeInfo, getTANInfo, getUANInfo, getUPIInfo, getVoterIDInfo, graphemeLength, isValidAadhaar, isValidDrivingLicense, isValidGSTIN, isValidIFSC, isValidIndianPhone, isValidMSME, isValidPAN, isValidPassport, isValidPincode, isValidTAN, isValidUAM, isValidUAN, isValidUPI, isValidVoterID, normalisePhone, normalizeIndic, parseAddress, phoneticMatch, safeSlice, scrubPII, suggestCorrection, validateGSTCheckDigit, validateLuhn, validateVerhoeff };