/** * Rate-limited HTTP fetcher for USPTO APIs. * * Multiple token buckets for different API tiers: * - ODP (Open Data Portal): 10 req/sec (conservative default) * - PatentsView: 45 req/min (~0.75/sec) * - TSDR/PTAB: 60 req/min (~1/sec) */ export type ApiType = "odp" | "patentsview" | "tsdr"; export interface FetchOptions { apiType?: ApiType; apiKey?: string | null; apiKeyHeader?: string; } /** * Fetch a URL from USPTO APIs with rate limiting and optional API key. */ export declare function usptoFetch(url: string, opts?: FetchOptions): Promise; /** * Fetch and return JSON, throwing on HTTP errors. */ export declare function usptoFetchJson(url: string, opts?: FetchOptions): Promise; export interface PostJsonOptions extends FetchOptions { /** JSON-serializable body to send as POST */ body: unknown; } /** * POST JSON to a USPTO API endpoint with rate limiting and optional API key. * Returns parsed JSON, throwing on HTTP errors. */ export declare function usptoPostJson(url: string, opts: PostJsonOptions): Promise; //# sourceMappingURL=fetcher.d.ts.map