import type { Database } from "@prodobit/database"; export interface EmailVerificationResult { success: boolean; message: string; token?: string; expiresAt?: Date; error?: string; } export interface VerifyTokenResult { success: boolean; message: string; email?: string; error?: string; } export declare class EmailVerificationService { /** * Generate and store email verification token */ static generateVerificationToken(db: Database, email: string, createdBy?: string, expiresInHours?: number): Promise; /** * Verify email token and mark as used */ static verifyToken(db: Database, token: string): Promise; /** * Check if email has pending verification tokens */ static hasValidToken(db: Database, email: string): Promise<{ exists: boolean; expiresAt?: Date; sentAt?: Date; }>; /** * Clean up expired tokens for a specific email */ static cleanupExpiredTokens(db: Database, email?: string): Promise; /** * Get verification status for an email */ static getVerificationStatus(db: Database, email: string): Promise<{ verified: boolean; hasPendingToken: boolean; tokenExpiresAt?: Date; tokenSentAt?: Date; }>; /** * Invalidate all tokens for an email (useful when email is verified) */ static invalidateTokensForEmail(db: Database, email: string): Promise; /** * Rate limiting check - prevent too many verification emails */ static canSendVerificationEmail(db: Database, email: string, cooldownMinutes?: number): Promise<{ canSend: boolean; waitTime?: number; message: string; }>; } //# sourceMappingURL=email-verification.d.ts.map