/**
 * Persistence Layer Types
 *
 * Types for SQLite-backed persistence of findings, scans, and trends.
 *
 * @module persistence/types
 */
import type { Severity } from "../certification/types.js";
import type { ScannerType } from "../scanners/types.js";
export interface Project {
    id: string;
    path: string;
    name: string;
    createdAt: string;
    lastScanAt?: string;
    metadata?: Record<string, unknown>;
}
export interface PersistedFinding {
    id: string;
    projectId: string;
    certificationId?: string;
    severity: Severity;
    category: string;
    file: string;
    line: number;
    column?: number;
    description: string;
    scannerSource: ScannerType | "agent" | "detection";
    ruleId?: string;
    status: FindingStatus;
    confidence: number;
    cweIds?: string[];
    firstSeenAt: string;
    lastSeenAt: string;
    fixedAt?: string;
    fixedBy?: string;
    falsePositive?: boolean;
    falsePositiveReason?: string;
    metadata?: Record<string, unknown>;
}
export type FindingStatus = "open" | "fixed" | "wontfix" | "false_positive" | "in_progress";
export interface Scan {
    id: string;
    projectId: string;
    certificationId?: string;
    startedAt: string;
    completedAt?: string;
    status: ScanStatus;
    totalFindings: number;
    newFindings: number;
    fixedFindings: number;
    bySeverity: Record<Severity, number>;
    byScanner: Record<string, number>;
    duration?: number;
    error?: string;
    metadata?: Record<string, unknown>;
}
export type ScanStatus = "running" | "completed" | "failed" | "cancelled";
export interface TrendPeriod {
    projectId: string;
    period: "day" | "week" | "month";
    periodStart: string;
    periodEnd: string;
    findingsNew: number;
    findingsFixed: number;
    findingsOpen: number;
    mttrHours?: number;
    bySeverity: Record<Severity, number>;
}
export interface ProjectStats {
    projectId: string;
    totalFindings: number;
    openFindings: number;
    fixedFindings: number;
    falsePositives: number;
    bySeverity: Record<Severity, number>;
    byCategory: Record<string, number>;
    byScanner: Record<string, number>;
    avgMttrHours?: number;
    fixVelocityPerWeek?: number;
    lastScanAt?: string;
    firstScanAt?: string;
}
export interface TrendData {
    period: string;
    periodStart: string;
    newFindings: number;
    fixedFindings: number;
    openFindings: number;
    mttrHours?: number;
}
export interface PersistenceConfig {
    dbPath: string;
    enableWAL?: boolean;
    maxConnections?: number;
    busyTimeout?: number;
}
export declare const DEFAULT_PERSISTENCE_CONFIG: PersistenceConfig;
export interface Migration {
    version: number;
    name: string;
    up: string;
    down: string;
}
//# sourceMappingURL=types.d.ts.map