feat: 前端读取统一制作阶段状态
This commit is contained in:
1 parent
f0cc30422d
commit
dd30d5abe7
1 file changed
+3
-1
@@ -1,13 +1,15 @@
|
|||||||
import { request, optionalResource } from '../../lib/http'
|
import { request, optionalResource } from '../../lib/http'
|
||||||
import type { Checkpoint } from '../workflows/types'
|
import type { Checkpoint } from '../workflows/types'
|
||||||
import type { WorkflowExecutionStart } from '../workflows/execution.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。 */
|
/** 项目与 Create Drama API;路径严格对应后端 dev。 */
|
||||||
export const projectsApi = {
|
export const projectsApi = {
|
||||||
list: (signal?: AbortSignal) => request<Project[]>('/projects', { signal }),
|
list: (signal?: AbortSignal) => request<Project[]>('/projects', { signal }),
|
||||||
detail: (id: string, signal?: AbortSignal) =>
|
detail: (id: string, signal?: AbortSignal) =>
|
||||||
request<ProjectDetail>(`/projects/${encodeURIComponent(id)}`, { signal }),
|
request<ProjectDetail>(`/projects/${encodeURIComponent(id)}`, { signal }),
|
||||||
|
stageReadiness: (id: string, signal?: AbortSignal) =>
|
||||||
|
request<ProjectStageReadiness>(`/projects/${encodeURIComponent(id)}/stage-readiness`, { signal }),
|
||||||
create: (input: CreateProjectInput) =>
|
create: (input: CreateProjectInput) =>
|
||||||
request<{ projectId: string; status: string; executionId: string }>('/projects', { method: 'POST', body: input }),
|
request<{ projectId: string; status: string; executionId: string }>('/projects', { method: 'POST', body: input }),
|
||||||
update: (id: string, input: UpdateProjectInput) =>
|
update: (id: string, input: UpdateProjectInput) =>
|
||||||
|
|||||||
Reference in new issue
Block a user