@purpleschool/gptbot-tools 0.1.133 → 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/ai-proxy/routes/ai-proxy.routes.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/ai-proxy/routes/ai-proxy.routes.js +1 -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 +18 -0
- package/build/marketplace-card/commands/execute-marketplace-card.command.js +34 -0
- package/build/marketplace-card/commands/get-marketplace-card-price.command.js +13 -0
- package/build/marketplace-card/commands/index.js +23 -0
- package/build/marketplace-card/commands/retry-marketplace-card-job.command.js +26 -0
- package/build/marketplace-card/commands/set-reaction-to-marketplace-card-job.command.js +27 -0
- package/build/marketplace-card/commands/soft-delete-all-marketplace-card-jobs.command.js +13 -0
- package/build/marketplace-card/commands/soft-delete-marketplace-card-job-by-uuid.command.js +14 -0
- package/build/marketplace-card/commands/update-title-marketplace-card-job.command.js +16 -0
- package/build/marketplace-card/enums/index.js +17 -0
- package/build/marketplace-card/enums/marketplace-card-strategy.enum.js +10 -0
- package/build/marketplace-card/index.js +21 -0
- package/build/marketplace-card/models/index.js +20 -0
- package/build/marketplace-card/models/marketplace-card-config.schema.js +10 -0
- package/build/marketplace-card/models/marketplace-card-job.schema.js +34 -0
- package/build/marketplace-card/models/marketplace-card-model.schema.js +31 -0
- package/build/marketplace-card/models/marketplace-card-style-preset.schema.js +13 -0
- package/build/marketplace-card/queries/find-marketplace-card-job-by-uuid.query.js +15 -0
- package/build/marketplace-card/queries/find-marketplace-card-jobs.query.js +28 -0
- package/build/marketplace-card/queries/get-marketplace-card-config.query.js +11 -0
- package/build/marketplace-card/queries/index.js +19 -0
- package/build/marketplace-card/routes/index.js +17 -0
- package/build/marketplace-card/routes/marketplace-card.amqp.routes.js +15 -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 -0
- package/build/tools/enums/tool-type.enum.js +3 -0
- package/build/tools/models/global-tools-config.schema.js +6 -0
- package/build/tools/models/tools-with-configs.schema.js +15 -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 +18 -0
- package/marketplace-card/commands/execute-marketplace-card.command.ts +34 -0
- package/marketplace-card/commands/get-marketplace-card-price.command.ts +15 -0
- package/marketplace-card/commands/index.ts +7 -0
- package/marketplace-card/commands/retry-marketplace-card-job.command.ts +26 -0
- package/marketplace-card/commands/set-reaction-to-marketplace-card-job.command.ts +30 -0
- package/marketplace-card/commands/soft-delete-all-marketplace-card-jobs.command.ts +13 -0
- package/marketplace-card/commands/soft-delete-marketplace-card-job-by-uuid.command.ts +14 -0
- package/marketplace-card/commands/update-title-marketplace-card-job.command.ts +16 -0
- package/marketplace-card/enums/index.ts +1 -0
- package/marketplace-card/enums/marketplace-card-strategy.enum.ts +6 -0
- package/marketplace-card/index.ts +5 -0
- package/marketplace-card/models/index.ts +4 -0
- package/marketplace-card/models/marketplace-card-config.schema.ts +9 -0
- package/marketplace-card/models/marketplace-card-job.schema.ts +33 -0
- package/marketplace-card/models/marketplace-card-model.schema.ts +34 -0
- package/marketplace-card/models/marketplace-card-style-preset.schema.ts +12 -0
- package/marketplace-card/queries/find-marketplace-card-job-by-uuid.query.ts +16 -0
- package/marketplace-card/queries/find-marketplace-card-jobs.query.ts +33 -0
- package/marketplace-card/queries/get-marketplace-card-config.query.ts +10 -0
- package/marketplace-card/queries/index.ts +3 -0
- package/marketplace-card/routes/index.ts +1 -0
- package/marketplace-card/routes/marketplace-card.amqp.routes.ts +12 -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 -0
- package/tools/enums/tool-type.enum.ts +3 -0
- package/tools/models/global-tools-config.schema.ts +6 -0
- package/tools/models/tools-with-configs.schema.ts +21 -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,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SolvingEduTaskJobSchema = exports.SolvingEduTaskJobParamsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tools_1 = require("../../tools");
|
|
6
|
+
const common_1 = require("../../common");
|
|
7
|
+
exports.SolvingEduTaskJobParamsSchema = zod_1.z.object({
|
|
8
|
+
attachedFiles: zod_1.z.array(common_1.AttachedFileSchema),
|
|
9
|
+
});
|
|
10
|
+
exports.SolvingEduTaskJobSchema = zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z.string(),
|
|
12
|
+
prompt: zod_1.z.string(),
|
|
13
|
+
aiOutput: zod_1.z.string().nullable().optional(),
|
|
14
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
15
|
+
dislikeReason: zod_1.z.string().nullable(),
|
|
16
|
+
externalId: zod_1.z.string().nullable(),
|
|
17
|
+
title: zod_1.z.string(),
|
|
18
|
+
status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
|
|
19
|
+
error: zod_1.z.string().nullable(),
|
|
20
|
+
internalError: zod_1.z.string().nullable().optional(),
|
|
21
|
+
modelId: zod_1.z.string(),
|
|
22
|
+
price: zod_1.z.number(),
|
|
23
|
+
params: exports.SolvingEduTaskJobParamsSchema,
|
|
24
|
+
attempts: zod_1.z.array(zod_1.z.any()),
|
|
25
|
+
userId: zod_1.z.string().nullable().optional(),
|
|
26
|
+
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
27
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
28
|
+
isDeleted: zod_1.z.boolean(),
|
|
29
|
+
createdAt: zod_1.z.date(),
|
|
30
|
+
completedAt: zod_1.z.date().nullable().optional(),
|
|
31
|
+
updatedAt: zod_1.z.date(),
|
|
32
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SolvingEduTaskModelSchema = exports.SolvingEduTaskModelParamsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
exports.SolvingEduTaskModelParamsSchema = zod_1.z.object({
|
|
7
|
+
imageAttachment: zod_1.z.object({
|
|
8
|
+
supported: zod_1.z.boolean(),
|
|
9
|
+
maxImages: zod_1.z.number(),
|
|
10
|
+
acceptedTypes: zod_1.z.array(zod_1.z.string()),
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
13
|
+
exports.SolvingEduTaskModelSchema = zod_1.z.object({
|
|
14
|
+
uuid: zod_1.z.string(),
|
|
15
|
+
title: zod_1.z.string(),
|
|
16
|
+
description: zod_1.z.string(),
|
|
17
|
+
aiModel: zod_1.z.string(),
|
|
18
|
+
price: zod_1.z.number(),
|
|
19
|
+
order: zod_1.z.number(),
|
|
20
|
+
status: zod_1.z.nativeEnum(common_1.TOOL_MODEL_STATUS),
|
|
21
|
+
icons: common_1.IconVariantsSchema,
|
|
22
|
+
strategy: zod_1.z.string(),
|
|
23
|
+
maxPromptLength: zod_1.z.number(),
|
|
24
|
+
params: exports.SolvingEduTaskModelParamsSchema,
|
|
25
|
+
createdAt: zod_1.z.date(),
|
|
26
|
+
updatedAt: zod_1.z.date(),
|
|
27
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindSolvingEduTaskJobByIdQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var FindSolvingEduTaskJobByIdQuery;
|
|
8
|
+
(function (FindSolvingEduTaskJobByIdQuery) {
|
|
9
|
+
FindSolvingEduTaskJobByIdQuery.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
|
+
FindSolvingEduTaskJobByIdQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.SolvingEduTaskJobSchema);
|
|
15
|
+
})(FindSolvingEduTaskJobByIdQuery || (exports.FindSolvingEduTaskJobByIdQuery = FindSolvingEduTaskJobByIdQuery = {}));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindSolvingEduTaskJobsQuery = 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 FindSolvingEduTaskJobsQuery;
|
|
8
|
+
(function (FindSolvingEduTaskJobsQuery) {
|
|
9
|
+
FindSolvingEduTaskJobsQuery.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 !(data.userId && data.unregisteredUserId);
|
|
19
|
+
}, {
|
|
20
|
+
message: 'userId and unregisteredUserId cannot be used together',
|
|
21
|
+
path: ['userId', 'unregisteredUserId'],
|
|
22
|
+
});
|
|
23
|
+
FindSolvingEduTaskJobsQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
|
|
24
|
+
data: zod_1.z.array(models_1.SolvingEduTaskJobSchema),
|
|
25
|
+
page: zod_1.z.number(),
|
|
26
|
+
totalPages: zod_1.z.number(),
|
|
27
|
+
}));
|
|
28
|
+
})(FindSolvingEduTaskJobsQuery || (exports.FindSolvingEduTaskJobsQuery = FindSolvingEduTaskJobsQuery = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSolvingEduTaskConfigQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var GetSolvingEduTaskConfigQuery;
|
|
8
|
+
(function (GetSolvingEduTaskConfigQuery) {
|
|
9
|
+
GetSolvingEduTaskConfigQuery.RequestSchema = zod_1.z.object({});
|
|
10
|
+
GetSolvingEduTaskConfigQuery.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.SolvingEduTaskConfigSchema);
|
|
11
|
+
})(GetSolvingEduTaskConfigQuery || (exports.GetSolvingEduTaskConfigQuery = GetSolvingEduTaskConfigQuery = {}));
|
|
@@ -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("./find-solving-edu-task-job-by-id.query"), exports);
|
|
18
|
+
__exportStar(require("./find-solving-edu-task-jobs.query"), exports);
|
|
19
|
+
__exportStar(require("./get-solving-edu-task-config.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("./solving-edu-task.amqp.routes"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SOLVING_EDU_TASK_AMQP_ROUTES = void 0;
|
|
4
|
+
exports.SOLVING_EDU_TASK_AMQP_ROUTES = {
|
|
5
|
+
EXECUTE: 'tools.solving-edu-task.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.solving-edu-task.get-price.rpc',
|
|
7
|
+
CONFIG: 'tools.solving-edu-task.config.rpc',
|
|
8
|
+
GET_JOB: 'tools.solving-edu-task.jobs.get.rpc',
|
|
9
|
+
LIST_JOBS: 'tools.solving-edu-task.jobs.list.rpc',
|
|
10
|
+
SET_REACTION: 'tools.solving-edu-task.jobs.set-reaction.rpc',
|
|
11
|
+
UPDATE_TITLE: 'tools.solving-edu-task.jobs.update-title.rpc',
|
|
12
|
+
SOFT_DELETE: 'tools.solving-edu-task.jobs.soft-delete.rpc',
|
|
13
|
+
SOFT_DELETE_ALL: 'tools.solving-edu-task.jobs.soft-delete-all.rpc',
|
|
14
|
+
RETRY: 'tools.solving-edu-task.jobs.retry.rpc',
|
|
15
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteAllSpellCorrectorJobsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DeleteAllSpellCorrectorJobsCommand;
|
|
7
|
+
(function (DeleteAllSpellCorrectorJobsCommand) {
|
|
8
|
+
DeleteAllSpellCorrectorJobsCommand.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
|
+
DeleteAllSpellCorrectorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
13
|
+
})(DeleteAllSpellCorrectorJobsCommand || (exports.DeleteAllSpellCorrectorJobsCommand = DeleteAllSpellCorrectorJobsCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteSpellCorrectorJobByUuidCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DeleteSpellCorrectorJobByUuidCommand;
|
|
7
|
+
(function (DeleteSpellCorrectorJobByUuidCommand) {
|
|
8
|
+
DeleteSpellCorrectorJobByUuidCommand.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
|
+
DeleteSpellCorrectorJobByUuidCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
14
|
+
})(DeleteSpellCorrectorJobByUuidCommand || (exports.DeleteSpellCorrectorJobByUuidCommand = DeleteSpellCorrectorJobByUuidCommand = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSpellCorrectorPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var GetSpellCorrectorPriceCommand;
|
|
7
|
+
(function (GetSpellCorrectorPriceCommand) {
|
|
8
|
+
GetSpellCorrectorPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
modelId: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
GetSpellCorrectorPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
12
|
+
price: zod_1.z.number(),
|
|
13
|
+
});
|
|
14
|
+
GetSpellCorrectorPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetSpellCorrectorPriceCommand.ResponseDataSchema);
|
|
15
|
+
})(GetSpellCorrectorPriceCommand || (exports.GetSpellCorrectorPriceCommand = GetSpellCorrectorPriceCommand = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
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("./spell-corrector.command"), exports);
|
|
18
|
+
__exportStar(require("./get-spell-corrector-price.command"), exports);
|
|
19
|
+
__exportStar(require("./retry-spell-corrector-job.command"), exports);
|
|
20
|
+
__exportStar(require("./set-reaction-to-spell-corrector-job.command"), exports);
|
|
21
|
+
__exportStar(require("./update-spell-corrector-job-title.command"), exports);
|
|
22
|
+
__exportStar(require("./delete-all-spell-corrector-jobs.command"), exports);
|
|
23
|
+
__exportStar(require("./delete-spell-corrector-job-by-uuid.command"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetrySpellCorrectorJobCommand = 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 RetrySpellCorrectorJobCommand;
|
|
8
|
+
(function (RetrySpellCorrectorJobCommand) {
|
|
9
|
+
RetrySpellCorrectorJobCommand.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
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
14
|
+
precalculatedPrice: zod_1.z.number(),
|
|
15
|
+
});
|
|
16
|
+
RetrySpellCorrectorJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
17
|
+
})(RetrySpellCorrectorJobCommand || (exports.RetrySpellCorrectorJobCommand = RetrySpellCorrectorJobCommand = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetReactionToSpellCorrectorJobCommand = 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
|
+
const common_1 = require("../../common");
|
|
8
|
+
var SetReactionToSpellCorrectorJobCommand;
|
|
9
|
+
(function (SetReactionToSpellCorrectorJobCommand) {
|
|
10
|
+
SetReactionToSpellCorrectorJobCommand.RequestSchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
16
|
+
dislikeReason: zod_1.z.string().nullable().default(null),
|
|
17
|
+
})
|
|
18
|
+
.refine((data) => {
|
|
19
|
+
if (data.reaction !== common_1.USER_REACTION.DISLIKED && data.dislikeReason) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}, {
|
|
24
|
+
message: 'Dislike reason is not allowed when reaction is not disliked',
|
|
25
|
+
});
|
|
26
|
+
SetReactionToSpellCorrectorJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
27
|
+
})(SetReactionToSpellCorrectorJobCommand || (exports.SetReactionToSpellCorrectorJobCommand = SetReactionToSpellCorrectorJobCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpellCorrectorCommand = 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 SpellCorrectorCommand;
|
|
8
|
+
(function (SpellCorrectorCommand) {
|
|
9
|
+
SpellCorrectorCommand.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
|
+
modelId: zod_1.z.string().uuid(),
|
|
14
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
15
|
+
precalculatedPrice: zod_1.z.number(),
|
|
16
|
+
});
|
|
17
|
+
SpellCorrectorCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
18
|
+
})(SpellCorrectorCommand || (exports.SpellCorrectorCommand = SpellCorrectorCommand = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateSpellCorrectorJobTitleCommand = 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 UpdateSpellCorrectorJobTitleCommand;
|
|
8
|
+
(function (UpdateSpellCorrectorJobTitleCommand) {
|
|
9
|
+
UpdateSpellCorrectorJobTitleCommand.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
|
+
UpdateSpellCorrectorJobTitleCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
16
|
+
})(UpdateSpellCorrectorJobTitleCommand || (exports.UpdateSpellCorrectorJobTitleCommand = UpdateSpellCorrectorJobTitleCommand = {}));
|
|
@@ -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("./routes"), exports);
|
|
18
|
+
__exportStar(require("./commands"), exports);
|
|
19
|
+
__exportStar(require("./models"), exports);
|
|
20
|
+
__exportStar(require("./queries"), 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("./spell-corrector-model.schema"), exports);
|
|
18
|
+
__exportStar(require("./spell-corrector-job.schema"), exports);
|
|
19
|
+
__exportStar(require("./spell-corrector-tool-config.schema"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpellCorrectorJobSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tools_1 = require("../../tools");
|
|
6
|
+
const common_1 = require("../../common");
|
|
7
|
+
exports.SpellCorrectorJobSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string(),
|
|
9
|
+
userId: zod_1.z.string().nullable(),
|
|
10
|
+
unregisteredUserId: zod_1.z.string().nullable(),
|
|
11
|
+
userInput: zod_1.z.string(),
|
|
12
|
+
aiOutput: zod_1.z.string().nullable(),
|
|
13
|
+
aiTokenUsage: zod_1.z.number().nullable(),
|
|
14
|
+
price: zod_1.z.number(),
|
|
15
|
+
status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
|
|
16
|
+
title: zod_1.z.string(),
|
|
17
|
+
error: zod_1.z.string().nullable(),
|
|
18
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
19
|
+
dislikeReason: zod_1.z.string().nullable(),
|
|
20
|
+
modelId: zod_1.z.string(),
|
|
21
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
22
|
+
createdAt: zod_1.z.date(),
|
|
23
|
+
updatedAt: zod_1.z.date(),
|
|
24
|
+
completedAt: zod_1.z.date().nullable(),
|
|
25
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpellCorrectorModelSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
exports.SpellCorrectorModelSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string(),
|
|
8
|
+
title: zod_1.z.string(),
|
|
9
|
+
description: zod_1.z.string(),
|
|
10
|
+
icon: zod_1.z.string(),
|
|
11
|
+
icons: common_1.IconVariantsSchema,
|
|
12
|
+
price: zod_1.z.number(),
|
|
13
|
+
aiModel: zod_1.z.string(),
|
|
14
|
+
reasoningEffort: zod_1.z.nativeEnum(common_1.REASONING_EFFORT).nullable().optional(),
|
|
15
|
+
order: zod_1.z.number(),
|
|
16
|
+
createdAt: zod_1.z.date(),
|
|
17
|
+
updatedAt: zod_1.z.date(),
|
|
18
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpellCorrectorToolConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const spell_corrector_model_schema_1 = require("./spell-corrector-model.schema");
|
|
6
|
+
exports.SpellCorrectorToolConfigSchema = zod_1.z.object({
|
|
7
|
+
models: zod_1.z.array(spell_corrector_model_schema_1.SpellCorrectorModelSchema),
|
|
8
|
+
maxSymbols: zod_1.z.number(),
|
|
9
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindSpellCorrectorJobByUuidQuery = void 0;
|
|
4
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
5
|
+
const models_1 = require("../models");
|
|
6
|
+
var FindSpellCorrectorJobByUuidQuery;
|
|
7
|
+
(function (FindSpellCorrectorJobByUuidQuery) {
|
|
8
|
+
FindSpellCorrectorJobByUuidQuery.RequestSchema = models_1.SpellCorrectorJobSchema.pick({ uuid: true });
|
|
9
|
+
FindSpellCorrectorJobByUuidQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
10
|
+
})(FindSpellCorrectorJobByUuidQuery || (exports.FindSpellCorrectorJobByUuidQuery = FindSpellCorrectorJobByUuidQuery = {}));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindSpellCorrectorJobsQuery = 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 FindSpellCorrectorJobsQuery;
|
|
8
|
+
(function (FindSpellCorrectorJobsQuery) {
|
|
9
|
+
FindSpellCorrectorJobsQuery.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
|
+
FindSpellCorrectorJobsQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
|
|
24
|
+
data: zod_1.z.array(models_1.SpellCorrectorJobSchema),
|
|
25
|
+
page: zod_1.z.number(),
|
|
26
|
+
totalPages: zod_1.z.number(),
|
|
27
|
+
}));
|
|
28
|
+
})(FindSpellCorrectorJobsQuery || (exports.FindSpellCorrectorJobsQuery = FindSpellCorrectorJobsQuery = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSpellCorrectorToolConfigQuery = void 0;
|
|
4
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
5
|
+
const models_1 = require("../models");
|
|
6
|
+
var GetSpellCorrectorToolConfigQuery;
|
|
7
|
+
(function (GetSpellCorrectorToolConfigQuery) {
|
|
8
|
+
GetSpellCorrectorToolConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorToolConfigSchema);
|
|
9
|
+
})(GetSpellCorrectorToolConfigQuery || (exports.GetSpellCorrectorToolConfigQuery = GetSpellCorrectorToolConfigQuery = {}));
|
|
@@ -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("./find-spell-corrector-job-by-uuid.query"), exports);
|
|
18
|
+
__exportStar(require("./get-spell-corrector-tool-config.query"), exports);
|
|
19
|
+
__exportStar(require("./find-spell-corrector-jobs.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("./spell-corrector.amqp.routes"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SPELL_CORRECTOR_AMQP_ROUTES = void 0;
|
|
4
|
+
exports.SPELL_CORRECTOR_AMQP_ROUTES = {
|
|
5
|
+
EXECUTE: 'tools.spell_corrector.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.spell_corrector.get-price.rpc',
|
|
7
|
+
CONFIG: 'tools.spell_corrector.config.rpc',
|
|
8
|
+
GET_JOB: 'tools.spell_corrector.jobs.get.rpc',
|
|
9
|
+
LIST_JOBS: 'tools.spell_corrector.jobs.list.rpc',
|
|
10
|
+
SET_REACTION: 'tools.spell_corrector.jobs.set-reaction.rpc',
|
|
11
|
+
UPDATE_TITLE: 'tools.spell_corrector.jobs.update-title.rpc',
|
|
12
|
+
SOFT_DELETE: 'tools.spell_corrector.jobs.soft-delete.rpc',
|
|
13
|
+
SOFT_DELETE_ALL: 'tools.spell_corrector.jobs.soft-delete-all.rpc',
|
|
14
|
+
RETRY: 'tools.spell_corrector.jobs.retry.rpc',
|
|
15
|
+
};
|
|
@@ -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("./update-tool-workspace.command"), exports);
|
|
18
|
+
__exportStar(require("./soft-delete-tool-workspace.command"), exports);
|
|
@@ -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);
|