/**
 * JSON File Fallback Storage
 *
 * Provides fallback storage when SQLite is unavailable.
 * Uses atomic writes (temp file → rename) for data safety.
 *
 * @module persistence/json-fallback
 */
import type { PersistedFinding, FindingStatus, Project, Scan, ProjectStats } from "./types.js";
import type { Severity } from "../certification/types.js";
import type { FindingFilter } from "./repositories/findings.js";
export interface FallbackData {
    version: number;
    projects: Record<string, Project>;
    findings: Record<string, PersistedFinding>;
    scans: Record<string, Scan>;
    lastUpdated: string;
}
export declare class JsonFallbackStorage {
    private data;
    private filePath;
    private isDirty;
    private constructor();
    static create(projectPath: string): Promise<JsonFallbackStorage>;
    save(): Promise<void>;
    findOrCreateProject(path: string): Project;
    findProjectByPath(path: string): Project | undefined;
    updateProjectLastScan(projectId: string): void;
    createFinding(finding: Omit<PersistedFinding, "id" | "firstSeenAt" | "lastSeenAt">): PersistedFinding;
    upsertFinding(finding: Omit<PersistedFinding, "id" | "firstSeenAt" | "lastSeenAt" | "status">): {
        finding: PersistedFinding;
        isNew: boolean;
    };
    findBySignature(projectId: string, file: string, line: number, category: string, scannerSource: string): PersistedFinding | undefined;
    findById(id: string): PersistedFinding | undefined;
    findFindings(filter: FindingFilter): PersistedFinding[];
    updateFindingStatus(id: string, status: FindingStatus, fixedBy?: string): boolean;
    markFixed(ids: string[], fixedBy?: string): number;
    markFalsePositive(id: string, reason?: string): boolean;
    getStats(projectId: string): ProjectStats;
    createScan(projectId: string, certificationId?: string): Scan;
    completeScan(scanId: string, results: {
        totalFindings: number;
        newFindings: number;
        fixedFindings: number;
        bySeverity: Record<Severity, number>;
        byScanner: Record<string, number>;
        duration: number;
    }): void;
    close(): void;
}
//# sourceMappingURL=json-fallback.d.ts.map