import { EScreenView, RCloneActions } from "../../constants"; export interface IStorjWidgetContext { currentScreen: EScreenView; setCurrentScreen: (currentScreen: EScreenView) => void; selectedAction: RCloneActions | undefined; setSelectedAction: (selectedAction: RCloneActions) => void; setPreviousScreen: () => void; } export interface IStorjWidgetProvider { children: React.ReactNode; } export interface IRCloneFile { IsBucket: boolean; IsDir: boolean; MimeType: string; ModTime: string; Name: string; Path: string; Size: number; } export interface IStoredJob { jobId: number; sourcePath: string; destinationPath: string; } export interface IRCloneStats { // total transferred bytes since the start of the group bytes: number; // number of files checked checks: number; // number of files deleted deletes: number; // time in floating point seconds since rclone was started elapsedTime: number; // number of errors errors: number; // estimated time in seconds until the group complete eta: number; // whether there has been at least one fatal error fatalError: boolean; // last error string lastError: string; // number of files renamed renames: number; // showing whether there has been at least one non-NoRetryError retryError: boolean; // average speed in bytes/sec since start of the group speed: number; // total number of bytes in the group totalBytes: number; // total number of checks in the group totalChecks: number; // total number of transfers in the group totalTransfers: number; // total time spent on running jobs transferTime: number; // number of transferred files transfers: number; // an array of currently active file transfers transferring: ITransferringStats[]; // an array of names of currently active file checks checking: string[]; } export interface ITransferringStats { // total transferred bytes for this filenumber bytes: number; // estimated time in seconds until file transfer completion eta: number; // name of the filenumber name: string; // progress of the file transfer in percentnumber percentage: number; // average speed over the whole transfer in bytes/secnumber speed: number; // current speed in bytes/sec as an exponentially weighted moving averagenumber speedAvg: number; // size of the file in bytes size: number; } export interface IJobStatus { // time in seconds that the job ran for; duration: number; // time the job finished (e.g. "2018-10-26T18:50:20.528746884+01:00") endTime: string; // error from the job or empty string for no error error: string; // whether the job has finished or not finished: boolean; // job id id: number; // time the job started (e.g. "2018-10-26T18:50:20.528336039+01:00") startTime: string; // true for success false otherwise success: boolean; // output of the job as would have been returned if called synchronously output: string; // output of the progress related to the underlying job progress: string; }