/**
 * Persistence Layer
 *
 * SQLite-backed persistence for findings, scans, and trends.
 * Falls back to JSON file storage when SQLite is unavailable.
 * Provides historical data and enterprise dashboards.
 *
 * @module persistence
 */
import { ProjectsRepository } from "./repositories/projects.js";
import { FindingsRepository, type FindingFilter } from "./repositories/findings.js";
import { ScansRepository } from "./repositories/scans.js";
import { TrendsRepository, type TrendPeriodType } from "./repositories/trends.js";
import { JsonFallbackStorage } from "./json-fallback.js";
import type { PersistenceConfig, Project, PersistedFinding, ProjectStats, TrendData } from "./types.js";
export * from "./types.js";
export { FindingFilter } from "./repositories/findings.js";
export { TrendPeriodType } from "./repositories/trends.js";
export { isInFallbackMode, getDbStatus, DatabaseInitError } from "./db.js";
export declare class PersistenceManager {
    private db;
    private fallback;
    readonly projects: ProjectsRepository | null;
    readonly findings: FindingsRepository | null;
    readonly scans: ScansRepository | null;
    readonly trends: TrendsRepository | null;
    readonly isFallbackMode: boolean;
    private constructor();
    static create(projectPath: string, config?: Partial<PersistenceConfig>): Promise<PersistenceManager>;
    static createInMemory(): PersistenceManager;
    getFallback(): JsonFallbackStorage | null;
    close(): void;
    saveIfFallback(): Promise<void>;
    getDbPath(): string;
    transaction<T>(fn: () => T): T;
}
export declare function initPersistence(projectPath: string, config?: Partial<PersistenceConfig>): Promise<PersistenceManager>;
export declare function getPersistence(): PersistenceManager | null;
export declare function closePersistence(): void;
export declare function recordScanResults(projectPath: string, findings: Array<{
    severity: string;
    category: string;
    file: string;
    line: number;
    column?: number;
    description: string;
    scannerSource: string;
    ruleId?: string;
    confidence?: number;
    cweIds?: string[];
}>, certificationId?: string): Promise<{
    scanId: string;
    projectId: string;
    newFindings: number;
    existingFindings: number;
    totalFindings: number;
    fallbackMode?: boolean;
}>;
export declare function getProjectTrends(projectPath: string, period?: TrendPeriodType, lookbackPeriods?: number): Promise<{
    project: Project;
    stats: ProjectStats;
    trends: TrendData[];
    mttr: {
        period: string;
        mttrHours: number;
    }[];
    fixVelocity: {
        period: string;
        fixesCount: number;
    }[];
    fallbackMode?: boolean;
}>;
export declare function markFindingsFixed(projectPath: string, findingIds: string[], fixedBy?: string): Promise<number>;
export declare function getOpenFindings(projectPath: string, filter?: Partial<FindingFilter>): Promise<PersistedFinding[]>;
//# sourceMappingURL=index.d.ts.map