UNPKG

@datocms/cma-client-node

Version:
13 lines (12 loc) 518 B
import { type CancelablePromise, type request } from '@datocms/rest-client-utils'; import type { OnProgressInfo } from './uploadLocalFileAndReturnPath'; type Options = { onProgress?: (info: OnProgressInfo) => void; fetchFn?: Parameters<typeof request>[0]['fetchFn']; }; export type DownloadResult = { filePath: string; deleteFile: () => Promise<void>; }; export declare function downloadFile(url: string, { onProgress, fetchFn: customFetchFn }?: Options): CancelablePromise<DownloadResult>; export {};