UNPKG

ipull

Version:

The only file downloader you'll ever need. For node.js and the browser, CLI and library for fast and reliable file downloads.

52 lines (51 loc) 1.72 kB
export type ProgressStatus = { downloadId: string; totalBytes: number; totalDownloadParts: number; fileName: string; comment?: string; downloadPart: number; transferredBytes: number; startTime: number; endTime: number; transferAction: string; downloadStatus: DownloadStatus; downloadFlags: DownloadFlags[]; retrying: boolean; retryingTotalAttempts: number; streamsNotResponding: number; }; export declare enum DownloadStatus { Loading = "Loading", Active = "Active", Paused = "Paused", NotStarted = "NotStarted", Finished = "Finished", Cancelled = "Cancelled", Error = "Error" } export declare enum DownloadFlags { Existing = "Existing", DownloadSequence = "DownloadSequence" } export default class ProgressStatusFile { readonly totalDownloadParts: number; readonly fileName: string; readonly comment?: string; readonly downloadPart: number; readonly transferredBytes: number; readonly transferAction: string; downloadStatus: DownloadStatus; downloadFlags: DownloadFlags[]; totalBytes: number; startTime: number; endTime: number; downloadId: string; retrying: boolean; retryingTotalAttempts: number; streamsNotResponding: number; constructor(totalDownloadParts: number, fileName: string, transferAction?: string, downloadFlags?: DownloadFlags[], comment?: string, downloadPart?: number, transferredBytes?: number, downloadStatus?: DownloadStatus); started(): void; finished(): void; createStatus(downloadPart: number, transferredBytes: number, totalBytes?: number, downloadStatus?: DownloadStatus, comment?: string | undefined): ProgressStatusFile; }