/**
 * Credential Provider
 * Handles email/password authentication
 */
import type { AuthAdapter, User, Account } from "../types.js";
export interface CredentialProviderOptions {
    /**
     * Password hashing function
     */
    hashPassword: (password: string) => Promise<string>;
    /**
     * Password verification function
     */
    verifyPassword: (data: {
        password: string;
        hash: string;
    }) => Promise<boolean>;
    /**
     * Minimum password length
     */
    minPasswordLength?: number;
    /**
     * Maximum password length
     */
    maxPasswordLength?: number;
}
export interface CredentialProvider {
    id: "credential";
    name: "Credentials";
    /**
     * Validate password meets requirements
     */
    validatePassword(password: string): {
        valid: boolean;
        error?: string;
    };
    /**
     * Hash a password
     */
    hashPassword(password: string): Promise<string>;
    /**
     * Verify a password against a hash
     */
    verifyPassword(password: string, hash: string): Promise<boolean>;
    /**
     * Sign up a new user with credentials
     */
    signUp(data: {
        adapter: AuthAdapter;
        email: string;
        password: string;
        firstName: string;
        lastName?: string;
        phone?: string;
        /** Custom fields to be added to the user */
        customFields?: Record<string, any>;
    }): Promise<{
        user: User;
        account: Account;
    }>;
    /**
     * Sign in a user with credentials
     */
    signIn(data: {
        adapter: AuthAdapter;
        email: string;
        password: string;
    }): Promise<User | null>;
    /**
     * Change a user's password
     */
    changePassword(data: {
        adapter: AuthAdapter;
        userId: string;
        currentPassword: string;
        newPassword: string;
    }): Promise<boolean>;
    /**
     * Reset a user's password (without requiring current password)
     */
    resetPassword(data: {
        adapter: AuthAdapter;
        userId: string;
        newPassword: string;
    }): Promise<boolean>;
}
export declare function credential(options: CredentialProviderOptions): CredentialProvider;
export default credential;
//# sourceMappingURL=credential.d.ts.map