import type { DcRouter } from '../classes.dcrouter.js'; import type { IAuthenticationEvent, TAuthenticationFailureReason, TAuthenticationSource, TResolvedAuthenticationSource } from '../../dist_ts_interfaces/data/stats.js'; export interface IAuthenticationWindowStats { windowStart: number; successes: number; failures: number; events: IAuthenticationEvent[]; } export declare class AuthenticationEventManager { private dcRouterRef; private pendingEvents; private recentEvents; private flushInFlight?; private pruneInFlight?; private windowStatsInFlight; constructor(dcRouterRef: DcRouter); private canPersist; private rememberEvent; private flushBufferedUnlocked; recordAttempt(optionsArg: { username: string; userId?: string; success: boolean; requestedAuthSource: TAuthenticationSource; resolvedAuthSource?: TResolvedAuthenticationSource; failureReason?: TAuthenticationFailureReason; }): Promise; flushBuffered(): Promise; pruneBefore(cutoffArg: number): Promise; private getInMemoryWindow; private getWindowStatsUnlocked; getWindowStats(windowMsArg?: number, limitArg?: number): Promise; /** Test-only reset for the DcRouter-owned in-process buffers. */ resetForTests(): Promise; }