import type { IUserRepository } from '../../application/ports/outbound/IUserRepository.js'; import { User } from '../../domain/entities/User.js'; import { UserId } from '../../domain/value-objects/UserId.js'; import { Username } from '../../domain/value-objects/Username.js'; /** * SqliteUserRepository * Implements IUserRepository using SQLite database storage with better-sqlite3 */ export declare class SqliteUserRepository implements IUserRepository { private static readonly SALT_ROUNDS; private readonly db; /** * Create a new SqliteUserRepository * @param dbPath - Path to the SQLite database file */ constructor(dbPath: string); /** * Run database migrations * Creates tables and indexes if they don't exist */ private migrate; /** * Find a user by their unique ID */ findById(id: UserId): Promise; /** * Find a user by their username (case-insensitive) */ findByUsername(username: Username): Promise; /** * Get all users in the system */ findAll(): Promise; /** * Save a user (create or update) * Uses INSERT OR REPLACE for upsert behavior */ save(user: User): Promise; /** * Delete a user by their ID */ delete(id: UserId): Promise; /** * Get the total count of users */ count(): Promise; /** * Hash a password using bcrypt * @param password - Plain text password to hash * @returns Hashed password */ hashPassword(password: string): Promise; /** * Verify a password against a hash * @param password - Plain text password to verify * @param hash - Password hash to verify against * @returns True if password matches, false otherwise */ verifyPassword(password: string, hash: string): Promise; /** * Close the database connection * Should be called when the repository is no longer needed */ close(): void; /** * Convert a database row to a User entity */ private toUser; } //# sourceMappingURL=SqliteUserRepository.d.ts.map