Merge pull request 'fix: tasks.ts 类型定义对齐后端 schema(P2 修复)' (#111) from fix/tasks-response-type-alignment into develop
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled

This commit was merged in pull request #111.
This commit is contained in:
2026-06-29 17:44:52 +08:00
+16 -4
View File
@@ -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 函数 ──────────── */