mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-28 23:15:50 +00:00
47 lines
912 B
TypeScript
47 lines
912 B
TypeScript
export type BackgroundTaskSourcePage =
|
|
| 'export'
|
|
| 'chat'
|
|
| 'analytics'
|
|
| 'sns'
|
|
| 'groupAnalytics'
|
|
| 'annualReport'
|
|
| 'other'
|
|
|
|
export type BackgroundTaskStatus =
|
|
| 'running'
|
|
| 'cancel_requested'
|
|
| 'completed'
|
|
| 'failed'
|
|
| 'canceled'
|
|
|
|
export interface BackgroundTaskRecord {
|
|
id: string
|
|
sourcePage: BackgroundTaskSourcePage
|
|
title: string
|
|
detail?: string
|
|
progressText?: string
|
|
cancelable: boolean
|
|
cancelRequested: boolean
|
|
status: BackgroundTaskStatus
|
|
startedAt: number
|
|
updatedAt: number
|
|
finishedAt?: number
|
|
}
|
|
|
|
export interface BackgroundTaskInput {
|
|
sourcePage: BackgroundTaskSourcePage
|
|
title: string
|
|
detail?: string
|
|
progressText?: string
|
|
cancelable?: boolean
|
|
onCancel?: () => void | Promise<void>
|
|
}
|
|
|
|
export interface BackgroundTaskUpdate {
|
|
title?: string
|
|
detail?: string
|
|
progressText?: string
|
|
status?: BackgroundTaskStatus
|
|
cancelable?: boolean
|
|
}
|