import { legacyUsers, legacyUserSessions, legacyVerificationCodes } from '../schema/index.js';
import { i as AuthService, U as User, a as UserSession, d as SessionValidation } from '../../../index-DNKZ7-R_.js';
import 'drizzle-orm';
import 'drizzle-orm/pg-core';

interface LegacyAuthDbConfig {
    db: any;
    tables?: {
        users?: typeof legacyUsers;
        userSessions?: typeof legacyUserSessions;
        verificationCodes?: typeof legacyVerificationCodes;
    };
    saltRounds?: number;
    sessionDurationMs?: number;
}
/**
 * 认证数据库服务类（Legacy：手机号 + Cookie 会话）
 */
declare class LegacyAuthDbService implements AuthService {
    private db;
    private tables;
    private saltRounds;
    private sessionDurationMs;
    constructor(config: LegacyAuthDbConfig);
    verifyPassword(phone: string, password: string): Promise<User | null>;
    createUser(phone: string, password: string, name?: string): Promise<User>;
    updateLastLogin(userId: number): Promise<void>;
    createSession(userId: number): Promise<UserSession>;
    validateSession(sessionToken: string): Promise<SessionValidation>;
    deleteSession(sessionToken: string): Promise<void>;
    deleteUserSessions(userId: number): Promise<void>;
    cleanupExpiredSessions(): Promise<void>;
    getUserByPhone(phone: string): Promise<User | null>;
    sendVerificationCode(phone: string): Promise<string>;
    verifyCode(phone: string, code: string): Promise<boolean>;
    resetPassword(phone: string, newPassword: string): Promise<void>;
    cleanupExpiredVerificationCodes(): Promise<void>;
}

export { type LegacyAuthDbConfig, LegacyAuthDbService };
