@purpleschool/gptbot-tools 0.0.119 → 0.0.122
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/build/common/errors/errors.js +5 -0
- package/build/image-generation/queries/find-image-generation-job-by-id.query.js +1 -5
- package/build/video/enums/video-strategy.enum.js +1 -0
- package/build/video/models/video-job.schema.js +1 -0
- package/build/video/models/video-model.schema.js +6 -0
- package/build/video-editor/enums/video-editor-model-strategy.enum.js +1 -0
- package/build/video-editor/queries/find-video-editor-job-by-id.query.js +1 -5
- package/common/errors/errors.ts +5 -0
- package/image-generation/queries/find-image-generation-job-by-id.query.ts +5 -9
- package/package.json +1 -1
- package/video/enums/video-strategy.enum.ts +1 -0
- package/video/models/video-job.schema.ts +1 -0
- package/video/models/video-model.schema.ts +6 -0
- package/video-editor/enums/video-editor-model-strategy.enum.ts +1 -0
- package/video-editor/queries/find-video-editor-job-by-id.query.ts +5 -9
|
@@ -603,6 +603,11 @@ exports.ERRORS = {
|
|
|
603
603
|
message: 'Некорректное значение звука',
|
|
604
604
|
httpCode: 400,
|
|
605
605
|
},
|
|
606
|
+
INVALID_MULTI_SHOTS: {
|
|
607
|
+
code: 'VIDEO.INVALID_MULTI_SHOTS',
|
|
608
|
+
message: 'Некорректное значение multi shots',
|
|
609
|
+
httpCode: 400,
|
|
610
|
+
},
|
|
606
611
|
RUNWAY_CONTENT_POLICY: {
|
|
607
612
|
code: 'VIDEO.RUNWAY_CONTENT_POLICY',
|
|
608
613
|
message: 'Запрос на создание видео был отклонен, т.к. он не соответствует требованиям политики безопасности Runway.',
|
|
@@ -6,14 +6,10 @@ const command_response_schema_1 = require("../../common/models/command-response.
|
|
|
6
6
|
const models_1 = require("../models");
|
|
7
7
|
var FindImageGenerationJobByIdQuery;
|
|
8
8
|
(function (FindImageGenerationJobByIdQuery) {
|
|
9
|
-
FindImageGenerationJobByIdQuery.RequestSchema = zod_1.z
|
|
10
|
-
.object({
|
|
9
|
+
FindImageGenerationJobByIdQuery.RequestSchema = zod_1.z.object({
|
|
11
10
|
uuid: zod_1.z.string(),
|
|
12
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
-
})
|
|
15
|
-
.refine((data) => data.userId || data.unregisteredUserId, {
|
|
16
|
-
message: 'Either userId or unregisteredUserId must be provided',
|
|
17
13
|
});
|
|
18
14
|
FindImageGenerationJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
|
|
19
15
|
})(FindImageGenerationJobByIdQuery || (exports.FindImageGenerationJobByIdQuery = FindImageGenerationJobByIdQuery = {}));
|
|
@@ -11,4 +11,5 @@ var VIDEO_GENERATION_STRATEGY;
|
|
|
11
11
|
VIDEO_GENERATION_STRATEGY["SORA_2_VIDEO_GENERATION_CALLBACK"] = "SORA_2_VIDEO_GENERATION_CALLBACK";
|
|
12
12
|
VIDEO_GENERATION_STRATEGY["SEEDANCE_VIDEO_GENERATION_CALLBACK"] = "SEEDANCE_VIDEO_GENERATION_CALLBACK";
|
|
13
13
|
VIDEO_GENERATION_STRATEGY["KLING_VIDEO_GENERATION_CALLBACK"] = "KLING_VIDEO_GENERATION_CALLBACK";
|
|
14
|
+
VIDEO_GENERATION_STRATEGY["WAN_2_6_VIDEO_GENERATION_CALLBACK"] = "WAN_2_6_VIDEO_GENERATION_CALLBACK";
|
|
14
15
|
})(VIDEO_GENERATION_STRATEGY || (exports.VIDEO_GENERATION_STRATEGY = VIDEO_GENERATION_STRATEGY = {}));
|
|
@@ -12,6 +12,7 @@ exports.VideoJobParamsSchema = zod_1.z.object({
|
|
|
12
12
|
quality: zod_1.z.string().optional(),
|
|
13
13
|
resolution: zod_1.z.string().optional(),
|
|
14
14
|
sound: zod_1.z.boolean().optional(),
|
|
15
|
+
multiShots: zod_1.z.boolean().optional(),
|
|
15
16
|
});
|
|
16
17
|
exports.VideoJobSchema = zod_1.z.object({
|
|
17
18
|
uuid: zod_1.z.string(),
|
|
@@ -28,6 +28,11 @@ exports.VideoModelParamsSchema = zod_1.z.object({
|
|
|
28
28
|
options: zod_1.z.array(zod_1.z.string()),
|
|
29
29
|
})
|
|
30
30
|
.optional(),
|
|
31
|
+
multiShots: zod_1.z
|
|
32
|
+
.object({
|
|
33
|
+
options: zod_1.z.array(zod_1.z.boolean()),
|
|
34
|
+
})
|
|
35
|
+
.optional(),
|
|
31
36
|
});
|
|
32
37
|
exports.VideoGenerationRequestParamsSchema = zod_1.z.object({
|
|
33
38
|
imageUrls: zod_1.z.string().array().optional(),
|
|
@@ -37,6 +42,7 @@ exports.VideoGenerationRequestParamsSchema = zod_1.z.object({
|
|
|
37
42
|
quality: zod_1.z.string().optional(),
|
|
38
43
|
resolution: zod_1.z.string().optional(),
|
|
39
44
|
sound: zod_1.z.boolean().optional(),
|
|
45
|
+
multiShots: zod_1.z.boolean().optional(),
|
|
40
46
|
});
|
|
41
47
|
exports.VideoModelPricingRuleConditionSchema = zod_1.z.object({
|
|
42
48
|
duration: zod_1.z.number().optional(),
|
|
@@ -7,4 +7,5 @@ var VIDEO_EDITOR_MODEL_STRATEGY;
|
|
|
7
7
|
VIDEO_EDITOR_MODEL_STRATEGY["ALEPH_EDITING_POLLING"] = "ALEPH_EDITING_POLLING";
|
|
8
8
|
VIDEO_EDITOR_MODEL_STRATEGY["LUMA_MODIFY_CALLBACK"] = "LUMA_MODIFY_CALLBACK";
|
|
9
9
|
VIDEO_EDITOR_MODEL_STRATEGY["ALEPH_EDITING_CALLBACK"] = "ALEPH_EDITING_CALLBACK";
|
|
10
|
+
VIDEO_EDITOR_MODEL_STRATEGY["WAN_2_6_VIDEO_TO_VIDEO_CALLBACK"] = "WAN_2_6_VIDEO_TO_VIDEO_CALLBACK";
|
|
10
11
|
})(VIDEO_EDITOR_MODEL_STRATEGY || (exports.VIDEO_EDITOR_MODEL_STRATEGY = VIDEO_EDITOR_MODEL_STRATEGY = {}));
|
|
@@ -6,14 +6,10 @@ const command_response_schema_1 = require("../../common/models/command-response.
|
|
|
6
6
|
const video_editor_job_schema_1 = require("../models/video-editor-job.schema");
|
|
7
7
|
var FindVideoEditorJobByIdQuery;
|
|
8
8
|
(function (FindVideoEditorJobByIdQuery) {
|
|
9
|
-
FindVideoEditorJobByIdQuery.RequestSchema = zod_1.z
|
|
10
|
-
.object({
|
|
9
|
+
FindVideoEditorJobByIdQuery.RequestSchema = zod_1.z.object({
|
|
11
10
|
uuid: zod_1.z.string(),
|
|
12
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
-
})
|
|
15
|
-
.refine((data) => data.userId || data.unregisteredUserId, {
|
|
16
|
-
message: 'Either userId or unregisteredUserId must be provided',
|
|
17
13
|
});
|
|
18
14
|
FindVideoEditorJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
|
|
19
15
|
})(FindVideoEditorJobByIdQuery || (exports.FindVideoEditorJobByIdQuery = FindVideoEditorJobByIdQuery = {}));
|
package/common/errors/errors.ts
CHANGED
|
@@ -602,6 +602,11 @@ export const ERRORS = {
|
|
|
602
602
|
message: 'Некорректное значение звука',
|
|
603
603
|
httpCode: 400,
|
|
604
604
|
},
|
|
605
|
+
INVALID_MULTI_SHOTS: {
|
|
606
|
+
code: 'VIDEO.INVALID_MULTI_SHOTS',
|
|
607
|
+
message: 'Некорректное значение multi shots',
|
|
608
|
+
httpCode: 400,
|
|
609
|
+
},
|
|
605
610
|
RUNWAY_CONTENT_POLICY: {
|
|
606
611
|
code: 'VIDEO.RUNWAY_CONTENT_POLICY',
|
|
607
612
|
message:
|
|
@@ -3,15 +3,11 @@ import { ICommandResponseSchema } from '../../common/models/command-response.sch
|
|
|
3
3
|
import { ImageGenerationJobSchema } from '../models';
|
|
4
4
|
|
|
5
5
|
export namespace FindImageGenerationJobByIdQuery {
|
|
6
|
-
export const RequestSchema = z
|
|
7
|
-
.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
12
|
-
.refine((data) => data.userId || data.unregisteredUserId, {
|
|
13
|
-
message: 'Either userId or unregisteredUserId must be provided',
|
|
14
|
-
});
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
});
|
|
15
11
|
export type Request = z.infer<typeof RequestSchema>;
|
|
16
12
|
|
|
17
13
|
export const ResponseSchema = ICommandResponseSchema(ImageGenerationJobSchema);
|
package/package.json
CHANGED
|
@@ -7,4 +7,5 @@ export enum VIDEO_GENERATION_STRATEGY {
|
|
|
7
7
|
SORA_2_VIDEO_GENERATION_CALLBACK = 'SORA_2_VIDEO_GENERATION_CALLBACK',
|
|
8
8
|
SEEDANCE_VIDEO_GENERATION_CALLBACK = 'SEEDANCE_VIDEO_GENERATION_CALLBACK',
|
|
9
9
|
KLING_VIDEO_GENERATION_CALLBACK = 'KLING_VIDEO_GENERATION_CALLBACK',
|
|
10
|
+
WAN_2_6_VIDEO_GENERATION_CALLBACK = 'WAN_2_6_VIDEO_GENERATION_CALLBACK',
|
|
10
11
|
}
|
|
@@ -10,6 +10,7 @@ export const VideoJobParamsSchema = z.object({
|
|
|
10
10
|
quality: z.string().optional(),
|
|
11
11
|
resolution: z.string().optional(),
|
|
12
12
|
sound: z.boolean().optional(),
|
|
13
|
+
multiShots: z.boolean().optional(),
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
export type VideoJobParams = z.infer<typeof VideoJobParamsSchema>;
|
|
@@ -30,6 +30,11 @@ export const VideoModelParamsSchema = z.object({
|
|
|
30
30
|
options: z.array(z.string()),
|
|
31
31
|
})
|
|
32
32
|
.optional(),
|
|
33
|
+
multiShots: z
|
|
34
|
+
.object({
|
|
35
|
+
options: z.array(z.boolean()),
|
|
36
|
+
})
|
|
37
|
+
.optional(),
|
|
33
38
|
});
|
|
34
39
|
|
|
35
40
|
export type VideoModelParams = z.infer<typeof VideoModelParamsSchema>;
|
|
@@ -42,6 +47,7 @@ export const VideoGenerationRequestParamsSchema = z.object({
|
|
|
42
47
|
quality: z.string().optional(),
|
|
43
48
|
resolution: z.string().optional(),
|
|
44
49
|
sound: z.boolean().optional(),
|
|
50
|
+
multiShots: z.boolean().optional(),
|
|
45
51
|
});
|
|
46
52
|
export type VideoGenerationRequestParams = z.infer<typeof VideoGenerationRequestParamsSchema>;
|
|
47
53
|
|
|
@@ -3,15 +3,11 @@ import { ICommandResponseSchema } from '../../common/models/command-response.sch
|
|
|
3
3
|
import { VideoEditorJobSchema } from '../models/video-editor-job.schema';
|
|
4
4
|
|
|
5
5
|
export namespace FindVideoEditorJobByIdQuery {
|
|
6
|
-
export const RequestSchema = z
|
|
7
|
-
.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
12
|
-
.refine((data) => data.userId || data.unregisteredUserId, {
|
|
13
|
-
message: 'Either userId or unregisteredUserId must be provided',
|
|
14
|
-
});
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
});
|
|
15
11
|
export type Request = z.infer<typeof RequestSchema>;
|
|
16
12
|
|
|
17
13
|
export const ResponseSchema = ICommandResponseSchema(VideoEditorJobSchema);
|