import type { IAuditLogPort, AuditLogQueryOptions } from '../../application/ports/outbound/IAuditLogPort.js'; import { AuditLog, type AuditLogData } from '../../domain/entities/AuditLog.js'; import type { AuditActionEnum } from '../../domain/value-objects/AuditAction.js'; /** * SqliteAuditLogRepository * Implements IAuditLogPort using SQLite database storage with better-sqlite3 */ export declare class SqliteAuditLogRepository implements IAuditLogPort { private readonly db; private logCallCount; private lastCleanupTime; private readonly autoCleanupEnabled; private readonly retentionDays; private readonly cleanupCheckInterval; private readonly cleanupTimeThreshold; /** * Create a new SqliteAuditLogRepository * @param dbPath - Path to the SQLite database file */ constructor(dbPath: string); /** * Run database migrations * Creates tables and indexes if they don't exist */ private migrate; /** * Log an audit entry */ log(entry: AuditLogData): Promise; /** * Check if auto-cleanup should run and execute it if needed */ private checkAndRunAutoCleanup; /** * Find all audit logs with optional filtering */ findAll(options?: AuditLogQueryOptions): Promise; /** * Find audit logs by target */ findByTarget(targetType: string, targetName: string): Promise; /** * Find audit logs by action */ findByAction(action: AuditActionEnum): Promise; /** * Find audit logs by actor */ findByActor(actor: string): Promise; /** * Count audit logs with optional filtering */ count(options?: AuditLogQueryOptions): Promise; /** * Delete audit logs older than the specified date * @returns The number of logs deleted */ deleteOlderThan(date: Date): Promise; /** * Close the database connection * Should be called when the repository is no longer needed */ close(): void; } //# sourceMappingURL=SqliteAuditLogRepository.d.ts.map