@purpleschool/gptbot 0.12.98-stage-2 → 0.12.98
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/api/controllers/http/canvas-template.ts +2 -0
- package/api/controllers/http/canvas-text-generation.ts +7 -0
- package/api/controllers/http/canvas.ts +2 -0
- package/api/controllers/http/index.ts +3 -0
- package/api/controllers/http/marketplace-card.ts +1 -0
- package/api/controllers/http/palette.ts +6 -0
- package/api/controllers/http/update-post.ts +15 -0
- package/api/routes.ts +29 -0
- package/build/api/controllers/http/canvas-template.js +2 -0
- package/build/api/controllers/http/canvas-text-generation.js +9 -0
- package/build/api/controllers/http/canvas.js +2 -0
- package/build/api/controllers/http/index.js +3 -0
- package/build/api/controllers/http/marketplace-card.js +1 -0
- package/build/api/controllers/http/palette.js +8 -0
- package/build/api/controllers/http/update-post.js +16 -0
- package/build/api/routes.js +23 -0
- package/build/commands/{canvas → ai-studio/canvas}/create-canvas.command.js +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/delete-canvas.command.js +1 -1
- package/build/commands/ai-studio/canvas/execute-graph-by-node.command.js +17 -0
- package/build/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid-with-relations.query.js +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid.query.js +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/find-canvases-by-user.query.js +2 -2
- package/build/commands/ai-studio/canvas/get-price.query.js +29 -0
- package/build/commands/{canvas → ai-studio/canvas}/index.js +2 -0
- package/build/commands/{canvas → ai-studio/canvas}/run-canvas.command.js +1 -7
- package/build/commands/{canvas → ai-studio/canvas}/save-canvas.command.js +10 -5
- package/build/commands/{canvas → ai-studio/canvas}/update-canvas.command.js +1 -1
- package/build/commands/{canvas-edge → ai-studio/canvas-edge}/create-canvas-edge.command.js +4 -3
- package/build/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edge-by-source-and-target.query.js +1 -1
- package/build/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edges-by-canvas.query.js +1 -1
- package/build/commands/ai-studio/canvas-node/count-canvas-nodes-by-canvas.query.js +16 -0
- package/build/commands/{canvas-node → ai-studio/canvas-node}/create-canvas-node.command.js +8 -4
- package/build/commands/{canvas-node → ai-studio/canvas-node}/delete-canvas-node.command.js +2 -2
- package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-by-uuid.query.js +2 -2
- package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-definitions-with-configs.query.js +1 -1
- package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-nodes-by-canvas.query.js +1 -1
- package/build/commands/{canvas-node → ai-studio/canvas-node}/index.js +1 -0
- package/build/commands/{canvas-node → ai-studio/canvas-node}/update-canvas-node.command.js +13 -5
- package/build/commands/ai-studio/canvas-template/create-canvas-from-generated-template.command.js +44 -0
- package/build/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-from-template.command.js +1 -1
- package/build/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-template.command.js +3 -2
- package/build/commands/{canvas-template → ai-studio/canvas-template}/delete-canvas-template.command.js +3 -2
- package/build/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-template-by-uuid.query.js +1 -1
- package/build/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-templates.query.js +5 -1
- package/build/commands/ai-studio/canvas-template/generate-canvas-template-by-prompt.command.js +14 -0
- package/build/commands/{canvas-template → ai-studio/canvas-template}/index.js +3 -1
- package/build/commands/{canvas-template → ai-studio/canvas-template}/update-canvas-template.command.js +3 -2
- package/build/{constants/canvas → commands/ai-studio/canvas-tool}/index.js +2 -1
- package/build/commands/ai-studio/canvas-tool/palette/generate-palette.command.js +20 -0
- package/build/commands/ai-studio/canvas-tool/palette/get-palette-price.command.js +17 -0
- package/build/{constants/canvas/enums → commands/ai-studio/canvas-tool/palette}/index.js +2 -1
- package/build/commands/ai-studio/canvas-tool/text-gen/generate-text.command.js +17 -0
- package/build/commands/ai-studio/canvas-tool/text-gen/get-text-generation-config.command.js +13 -0
- package/build/commands/ai-studio/canvas-tool/text-gen/get-text-generation-price.command.js +18 -0
- package/build/commands/ai-studio/canvas-tool/text-gen/index.js +19 -0
- package/build/commands/ai-studio/index.js +21 -0
- package/build/commands/blog/create-post.command.js +4 -11
- package/build/commands/category/create-category.command.js +6 -8
- package/build/commands/course/create-course.command.js +5 -9
- package/build/commands/index.js +6 -4
- package/build/commands/page/create-page.command.js +8 -10
- package/build/commands/prompt/create-prompt.command.js +2 -6
- package/build/commands/prompt-category/create-prompt-category.command.js +3 -7
- package/build/commands/prompt-topic/create-prompt-topic.command.js +3 -9
- package/build/commands/question/create-question.command.js +2 -6
- package/build/commands/tools/diagrams/get-diagrams-price.command.js +1 -1
- package/build/commands/tools/marketplace-card/execute-marketplace-card.command.js +1 -0
- package/build/commands/tools/marketplace-card/generate-marketplace-card-description.command.js +14 -0
- package/build/commands/tools/marketplace-card/index.js +1 -0
- package/build/commands/update-post/create-update-post-translation.command.js +20 -0
- package/build/commands/update-post/create-update-post.command.js +14 -0
- package/build/commands/update-post/find-all-update-posts.command.js +11 -0
- package/build/commands/update-post/find-update-post.command.js +17 -0
- package/build/commands/update-post/get-all-update-post-translations.query.js +14 -0
- package/build/commands/update-post/get-latest-update-posts.command.js +11 -0
- package/build/commands/update-post/index.js +24 -0
- package/build/commands/update-post/update-update-post-translation.command.js +20 -0
- package/build/commands/update-post/update-update-post.command.js +17 -0
- package/build/commands/user/send-telegram-notification.command.js +1 -6
- package/build/constants/ai-model/enums/ai-model-strategy.enum.js +1 -0
- package/build/constants/canvas-edge/enums/input-output-type.enum.js +2 -0
- package/build/constants/canvas-node/enums/canvas-node-type.enum.js +1 -0
- package/build/constants/index.js +0 -1
- package/build/constants/tool-video/enums/index.js +2 -0
- package/build/constants/tool-video/enums/video-publish-moderation-status.enum.js +9 -0
- package/build/models/canvas-edge.schema.js +2 -1
- package/build/models/canvas-node-definition.schema.js +12 -2
- package/build/models/canvas-node.schema.js +202 -80
- package/build/models/canvas-template.schema.js +26 -6
- package/build/models/canvas.schema.js +0 -2
- package/build/models/index.js +2 -0
- package/build/models/post.schema.js +1 -1
- package/build/models/tools/marketplace-card/index.js +1 -0
- package/build/models/tools/marketplace-card/marketplace-card-description-generation.schema.js +15 -0
- package/build/models/tools/video/video-job.schema.js +1 -0
- package/build/models/update-post-translation.schema.js +15 -0
- package/build/models/update-post.schema.js +13 -0
- package/commands/{canvas → ai-studio/canvas}/create-canvas.command.ts +1 -1
- package/commands/{canvas → ai-studio/canvas}/delete-canvas.command.ts +1 -1
- package/commands/ai-studio/canvas/execute-graph-by-node.command.ts +20 -0
- package/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid-with-relations.query.ts +1 -1
- package/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid.query.ts +1 -1
- package/commands/{canvas → ai-studio/canvas}/find-canvases-by-user.query.ts +2 -2
- package/commands/ai-studio/canvas/get-price.query.ts +37 -0
- package/commands/{canvas → ai-studio/canvas}/index.ts +2 -0
- package/commands/{canvas → ai-studio/canvas}/run-canvas.command.ts +1 -13
- package/commands/{canvas → ai-studio/canvas}/save-canvas.command.ts +15 -10
- package/commands/{canvas → ai-studio/canvas}/update-canvas.command.ts +1 -1
- package/commands/{canvas-edge → ai-studio/canvas-edge}/create-canvas-edge.command.ts +4 -3
- package/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edge-by-source-and-target.query.ts +1 -1
- package/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edges-by-canvas.query.ts +1 -1
- package/commands/ai-studio/canvas-node/count-canvas-nodes-by-canvas.query.ts +20 -0
- package/commands/ai-studio/canvas-node/create-canvas-node.command.ts +33 -0
- package/commands/{canvas-node → ai-studio/canvas-node}/delete-canvas-node.command.ts +2 -2
- package/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-by-uuid.query.ts +2 -2
- package/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-definitions-with-configs.query.ts +1 -1
- package/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-nodes-by-canvas.query.ts +1 -1
- package/commands/{canvas-node → ai-studio/canvas-node}/index.ts +1 -0
- package/commands/ai-studio/canvas-node/update-canvas-node.command.ts +40 -0
- package/commands/ai-studio/canvas-template/create-canvas-from-generated-template.command.ts +57 -0
- package/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-from-template.command.ts +1 -1
- package/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-template.command.ts +7 -2
- package/commands/{canvas-template → ai-studio/canvas-template}/delete-canvas-template.command.ts +3 -2
- package/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-template-by-uuid.query.ts +1 -1
- package/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-templates.query.ts +5 -1
- package/commands/ai-studio/canvas-template/generate-canvas-template-by-prompt.command.ts +16 -0
- package/commands/{canvas-template → ai-studio/canvas-template}/index.ts +3 -1
- package/commands/{canvas-template → ai-studio/canvas-template}/update-canvas-template.command.ts +7 -2
- package/commands/ai-studio/canvas-tool/index.ts +2 -0
- package/commands/ai-studio/canvas-tool/palette/generate-palette.command.ts +23 -0
- package/commands/ai-studio/canvas-tool/palette/get-palette-price.command.ts +17 -0
- package/commands/ai-studio/canvas-tool/palette/index.ts +2 -0
- package/commands/ai-studio/canvas-tool/text-gen/generate-text.command.ts +17 -0
- package/commands/ai-studio/canvas-tool/text-gen/get-text-generation-config.command.ts +13 -0
- package/commands/ai-studio/canvas-tool/text-gen/get-text-generation-price.command.ts +18 -0
- package/commands/ai-studio/canvas-tool/text-gen/index.ts +3 -0
- package/commands/ai-studio/index.ts +5 -0
- package/commands/blog/create-post.command.ts +4 -11
- package/commands/category/create-category.command.ts +6 -8
- package/commands/course/create-course.command.ts +5 -9
- package/commands/index.ts +6 -5
- package/commands/page/create-page.command.ts +8 -10
- package/commands/prompt/create-prompt.command.ts +2 -6
- package/commands/prompt-category/create-prompt-category.command.ts +3 -7
- package/commands/prompt-topic/create-prompt-topic.command.ts +3 -9
- package/commands/question/create-question.command.ts +2 -6
- package/commands/tools/diagrams/get-diagrams-price.command.ts +1 -1
- package/commands/tools/marketplace-card/execute-marketplace-card.command.ts +1 -0
- package/commands/tools/marketplace-card/generate-marketplace-card-description.command.ts +16 -0
- package/commands/tools/marketplace-card/index.ts +1 -0
- package/commands/update-post/create-update-post-translation.command.ts +25 -0
- package/commands/update-post/create-update-post.command.ts +16 -0
- package/commands/update-post/find-all-update-posts.command.ts +10 -0
- package/commands/update-post/find-update-post.command.ts +22 -0
- package/commands/update-post/get-all-update-post-translations.query.ts +16 -0
- package/commands/update-post/get-latest-update-posts.command.ts +10 -0
- package/commands/update-post/index.ts +8 -0
- package/commands/update-post/update-update-post-translation.command.ts +25 -0
- package/commands/update-post/update-update-post.command.ts +22 -0
- package/commands/user/send-telegram-notification.command.ts +1 -8
- package/constants/ai-model/enums/ai-model-strategy.enum.ts +1 -0
- package/constants/canvas-edge/enums/input-output-type.enum.ts +2 -0
- package/constants/canvas-node/enums/canvas-node-type.enum.ts +1 -0
- package/constants/index.ts +0 -1
- package/constants/tool-video/enums/index.ts +2 -0
- package/constants/tool-video/enums/video-publish-moderation-status.enum.ts +5 -0
- package/models/canvas-edge.schema.ts +2 -1
- package/models/canvas-node-definition.schema.ts +15 -1
- package/models/canvas-node.schema.ts +253 -102
- package/models/canvas-template.schema.ts +34 -10
- package/models/canvas.schema.ts +0 -2
- package/models/index.ts +2 -0
- package/models/post.schema.ts +1 -1
- package/models/tools/marketplace-card/index.ts +1 -0
- package/models/tools/marketplace-card/marketplace-card-description-generation.schema.ts +17 -0
- package/models/tools/video/video-job.schema.ts +2 -1
- package/models/update-post-translation.schema.ts +13 -0
- package/models/update-post.schema.ts +11 -0
- package/package.json +1 -1
- package/build/constants/canvas/enums/canvas-status.enum.js +0 -9
- package/commands/canvas-node/create-canvas-node.command.ts +0 -25
- package/commands/canvas-node/update-canvas-node.command.ts +0 -26
- package/constants/canvas/enums/canvas-status.enum.ts +0 -5
- package/constants/canvas/enums/index.ts +0 -1
- package/constants/canvas/index.ts +0 -1
- /package/build/commands/{canvas-edge → ai-studio/canvas-edge}/delete-canvas-edge.command.js +0 -0
- /package/build/commands/{canvas-edge → ai-studio/canvas-edge}/index.js +0 -0
- /package/commands/{canvas-edge → ai-studio/canvas-edge}/delete-canvas-edge.command.ts +0 -0
- /package/commands/{canvas-edge → ai-studio/canvas-edge}/index.ts +0 -0
|
@@ -2,18 +2,26 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateCanvasNodeCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("
|
|
6
|
-
const models_1 = require("
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const models_1 = require("../../../models");
|
|
7
7
|
var UpdateCanvasNodeCommand;
|
|
8
8
|
(function (UpdateCanvasNodeCommand) {
|
|
9
|
-
UpdateCanvasNodeCommand.RequestParamSchema = models_1.
|
|
9
|
+
UpdateCanvasNodeCommand.RequestParamSchema = models_1.CanvasNodeBaseSchema.pick({
|
|
10
10
|
canvasId: true,
|
|
11
11
|
uuid: true,
|
|
12
12
|
});
|
|
13
|
-
UpdateCanvasNodeCommand.RequestSchema = zod_1.z
|
|
13
|
+
UpdateCanvasNodeCommand.RequestSchema = zod_1.z
|
|
14
|
+
.object({
|
|
14
15
|
nodeDefinitionId: zod_1.z.nativeEnum(constants_1.CANVAS_NODE_TYPE).optional(),
|
|
15
16
|
position: models_1.CanvasNodePositionSchema.optional(),
|
|
16
|
-
params:
|
|
17
|
+
params: zod_1.z.unknown().nullable().optional(),
|
|
18
|
+
output: zod_1.z.unknown().nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
.superRefine((request, ctx) => {
|
|
21
|
+
if (request.nodeDefinitionId !== undefined) {
|
|
22
|
+
(0, models_1.validateCanvasNodeParamsByType)(request.nodeDefinitionId, request.params, ctx);
|
|
23
|
+
(0, models_1.validateCanvasNodeOutputByType)(request.nodeDefinitionId, request.output, ctx);
|
|
24
|
+
}
|
|
17
25
|
});
|
|
18
26
|
UpdateCanvasNodeCommand.ResponseSchema = zod_1.z.object({
|
|
19
27
|
data: models_1.CanvasNodeSchema,
|
package/build/commands/ai-studio/canvas-template/create-canvas-from-generated-template.command.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateCanvasFromGeneratedTemplateCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var CreateCanvasFromGeneratedTemplateCommand;
|
|
8
|
+
(function (CreateCanvasFromGeneratedTemplateCommand) {
|
|
9
|
+
const GeneratedTemplateInputSchema = zod_1.z.object({
|
|
10
|
+
name: zod_1.z.string().trim().min(1),
|
|
11
|
+
description: zod_1.z.string().trim().min(1),
|
|
12
|
+
previewImageUrl: zod_1.z.string().url().nullable(),
|
|
13
|
+
tags: zod_1.z.array(models_1.CanvasTemplateTagSchema),
|
|
14
|
+
graph: zod_1.z.object({
|
|
15
|
+
nodes: zod_1.z.array(zod_1.z.object({
|
|
16
|
+
uuid: zod_1.z.string().trim().min(1),
|
|
17
|
+
nodeDefinitionId: zod_1.z.nativeEnum(constants_1.CANVAS_NODE_TYPE),
|
|
18
|
+
position: models_1.CanvasNodePositionSchema,
|
|
19
|
+
params: zod_1.z
|
|
20
|
+
.object({
|
|
21
|
+
prompt: zod_1.z.string().trim().min(1),
|
|
22
|
+
modelId: zod_1.z.string().trim().min(1).optional(),
|
|
23
|
+
modelName: zod_1.z.string().trim().min(1).optional(),
|
|
24
|
+
})
|
|
25
|
+
.catchall(zod_1.z.unknown()),
|
|
26
|
+
})),
|
|
27
|
+
edges: zod_1.z.array(zod_1.z.object({
|
|
28
|
+
sourceId: zod_1.z.string().trim().min(1),
|
|
29
|
+
targetId: zod_1.z.string().trim().min(1),
|
|
30
|
+
sourceHandle: zod_1.z.nativeEnum(constants_1.INPUT_OUTPUT_TYPE),
|
|
31
|
+
targetHandle: zod_1.z.nativeEnum(constants_1.INPUT_OUTPUT_TYPE),
|
|
32
|
+
})),
|
|
33
|
+
}),
|
|
34
|
+
});
|
|
35
|
+
CreateCanvasFromGeneratedTemplateCommand.RequestSchema = zod_1.z.object({
|
|
36
|
+
data: GeneratedTemplateInputSchema,
|
|
37
|
+
});
|
|
38
|
+
CreateCanvasFromGeneratedTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
39
|
+
data: models_1.CanvasSchema.extend({
|
|
40
|
+
nodes: zod_1.z.array(models_1.CanvasNodeSchema),
|
|
41
|
+
edges: zod_1.z.array(models_1.CanvasEdgeSchema),
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
})(CreateCanvasFromGeneratedTemplateCommand || (exports.CreateCanvasFromGeneratedTemplateCommand = CreateCanvasFromGeneratedTemplateCommand = {}));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateCanvasFromTemplateCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var CreateCanvasFromTemplateCommand;
|
|
7
7
|
(function (CreateCanvasFromTemplateCommand) {
|
|
8
8
|
CreateCanvasFromTemplateCommand.RequestParamSchema = zod_1.z.object({
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateCanvasTemplateCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var CreateCanvasTemplateCommand;
|
|
7
7
|
(function (CreateCanvasTemplateCommand) {
|
|
8
8
|
CreateCanvasTemplateCommand.RequestSchema = zod_1.z.object({
|
|
9
9
|
name: zod_1.z.string().trim().min(1),
|
|
10
10
|
description: zod_1.z.string().trim().min(1).optional().nullable(),
|
|
11
|
+
isPopular: zod_1.z.boolean().optional().default(false),
|
|
11
12
|
previewImageUrl: zod_1.z.string().url().optional().nullable(),
|
|
12
|
-
tags: zod_1.z.array(
|
|
13
|
+
tags: zod_1.z.array(models_1.CanvasTemplateTagSchema).default([]),
|
|
13
14
|
graph: models_1.CanvasTemplateGraphSchema,
|
|
14
15
|
});
|
|
15
16
|
CreateCanvasTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeleteCanvasTemplateCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
5
6
|
var DeleteCanvasTemplateCommand;
|
|
6
7
|
(function (DeleteCanvasTemplateCommand) {
|
|
7
|
-
DeleteCanvasTemplateCommand.RequestParamSchema =
|
|
8
|
-
uuid:
|
|
8
|
+
DeleteCanvasTemplateCommand.RequestParamSchema = models_1.CanvasTemplateSchema.pick({
|
|
9
|
+
uuid: true,
|
|
9
10
|
});
|
|
10
11
|
DeleteCanvasTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
11
12
|
data: zod_1.z.object({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasTemplateByUuidQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasTemplateByUuidQuery;
|
|
7
7
|
(function (FindCanvasTemplateByUuidQuery) {
|
|
8
8
|
FindCanvasTemplateByUuidQuery.RequestSchema = models_1.CanvasTemplateSchema.pick({
|
package/build/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-templates.query.js
RENAMED
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FindCanvasTemplatesQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var FindCanvasTemplatesQuery;
|
|
7
7
|
(function (FindCanvasTemplatesQuery) {
|
|
8
8
|
FindCanvasTemplatesQuery.RequestSchema = zod_1.z.object({
|
|
9
9
|
limit: zod_1.z.coerce.number().min(1).default(10),
|
|
10
10
|
offset: zod_1.z.coerce.number().min(0).default(0),
|
|
11
11
|
search: zod_1.z.string().trim().optional(),
|
|
12
|
+
isPopular: zod_1.z
|
|
13
|
+
.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])])
|
|
14
|
+
.transform((value) => (typeof value === 'boolean' ? value : value === 'true'))
|
|
15
|
+
.optional(),
|
|
12
16
|
});
|
|
13
17
|
FindCanvasTemplatesQuery.ResponseSchema = zod_1.z.object({
|
|
14
18
|
data: zod_1.z.array(models_1.CanvasTemplateSchema),
|
package/build/commands/ai-studio/canvas-template/generate-canvas-template-by-prompt.command.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenerateCanvasTemplateByPromptCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var GenerateCanvasTemplateByPromptCommand;
|
|
7
|
+
(function (GenerateCanvasTemplateByPromptCommand) {
|
|
8
|
+
GenerateCanvasTemplateByPromptCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
prompt: zod_1.z.string().trim().min(1),
|
|
10
|
+
});
|
|
11
|
+
GenerateCanvasTemplateByPromptCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.GeneratedCanvasTemplateSchema,
|
|
13
|
+
});
|
|
14
|
+
})(GenerateCanvasTemplateByPromptCommand || (exports.GenerateCanvasTemplateByPromptCommand = GenerateCanvasTemplateByPromptCommand = {}));
|
|
@@ -14,9 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./create-canvas-template.command"), exports);
|
|
18
17
|
__exportStar(require("./create-canvas-from-template.command"), exports);
|
|
18
|
+
__exportStar(require("./create-canvas-from-generated-template.command"), exports);
|
|
19
|
+
__exportStar(require("./create-canvas-template.command"), exports);
|
|
19
20
|
__exportStar(require("./delete-canvas-template.command"), exports);
|
|
21
|
+
__exportStar(require("./generate-canvas-template-by-prompt.command"), exports);
|
|
20
22
|
__exportStar(require("./find-canvas-template-by-uuid.query"), exports);
|
|
21
23
|
__exportStar(require("./find-canvas-templates.query"), exports);
|
|
22
24
|
__exportStar(require("./update-canvas-template.command"), exports);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateCanvasTemplateCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
6
|
var UpdateCanvasTemplateCommand;
|
|
7
7
|
(function (UpdateCanvasTemplateCommand) {
|
|
8
8
|
UpdateCanvasTemplateCommand.RequestParamSchema = models_1.CanvasTemplateSchema.pick({
|
|
@@ -11,8 +11,9 @@ var UpdateCanvasTemplateCommand;
|
|
|
11
11
|
UpdateCanvasTemplateCommand.RequestSchema = zod_1.z.object({
|
|
12
12
|
name: zod_1.z.string().trim().min(1).optional(),
|
|
13
13
|
description: zod_1.z.string().trim().min(1).optional().nullable(),
|
|
14
|
+
isPopular: zod_1.z.boolean().optional(),
|
|
14
15
|
previewImageUrl: zod_1.z.string().url().optional().nullable(),
|
|
15
|
-
tags: zod_1.z.array(
|
|
16
|
+
tags: zod_1.z.array(models_1.CanvasTemplateTagSchema).optional(),
|
|
16
17
|
graph: models_1.CanvasTemplateGraphSchema.optional(),
|
|
17
18
|
});
|
|
18
19
|
UpdateCanvasTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./palette"), exports);
|
|
18
|
+
__exportStar(require("./text-gen"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GeneratePaletteCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const HexColorSchema = zod_1.z.string().regex(/^#[0-9A-Fa-f]{6}$/);
|
|
6
|
+
var GeneratePaletteCommand;
|
|
7
|
+
(function (GeneratePaletteCommand) {
|
|
8
|
+
GeneratePaletteCommand.PaletteSchema = zod_1.z.object({
|
|
9
|
+
colors: zod_1.z.array(HexColorSchema).max(7),
|
|
10
|
+
});
|
|
11
|
+
GeneratePaletteCommand.RequestSchema = zod_1.z.object({
|
|
12
|
+
nodeUuid: zod_1.z.string().uuid(),
|
|
13
|
+
canvasId: zod_1.z.string().uuid(),
|
|
14
|
+
prompt: zod_1.z.string().min(1),
|
|
15
|
+
colors: zod_1.z.array(HexColorSchema).optional(),
|
|
16
|
+
});
|
|
17
|
+
GeneratePaletteCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
+
data: GeneratePaletteCommand.PaletteSchema,
|
|
19
|
+
});
|
|
20
|
+
})(GeneratePaletteCommand || (exports.GeneratePaletteCommand = GeneratePaletteCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPalettePriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var GetPalettePriceCommand;
|
|
6
|
+
(function (GetPalettePriceCommand) {
|
|
7
|
+
GetPalettePriceCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
promptLength: zod_1.z.coerce.number().positive(),
|
|
9
|
+
});
|
|
10
|
+
GetPalettePriceCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.object({
|
|
12
|
+
price: zod_1.z.number(),
|
|
13
|
+
charsUntilNextPriceIncrease: zod_1.z.number().int().nonnegative().nullable().optional(),
|
|
14
|
+
charsUntilNextPriceDecrease: zod_1.z.number().int().nonnegative().nullable().optional(),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
})(GetPalettePriceCommand || (exports.GetPalettePriceCommand = GetPalettePriceCommand = {}));
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./generate-palette.command"), exports);
|
|
18
|
+
__exportStar(require("./get-palette-price.command"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenerateTextCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../../models");
|
|
6
|
+
var GenerateTextCommand;
|
|
7
|
+
(function (GenerateTextCommand) {
|
|
8
|
+
GenerateTextCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
nodeUuid: zod_1.z.string().uuid(),
|
|
10
|
+
canvasId: zod_1.z.string().uuid(),
|
|
11
|
+
modelId: zod_1.z.string().uuid(),
|
|
12
|
+
prompt: zod_1.z.string().trim(),
|
|
13
|
+
});
|
|
14
|
+
GenerateTextCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: models_1.TextGenOutputSchema,
|
|
16
|
+
});
|
|
17
|
+
})(GenerateTextCommand || (exports.GenerateTextCommand = GenerateTextCommand = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTextGenerationConfigCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../../models");
|
|
6
|
+
var GetTextGenerationConfigCommand;
|
|
7
|
+
(function (GetTextGenerationConfigCommand) {
|
|
8
|
+
GetTextGenerationConfigCommand.ResponseSchema = zod_1.z.object({
|
|
9
|
+
data: zod_1.z.array(models_1.AiVendorSchema.extend({
|
|
10
|
+
models: zod_1.z.array(models_1.AiModelWithUnlockedBySchema),
|
|
11
|
+
})),
|
|
12
|
+
});
|
|
13
|
+
})(GetTextGenerationConfigCommand || (exports.GetTextGenerationConfigCommand = GetTextGenerationConfigCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTextGenerationPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var GetTextGenerationPriceCommand;
|
|
6
|
+
(function (GetTextGenerationPriceCommand) {
|
|
7
|
+
GetTextGenerationPriceCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
modelId: zod_1.z.string().uuid(),
|
|
9
|
+
promptLength: zod_1.z.coerce.number().int().positive(),
|
|
10
|
+
});
|
|
11
|
+
GetTextGenerationPriceCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: zod_1.z.object({
|
|
13
|
+
price: zod_1.z.number(),
|
|
14
|
+
charsUntilNextPriceIncrease: zod_1.z.number().int().nonnegative().nullable().optional(),
|
|
15
|
+
charsUntilNextPriceDecrease: zod_1.z.number().int().nonnegative().nullable().optional(),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
})(GetTextGenerationPriceCommand || (exports.GetTextGenerationPriceCommand = GetTextGenerationPriceCommand = {}));
|
|
@@ -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("./generate-text.command"), exports);
|
|
18
|
+
__exportStar(require("./get-text-generation-config.command"), exports);
|
|
19
|
+
__exportStar(require("./get-text-generation-price.command"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./canvas"), exports);
|
|
18
|
+
__exportStar(require("./canvas-edge"), exports);
|
|
19
|
+
__exportStar(require("./canvas-node"), exports);
|
|
20
|
+
__exportStar(require("./canvas-template"), exports);
|
|
21
|
+
__exportStar(require("./canvas-tool"), exports);
|
|
@@ -5,17 +5,10 @@ const models_1 = require("../../models");
|
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
var CreatePostCommand;
|
|
7
7
|
(function (CreatePostCommand) {
|
|
8
|
-
CreatePostCommand.RequestSchema = models_1.PostSchema.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
views: true,
|
|
13
|
-
content: true,
|
|
14
|
-
contentPreview: true,
|
|
15
|
-
metaTitle: true,
|
|
16
|
-
metaDescription: true,
|
|
17
|
-
createdAt: true,
|
|
18
|
-
updatedAt: true,
|
|
8
|
+
CreatePostCommand.RequestSchema = models_1.PostSchema.pick({
|
|
9
|
+
alias: true,
|
|
10
|
+
image: true,
|
|
11
|
+
type: true,
|
|
19
12
|
});
|
|
20
13
|
CreatePostCommand.RequestParamSchema = models_1.PostSchema.pick({
|
|
21
14
|
type: true,
|
|
@@ -5,14 +5,12 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
var CreateCategoryCommand;
|
|
7
7
|
(function (CreateCategoryCommand) {
|
|
8
|
-
CreateCategoryCommand.RequestSchema = models_1.CategorySchema.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
createdAt: true,
|
|
15
|
-
updatedAt: true,
|
|
8
|
+
CreateCategoryCommand.RequestSchema = models_1.CategorySchema.pick({
|
|
9
|
+
mainCategoryId: true,
|
|
10
|
+
type: true,
|
|
11
|
+
order: true,
|
|
12
|
+
contentType: true,
|
|
13
|
+
marks: true,
|
|
16
14
|
});
|
|
17
15
|
CreateCategoryCommand.ResponseSchema = zod_1.z.object({
|
|
18
16
|
data: models_1.CategorySchema,
|
|
@@ -5,15 +5,11 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
var CreateCourseCommand;
|
|
7
7
|
(function (CreateCourseCommand) {
|
|
8
|
-
CreateCourseCommand.RequestSchema = models_1.CourseSchema.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
description: true,
|
|
14
|
-
skills: true,
|
|
15
|
-
createdAt: true,
|
|
16
|
-
updatedAt: true,
|
|
8
|
+
CreateCourseCommand.RequestSchema = models_1.CourseSchema.pick({
|
|
9
|
+
alias: true,
|
|
10
|
+
author: true,
|
|
11
|
+
videoId: true,
|
|
12
|
+
status: true,
|
|
17
13
|
});
|
|
18
14
|
CreateCourseCommand.ResponseSchema = zod_1.z.object({
|
|
19
15
|
data: models_1.CourseSchema,
|
package/build/commands/index.js
CHANGED
|
@@ -19,9 +19,11 @@ __exportStar(require("./ai-model"), exports);
|
|
|
19
19
|
__exportStar(require("./ai-vendor"), exports);
|
|
20
20
|
__exportStar(require("./auth"), exports);
|
|
21
21
|
__exportStar(require("./blog"), exports);
|
|
22
|
-
__exportStar(require("./canvas"), exports);
|
|
23
|
-
__exportStar(require("./canvas-node"), exports);
|
|
24
|
-
__exportStar(require("./canvas-edge"), exports);
|
|
22
|
+
__exportStar(require("./ai-studio/canvas"), exports);
|
|
23
|
+
__exportStar(require("./ai-studio/canvas-node"), exports);
|
|
24
|
+
__exportStar(require("./ai-studio/canvas-edge"), exports);
|
|
25
|
+
__exportStar(require("./ai-studio/canvas-template"), exports);
|
|
26
|
+
__exportStar(require("./ai-studio/canvas-tool"), exports);
|
|
25
27
|
__exportStar(require("./category"), exports);
|
|
26
28
|
__exportStar(require("./chat"), exports);
|
|
27
29
|
__exportStar(require("./course"), exports);
|
|
@@ -44,6 +46,7 @@ __exportStar(require("./telegram-auth"), exports);
|
|
|
44
46
|
__exportStar(require("./telegram-profile"), exports);
|
|
45
47
|
__exportStar(require("./tools"), exports);
|
|
46
48
|
__exportStar(require("./unregistered-user"), exports);
|
|
49
|
+
__exportStar(require("./update-post"), exports);
|
|
47
50
|
__exportStar(require("./user"), exports);
|
|
48
51
|
__exportStar(require("./user-to-subscription"), exports);
|
|
49
52
|
__exportStar(require("./user-to-task"), exports);
|
|
@@ -65,4 +68,3 @@ __exportStar(require("./user-profile"), exports);
|
|
|
65
68
|
__exportStar(require("./team-account"), exports);
|
|
66
69
|
__exportStar(require("./team-to-subscription"), exports);
|
|
67
70
|
__exportStar(require("./team-to-product"), exports);
|
|
68
|
-
__exportStar(require("./canvas-template"), exports);
|
|
@@ -6,16 +6,14 @@ const models_1 = require("../../models");
|
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
7
|
var CreatePageCommand;
|
|
8
8
|
(function (CreatePageCommand) {
|
|
9
|
-
CreatePageCommand.RequestSchema = models_1.PageSchema.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
seoTextMd: true,
|
|
18
|
-
toolTitle: true,
|
|
9
|
+
CreatePageCommand.RequestSchema = models_1.PageSchema.pick({
|
|
10
|
+
alias: true,
|
|
11
|
+
categoryId: true,
|
|
12
|
+
aIModelId: true,
|
|
13
|
+
toolId: true,
|
|
14
|
+
toolOptionId: true,
|
|
15
|
+
toolModelId: true,
|
|
16
|
+
type: true,
|
|
19
17
|
})
|
|
20
18
|
.refine((data) => {
|
|
21
19
|
if (data.type === constants_1.PageType.AI_MODEL) {
|
|
@@ -8,12 +8,8 @@ const zod_1 = __importDefault(require("zod"));
|
|
|
8
8
|
const models_1 = require("../../models");
|
|
9
9
|
var CreatePromptCommand;
|
|
10
10
|
(function (CreatePromptCommand) {
|
|
11
|
-
CreatePromptCommand.RequestSchema = models_1.PromptSchema.
|
|
12
|
-
|
|
13
|
-
title: true,
|
|
14
|
-
content: true,
|
|
15
|
-
createdAt: true,
|
|
16
|
-
updatedAt: true,
|
|
11
|
+
CreatePromptCommand.RequestSchema = models_1.PromptSchema.pick({
|
|
12
|
+
topicId: true,
|
|
17
13
|
});
|
|
18
14
|
CreatePromptCommand.ResponseSchema = zod_1.default.object({
|
|
19
15
|
data: models_1.PromptSchema,
|
|
@@ -8,13 +8,9 @@ const zod_1 = __importDefault(require("zod"));
|
|
|
8
8
|
const models_1 = require("../../models");
|
|
9
9
|
var CreatePromptCategoryCommand;
|
|
10
10
|
(function (CreatePromptCategoryCommand) {
|
|
11
|
-
CreatePromptCategoryCommand.RequestSchema = models_1.PromptCategorySchema.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
metaTitle: true,
|
|
15
|
-
metaDescription: true,
|
|
16
|
-
createdAt: true,
|
|
17
|
-
updatedAt: true,
|
|
11
|
+
CreatePromptCategoryCommand.RequestSchema = models_1.PromptCategorySchema.pick({
|
|
12
|
+
icon: true,
|
|
13
|
+
alias: true,
|
|
18
14
|
});
|
|
19
15
|
CreatePromptCategoryCommand.ResponseSchema = zod_1.default.object({
|
|
20
16
|
data: models_1.PromptCategorySchema,
|
|
@@ -8,15 +8,9 @@ const zod_1 = __importDefault(require("zod"));
|
|
|
8
8
|
const models_1 = require("../../models");
|
|
9
9
|
var CreatePromptTopicCommand;
|
|
10
10
|
(function (CreatePromptTopicCommand) {
|
|
11
|
-
CreatePromptTopicCommand.RequestSchema = models_1.PromptTopicSchema.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
content: true,
|
|
15
|
-
metaTitle: true,
|
|
16
|
-
metaDescription: true,
|
|
17
|
-
seoText: true,
|
|
18
|
-
createdAt: true,
|
|
19
|
-
updatedAt: true,
|
|
11
|
+
CreatePromptTopicCommand.RequestSchema = models_1.PromptTopicSchema.pick({
|
|
12
|
+
categoryId: true,
|
|
13
|
+
alias: true,
|
|
20
14
|
});
|
|
21
15
|
CreatePromptTopicCommand.ResponseSchema = zod_1.default.object({
|
|
22
16
|
data: models_1.PromptTopicSchema,
|
|
@@ -5,12 +5,8 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
var CreateQuestionCommand;
|
|
7
7
|
(function (CreateQuestionCommand) {
|
|
8
|
-
CreateQuestionCommand.RequestSchema = models_1.QuestionSchema.
|
|
9
|
-
|
|
10
|
-
createdAt: true,
|
|
11
|
-
updatedAt: true,
|
|
12
|
-
question: true,
|
|
13
|
-
answer: true,
|
|
8
|
+
CreateQuestionCommand.RequestSchema = models_1.QuestionSchema.pick({
|
|
9
|
+
pageId: true,
|
|
14
10
|
});
|
|
15
11
|
CreateQuestionCommand.ResponseSchema = zod_1.z.object({
|
|
16
12
|
data: models_1.QuestionSchema,
|
|
@@ -6,7 +6,7 @@ var GetDiagramsPriceCommand;
|
|
|
6
6
|
(function (GetDiagramsPriceCommand) {
|
|
7
7
|
GetDiagramsPriceCommand.RequestSchema = zod_1.z.object({
|
|
8
8
|
modelId: zod_1.z.string().uuid(),
|
|
9
|
-
promptLenght: zod_1.z.number().max(
|
|
9
|
+
promptLenght: zod_1.z.number().max(100000),
|
|
10
10
|
chartTypeUuid: zod_1.z.string().uuid(),
|
|
11
11
|
fileIds: zod_1.z.array(zod_1.z.string().uuid()).optional().default([]),
|
|
12
12
|
jobId: zod_1.z.string().uuid().optional(),
|
|
@@ -23,6 +23,7 @@ var ExecuteMarketplaceCardCommand;
|
|
|
23
23
|
customStylePrompt: zod_1.z.string().nullable().optional(),
|
|
24
24
|
inputImages: zod_1.z.array(zod_1.z.string()),
|
|
25
25
|
backgroundDescription: zod_1.z.string().nullable().optional(),
|
|
26
|
+
descriptionGenerationId: zod_1.z.string().uuid().nullable().optional(),
|
|
26
27
|
})
|
|
27
28
|
.superRefine((data, ctx) => {
|
|
28
29
|
const hasPreset = Boolean(data.stylePresetId);
|
package/build/commands/tools/marketplace-card/generate-marketplace-card-description.command.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenerateMarketplaceCardDescriptionCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var GenerateMarketplaceCardDescriptionCommand;
|
|
7
|
+
(function (GenerateMarketplaceCardDescriptionCommand) {
|
|
8
|
+
GenerateMarketplaceCardDescriptionCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
description: zod_1.z.string().min(1).max(10000),
|
|
10
|
+
});
|
|
11
|
+
GenerateMarketplaceCardDescriptionCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.MarketplaceCardDescriptionGenerationSchema,
|
|
13
|
+
});
|
|
14
|
+
})(GenerateMarketplaceCardDescriptionCommand || (exports.GenerateMarketplaceCardDescriptionCommand = GenerateMarketplaceCardDescriptionCommand = {}));
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./execute-marketplace-card.command"), exports);
|
|
18
|
+
__exportStar(require("./generate-marketplace-card-description.command"), exports);
|
|
18
19
|
__exportStar(require("./find-marketplace-card-job-by-uuid.command"), exports);
|
|
19
20
|
__exportStar(require("./find-marketplace-card-jobs.command"), exports);
|
|
20
21
|
__exportStar(require("./get-marketplace-card-config.command"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateUpdatePostTranslationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var CreateUpdatePostTranslationCommand;
|
|
7
|
+
(function (CreateUpdatePostTranslationCommand) {
|
|
8
|
+
CreateUpdatePostTranslationCommand.RequestSchema = models_1.UpdatePostTranslationSchema.pick({
|
|
9
|
+
locale: true,
|
|
10
|
+
title: true,
|
|
11
|
+
description: true,
|
|
12
|
+
image: true,
|
|
13
|
+
});
|
|
14
|
+
CreateUpdatePostTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
15
|
+
uuid: zod_1.z.string().uuid(),
|
|
16
|
+
});
|
|
17
|
+
CreateUpdatePostTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
+
data: models_1.UpdatePostTranslationSchema,
|
|
19
|
+
});
|
|
20
|
+
})(CreateUpdatePostTranslationCommand || (exports.CreateUpdatePostTranslationCommand = CreateUpdatePostTranslationCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateUpdatePostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var CreateUpdatePostCommand;
|
|
7
|
+
(function (CreateUpdatePostCommand) {
|
|
8
|
+
CreateUpdatePostCommand.RequestSchema = models_1.UpdatePostSchema.pick({
|
|
9
|
+
slug: true,
|
|
10
|
+
});
|
|
11
|
+
CreateUpdatePostCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.UpdatePostSchema,
|
|
13
|
+
});
|
|
14
|
+
})(CreateUpdatePostCommand || (exports.CreateUpdatePostCommand = CreateUpdatePostCommand = {}));
|