@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
package/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-templates.query.ts
RENAMED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CanvasTemplateSchema } from '
|
|
2
|
+
import { CanvasTemplateSchema } from '../../../models';
|
|
3
3
|
|
|
4
4
|
export namespace FindCanvasTemplatesQuery {
|
|
5
5
|
export const RequestSchema = z.object({
|
|
6
6
|
limit: z.coerce.number().min(1).default(10),
|
|
7
7
|
offset: z.coerce.number().min(0).default(0),
|
|
8
8
|
search: z.string().trim().optional(),
|
|
9
|
+
isPopular: z
|
|
10
|
+
.union([z.boolean(), z.enum(['true', 'false'])])
|
|
11
|
+
.transform((value) => (typeof value === 'boolean' ? value : value === 'true'))
|
|
12
|
+
.optional(),
|
|
9
13
|
});
|
|
10
14
|
|
|
11
15
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { GeneratedCanvasTemplateSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GenerateCanvasTemplateByPromptCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
prompt: z.string().trim().min(1),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: GeneratedCanvasTemplateSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export * from './create-canvas-template.command';
|
|
2
1
|
export * from './create-canvas-from-template.command';
|
|
2
|
+
export * from './create-canvas-from-generated-template.command';
|
|
3
|
+
export * from './create-canvas-template.command';
|
|
3
4
|
export * from './delete-canvas-template.command';
|
|
5
|
+
export * from './generate-canvas-template-by-prompt.command';
|
|
4
6
|
export * from './find-canvas-template-by-uuid.query';
|
|
5
7
|
export * from './find-canvas-templates.query';
|
|
6
8
|
export * from './update-canvas-template.command';
|
package/commands/{canvas-template → ai-studio/canvas-template}/update-canvas-template.command.ts
RENAMED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
CanvasTemplateSchema,
|
|
4
|
+
CanvasTemplateGraphSchema,
|
|
5
|
+
CanvasTemplateTagSchema,
|
|
6
|
+
} from '../../../models';
|
|
3
7
|
|
|
4
8
|
export namespace UpdateCanvasTemplateCommand {
|
|
5
9
|
export const RequestParamSchema = CanvasTemplateSchema.pick({
|
|
@@ -11,8 +15,9 @@ export namespace UpdateCanvasTemplateCommand {
|
|
|
11
15
|
export const RequestSchema = z.object({
|
|
12
16
|
name: z.string().trim().min(1).optional(),
|
|
13
17
|
description: z.string().trim().min(1).optional().nullable(),
|
|
18
|
+
isPopular: z.boolean().optional(),
|
|
14
19
|
previewImageUrl: z.string().url().optional().nullable(),
|
|
15
|
-
tags: z.array(
|
|
20
|
+
tags: z.array(CanvasTemplateTagSchema).optional(),
|
|
16
21
|
graph: CanvasTemplateGraphSchema.optional(),
|
|
17
22
|
});
|
|
18
23
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const HexColorSchema = z.string().regex(/^#[0-9A-Fa-f]{6}$/);
|
|
4
|
+
|
|
5
|
+
export namespace GeneratePaletteCommand {
|
|
6
|
+
export const PaletteSchema = z.object({
|
|
7
|
+
colors: z.array(HexColorSchema).max(7),
|
|
8
|
+
});
|
|
9
|
+
export type Palette = z.infer<typeof PaletteSchema>;
|
|
10
|
+
|
|
11
|
+
export const RequestSchema = z.object({
|
|
12
|
+
nodeUuid: z.string().uuid(),
|
|
13
|
+
canvasId: z.string().uuid(),
|
|
14
|
+
prompt: z.string().min(1),
|
|
15
|
+
colors: z.array(HexColorSchema).optional(),
|
|
16
|
+
});
|
|
17
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
18
|
+
|
|
19
|
+
export const ResponseSchema = z.object({
|
|
20
|
+
data: PaletteSchema,
|
|
21
|
+
});
|
|
22
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace GetPalettePriceCommand {
|
|
4
|
+
export const RequestSchema = z.object({
|
|
5
|
+
promptLength: z.coerce.number().positive(),
|
|
6
|
+
});
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.object({
|
|
10
|
+
data: z.object({
|
|
11
|
+
price: z.number(),
|
|
12
|
+
charsUntilNextPriceIncrease: z.number().int().nonnegative().nullable().optional(),
|
|
13
|
+
charsUntilNextPriceDecrease: z.number().int().nonnegative().nullable().optional(),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TextGenOutputSchema } from '../../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GenerateTextCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
nodeUuid: z.string().uuid(),
|
|
7
|
+
canvasId: z.string().uuid(),
|
|
8
|
+
modelId: z.string().uuid(),
|
|
9
|
+
prompt: z.string().trim(),
|
|
10
|
+
});
|
|
11
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = z.object({
|
|
14
|
+
data: TextGenOutputSchema,
|
|
15
|
+
});
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AiModelWithUnlockedBySchema, AiVendorSchema } from '../../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetTextGenerationConfigCommand {
|
|
5
|
+
export const ResponseSchema = z.object({
|
|
6
|
+
data: z.array(
|
|
7
|
+
AiVendorSchema.extend({
|
|
8
|
+
models: z.array(AiModelWithUnlockedBySchema),
|
|
9
|
+
}),
|
|
10
|
+
),
|
|
11
|
+
});
|
|
12
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace GetTextGenerationPriceCommand {
|
|
4
|
+
export const RequestSchema = z.object({
|
|
5
|
+
modelId: z.string().uuid(),
|
|
6
|
+
promptLength: z.coerce.number().int().positive(),
|
|
7
|
+
});
|
|
8
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
9
|
+
|
|
10
|
+
export const ResponseSchema = z.object({
|
|
11
|
+
data: z.object({
|
|
12
|
+
price: z.number(),
|
|
13
|
+
charsUntilNextPriceIncrease: z.number().int().nonnegative().nullable().optional(),
|
|
14
|
+
charsUntilNextPriceDecrease: z.number().int().nonnegative().nullable().optional(),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -2,17 +2,10 @@ import { PostSchema } from '../../models';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
export namespace CreatePostCommand {
|
|
5
|
-
export const RequestSchema = PostSchema.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
views: true,
|
|
10
|
-
content: true,
|
|
11
|
-
contentPreview: true,
|
|
12
|
-
metaTitle: true,
|
|
13
|
-
metaDescription: true,
|
|
14
|
-
createdAt: true,
|
|
15
|
-
updatedAt: true,
|
|
5
|
+
export const RequestSchema = PostSchema.pick({
|
|
6
|
+
alias: true,
|
|
7
|
+
image: true,
|
|
8
|
+
type: true,
|
|
16
9
|
});
|
|
17
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
18
11
|
|
|
@@ -2,14 +2,12 @@ import { z } from 'zod';
|
|
|
2
2
|
import { CategorySchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
export namespace CreateCategoryCommand {
|
|
5
|
-
export const RequestSchema = CategorySchema.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
createdAt: true,
|
|
12
|
-
updatedAt: true,
|
|
5
|
+
export const RequestSchema = CategorySchema.pick({
|
|
6
|
+
mainCategoryId: true,
|
|
7
|
+
type: true,
|
|
8
|
+
order: true,
|
|
9
|
+
contentType: true,
|
|
10
|
+
marks: true,
|
|
13
11
|
});
|
|
14
12
|
|
|
15
13
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -2,15 +2,11 @@ import { z } from 'zod';
|
|
|
2
2
|
import { CourseSchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
export namespace CreateCourseCommand {
|
|
5
|
-
export const RequestSchema = CourseSchema.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
description: true,
|
|
11
|
-
skills: true,
|
|
12
|
-
createdAt: true,
|
|
13
|
-
updatedAt: true,
|
|
5
|
+
export const RequestSchema = CourseSchema.pick({
|
|
6
|
+
alias: true,
|
|
7
|
+
author: true,
|
|
8
|
+
videoId: true,
|
|
9
|
+
status: true,
|
|
14
10
|
});
|
|
15
11
|
|
|
16
12
|
export type Request = z.infer<typeof RequestSchema>;
|
package/commands/index.ts
CHANGED
|
@@ -3,9 +3,11 @@ export * from './ai-model';
|
|
|
3
3
|
export * from './ai-vendor';
|
|
4
4
|
export * from './auth';
|
|
5
5
|
export * from './blog';
|
|
6
|
-
export * from './canvas';
|
|
7
|
-
export * from './canvas-node';
|
|
8
|
-
export * from './canvas-edge';
|
|
6
|
+
export * from './ai-studio/canvas';
|
|
7
|
+
export * from './ai-studio/canvas-node';
|
|
8
|
+
export * from './ai-studio/canvas-edge';
|
|
9
|
+
export * from './ai-studio/canvas-template';
|
|
10
|
+
export * from './ai-studio/canvas-tool';
|
|
9
11
|
export * from './category';
|
|
10
12
|
export * from './chat';
|
|
11
13
|
export * from './course';
|
|
@@ -28,6 +30,7 @@ export * from './telegram-auth';
|
|
|
28
30
|
export * from './telegram-profile';
|
|
29
31
|
export * from './tools';
|
|
30
32
|
export * from './unregistered-user';
|
|
33
|
+
export * from './update-post';
|
|
31
34
|
export * from './user';
|
|
32
35
|
export * from './user-to-subscription';
|
|
33
36
|
export * from './user-to-task';
|
|
@@ -49,5 +52,3 @@ export * from './user-profile';
|
|
|
49
52
|
export * from './team-account';
|
|
50
53
|
export * from './team-to-subscription';
|
|
51
54
|
export * from './team-to-product';
|
|
52
|
-
|
|
53
|
-
export * from './canvas-template';
|
|
@@ -3,16 +3,14 @@ import { PageSchema } from '../../models';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
export namespace CreatePageCommand {
|
|
6
|
-
export const RequestSchema = PageSchema.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
seoTextMd: true,
|
|
15
|
-
toolTitle: true,
|
|
6
|
+
export const RequestSchema = PageSchema.pick({
|
|
7
|
+
alias: true,
|
|
8
|
+
categoryId: true,
|
|
9
|
+
aIModelId: true,
|
|
10
|
+
toolId: true,
|
|
11
|
+
toolOptionId: true,
|
|
12
|
+
toolModelId: true,
|
|
13
|
+
type: true,
|
|
16
14
|
})
|
|
17
15
|
.refine(
|
|
18
16
|
(data) => {
|
|
@@ -2,12 +2,8 @@ import z from 'zod';
|
|
|
2
2
|
import { PromptSchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
export namespace CreatePromptCommand {
|
|
5
|
-
export const RequestSchema = PromptSchema.
|
|
6
|
-
|
|
7
|
-
title: true,
|
|
8
|
-
content: true,
|
|
9
|
-
createdAt: true,
|
|
10
|
-
updatedAt: true,
|
|
5
|
+
export const RequestSchema = PromptSchema.pick({
|
|
6
|
+
topicId: true,
|
|
11
7
|
});
|
|
12
8
|
|
|
13
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -2,13 +2,9 @@ import z from 'zod';
|
|
|
2
2
|
import { PromptCategorySchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
export namespace CreatePromptCategoryCommand {
|
|
5
|
-
export const RequestSchema = PromptCategorySchema.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
metaTitle: true,
|
|
9
|
-
metaDescription: true,
|
|
10
|
-
createdAt: true,
|
|
11
|
-
updatedAt: true,
|
|
5
|
+
export const RequestSchema = PromptCategorySchema.pick({
|
|
6
|
+
icon: true,
|
|
7
|
+
alias: true,
|
|
12
8
|
});
|
|
13
9
|
|
|
14
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -2,15 +2,9 @@ import z from 'zod';
|
|
|
2
2
|
import { PromptTopicSchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
export namespace CreatePromptTopicCommand {
|
|
5
|
-
export const RequestSchema = PromptTopicSchema.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
content: true,
|
|
9
|
-
metaTitle: true,
|
|
10
|
-
metaDescription: true,
|
|
11
|
-
seoText: true,
|
|
12
|
-
createdAt: true,
|
|
13
|
-
updatedAt: true,
|
|
5
|
+
export const RequestSchema = PromptTopicSchema.pick({
|
|
6
|
+
categoryId: true,
|
|
7
|
+
alias: true,
|
|
14
8
|
});
|
|
15
9
|
|
|
16
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -2,12 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
import { QuestionSchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
export namespace CreateQuestionCommand {
|
|
5
|
-
export const RequestSchema = QuestionSchema.
|
|
6
|
-
|
|
7
|
-
createdAt: true,
|
|
8
|
-
updatedAt: true,
|
|
9
|
-
question: true,
|
|
10
|
-
answer: true,
|
|
5
|
+
export const RequestSchema = QuestionSchema.pick({
|
|
6
|
+
pageId: true,
|
|
11
7
|
});
|
|
12
8
|
|
|
13
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
export namespace GetDiagramsPriceCommand {
|
|
4
4
|
export const RequestSchema = z.object({
|
|
5
5
|
modelId: z.string().uuid(),
|
|
6
|
-
promptLenght: z.number().max(
|
|
6
|
+
promptLenght: z.number().max(100000),
|
|
7
7
|
chartTypeUuid: z.string().uuid(),
|
|
8
8
|
fileIds: z.array(z.string().uuid()).optional().default([]),
|
|
9
9
|
jobId: z.string().uuid().optional(),
|
|
@@ -20,6 +20,7 @@ export namespace ExecuteMarketplaceCardCommand {
|
|
|
20
20
|
customStylePrompt: z.string().nullable().optional(),
|
|
21
21
|
inputImages: z.array(z.string()),
|
|
22
22
|
backgroundDescription: z.string().nullable().optional(),
|
|
23
|
+
descriptionGenerationId: z.string().uuid().nullable().optional(),
|
|
23
24
|
})
|
|
24
25
|
.superRefine((data, ctx) => {
|
|
25
26
|
const hasPreset = Boolean(data.stylePresetId);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarketplaceCardDescriptionGenerationSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GenerateMarketplaceCardDescriptionCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
description: z.string().min(1).max(10_000),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: MarketplaceCardDescriptionGenerationSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './execute-marketplace-card.command';
|
|
2
|
+
export * from './generate-marketplace-card-description.command';
|
|
2
3
|
export * from './find-marketplace-card-job-by-uuid.command';
|
|
3
4
|
export * from './find-marketplace-card-jobs.command';
|
|
4
5
|
export * from './get-marketplace-card-config.command';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UpdatePostTranslationSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace CreateUpdatePostTranslationCommand {
|
|
5
|
+
export const RequestSchema = UpdatePostTranslationSchema.pick({
|
|
6
|
+
locale: true,
|
|
7
|
+
title: true,
|
|
8
|
+
description: true,
|
|
9
|
+
image: true,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const RequestParamSchema = z.object({
|
|
15
|
+
uuid: z.string().uuid(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
19
|
+
|
|
20
|
+
export const ResponseSchema = z.object({
|
|
21
|
+
data: UpdatePostTranslationSchema,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UpdatePostSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace CreateUpdatePostCommand {
|
|
5
|
+
export const RequestSchema = UpdatePostSchema.pick({
|
|
6
|
+
slug: true,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: UpdatePostSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UpdatePostSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindAllUpdatePostsCommand {
|
|
5
|
+
export const ResponseSchema = z.object({
|
|
6
|
+
data: z.array(UpdatePostSchema),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UpdatePostSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindUpdatePostCommand {
|
|
5
|
+
export const RequestUuidParamSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestUuidParam = z.infer<typeof RequestUuidParamSchema>;
|
|
10
|
+
|
|
11
|
+
export const RequestSlugParamSchema = z.object({
|
|
12
|
+
slug: z.string(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type RequestSlugParam = z.infer<typeof RequestSlugParamSchema>;
|
|
16
|
+
|
|
17
|
+
export const ResponseSchema = z.object({
|
|
18
|
+
data: UpdatePostSchema,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UpdatePostTranslationSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetAllUpdatePostTranslationsQuery {
|
|
5
|
+
export const RequestParamSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: z.array(UpdatePostTranslationSchema),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UpdatePostSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetLatestUpdatePostsCommand {
|
|
5
|
+
export const ResponseSchema = z.object({
|
|
6
|
+
data: z.array(UpdatePostSchema),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './create-update-post.command';
|
|
2
|
+
export * from './create-update-post-translation.command';
|
|
3
|
+
export * from './find-all-update-posts.command';
|
|
4
|
+
export * from './find-update-post.command';
|
|
5
|
+
export * from './get-all-update-post-translations.query';
|
|
6
|
+
export * from './get-latest-update-posts.command';
|
|
7
|
+
export * from './update-update-post.command';
|
|
8
|
+
export * from './update-update-post-translation.command';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UpdatePostTranslationSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace UpdateUpdatePostTranslationCommand {
|
|
5
|
+
export const RequestSchema = UpdatePostTranslationSchema.pick({
|
|
6
|
+
title: true,
|
|
7
|
+
description: true,
|
|
8
|
+
image: true,
|
|
9
|
+
}).partial();
|
|
10
|
+
|
|
11
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
|
|
13
|
+
export const RequestParamSchema = z.object({
|
|
14
|
+
uuid: z.string().uuid(),
|
|
15
|
+
translationUuid: z.string().uuid(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
19
|
+
|
|
20
|
+
export const ResponseSchema = z.object({
|
|
21
|
+
data: UpdatePostTranslationSchema,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UpdatePostSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace UpdateUpdatePostCommand {
|
|
5
|
+
export const RequestSchema = UpdatePostSchema.pick({
|
|
6
|
+
slug: true,
|
|
7
|
+
}).partial();
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const RequestParamSchema = z.object({
|
|
12
|
+
uuid: z.string().uuid(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
16
|
+
|
|
17
|
+
export const ResponseSchema = z.object({
|
|
18
|
+
data: UpdatePostSchema,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
+
}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
2
|
import { UserFilterSchema } from '../../models';
|
|
4
3
|
|
|
5
4
|
export namespace SendTelegramNotificationCommand {
|
|
6
|
-
export const MessageMdSchema = z.object({
|
|
7
|
-
[LOCALE.RU]: z.string(),
|
|
8
|
-
[LOCALE.EN]: z.string(),
|
|
9
|
-
});
|
|
10
|
-
export type MessageMd = z.infer<typeof MessageMdSchema>;
|
|
11
|
-
|
|
12
5
|
export const RequestSchema = z.object({
|
|
13
6
|
filters: UserFilterSchema,
|
|
14
|
-
messageMd:
|
|
7
|
+
messageMd: z.string(),
|
|
15
8
|
});
|
|
16
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
17
10
|
|
|
@@ -14,6 +14,7 @@ export enum AI_MODEL_STRATEGY {
|
|
|
14
14
|
KIE_GEMINI_TEXT_GENERATION = 'kie_gemini_text_generation',
|
|
15
15
|
GROK_IMAGE_GENERATION = 'grok_image_generation',
|
|
16
16
|
GEMINI_TEXT_GENERATION = 'gemini_text_generation',
|
|
17
|
+
GEMINI_GENERATE_CONTENT = 'gemini_generate_content',
|
|
17
18
|
GEMINI_IMAGE_GENERATION = 'gemini_image_generation',
|
|
18
19
|
IMAGEN_IMAGE_GENERATION = 'imagen_image_generation',
|
|
19
20
|
OPENAI_MULTI_TURN_IMAGE_GENERATION = 'openai_multi_turn_image_generation',
|
package/constants/index.ts
CHANGED
|
@@ -40,7 +40,6 @@ export * from './tool-html-page-builder';
|
|
|
40
40
|
export * from './feedback';
|
|
41
41
|
export * from './daily-streak';
|
|
42
42
|
export * from './cabinet';
|
|
43
|
-
export * from './canvas';
|
|
44
43
|
export * from './canvas-node';
|
|
45
44
|
export * from './canvas-edge';
|
|
46
45
|
export * from './webmaster';
|
|
@@ -7,3 +7,5 @@ export * from './veo-person-allow.enum';
|
|
|
7
7
|
export * from './veo-job-params-type.enum';
|
|
8
8
|
export * from './video-resolution.enum';
|
|
9
9
|
export * from './video-pricing-rule-type.enum';
|
|
10
|
+
export * from './video-generation-model-limitation.enum';
|
|
11
|
+
export * from './video-publish-moderation-status.enum';
|