export interface ConcurrencyConfig { readonly maxConcurrency: number; readonly rateLimit?: { readonly maxRequestsPerMinute?: number; readonly maxRequestsPerHour?: number; }; } export declare class ConcurrencyManager { private readonly maxConcurrency; private readonly rateLimit?; private activeCount; private queue; private requestTimestamps; private readonly MAX_TIMESTAMP_AGE; constructor(config: ConcurrencyConfig); /** * Execute a task with concurrency control and rate limiting */ run(task: () => Promise): Promise; /** * Wait for an available concurrency slot */ private waitForSlot; /** * Check and enforce rate limits */ private checkRateLimit; /** * Process the next item in the queue * Checks capacity again after dequeuing to avoid race conditions */ private processQueue; /** * Sleep for specified milliseconds */ private sleep; /** * Cleanup old timestamps to prevent memory leak * Removes timestamps older than MAX_TIMESTAMP_AGE */ private cleanupOldTimestamps; /** * Get current active count */ getActiveCount(): number; /** * Get queue length */ getQueueLength(): number; } //# sourceMappingURL=concurrency-manager.d.ts.map