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,5 +1,9 @@
|
||||
import { request } from '../../lib/http'
|
||||
import type {
|
||||
IdentityImagePreview,
|
||||
IdentityValidationResult,
|
||||
StableAnchorQualityInput,
|
||||
StableAnchorQualityResult,
|
||||
CastingBatchResult,
|
||||
CharacterCastingReadiness,
|
||||
ConfirmCastingResult,
|
||||
@@ -71,14 +75,54 @@ export const subjectIdentityApi = {
|
||||
request<IdentityImage[]>(`${identityPath(subjectId)}/images`, { signal }),
|
||||
generateImage: (subjectId: string, input: GenerateIdentityImageInput) =>
|
||||
request<IdentityImage>(`${identityPath(subjectId)}/images`, { method: 'POST', body: input, timeoutMs: 0 }),
|
||||
/**
|
||||
* 读取与实际生图同源的输入预览,道具可能执行已确认的结构模型编译。
|
||||
* @param subjectId 正式主体 ID
|
||||
* @param input 与实际生图相同的参数
|
||||
* @param signal 只读预览取消信号,可能付费的道具不传
|
||||
* @returns 后端真实输入与最终参数
|
||||
*/
|
||||
previewImage: (subjectId: string, input: GenerateIdentityImageInput, signal?: AbortSignal) =>
|
||||
request<IdentityImagePreview>(`${identityPath(subjectId)}/images/preview`, {
|
||||
method: 'POST',
|
||||
body: input,
|
||||
signal,
|
||||
timeoutMs: 0
|
||||
}),
|
||||
/**
|
||||
* 明确确认后对指定身份图片执行视觉校验。
|
||||
* @param subjectId 正式主体 ID
|
||||
* @param imageId 此主体的正式图片 ID
|
||||
* @returns 真实视觉校验回执
|
||||
*/
|
||||
validateImage: (subjectId: string, imageId: string) =>
|
||||
request<IdentityValidationResult>(`${identityPath(subjectId)}/images/${encodeURIComponent(imageId)}/validate`, {
|
||||
method: 'POST',
|
||||
timeoutMs: 0
|
||||
}),
|
||||
/**
|
||||
* 为单个场景或道具执行有限预算的稳定母版质量闭环。
|
||||
* @param subjectId 正式主体 ID
|
||||
* @param input 已确认的模型与修复预算
|
||||
* @returns 候选、各轮质量和实际母版确认回执
|
||||
*/
|
||||
generateStableAnchorQuality: (subjectId: string, input: StableAnchorQualityInput) =>
|
||||
request<StableAnchorQualityResult>(`${identityPath(subjectId)}/stable-anchor/generate-quality`, {
|
||||
method: 'POST',
|
||||
body: input,
|
||||
timeoutMs: 0
|
||||
}),
|
||||
setAnchor: (subjectId: string, imageId: string) =>
|
||||
request<IdentityImage>(`${identityPath(subjectId)}/images/${encodeURIComponent(imageId)}/anchor`, {
|
||||
method: 'PUT'
|
||||
}),
|
||||
confirmStableAnchor: (subjectId: string, imageId: string) =>
|
||||
request<ConfirmCastingResult>(`${identityPath(subjectId)}/images/${encodeURIComponent(imageId)}/stable-anchor`, {
|
||||
method: 'PUT'
|
||||
}),
|
||||
request<ConfirmCastingResult>(
|
||||
`${identityPath(subjectId)}/images/${encodeURIComponent(imageId)}/stable-anchor`,
|
||||
{
|
||||
method: 'PUT'
|
||||
}
|
||||
),
|
||||
confirmCasting: (subjectId: string, imageId: string) =>
|
||||
request<ConfirmCastingResult>(`${identityPath(subjectId)}/images/${encodeURIComponent(imageId)}/casting`, {
|
||||
method: 'PUT'
|
||||
|
||||
Reference in new issue
Block a user