@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,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UploadWriterSourceCommand = 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 UploadWriterSourceCommand;
|
|
8
|
+
(function (UploadWriterSourceCommand) {
|
|
9
|
+
UploadWriterSourceCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
documentId: zod_1.z.string().uuid(),
|
|
11
|
+
fileId: zod_1.z.string().uuid(),
|
|
12
|
+
fileUrl: zod_1.z.string().url(),
|
|
13
|
+
fileMimetype: zod_1.z.string(),
|
|
14
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
15
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
16
|
+
});
|
|
17
|
+
UploadWriterSourceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.WriterSourceSchema);
|
|
18
|
+
})(UploadWriterSourceCommand || (exports.UploadWriterSourceCommand = UploadWriterSourceCommand = {}));
|
|
@@ -20,3 +20,6 @@ __exportStar(require("./writer-ai-action-type.enum"), exports);
|
|
|
20
20
|
__exportStar(require("./writer-document-section-type.enum"), exports);
|
|
21
21
|
__exportStar(require("./writer-document-stage.enum"), exports);
|
|
22
22
|
__exportStar(require("./writer-content-generation-strategy.enum"), exports);
|
|
23
|
+
__exportStar(require("./writer-source-type.enum"), exports);
|
|
24
|
+
__exportStar(require("./writer-source-origin.enum"), exports);
|
|
25
|
+
__exportStar(require("./writer-source-status.enum"), exports);
|
|
@@ -4,9 +4,15 @@ exports.WRITER_DOCUMENT_STAGE = void 0;
|
|
|
4
4
|
var WRITER_DOCUMENT_STAGE;
|
|
5
5
|
(function (WRITER_DOCUMENT_STAGE) {
|
|
6
6
|
WRITER_DOCUMENT_STAGE["CREATED"] = "CREATED";
|
|
7
|
+
WRITER_DOCUMENT_STAGE["ANALYZING_TOPIC"] = "ANALYZING_TOPIC";
|
|
8
|
+
WRITER_DOCUMENT_STAGE["TOPIC_ANALYZED"] = "TOPIC_ANALYZED";
|
|
9
|
+
WRITER_DOCUMENT_STAGE["TOPIC_ANALYSIS_FAILED"] = "TOPIC_ANALYSIS_FAILED";
|
|
7
10
|
WRITER_DOCUMENT_STAGE["GENERATING_OUTLINE"] = "GENERATING_OUTLINE";
|
|
8
11
|
WRITER_DOCUMENT_STAGE["OUTLINE_GENERATED"] = "OUTLINE_GENERATED";
|
|
9
12
|
WRITER_DOCUMENT_STAGE["OUTLINE_GENERATION_FAILED"] = "OUTLINE_GENERATION_FAILED";
|
|
13
|
+
WRITER_DOCUMENT_STAGE["COLLECTING_SOURCES"] = "COLLECTING_SOURCES";
|
|
14
|
+
WRITER_DOCUMENT_STAGE["SOURCES_COLLECTED"] = "SOURCES_COLLECTED";
|
|
15
|
+
WRITER_DOCUMENT_STAGE["SOURCES_COLLECTION_FAILED"] = "SOURCES_COLLECTION_FAILED";
|
|
10
16
|
WRITER_DOCUMENT_STAGE["GENERATING_CONTENT"] = "GENERATING_CONTENT";
|
|
11
17
|
WRITER_DOCUMENT_STAGE["CONTENT_GENERATED"] = "CONTENT_GENERATED";
|
|
12
18
|
WRITER_DOCUMENT_STAGE["CONTENT_GENERATION_FAILED"] = "CONTENT_GENERATION_FAILED";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WRITER_SOURCE_ORIGIN = void 0;
|
|
4
|
+
var WRITER_SOURCE_ORIGIN;
|
|
5
|
+
(function (WRITER_SOURCE_ORIGIN) {
|
|
6
|
+
WRITER_SOURCE_ORIGIN["WEB_SEARCH"] = "WEB_SEARCH";
|
|
7
|
+
WRITER_SOURCE_ORIGIN["USER_UPLOAD"] = "USER_UPLOAD";
|
|
8
|
+
})(WRITER_SOURCE_ORIGIN || (exports.WRITER_SOURCE_ORIGIN = WRITER_SOURCE_ORIGIN = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WRITER_SOURCE_STATUS = void 0;
|
|
4
|
+
var WRITER_SOURCE_STATUS;
|
|
5
|
+
(function (WRITER_SOURCE_STATUS) {
|
|
6
|
+
WRITER_SOURCE_STATUS["READY"] = "READY";
|
|
7
|
+
WRITER_SOURCE_STATUS["REQUIRES_CITATION_METADATA_CONFIRMATION"] = "REQUIRES_CITATION_METADATA_CONFIRMATION";
|
|
8
|
+
WRITER_SOURCE_STATUS["DISCARDED"] = "DISCARDED";
|
|
9
|
+
})(WRITER_SOURCE_STATUS || (exports.WRITER_SOURCE_STATUS = WRITER_SOURCE_STATUS = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WRITER_SOURCE_TYPE = void 0;
|
|
4
|
+
var WRITER_SOURCE_TYPE;
|
|
5
|
+
(function (WRITER_SOURCE_TYPE) {
|
|
6
|
+
WRITER_SOURCE_TYPE["JOURNAL_ARTICLE"] = "JOURNAL_ARTICLE";
|
|
7
|
+
WRITER_SOURCE_TYPE["BOOK"] = "BOOK";
|
|
8
|
+
})(WRITER_SOURCE_TYPE || (exports.WRITER_SOURCE_TYPE = WRITER_SOURCE_TYPE = {}));
|
|
@@ -21,3 +21,5 @@ __exportStar(require("./writer-document-outline.schema"), exports);
|
|
|
21
21
|
__exportStar(require("./writer-document-title-page.schema"), exports);
|
|
22
22
|
__exportStar(require("./writer-document.schema"), exports);
|
|
23
23
|
__exportStar(require("./writer-document-type.schema"), exports);
|
|
24
|
+
__exportStar(require("./writer-source.schema"), exports);
|
|
25
|
+
__exportStar(require("./writer-source-bibliographic-metadata.schema"), exports);
|
|
@@ -10,9 +10,9 @@ exports.WriterDocumentTypeSchema = zod_1.z.object({
|
|
|
10
10
|
order: zod_1.z.number(),
|
|
11
11
|
minPages: zod_1.z.number(),
|
|
12
12
|
maxPages: zod_1.z.number(),
|
|
13
|
+
skipSources: zod_1.z.boolean(),
|
|
13
14
|
pageRange: zod_1.z.array(zod_1.z.number()),
|
|
14
15
|
needsTableOfContents: zod_1.z.boolean(),
|
|
15
|
-
needsCitations: zod_1.z.boolean(),
|
|
16
16
|
createdAt: zod_1.z.date(),
|
|
17
17
|
updatedAt: zod_1.z.date(),
|
|
18
18
|
});
|
|
@@ -22,6 +22,9 @@ exports.WriterDocumentSchema = zod_1.z.object({
|
|
|
22
22
|
modelId: zod_1.z.string().nullable(),
|
|
23
23
|
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
24
24
|
dislikeReason: zod_1.z.string().nullable(),
|
|
25
|
+
description: zod_1.z.string().nullable(),
|
|
26
|
+
internalError: zod_1.z.string().nullable(),
|
|
27
|
+
skipSources: zod_1.z.boolean(),
|
|
25
28
|
pages: zod_1.z.number(),
|
|
26
29
|
isDeleted: zod_1.z.boolean(),
|
|
27
30
|
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriterSourceBibliographicMetadataSchema = exports.JournalArticleBibliographicMetadataSchema = exports.BookBibliographicMetadataSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
exports.BookBibliographicMetadataSchema = zod_1.z.object({
|
|
7
|
+
type: zod_1.z.literal(enums_1.WRITER_SOURCE_TYPE.BOOK),
|
|
8
|
+
title: zod_1.z.string(),
|
|
9
|
+
authors: zod_1.z.string(),
|
|
10
|
+
year: zod_1.z.number(),
|
|
11
|
+
publicationCity: zod_1.z.string(),
|
|
12
|
+
publisher: zod_1.z.string(),
|
|
13
|
+
pageCount: zod_1.z.number().nullable(),
|
|
14
|
+
});
|
|
15
|
+
exports.JournalArticleBibliographicMetadataSchema = zod_1.z.object({
|
|
16
|
+
type: zod_1.z.literal(enums_1.WRITER_SOURCE_TYPE.JOURNAL_ARTICLE),
|
|
17
|
+
title: zod_1.z.string(),
|
|
18
|
+
authors: zod_1.z.string(),
|
|
19
|
+
year: zod_1.z.number(),
|
|
20
|
+
journalName: zod_1.z.string(),
|
|
21
|
+
issueNumber: zod_1.z.string(),
|
|
22
|
+
pageRange: zod_1.z.string(),
|
|
23
|
+
});
|
|
24
|
+
exports.WriterSourceBibliographicMetadataSchema = zod_1.z.discriminatedUnion('type', [
|
|
25
|
+
exports.BookBibliographicMetadataSchema,
|
|
26
|
+
exports.JournalArticleBibliographicMetadataSchema,
|
|
27
|
+
]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriterSourceSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
const writer_source_bibliographic_metadata_schema_1 = require("./writer-source-bibliographic-metadata.schema");
|
|
7
|
+
exports.WriterSourceSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
query: zod_1.z.string().nullable(),
|
|
10
|
+
url: zod_1.z.string(),
|
|
11
|
+
snippet: zod_1.z.string().nullable(),
|
|
12
|
+
inclusionReason: zod_1.z.string().nullable(),
|
|
13
|
+
sourceOrigin: zod_1.z.nativeEnum(enums_1.WRITER_SOURCE_ORIGIN),
|
|
14
|
+
content: zod_1.z.string().nullable(),
|
|
15
|
+
documentId: zod_1.z.string().uuid(),
|
|
16
|
+
fileId: zod_1.z.string().nullable(),
|
|
17
|
+
citation: zod_1.z.string().nullable(),
|
|
18
|
+
status: zod_1.z.nativeEnum(enums_1.WRITER_SOURCE_STATUS),
|
|
19
|
+
bibliographicMetadata: writer_source_bibliographic_metadata_schema_1.WriterSourceBibliographicMetadataSchema.nullable(),
|
|
20
|
+
createdAt: zod_1.z.date(),
|
|
21
|
+
updatedAt: zod_1.z.date(),
|
|
22
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetWriterDocumentSourcesQueryContract = 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 GetWriterDocumentSourcesQueryContract;
|
|
8
|
+
(function (GetWriterDocumentSourcesQueryContract) {
|
|
9
|
+
GetWriterDocumentSourcesQueryContract.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
|
+
GetWriterDocumentSourcesQueryContract.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.array(models_1.WriterSourceSchema));
|
|
15
|
+
})(GetWriterDocumentSourcesQueryContract || (exports.GetWriterDocumentSourcesQueryContract = GetWriterDocumentSourcesQueryContract = {}));
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./find-writer-documents.query"), exports);
|
|
18
18
|
__exportStar(require("./get-writer-config.query"), exports);
|
|
19
19
|
__exportStar(require("./find-writer-document-by-uuid.query"), exports);
|
|
20
|
+
__exportStar(require("./get-writer-document-sources.query"), exports);
|
|
@@ -13,6 +13,12 @@ exports.WRITER_AMQP_ROUTES = {
|
|
|
13
13
|
TOGGLE_DOCUMENT_TITLE_PAGE: 'tools.writer.toggle-document-title-page.rpc',
|
|
14
14
|
UPDATE_DOCUMENT_CONTENTS: 'tools.writer.update-document-contents.rpc',
|
|
15
15
|
GENERATE_DOCUMENT_CONTENTS: 'tools.writer.generate-document-contents.rpc',
|
|
16
|
+
GENERATE_DOCUMENT_OUTLINE: 'tools.writer.generate-document-outline.rpc',
|
|
17
|
+
COLLECT_SOURCES: 'tools.writer.collect-sources.rpc',
|
|
18
|
+
GET_DOCUMENT_SOURCES: 'tools.writer.get-document-sources.rpc',
|
|
19
|
+
UPLOAD_SOURCE: 'tools.writer.upload-source.rpc',
|
|
20
|
+
CONFIRM_SOURCE_CITATION_METADATA: 'tools.writer.confirm-source-citation-metadata.rpc',
|
|
21
|
+
DISCARD_SOURCE: 'tools.writer.discard-source.rpc',
|
|
16
22
|
GET_CONTENT_GENERATION_PRICE: 'tools.writer.content-generation.get-price.rpc',
|
|
17
23
|
PARAPHRASE: 'tools.writer.actions.paraphrase.rpc',
|
|
18
24
|
EXTEND_TEXT: 'tools.writer.actions.extend-text.rpc',
|
package/common/enums/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export namespace ImageEditorCommand {
|
|
|
12
12
|
params: z.object({
|
|
13
13
|
attachedFiles: z.array(AttachedFileSchema),
|
|
14
14
|
systemPromptId: z.string().optional(),
|
|
15
|
+
aspectRatio: z.string().optional(),
|
|
15
16
|
}),
|
|
16
17
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
17
18
|
tokenReservationId: z.string().uuid(),
|
|
@@ -6,6 +6,8 @@ export const ImageEditorJobParamsSchema = z.object({
|
|
|
6
6
|
attachedFiles: z.array(AttachedFileSchema).optional(),
|
|
7
7
|
imageUrls: z.array(z.string()).optional(),
|
|
8
8
|
systemPromptId: z.string().optional(),
|
|
9
|
+
aspectRatio: z.string().optional(),
|
|
10
|
+
userHasActiveSubscriptionOrProduct: z.boolean().optional(),
|
|
9
11
|
});
|
|
10
12
|
|
|
11
13
|
export type ImageEditorJobParams = z.infer<typeof ImageEditorJobParamsSchema>;
|
|
@@ -8,6 +8,13 @@ export const ImageEditorModelParamsSchema = z.object({
|
|
|
8
8
|
maxImages: z.number(),
|
|
9
9
|
acceptedTypes: z.array(z.string()),
|
|
10
10
|
}),
|
|
11
|
+
aspectRatio: z.record(
|
|
12
|
+
z.string(),
|
|
13
|
+
z.object({
|
|
14
|
+
width: z.number(),
|
|
15
|
+
height: z.number(),
|
|
16
|
+
}),
|
|
17
|
+
),
|
|
11
18
|
});
|
|
12
19
|
|
|
13
20
|
export type ImageEditorModelParams = z.infer<typeof ImageEditorModelParamsSchema>;
|
|
@@ -32,6 +39,8 @@ export const ImageEditorModelSchema = z.object({
|
|
|
32
39
|
title: z.string(),
|
|
33
40
|
description: z.string(),
|
|
34
41
|
aiModel: z.string(),
|
|
42
|
+
isNew: z.boolean(),
|
|
43
|
+
tierLabel: z.string(),
|
|
35
44
|
pricePerImage: z.number(),
|
|
36
45
|
order: z.number(),
|
|
37
46
|
status: z.nativeEnum(TOOL_MODEL_STATUS),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { JOB_STATUS } from '../../tools';
|
|
2
|
+
import { JOB_REQUEST_ORIGIN, JOB_STATUS } from '../../tools';
|
|
3
3
|
import { AttachedFileSchema, USER_REACTION } from '../../common';
|
|
4
4
|
import { IMAGE_GENERATION_RESOLUTION } from '../enums';
|
|
5
5
|
|
|
@@ -29,6 +29,7 @@ export const ImageGenerationJobSchema = z.object({
|
|
|
29
29
|
userId: z.string().nullable().optional(),
|
|
30
30
|
unregisteredUserId: z.string().nullable().optional(),
|
|
31
31
|
isPublished: z.boolean(),
|
|
32
|
+
origin: z.nativeEnum(JOB_REQUEST_ORIGIN),
|
|
32
33
|
postId: z.string().nullable(),
|
|
33
34
|
isDeleted: z.boolean(),
|
|
34
35
|
internalError: z.string().nullable(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { ImageGenerationJobSchema } from '../models';
|
|
4
|
+
import { JOB_REQUEST_ORIGIN } from '../../tools/enums/job-request-origin.enum';
|
|
4
5
|
|
|
5
6
|
export namespace FindImageGenerationJobsQuery {
|
|
6
7
|
export const RequestSchema = z
|
|
@@ -10,6 +11,7 @@ export namespace FindImageGenerationJobsQuery {
|
|
|
10
11
|
title: z.string().optional(),
|
|
11
12
|
limit: z.coerce.number().min(1).optional(),
|
|
12
13
|
offset: z.coerce.number().min(0).default(0).optional(),
|
|
14
|
+
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).optional(),
|
|
13
15
|
})
|
|
14
16
|
.refine(
|
|
15
17
|
(data) => {
|
package/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './common';
|
|
2
|
+
export * from './account-merge';
|
|
2
3
|
export * from './paraphrase';
|
|
3
4
|
export * from './tools';
|
|
4
5
|
export * from './stt';
|
|
@@ -13,6 +14,11 @@ export * from './video-editor';
|
|
|
13
14
|
export * from './music';
|
|
14
15
|
export * from './ai-proxy';
|
|
15
16
|
export * from './ai-vendor';
|
|
17
|
+
export * from './marketplace-card';
|
|
18
|
+
export * from './analytics';
|
|
19
|
+
export * from './solving-edu-task';
|
|
20
|
+
export * from './spell-corrector';
|
|
21
|
+
export * from './tool-workspace';
|
|
16
22
|
|
|
17
23
|
import * as common from './common';
|
|
18
24
|
import * as paraphrase from './paraphrase';
|
|
@@ -29,6 +35,12 @@ import * as videoEditor from './video-editor';
|
|
|
29
35
|
import * as music from './music';
|
|
30
36
|
import * as aiVendor from './ai-vendor';
|
|
31
37
|
import * as interiorDesign from './interior-design';
|
|
38
|
+
import * as marketplaceCard from './marketplace-card';
|
|
39
|
+
import * as analytics from './analytics';
|
|
40
|
+
import * as solvingEduTask from './solving-edu-task';
|
|
41
|
+
import * as spellCorrector from './spell-corrector';
|
|
42
|
+
import * as accountMerge from './account-merge';
|
|
43
|
+
import * as toolWorkspace from './tool-workspace';
|
|
32
44
|
|
|
33
45
|
export namespace ToolService {
|
|
34
46
|
export import Common = common;
|
|
@@ -46,4 +58,10 @@ export namespace ToolService {
|
|
|
46
58
|
export import Music = music;
|
|
47
59
|
export import AiVendor = aiVendor;
|
|
48
60
|
export import InteriorDesign = interiorDesign;
|
|
61
|
+
export import MarketplaceCard = marketplaceCard;
|
|
62
|
+
export import Analytics = analytics;
|
|
63
|
+
export import SolvingEduTask = solvingEduTask;
|
|
64
|
+
export import SpellCorrector = spellCorrector;
|
|
65
|
+
export import AccountMerge = accountMerge;
|
|
66
|
+
export import ToolWorkspace = toolWorkspace;
|
|
49
67
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { MarketplaceCardJobSchema } from '../models';
|
|
4
|
+
import { TOOL_CONTENT_TYPE } from '../../tools';
|
|
5
|
+
import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
|
|
6
|
+
|
|
7
|
+
export namespace ExecuteMarketplaceCardCommand {
|
|
8
|
+
export const RequestSchema = z.object({
|
|
9
|
+
userId: z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
|
+
workspaceId: z.string().uuid().nullable().optional(),
|
|
12
|
+
workspaceItemId: z.string().uuid().nullable().optional(),
|
|
13
|
+
workspaceToolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable().optional(),
|
|
14
|
+
workspaceSlot: z.nativeEnum(TOOL_WORKSPACE_ITEM_SLOT).optional(),
|
|
15
|
+
workspaceOrder: z.number().int().min(0).optional(),
|
|
16
|
+
params: z.object({
|
|
17
|
+
title: z.string(),
|
|
18
|
+
subtitle: z.string().nullable().optional(),
|
|
19
|
+
advantages: z.array(z.string()),
|
|
20
|
+
tags: z.array(z.string()),
|
|
21
|
+
stylePresetId: z.string().uuid().nullable().optional(),
|
|
22
|
+
isCustom: z.boolean(),
|
|
23
|
+
customStylePrompt: z.string().nullable().optional(),
|
|
24
|
+
inputImages: z.array(z.string()),
|
|
25
|
+
backgroundDescription: z.string().nullable().optional(),
|
|
26
|
+
}),
|
|
27
|
+
precalculatedPrice: z.number(),
|
|
28
|
+
tokenReservationId: z.string().uuid(),
|
|
29
|
+
});
|
|
30
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
31
|
+
|
|
32
|
+
export const ResponseSchema = ICommandResponseSchema(MarketplaceCardJobSchema);
|
|
33
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace GetMarketplaceCardPriceCommand {
|
|
5
|
+
export const RequestSchema = z.object({});
|
|
6
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
7
|
+
|
|
8
|
+
export const ResponseDataSchema = z.object({
|
|
9
|
+
price: z.number(),
|
|
10
|
+
});
|
|
11
|
+
export type ResponseData = z.infer<typeof ResponseDataSchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
14
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './execute-marketplace-card.command';
|
|
2
|
+
export * from './set-reaction-to-marketplace-card-job.command';
|
|
3
|
+
export * from './soft-delete-marketplace-card-job-by-uuid.command';
|
|
4
|
+
export * from './retry-marketplace-card-job.command';
|
|
5
|
+
export * from './get-marketplace-card-price.command';
|
|
6
|
+
export * from './soft-delete-all-marketplace-card-jobs.command';
|
|
7
|
+
export * from './update-title-marketplace-card-job.command';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { MarketplaceCardJobSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace RetryMarketplaceCardJobCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
tokenReservationId: z.string().uuid(),
|
|
9
|
+
precalculatedPrice: z.number(),
|
|
10
|
+
userId: z.string().uuid().nullable().optional(),
|
|
11
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
12
|
+
title: z.string().optional(),
|
|
13
|
+
subtitle: z.string().nullable().optional(),
|
|
14
|
+
advantages: z.array(z.string()).optional(),
|
|
15
|
+
tags: z.array(z.string()).optional(),
|
|
16
|
+
stylePresetId: z.string().uuid().nullable().optional(),
|
|
17
|
+
isCustom: z.boolean().optional(),
|
|
18
|
+
customStylePrompt: z.string().nullable().optional(),
|
|
19
|
+
inputImages: z.array(z.string()).optional(),
|
|
20
|
+
backgroundDescription: z.string().nullable().optional(),
|
|
21
|
+
});
|
|
22
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
23
|
+
|
|
24
|
+
export const ResponseSchema = ICommandResponseSchema(MarketplaceCardJobSchema);
|
|
25
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { USER_REACTION } from '../../common';
|
|
3
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
4
|
+
import { MarketplaceCardJobSchema } from '../models';
|
|
5
|
+
|
|
6
|
+
export namespace SetReactionToMarketplaceCardJobCommand {
|
|
7
|
+
export const RequestSchema = z
|
|
8
|
+
.object({
|
|
9
|
+
userId: z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
|
+
uuid: z.string().uuid(),
|
|
12
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
13
|
+
dislikeReason: z.string().nullable().default(null),
|
|
14
|
+
})
|
|
15
|
+
.refine(
|
|
16
|
+
(data) => {
|
|
17
|
+
if (data.reaction !== USER_REACTION.DISLIKED && data.dislikeReason) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
message: 'Dislike reason is not allowed when reaction is not disliked',
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
27
|
+
|
|
28
|
+
export const ResponseSchema = ICommandResponseSchema(MarketplaceCardJobSchema);
|
|
29
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace SoftDeleteAllMarketplaceCardJobsCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
userId: z.string().uuid().nullable().optional(),
|
|
7
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
8
|
+
});
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = ICommandResponseSchema(z.boolean());
|
|
12
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace SoftDeleteMarketplaceCardJobByUuidCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
userId: z.string().uuid().nullable().optional(),
|
|
7
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
8
|
+
uuid: z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
11
|
+
|
|
12
|
+
export const ResponseSchema = ICommandResponseSchema(z.boolean());
|
|
13
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarketplaceCardJobSchema } from '../models';
|
|
3
|
+
import { ICommandResponseSchema } from '../../common';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateTitleMarketplaceCardJobCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
userId: z.string().uuid().nullable().optional(),
|
|
8
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
|
+
uuid: z.string(),
|
|
10
|
+
title: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(MarketplaceCardJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './marketplace-card-strategy.enum';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarketplaceCardStylePresetSchema } from './marketplace-card-style-preset.schema';
|
|
3
|
+
import { MarketplaceCardModelSchema } from './marketplace-card-model.schema';
|
|
4
|
+
|
|
5
|
+
export const MarketplaceCardConfigSchema = z.object({
|
|
6
|
+
styles: z.array(MarketplaceCardStylePresetSchema),
|
|
7
|
+
models: z.array(MarketplaceCardModelSchema),
|
|
8
|
+
});
|
|
9
|
+
export type MarketplaceCardConfigModel = z.infer<typeof MarketplaceCardConfigSchema>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { USER_REACTION } from '../../common';
|
|
3
|
+
import { JOB_STATUS } from '../../tools';
|
|
4
|
+
|
|
5
|
+
export const MarketplaceCardJobSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
status: z.nativeEnum(JOB_STATUS),
|
|
8
|
+
error: z.string().nullable(),
|
|
9
|
+
internalError: z.string().nullable(),
|
|
10
|
+
externalId: z.string().nullable(),
|
|
11
|
+
tokenReservationId: z.string().nullable().optional(),
|
|
12
|
+
title: z.string(),
|
|
13
|
+
subtitle: z.string().nullable(),
|
|
14
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
15
|
+
dislikeReason: z.string().nullable(),
|
|
16
|
+
advantages: z.array(z.string()),
|
|
17
|
+
tags: z.array(z.string()),
|
|
18
|
+
stylePresetId: z.string().uuid().nullable(),
|
|
19
|
+
isCustom: z.boolean(),
|
|
20
|
+
customStylePrompt: z.string().nullable(),
|
|
21
|
+
inputImages: z.array(z.string()),
|
|
22
|
+
resultImages: z.array(z.string()),
|
|
23
|
+
backgroundDescription: z.string().nullable(),
|
|
24
|
+
price: z.number(),
|
|
25
|
+
modelId: z.string().uuid(),
|
|
26
|
+
userId: z.string().nullable().optional(),
|
|
27
|
+
unregisteredUserId: z.string().nullable().optional(),
|
|
28
|
+
isDeleted: z.boolean(),
|
|
29
|
+
createdAt: z.date(),
|
|
30
|
+
completedAt: z.date().nullable().optional(),
|
|
31
|
+
updatedAt: z.date(),
|
|
32
|
+
});
|
|
33
|
+
export type MarketplaceCardJob = z.infer<typeof MarketplaceCardJobSchema>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IconVariantsSchema, TOOL_MODEL_STATUS } from '../../common';
|
|
3
|
+
import { MARKETPLACE_CARD_STRATEGY } from '../enums';
|
|
4
|
+
|
|
5
|
+
export const MarketplaceCardModelParamsSchema = z.object({
|
|
6
|
+
imageAttachment: z.object({
|
|
7
|
+
supported: z.boolean(),
|
|
8
|
+
maxImages: z.number(),
|
|
9
|
+
acceptedTypes: z.array(z.string()),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type MarketplaceCardModelParams = z.infer<typeof MarketplaceCardModelParamsSchema>;
|
|
14
|
+
|
|
15
|
+
export const MarketplaceCardModelSchema = z.object({
|
|
16
|
+
uuid: z.string().uuid(),
|
|
17
|
+
title: z.string(),
|
|
18
|
+
description: z.string(),
|
|
19
|
+
aiModel: z.string(),
|
|
20
|
+
price: z.number(),
|
|
21
|
+
order: z.number(),
|
|
22
|
+
statusCheckEndpoint: z.string().nullable(),
|
|
23
|
+
params: MarketplaceCardModelParamsSchema,
|
|
24
|
+
strategy: z.nativeEnum(MARKETPLACE_CARD_STRATEGY),
|
|
25
|
+
status: z.nativeEnum(TOOL_MODEL_STATUS),
|
|
26
|
+
iconVariants: IconVariantsSchema,
|
|
27
|
+
maxPromptLength: z.number(),
|
|
28
|
+
supportsImageAttachment: z.boolean(),
|
|
29
|
+
maxAttachedImages: z.number(),
|
|
30
|
+
createdAt: z.date(),
|
|
31
|
+
updatedAt: z.date(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export type MarketplaceCardModel = z.infer<typeof MarketplaceCardModelSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const MarketplaceCardStylePresetSchema = z.object({
|
|
4
|
+
uuid: z.string().uuid(),
|
|
5
|
+
title: z.string(),
|
|
6
|
+
description: z.string(),
|
|
7
|
+
previewImageUrl: z.string(),
|
|
8
|
+
systemPrompt: z.string(),
|
|
9
|
+
order: z.number(),
|
|
10
|
+
isActive: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type CardStyleModel = z.infer<typeof MarketplaceCardStylePresetSchema>;
|