@datocms/cma-client-node
Version:
NodeJS client for DatoCMS REST Content Management API
13 lines (12 loc) • 518 B
TypeScript
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 {};