video-flow-b/api/movie_start.ts
2025-08-17 21:30:43 +08:00

38 lines
889 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
);
};