feat: 接入项目删除就绪状态
This commit is contained in:
1 parent
aca4a4754c
commit
2bc67e971a
1 file changed
+7
@@ -11,6 +11,13 @@ export const projectsApi = {
|
|||||||
request<{ projectId: string; status: string }>('/projects', { method: 'POST', body: input }),
|
request<{ projectId: string; status: string }>('/projects', { method: 'POST', body: input }),
|
||||||
update: (id: string, input: UpdateProjectInput) =>
|
update: (id: string, input: UpdateProjectInput) =>
|
||||||
request<Project>(`/projects/${encodeURIComponent(id)}`, { method: 'PUT', body: input }),
|
request<Project>(`/projects/${encodeURIComponent(id)}`, { method: 'PUT', body: input }),
|
||||||
|
deleteReadiness: (id: string, signal?: AbortSignal) =>
|
||||||
|
request<{
|
||||||
|
projectId: string
|
||||||
|
canDelete: boolean
|
||||||
|
totalActiveTasks: number
|
||||||
|
activeTasks: Record<string, number>
|
||||||
|
}>(`/projects/${encodeURIComponent(id)}/delete-readiness`, { signal }),
|
||||||
delete: (id: string) =>
|
delete: (id: string) =>
|
||||||
request<{ id: string; deleted: boolean }>(`/projects/${encodeURIComponent(id)}`, { method: 'DELETE' }),
|
request<{ id: string; deleted: boolean }>(`/projects/${encodeURIComponent(id)}`, { method: 'DELETE' }),
|
||||||
state: (id: string, signal?: AbortSignal) =>
|
state: (id: string, signal?: AbortSignal) =>
|
||||||
|
|||||||
Reference in new issue
Block a user