110 lines
2.4 KiB
TypeScript
110 lines
2.4 KiB
TypeScript
import { MaterialItemWithMetadata } from "@/components/waterfall";
|
|
|
|
// 模板列表 list
|
|
export interface NodeTemplates {
|
|
id: string;
|
|
node_template_id: string
|
|
name: string;
|
|
description: string;
|
|
model: string;
|
|
prompt: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
current_version_id: number;
|
|
version: number;
|
|
is_current_version: boolean
|
|
}
|
|
|
|
//模板详情
|
|
export interface NodeTemplateDetail extends NodeTemplates {
|
|
material_infos: MaterialItemWithMetadata[]
|
|
example_material_ids: string[]
|
|
available_model_names: string[]
|
|
}
|
|
|
|
// 更新模板
|
|
export interface UpdateNodeTemplate {
|
|
example_material_ids: string[];
|
|
}
|
|
|
|
export interface Shot {
|
|
camera_direction: string;
|
|
camera_movement: string;
|
|
clip_id: number;
|
|
composition: string;
|
|
music_description: string;
|
|
perspective: string;
|
|
scene_name: string;
|
|
scene_sequence: number;
|
|
shot_description: string;
|
|
shot_duration: string;
|
|
shot_name: string;
|
|
shot_sequence: number;
|
|
shot_sizes: string;
|
|
sound_effect: string;
|
|
transition_in: string;
|
|
voice_over: string;
|
|
}
|
|
// 图片的debug
|
|
interface CaptionResult {
|
|
video_shots?: Shot[];
|
|
caption_result: {
|
|
common: {
|
|
background: string;
|
|
};
|
|
daily_life: {
|
|
activity: string;
|
|
atmosphere: string;
|
|
extra_elements: string;
|
|
people_presence: string;
|
|
scene: string;
|
|
};
|
|
person: {
|
|
person_count: string;
|
|
person_details: Array<{
|
|
action: string;
|
|
age: string;
|
|
expression: string;
|
|
gender: string;
|
|
mood: string;
|
|
}>;
|
|
person_identity: string;
|
|
scene: string;
|
|
};
|
|
};
|
|
}
|
|
export interface PhotosDebug {
|
|
id: string,
|
|
state: string,
|
|
name: string,
|
|
context: {
|
|
input: Object,
|
|
outputs: CaptionResult,
|
|
metadata: Object,
|
|
}
|
|
|
|
}
|
|
|
|
// prompt需要传参
|
|
export interface PromptParams {
|
|
name: string,
|
|
value_type: string,
|
|
required: boolean,
|
|
description: string
|
|
}
|
|
|
|
// input output
|
|
export interface InputOutput {
|
|
is_async: boolean,
|
|
name: string,
|
|
context: {
|
|
metadata: {},
|
|
outputs: { raw_output?: JSON, metadata?: {} },
|
|
inputs: {
|
|
material_id: string,
|
|
prompt: string
|
|
model_name: string
|
|
}
|
|
}
|
|
}
|