/** * Report Generator * * Generates compliance reports for auditors. * Supports multiple formats: JSON, CSV, PDF-ready HTML. * * Added by Pantheon Security for enterprise compliance support. */ /** * Report types */ export type ReportType = "compliance_summary" | "gdpr_audit" | "soc2_audit" | "cssf_audit" | "security_audit" | "incident_report" | "dsar_report" | "retention_report" | "change_management" | "full_audit"; /** * Report format */ export type ReportFormat = "json" | "csv" | "html"; /** * Report metadata */ interface ReportMetadata { report_id: string; report_type: ReportType; format: ReportFormat; generated_at: string; generated_by: string; period: { from: string; to: string; }; checksum: string; } /** * Generated report */ export interface GeneratedReport { metadata: ReportMetadata; content: string; file_path?: string; } /** * Report options */ export interface ReportOptions { from?: Date; to?: Date; format?: ReportFormat; includeRawData?: boolean; saveToDisk?: boolean; outputDir?: string; } /** * Report Generator class */ export declare class ReportGenerator { private static instance; private reportsDir; private constructor(); /** * Get singleton instance */ static getInstance(): ReportGenerator; /** * Generate a report */ generateReport(reportType: ReportType, options?: ReportOptions): Promise; /** * Generate compliance summary report */ private generateComplianceSummary; /** * Generate GDPR audit report */ private generateGDPRAudit; /** * Generate SOC2 audit report */ private generateSOC2Audit; /** * Generate CSSF audit report */ private generateCSSFAudit; /** * Generate security audit report */ private generateSecurityAudit; /** * Generate incident report */ private generateIncidentReport; /** * Generate DSAR report */ private generateDSARReport; /** * Generate retention report */ private generateRetentionReport; /** * Generate change management report */ private generateChangeManagementReport; /** * Generate full audit report */ private generateFullAudit; /** * Generate recommendations based on dashboard data */ private generateRecommendations; /** * Format output based on format type */ private formatOutput; /** * Convert to CSV format (flattened) */ private toCSV; /** * Quote a CSV cell and neutralize formula injection. * If the value begins with =, +, -, @, tab, or CR it is prefixed with a * single quote so spreadsheet apps (Excel/Sheets) treat it as text rather * than a formula. Embedded double-quotes are doubled per RFC 4180. */ private csvSafeCell; /** * Flatten nested object */ private flattenObject; /** * Convert to HTML format */ private toHTML; /** * Convert object to HTML recursively */ private objectToHTML; /** * Convert array to HTML table */ private arrayToTable; /** * Get CSS class for status values */ private getStatusClass; /** * Escape HTML special characters */ private escapeHTML; /** * List available reports */ listGeneratedReports(): Array<{ file: string; type: string; generated: string; }>; } /** * Get the report generator instance */ export declare function getReportGenerator(): ReportGenerator; /** * Generate a compliance report */ export declare function generateReport(reportType: ReportType, options?: ReportOptions): Promise; /** * Generate and save a report */ export declare function generateAndSaveReport(reportType: ReportType, options?: Omit): Promise; /** * List generated reports */ export declare function listReports(): ReturnType; export {};