fix: tasks.ts 类型定义对齐后端 schema(P2 修复) #111
@@ -9,10 +9,12 @@ import apiClient from './client';
|
||||
|
||||
/* ──────────── 类型定义 ──────────── */
|
||||
|
||||
/** 任务条目 */
|
||||
/** 任务条目(对应用户级 UserTaskResponse) */
|
||||
export interface TaskItem {
|
||||
id: string;
|
||||
task_type: 'ingest' | 'generation' | string;
|
||||
project_id: string;
|
||||
template_id: string;
|
||||
status: string;
|
||||
progress: number;
|
||||
current_step: string;
|
||||
@@ -32,11 +34,21 @@ export interface CreateGenerationTaskRequest {
|
||||
voice_ids: string[];
|
||||
}
|
||||
|
||||
/** 创建生成任务响应 */
|
||||
/** 创建生成任务响应(对齐后端 GenerationTaskResponse) */
|
||||
export interface CreateGenerationTaskResponse {
|
||||
task_id: string;
|
||||
id: string;
|
||||
project_id: string;
|
||||
asset_library_id: string;
|
||||
strategy_id: string;
|
||||
voice_library_id: string;
|
||||
template_id: string;
|
||||
asset_ids: string[];
|
||||
title_ids: string[];
|
||||
voice_ids: string[];
|
||||
status: string;
|
||||
message: string;
|
||||
progress: number;
|
||||
result_count: number;
|
||||
error_message: string;
|
||||
}
|
||||
|
||||
/* ──────────── API 函数 ──────────── */
|
||||
|
||||
Reference in New Issue
Block a user