/** * Time-windowed event deduplication utility. * Suppresses repeated identical events within a configurable window. * Used by SecurityMonitor and SecurityTelemetry to prevent log flooding. * * @example * ```ts * const dedup = new EventDeduplicator(60_000, 500); * * if (!dedup.shouldSuppress('injection\0/api/query\0SQL detected')) { * logger.warn('New security event'); * } * // Same key within 60s → suppressed * dedup.shouldSuppress('injection\0/api/query\0SQL detected'); // true * * // Check how much noise was filtered * const stats = dedup.getStats(); * // { suppressedCount: 1, processedCount: 1, cacheSize: 1 } * ``` */ export declare class EventDeduplicator { private readonly windowMs; private readonly maxSize; private readonly recentKeys; private _suppressedCount; private _processedCount; constructor(windowMs?: number, maxSize?: number); /** * Returns true if this key should be suppressed (duplicate within window). * Returns false if this is a new event that should be processed. */ shouldSuppress(key: string): boolean; /** Clear all tracked keys and counters */ clear(): void; get size(): number; /** Returns deduplication statistics for metrics and observability */ getStats(): { suppressedCount: number; processedCount: number; cacheSize: number; }; private cleanup; } //# sourceMappingURL=EventDeduplicator.d.ts.map