forked from 77media/video-flow
38 lines
889 B
TypeScript
38 lines
889 B
TypeScript
import { ApiResponse } from "./common";
|
||
import { MovieStartDTO } from "./DTO/movie_start_dto";
|
||
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 (request: {
|
||
imageUrl: string;
|
||
user_text: string;
|
||
}) => {
|
||
return await post<ApiResponse<MovieStartDTO>>(
|
||
"/movie_story/generate",
|
||
request
|
||
);
|
||
};
|