@purpleschool/gptbot-tools 0.4.15 → 0.4.17-stage-2
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/image-generation/commands/image-generation-model/get-image-generation-model-by-uuid.command.d.ts +0 -2
- package/build/image-generation/enums/index.d.ts +0 -1
- package/build/image-generation/enums/index.js +0 -1
- package/build/image-generation/models/image-generation-config.schema.d.ts +0 -1
- package/build/image-generation/models/image-generation-model.schema.d.ts +1 -2
- package/build/image-generation/models/image-generation-model.schema.js +0 -1
- package/build/image-generation/queries/get-image-generation-config.query.d.ts +0 -2
- package/build/index.d.ts +3 -0
- package/build/index.js +3 -0
- package/build/motion-control/commands.d.ts +669 -0
- package/build/motion-control/commands.js +128 -0
- package/build/motion-control/index.d.ts +5 -0
- package/build/motion-control/index.js +21 -0
- package/build/motion-control/models.d.ts +297 -0
- package/build/motion-control/models.js +93 -0
- package/build/motion-control/queries.d.ts +504 -0
- package/build/motion-control/queries.js +41 -0
- package/build/motion-control/routes.d.ts +18 -0
- package/build/motion-control/routes.js +21 -0
- package/build/motion-control/utils.d.ts +4 -0
- package/build/motion-control/utils.js +23 -0
- package/build/tools/enums/tool-content-type.enum.d.ts +1 -0
- package/build/tools/enums/tool-content-type.enum.js +1 -0
- package/build/tools/enums/tool-type.enum.d.ts +1 -0
- package/build/tools/enums/tool-type.enum.js +1 -0
- package/build/tools/models/global-tools-config.schema.d.ts +81 -1
- package/build/tools/models/global-tools-config.schema.js +8 -6
- package/build/tools/models/tools-with-configs.schema.d.ts +186 -2
- package/build/tools/models/tools-with-configs.schema.js +11 -6
- package/build/tools/queries/get-global-tools-config.query.d.ts +144 -2
- package/build/tools/queries/get-tools-with-configs.query.d.ts +168 -2
- package/package.json +2 -2
- package/build/image-generation/enums/image-generation-model-strategy.enum.d.ts +0 -21
- package/build/image-generation/enums/image-generation-model-strategy.enum.js +0 -35
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdatePublishedStatusMotionControlJobsCommand = exports.SetReactionToMotionControlJobCommand = exports.UpdateMotionControlJobFavoriteCommand = exports.UpdateMotionControlJobTitleCommand = exports.DeleteAllMotionControlJobsCommand = exports.DeleteMotionControlJobByUuidCommand = exports.RetryMotionControlJobCommand = exports.GetMotionControlPriceCommand = exports.ExecuteMotionControlCommand = exports.MotionControlInputSchema = exports.MotionControlOwnerSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const models_1 = require("./models");
|
|
7
|
+
exports.MotionControlOwnerSchema = zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
userId: zod_1.z.uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: zod_1.z.uuid().nullable().optional(),
|
|
11
|
+
})
|
|
12
|
+
.refine((d) => Boolean(d.userId) !== Boolean(d.unregisteredUserId), {
|
|
13
|
+
message: 'Exactly one owner is required',
|
|
14
|
+
});
|
|
15
|
+
exports.MotionControlInputSchema = zod_1.z.object({
|
|
16
|
+
modelId: zod_1.z.uuid(),
|
|
17
|
+
motionVideoFileId: zod_1.z.uuid(),
|
|
18
|
+
motionVideoUrl: zod_1.z.url(),
|
|
19
|
+
characterImageFileId: zod_1.z.uuid(),
|
|
20
|
+
characterImageUrl: zod_1.z.url(),
|
|
21
|
+
duration: zod_1.z.number().finite().positive(),
|
|
22
|
+
resolution: models_1.MotionControlResolutionSchema,
|
|
23
|
+
backgroundSource: models_1.MotionControlBackgroundSourceSchema,
|
|
24
|
+
prompt: zod_1.z.string().max(2500).default(''),
|
|
25
|
+
});
|
|
26
|
+
var ExecuteMotionControlCommand;
|
|
27
|
+
(function (ExecuteMotionControlCommand) {
|
|
28
|
+
ExecuteMotionControlCommand.RequestSchema = exports.MotionControlInputSchema.extend({
|
|
29
|
+
userId: zod_1.z.uuid().nullable().optional(),
|
|
30
|
+
unregisteredUserId: zod_1.z.uuid().nullable().optional(),
|
|
31
|
+
scope: zod_1.z.enum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
|
|
32
|
+
mock: zod_1.z.boolean().optional(),
|
|
33
|
+
tokenReservationId: zod_1.z.uuid(),
|
|
34
|
+
precalculatedPrice: zod_1.z.number().int().nonnegative(),
|
|
35
|
+
}).refine((d) => Boolean(d.userId) !== Boolean(d.unregisteredUserId), {
|
|
36
|
+
message: 'Exactly one owner is required',
|
|
37
|
+
});
|
|
38
|
+
ExecuteMotionControlCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MotionControlJobSchema);
|
|
39
|
+
})(ExecuteMotionControlCommand || (exports.ExecuteMotionControlCommand = ExecuteMotionControlCommand = {}));
|
|
40
|
+
var GetMotionControlPriceCommand;
|
|
41
|
+
(function (GetMotionControlPriceCommand) {
|
|
42
|
+
GetMotionControlPriceCommand.RequestSchema = zod_1.z.object({
|
|
43
|
+
modelId: zod_1.z.uuid(),
|
|
44
|
+
params: zod_1.z.object({
|
|
45
|
+
duration: zod_1.z.number().finite().positive(),
|
|
46
|
+
resolution: models_1.MotionControlResolutionSchema,
|
|
47
|
+
backgroundSource: models_1.MotionControlBackgroundSourceSchema,
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
GetMotionControlPriceCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.object({
|
|
51
|
+
price: zod_1.z.number().int().nonnegative(),
|
|
52
|
+
totalPrice: zod_1.z.number().int().nonnegative(),
|
|
53
|
+
ratePerSecond: zod_1.z.number().positive(),
|
|
54
|
+
duration: zod_1.z.number().positive(),
|
|
55
|
+
}));
|
|
56
|
+
})(GetMotionControlPriceCommand || (exports.GetMotionControlPriceCommand = GetMotionControlPriceCommand = {}));
|
|
57
|
+
var RetryMotionControlJobCommand;
|
|
58
|
+
(function (RetryMotionControlJobCommand) {
|
|
59
|
+
RetryMotionControlJobCommand.RequestSchema = exports.MotionControlInputSchema.omit({ prompt: true })
|
|
60
|
+
.partial()
|
|
61
|
+
.extend({
|
|
62
|
+
prompt: zod_1.z.string().max(2500).optional(),
|
|
63
|
+
uuid: zod_1.z.uuid(),
|
|
64
|
+
userId: zod_1.z.uuid().nullable().optional(),
|
|
65
|
+
unregisteredUserId: zod_1.z.uuid().nullable().optional(),
|
|
66
|
+
mock: zod_1.z.boolean().optional(),
|
|
67
|
+
tokenReservationId: zod_1.z.uuid(),
|
|
68
|
+
precalculatedPrice: zod_1.z.number().int().nonnegative(),
|
|
69
|
+
})
|
|
70
|
+
.refine((d) => Boolean(d.userId) !== Boolean(d.unregisteredUserId), {
|
|
71
|
+
message: 'Exactly one owner is required',
|
|
72
|
+
});
|
|
73
|
+
RetryMotionControlJobCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MotionControlJobSchema);
|
|
74
|
+
})(RetryMotionControlJobCommand || (exports.RetryMotionControlJobCommand = RetryMotionControlJobCommand = {}));
|
|
75
|
+
var DeleteMotionControlJobByUuidCommand;
|
|
76
|
+
(function (DeleteMotionControlJobByUuidCommand) {
|
|
77
|
+
DeleteMotionControlJobByUuidCommand.RequestSchema = exports.MotionControlOwnerSchema.safeExtend({ uuid: zod_1.z.uuid() });
|
|
78
|
+
DeleteMotionControlJobByUuidCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
79
|
+
})(DeleteMotionControlJobByUuidCommand || (exports.DeleteMotionControlJobByUuidCommand = DeleteMotionControlJobByUuidCommand = {}));
|
|
80
|
+
var DeleteAllMotionControlJobsCommand;
|
|
81
|
+
(function (DeleteAllMotionControlJobsCommand) {
|
|
82
|
+
DeleteAllMotionControlJobsCommand.RequestSchema = exports.MotionControlOwnerSchema.safeExtend({
|
|
83
|
+
scope: zod_1.z.enum(common_1.JOB_SCOPE).default(common_1.JOB_SCOPE.TOOL),
|
|
84
|
+
});
|
|
85
|
+
DeleteAllMotionControlJobsCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
86
|
+
})(DeleteAllMotionControlJobsCommand || (exports.DeleteAllMotionControlJobsCommand = DeleteAllMotionControlJobsCommand = {}));
|
|
87
|
+
var UpdateMotionControlJobTitleCommand;
|
|
88
|
+
(function (UpdateMotionControlJobTitleCommand) {
|
|
89
|
+
UpdateMotionControlJobTitleCommand.RequestSchema = exports.MotionControlOwnerSchema.safeExtend({
|
|
90
|
+
uuid: zod_1.z.uuid(),
|
|
91
|
+
title: zod_1.z.string().min(1).max(2000),
|
|
92
|
+
});
|
|
93
|
+
UpdateMotionControlJobTitleCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MotionControlJobSchema);
|
|
94
|
+
})(UpdateMotionControlJobTitleCommand || (exports.UpdateMotionControlJobTitleCommand = UpdateMotionControlJobTitleCommand = {}));
|
|
95
|
+
var UpdateMotionControlJobFavoriteCommand;
|
|
96
|
+
(function (UpdateMotionControlJobFavoriteCommand) {
|
|
97
|
+
UpdateMotionControlJobFavoriteCommand.RequestSchema = exports.MotionControlOwnerSchema.safeExtend({
|
|
98
|
+
uuid: zod_1.z.uuid(),
|
|
99
|
+
isFavorite: zod_1.z.boolean(),
|
|
100
|
+
});
|
|
101
|
+
UpdateMotionControlJobFavoriteCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MotionControlJobSchema);
|
|
102
|
+
})(UpdateMotionControlJobFavoriteCommand || (exports.UpdateMotionControlJobFavoriteCommand = UpdateMotionControlJobFavoriteCommand = {}));
|
|
103
|
+
var SetReactionToMotionControlJobCommand;
|
|
104
|
+
(function (SetReactionToMotionControlJobCommand) {
|
|
105
|
+
SetReactionToMotionControlJobCommand.RequestSchema = exports.MotionControlOwnerSchema.safeExtend({
|
|
106
|
+
uuid: zod_1.z.uuid(),
|
|
107
|
+
reaction: zod_1.z.enum(common_1.USER_REACTION).nullable(),
|
|
108
|
+
dislikeReason: zod_1.z.string().max(2000).nullable().default(null),
|
|
109
|
+
});
|
|
110
|
+
SetReactionToMotionControlJobCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MotionControlJobSchema);
|
|
111
|
+
})(SetReactionToMotionControlJobCommand || (exports.SetReactionToMotionControlJobCommand = SetReactionToMotionControlJobCommand = {}));
|
|
112
|
+
var UpdatePublishedStatusMotionControlJobsCommand;
|
|
113
|
+
(function (UpdatePublishedStatusMotionControlJobsCommand) {
|
|
114
|
+
UpdatePublishedStatusMotionControlJobsCommand.RequestSchema = zod_1.z.object({
|
|
115
|
+
criteria: exports.MotionControlOwnerSchema.safeExtend({ uuid: zod_1.z.uuid() }),
|
|
116
|
+
data: zod_1.z
|
|
117
|
+
.object({
|
|
118
|
+
isPublished: zod_1.z.boolean(),
|
|
119
|
+
postId: zod_1.z.uuid().nullable().optional(),
|
|
120
|
+
outputVideoId: zod_1.z.string().nullable().optional(),
|
|
121
|
+
previewId: zod_1.z.string().nullable().optional(),
|
|
122
|
+
})
|
|
123
|
+
.refine((d) => !d.isPublished || !!d.postId, {
|
|
124
|
+
message: 'Published job requires postId',
|
|
125
|
+
}),
|
|
126
|
+
});
|
|
127
|
+
UpdatePublishedStatusMotionControlJobsCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.MotionControlJobSchema);
|
|
128
|
+
})(UpdatePublishedStatusMotionControlJobsCommand || (exports.UpdatePublishedStatusMotionControlJobsCommand = UpdatePublishedStatusMotionControlJobsCommand = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./models"), exports);
|
|
18
|
+
__exportStar(require("./commands"), exports);
|
|
19
|
+
__exportStar(require("./queries"), exports);
|
|
20
|
+
__exportStar(require("./routes"), exports);
|
|
21
|
+
__exportStar(require("./utils"), exports);
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TOOL_MODEL_STATUS, USER_REACTION, JOB_SCOPE } from '../common';
|
|
3
|
+
import { JOB_STATUS } from '../tools/enums/job-status.enum';
|
|
4
|
+
export declare const MotionControlSourceGeometrySchema: z.ZodObject<{
|
|
5
|
+
minWidth: z.ZodNumber;
|
|
6
|
+
minHeight: z.ZodNumber;
|
|
7
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
minAspectRatio: z.ZodNumber;
|
|
10
|
+
maxAspectRatio: z.ZodNumber;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const MotionControlResolutionSchema: z.ZodEnum<{
|
|
13
|
+
"1080p": "1080p";
|
|
14
|
+
"720p": "720p";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const MotionControlBackgroundSourceSchema: z.ZodEnum<{
|
|
17
|
+
image: "image";
|
|
18
|
+
video: "video";
|
|
19
|
+
}>;
|
|
20
|
+
export declare const MotionControlJobParamsSchema: z.ZodObject<{
|
|
21
|
+
resolution: z.ZodEnum<{
|
|
22
|
+
"1080p": "1080p";
|
|
23
|
+
"720p": "720p";
|
|
24
|
+
}>;
|
|
25
|
+
backgroundSource: z.ZodEnum<{
|
|
26
|
+
image: "image";
|
|
27
|
+
video: "video";
|
|
28
|
+
}>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type MotionControlJobParams = z.infer<typeof MotionControlJobParamsSchema>;
|
|
31
|
+
export declare const MotionControlModelParamsSchema: z.ZodObject<{
|
|
32
|
+
resolution: z.ZodObject<{
|
|
33
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
34
|
+
"1080p": "1080p";
|
|
35
|
+
"720p": "720p";
|
|
36
|
+
}>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
backgroundSource: z.ZodObject<{
|
|
39
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
40
|
+
image: "image";
|
|
41
|
+
video: "video";
|
|
42
|
+
}>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
duration: z.ZodObject<{
|
|
45
|
+
min: z.ZodNumber;
|
|
46
|
+
maxByBackgroundSource: z.ZodObject<{
|
|
47
|
+
image: z.ZodNumber;
|
|
48
|
+
video: z.ZodNumber;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
geometry: z.ZodObject<{
|
|
52
|
+
minWidth: z.ZodNumber;
|
|
53
|
+
minHeight: z.ZodNumber;
|
|
54
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
minAspectRatio: z.ZodNumber;
|
|
57
|
+
maxAspectRatio: z.ZodNumber;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
sourceGeometry: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
image: z.ZodObject<{
|
|
61
|
+
minWidth: z.ZodNumber;
|
|
62
|
+
minHeight: z.ZodNumber;
|
|
63
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
minAspectRatio: z.ZodNumber;
|
|
66
|
+
maxAspectRatio: z.ZodNumber;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
video: z.ZodNullable<z.ZodObject<{
|
|
69
|
+
minWidth: z.ZodNumber;
|
|
70
|
+
minHeight: z.ZodNumber;
|
|
71
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
minAspectRatio: z.ZodNumber;
|
|
74
|
+
maxAspectRatio: z.ZodNumber;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export declare const MotionControlPricingRulesSchema: z.ZodArray<z.ZodObject<{
|
|
79
|
+
resolution: z.ZodEnum<{
|
|
80
|
+
"1080p": "1080p";
|
|
81
|
+
"720p": "720p";
|
|
82
|
+
}>;
|
|
83
|
+
pricePerSecond: z.ZodNumber;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
export declare const MotionControlModelSchema: z.ZodObject<{
|
|
86
|
+
uuid: z.ZodUUID;
|
|
87
|
+
title: z.ZodString;
|
|
88
|
+
description: z.ZodString;
|
|
89
|
+
aiModel: z.ZodString;
|
|
90
|
+
status: z.ZodEnum<typeof TOOL_MODEL_STATUS>;
|
|
91
|
+
order: z.ZodNumber;
|
|
92
|
+
icons: z.ZodObject<{
|
|
93
|
+
light: z.ZodObject<{
|
|
94
|
+
svg: z.ZodString;
|
|
95
|
+
png: z.ZodString;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
dark: z.ZodObject<{
|
|
98
|
+
svg: z.ZodString;
|
|
99
|
+
png: z.ZodString;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
maxPromptLength: z.ZodNumber;
|
|
103
|
+
maxInputVideoSizeBytes: z.ZodNumber;
|
|
104
|
+
maxInputImageSizeBytes: z.ZodNumber;
|
|
105
|
+
supportedVideoFormats: z.ZodArray<z.ZodString>;
|
|
106
|
+
supportedImageFormats: z.ZodArray<z.ZodString>;
|
|
107
|
+
params: z.ZodObject<{
|
|
108
|
+
resolution: z.ZodObject<{
|
|
109
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
110
|
+
"1080p": "1080p";
|
|
111
|
+
"720p": "720p";
|
|
112
|
+
}>>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
backgroundSource: z.ZodObject<{
|
|
115
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
116
|
+
image: "image";
|
|
117
|
+
video: "video";
|
|
118
|
+
}>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
duration: z.ZodObject<{
|
|
121
|
+
min: z.ZodNumber;
|
|
122
|
+
maxByBackgroundSource: z.ZodObject<{
|
|
123
|
+
image: z.ZodNumber;
|
|
124
|
+
video: z.ZodNumber;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
geometry: z.ZodObject<{
|
|
128
|
+
minWidth: z.ZodNumber;
|
|
129
|
+
minHeight: z.ZodNumber;
|
|
130
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
minAspectRatio: z.ZodNumber;
|
|
133
|
+
maxAspectRatio: z.ZodNumber;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
sourceGeometry: z.ZodOptional<z.ZodObject<{
|
|
136
|
+
image: z.ZodObject<{
|
|
137
|
+
minWidth: z.ZodNumber;
|
|
138
|
+
minHeight: z.ZodNumber;
|
|
139
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
minAspectRatio: z.ZodNumber;
|
|
142
|
+
maxAspectRatio: z.ZodNumber;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
video: z.ZodNullable<z.ZodObject<{
|
|
145
|
+
minWidth: z.ZodNumber;
|
|
146
|
+
minHeight: z.ZodNumber;
|
|
147
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
minAspectRatio: z.ZodNumber;
|
|
150
|
+
maxAspectRatio: z.ZodNumber;
|
|
151
|
+
}, z.core.$strip>>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
pricingRules: z.ZodArray<z.ZodObject<{
|
|
155
|
+
resolution: z.ZodEnum<{
|
|
156
|
+
"1080p": "1080p";
|
|
157
|
+
"720p": "720p";
|
|
158
|
+
}>;
|
|
159
|
+
pricePerSecond: z.ZodNumber;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
createdAt: z.ZodDate;
|
|
162
|
+
updatedAt: z.ZodDate;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
export type MotionControlModel = z.infer<typeof MotionControlModelSchema>;
|
|
165
|
+
export declare const MotionControlJobSchema: z.ZodObject<{
|
|
166
|
+
uuid: z.ZodUUID;
|
|
167
|
+
modelId: z.ZodUUID;
|
|
168
|
+
userId: z.ZodNullable<z.ZodUUID>;
|
|
169
|
+
unregisteredUserId: z.ZodNullable<z.ZodUUID>;
|
|
170
|
+
scope: z.ZodEnum<typeof JOB_SCOPE>;
|
|
171
|
+
prompt: z.ZodString;
|
|
172
|
+
title: z.ZodString;
|
|
173
|
+
status: z.ZodEnum<typeof JOB_STATUS>;
|
|
174
|
+
error: z.ZodNullable<z.ZodString>;
|
|
175
|
+
externalId: z.ZodNullable<z.ZodString>;
|
|
176
|
+
price: z.ZodNumber;
|
|
177
|
+
tokenReservationId: z.ZodNullable<z.ZodUUID>;
|
|
178
|
+
motionVideoFileId: z.ZodUUID;
|
|
179
|
+
motionVideoUrl: z.ZodURL;
|
|
180
|
+
characterImageFileId: z.ZodUUID;
|
|
181
|
+
characterImageUrl: z.ZodURL;
|
|
182
|
+
duration: z.ZodNumber;
|
|
183
|
+
resolution: z.ZodEnum<{
|
|
184
|
+
"1080p": "1080p";
|
|
185
|
+
"720p": "720p";
|
|
186
|
+
}>;
|
|
187
|
+
backgroundSource: z.ZodEnum<{
|
|
188
|
+
image: "image";
|
|
189
|
+
video: "video";
|
|
190
|
+
}>;
|
|
191
|
+
params: z.ZodObject<{
|
|
192
|
+
resolution: z.ZodEnum<{
|
|
193
|
+
"1080p": "1080p";
|
|
194
|
+
"720p": "720p";
|
|
195
|
+
}>;
|
|
196
|
+
backgroundSource: z.ZodEnum<{
|
|
197
|
+
image: "image";
|
|
198
|
+
video: "video";
|
|
199
|
+
}>;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
outputVideoUrl: z.ZodNullable<z.ZodURL>;
|
|
202
|
+
outputVideoId: z.ZodNullable<z.ZodString>;
|
|
203
|
+
previewUrl: z.ZodNullable<z.ZodURL>;
|
|
204
|
+
previewId: z.ZodNullable<z.ZodString>;
|
|
205
|
+
reaction: z.ZodNullable<z.ZodEnum<typeof USER_REACTION>>;
|
|
206
|
+
dislikeReason: z.ZodNullable<z.ZodString>;
|
|
207
|
+
isFavorite: z.ZodBoolean;
|
|
208
|
+
isDeleted: z.ZodBoolean;
|
|
209
|
+
isPublished: z.ZodBoolean;
|
|
210
|
+
postId: z.ZodNullable<z.ZodString>;
|
|
211
|
+
createdAt: z.ZodDate;
|
|
212
|
+
updatedAt: z.ZodDate;
|
|
213
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
export type MotionControlJob = z.infer<typeof MotionControlJobSchema>;
|
|
216
|
+
export declare const MotionControlConfigSchema: z.ZodObject<{
|
|
217
|
+
models: z.ZodArray<z.ZodObject<{
|
|
218
|
+
uuid: z.ZodUUID;
|
|
219
|
+
title: z.ZodString;
|
|
220
|
+
description: z.ZodString;
|
|
221
|
+
aiModel: z.ZodString;
|
|
222
|
+
status: z.ZodEnum<typeof TOOL_MODEL_STATUS>;
|
|
223
|
+
order: z.ZodNumber;
|
|
224
|
+
icons: z.ZodObject<{
|
|
225
|
+
light: z.ZodObject<{
|
|
226
|
+
svg: z.ZodString;
|
|
227
|
+
png: z.ZodString;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
dark: z.ZodObject<{
|
|
230
|
+
svg: z.ZodString;
|
|
231
|
+
png: z.ZodString;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
maxPromptLength: z.ZodNumber;
|
|
235
|
+
maxInputVideoSizeBytes: z.ZodNumber;
|
|
236
|
+
maxInputImageSizeBytes: z.ZodNumber;
|
|
237
|
+
supportedVideoFormats: z.ZodArray<z.ZodString>;
|
|
238
|
+
supportedImageFormats: z.ZodArray<z.ZodString>;
|
|
239
|
+
params: z.ZodObject<{
|
|
240
|
+
resolution: z.ZodObject<{
|
|
241
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
242
|
+
"1080p": "1080p";
|
|
243
|
+
"720p": "720p";
|
|
244
|
+
}>>;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
backgroundSource: z.ZodObject<{
|
|
247
|
+
options: z.ZodArray<z.ZodEnum<{
|
|
248
|
+
image: "image";
|
|
249
|
+
video: "video";
|
|
250
|
+
}>>;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
duration: z.ZodObject<{
|
|
253
|
+
min: z.ZodNumber;
|
|
254
|
+
maxByBackgroundSource: z.ZodObject<{
|
|
255
|
+
image: z.ZodNumber;
|
|
256
|
+
video: z.ZodNumber;
|
|
257
|
+
}, z.core.$strip>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
geometry: z.ZodObject<{
|
|
260
|
+
minWidth: z.ZodNumber;
|
|
261
|
+
minHeight: z.ZodNumber;
|
|
262
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
263
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
264
|
+
minAspectRatio: z.ZodNumber;
|
|
265
|
+
maxAspectRatio: z.ZodNumber;
|
|
266
|
+
}, z.core.$strip>;
|
|
267
|
+
sourceGeometry: z.ZodOptional<z.ZodObject<{
|
|
268
|
+
image: z.ZodObject<{
|
|
269
|
+
minWidth: z.ZodNumber;
|
|
270
|
+
minHeight: z.ZodNumber;
|
|
271
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
minAspectRatio: z.ZodNumber;
|
|
274
|
+
maxAspectRatio: z.ZodNumber;
|
|
275
|
+
}, z.core.$strip>;
|
|
276
|
+
video: z.ZodNullable<z.ZodObject<{
|
|
277
|
+
minWidth: z.ZodNumber;
|
|
278
|
+
minHeight: z.ZodNumber;
|
|
279
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
280
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
minAspectRatio: z.ZodNumber;
|
|
282
|
+
maxAspectRatio: z.ZodNumber;
|
|
283
|
+
}, z.core.$strip>>;
|
|
284
|
+
}, z.core.$strip>>;
|
|
285
|
+
}, z.core.$strip>;
|
|
286
|
+
pricingRules: z.ZodArray<z.ZodObject<{
|
|
287
|
+
resolution: z.ZodEnum<{
|
|
288
|
+
"1080p": "1080p";
|
|
289
|
+
"720p": "720p";
|
|
290
|
+
}>;
|
|
291
|
+
pricePerSecond: z.ZodNumber;
|
|
292
|
+
}, z.core.$strip>>;
|
|
293
|
+
createdAt: z.ZodDate;
|
|
294
|
+
updatedAt: z.ZodDate;
|
|
295
|
+
}, z.core.$strip>>;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
export type MotionControlConfig = z.infer<typeof MotionControlConfigSchema>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MotionControlConfigSchema = exports.MotionControlJobSchema = exports.MotionControlModelSchema = exports.MotionControlPricingRulesSchema = exports.MotionControlModelParamsSchema = exports.MotionControlJobParamsSchema = exports.MotionControlBackgroundSourceSchema = exports.MotionControlResolutionSchema = exports.MotionControlSourceGeometrySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const job_status_enum_1 = require("../tools/enums/job-status.enum");
|
|
7
|
+
exports.MotionControlSourceGeometrySchema = zod_1.z.object({
|
|
8
|
+
minWidth: zod_1.z.number(),
|
|
9
|
+
minHeight: zod_1.z.number(),
|
|
10
|
+
maxWidth: zod_1.z.number().optional(),
|
|
11
|
+
maxHeight: zod_1.z.number().optional(),
|
|
12
|
+
minAspectRatio: zod_1.z.number(),
|
|
13
|
+
maxAspectRatio: zod_1.z.number(),
|
|
14
|
+
});
|
|
15
|
+
exports.MotionControlResolutionSchema = zod_1.z.enum(['720p', '1080p']);
|
|
16
|
+
exports.MotionControlBackgroundSourceSchema = zod_1.z.enum(['image', 'video']);
|
|
17
|
+
exports.MotionControlJobParamsSchema = zod_1.z.object({
|
|
18
|
+
resolution: exports.MotionControlResolutionSchema,
|
|
19
|
+
backgroundSource: exports.MotionControlBackgroundSourceSchema,
|
|
20
|
+
});
|
|
21
|
+
exports.MotionControlModelParamsSchema = zod_1.z.object({
|
|
22
|
+
resolution: zod_1.z.object({ options: zod_1.z.array(exports.MotionControlResolutionSchema) }),
|
|
23
|
+
backgroundSource: zod_1.z.object({ options: zod_1.z.array(exports.MotionControlBackgroundSourceSchema) }),
|
|
24
|
+
duration: zod_1.z.object({
|
|
25
|
+
min: zod_1.z.number().positive(),
|
|
26
|
+
maxByBackgroundSource: zod_1.z.object({
|
|
27
|
+
image: zod_1.z.number().positive(),
|
|
28
|
+
video: zod_1.z.number().positive(),
|
|
29
|
+
}),
|
|
30
|
+
}),
|
|
31
|
+
geometry: exports.MotionControlSourceGeometrySchema,
|
|
32
|
+
sourceGeometry: zod_1.z
|
|
33
|
+
.object({
|
|
34
|
+
image: exports.MotionControlSourceGeometrySchema,
|
|
35
|
+
video: exports.MotionControlSourceGeometrySchema.nullable(),
|
|
36
|
+
})
|
|
37
|
+
.optional(),
|
|
38
|
+
});
|
|
39
|
+
exports.MotionControlPricingRulesSchema = zod_1.z.array(zod_1.z.object({ resolution: exports.MotionControlResolutionSchema, pricePerSecond: zod_1.z.number().positive() }));
|
|
40
|
+
exports.MotionControlModelSchema = zod_1.z.object({
|
|
41
|
+
uuid: zod_1.z.uuid(),
|
|
42
|
+
title: zod_1.z.string(),
|
|
43
|
+
description: zod_1.z.string(),
|
|
44
|
+
aiModel: zod_1.z.string(),
|
|
45
|
+
status: zod_1.z.enum(common_1.TOOL_MODEL_STATUS),
|
|
46
|
+
order: zod_1.z.number(),
|
|
47
|
+
icons: common_1.IconVariantsSchema,
|
|
48
|
+
maxPromptLength: zod_1.z.number(),
|
|
49
|
+
maxInputVideoSizeBytes: zod_1.z.number(),
|
|
50
|
+
maxInputImageSizeBytes: zod_1.z.number(),
|
|
51
|
+
supportedVideoFormats: zod_1.z.array(zod_1.z.string()),
|
|
52
|
+
supportedImageFormats: zod_1.z.array(zod_1.z.string()),
|
|
53
|
+
params: exports.MotionControlModelParamsSchema,
|
|
54
|
+
pricingRules: exports.MotionControlPricingRulesSchema,
|
|
55
|
+
createdAt: zod_1.z.date(),
|
|
56
|
+
updatedAt: zod_1.z.date(),
|
|
57
|
+
});
|
|
58
|
+
exports.MotionControlJobSchema = zod_1.z.object({
|
|
59
|
+
uuid: zod_1.z.uuid(),
|
|
60
|
+
modelId: zod_1.z.uuid(),
|
|
61
|
+
userId: zod_1.z.uuid().nullable(),
|
|
62
|
+
unregisteredUserId: zod_1.z.uuid().nullable(),
|
|
63
|
+
scope: zod_1.z.enum(common_1.JOB_SCOPE),
|
|
64
|
+
prompt: zod_1.z.string(),
|
|
65
|
+
title: zod_1.z.string(),
|
|
66
|
+
status: zod_1.z.enum(job_status_enum_1.JOB_STATUS),
|
|
67
|
+
error: zod_1.z.string().nullable(),
|
|
68
|
+
externalId: zod_1.z.string().nullable(),
|
|
69
|
+
price: zod_1.z.number().int().nonnegative(),
|
|
70
|
+
tokenReservationId: zod_1.z.uuid().nullable(),
|
|
71
|
+
motionVideoFileId: zod_1.z.uuid(),
|
|
72
|
+
motionVideoUrl: zod_1.z.url(),
|
|
73
|
+
characterImageFileId: zod_1.z.uuid(),
|
|
74
|
+
characterImageUrl: zod_1.z.url(),
|
|
75
|
+
duration: zod_1.z.number().positive(),
|
|
76
|
+
resolution: exports.MotionControlResolutionSchema,
|
|
77
|
+
backgroundSource: exports.MotionControlBackgroundSourceSchema,
|
|
78
|
+
params: exports.MotionControlJobParamsSchema,
|
|
79
|
+
outputVideoUrl: zod_1.z.url().nullable(),
|
|
80
|
+
outputVideoId: zod_1.z.string().nullable(),
|
|
81
|
+
previewUrl: zod_1.z.url().nullable(),
|
|
82
|
+
previewId: zod_1.z.string().nullable(),
|
|
83
|
+
reaction: zod_1.z.enum(common_1.USER_REACTION).nullable(),
|
|
84
|
+
dislikeReason: zod_1.z.string().nullable(),
|
|
85
|
+
isFavorite: zod_1.z.boolean(),
|
|
86
|
+
isDeleted: zod_1.z.boolean(),
|
|
87
|
+
isPublished: zod_1.z.boolean(),
|
|
88
|
+
postId: zod_1.z.string().nullable(),
|
|
89
|
+
createdAt: zod_1.z.date(),
|
|
90
|
+
updatedAt: zod_1.z.date(),
|
|
91
|
+
completedAt: zod_1.z.date().nullable(),
|
|
92
|
+
});
|
|
93
|
+
exports.MotionControlConfigSchema = zod_1.z.object({ models: zod_1.z.array(exports.MotionControlModelSchema) });
|