diff --git a/src/features/projects/api.ts b/src/features/projects/api.ts index d84d1c4..aa95364 100644 --- a/src/features/projects/api.ts +++ b/src/features/projects/api.ts @@ -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('/projects', { signal }), detail: (id: string, signal?: AbortSignal) => request(`/projects/${encodeURIComponent(id)}`, { signal }), + stageReadiness: (id: string, signal?: AbortSignal) => + request(`/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) =>