declare const DEFAULT_USER_AGENT = "rolebox-web-tool/1.0 (Bun; +https://github.com/EricMoin/rolebox)"; declare const BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"; export declare class TokenBucket { private tokens; private lastRefill; private readonly maxTokens; private readonly refillRatePerMs; constructor(ratePerMinute: number); acquire(): Promise; private refill; } export declare function fetchWithTimeout(url: string, options?: RequestInit, timeoutMs?: number): Promise; export declare function fetchWithRetry(url: string, options?: RequestInit, maxRetries?: number, baseDelayMs?: number): Promise; /** * Fetch a URL with Cloudflare bot-detection retry. * * First attempt uses browser-like headers. If the response is HTTP 403 * with Cloudflare challenge indicators (cf-mitigated header or challenge page), * retries once with a simplified User-Agent. */ export declare function fetchWithCloudflareRetry(url: string, options?: RequestInit, timeoutMs?: number): Promise; export { DEFAULT_USER_AGENT, BROWSER_USER_AGENT }; //# sourceMappingURL=http-utils.d.ts.map