/**
 * @module @arcis/node/middleware/rate-limit-sliding
 * Sliding window rate limiting middleware.
 *
 * More accurate than fixed window — uses a weighted sum of the previous
 * and current window to approximate a true sliding window.
 *
 * Algorithm:
 *   weight = (windowMs - elapsed) / windowMs
 *   count = (prevWindow * weight) + currentWindow
 *   allow = count < limit
 *
 * @example
 * app.use(createSlidingWindowLimiter({ max: 100, window: '15m' }));
 */
import type { Request, RequestHandler } from 'express';
export interface SlidingWindowOptions {
    /** Maximum requests per window. Default: 100 */
    max?: number;
    /** Window size in ms or duration string. Default: '1m' */
    window?: string | number;
    /** Error message when limit exceeded */
    message?: string;
    /** HTTP status code for rate limited responses. Default: 429 */
    statusCode?: number;
    /** Function to generate rate limit key from request */
    keyGenerator?: (req: Request) => string;
    /** Function to skip rate limiting for certain requests */
    skip?: (req: Request) => boolean;
}
export interface SlidingWindowMiddleware extends RequestHandler {
    close: () => void;
}
/**
 * Create sliding window rate limiter middleware.
 *
 * @example
 * // 100 requests per 15 minutes
 * app.use(createSlidingWindowLimiter({ max: 100, window: '15m' }));
 *
 * @example
 * // Strict API limit
 * app.use('/api', createSlidingWindowLimiter({ max: 30, window: '1m' }));
 */
export declare function createSlidingWindowLimiter(options?: SlidingWindowOptions): SlidingWindowMiddleware;
//# sourceMappingURL=rate-limit-sliding.d.ts.map