/**
 * Rate Limiting Middleware
 * Implements token bucket algorithm for API rate limiting
 */
export interface RateLimitConfig {
    requestsPerMinute: number;
    windowMs: number;
    skipSuccessfulRequests?: boolean;
    skipFailedRequests?: boolean;
}
export interface RateLimitInfo {
    limit: number;
    remaining: number;
    reset: number;
    retryAfter?: number;
}
/**
 * Simple in-memory rate limiter using token bucket algorithm
 */
export declare class RateLimiter {
    private buckets;
    private config;
    constructor(config?: Partial<RateLimitConfig>);
    /**
     * Check if a request should be allowed
     */
    checkLimit(key: string): RateLimitInfo;
    /**
     * Consume a token for a request
     */
    consume(key: string): Promise<boolean>;
    /**
     * Get rate limit info without consuming a token
     */
    getInfo(key: string): RateLimitInfo;
    /**
     * Reset rate limit for a key
     */
    reset(key: string): void;
    /**
     * Cleanup old buckets
     */
    private cleanup;
    /**
     * Get current bucket count (for monitoring)
     */
    getBucketCount(): number;
}
/**
 * Create rate limit headers for HTTP response
 */
export declare function createRateLimitHeaders(info: RateLimitInfo): Record<string, string>;
/**
 * Default rate limiter instance
 */
export declare const defaultRateLimiter: RateLimiter;
//# sourceMappingURL=rate-limiter.d.ts.map