import { EventEmitter } from 'events'; import { AuditLog, CNDConfig, AuthenticationContext } from '../types.js'; export declare class AuditLogger extends EventEmitter { private config; private auditLogs; private maxMemoryLogs; constructor(config: CNDConfig['security']); /** * Log an audit event */ log(operation: string, resource: string, context: AuthenticationContext, details?: Record, result?: 'success' | 'failure' | 'partial', duration?: number): Promise; /** * Log database operation */ logDatabaseOperation(operation: 'CREATE' | 'READ' | 'UPDATE' | 'DELETE', table: string, recordId: string | number, context: AuthenticationContext, changes?: Record, duration?: number): Promise; /** * Log API operation */ logAPIOperation(method: string, endpoint: string, context: AuthenticationContext, requestBody?: any, responseStatus?: number, duration?: number): Promise; /** * Log authentication event */ logAuthentication(event: 'LOGIN' | 'LOGOUT' | 'TOKEN_REFRESH' | 'ACCESS_DENIED', userId: string, details?: Record, result?: 'success' | 'failure'): Promise; /** * Get audit logs for a user */ getUserAuditLogs(userId: string, startDate?: Date, endDate?: Date, limit?: number): Promise; /** * Get audit logs for a resource */ getResourceAuditLogs(resource: string, startDate?: Date, endDate?: Date, limit?: number): Promise; /** * Get audit statistics */ getAuditStats(startDate?: Date, endDate?: Date): Promise<{ totalEvents: number; uniqueUsers: number; operations: Record; results: Record; avgDuration: number; }>; /** * Cleanup old audit logs */ cleanupOldLogs(): Promise; private storeAuditLog; private generateLogId; private sanitizeRequestBody; } //# sourceMappingURL=audit-logger.d.ts.map