feat(short-drama-agent-front): 补齐后端生产与质量功能
This commit is contained in:
1 parent
967c4ebea1
commit
470b52e26d
52 files changed
+3754
-1075
No files matched your search
@@ -1,13 +1,11 @@
|
||||
import type { WorkflowExecutionStart } from '../workflows/execution.types'
|
||||
import { request } from '../../lib/http'
|
||||
import type {
|
||||
EpisodeDirections,
|
||||
EpisodeVisualStates,
|
||||
PromptBatchResult,
|
||||
ShotPromptResult,
|
||||
ShotReferences,
|
||||
StoryboardBatchInput,
|
||||
StoryboardBatchResult,
|
||||
StoryboardShotRegenerationResult,
|
||||
VisualStateBatchInput
|
||||
} from './types'
|
||||
import type { ShotGenerationSpec } from './generation-spec.types'
|
||||
@@ -24,9 +22,14 @@ function shotPath(id: string) {
|
||||
|
||||
/** Storyboard 正式路由契约;测试路由不暴露为前端生产入口。 */
|
||||
export const storyboardApi = {
|
||||
/** 强制重生成指定单集的镜头拆解;后端校验通过后才覆盖正式 Storyboard。 */
|
||||
/**
|
||||
* 后台重生成指定单集镜头,终态后再读取正式分镜。
|
||||
* @param id 正式项目 ID
|
||||
* @param episodeNo 目标剧集编号
|
||||
* @returns 真实后台任务观察句柄
|
||||
*/
|
||||
regenerateEpisodeShots: (id: string, episodeNo: number) =>
|
||||
request<StoryboardShotRegenerationResult>(`${projectPath(id)}/storyboard-shots/regenerate`, {
|
||||
request<WorkflowExecutionStart>(`${projectPath(id)}/storyboard-shots/regenerate`, {
|
||||
method: 'POST',
|
||||
body: { episodeNo },
|
||||
timeoutMs: 0
|
||||
@@ -35,14 +38,26 @@ export const storyboardApi = {
|
||||
request<EpisodeDirections>(`${projectPath(id)}/storyboard-directions?episodeNo=${episodeNo}`, { signal }),
|
||||
visualStates: (id: string, episodeNo: number, signal?: AbortSignal) =>
|
||||
request<EpisodeVisualStates>(`${projectPath(id)}/storyboard-visual-states?episodeNo=${episodeNo}`, { signal }),
|
||||
/**
|
||||
* 后台生成项目导演设计。
|
||||
* @param id 正式项目 ID
|
||||
* @param input 并发与覆盖范围
|
||||
* @returns 真实后台任务观察句柄
|
||||
*/
|
||||
generateDirections: (id: string, input: StoryboardBatchInput) =>
|
||||
request<StoryboardBatchResult>(`${projectPath(id)}/storyboard-directions/generate`, {
|
||||
request<WorkflowExecutionStart>(`${projectPath(id)}/storyboard-directions/generate`, {
|
||||
method: 'POST',
|
||||
body: input,
|
||||
timeoutMs: 0
|
||||
}),
|
||||
/**
|
||||
* 后台生成项目即时状态。
|
||||
* @param id 正式项目 ID
|
||||
* @param input 并发、覆盖与有限修复配置
|
||||
* @returns 真实后台任务观察句柄
|
||||
*/
|
||||
generateVisualStates: (id: string, input: VisualStateBatchInput) =>
|
||||
request<StoryboardBatchResult>(`${projectPath(id)}/storyboard-visual-states/generate`, {
|
||||
request<WorkflowExecutionStart>(`${projectPath(id)}/storyboard-visual-states/generate`, {
|
||||
method: 'POST',
|
||||
body: input,
|
||||
timeoutMs: 0
|
||||
@@ -59,8 +74,14 @@ export const storyboardApi = {
|
||||
body: { force },
|
||||
timeoutMs: 0
|
||||
}),
|
||||
/**
|
||||
* 后台批量生成项目视频提示词。
|
||||
* @param id 正式项目 ID
|
||||
* @param input 并发与覆盖参数
|
||||
* @returns 真实后台任务观察句柄
|
||||
*/
|
||||
generatePrompts: (id: string, input: StoryboardBatchInput) =>
|
||||
request<PromptBatchResult>(`${projectPath(id)}/video-prompts/generate`, {
|
||||
request<WorkflowExecutionStart>(`${projectPath(id)}/video-prompts/generate`, {
|
||||
method: 'POST',
|
||||
body: input,
|
||||
timeoutMs: 0
|
||||
|
||||
Reference in new issue
Block a user