import { StorageInterface } from "@sentclose/sentc-common"; import { User } from "../User"; import { FileMetaInformation, PartListItem } from "../Enities"; export declare class Downloader { private base_url; private app_token; private user; private group_id?; private readonly group_as_member?; private static init_storage; private static is_init; private static storage; private static mutex; static cancel_download: boolean; static getStorage(): Promise; static reset(): Promise; static init(): void; constructor(base_url: string, app_token: string, user: User, group_id?: string, group_as_member?: string); /** * Get the file info and the first page of the file part list * * @param file_id */ downloadFileMetaInformation(file_id: string): Promise; /** * Download the rest of the part list via pagination * * @param file_id * @param last_item */ downloadFilePartList(file_id: string, last_item?: PartListItem | null): Promise; downloadFileParts(part_list: PartListItem[], content_key: string): Promise; downloadFileParts(part_list: PartListItem[], content_key: string, updateProgressCb: (progress: number) => void): Promise; downloadFileParts(part_list: PartListItem[], content_key: string, updateProgressCb: (progress: number) => void | undefined, verify_key: string): Promise; }