mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-09 03:25:09 +00:00
29 lines
823 B
TypeScript
29 lines
823 B
TypeScript
|
|
/**
|
|
* Represents a user's request to interact with the download system.
|
|
*/
|
|
export interface Download {
|
|
action: 'add' | 'remove' | 'retry'
|
|
md5: string
|
|
// Should be defined if action === 'add'
|
|
chart?: { name: string; artist: string; album: string; genre: string; year: string; charter: string }
|
|
}
|
|
|
|
/**
|
|
* Represents the download progress of a single chart.
|
|
*/
|
|
export interface DownloadProgress {
|
|
md5: string
|
|
chart: { name: string; artist: string; album: string; genre: string; year: string; charter: string }
|
|
header: string
|
|
body: string
|
|
percent: number | null
|
|
type: ProgressType
|
|
/** If `body` contains a filepath that can be clicked */
|
|
isPath: boolean
|
|
/** If the download should not appear in the total download progress */
|
|
stale?: boolean
|
|
}
|
|
|
|
export type ProgressType = 'good' | 'error' | 'done' | 'cancel'
|