@purpleschool/gptbot-tools 0.0.21 → 0.0.24
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 +91 -0
- package/build/index.js +3 -0
- package/build/stt/commands/index.js +1 -0
- package/build/stt/commands/retry-stt-job.command.js +16 -0
- package/build/stt/routes/stt.amqp.routes.js +1 -0
- package/build/tts/commands/index.js +1 -0
- package/build/tts/commands/retry-tts-job.command.js +16 -0
- package/build/tts/commands/update-tts-job-title.command.js +0 -3
- package/build/tts/routes/tts.amqp.routes.js +1 -0
- package/build/video/commands/delete-all-video-jobs.command.js +13 -0
- package/build/video/commands/delete-video-job-by-uuid.command.js +14 -0
- package/build/video/commands/index.js +22 -0
- package/build/video/commands/retry-video-job.command.js +16 -0
- package/build/video/commands/set-reaction-to-video-job.command.js +17 -0
- package/build/video/commands/update-video-job-title.command.js +16 -0
- package/build/video/commands/video.command.js +21 -0
- package/build/video/const/index.js +17 -0
- package/build/video/const/videoMaxDuration.js +4 -0
- package/build/video/enums/index.js +24 -0
- package/build/video/enums/veo-aspect-ratio.enum.js +8 -0
- package/build/video/enums/veo-audio-support.enum.js +8 -0
- package/build/video/enums/veo-input-modality.enum.js +8 -0
- package/build/video/enums/veo-job-params-type.enum.js +8 -0
- package/build/video/enums/veo-person-allow.enum.js +9 -0
- package/build/video/enums/video-model-type.enum.js +8 -0
- package/build/video/enums/video-resolution.enum.js +8 -0
- package/build/video/enums/video-strategy.enum.js +8 -0
- package/build/video/index.js +21 -0
- package/build/video/models/index.js +19 -0
- package/build/video/models/video-config.schema.js +8 -0
- package/build/video/models/video-job.schema.js +30 -0
- package/build/video/models/video-model.schema.js +29 -0
- package/build/video/queries/find-video-job-by-id.query.js +10 -0
- package/build/video/queries/find-video-jobs.query.js +28 -0
- package/build/video/queries/get-video-config.query.js +9 -0
- package/build/video/queries/index.js +19 -0
- package/build/video/routes/index.js +18 -0
- package/build/video/routes/video.amqp.routes.js +14 -0
- package/build/video/routes/video.http.routes.js +7 -0
- package/common/errors/errors.ts +91 -0
- package/index.ts +3 -0
- package/package.json +1 -1
- package/stt/commands/index.ts +1 -0
- package/stt/commands/retry-stt-job.command.ts +16 -0
- package/stt/routes/stt.amqp.routes.ts +1 -0
- package/tts/commands/index.ts +1 -0
- package/tts/commands/retry-tts-job.command.ts +16 -0
- package/tts/commands/update-tts-job-title.command.ts +0 -5
- package/tts/routes/tts.amqp.routes.ts +1 -0
- package/video/commands/delete-all-video-jobs.command.ts +13 -0
- package/video/commands/delete-video-job-by-uuid.command.ts +14 -0
- package/video/commands/index.ts +6 -0
- package/video/commands/retry-video-job.command.ts +16 -0
- package/video/commands/set-reaction-to-video-job.command.ts +17 -0
- package/video/commands/update-video-job-title.command.ts +16 -0
- package/video/commands/video.command.ts +21 -0
- package/video/const/index.ts +1 -0
- package/video/const/videoMaxDuration.ts +1 -0
- package/video/enums/index.ts +8 -0
- package/video/enums/veo-aspect-ratio.enum.ts +4 -0
- package/video/enums/veo-audio-support.enum.ts +4 -0
- package/video/enums/veo-input-modality.enum.ts +4 -0
- package/video/enums/veo-job-params-type.enum.ts +4 -0
- package/video/enums/veo-person-allow.enum.ts +5 -0
- package/video/enums/video-model-type.enum.ts +4 -0
- package/video/enums/video-resolution.enum.ts +4 -0
- package/video/enums/video-strategy.enum.ts +4 -0
- package/video/index.ts +5 -0
- package/video/models/index.ts +3 -0
- package/video/models/video-config.schema.ts +8 -0
- package/video/models/video-job.schema.ts +33 -0
- package/video/models/video-model.schema.ts +32 -0
- package/video/queries/find-video-job-by-id.query.ts +11 -0
- package/video/queries/find-video-jobs.query.ts +33 -0
- package/video/queries/get-video-config.query.ts +8 -0
- package/video/queries/index.ts +3 -0
- package/video/routes/index.ts +2 -0
- package/video/routes/video.amqp.routes.ts +11 -0
- package/video/routes/video.http.routes.ts +5 -0
|
@@ -170,6 +170,11 @@ exports.ERRORS = {
|
|
|
170
170
|
message: 'Произошла ошибка при удалении задания STT',
|
|
171
171
|
httpCode: 500,
|
|
172
172
|
},
|
|
173
|
+
NOT_IN_FAILED_STATE_TO_RETRY: {
|
|
174
|
+
code: 'STT_JOB.NOT_IN_FAILED_STATE_TO_RETRY',
|
|
175
|
+
message: 'Задание STT не в состоянии "failed". Невозможно повторить',
|
|
176
|
+
httpCode: 400,
|
|
177
|
+
},
|
|
173
178
|
},
|
|
174
179
|
TTS: {
|
|
175
180
|
AI_ERROR: {
|
|
@@ -236,5 +241,91 @@ exports.ERRORS = {
|
|
|
236
241
|
message: 'Пользователь не является владельцем данного сообщения',
|
|
237
242
|
httpCode: 403,
|
|
238
243
|
},
|
|
244
|
+
NOT_IN_FAILED_STATE_TO_RETRY: {
|
|
245
|
+
code: 'TTS_JOB.NOT_IN_FAILED_STATE_TO_RETRY',
|
|
246
|
+
message: 'Задание TTS не в состоянии "failed". Невозможно повторить',
|
|
247
|
+
httpCode: 400,
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
VIDEO: {
|
|
251
|
+
AI_ERROR: {
|
|
252
|
+
code: 'VIDEO.AI_ERROR',
|
|
253
|
+
message: 'Произошла ошибка во время запроса к ИИ',
|
|
254
|
+
httpCode: 500,
|
|
255
|
+
},
|
|
256
|
+
INSUFFICIENT_BALANCE: {
|
|
257
|
+
code: 'VIDEO.INSUFFICIENT_BALANCE',
|
|
258
|
+
message: 'У пользователя недостаточно средств',
|
|
259
|
+
httpCode: 400,
|
|
260
|
+
},
|
|
261
|
+
INVALID_PARAMS: {
|
|
262
|
+
code: 'VIDEO.INVALID_PARAMS',
|
|
263
|
+
message: 'Некорректные параметры видео',
|
|
264
|
+
httpCode: 400,
|
|
265
|
+
},
|
|
266
|
+
DELETE_ERROR: {
|
|
267
|
+
code: 'VIDEO.DELETE_ERROR',
|
|
268
|
+
message: 'Произошла ошибка при удалении генерации видео',
|
|
269
|
+
httpCode: 500,
|
|
270
|
+
},
|
|
271
|
+
INVALID_DURATION: {
|
|
272
|
+
code: 'VIDEO.INVALID_DURATION',
|
|
273
|
+
message: 'Некорректная длительность видео',
|
|
274
|
+
httpCode: 400,
|
|
275
|
+
},
|
|
276
|
+
MAX_PROMPT_LENGTH_EXCEEDED: {
|
|
277
|
+
code: 'VIDEO.MAX_PROMPT_LENGTH_EXCEEDED',
|
|
278
|
+
message: 'Превышена максимальная длина запроса',
|
|
279
|
+
httpCode: 400,
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
VIDEO_MODEL: {
|
|
283
|
+
SAVE_ERROR: {
|
|
284
|
+
code: 'VIDEO_MODEL.SAVE_ERROR',
|
|
285
|
+
message: 'Произошла ошибка при сохранении модели для генерации видео',
|
|
286
|
+
httpCode: 500,
|
|
287
|
+
},
|
|
288
|
+
FIND_ERROR: {
|
|
289
|
+
code: 'VIDEO_MODEL.FIND_ERROR',
|
|
290
|
+
message: 'Произошла ошибка при поиске модели для генерации видео',
|
|
291
|
+
httpCode: 500,
|
|
292
|
+
},
|
|
293
|
+
NOT_FOUND: {
|
|
294
|
+
code: 'VIDEO_MODEL.NOT_FOUND',
|
|
295
|
+
message: 'Модель для генерации видео не найдена',
|
|
296
|
+
httpCode: 404,
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
VIDEO_JOB: {
|
|
300
|
+
SAVE_ERROR: {
|
|
301
|
+
code: 'VIDEO_JOB.SAVE_ERROR',
|
|
302
|
+
message: 'Произошла ошибка при сохранении задания на генерацию видео',
|
|
303
|
+
httpCode: 500,
|
|
304
|
+
},
|
|
305
|
+
FIND_ERROR: {
|
|
306
|
+
code: 'VIDEO_JOB.FIND_ERROR',
|
|
307
|
+
message: 'Произошла ошибка при поиске задания на генерацию видео',
|
|
308
|
+
httpCode: 500,
|
|
309
|
+
},
|
|
310
|
+
NOT_FOUND: {
|
|
311
|
+
code: 'VIDEO_JOB.NOT_FOUND',
|
|
312
|
+
message: 'Задание на генерацию видео не найдено',
|
|
313
|
+
httpCode: 404,
|
|
314
|
+
},
|
|
315
|
+
NOT_AN_OWNER: {
|
|
316
|
+
code: 'VIDEO_JOB.NOT_AN_OWNER',
|
|
317
|
+
message: 'Пользователь не является владельцем задания на генерацию видео',
|
|
318
|
+
httpCode: 403,
|
|
319
|
+
},
|
|
320
|
+
NOT_IN_FAILED_STATE_TO_RETRY: {
|
|
321
|
+
code: 'VIDEO_JOB.NOT_IN_FAILED_STATE_TO_RETRY',
|
|
322
|
+
message: 'Задание на генерацию видео не в состоянии "failed". Невозможно повторить',
|
|
323
|
+
httpCode: 400,
|
|
324
|
+
},
|
|
325
|
+
DELETE_ERROR: {
|
|
326
|
+
code: 'VIDEO_JOB.DELETE_ERROR',
|
|
327
|
+
message: 'Произошла ошибка при удалении задания на генерацию видео',
|
|
328
|
+
httpCode: 500,
|
|
329
|
+
},
|
|
239
330
|
},
|
|
240
331
|
};
|
package/build/index.js
CHANGED
|
@@ -42,11 +42,13 @@ __exportStar(require("./paraphrase"), exports);
|
|
|
42
42
|
__exportStar(require("./tools"), exports);
|
|
43
43
|
__exportStar(require("./stt"), exports);
|
|
44
44
|
__exportStar(require("./tts"), exports);
|
|
45
|
+
__exportStar(require("./video"), exports);
|
|
45
46
|
const common = __importStar(require("./common"));
|
|
46
47
|
const paraphrase = __importStar(require("./paraphrase"));
|
|
47
48
|
const tools = __importStar(require("./tools"));
|
|
48
49
|
const stt = __importStar(require("./stt"));
|
|
49
50
|
const tts = __importStar(require("./tts"));
|
|
51
|
+
const video = __importStar(require("./video"));
|
|
50
52
|
var ToolService;
|
|
51
53
|
(function (ToolService) {
|
|
52
54
|
ToolService.Common = common;
|
|
@@ -54,4 +56,5 @@ var ToolService;
|
|
|
54
56
|
ToolService.Tools = tools;
|
|
55
57
|
ToolService.TTS = tts;
|
|
56
58
|
ToolService.STT = stt;
|
|
59
|
+
ToolService.Video = video;
|
|
57
60
|
})(ToolService || (exports.ToolService = ToolService = {}));
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./delete-stt-job-by-uuid.command"), exports);
|
|
18
18
|
__exportStar(require("./delete-all-stt-jobs.command"), exports);
|
|
19
|
+
__exportStar(require("./retry-stt-job.command"), exports);
|
|
19
20
|
__exportStar(require("./set-reaction-to-stt-job.command"), exports);
|
|
20
21
|
__exportStar(require("./stt.command"), exports);
|
|
21
22
|
__exportStar(require("./update-stt-job-title.command"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetrySTTJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var RetrySTTJobCommand;
|
|
8
|
+
(function (RetrySTTJobCommand) {
|
|
9
|
+
RetrySTTJobCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userBalance: zod_1.z.number(),
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
});
|
|
15
|
+
RetrySTTJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.STTJobSchema);
|
|
16
|
+
})(RetrySTTJobCommand || (exports.RetrySTTJobCommand = RetrySTTJobCommand = {}));
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./delete-tts-job-by-uuid.command"), exports);
|
|
18
18
|
__exportStar(require("./delete-all-tts-jobs.command"), exports);
|
|
19
|
+
__exportStar(require("./retry-tts-job.command"), exports);
|
|
19
20
|
__exportStar(require("./set-reaction-to-tts-job.command"), exports);
|
|
20
21
|
__exportStar(require("./tts.command"), exports);
|
|
21
22
|
__exportStar(require("./update-tts-job-title.command"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetryTTSJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const tts_job_schema_1 = require("../models/tts-job.schema");
|
|
7
|
+
var RetryTTSJobCommand;
|
|
8
|
+
(function (RetryTTSJobCommand) {
|
|
9
|
+
RetryTTSJobCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userBalance: zod_1.z.number(),
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
});
|
|
15
|
+
RetryTTSJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(tts_job_schema_1.TTSJobSchema);
|
|
16
|
+
})(RetryTTSJobCommand || (exports.RetryTTSJobCommand = RetryTTSJobCommand = {}));
|
|
@@ -12,8 +12,5 @@ var UpdateTTSJobTitleCommand;
|
|
|
12
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
title: zod_1.z.string().min(1).max(40),
|
|
14
14
|
});
|
|
15
|
-
UpdateTTSJobTitleCommand.RequestParamsSchema = zod_1.z.object({
|
|
16
|
-
uuid: zod_1.z.string(),
|
|
17
|
-
});
|
|
18
15
|
UpdateTTSJobTitleCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(tts_job_schema_1.TTSJobSchema);
|
|
19
16
|
})(UpdateTTSJobTitleCommand || (exports.UpdateTTSJobTitleCommand = UpdateTTSJobTitleCommand = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteAllVideoJobsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DeleteAllVideoJobsCommand;
|
|
7
|
+
(function (DeleteAllVideoJobsCommand) {
|
|
8
|
+
DeleteAllVideoJobsCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
});
|
|
12
|
+
DeleteAllVideoJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
13
|
+
})(DeleteAllVideoJobsCommand || (exports.DeleteAllVideoJobsCommand = DeleteAllVideoJobsCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteVideoJobByUuidCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DeleteVideoJobByUuidCommand;
|
|
7
|
+
(function (DeleteVideoJobByUuidCommand) {
|
|
8
|
+
DeleteVideoJobByUuidCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
uuid: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
DeleteVideoJobByUuidCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
14
|
+
})(DeleteVideoJobByUuidCommand || (exports.DeleteVideoJobByUuidCommand = DeleteVideoJobByUuidCommand = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
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("./delete-video-job-by-uuid.command"), exports);
|
|
18
|
+
__exportStar(require("./delete-all-video-jobs.command"), exports);
|
|
19
|
+
__exportStar(require("./retry-video-job.command"), exports);
|
|
20
|
+
__exportStar(require("./set-reaction-to-video-job.command"), exports);
|
|
21
|
+
__exportStar(require("./video.command"), exports);
|
|
22
|
+
__exportStar(require("./update-video-job-title.command"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetryVideoJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const video_job_schema_1 = require("../models/video-job.schema");
|
|
7
|
+
var RetryVideoJobCommand;
|
|
8
|
+
(function (RetryVideoJobCommand) {
|
|
9
|
+
RetryVideoJobCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userBalance: zod_1.z.number(),
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
});
|
|
15
|
+
RetryVideoJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
|
|
16
|
+
})(RetryVideoJobCommand || (exports.RetryVideoJobCommand = RetryVideoJobCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetReactionToVideoJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const video_job_schema_1 = require("../models/video-job.schema");
|
|
7
|
+
const common_1 = require("../../common");
|
|
8
|
+
var SetReactionToVideoJobCommand;
|
|
9
|
+
(function (SetReactionToVideoJobCommand) {
|
|
10
|
+
SetReactionToVideoJobCommand.RequestSchema = zod_1.z.object({
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
uuid: zod_1.z.string(),
|
|
14
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
15
|
+
});
|
|
16
|
+
SetReactionToVideoJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
|
|
17
|
+
})(SetReactionToVideoJobCommand || (exports.SetReactionToVideoJobCommand = SetReactionToVideoJobCommand = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateVideoJobTitleCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const video_job_schema_1 = require("../models/video-job.schema");
|
|
7
|
+
var UpdateVideoJobTitleCommand;
|
|
8
|
+
(function (UpdateVideoJobTitleCommand) {
|
|
9
|
+
UpdateVideoJobTitleCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
title: zod_1.z.string().min(1).max(40),
|
|
14
|
+
});
|
|
15
|
+
UpdateVideoJobTitleCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
|
|
16
|
+
})(UpdateVideoJobTitleCommand || (exports.UpdateVideoJobTitleCommand = UpdateVideoJobTitleCommand = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VideoCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const video_job_schema_1 = require("../models/video-job.schema");
|
|
7
|
+
var VideoCommand;
|
|
8
|
+
(function (VideoCommand) {
|
|
9
|
+
VideoCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
prompt: zod_1.z.string(),
|
|
13
|
+
userBalance: zod_1.z.number(),
|
|
14
|
+
modelId: zod_1.z.string(),
|
|
15
|
+
params: zod_1.z.object({
|
|
16
|
+
imageUrls: zod_1.z.string().array().optional(),
|
|
17
|
+
duration: zod_1.z.number(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
VideoCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
|
|
21
|
+
})(VideoCommand || (exports.VideoCommand = VideoCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./videoMaxDuration"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
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("./video-model-type.enum"), exports);
|
|
18
|
+
__exportStar(require("./video-strategy.enum"), exports);
|
|
19
|
+
__exportStar(require("./veo-input-modality.enum"), exports);
|
|
20
|
+
__exportStar(require("./veo-audio-support.enum"), exports);
|
|
21
|
+
__exportStar(require("./veo-aspect-ratio.enum"), exports);
|
|
22
|
+
__exportStar(require("./veo-person-allow.enum"), exports);
|
|
23
|
+
__exportStar(require("./veo-job-params-type.enum"), exports);
|
|
24
|
+
__exportStar(require("./video-resolution.enum"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VEO_ASPECT_RATIO = void 0;
|
|
4
|
+
var VEO_ASPECT_RATIO;
|
|
5
|
+
(function (VEO_ASPECT_RATIO) {
|
|
6
|
+
VEO_ASPECT_RATIO["HORIZONTAL"] = "16:9";
|
|
7
|
+
VEO_ASPECT_RATIO["VERTICAL"] = "9:16";
|
|
8
|
+
})(VEO_ASPECT_RATIO || (exports.VEO_ASPECT_RATIO = VEO_ASPECT_RATIO = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VEO_AUDIO_SUPPORT = void 0;
|
|
4
|
+
var VEO_AUDIO_SUPPORT;
|
|
5
|
+
(function (VEO_AUDIO_SUPPORT) {
|
|
6
|
+
VEO_AUDIO_SUPPORT["NONE"] = "NONE";
|
|
7
|
+
VEO_AUDIO_SUPPORT["NATIVE"] = "NATIVE";
|
|
8
|
+
})(VEO_AUDIO_SUPPORT || (exports.VEO_AUDIO_SUPPORT = VEO_AUDIO_SUPPORT = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VEO_INPUT_MODALITY = void 0;
|
|
4
|
+
var VEO_INPUT_MODALITY;
|
|
5
|
+
(function (VEO_INPUT_MODALITY) {
|
|
6
|
+
VEO_INPUT_MODALITY["TEXT"] = "TEXT_TO_VIDEO";
|
|
7
|
+
VEO_INPUT_MODALITY["TEXT_IMAGE"] = "TEXT_IMAGE_TO_VIDEO";
|
|
8
|
+
})(VEO_INPUT_MODALITY || (exports.VEO_INPUT_MODALITY = VEO_INPUT_MODALITY = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VEO_JOB_PARAMS_TYPE = void 0;
|
|
4
|
+
var VEO_JOB_PARAMS_TYPE;
|
|
5
|
+
(function (VEO_JOB_PARAMS_TYPE) {
|
|
6
|
+
VEO_JOB_PARAMS_TYPE["VEO2"] = "veo2";
|
|
7
|
+
VEO_JOB_PARAMS_TYPE["VEO3"] = "veo3";
|
|
8
|
+
})(VEO_JOB_PARAMS_TYPE || (exports.VEO_JOB_PARAMS_TYPE = VEO_JOB_PARAMS_TYPE = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VEO_PERSON_ALLOW = void 0;
|
|
4
|
+
var VEO_PERSON_ALLOW;
|
|
5
|
+
(function (VEO_PERSON_ALLOW) {
|
|
6
|
+
VEO_PERSON_ALLOW["ALLOW_ALL"] = "allow_all";
|
|
7
|
+
VEO_PERSON_ALLOW["ALLOW_ADULT"] = "allow_adult";
|
|
8
|
+
VEO_PERSON_ALLOW["DONT_ALLOW"] = "dont_allow";
|
|
9
|
+
})(VEO_PERSON_ALLOW || (exports.VEO_PERSON_ALLOW = VEO_PERSON_ALLOW = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VEO_MODEL_TYPE = void 0;
|
|
4
|
+
var VEO_MODEL_TYPE;
|
|
5
|
+
(function (VEO_MODEL_TYPE) {
|
|
6
|
+
VEO_MODEL_TYPE["VEO_3"] = "veo3";
|
|
7
|
+
VEO_MODEL_TYPE["VEO_3_FAST"] = "veo3_fast";
|
|
8
|
+
})(VEO_MODEL_TYPE || (exports.VEO_MODEL_TYPE = VEO_MODEL_TYPE = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VIDEO_RESOLUTION = void 0;
|
|
4
|
+
var VIDEO_RESOLUTION;
|
|
5
|
+
(function (VIDEO_RESOLUTION) {
|
|
6
|
+
VIDEO_RESOLUTION["STANDART"] = "720p";
|
|
7
|
+
VIDEO_RESOLUTION["HIGH"] = "1080p";
|
|
8
|
+
})(VIDEO_RESOLUTION || (exports.VIDEO_RESOLUTION = VIDEO_RESOLUTION = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VIDEO_GENERATION_STRATEGY = void 0;
|
|
4
|
+
var VIDEO_GENERATION_STRATEGY;
|
|
5
|
+
(function (VIDEO_GENERATION_STRATEGY) {
|
|
6
|
+
VIDEO_GENERATION_STRATEGY["VEO_POLLING"] = "VEO_POLLING";
|
|
7
|
+
VIDEO_GENERATION_STRATEGY["VEO_CALLBACK"] = "VEO_CALLBACK";
|
|
8
|
+
})(VIDEO_GENERATION_STRATEGY || (exports.VIDEO_GENERATION_STRATEGY = VIDEO_GENERATION_STRATEGY = {}));
|
|
@@ -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("./commands"), exports);
|
|
18
|
+
__exportStar(require("./enums"), exports);
|
|
19
|
+
__exportStar(require("./models"), exports);
|
|
20
|
+
__exportStar(require("./queries"), exports);
|
|
21
|
+
__exportStar(require("./routes"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./video-config.schema"), exports);
|
|
18
|
+
__exportStar(require("./video-job.schema"), exports);
|
|
19
|
+
__exportStar(require("./video-model.schema"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VideoConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const video_model_schema_1 = require("./video-model.schema");
|
|
6
|
+
exports.VideoConfigSchema = zod_1.z.object({
|
|
7
|
+
models: zod_1.z.array(video_model_schema_1.VideoModelSchema),
|
|
8
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VideoJobSchema = exports.VideoJobParamsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tools_1 = require("../../tools");
|
|
6
|
+
const common_1 = require("../../common");
|
|
7
|
+
exports.VideoJobParamsSchema = zod_1.z.object({
|
|
8
|
+
imageUrls: zod_1.z.string().array().optional(),
|
|
9
|
+
duration: zod_1.z.number().optional(),
|
|
10
|
+
});
|
|
11
|
+
exports.VideoJobSchema = zod_1.z.object({
|
|
12
|
+
uuid: zod_1.z.string(),
|
|
13
|
+
prompt: zod_1.z.string(),
|
|
14
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
15
|
+
externalId: zod_1.z.string().nullable(),
|
|
16
|
+
title: zod_1.z.string(),
|
|
17
|
+
status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
|
|
18
|
+
error: zod_1.z.string().nullable(),
|
|
19
|
+
modelId: zod_1.z.string(),
|
|
20
|
+
price: zod_1.z.number(),
|
|
21
|
+
params: exports.VideoJobParamsSchema,
|
|
22
|
+
videoUrl: zod_1.z.string().nullable(),
|
|
23
|
+
attempts: zod_1.z.array(zod_1.z.any()),
|
|
24
|
+
userId: zod_1.z.string().nullable().optional(),
|
|
25
|
+
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
26
|
+
isDeleted: zod_1.z.boolean(),
|
|
27
|
+
createdAt: zod_1.z.date(),
|
|
28
|
+
completedAt: zod_1.z.date().nullable().optional(),
|
|
29
|
+
updatedAt: zod_1.z.date(),
|
|
30
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VideoModelSchema = exports.VideoModelParamsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const enums_1 = require("../enums");
|
|
7
|
+
exports.VideoModelParamsSchema = zod_1.z.object({
|
|
8
|
+
imageAttachment: zod_1.z.object({
|
|
9
|
+
supported: zod_1.z.boolean(),
|
|
10
|
+
maxImages: zod_1.z.number(),
|
|
11
|
+
}),
|
|
12
|
+
duration: zod_1.z.object({
|
|
13
|
+
options: zod_1.z.array(zod_1.z.number()),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
exports.VideoModelSchema = zod_1.z.object({
|
|
17
|
+
uuid: zod_1.z.string(),
|
|
18
|
+
title: zod_1.z.string(),
|
|
19
|
+
description: zod_1.z.string(),
|
|
20
|
+
aiModel: zod_1.z.string(),
|
|
21
|
+
pricePerSecond: zod_1.z.number(),
|
|
22
|
+
order: zod_1.z.number(),
|
|
23
|
+
icons: common_1.IconVariantsSchema,
|
|
24
|
+
strategy: zod_1.z.nativeEnum(enums_1.VIDEO_GENERATION_STRATEGY),
|
|
25
|
+
maxInputLength: zod_1.z.number(),
|
|
26
|
+
params: exports.VideoModelParamsSchema,
|
|
27
|
+
createdAt: zod_1.z.date(),
|
|
28
|
+
updatedAt: zod_1.z.date(),
|
|
29
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindVideoJobByIdQuery = void 0;
|
|
4
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
5
|
+
const video_job_schema_1 = require("../models/video-job.schema");
|
|
6
|
+
var FindVideoJobByIdQuery;
|
|
7
|
+
(function (FindVideoJobByIdQuery) {
|
|
8
|
+
FindVideoJobByIdQuery.RequestSchema = video_job_schema_1.VideoJobSchema.pick({ uuid: true });
|
|
9
|
+
FindVideoJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
|
|
10
|
+
})(FindVideoJobByIdQuery || (exports.FindVideoJobByIdQuery = FindVideoJobByIdQuery = {}));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindVideoJobsQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const video_job_schema_1 = require("../models/video-job.schema");
|
|
7
|
+
var FindVideoJobsQuery;
|
|
8
|
+
(function (FindVideoJobsQuery) {
|
|
9
|
+
FindVideoJobsQuery.RequestSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
userId: zod_1.z.string().uuid().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().optional(),
|
|
13
|
+
title: zod_1.z.string().optional(),
|
|
14
|
+
limit: zod_1.z.coerce.number().min(1).optional(),
|
|
15
|
+
offset: zod_1.z.coerce.number().min(0).default(0).optional(),
|
|
16
|
+
})
|
|
17
|
+
.refine((data) => {
|
|
18
|
+
return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
|
|
19
|
+
}, {
|
|
20
|
+
message: 'At least userId or unregisteredUserId must be present',
|
|
21
|
+
path: ['userId', 'unregisteredUserId'],
|
|
22
|
+
});
|
|
23
|
+
FindVideoJobsQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
|
|
24
|
+
data: zod_1.z.array(video_job_schema_1.VideoJobSchema),
|
|
25
|
+
page: zod_1.z.number(),
|
|
26
|
+
totalPages: zod_1.z.number(),
|
|
27
|
+
}));
|
|
28
|
+
})(FindVideoJobsQuery || (exports.FindVideoJobsQuery = FindVideoJobsQuery = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetVideoConfigQuery = void 0;
|
|
4
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
5
|
+
const models_1 = require("../models");
|
|
6
|
+
var GetVideoConfigQuery;
|
|
7
|
+
(function (GetVideoConfigQuery) {
|
|
8
|
+
GetVideoConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoConfigSchema);
|
|
9
|
+
})(GetVideoConfigQuery || (exports.GetVideoConfigQuery = GetVideoConfigQuery = {}));
|