fix: 支持删除图片异常批次
This commit is contained in:
@@ -694,6 +694,19 @@ export const api = {
|
||||
if (productId) qs.set("product", productId);
|
||||
return request<{ tasks: import("./types").WorkbenchTask[] }>(`/api/ai/tasks/workbench/?${qs.toString()}`);
|
||||
},
|
||||
// 工作台图片批次:全成功时沿用资产垃圾桶;含失败/取消任务时进入“图片异常批次”并支持整批恢复。
|
||||
deleteWorkbenchImageBatch(taskId: string) {
|
||||
return request<{ storage: "asset" | "exception_batch" }>(`/api/ai/tasks/${taskId}/workbench-batch/`, { method: "DELETE" });
|
||||
},
|
||||
imageExceptionBatchesTrash() {
|
||||
return request<{ results: import("./types").ImageExceptionBatchTrash[] }>("/api/ai/tasks/workbench-exception-batches-trash/");
|
||||
},
|
||||
restoreWorkbenchImageBatch(taskId: string) {
|
||||
return request<{ restored_task_count: number }>(`/api/ai/tasks/${taskId}/restore-workbench-batch/`, { method: "POST" });
|
||||
},
|
||||
purgeWorkbenchImageBatch(taskId: string) {
|
||||
return request<void>(`/api/ai/tasks/${taskId}/purge-workbench-batch/`, { method: "DELETE" });
|
||||
},
|
||||
// YYX#row22:未读生成任务汇总(导航胶囊总数 + 按商品分组角标)
|
||||
aiTasksUnread() {
|
||||
return request<{ total: number; by_product: Record<string, number> }>("/api/ai/tasks/unread/");
|
||||
|
||||
Reference in New Issue
Block a user