feat: 前端接入历史动作诊断预览和批量异步执行接口
This commit is contained in:
1 parent
de616c66cf
commit
b00b3c4e77
1 file changed
+17
-1
@@ -1,5 +1,5 @@
|
||||
import { optionalResource, request } from '../../lib/http'
|
||||
import type { BreakdownAction, BreakdownInput, BreakdownPreview, BreakdownState, StoryboardHandOccupancyDiagnostics, StoryboardHandRepairPreview, StoryboardHandRepairHistory } from './types'
|
||||
import type { BreakdownAction, BreakdownInput, BreakdownPreview, BreakdownState, StoryboardHandOccupancyDiagnostics, StoryboardHandRepairPreview, StoryboardHandRepairHistory, LegacyActionDiagnosisPreview, LegacyActionDiagnosisBatchStart } from './types'
|
||||
import type { WorkflowExecutionStart } from '../workflows/execution.types'
|
||||
|
||||
/** Breakdown API;预览为 GET,启动和恢复为等待完成的长 POST。 */
|
||||
@@ -14,6 +14,22 @@ export const breakdownApi = {
|
||||
request<StoryboardHandRepairPreview>(`/projects/${encodeURIComponent(id)}/breakdown/storyboard-hand-occupancy-repair-preview`, { signal }),
|
||||
handRepairHistory: (id: string, shotId: string, signal?: AbortSignal) =>
|
||||
request<StoryboardHandRepairHistory>(`/projects/${encodeURIComponent(id)}/breakdown/storyboard-hand-occupancy-repair-history/${encodeURIComponent(shotId)}`, { signal }),
|
||||
legacyActionDiagnosisPreview: (id: string, episodeNo: number, beatNo?: number, shotNo?: number) => {
|
||||
const query = new URLSearchParams({ episodeNo: String(episodeNo) })
|
||||
if (beatNo !== undefined) query.set('beatNo', String(beatNo))
|
||||
if (shotNo !== undefined) query.set('shotNo', String(shotNo))
|
||||
return request<LegacyActionDiagnosisPreview>(`/projects/${encodeURIComponent(id)}/breakdown/storyboard-legacy-action-diagnosis-preview?${query}`)
|
||||
},
|
||||
startLegacyActionDiagnosis: (id: string, input: {
|
||||
episodeNo?: number
|
||||
beatNo?: number
|
||||
shotNo?: number
|
||||
concurrency: number
|
||||
confirmed: true
|
||||
}) => request<LegacyActionDiagnosisBatchStart>(
|
||||
`/projects/${encodeURIComponent(id)}/breakdown/storyboard-legacy-action-diagnose-batch`,
|
||||
{ method: 'POST', body: input }
|
||||
),
|
||||
latest: (id: string, signal?: AbortSignal) =>
|
||||
optionalResource(request<BreakdownState>(`/projects/${encodeURIComponent(id)}/breakdown/latest`, { signal })),
|
||||
run: (id: string, action: BreakdownAction, input?: BreakdownInput) =>
|
||||
|
||||
Reference in new issue
Block a user