interface TwoFactorCode { id: string; userId: string; code: string; hashedCode: string; type: 'email_verification' | 'password_reset' | 'login_verification' | 'phone_verification'; expiresAt: Date; createdAt: Date; attempts: number; isUsed: boolean; metadata?: { email?: string; phone?: string; ipAddress?: string; userAgent?: string; purpose?: string; [key: string]: any; }; } interface TwoFactorOptions { codeLength?: number; expiryMinutes?: number; maxAttempts?: number; type?: 'email_verification' | 'password_reset' | 'login_verification' | 'phone_verification'; metadata?: { email?: string; phone?: string; ipAddress?: string; userAgent?: string; purpose?: string; [key: string]: any; }; } /** * Generate and store a 2FA verification code with enhanced security */ declare function generateTwoFactorCode(userId: string, options?: TwoFactorOptions): Promise<{ code: string; codeId: string; expiresAt: Date; attemptsRemaining: number; }>; /** * Verify a 2FA code with enhanced security and logging */ declare function verifyTwoFactorCode(codeId: string, inputCode: string, userId?: string): Promise<{ isValid: boolean; isExpired: boolean; attemptsRemaining: number; error?: string; metadata?: any; }>; /** * Clean up expired 2FA codes and rate limit data */ declare function cleanupExpiredCodes(): Promise<{ codesDeleted: number; rateLimitEntriesCleared: number; }>; /** * Get user's active 2FA codes (for debugging/admin purposes) */ declare function getUserTwoFactorCodes(userId: string, type?: string): Promise; /** * Enhanced email service registry with validation */ /** * Send verification email using configured email service */ declare function sendVerificationEmail(email: string, code: string, options?: { serviceName?: string; subject?: string; template?: string; metadata?: any; }): Promise; /** * Send verification SMS using configured SMS service */ declare function sendVerificationSMS(phone: string, code: string, options?: { serviceName?: string; template?: string; metadata?: any; }): Promise; /** * Complete email verification workflow */ declare function initiateEmailVerification(userId: string, email: string, options?: { serviceName?: string; subject?: string; template?: string; codeLength?: number; expiryMinutes?: number; metadata?: any; }): Promise<{ codeId: string; expiresAt: Date; message: string; attemptsRemaining: number; }>; /** * Complete SMS verification workflow */ declare function initiateSMSVerification(userId: string, phone: string, options?: { serviceName?: string; template?: string; codeLength?: number; expiryMinutes?: number; metadata?: any; }): Promise<{ codeId: string; expiresAt: Date; message: string; attemptsRemaining: number; }>; export { initiateSMSVerification as a, getUserTwoFactorCodes as b, sendVerificationSMS as c, cleanupExpiredCodes as d, generateTwoFactorCode as g, initiateEmailVerification as i, sendVerificationEmail as s, verifyTwoFactorCode as v };