task-10: types/task.ts 共享类型(TaskStatus/ResultFilePhase/PageResult/TaskProgressBatchVo)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/** 任务状态联合类型(与 Java 后端 status 字段对应) */
|
||||
export type TaskStatus =
|
||||
| 'PENDING'
|
||||
| 'RUNNING'
|
||||
| 'SUCCESS'
|
||||
| 'FAILED'
|
||||
| 'CANCELLED'
|
||||
|
||||
/** 结果文件阶段字段:旧 Java 版本可能缺失,全部可选 */
|
||||
export interface ResultFilePhase {
|
||||
/** 文件是否就绪可下载 */
|
||||
fileReady?: boolean
|
||||
/** 文件级状态 */
|
||||
fileStatus?: string
|
||||
/** 文件处理进度 0-100 */
|
||||
fileProgress?: number
|
||||
/** 进度文案 */
|
||||
fileProgressLabel?: string
|
||||
/** 进度阶段标记 */
|
||||
fileProgressStage?: string
|
||||
/** 新鲜下载链接(优先于 downloadUrl) */
|
||||
freshDownloadUrl?: string | null
|
||||
}
|
||||
|
||||
/** 分页结果 */
|
||||
export interface PageResult<T> {
|
||||
items: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
}
|
||||
|
||||
/** 进度批量查询响应 */
|
||||
export interface TaskProgressBatchVo<T = { taskId: number; status: string }> {
|
||||
items: T[]
|
||||
missingTaskIds: number[]
|
||||
}
|
||||
Reference in New Issue
Block a user