import type Database from 'better-sqlite3';
import type { SolutionRecord, SolutionAttempt } from '../../types/solution.types.js';
type CreateSolutionData = Omit<SolutionRecord, 'id' | 'success_count' | 'fail_count' | 'created_at' | 'updated_at'>;
type UpdateSolutionData = Partial<Omit<SolutionRecord, 'id' | 'created_at'>>;
interface AttemptData {
    errorSolutionId: number;
    terminalId?: number | null;
    success: number;
    output?: string | null;
    durationMs?: number | null;
}
export declare class SolutionRepository {
    private db;
    private stmts;
    constructor(db: Database.Database);
    create(data: CreateSolutionData): number;
    getById(id: number): SolutionRecord | undefined;
    update(id: number, data: UpdateSolutionData): void;
    delete(id: number): void;
    findForError(errorId: number): SolutionRecord[];
    linkToError(errorId: number, solutionId: number): void;
    recordAttempt(data: AttemptData): number;
    getAttempts(errorSolutionId: number): SolutionAttempt[];
    getAll(): SolutionRecord[];
    successRate(solutionId: number): number;
}
export {};
