/** * Copyright 2025 Chris Bunting * * Rate Limiter - Token bucket algorithm for API rate limiting */ declare class RateLimiter { private buckets; private readonly capacity; private readonly refillRate; constructor(capacity: number, tokensPerHour: number); /** * Try to consume a token from the bucket * @returns true if token was consumed, false if rate limit exceeded */ tryConsume(key?: string): boolean; /** * Wait until a token is available */ waitForToken(key?: string, maxWait?: number): Promise; /** * Get remaining tokens */ getRemainingTokens(key?: string): number; /** * Reset bucket for a key */ reset(key?: string): void; } export declare const rateLimiter: RateLimiter; export {}; //# sourceMappingURL=rateLimiter.d.ts.map