@purpleschool/gptbot-tools 0.1.134 → 0.2.0-stage
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/account-merge/commands/index.ts +1 -0
- package/account-merge/commands/transfer-user-jobs.command.ts +13 -0
- package/account-merge/index.ts +2 -0
- package/account-merge/routes/account-merge.amqp.routes.ts +3 -0
- package/account-merge/routes/index.ts +1 -0
- package/analytics/index.ts +1 -0
- package/analytics/job-model-analytics/commands/get-job-model-analytics.command.ts +12 -0
- package/analytics/job-model-analytics/commands/index.ts +1 -0
- package/analytics/job-model-analytics/index.ts +2 -0
- package/analytics/job-model-analytics/routes/index.ts +1 -0
- package/analytics/job-model-analytics/routes/job-model-analytics.http.routes.ts +5 -0
- package/build/account-merge/commands/index.js +17 -0
- package/build/account-merge/commands/transfer-user-jobs.command.js +13 -0
- package/build/account-merge/index.js +18 -0
- package/build/account-merge/routes/account-merge.amqp.routes.js +6 -0
- package/build/account-merge/routes/index.js +17 -0
- package/build/analytics/index.js +17 -0
- package/build/analytics/job-model-analytics/commands/get-job-model-analytics.command.js +11 -0
- package/build/analytics/job-model-analytics/commands/index.js +17 -0
- package/build/analytics/job-model-analytics/index.js +18 -0
- package/build/analytics/job-model-analytics/routes/index.js +17 -0
- package/build/analytics/job-model-analytics/routes/job-model-analytics.http.routes.js +7 -0
- package/build/common/enums/file-type.enum.js +8 -0
- package/build/common/enums/index.js +1 -0
- package/build/common/enums/reasoning-effort.enum.js +6 -1
- package/build/image-editor/commands/image-editor.command.js +1 -0
- package/build/image-editor/models/image-editor-job.schema.js +2 -0
- package/build/image-editor/models/image-editor-model.schema.js +6 -0
- package/build/image-generation/models/image-generation-job.schema.js +1 -0
- package/build/image-generation/models/image-generation-model.schema.js +1 -0
- package/build/image-generation/queries/find-image-generation-jobs.query.js +2 -0
- package/build/index.js +15 -0
- package/build/marketplace-card/commands/execute-marketplace-card.command.js +7 -0
- package/build/marketplace-card/commands/index.js +2 -0
- package/build/marketplace-card/commands/soft-delete-all-marketplace-card-jobs.command.js +13 -0
- package/build/marketplace-card/commands/update-title-marketplace-card-job.command.js +16 -0
- package/build/marketplace-card/models/index.js +1 -0
- package/build/marketplace-card/models/marketplace-card-config.schema.js +2 -0
- package/build/marketplace-card/routes/marketplace-card.amqp.routes.js +2 -0
- package/build/presentation/commands/create-presentation.command.js +3 -0
- package/build/presentation/commands/generate-slides.command.js +1 -0
- package/build/presentation/commands/get-presentation-slides-generation-price.command.js +1 -0
- package/build/presentation/commands/index.js +1 -0
- package/build/presentation/commands/reposition-slide.command.js +16 -0
- package/build/presentation/enums/index.js +1 -0
- package/build/presentation/enums/presentation-target-audience.enum.js +10 -0
- package/build/presentation/models/index.js +1 -0
- package/build/presentation/models/presentation-template.schema.js +2 -0
- package/build/presentation/models/presentation-title-page.schema.js +9 -0
- package/build/presentation/models/presentation.schema.js +4 -0
- package/build/presentation/models/slide-content-edit.schema.js +24 -12
- package/build/presentation/models/slide-content.schema.js +215 -73
- package/build/presentation/routes/presentation.routes.js +4 -1
- package/build/solving-edu-task/commands/delete-all-solving-edu-task-jobs.command.js +13 -0
- package/build/solving-edu-task/commands/delete-solving-edu-task-job-by-uuid.command.js +14 -0
- package/build/solving-edu-task/commands/get-solving-edu-task-price.command.js +15 -0
- package/build/solving-edu-task/commands/index.js +23 -0
- package/build/solving-edu-task/commands/retry-solving-edu-task-job.command.js +25 -0
- package/build/solving-edu-task/commands/set-reaction-to-solving-edu-task-job.command.js +27 -0
- package/build/solving-edu-task/commands/solving-edu-task.command.js +22 -0
- package/build/solving-edu-task/commands/update-solving-edu-task-job-title.command.js +16 -0
- package/build/solving-edu-task/index.js +20 -0
- package/build/solving-edu-task/models/index.js +19 -0
- package/build/solving-edu-task/models/solving-edu-task-config.schema.js +8 -0
- package/build/solving-edu-task/models/solving-edu-task-job.schema.js +32 -0
- package/build/solving-edu-task/models/solving-edu-task-model.schema.js +27 -0
- package/build/solving-edu-task/queries/find-solving-edu-task-job-by-id.query.js +15 -0
- package/build/solving-edu-task/queries/find-solving-edu-task-jobs.query.js +28 -0
- package/build/solving-edu-task/queries/get-solving-edu-task-config.query.js +11 -0
- package/build/solving-edu-task/queries/index.js +19 -0
- package/build/solving-edu-task/routes/index.js +17 -0
- package/build/solving-edu-task/routes/solving-edu-task.amqp.routes.js +15 -0
- package/build/spell-corrector/commands/delete-all-spell-corrector-jobs.command.js +13 -0
- package/build/spell-corrector/commands/delete-spell-corrector-job-by-uuid.command.js +14 -0
- package/build/spell-corrector/commands/get-spell-corrector-price.command.js +15 -0
- package/build/spell-corrector/commands/index.js +23 -0
- package/build/spell-corrector/commands/retry-spell-corrector-job.command.js +17 -0
- package/build/spell-corrector/commands/set-reaction-to-spell-corrector-job.command.js +27 -0
- package/build/spell-corrector/commands/spell-corrector.command.js +18 -0
- package/build/spell-corrector/commands/update-spell-corrector-job-title.command.js +16 -0
- package/build/spell-corrector/index.js +20 -0
- package/build/spell-corrector/models/index.js +19 -0
- package/build/spell-corrector/models/spell-corrector-job.schema.js +25 -0
- package/build/spell-corrector/models/spell-corrector-model.schema.js +18 -0
- package/build/spell-corrector/models/spell-corrector-tool-config.schema.js +9 -0
- package/build/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.js +10 -0
- package/build/spell-corrector/queries/find-spell-corrector-jobs.query.js +28 -0
- package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.js +9 -0
- package/build/spell-corrector/queries/index.js +19 -0
- package/build/spell-corrector/routes/index.js +17 -0
- package/build/spell-corrector/routes/spell-corrector.amqp.routes.js +15 -0
- package/build/stt/models/stt-response.schema.js +2 -0
- package/build/tool-workspace/commands/index.js +18 -0
- package/build/tool-workspace/commands/soft-delete-tool-workspace.command.js +21 -0
- package/build/tool-workspace/commands/update-tool-workspace.command.js +26 -0
- package/build/tool-workspace/enums/index.js +18 -0
- package/build/tool-workspace/enums/tool-workspace-item-slot.enum.js +9 -0
- package/build/tool-workspace/enums/tool-workspace-status.enum.js +8 -0
- package/build/tool-workspace/index.js +21 -0
- package/build/tool-workspace/models/index.js +20 -0
- package/build/tool-workspace/models/tool-workspace-contents.schema.js +10 -0
- package/build/tool-workspace/models/tool-workspace-item.schema.js +17 -0
- package/build/tool-workspace/models/tool-workspace-job.schema.js +17 -0
- package/build/tool-workspace/models/tool-workspace.schema.js +17 -0
- package/build/tool-workspace/queries/find-tool-workspace-by-uuid.query.js +22 -0
- package/build/tool-workspace/queries/find-tool-workspaces.query.js +30 -0
- package/build/tool-workspace/queries/index.js +18 -0
- package/build/tool-workspace/routes/index.js +17 -0
- package/build/tool-workspace/routes/tool-workspace.amqp.routes.js +9 -0
- package/build/tools/enums/tool-content-type.enum.js +3 -1
- package/build/tools/enums/tool-type.enum.js +2 -0
- package/build/tools/models/global-tools-config.schema.js +4 -0
- package/build/tools/models/tools-with-configs.schema.js +10 -0
- package/build/video/commands/video.command.js +7 -0
- package/build/video/const/videoMaxDuration.js +1 -1
- package/build/video/enums/video-resolution.enum.js +1 -0
- package/build/video/enums/video-strategy.enum.js +1 -0
- package/build/video/models/video-config.schema.js +2 -0
- package/build/video/models/video-model.schema.js +1 -0
- package/build/video-editor/commands/edit-video.command.js +1 -0
- package/build/video-editor/commands/get-video-editor-price.command.js +2 -0
- package/build/video-editor/commands/retry-video-editor-job.command.js +1 -0
- package/build/video-editor/enums/index.js +1 -0
- package/build/video-editor/enums/video-editor-pricing-rule-type.enum.js +8 -0
- package/build/video-editor/models/video-editor-job.schema.js +7 -1
- package/build/video-editor/models/video-editor-model.schema.js +28 -1
- package/build/video-editor/utils/calculate-video-editing-price.js +24 -2
- package/build/writer/commands/collect-sources.command.js +15 -0
- package/build/writer/commands/confirm-source-citation-metadata.command.js +18 -0
- package/build/writer/commands/discard-writer-source.command.js +16 -0
- package/build/writer/commands/generate-document-outline.command.js +17 -0
- package/build/writer/commands/index.js +5 -0
- package/build/writer/commands/update-writer-document-outline.command.js +1 -0
- package/build/writer/commands/upload-writer-source.command.js +18 -0
- package/build/writer/enums/index.js +3 -0
- package/build/writer/enums/writer-document-stage.enum.js +6 -0
- package/build/writer/enums/writer-source-origin.enum.js +8 -0
- package/build/writer/enums/writer-source-status.enum.js +9 -0
- package/build/writer/enums/writer-source-type.enum.js +8 -0
- package/build/writer/models/index.js +2 -0
- package/build/writer/models/writer-document-type.schema.js +1 -1
- package/build/writer/models/writer-document.schema.js +3 -0
- package/build/writer/models/writer-source-bibliographic-metadata.schema.js +27 -0
- package/build/writer/models/writer-source.schema.js +22 -0
- package/build/writer/queries/get-writer-document-sources.query.js +15 -0
- package/build/writer/queries/index.js +1 -0
- package/build/writer/routes/writer.routes.js +6 -0
- package/common/enums/file-type.enum.ts +4 -0
- package/common/enums/index.ts +1 -0
- package/common/enums/reasoning-effort.enum.ts +5 -0
- package/image-editor/commands/image-editor.command.ts +1 -0
- package/image-editor/models/image-editor-job.schema.ts +2 -0
- package/image-editor/models/image-editor-model.schema.ts +9 -0
- package/image-generation/models/image-generation-job.schema.ts +2 -1
- package/image-generation/models/image-generation-model.schema.ts +1 -0
- package/image-generation/queries/find-image-generation-jobs.query.ts +2 -0
- package/index.ts +15 -0
- package/marketplace-card/commands/execute-marketplace-card.command.ts +7 -0
- package/marketplace-card/commands/index.ts +2 -0
- package/marketplace-card/commands/soft-delete-all-marketplace-card-jobs.command.ts +13 -0
- package/marketplace-card/commands/update-title-marketplace-card-job.command.ts +16 -0
- package/marketplace-card/models/index.ts +1 -0
- package/marketplace-card/models/marketplace-card-config.schema.ts +2 -0
- package/marketplace-card/models/marketplace-card-job.schema.ts +1 -1
- package/marketplace-card/routes/marketplace-card.amqp.routes.ts +2 -0
- package/package.json +1 -1
- package/presentation/commands/create-presentation.command.ts +3 -0
- package/presentation/commands/generate-slides.command.ts +2 -1
- package/presentation/commands/get-presentation-slides-generation-price.command.ts +1 -0
- package/presentation/commands/index.ts +1 -0
- package/presentation/commands/reposition-slide.command.ts +16 -0
- package/presentation/enums/index.ts +1 -0
- package/presentation/enums/presentation-target-audience.enum.ts +6 -0
- package/presentation/models/index.ts +1 -0
- package/presentation/models/presentation-template.schema.ts +2 -0
- package/presentation/models/presentation-title-page.schema.ts +9 -0
- package/presentation/models/presentation.schema.ts +5 -1
- package/presentation/models/slide-content-edit.schema.ts +36 -24
- package/presentation/models/slide-content.schema.ts +294 -90
- package/presentation/routes/presentation.routes.ts +4 -0
- package/solving-edu-task/commands/delete-all-solving-edu-task-jobs.command.ts +13 -0
- package/solving-edu-task/commands/delete-solving-edu-task-job-by-uuid.command.ts +14 -0
- package/solving-edu-task/commands/get-solving-edu-task-price.command.ts +17 -0
- package/solving-edu-task/commands/index.ts +7 -0
- package/solving-edu-task/commands/retry-solving-edu-task-job.command.ts +25 -0
- package/solving-edu-task/commands/set-reaction-to-solving-edu-task-job.command.ts +31 -0
- package/solving-edu-task/commands/solving-edu-task.command.ts +22 -0
- package/solving-edu-task/commands/update-solving-edu-task-job-title.command.ts +16 -0
- package/solving-edu-task/index.ts +4 -0
- package/solving-edu-task/models/index.ts +3 -0
- package/solving-edu-task/models/solving-edu-task-config.schema.ts +8 -0
- package/solving-edu-task/models/solving-edu-task-job.schema.ts +35 -0
- package/solving-edu-task/models/solving-edu-task-model.schema.ts +30 -0
- package/solving-edu-task/queries/find-solving-edu-task-job-by-id.query.ts +16 -0
- package/solving-edu-task/queries/find-solving-edu-task-jobs.query.ts +33 -0
- package/solving-edu-task/queries/get-solving-edu-task-config.query.ts +11 -0
- package/solving-edu-task/queries/index.ts +3 -0
- package/solving-edu-task/routes/index.ts +1 -0
- package/solving-edu-task/routes/solving-edu-task.amqp.routes.ts +12 -0
- package/spell-corrector/commands/delete-all-spell-corrector-jobs.command.ts +13 -0
- package/spell-corrector/commands/delete-spell-corrector-job-by-uuid.command.ts +14 -0
- package/spell-corrector/commands/get-spell-corrector-price.command.ts +16 -0
- package/spell-corrector/commands/index.ts +7 -0
- package/spell-corrector/commands/retry-spell-corrector-job.command.ts +17 -0
- package/spell-corrector/commands/set-reaction-to-spell-corrector-job.command.ts +30 -0
- package/spell-corrector/commands/spell-corrector.command.ts +18 -0
- package/spell-corrector/commands/update-spell-corrector-job-title.command.ts +16 -0
- package/spell-corrector/index.ts +4 -0
- package/spell-corrector/models/index.ts +3 -0
- package/spell-corrector/models/spell-corrector-job.schema.ts +25 -0
- package/spell-corrector/models/spell-corrector-model.schema.ts +18 -0
- package/spell-corrector/models/spell-corrector-tool-config.schema.ts +9 -0
- package/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.ts +11 -0
- package/spell-corrector/queries/find-spell-corrector-jobs.query.ts +33 -0
- package/spell-corrector/queries/get-spell-corrector-tool-config.query.ts +8 -0
- package/spell-corrector/queries/index.ts +3 -0
- package/spell-corrector/routes/index.ts +1 -0
- package/spell-corrector/routes/spell-corrector.amqp.routes.ts +12 -0
- package/stt/models/stt-response.schema.ts +2 -0
- package/tool-workspace/commands/index.ts +2 -0
- package/tool-workspace/commands/soft-delete-tool-workspace.command.ts +25 -0
- package/tool-workspace/commands/update-tool-workspace.command.ts +30 -0
- package/tool-workspace/enums/index.ts +2 -0
- package/tool-workspace/enums/tool-workspace-item-slot.enum.ts +5 -0
- package/tool-workspace/enums/tool-workspace-status.enum.ts +4 -0
- package/tool-workspace/index.ts +5 -0
- package/tool-workspace/models/index.ts +4 -0
- package/tool-workspace/models/tool-workspace-contents.schema.ts +10 -0
- package/tool-workspace/models/tool-workspace-item.schema.ts +17 -0
- package/tool-workspace/models/tool-workspace-job.schema.ts +17 -0
- package/tool-workspace/models/tool-workspace.schema.ts +17 -0
- package/tool-workspace/queries/find-tool-workspace-by-uuid.query.ts +26 -0
- package/tool-workspace/queries/find-tool-workspaces.query.ts +37 -0
- package/tool-workspace/queries/index.ts +2 -0
- package/tool-workspace/routes/index.ts +1 -0
- package/tool-workspace/routes/tool-workspace.amqp.routes.ts +6 -0
- package/tools/enums/tool-content-type.enum.ts +3 -1
- package/tools/enums/tool-type.enum.ts +2 -0
- package/tools/models/global-tools-config.schema.ts +4 -0
- package/tools/models/tools-with-configs.schema.ts +14 -0
- package/video/commands/video.command.ts +7 -0
- package/video/const/videoMaxDuration.ts +1 -1
- package/video/enums/video-resolution.enum.ts +1 -0
- package/video/enums/video-strategy.enum.ts +1 -0
- package/video/models/video-config.schema.ts +2 -0
- package/video/models/video-model.schema.ts +1 -0
- package/video-editor/commands/edit-video.command.ts +2 -1
- package/video-editor/commands/get-video-editor-price.command.ts +2 -0
- package/video-editor/commands/retry-video-editor-job.command.ts +5 -1
- package/video-editor/enums/index.ts +1 -0
- package/video-editor/enums/video-editor-pricing-rule-type.enum.ts +4 -0
- package/video-editor/models/video-editor-job.schema.ts +9 -0
- package/video-editor/models/video-editor-model.schema.ts +45 -1
- package/video-editor/utils/calculate-video-editing-price.ts +45 -2
- package/writer/commands/collect-sources.command.ts +15 -0
- package/writer/commands/confirm-source-citation-metadata.command.ts +18 -0
- package/writer/commands/discard-writer-source.command.ts +18 -0
- package/writer/commands/generate-document-outline.command.ts +17 -0
- package/writer/commands/index.ts +5 -0
- package/writer/commands/update-writer-document-outline.command.ts +1 -0
- package/writer/commands/upload-writer-source.command.ts +18 -0
- package/writer/enums/index.ts +3 -0
- package/writer/enums/writer-document-stage.enum.ts +8 -0
- package/writer/enums/writer-source-origin.enum.ts +4 -0
- package/writer/enums/writer-source-status.enum.ts +5 -0
- package/writer/enums/writer-source-type.enum.ts +4 -0
- package/writer/models/index.ts +2 -0
- package/writer/models/writer-document-type.schema.ts +1 -1
- package/writer/models/writer-document.schema.ts +3 -0
- package/writer/models/writer-source-bibliographic-metadata.schema.ts +31 -0
- package/writer/models/writer-source.schema.ts +22 -0
- package/writer/queries/get-writer-document-sources.query.ts +15 -0
- package/writer/queries/index.ts +1 -0
- package/writer/routes/writer.routes.ts +6 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SoftDeleteToolWorkspaceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var SoftDeleteToolWorkspaceCommand;
|
|
7
|
+
(function (SoftDeleteToolWorkspaceCommand) {
|
|
8
|
+
SoftDeleteToolWorkspaceCommand.RequestSchema = zod_1.z
|
|
9
|
+
.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().optional(),
|
|
13
|
+
})
|
|
14
|
+
.refine((data) => {
|
|
15
|
+
return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
|
|
16
|
+
}, {
|
|
17
|
+
message: 'At least userId or unregisteredUserId must be present',
|
|
18
|
+
path: ['userId', 'unregisteredUserId'],
|
|
19
|
+
});
|
|
20
|
+
SoftDeleteToolWorkspaceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({ success: zod_1.z.boolean() }));
|
|
21
|
+
})(SoftDeleteToolWorkspaceCommand || (exports.SoftDeleteToolWorkspaceCommand = SoftDeleteToolWorkspaceCommand = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateToolWorkspaceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const enums_1 = require("../enums");
|
|
7
|
+
const models_1 = require("../models");
|
|
8
|
+
var UpdateToolWorkspaceCommand;
|
|
9
|
+
(function (UpdateToolWorkspaceCommand) {
|
|
10
|
+
UpdateToolWorkspaceCommand.RequestSchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
|
13
|
+
title: zod_1.z.string().min(1).optional(),
|
|
14
|
+
coverUrl: zod_1.z.string().nullable().optional(),
|
|
15
|
+
status: zod_1.z.nativeEnum(enums_1.TOOL_WORKSPACE_STATUS).optional(),
|
|
16
|
+
userId: zod_1.z.string().uuid().optional(),
|
|
17
|
+
unregisteredUserId: zod_1.z.string().uuid().optional(),
|
|
18
|
+
})
|
|
19
|
+
.refine((data) => {
|
|
20
|
+
return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
|
|
21
|
+
}, {
|
|
22
|
+
message: 'At least userId or unregisteredUserId must be present',
|
|
23
|
+
path: ['userId', 'unregisteredUserId'],
|
|
24
|
+
});
|
|
25
|
+
UpdateToolWorkspaceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ToolWorkspaceSchema);
|
|
26
|
+
})(UpdateToolWorkspaceCommand || (exports.UpdateToolWorkspaceCommand = UpdateToolWorkspaceCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./tool-workspace-status.enum"), exports);
|
|
18
|
+
__exportStar(require("./tool-workspace-item-slot.enum"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_WORKSPACE_ITEM_SLOT = void 0;
|
|
4
|
+
var TOOL_WORKSPACE_ITEM_SLOT;
|
|
5
|
+
(function (TOOL_WORKSPACE_ITEM_SLOT) {
|
|
6
|
+
TOOL_WORKSPACE_ITEM_SLOT["CAPITAL"] = "\u0417\u0430\u0433\u043B\u0430\u0432\u043D\u0430\u044F";
|
|
7
|
+
TOOL_WORKSPACE_ITEM_SLOT["INTERNAL"] = "\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F";
|
|
8
|
+
TOOL_WORKSPACE_ITEM_SLOT["VIDEO"] = "\u0412\u0438\u0434\u0435\u043E";
|
|
9
|
+
})(TOOL_WORKSPACE_ITEM_SLOT || (exports.TOOL_WORKSPACE_ITEM_SLOT = TOOL_WORKSPACE_ITEM_SLOT = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_WORKSPACE_STATUS = void 0;
|
|
4
|
+
var TOOL_WORKSPACE_STATUS;
|
|
5
|
+
(function (TOOL_WORKSPACE_STATUS) {
|
|
6
|
+
TOOL_WORKSPACE_STATUS["ACTIVE"] = "active";
|
|
7
|
+
TOOL_WORKSPACE_STATUS["DELETED"] = "deleted";
|
|
8
|
+
})(TOOL_WORKSPACE_STATUS || (exports.TOOL_WORKSPACE_STATUS = TOOL_WORKSPACE_STATUS = {}));
|
|
@@ -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("./queries"), exports);
|
|
19
|
+
__exportStar(require("./models"), exports);
|
|
20
|
+
__exportStar(require("./enums"), exports);
|
|
21
|
+
__exportStar(require("./routes"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./tool-workspace.schema"), exports);
|
|
18
|
+
__exportStar(require("./tool-workspace-job.schema"), exports);
|
|
19
|
+
__exportStar(require("./tool-workspace-item.schema"), exports);
|
|
20
|
+
__exportStar(require("./tool-workspace-contents.schema"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolWorkspaceContentsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tool_workspace_schema_1 = require("./tool-workspace.schema");
|
|
6
|
+
const tool_workspace_item_schema_1 = require("./tool-workspace-item.schema");
|
|
7
|
+
exports.ToolWorkspaceContentsSchema = zod_1.z.object({
|
|
8
|
+
workspace: tool_workspace_schema_1.ToolWorkspaceSchema,
|
|
9
|
+
items: zod_1.z.array(tool_workspace_item_schema_1.ToolWorkspaceItemSchema),
|
|
10
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolWorkspaceItemSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tools_1 = require("../../tools");
|
|
6
|
+
const enums_1 = require("../enums");
|
|
7
|
+
const tool_workspace_job_schema_1 = require("./tool-workspace-job.schema");
|
|
8
|
+
exports.ToolWorkspaceItemSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
jobId: zod_1.z.string().uuid(),
|
|
11
|
+
jobType: zod_1.z.nativeEnum(tools_1.TOOL_TYPE),
|
|
12
|
+
slotTitle: zod_1.z.nativeEnum(enums_1.TOOL_WORKSPACE_ITEM_SLOT),
|
|
13
|
+
order: zod_1.z.number().int().min(0),
|
|
14
|
+
content: tool_workspace_job_schema_1.ToolWorkspaceJobSchema,
|
|
15
|
+
createdAt: zod_1.z.date(),
|
|
16
|
+
updatedAt: zod_1.z.date(),
|
|
17
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolWorkspaceJobSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const marketplace_card_1 = require("../../marketplace-card");
|
|
6
|
+
const tools_1 = require("../../tools");
|
|
7
|
+
const video_1 = require("../../video");
|
|
8
|
+
exports.ToolWorkspaceJobSchema = zod_1.z.discriminatedUnion('type', [
|
|
9
|
+
zod_1.z.object({
|
|
10
|
+
type: zod_1.z.literal(tools_1.TOOL_TYPE.MARKETPLACE_CARD_GENERATION),
|
|
11
|
+
job: marketplace_card_1.MarketplaceCardJobSchema,
|
|
12
|
+
}),
|
|
13
|
+
zod_1.z.object({
|
|
14
|
+
type: zod_1.z.literal(tools_1.TOOL_TYPE.VIDEO),
|
|
15
|
+
job: video_1.VideoJobSchema,
|
|
16
|
+
}),
|
|
17
|
+
]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolWorkspaceSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tools_1 = require("../../tools");
|
|
6
|
+
const enums_1 = require("../enums");
|
|
7
|
+
exports.ToolWorkspaceSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
toolType: zod_1.z.nativeEnum(tools_1.TOOL_CONTENT_TYPE),
|
|
10
|
+
title: zod_1.z.string(),
|
|
11
|
+
coverUrl: zod_1.z.string().nullable(),
|
|
12
|
+
status: zod_1.z.nativeEnum(enums_1.TOOL_WORKSPACE_STATUS),
|
|
13
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
15
|
+
createdAt: zod_1.z.date(),
|
|
16
|
+
updatedAt: zod_1.z.date(),
|
|
17
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindToolWorkspaceByUuidQuery = 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 FindToolWorkspaceByUuidQuery;
|
|
8
|
+
(function (FindToolWorkspaceByUuidQuery) {
|
|
9
|
+
FindToolWorkspaceByUuidQuery.RequestSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
uuid: zod_1.z.string().uuid(),
|
|
12
|
+
userId: zod_1.z.string().uuid().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().optional(),
|
|
14
|
+
})
|
|
15
|
+
.refine((data) => {
|
|
16
|
+
return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
|
|
17
|
+
}, {
|
|
18
|
+
message: 'At least userId or unregisteredUserId must be present',
|
|
19
|
+
path: ['userId', 'unregisteredUserId'],
|
|
20
|
+
});
|
|
21
|
+
FindToolWorkspaceByUuidQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ToolWorkspaceContentsSchema.nullable());
|
|
22
|
+
})(FindToolWorkspaceByUuidQuery || (exports.FindToolWorkspaceByUuidQuery = FindToolWorkspaceByUuidQuery = {}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindToolWorkspacesQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const tools_1 = require("../../tools");
|
|
7
|
+
const models_1 = require("../models");
|
|
8
|
+
var FindToolWorkspacesQuery;
|
|
9
|
+
(function (FindToolWorkspacesQuery) {
|
|
10
|
+
FindToolWorkspacesQuery.RequestSchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
toolType: zod_1.z.nativeEnum(tools_1.TOOL_CONTENT_TYPE).optional(),
|
|
13
|
+
title: zod_1.z.string().optional(),
|
|
14
|
+
userId: zod_1.z.string().uuid().optional(),
|
|
15
|
+
unregisteredUserId: zod_1.z.string().uuid().optional(),
|
|
16
|
+
limit: zod_1.z.coerce.number().min(1).optional(),
|
|
17
|
+
offset: zod_1.z.coerce.number().min(0).default(0).optional(),
|
|
18
|
+
})
|
|
19
|
+
.refine((data) => {
|
|
20
|
+
return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
|
|
21
|
+
}, {
|
|
22
|
+
message: 'At least userId or unregisteredUserId must be present',
|
|
23
|
+
path: ['userId', 'unregisteredUserId'],
|
|
24
|
+
});
|
|
25
|
+
FindToolWorkspacesQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
|
|
26
|
+
data: zod_1.z.array(models_1.ToolWorkspaceSchema),
|
|
27
|
+
page: zod_1.z.number(),
|
|
28
|
+
totalPages: zod_1.z.number(),
|
|
29
|
+
}));
|
|
30
|
+
})(FindToolWorkspacesQuery || (exports.FindToolWorkspacesQuery = FindToolWorkspacesQuery = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./find-tool-workspaces.query"), exports);
|
|
18
|
+
__exportStar(require("./find-tool-workspace-by-uuid.query"), exports);
|
|
@@ -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("./tool-workspace.amqp.routes"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_WORKSPACE_AMQP_ROUTES = void 0;
|
|
4
|
+
exports.TOOL_WORKSPACE_AMQP_ROUTES = {
|
|
5
|
+
UPDATE: 'tools.workspace.update.rpc',
|
|
6
|
+
SOFT_DELETE: 'tools.workspace.soft-delete.rpc',
|
|
7
|
+
GET: 'tools.workspace.get.rpc',
|
|
8
|
+
LIST: 'tools.workspace.list.rpc',
|
|
9
|
+
};
|
|
@@ -15,5 +15,7 @@ var TOOL_CONTENT_TYPE;
|
|
|
15
15
|
TOOL_CONTENT_TYPE["MUSIC"] = "MUSIC";
|
|
16
16
|
TOOL_CONTENT_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
|
|
17
17
|
TOOL_CONTENT_TYPE["NONE"] = "NONE";
|
|
18
|
-
TOOL_CONTENT_TYPE["MARKETPLACE_CARD_GENERATION"] = "
|
|
18
|
+
TOOL_CONTENT_TYPE["MARKETPLACE_CARD_GENERATION"] = "MARKETPLACE_CARD";
|
|
19
|
+
TOOL_CONTENT_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
|
|
20
|
+
TOOL_CONTENT_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
19
21
|
})(TOOL_CONTENT_TYPE || (exports.TOOL_CONTENT_TYPE = TOOL_CONTENT_TYPE = {}));
|
|
@@ -18,4 +18,6 @@ var TOOL_TYPE;
|
|
|
18
18
|
TOOL_TYPE["IMAGE_GENERATION"] = "IMAGE_GENERATION";
|
|
19
19
|
TOOL_TYPE["MARKETPLACE_CARD_GENERATION"] = "MARKETPLACE_CARD_GENERATION";
|
|
20
20
|
TOOL_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
|
|
21
|
+
TOOL_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
22
|
+
TOOL_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
|
|
21
23
|
})(TOOL_TYPE || (exports.TOOL_TYPE = TOOL_TYPE = {}));
|
|
@@ -15,6 +15,8 @@ const tts_1 = require("../../tts");
|
|
|
15
15
|
const stt_1 = require("../../stt");
|
|
16
16
|
const models_1 = require("../../marketplace-card/models");
|
|
17
17
|
const interior_design_1 = require("../../interior-design");
|
|
18
|
+
const solving_edu_task_1 = require("../../solving-edu-task");
|
|
19
|
+
const spell_corrector_1 = require("../../spell-corrector");
|
|
18
20
|
exports.GlobalToolsConfigSchema = zod_1.z.object({
|
|
19
21
|
[enums_1.TOOL_CONTENT_TYPE.VIDEO]: video_1.VideoConfigSchema,
|
|
20
22
|
[enums_1.TOOL_CONTENT_TYPE.MUSIC]: music_1.MusicConfigSchema,
|
|
@@ -28,4 +30,6 @@ exports.GlobalToolsConfigSchema = zod_1.z.object({
|
|
|
28
30
|
[enums_1.TOOL_CONTENT_TYPE.SPEECH_TO_TEXT]: stt_1.STTConfigSchema,
|
|
29
31
|
[enums_1.TOOL_CONTENT_TYPE.MARKETPLACE_CARD_GENERATION]: models_1.MarketplaceCardConfigSchema,
|
|
30
32
|
[enums_1.TOOL_CONTENT_TYPE.INTERIOR_DESIGN]: interior_design_1.InteriorDesignConfigSchema,
|
|
33
|
+
[enums_1.TOOL_CONTENT_TYPE.SOLVING_EDU_TASK]: solving_edu_task_1.SolvingEduTaskConfigSchema,
|
|
34
|
+
[enums_1.TOOL_CONTENT_TYPE.SPELL_CORRECTOR]: spell_corrector_1.SpellCorrectorToolConfigSchema,
|
|
31
35
|
});
|
|
@@ -16,6 +16,8 @@ const stt_1 = require("../../stt");
|
|
|
16
16
|
const models_1 = require("../../marketplace-card/models");
|
|
17
17
|
const tool_schema_1 = require("./tool.schema");
|
|
18
18
|
const interior_design_1 = require("../../interior-design");
|
|
19
|
+
const solving_edu_task_1 = require("../../solving-edu-task");
|
|
20
|
+
const spell_corrector_1 = require("../../spell-corrector");
|
|
19
21
|
// Discriminated union array: Tools with their configs
|
|
20
22
|
exports.ToolWithConfigSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
21
23
|
tool_schema_1.ToolSchema.merge(zod_1.z.object({
|
|
@@ -66,5 +68,13 @@ exports.ToolWithConfigSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
|
66
68
|
contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.INTERIOR_DESIGN),
|
|
67
69
|
config: interior_design_1.InteriorDesignConfigSchema,
|
|
68
70
|
})),
|
|
71
|
+
tool_schema_1.ToolSchema.merge(zod_1.z.object({
|
|
72
|
+
contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.SOLVING_EDU_TASK),
|
|
73
|
+
config: solving_edu_task_1.SolvingEduTaskConfigSchema,
|
|
74
|
+
})),
|
|
75
|
+
tool_schema_1.ToolSchema.merge(zod_1.z.object({
|
|
76
|
+
contentType: zod_1.z.literal(enums_1.TOOL_CONTENT_TYPE.SPELL_CORRECTOR),
|
|
77
|
+
config: spell_corrector_1.SpellCorrectorToolConfigSchema,
|
|
78
|
+
})),
|
|
69
79
|
]);
|
|
70
80
|
exports.ToolsWithConfigsSchema = zod_1.z.array(exports.ToolWithConfigSchema);
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VideoCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const tool_workspace_1 = require("../../tool-workspace");
|
|
7
|
+
const tools_1 = require("../../tools");
|
|
6
8
|
const video_job_schema_1 = require("../models/video-job.schema");
|
|
7
9
|
const models_1 = require("../models");
|
|
8
10
|
var VideoCommand;
|
|
@@ -10,6 +12,11 @@ var VideoCommand;
|
|
|
10
12
|
VideoCommand.RequestSchema = zod_1.z.object({
|
|
11
13
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
14
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
15
|
+
workspaceId: zod_1.z.string().uuid().nullable().optional(),
|
|
16
|
+
workspaceItemId: zod_1.z.string().uuid().nullable().optional(),
|
|
17
|
+
workspaceToolType: zod_1.z.nativeEnum(tools_1.TOOL_CONTENT_TYPE).nullable().optional(),
|
|
18
|
+
workspaceSlot: zod_1.z.nativeEnum(tool_workspace_1.TOOL_WORKSPACE_ITEM_SLOT).optional(),
|
|
19
|
+
workspaceOrder: zod_1.z.number().int().min(0).optional(),
|
|
13
20
|
prompt: zod_1.z.string(),
|
|
14
21
|
modelId: zod_1.z.string(),
|
|
15
22
|
params: models_1.VideoGenerationRequestParamsSchema,
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VIDEO_RESOLUTION = void 0;
|
|
4
4
|
var VIDEO_RESOLUTION;
|
|
5
5
|
(function (VIDEO_RESOLUTION) {
|
|
6
|
+
VIDEO_RESOLUTION["LOW"] = "480p";
|
|
6
7
|
VIDEO_RESOLUTION["STANDART"] = "720p";
|
|
7
8
|
VIDEO_RESOLUTION["HIGH"] = "1080p";
|
|
8
9
|
})(VIDEO_RESOLUTION || (exports.VIDEO_RESOLUTION = VIDEO_RESOLUTION = {}));
|
|
@@ -12,4 +12,5 @@ var VIDEO_GENERATION_STRATEGY;
|
|
|
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
14
|
VIDEO_GENERATION_STRATEGY["WAN_2_6_VIDEO_GENERATION_CALLBACK"] = "WAN_2_6_VIDEO_GENERATION_CALLBACK";
|
|
15
|
+
VIDEO_GENERATION_STRATEGY["GROK_VIDEO_GENERATION_CALLBACK"] = "GROK_VIDEO_GENERATION_CALLBACK";
|
|
15
16
|
})(VIDEO_GENERATION_STRATEGY || (exports.VIDEO_GENERATION_STRATEGY = VIDEO_GENERATION_STRATEGY = {}));
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VideoConfigSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const video_model_schema_1 = require("./video-model.schema");
|
|
6
|
+
const ai_vendor_1 = require("../../ai-vendor");
|
|
6
7
|
exports.VideoConfigSchema = zod_1.z.object({
|
|
8
|
+
vendors: zod_1.z.array(ai_vendor_1.AiVendorSchema),
|
|
7
9
|
models: zod_1.z.array(video_model_schema_1.VideoModelSchema),
|
|
8
10
|
});
|
|
@@ -70,6 +70,7 @@ exports.VideoModelSchema = zod_1.z.object({
|
|
|
70
70
|
params: exports.VideoModelParamsSchema,
|
|
71
71
|
pricingRules: exports.VideoModelPricingRulesSchema,
|
|
72
72
|
limitations: zod_1.z.array(zod_1.z.nativeEnum(enums_1.VIDEO_GENERATION_MODEL_LIMITATION)),
|
|
73
|
+
vendorId: zod_1.z.string().uuid(),
|
|
73
74
|
createdAt: zod_1.z.date(),
|
|
74
75
|
updatedAt: zod_1.z.date(),
|
|
75
76
|
});
|
|
@@ -16,6 +16,7 @@ var EditVideoCommand;
|
|
|
16
16
|
modelId: zod_1.z.string().uuid(),
|
|
17
17
|
tokenReservationId: zod_1.z.string().uuid(),
|
|
18
18
|
precalculatedPrice: zod_1.z.number(),
|
|
19
|
+
params: models_1.VideoEditorJobParamsSchema.optional(),
|
|
19
20
|
});
|
|
20
21
|
EditVideoCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.VideoEditorJobSchema);
|
|
21
22
|
})(EditVideoCommand || (exports.EditVideoCommand = EditVideoCommand = {}));
|
|
@@ -3,10 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GetVideoEditorPriceCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
6
7
|
var GetVideoEditorPriceCommand;
|
|
7
8
|
(function (GetVideoEditorPriceCommand) {
|
|
8
9
|
GetVideoEditorPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
10
|
modelId: zod_1.z.string(),
|
|
11
|
+
params: models_1.VideoEditorPricingRequestParamsSchema,
|
|
10
12
|
});
|
|
11
13
|
GetVideoEditorPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
12
14
|
price: zod_1.z.number(),
|
|
@@ -17,6 +17,7 @@ var RetryVideoEditorJobCommand;
|
|
|
17
17
|
modelId: zod_1.z.string().uuid().optional(),
|
|
18
18
|
tokenReservationId: zod_1.z.string().uuid(),
|
|
19
19
|
precalculatedPrice: zod_1.z.number(),
|
|
20
|
+
params: video_editor_job_schema_1.VideoEditorJobParamsSchema.optional(),
|
|
20
21
|
});
|
|
21
22
|
RetryVideoEditorJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_editor_job_schema_1.VideoEditorJobSchema);
|
|
22
23
|
})(RetryVideoEditorJobCommand || (exports.RetryVideoEditorJobCommand = RetryVideoEditorJobCommand = {}));
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./video-editor-model-limitation.enum"), exports);
|
|
18
|
+
__exportStar(require("./video-editor-pricing-rule-type.enum"), exports);
|
|
18
19
|
__exportStar(require("./video-editor-model-strategy.enum"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VIDEO_EDITOR_PRICING_RULE_TYPE = void 0;
|
|
4
|
+
var VIDEO_EDITOR_PRICING_RULE_TYPE;
|
|
5
|
+
(function (VIDEO_EDITOR_PRICING_RULE_TYPE) {
|
|
6
|
+
VIDEO_EDITOR_PRICING_RULE_TYPE["FLAT"] = "flat";
|
|
7
|
+
VIDEO_EDITOR_PRICING_RULE_TYPE["PER_SECOND"] = "per_second";
|
|
8
|
+
})(VIDEO_EDITOR_PRICING_RULE_TYPE || (exports.VIDEO_EDITOR_PRICING_RULE_TYPE = VIDEO_EDITOR_PRICING_RULE_TYPE = {}));
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VideoEditorJobSchema = void 0;
|
|
3
|
+
exports.VideoEditorJobSchema = exports.VideoEditorJobParamsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const tools_1 = require("../../tools");
|
|
6
6
|
const common_1 = require("../../common");
|
|
7
|
+
exports.VideoEditorJobParamsSchema = zod_1.z.object({
|
|
8
|
+
duration: zod_1.z.number().optional(),
|
|
9
|
+
resolution: zod_1.z.string().optional(),
|
|
10
|
+
});
|
|
7
11
|
exports.VideoEditorJobSchema = zod_1.z.object({
|
|
8
12
|
uuid: zod_1.z.string(),
|
|
9
13
|
prompt: zod_1.z.string(),
|
|
@@ -19,6 +23,8 @@ exports.VideoEditorJobSchema = zod_1.z.object({
|
|
|
19
23
|
inputVideoId: zod_1.z.string().nullable(),
|
|
20
24
|
outputVideoUrl: zod_1.z.string().nullable(),
|
|
21
25
|
outputVideoId: zod_1.z.string().nullable(),
|
|
26
|
+
previewUrl: zod_1.z.string().nullable(),
|
|
27
|
+
params: exports.VideoEditorJobParamsSchema.optional(),
|
|
22
28
|
duration: zod_1.z.number(),
|
|
23
29
|
attempts: zod_1.z.array(zod_1.z.any()),
|
|
24
30
|
userId: zod_1.z.string().nullable().optional(),
|
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VideoEditorModelSchema = void 0;
|
|
3
|
+
exports.VideoEditorModelSchema = exports.VideoEditorModelPricingRulesSchema = exports.VideoEditorModelPricingRuleConditionSchema = exports.VideoEditorPricingRequestParamsSchema = exports.VideoEditorModelParamsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const common_1 = require("../../common");
|
|
6
6
|
const enums_1 = require("../enums");
|
|
7
|
+
exports.VideoEditorModelParamsSchema = zod_1.z.object({
|
|
8
|
+
duration: zod_1.z
|
|
9
|
+
.object({
|
|
10
|
+
options: zod_1.z.array(zod_1.z.number()),
|
|
11
|
+
})
|
|
12
|
+
.optional(),
|
|
13
|
+
resolution: zod_1.z
|
|
14
|
+
.object({
|
|
15
|
+
options: zod_1.z.array(zod_1.z.string()),
|
|
16
|
+
})
|
|
17
|
+
.optional(),
|
|
18
|
+
});
|
|
19
|
+
exports.VideoEditorPricingRequestParamsSchema = zod_1.z.object({
|
|
20
|
+
duration: zod_1.z.number(),
|
|
21
|
+
resolution: zod_1.z.string().optional(),
|
|
22
|
+
});
|
|
23
|
+
exports.VideoEditorModelPricingRuleConditionSchema = zod_1.z.object({
|
|
24
|
+
duration: zod_1.z.number().optional(),
|
|
25
|
+
resolution: zod_1.z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
exports.VideoEditorModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
|
|
28
|
+
type: zod_1.z.nativeEnum(enums_1.VIDEO_EDITOR_PRICING_RULE_TYPE),
|
|
29
|
+
condition: exports.VideoEditorModelPricingRuleConditionSchema,
|
|
30
|
+
value: zod_1.z.number(),
|
|
31
|
+
}));
|
|
7
32
|
exports.VideoEditorModelSchema = zod_1.z.object({
|
|
8
33
|
uuid: zod_1.z.string(),
|
|
9
34
|
title: zod_1.z.string(),
|
|
@@ -17,6 +42,8 @@ exports.VideoEditorModelSchema = zod_1.z.object({
|
|
|
17
42
|
maxInputVideoSizeBytes: zod_1.z.number(),
|
|
18
43
|
maxInputVideoDurationInSeconds: zod_1.z.number(),
|
|
19
44
|
supportedFormats: zod_1.z.array(zod_1.z.string()),
|
|
45
|
+
params: exports.VideoEditorModelParamsSchema,
|
|
46
|
+
pricingRules: exports.VideoEditorModelPricingRulesSchema,
|
|
20
47
|
needsTranslation: zod_1.z.boolean(),
|
|
21
48
|
pricePerCall: zod_1.z.number(),
|
|
22
49
|
limitations: zod_1.z.array(zod_1.z.nativeEnum(enums_1.VIDEO_EDITOR_MODEL_LIMITATION)),
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.calculateVideoEditingPrice = calculateVideoEditingPrice;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const enums_1 = require("../enums");
|
|
5
|
+
function matchesCondition(condition, params) {
|
|
6
|
+
const keys = Object.keys(condition);
|
|
7
|
+
return keys.every((key) => {
|
|
8
|
+
const expected = condition[key];
|
|
9
|
+
if (expected === undefined || expected === null || expected === '')
|
|
10
|
+
return true;
|
|
11
|
+
const value = params[key];
|
|
12
|
+
if (value === undefined || value === null)
|
|
13
|
+
return false;
|
|
14
|
+
return value === expected;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function calculateVideoEditingPrice({ pricePerCall, params, rules, }) {
|
|
18
|
+
const perSecondRule = rules
|
|
19
|
+
.filter((r) => r.type === enums_1.VIDEO_EDITOR_PRICING_RULE_TYPE.PER_SECOND)
|
|
20
|
+
.find((r) => matchesCondition(r.condition, params));
|
|
21
|
+
const base = perSecondRule ? perSecondRule.value * params.duration : pricePerCall;
|
|
22
|
+
const flatMarkup = rules.reduce((sum, r) => {
|
|
23
|
+
if (r.type !== enums_1.VIDEO_EDITOR_PRICING_RULE_TYPE.FLAT)
|
|
24
|
+
return sum;
|
|
25
|
+
return matchesCondition(r.condition, params) ? sum + r.value : sum;
|
|
26
|
+
}, 0);
|
|
27
|
+
return Math.ceil(base + flatMarkup);
|
|
6
28
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollectWriterDocumentSourcesCommand = 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 CollectWriterDocumentSourcesCommand;
|
|
8
|
+
(function (CollectWriterDocumentSourcesCommand) {
|
|
9
|
+
CollectWriterDocumentSourcesCommand.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
|
+
});
|
|
14
|
+
CollectWriterDocumentSourcesCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.WriterDocumentSchema);
|
|
15
|
+
})(CollectWriterDocumentSourcesCommand || (exports.CollectWriterDocumentSourcesCommand = CollectWriterDocumentSourcesCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfirmSourceCitationMetadataCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const writer_source_schema_1 = require("../models/writer-source.schema");
|
|
7
|
+
const writer_source_bibliographic_metadata_schema_1 = require("../models/writer-source-bibliographic-metadata.schema");
|
|
8
|
+
var ConfirmSourceCitationMetadataCommand;
|
|
9
|
+
(function (ConfirmSourceCitationMetadataCommand) {
|
|
10
|
+
ConfirmSourceCitationMetadataCommand.RequestSchema = zod_1.z.object({
|
|
11
|
+
documentId: zod_1.z.string().uuid(),
|
|
12
|
+
sourceId: zod_1.z.string().uuid(),
|
|
13
|
+
bibliographicMetadata: writer_source_bibliographic_metadata_schema_1.WriterSourceBibliographicMetadataSchema,
|
|
14
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
15
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
16
|
+
});
|
|
17
|
+
ConfirmSourceCitationMetadataCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(writer_source_schema_1.WriterSourceSchema);
|
|
18
|
+
})(ConfirmSourceCitationMetadataCommand || (exports.ConfirmSourceCitationMetadataCommand = ConfirmSourceCitationMetadataCommand = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiscardWriterSourceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DiscardWriterSourceCommand;
|
|
7
|
+
(function (DiscardWriterSourceCommand) {
|
|
8
|
+
DiscardWriterSourceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
sourceId: zod_1.z.string().uuid(),
|
|
10
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
});
|
|
13
|
+
DiscardWriterSourceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
|
|
14
|
+
isDiscarded: zod_1.z.boolean(),
|
|
15
|
+
}));
|
|
16
|
+
})(DiscardWriterSourceCommand || (exports.DiscardWriterSourceCommand = DiscardWriterSourceCommand = {}));
|