forked from 77media/video-flow
34 lines
845 B
TypeScript
34 lines
845 B
TypeScript
import { ApiResponse } from "./common";
|
||
import { get, post } from "./request";
|
||
import {
|
||
StoryTemplateEntity,
|
||
ImageStoryEntity,
|
||
} from "@/app/service/domain/Entities";
|
||
|
||
/**
|
||
* 获取故事模板列表
|
||
*/
|
||
export const getTemplateStoryList = async () => {
|
||
return await get<ApiResponse<StoryTemplateEntity[]>>("/template-story/list");
|
||
};
|
||
|
||
/**
|
||
* 执行故事模板操作,生成电影项目
|
||
*/
|
||
export const actionTemplateStory = async (template: StoryTemplateEntity) => {
|
||
return await post<ApiResponse<{ projectId: string }>>(
|
||
"/template-story/action",
|
||
template
|
||
);
|
||
};
|
||
|
||
/**
|
||
* AI分析图片,生成分析结果
|
||
*/
|
||
export const AIGenerateImageStory = async (imageStory: ImageStoryEntity) => {
|
||
return await post<ApiResponse<{ imageAnalysis: string; category: string }>>(
|
||
"/image-story/ai-generate",
|
||
imageStory
|
||
);
|
||
};
|