| 1 | import { createZodDto } from '@yikart/common' |
| 2 | import { z } from 'zod' |
| 3 | |
| 4 | // Volcengine视频生成响应 |
| 5 | const volcengineVideoGenerationResponseSchema = z.object({ |
| 6 | id: z.string(), |
| 7 | }) |
| 8 | |
| 9 | export class VolcengineVideoGenerationResponseVo extends createZodDto(volcengineVideoGenerationResponseSchema) {} |
| 10 | |
| 11 | // Volcengine 任务状态响应 VO |
| 12 | const volcengineTaskStatusResponseSchema = z.object({ |
| 13 | id: z.string().describe('任务ID'), |
| 14 | model: z.string().describe('模型名称'), |
| 15 | status: z.string().describe('任务状态'), |
| 16 | error: z.object({ |
| 17 | message: z.string(), |
| 18 | code: z.string(), |
| 19 | }).nullable().describe('错误信息'), |
| 20 | created_at: z.number().describe('创建时间'), |
| 21 | updated_at: z.number().describe('更新时间'), |
| 22 | content: z.object({ |
| 23 | video_url: z.string().optional(), |
| 24 | last_frame_url: z.string().optional(), |
| 25 | }).optional().describe('视频内容'), |
| 26 | seed: z.number().optional().describe('种子值'), |
| 27 | resolution: z.string().optional().describe('分辨率'), |
| 28 | ratio: z.string().optional().describe('宽高比'), |
| 29 | duration: z.number().optional().describe('时长'), |
| 30 | framespersecond: z.number().optional().describe('帧率'), |
| 31 | usage: z.object({ |
| 32 | completion_tokens: z.number().optional(), |
| 33 | total_tokens: z.number().optional(), |
| 34 | }).optional().describe('使用量统计'), |
| 35 | }) |
| 36 | |
| 37 | export class VolcengineTaskStatusResponseVo extends createZodDto(volcengineTaskStatusResponseSchema) {} |
| 38 |