import type { ID, Timestamp } from '../../common/types.js';
import type { EvidenceCollection, CollectedAuditEvent, CollectedPolicyChange, CollectedAccessDecision, CollectedTrustScoreChange, CollectedEscalationDecision, CollectedDataRetentionLog } from './evidence-collector.js';
import type { TamperEvidentPackage } from './hash-verifier.js';
/**
 * Supported export formats
 */
export type ExportFormat = 'json' | 'csv' | 'pdf';
/**
 * Report generation options
 */
export interface ReportGenerationOptions {
    /** Output format */
    format: ExportFormat;
    /** Include tamper-evident hashes */
    includeTamperEvidence: boolean;
    /** Include raw evidence payloads */
    includePayloads: boolean;
    /** Report title */
    title?: string;
    /** Prepared by */
    preparedBy?: string;
    /** Organization name */
    organizationName?: string;
    /** Additional notes */
    notes?: string;
}
/**
 * Report header information
 */
export interface ReportHeader {
    /** Report title */
    title: string;
    /** Report ID */
    reportId: string;
    /** Generation timestamp */
    generatedAt: Timestamp;
    /** Report period */
    period: {
        start: Timestamp;
        end: Timestamp;
    };
    /** Organization */
    organization?: string;
    /** Prepared by */
    preparedBy?: string;
    /** Format */
    format: ExportFormat;
    /** Report version */
    version: string;
}
/**
 * Executive summary
 */
export interface ExecutiveSummary {
    /** Overview paragraph */
    overview: string;
    /** Key statistics */
    statistics: {
        totalEvents: number;
        auditEvents: number;
        policyChanges: number;
        accessDecisions: number;
        trustScoreChanges: number;
        escalations: number;
        dataRetentionOps: number;
    };
    /** Compliance highlights */
    highlights: string[];
    /** Areas of concern */
    concerns: string[];
}
/**
 * Complete compliance evidence report
 */
export interface ComplianceEvidenceReport {
    /** Report header */
    header: ReportHeader;
    /** Executive summary */
    summary: ExecutiveSummary;
    /** Detailed evidence sections */
    sections: {
        auditEvents: ReportSection<CollectedAuditEvent>;
        policyChanges: ReportSection<CollectedPolicyChange>;
        accessDecisions: ReportSection<CollectedAccessDecision>;
        trustScoreChanges: ReportSection<CollectedTrustScoreChange>;
        escalationDecisions: ReportSection<CollectedEscalationDecision>;
        dataRetentionLogs: ReportSection<CollectedDataRetentionLog>;
    };
    /** Tamper evidence (if included) */
    tamperEvidence?: TamperEvidentPackage;
    /** Additional notes */
    notes?: string;
    /** Appendix */
    appendix?: {
        methodology: string;
        definitions: Record<string, string>;
        contactInfo?: string;
    };
}
/**
 * Report section with records and summary
 */
export interface ReportSection<T> {
    /** Section title */
    title: string;
    /** Section description */
    description: string;
    /** Number of records */
    recordCount: number;
    /** Summary statistics for this section */
    statistics: Record<string, number | string>;
    /** The actual records */
    records: T[];
}
/**
 * Export job status
 */
export type ExportJobStatus = 'pending' | 'processing' | 'completed' | 'failed';
/**
 * Export job record
 */
export interface ExportJob {
    /** Job ID (operation ID) */
    operationId: string;
    /** Tenant ID */
    tenantId: ID;
    /** Current status */
    status: ExportJobStatus;
    /** Job creation time */
    createdAt: Timestamp;
    /** Job start time */
    startedAt?: Timestamp;
    /** Job completion time */
    completedAt?: Timestamp;
    /** Export parameters */
    parameters: {
        startDate: string;
        endDate: string;
        eventTypes?: string[];
        includePayloads: boolean;
        format: ExportFormat;
    };
    /** Progress (0-100) */
    progress: number;
    /** Result file path or URL (when completed) */
    resultUrl?: string;
    /** Result file size in bytes */
    resultSize?: number;
    /** Error message (if failed) */
    error?: string;
}
/**
 * Generates compliance evidence reports
 */
export declare class ReportGenerator {
    private readonly version;
    private jobs;
    constructor();
    /**
     * Generate a complete compliance evidence report
     */
    generateReport(collection: EvidenceCollection, tamperEvidence: TamperEvidentPackage | undefined, options: ReportGenerationOptions): Promise<ComplianceEvidenceReport>;
    /**
     * Generate report header
     */
    private generateHeader;
    /**
     * Generate executive summary
     */
    private generateExecutiveSummary;
    /**
     * Generate audit events section
     */
    private generateAuditEventsSection;
    /**
     * Generate policy changes section
     */
    private generatePolicyChangesSection;
    /**
     * Generate access decisions section
     */
    private generateAccessDecisionsSection;
    /**
     * Generate trust score changes section
     */
    private generateTrustScoreChangesSection;
    /**
     * Generate escalation decisions section
     */
    private generateEscalationDecisionsSection;
    /**
     * Generate data retention logs section
     */
    private generateDataRetentionLogsSection;
    /**
     * Generate report appendix
     */
    private generateAppendix;
    /**
     * Format report as JSON
     */
    formatAsJson(report: ComplianceEvidenceReport): string;
    /**
     * Format report as CSV (multiple files in a zip-like structure)
     */
    formatAsCsv(report: ComplianceEvidenceReport): Record<string, string>;
    /**
     * Convert array of objects to CSV
     */
    private objectToCsv;
    /**
     * Format report as PDF-ready HTML
     */
    formatAsPdfHtml(report: ComplianceEvidenceReport): string;
    /**
     * Generate HTML for a report section
     */
    private generateSectionHtml;
    /**
     * Format a cell value for HTML display
     */
    private formatCellValue;
    /**
     * Escape HTML special characters
     */
    private escapeHtml;
    /**
     * Create a new export job
     */
    createJob(tenantId: ID, parameters: ExportJob['parameters']): ExportJob;
    /**
     * Get an export job by ID
     */
    getJob(operationId: string): ExportJob | undefined;
    /**
     * Update job status
     */
    updateJobStatus(operationId: string, updates: Partial<ExportJob>): ExportJob | undefined;
    /**
     * List jobs for a tenant
     */
    listJobs(tenantId: ID): ExportJob[];
    /**
     * Clean up old completed jobs
     */
    cleanupOldJobs(maxAgeMs?: number): number;
}
/**
 * Get the singleton report generator instance
 */
export declare function getReportGenerator(): ReportGenerator;
/**
 * Reset the singleton (for testing)
 */
export declare function resetReportGenerator(): void;
//# sourceMappingURL=report-generator.d.ts.map