import type { ReadStream } from "node:fs"; import type { Readable } from "node:stream"; export interface FetchClient { fetch: typeof fetch; } interface ApiRateLimiterOptions { nbRequests?: number; durationInSeconds?: number; maxQueueSize?: number; timeout?: number; client: FetchClient; env?: string; } export type ApiRateLimiterFn = (callback: (client: FetchClient) => T) => Promise; export declare const apiRateLimiter: (name: string, options: ApiRateLimiterOptions) => ApiRateLimiterFn; export declare function downloadFileAsTmp(stream: Readable, filename: string, env: string): Promise; export declare function readTmpAsStreamAndCleanup(filePath: string): Promise; export declare function cleanupTmp(filePath: string): Promise; export declare function downloadFileAsStream(stream: Readable, filename: string, env: string): Promise; export declare function computeFileHash(stream: Readable): Promise; export {}; //# sourceMappingURL=apiUtils.d.ts.map