/**
 * A generic sliding-window rate limiter.
 *
 * Allows at most `maxAttempts` registrations inside a rolling `windowMs`.
 * Attempts spaced further apart than `windowMs` are always allowed.
 */
export declare class SlidingWindowRateLimiter {
    private maxAttempts;
    private windowMs;
    private timestamps;
    constructor(maxAttempts: number, windowMs: number);
    /**
     * Attempts to register a new event at `now`. Returns `true` if the attempt
     * fits inside the budget (and records it), or `false` if the budget is
     * exhausted (in which case no timestamp is recorded).
     */
    tryRegister: (now?: number) => boolean;
    /**
     * Clears the attempt history.
     */
    reset: () => void;
    /**
     * Updates the budget and window size. Existing timestamps are kept; they
     * will be pruned by the next `tryRegister` call.
     */
    setLimits: (maxAttempts: number, windowMs: number) => void;
    private prune;
}
