import type { DatabaseStore } from '../../store/database-store.js'; import type { DatabaseAccount, DatabaseUser } from '../../types/index.js'; export interface UserAccountPair { user: DatabaseUser; account: DatabaseAccount; } /** * Resolves user and account together with smart fallback logic for account selection. * Priority for account selection: * 1. Preferred login method (parameter) * 2. user.lastLoginMethod * 3. user.firstLoginMethod * 4. Fallback to getAccountByUserId() (latest account) */ export declare class UserAccountResolver { private readonly store; private readonly logger; constructor(store: DatabaseStore); /** * Resolves user and account by user ID. * Returns null if user not found or no account exists. */ resolveByUserId(userId: string, preferredLoginMethod?: string): Promise; /** * Resolves user and account by email. * Returns null if user not found or no account exists. */ resolveByEmail(email: string, preferredLoginMethod?: string): Promise; /** * Resolves the best account for a user with priority: * 1. preferredLoginMethod parameter * 2. user.lastLoginMethod from DB * 3. user.firstLoginMethod from DB * 4. Fallback to getAccountByUserId() (latest account) * * Falls back to the latest account if the preferred provider is unavailable. */ private resolveAccountForUser; } //# sourceMappingURL=user-account-resolver.d.ts.map