@ai-grator/api 0.3.78 → 0.3.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/errors/errors.ts CHANGED
@@ -389,6 +389,11 @@ export const ERRORS = {
389
389
  code: 'GENERATION_JOB.INVALID_ELEMENT_REFERENCES',
390
390
  message: 'Субъекты или голоса заданы некорректно',
391
391
  },
392
+ TASK_TYPE_REQUIRES_REFERENCES: {
393
+ httpCode: 400,
394
+ code: 'GENERATION_JOB.TASK_TYPE_REQUIRES_REFERENCES',
395
+ message: 'Для выбранного типа задачи не хватает референсов',
396
+ },
392
397
  TOO_MANY_REFERENCES: {
393
398
  httpCode: 400,
394
399
  code: 'GENERATION_JOB.TOO_MANY_REFERENCES',
@@ -1,3 +1,4 @@
1
1
  export * from './generation-job-attachment-file.schema';
2
2
  export * from './generation-job-response.schema';
3
3
  export * from './suno-params.schema';
4
+ export * from './seedance-2_5-params.schema';
@@ -0,0 +1,32 @@
1
+ import { z } from 'zod';
2
+
3
+ export const SEEDANCE_2_5_TASK_TYPE = {
4
+ AUTO: 'auto',
5
+ REFERENCE: 'reference',
6
+ EDIT: 'edit',
7
+ EXTEND: 'extend',
8
+ } as const;
9
+
10
+ export const Seedance25TaskTypeSchema = z.enum([
11
+ SEEDANCE_2_5_TASK_TYPE.AUTO,
12
+ SEEDANCE_2_5_TASK_TYPE.REFERENCE,
13
+ SEEDANCE_2_5_TASK_TYPE.EDIT,
14
+ SEEDANCE_2_5_TASK_TYPE.EXTEND,
15
+ ]);
16
+ export type Seedance25TaskType = z.infer<typeof Seedance25TaskTypeSchema>;
17
+
18
+ export const Seedance25ParamsSchema = z.object({
19
+ prompt: z.string().min(3).max(30000),
20
+ aspect_ratio: z.enum(['adaptive', '1:1', '16:9', '21:9', '3:4', '4:3', '9:16']).default('16:9'),
21
+ resolution: z.enum(['480p', '720p', '1080p']).default('720p'),
22
+ duration: z.number().min(4).max(30).default(5),
23
+ generate_audio: z.boolean().default(false),
24
+ output_format: z.enum(['mov', 'mp4']).default('mp4'),
25
+ return_last_frame: z.boolean().default(false),
26
+ omni_reference_task_type: Seedance25TaskTypeSchema.optional(),
27
+ first_frame_url: z.string().optional(),
28
+ last_frame_url: z.string().optional(),
29
+ reference_image_urls: z.array(z.string()).optional(),
30
+ reference_video_urls: z.array(z.string()).optional(),
31
+ });
32
+ export type Seedance25Params = z.infer<typeof Seedance25ParamsSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-grator/api",
3
- "version": "0.3.78",
3
+ "version": "0.3.79",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {