/** * 图像生成/编辑参数 */ export interface ImageParams { prompt: string; inputImages?: string[]; width?: number; height?: number; seed?: number; outputFormat?: 'jpeg' | 'png'; outputDir?: string; safetyTolerance?: number; wait?: boolean; } /** * 图像生成/编辑结果 */ export interface ImageResult { id: string; backend: 'bfl' | 'comfyui'; status: 'pending' | 'processing' | 'completed' | 'failed'; output?: string; outputUrl?: string; seed?: number; cost?: number; megapixels?: number; durationMs?: number; error?: string; } /** * 后端接口 */ export interface ImageBackend { readonly name: 'bfl' | 'comfyui'; /** * 检查后端是否可用 */ isAvailable(): boolean; /** * 生成/编辑图像 */ generate(params: ImageParams): Promise; /** * 获取任务状态 */ getStatus(id: string): Promise; } /** * 视频生成参数 */ export interface VideoParams { inputImage: string; prompt?: string; negativePrompt?: string; resolution?: '720P' | '1080P'; duration?: 5 | 10 | 15; seed?: number; outputDir?: string; wait?: boolean; promptExtend?: boolean; audio?: boolean; audioUrl?: string; shotType?: 'single' | 'multi'; watermark?: boolean; } /** * 视频生成结果 */ export interface VideoResult { id: string; backend: 'dashscope' | 'comfyui'; status: 'pending' | 'processing' | 'completed' | 'failed'; output?: string; outputUrl?: string; duration?: number; resolution?: string; seed?: number; durationMs?: number; error?: string; } /** * 视频后端接口 */ export interface VideoBackend { readonly name: 'dashscope' | 'comfyui'; /** * 检查后端是否可用 */ isAvailable(): boolean; /** * 生成视频 */ generate(params: VideoParams): Promise; /** * 获取任务状态 */ getStatus(id: string): Promise; } //# sourceMappingURL=types.d.ts.map