feat: 前端读取统一制作阶段状态

This commit is contained in:
GouJ committed 2026-09-26 21:14:56 +08:00
1 parent f0cc30422d
commit dd30d5abe7
1 file changed
+3 -1
+3 -1
View File
@@ -1,13 +1,15 @@
import { request, optionalResource } from '../../lib/http'
import type { Checkpoint } from '../workflows/types'
import type { WorkflowExecutionStart } from '../workflows/execution.types'
import type { CreateProjectInput, DramaState, Project, ProjectDetail, UpdateProjectInput } from './types'
import type { CreateProjectInput, DramaState, Project, ProjectDetail, ProjectStageReadiness, UpdateProjectInput } from './types'
/** 项目与 Create Drama API;路径严格对应后端 dev。 */
export const projectsApi = {
list: (signal?: AbortSignal) => request<Project[]>('/projects', { signal }),
detail: (id: string, signal?: AbortSignal) =>
request<ProjectDetail>(`/projects/${encodeURIComponent(id)}`, { signal }),
stageReadiness: (id: string, signal?: AbortSignal) =>
request<ProjectStageReadiness>(`/projects/${encodeURIComponent(id)}/stage-readiness`, { signal }),
create: (input: CreateProjectInput) =>
request<{ projectId: string; status: string; executionId: string }>('/projects', { method: 'POST', body: input }),
update: (id: string, input: UpdateProjectInput) =>