/**
 * Verification Service
 * Handles email verification, password reset, and magic links
 */
import type { AuthAdapter } from "../types.js";
export interface VerificationConfig {
    /**
     * Verification token expiration in seconds
     * @default 3600 (1 hour)
     */
    tokenExpiration?: number;
    /**
     * Magic link expiration in seconds
     * @default 3600 (1 hour)
     */
    magicLinkExpiration?: number;
    /**
     * Password reset expiration in seconds
     * @default 3600 (1 hour)
     */
    passwordResetExpiration?: number;
}
export type VerificationType = "email-verification" | "password-reset" | "magic-link" | "invite";
export interface VerificationService {
    /**
     * Generate a verification token
     */
    generateToken(): string;
    /**
     * Generate a short code (6-12 characters)
     */
    generateCode(length?: number): string;
    /**
     * Create an email verification token
     */
    createEmailVerification(email: string): Promise<{
        token: string;
        expiresAt: Date;
    }>;
    /**
     * Verify an email verification token
     */
    verifyEmail(token: string): Promise<string | null>;
    /**
     * Create a password reset token
     */
    createPasswordReset(email: string): Promise<{
        token: string;
        expiresAt: Date;
    }>;
    /**
     * Verify a password reset token
     */
    verifyPasswordReset(token: string): Promise<string | null>;
    /**
     * Create a magic link token
     */
    createMagicLink(email: string): Promise<{
        token: string;
        expiresAt: Date;
    }>;
    /**
     * Update a magic link token value (for code mode)
     */
    updateMagicLinkToken(email: string, newToken: string): Promise<void>;
    /**
     * Verify a magic link token
     */
    verifyMagicLink(token: string): Promise<string | null>;
    /**
     * Delete a verification by identifier
     */
    deleteVerification(identifier: string): Promise<void>;
}
export declare function createVerificationService(adapter: AuthAdapter, config?: VerificationConfig): VerificationService;
export default createVerificationService;
//# sourceMappingURL=verification.d.ts.map