@purpleschool/gptbot 0.12.70-stage-2 → 0.12.71
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/blog.ts +0 -4
- package/api/controllers/http/canvas-template.ts +1 -0
- package/api/controllers/http/category.ts +0 -4
- package/api/controllers/http/course.ts +0 -12
- package/api/controllers/http/index.ts +1 -0
- package/api/controllers/http/page.ts +0 -4
- package/api/controllers/http/palette.ts +6 -0
- package/api/controllers/http/prompt-category.ts +0 -4
- package/api/controllers/http/prompt-topic.ts +0 -4
- package/api/controllers/http/prompt.ts +0 -4
- package/api/controllers/http/question.ts +0 -4
- package/api/controllers/http/team-account.ts +0 -1
- package/api/routes.ts +5 -68
- package/build/api/controllers/http/blog.js +0 -3
- package/build/api/controllers/http/canvas-template.js +1 -0
- package/build/api/controllers/http/category.js +0 -3
- package/build/api/controllers/http/course.js +0 -9
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/controllers/http/page.js +0 -3
- package/build/api/controllers/http/palette.js +8 -0
- package/build/api/controllers/http/prompt-category.js +0 -3
- package/build/api/controllers/http/prompt-topic.js +0 -3
- package/build/api/controllers/http/prompt.js +0 -3
- package/build/api/controllers/http/question.js +0 -3
- package/build/api/controllers/http/team-account.js +0 -1
- package/build/api/routes.js +5 -34
- 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/{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 +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/run-canvas.command.js +1 -1
- package/build/commands/{canvas → ai-studio/canvas}/save-canvas.command.js +8 -4
- 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 +2 -2
- 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/{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}/update-canvas-node.command.js +13 -5
- 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 +6 -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 +6 -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 +2 -1
- package/build/commands/{canvas-template → ai-studio/canvas-template}/update-canvas-template.command.js +6 -2
- package/build/commands/ai-studio/canvas-tool/index.js +17 -0
- 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/commands/ai-studio/canvas-tool/palette/index.js +18 -0
- package/build/commands/ai-studio/index.js +21 -0
- package/build/commands/blog/create-post.command.js +0 -6
- package/build/commands/blog/index.js +0 -3
- package/build/commands/blog/update-post.command.js +0 -6
- package/build/commands/cabinet/get-user-statistics-by-month.command.js +13 -6
- package/build/commands/cabinet/get-user-statistics-overview.command.js +1 -5
- package/build/commands/category/create-category.command.js +0 -4
- package/build/commands/category/index.js +0 -3
- package/build/commands/category/update-category.command.js +0 -4
- package/build/commands/course/create-course.command.js +0 -5
- package/build/commands/course/index.js +0 -9
- package/build/commands/index.js +5 -4
- package/build/commands/page/create-page.command.js +0 -6
- package/build/commands/page/find-page.command.js +2 -10
- package/build/commands/page/index.js +0 -3
- package/build/commands/page/update-page.command.js +0 -5
- package/build/commands/prompt/create-prompt.command.js +0 -2
- package/build/commands/prompt/index.js +0 -3
- package/build/commands/prompt/update-prompt.command.js +0 -2
- package/build/commands/prompt-category/create-prompt-category.command.js +0 -3
- package/build/commands/prompt-category/index.js +0 -3
- package/build/commands/prompt-category/update-prompt-category.command.js +0 -3
- package/build/commands/prompt-topic/create-prompt-topic.command.js +0 -5
- package/build/commands/prompt-topic/index.js +0 -3
- package/build/commands/prompt-topic/update-prompt-topic.command.js +0 -5
- package/build/commands/question/create-question.command.js +0 -2
- package/build/commands/question/index.js +0 -3
- package/build/commands/question/update-question.command.js +0 -2
- package/build/commands/team-account/get-team-account-statistics-by-month.command.js +13 -6
- package/build/commands/team-account/get-team-account-statistics-overview.command.js +1 -5
- package/build/commands/team-account/index.js +0 -1
- package/build/commands/ui-notification/create-admin-broadcast-ui-notification.command.js +2 -9
- package/build/commands/unregistered-user/patch-locale.command.js +3 -3
- package/build/commands/user/get-me.command.js +1 -2
- package/build/commands/user/patch-locale.command.js +3 -3
- package/build/constants/cabinet/enums/index.js +0 -1
- package/build/constants/subscription/enums/index.js +0 -1
- package/build/constants/tool/enums/index.js +1 -0
- package/build/constants/tool/enums/job-request-origin.enum.js +8 -0
- package/build/constants/user/enums/index.js +1 -0
- package/build/constants/user/enums/locale.enum.js +8 -0
- package/build/models/canvas-node.schema.js +140 -37
- package/build/models/canvas-template.schema.js +21 -5
- package/build/models/index.js +0 -10
- package/build/models/ui-notification.schema.js +8 -13
- package/build/models/user.schema.js +2 -2
- 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/{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 +1 -1
- package/commands/{canvas → ai-studio/canvas}/run-canvas.command.ts +1 -1
- package/commands/{canvas → ai-studio/canvas}/save-canvas.command.ts +13 -9
- 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 +2 -2
- 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/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/ai-studio/canvas-node/update-canvas-node.command.ts +40 -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 +6 -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 +2 -1
- package/commands/{canvas-template → ai-studio/canvas-template}/update-canvas-template.command.ts +11 -2
- package/commands/ai-studio/canvas-tool/index.ts +1 -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/index.ts +5 -0
- package/commands/blog/create-post.command.ts +0 -6
- package/commands/blog/index.ts +0 -3
- package/commands/blog/update-post.command.ts +0 -6
- package/commands/cabinet/get-user-statistics-by-month.command.ts +14 -7
- package/commands/cabinet/get-user-statistics-overview.command.ts +2 -6
- package/commands/category/create-category.command.ts +0 -4
- package/commands/category/index.ts +0 -3
- package/commands/category/update-category.command.ts +0 -4
- package/commands/course/create-course.command.ts +0 -5
- package/commands/course/index.ts +0 -9
- package/commands/index.ts +5 -5
- package/commands/page/create-page.command.ts +0 -6
- package/commands/page/find-page.command.ts +2 -15
- package/commands/page/index.ts +0 -3
- package/commands/page/update-page.command.ts +0 -5
- package/commands/prompt/create-prompt.command.ts +0 -2
- package/commands/prompt/index.ts +0 -3
- package/commands/prompt/update-prompt.command.ts +0 -2
- package/commands/prompt-category/create-prompt-category.command.ts +0 -3
- package/commands/prompt-category/index.ts +0 -3
- package/commands/prompt-category/update-prompt-category.command.ts +0 -3
- package/commands/prompt-topic/create-prompt-topic.command.ts +0 -5
- package/commands/prompt-topic/index.ts +0 -3
- package/commands/prompt-topic/update-prompt-topic.command.ts +0 -5
- package/commands/question/create-question.command.ts +0 -2
- package/commands/question/index.ts +0 -3
- package/commands/question/update-question.command.ts +0 -2
- package/commands/team-account/get-team-account-statistics-by-month.command.ts +14 -7
- package/commands/team-account/get-team-account-statistics-overview.command.ts +2 -6
- package/commands/team-account/index.ts +0 -1
- package/commands/ui-notification/create-admin-broadcast-ui-notification.command.ts +2 -9
- package/commands/unregistered-user/patch-locale.command.ts +1 -1
- package/commands/user/get-me.command.ts +1 -2
- package/commands/user/patch-locale.command.ts +1 -1
- package/constants/cabinet/enums/index.ts +0 -1
- package/constants/subscription/enums/index.ts +0 -1
- package/constants/tool/enums/index.ts +1 -0
- package/constants/tool/enums/job-request-origin.enum.ts +4 -0
- package/constants/user/enums/index.ts +1 -0
- package/constants/user/enums/locale.enum.ts +4 -0
- package/models/canvas-node.schema.ts +167 -41
- package/models/canvas-template.schema.ts +28 -9
- package/models/index.ts +0 -10
- package/models/ui-notification.schema.ts +7 -14
- package/models/user.schema.ts +1 -1
- package/package.json +1 -2
- package/build/commands/blog/create-post-translation.command.js +0 -23
- package/build/commands/blog/get-all-post-translations.query.js +0 -14
- package/build/commands/blog/update-post-translation.command.js +0 -23
- package/build/commands/category/create-category-translation.command.js +0 -21
- package/build/commands/category/get-all-category-translations.query.js +0 -14
- package/build/commands/category/update-category-translation.command.js +0 -21
- package/build/commands/course/create-course-translation.command.js +0 -22
- package/build/commands/course/create-lesson-translation.command.js +0 -18
- package/build/commands/course/create-section-translation.command.js +0 -18
- package/build/commands/course/get-all-course-translations.query.js +0 -14
- package/build/commands/course/get-all-lesson-translations.query.js +0 -14
- package/build/commands/course/get-all-section-translations.query.js +0 -14
- package/build/commands/course/update-course-translation.command.js +0 -22
- package/build/commands/course/update-lesson-translation.command.js +0 -18
- package/build/commands/course/update-section-translation.command.js +0 -18
- package/build/commands/page/create-page-translation.command.js +0 -23
- package/build/commands/page/get-all-page-translations.query.js +0 -14
- package/build/commands/page/update-page-translation.command.js +0 -23
- package/build/commands/prompt/create-prompt-translation.command.js +0 -19
- package/build/commands/prompt/get-all-prompt-translations.query.js +0 -14
- package/build/commands/prompt/update-prompt-translation.command.js +0 -19
- package/build/commands/prompt-category/create-prompt-category-translation.command.js +0 -20
- package/build/commands/prompt-category/get-all-prompt-category-translations.query.js +0 -14
- package/build/commands/prompt-category/update-prompt-category-translation.command.js +0 -20
- package/build/commands/prompt-topic/create-prompt-topic-translation.command.js +0 -22
- package/build/commands/prompt-topic/get-all-prompt-topic-translations.query.js +0 -14
- package/build/commands/prompt-topic/update-prompt-topic-translation.command.js +0 -22
- package/build/commands/question/create-question-translation.command.js +0 -19
- package/build/commands/question/get-all-question-translations.query.js +0 -14
- package/build/commands/question/update-question-translation.command.js +0 -19
- package/build/commands/team-account/update-team-account-invite.command.js +0 -17
- package/build/constants/cabinet/enums/statistics-request-type.enum.js +0 -24
- package/build/constants/subscription/enums/subscription-balance-field.enum.js +0 -8
- package/build/models/category-translation.schema.js +0 -16
- package/build/models/course-translation.schema.js +0 -17
- package/build/models/lesson-translation.schema.js +0 -13
- package/build/models/page-translation.schema.js +0 -18
- package/build/models/post-translation.schema.js +0 -18
- package/build/models/prompt-category-translation.schema.js +0 -18
- package/build/models/prompt-topic-translation.schema.js +0 -20
- package/build/models/prompt-translation.schema.js +0 -14
- package/build/models/question-translation.schema.js +0 -14
- package/build/models/section-translation.schema.js +0 -13
- package/commands/blog/create-post-translation.command.ts +0 -28
- package/commands/blog/get-all-post-translations.query.ts +0 -16
- package/commands/blog/update-post-translation.command.ts +0 -28
- package/commands/canvas-node/create-canvas-node.command.ts +0 -25
- package/commands/canvas-node/update-canvas-node.command.ts +0 -26
- package/commands/category/create-category-translation.command.ts +0 -26
- package/commands/category/get-all-category-translations.query.ts +0 -16
- package/commands/category/update-category-translation.command.ts +0 -26
- package/commands/course/create-course-translation.command.ts +0 -27
- package/commands/course/create-lesson-translation.command.ts +0 -23
- package/commands/course/create-section-translation.command.ts +0 -23
- package/commands/course/get-all-course-translations.query.ts +0 -16
- package/commands/course/get-all-lesson-translations.query.ts +0 -16
- package/commands/course/get-all-section-translations.query.ts +0 -16
- package/commands/course/update-course-translation.command.ts +0 -27
- package/commands/course/update-lesson-translation.command.ts +0 -23
- package/commands/course/update-section-translation.command.ts +0 -23
- package/commands/page/create-page-translation.command.ts +0 -28
- package/commands/page/get-all-page-translations.query.ts +0 -16
- package/commands/page/update-page-translation.command.ts +0 -28
- package/commands/prompt/create-prompt-translation.command.ts +0 -24
- package/commands/prompt/get-all-prompt-translations.query.ts +0 -16
- package/commands/prompt/update-prompt-translation.command.ts +0 -24
- package/commands/prompt-category/create-prompt-category-translation.command.ts +0 -25
- package/commands/prompt-category/get-all-prompt-category-translations.query.ts +0 -16
- package/commands/prompt-category/update-prompt-category-translation.command.ts +0 -25
- package/commands/prompt-topic/create-prompt-topic-translation.command.ts +0 -27
- package/commands/prompt-topic/get-all-prompt-topic-translations.query.ts +0 -16
- package/commands/prompt-topic/update-prompt-topic-translation.command.ts +0 -27
- package/commands/question/create-question-translation.command.ts +0 -24
- package/commands/question/get-all-question-translations.query.ts +0 -16
- package/commands/question/update-question-translation.command.ts +0 -24
- package/commands/team-account/update-team-account-invite.command.ts +0 -22
- package/constants/cabinet/enums/statistics-request-type.enum.ts +0 -20
- package/constants/subscription/enums/subscription-balance-field.enum.ts +0 -4
- package/models/category-translation.schema.ts +0 -14
- package/models/course-translation.schema.ts +0 -15
- package/models/lesson-translation.schema.ts +0 -11
- package/models/page-translation.schema.ts +0 -16
- package/models/post-translation.schema.ts +0 -16
- package/models/prompt-category-translation.schema.ts +0 -13
- package/models/prompt-topic-translation.schema.ts +0 -15
- package/models/prompt-translation.schema.ts +0 -12
- package/models/question-translation.schema.ts +0 -12
- package/models/section-translation.schema.ts +0 -11
- /package/build/commands/{canvas → ai-studio/canvas}/index.js +0 -0
- /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/build/commands/{canvas-node → ai-studio/canvas-node}/index.js +0 -0
- /package/commands/{canvas → ai-studio/canvas}/index.ts +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-node → ai-studio/canvas-node}/index.ts +0 -0
|
@@ -59,6 +59,7 @@ export type AudioGenParams = z.infer<typeof AudioGenParamsSchema>;
|
|
|
59
59
|
|
|
60
60
|
export const ColorPaletteParamsSchema = strictObject({
|
|
61
61
|
prompt: z.string(),
|
|
62
|
+
colors: z.array(z.string().regex(/^#[0-9A-Fa-f]{6}$/)).optional(),
|
|
62
63
|
});
|
|
63
64
|
export type ColorPaletteParams = z.infer<typeof ColorPaletteParamsSchema>;
|
|
64
65
|
|
|
@@ -147,14 +148,7 @@ export const AudioGenSTTOutputSchema = strictObject({
|
|
|
147
148
|
export type AudioGenSTTOutput = z.infer<typeof AudioGenSTTOutputSchema>;
|
|
148
149
|
|
|
149
150
|
export const ColorPaletteOutputSchema = strictObject({
|
|
150
|
-
|
|
151
|
-
colors: z.array(
|
|
152
|
-
strictObject({
|
|
153
|
-
hex: z.string(),
|
|
154
|
-
name: z.string(),
|
|
155
|
-
usage: z.string(),
|
|
156
|
-
}),
|
|
157
|
-
),
|
|
151
|
+
colors: z.array(z.string().regex(/^#[0-9A-Fa-f]{6}$/)).max(7),
|
|
158
152
|
});
|
|
159
153
|
export type ColorPaletteOutput = z.infer<typeof ColorPaletteOutputSchema>;
|
|
160
154
|
|
|
@@ -173,24 +167,6 @@ export const HtmlGenOutputSchema = strictObject({
|
|
|
173
167
|
});
|
|
174
168
|
export type HtmlGenOutput = z.infer<typeof HtmlGenOutputSchema>;
|
|
175
169
|
|
|
176
|
-
export const CanvasNodeParamsSchema = z.union([
|
|
177
|
-
TextGenParamsSchema,
|
|
178
|
-
ImageGenParamsSchema,
|
|
179
|
-
VideoGenParamsSchema,
|
|
180
|
-
AudioGenParamsSchema,
|
|
181
|
-
ColorPaletteParamsSchema,
|
|
182
|
-
MotionControlParamsSchema,
|
|
183
|
-
VarGenParamsSchema,
|
|
184
|
-
HtmlGenParamsSchema,
|
|
185
|
-
TextBlockParamsSchema,
|
|
186
|
-
ImageBlockParamsSchema,
|
|
187
|
-
VideoBlockParamsSchema,
|
|
188
|
-
FileBlockParamsSchema,
|
|
189
|
-
NoteParamsSchema,
|
|
190
|
-
VarBlockParamsSchema,
|
|
191
|
-
]);
|
|
192
|
-
export type CanvasNodeParams = z.infer<typeof CanvasNodeParamsSchema>;
|
|
193
|
-
|
|
194
170
|
export const CanvasNodeParamsSchemaByType = {
|
|
195
171
|
[CANVAS_NODE_TYPE.textGen]: TextGenParamsSchema,
|
|
196
172
|
[CANVAS_NODE_TYPE.imageGen]: ImageGenParamsSchema,
|
|
@@ -211,18 +187,25 @@ export const CanvasNodeParamsSchemaByType = {
|
|
|
211
187
|
[CANVAS_NODE_TYPE.htmlGen]: HtmlGenParamsSchema,
|
|
212
188
|
} as const;
|
|
213
189
|
|
|
214
|
-
export const
|
|
215
|
-
TextGenOutputSchema,
|
|
216
|
-
ImageGenOutputSchema,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
]
|
|
225
|
-
|
|
190
|
+
export const CanvasNodeOutputSchemaByType = {
|
|
191
|
+
[CANVAS_NODE_TYPE.textGen]: TextGenOutputSchema,
|
|
192
|
+
[CANVAS_NODE_TYPE.imageGen]: ImageGenOutputSchema,
|
|
193
|
+
[CANVAS_NODE_TYPE.imageEdit]: ImageGenOutputSchema,
|
|
194
|
+
[CANVAS_NODE_TYPE.videoGen]: VideoGenOutputSchema,
|
|
195
|
+
[CANVAS_NODE_TYPE.videoEdit]: VideoGenOutputSchema,
|
|
196
|
+
[CANVAS_NODE_TYPE.ttsGen]: AudioGenTTSOutputSchema,
|
|
197
|
+
[CANVAS_NODE_TYPE.sttGen]: AudioGenSTTOutputSchema,
|
|
198
|
+
[CANVAS_NODE_TYPE.textBlock]: TextBlockParamsSchema,
|
|
199
|
+
[CANVAS_NODE_TYPE.imageBlock]: ImageBlockParamsSchema,
|
|
200
|
+
[CANVAS_NODE_TYPE.videoBlock]: VideoBlockParamsSchema,
|
|
201
|
+
[CANVAS_NODE_TYPE.fileBlock]: FileBlockParamsSchema,
|
|
202
|
+
[CANVAS_NODE_TYPE.note]: NoteParamsSchema,
|
|
203
|
+
[CANVAS_NODE_TYPE.colorPalette]: ColorPaletteOutputSchema,
|
|
204
|
+
[CANVAS_NODE_TYPE.motionControl]: MotionControlOutputSchema,
|
|
205
|
+
[CANVAS_NODE_TYPE.varGen]: VarGenOutputSchema,
|
|
206
|
+
[CANVAS_NODE_TYPE.varBlock]: VarBlockParamsSchema,
|
|
207
|
+
[CANVAS_NODE_TYPE.htmlGen]: HtmlGenOutputSchema,
|
|
208
|
+
} as const;
|
|
226
209
|
|
|
227
210
|
export const CanvasNodeErrorSchema = z.object({
|
|
228
211
|
code: z.string(),
|
|
@@ -251,6 +234,7 @@ export type CanvasNodeParamsByType = {
|
|
|
251
234
|
[CANVAS_NODE_TYPE.varBlock]: VarBlockParams;
|
|
252
235
|
[CANVAS_NODE_TYPE.htmlGen]: HtmlGenParams;
|
|
253
236
|
};
|
|
237
|
+
export type CanvasNodeParams = CanvasNodeParamsByType[keyof CanvasNodeParamsByType];
|
|
254
238
|
|
|
255
239
|
export type CanvasNodeOutputByType = {
|
|
256
240
|
[CANVAS_NODE_TYPE.textGen]: TextGenOutput;
|
|
@@ -260,22 +244,164 @@ export type CanvasNodeOutputByType = {
|
|
|
260
244
|
[CANVAS_NODE_TYPE.videoEdit]: VideoGenOutput;
|
|
261
245
|
[CANVAS_NODE_TYPE.ttsGen]: AudioGenTTSOutput;
|
|
262
246
|
[CANVAS_NODE_TYPE.sttGen]: AudioGenSTTOutput;
|
|
247
|
+
[CANVAS_NODE_TYPE.textBlock]: TextBlockParams;
|
|
248
|
+
[CANVAS_NODE_TYPE.imageBlock]: ImageBlockParams;
|
|
249
|
+
[CANVAS_NODE_TYPE.videoBlock]: VideoBlockParams;
|
|
250
|
+
[CANVAS_NODE_TYPE.fileBlock]: FileBlockParams;
|
|
251
|
+
[CANVAS_NODE_TYPE.note]: NoteParams;
|
|
263
252
|
[CANVAS_NODE_TYPE.colorPalette]: ColorPaletteOutput;
|
|
264
253
|
[CANVAS_NODE_TYPE.motionControl]: MotionControlOutput;
|
|
265
254
|
[CANVAS_NODE_TYPE.varGen]: VarGenOutput;
|
|
255
|
+
[CANVAS_NODE_TYPE.varBlock]: VarBlockParams;
|
|
266
256
|
[CANVAS_NODE_TYPE.htmlGen]: HtmlGenOutput;
|
|
267
257
|
};
|
|
258
|
+
export type CanvasNodeOutput = CanvasNodeOutputByType[keyof CanvasNodeOutputByType];
|
|
259
|
+
|
|
260
|
+
export const validateCanvasNodeParamsByType = (
|
|
261
|
+
nodeDefinitionId: CANVAS_NODE_TYPE,
|
|
262
|
+
params: unknown,
|
|
263
|
+
ctx: z.RefinementCtx,
|
|
264
|
+
): void => {
|
|
265
|
+
if (params === null || params === undefined) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const schema = CanvasNodeParamsSchemaByType[nodeDefinitionId];
|
|
270
|
+
const result = schema.safeParse(params);
|
|
271
|
+
if (result.success) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
for (const issue of result.error.issues) {
|
|
276
|
+
ctx.addIssue({
|
|
277
|
+
...issue,
|
|
278
|
+
path: ['params', ...issue.path],
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
};
|
|
268
282
|
|
|
269
|
-
export const
|
|
283
|
+
export const validateCanvasNodeOutputByType = (
|
|
284
|
+
nodeDefinitionId: CANVAS_NODE_TYPE,
|
|
285
|
+
output: unknown,
|
|
286
|
+
ctx: z.RefinementCtx,
|
|
287
|
+
): void => {
|
|
288
|
+
if (output === null || output === undefined) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const schema = CanvasNodeOutputSchemaByType[nodeDefinitionId];
|
|
293
|
+
const result = schema.safeParse(output);
|
|
294
|
+
if (result.success) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
for (const issue of result.error.issues) {
|
|
299
|
+
ctx.addIssue({
|
|
300
|
+
...issue,
|
|
301
|
+
path: ['output', ...issue.path],
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
export const CanvasNodeBaseSchema = z.object({
|
|
270
307
|
uuid: z.string().uuid(),
|
|
271
308
|
canvasId: z.string().uuid(),
|
|
272
309
|
nodeDefinitionId: z.nativeEnum(CANVAS_NODE_TYPE),
|
|
273
310
|
position: CanvasNodePositionSchema,
|
|
274
311
|
status: z.nativeEnum(NODE_RUN_STATUS),
|
|
275
312
|
toolJobId: z.string().uuid().nullable(),
|
|
276
|
-
params:
|
|
277
|
-
output:
|
|
313
|
+
params: z.unknown().nullable(),
|
|
314
|
+
output: z.unknown().nullable(),
|
|
278
315
|
error: CanvasNodeErrorSchema.nullable(),
|
|
279
316
|
createdAt: z.date(),
|
|
280
317
|
updatedAt: z.date(),
|
|
281
318
|
});
|
|
319
|
+
|
|
320
|
+
export const CanvasNodeSchema = z.discriminatedUnion('nodeDefinitionId', [
|
|
321
|
+
CanvasNodeBaseSchema.extend({
|
|
322
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.textGen),
|
|
323
|
+
params: TextGenParamsSchema.nullable(),
|
|
324
|
+
output: TextGenOutputSchema.nullable(),
|
|
325
|
+
}),
|
|
326
|
+
CanvasNodeBaseSchema.extend({
|
|
327
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.imageGen),
|
|
328
|
+
params: ImageGenParamsSchema.nullable(),
|
|
329
|
+
output: ImageGenOutputSchema.nullable(),
|
|
330
|
+
}),
|
|
331
|
+
CanvasNodeBaseSchema.extend({
|
|
332
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.imageEdit),
|
|
333
|
+
params: ImageGenParamsSchema.nullable(),
|
|
334
|
+
output: ImageGenOutputSchema.nullable(),
|
|
335
|
+
}),
|
|
336
|
+
CanvasNodeBaseSchema.extend({
|
|
337
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.videoGen),
|
|
338
|
+
params: VideoGenParamsSchema.nullable(),
|
|
339
|
+
output: VideoGenOutputSchema.nullable(),
|
|
340
|
+
}),
|
|
341
|
+
CanvasNodeBaseSchema.extend({
|
|
342
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.videoEdit),
|
|
343
|
+
params: VideoGenParamsSchema.nullable(),
|
|
344
|
+
output: VideoGenOutputSchema.nullable(),
|
|
345
|
+
}),
|
|
346
|
+
CanvasNodeBaseSchema.extend({
|
|
347
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.ttsGen),
|
|
348
|
+
params: AudioGenParamsSchema.nullable(),
|
|
349
|
+
output: AudioGenTTSOutputSchema.nullable(),
|
|
350
|
+
}),
|
|
351
|
+
CanvasNodeBaseSchema.extend({
|
|
352
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.sttGen),
|
|
353
|
+
params: AudioGenParamsSchema.nullable(),
|
|
354
|
+
output: AudioGenSTTOutputSchema.nullable(),
|
|
355
|
+
}),
|
|
356
|
+
CanvasNodeBaseSchema.extend({
|
|
357
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.textBlock),
|
|
358
|
+
params: TextBlockParamsSchema.nullable(),
|
|
359
|
+
output: TextBlockParamsSchema.nullable(),
|
|
360
|
+
}),
|
|
361
|
+
CanvasNodeBaseSchema.extend({
|
|
362
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.imageBlock),
|
|
363
|
+
params: ImageBlockParamsSchema.nullable(),
|
|
364
|
+
output: ImageBlockParamsSchema.nullable(),
|
|
365
|
+
}),
|
|
366
|
+
CanvasNodeBaseSchema.extend({
|
|
367
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.videoBlock),
|
|
368
|
+
params: VideoBlockParamsSchema.nullable(),
|
|
369
|
+
output: VideoBlockParamsSchema.nullable(),
|
|
370
|
+
}),
|
|
371
|
+
CanvasNodeBaseSchema.extend({
|
|
372
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.fileBlock),
|
|
373
|
+
params: FileBlockParamsSchema.nullable(),
|
|
374
|
+
output: FileBlockParamsSchema.nullable(),
|
|
375
|
+
}),
|
|
376
|
+
CanvasNodeBaseSchema.extend({
|
|
377
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.note),
|
|
378
|
+
params: NoteParamsSchema.nullable(),
|
|
379
|
+
output: NoteParamsSchema.nullable(),
|
|
380
|
+
}),
|
|
381
|
+
CanvasNodeBaseSchema.extend({
|
|
382
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.colorPalette),
|
|
383
|
+
params: ColorPaletteParamsSchema.nullable(),
|
|
384
|
+
output: ColorPaletteOutputSchema.nullable(),
|
|
385
|
+
}),
|
|
386
|
+
CanvasNodeBaseSchema.extend({
|
|
387
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.motionControl),
|
|
388
|
+
params: MotionControlParamsSchema.nullable(),
|
|
389
|
+
output: MotionControlOutputSchema.nullable(),
|
|
390
|
+
}),
|
|
391
|
+
CanvasNodeBaseSchema.extend({
|
|
392
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.varGen),
|
|
393
|
+
params: VarGenParamsSchema.nullable(),
|
|
394
|
+
output: VarGenOutputSchema.nullable(),
|
|
395
|
+
}),
|
|
396
|
+
CanvasNodeBaseSchema.extend({
|
|
397
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.varBlock),
|
|
398
|
+
params: VarBlockParamsSchema.nullable(),
|
|
399
|
+
output: VarBlockParamsSchema.nullable(),
|
|
400
|
+
}),
|
|
401
|
+
CanvasNodeBaseSchema.extend({
|
|
402
|
+
nodeDefinitionId: z.literal(CANVAS_NODE_TYPE.htmlGen),
|
|
403
|
+
params: HtmlGenParamsSchema.nullable(),
|
|
404
|
+
output: HtmlGenOutputSchema.nullable(),
|
|
405
|
+
}),
|
|
406
|
+
]);
|
|
407
|
+
export type CanvasNode = z.infer<typeof CanvasNodeSchema>;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { INPUT_OUTPUT_TYPE, CANVAS_NODE_TYPE } from '../constants';
|
|
3
|
-
import {
|
|
3
|
+
import { CanvasNodePositionSchema, validateCanvasNodeParamsByType } from './canvas-node.schema';
|
|
4
4
|
|
|
5
|
-
const CanvasTemplateGraphNodeSchema = z
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
const CanvasTemplateGraphNodeSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
uuid: z.string().trim().min(1),
|
|
8
|
+
nodeDefinitionId: z.nativeEnum(CANVAS_NODE_TYPE),
|
|
9
|
+
position: CanvasNodePositionSchema,
|
|
10
|
+
params: z.unknown().nullable().optional(),
|
|
11
|
+
})
|
|
12
|
+
.superRefine((node, ctx) => {
|
|
13
|
+
validateCanvasNodeParamsByType(node.nodeDefinitionId, node.params, ctx);
|
|
14
|
+
});
|
|
11
15
|
|
|
12
16
|
const CanvasTemplateGraphEdgeSchema = z.object({
|
|
13
17
|
sourceId: z.string().trim().min(1),
|
|
@@ -54,14 +58,29 @@ export const CanvasTemplateGraphSchema = z
|
|
|
54
58
|
});
|
|
55
59
|
|
|
56
60
|
export type CanvasTemplateGraph = z.infer<typeof CanvasTemplateGraphSchema>;
|
|
61
|
+
export const CanvasTemplateScopeSchema = z.enum(['public', 'private']);
|
|
62
|
+
export type CanvasTemplateScope = z.infer<typeof CanvasTemplateScopeSchema>;
|
|
63
|
+
|
|
64
|
+
export const CanvasTemplateTagSchema = z.object({
|
|
65
|
+
icons: z.object({
|
|
66
|
+
svg: z.string(),
|
|
67
|
+
png: z.string(),
|
|
68
|
+
}),
|
|
69
|
+
alias: z.string().trim().min(1),
|
|
70
|
+
title: z.string().trim().min(1),
|
|
71
|
+
});
|
|
72
|
+
export type CanvasTemplateTag = z.infer<typeof CanvasTemplateTagSchema>;
|
|
57
73
|
|
|
58
74
|
export const CanvasTemplateSchema = z.object({
|
|
59
75
|
uuid: z.string().uuid(),
|
|
60
76
|
name: z.string(),
|
|
61
77
|
description: z.string().nullable(),
|
|
62
|
-
|
|
78
|
+
isPopular: z.boolean(),
|
|
79
|
+
scope: CanvasTemplateScopeSchema,
|
|
80
|
+
ownerUserId: z.string().uuid().nullable(),
|
|
81
|
+
prompt: z.string().nullable(),
|
|
63
82
|
previewImageUrl: z.string().url().nullable(),
|
|
64
|
-
tags: z.array(
|
|
83
|
+
tags: z.array(CanvasTemplateTagSchema),
|
|
65
84
|
graph: CanvasTemplateGraphSchema,
|
|
66
85
|
createdAt: z.date(),
|
|
67
86
|
updatedAt: z.date(),
|
package/models/index.ts
CHANGED
|
@@ -8,13 +8,11 @@ export * from './canvas-node-definition.schema';
|
|
|
8
8
|
export * from './canvas-node.schema';
|
|
9
9
|
export * from './canvas-edge.schema';
|
|
10
10
|
export * from './category.schema';
|
|
11
|
-
export * from './category-translation.schema';
|
|
12
11
|
export * from './chat-with-messages.schema';
|
|
13
12
|
export * from './chat.schema';
|
|
14
13
|
export * from './cloud-payments-receipt.schema';
|
|
15
14
|
export * from './course-author.schema';
|
|
16
15
|
export * from './course.schema';
|
|
17
|
-
export * from './course-translation.schema';
|
|
18
16
|
export * from './date.schema';
|
|
19
17
|
export * from './feedback.schema';
|
|
20
18
|
export * from './file.schema';
|
|
@@ -22,24 +20,19 @@ export * from './key-value.schema';
|
|
|
22
20
|
export * from './form-submission.schema';
|
|
23
21
|
export * from './icon-variants.schema';
|
|
24
22
|
export * from './lesson.schema';
|
|
25
|
-
export * from './lesson-translation.schema';
|
|
26
23
|
export * from './message.schema';
|
|
27
24
|
export * from './midjourney-job.schema';
|
|
28
25
|
export * from './order.schema';
|
|
29
26
|
export * from './page.schema';
|
|
30
|
-
export * from './page-translation.schema';
|
|
31
27
|
export * from './payment-history-item.schema';
|
|
32
28
|
export * from './payment.schema';
|
|
33
29
|
export * from './invoice-for-payment.schema';
|
|
34
30
|
export * from './post.schema';
|
|
35
|
-
export * from './post-translation.schema';
|
|
36
31
|
export * from './product.schema';
|
|
37
32
|
export * from './promocode.schema';
|
|
38
33
|
export * from './question.schema';
|
|
39
|
-
export * from './question-translation.schema';
|
|
40
34
|
export * from './referral-bonus.schema';
|
|
41
35
|
export * from './section.schema';
|
|
42
|
-
export * from './section-translation.schema';
|
|
43
36
|
export * from './subscription-feature.schema';
|
|
44
37
|
export * from './team-subscription-feature.schema';
|
|
45
38
|
export * from './subscription-upgrade-schema';
|
|
@@ -58,11 +51,8 @@ export * from './utm.schema';
|
|
|
58
51
|
export * from './ui-notification.schema';
|
|
59
52
|
export * from './review.schema';
|
|
60
53
|
export * from './prompt-category.schema';
|
|
61
|
-
export * from './prompt-category-translation.schema';
|
|
62
54
|
export * from './prompt-topic.schema';
|
|
63
|
-
export * from './prompt-topic-translation.schema';
|
|
64
55
|
export * from './prompt.schema';
|
|
65
|
-
export * from './prompt-translation.schema';
|
|
66
56
|
export * from './folder.schema';
|
|
67
57
|
export * from './filters.schema';
|
|
68
58
|
export * from './users-filter-notification.schema';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
2
|
import {
|
|
4
3
|
UI_NOTIFICATION_CONDITION_OF_EXECUTION,
|
|
5
4
|
UI_NOTIFICATION_STATUS,
|
|
@@ -19,12 +18,6 @@ export const UiNotificationBaseSchema = z.object({
|
|
|
19
18
|
});
|
|
20
19
|
export type UiNotificationBase = z.infer<typeof UiNotificationBaseSchema>;
|
|
21
20
|
|
|
22
|
-
export const LocalizedUiNotificationTextSchema = z.object({
|
|
23
|
-
[LOCALE.RU]: z.string(),
|
|
24
|
-
[LOCALE.EN]: z.string(),
|
|
25
|
-
});
|
|
26
|
-
export type LocalizedUiNotificationText = z.infer<typeof LocalizedUiNotificationTextSchema>;
|
|
27
|
-
|
|
28
21
|
export const ConnectTelegramBonusUiContentSchema = z.object({
|
|
29
22
|
promocode: z.string(),
|
|
30
23
|
bonusPercent: z.number(),
|
|
@@ -39,14 +32,14 @@ export const SubscriptionPastDueUiContentSchema = z.object({
|
|
|
39
32
|
export type SubscriptionPastDueUiContent = z.infer<typeof SubscriptionPastDueUiContentSchema>;
|
|
40
33
|
|
|
41
34
|
export const FraudDetectedUiContentSchema = z.object({
|
|
42
|
-
message:
|
|
35
|
+
message: z.string(),
|
|
43
36
|
endDate: z.string().datetime(),
|
|
44
37
|
});
|
|
45
38
|
export type FraudDetectedUiContent = z.infer<typeof FraudDetectedUiContentSchema>;
|
|
46
39
|
|
|
47
40
|
export const PromocodeOfferUiContentSchema = z.object({
|
|
48
|
-
title:
|
|
49
|
-
message:
|
|
41
|
+
title: z.string(),
|
|
42
|
+
message: z.string(),
|
|
50
43
|
promocode: z.string(),
|
|
51
44
|
bonusPercent: z.number(),
|
|
52
45
|
validTill: z.string().datetime().nullable(),
|
|
@@ -54,14 +47,14 @@ export const PromocodeOfferUiContentSchema = z.object({
|
|
|
54
47
|
export type PromocodeOfferUiContent = z.infer<typeof PromocodeOfferUiContentSchema>;
|
|
55
48
|
|
|
56
49
|
export const GenericUiContentSchema = z.object({
|
|
57
|
-
title:
|
|
58
|
-
message:
|
|
50
|
+
title: z.string(),
|
|
51
|
+
message: z.string(),
|
|
59
52
|
});
|
|
60
53
|
export type GenericUiContentType = z.infer<typeof GenericUiContentSchema>;
|
|
61
54
|
|
|
62
55
|
export const EmailNotVerifiedUiContentSchema = z.object({
|
|
63
|
-
title:
|
|
64
|
-
message:
|
|
56
|
+
title: z.string(),
|
|
57
|
+
message: z.string(),
|
|
65
58
|
});
|
|
66
59
|
export type EmailNotVerifiedUiContent = z.infer<typeof EmailNotVerifiedUiContentSchema>;
|
|
67
60
|
|
package/models/user.schema.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { UserToSubscriptionSchema } from './user-to-subscription.schema';
|
|
3
3
|
import { UserToProductSchema } from './user-to-product.schema';
|
|
4
|
-
import { LOCALE } from '
|
|
4
|
+
import { LOCALE } from '../constants';
|
|
5
5
|
|
|
6
6
|
export const UserSchema = z.object({
|
|
7
7
|
uuid: z.string().uuid(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpleschool/gptbot",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.71",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"author": "",
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@purpleschool/rugpt-lib-common": "^0.0.21",
|
|
16
15
|
"zod": "^3.25.67"
|
|
17
16
|
}
|
|
18
17
|
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreatePostTranslationCommand = void 0;
|
|
4
|
-
const models_1 = require("../../models");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
var CreatePostTranslationCommand;
|
|
7
|
-
(function (CreatePostTranslationCommand) {
|
|
8
|
-
CreatePostTranslationCommand.RequestSchema = models_1.PostTranslationSchema.pick({
|
|
9
|
-
title: true,
|
|
10
|
-
content: true,
|
|
11
|
-
author: true,
|
|
12
|
-
contentPreview: true,
|
|
13
|
-
metaTitle: true,
|
|
14
|
-
metaDescription: true,
|
|
15
|
-
locale: true,
|
|
16
|
-
});
|
|
17
|
-
CreatePostTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
18
|
-
uuid: zod_1.z.string().uuid(),
|
|
19
|
-
});
|
|
20
|
-
CreatePostTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
21
|
-
data: models_1.PostTranslationSchema,
|
|
22
|
-
});
|
|
23
|
-
})(CreatePostTranslationCommand || (exports.CreatePostTranslationCommand = CreatePostTranslationCommand = {}));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetAllPostTranslationsQuery = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var GetAllPostTranslationsQuery;
|
|
7
|
-
(function (GetAllPostTranslationsQuery) {
|
|
8
|
-
GetAllPostTranslationsQuery.RequestParamSchema = zod_1.z.object({
|
|
9
|
-
uuid: zod_1.z.string().uuid(),
|
|
10
|
-
});
|
|
11
|
-
GetAllPostTranslationsQuery.ResponseSchema = zod_1.z.object({
|
|
12
|
-
data: zod_1.z.array(models_1.PostTranslationSchema),
|
|
13
|
-
});
|
|
14
|
-
})(GetAllPostTranslationsQuery || (exports.GetAllPostTranslationsQuery = GetAllPostTranslationsQuery = {}));
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdatePostTranslationCommand = void 0;
|
|
4
|
-
const models_1 = require("../../models");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
var UpdatePostTranslationCommand;
|
|
7
|
-
(function (UpdatePostTranslationCommand) {
|
|
8
|
-
UpdatePostTranslationCommand.RequestSchema = models_1.PostTranslationSchema.pick({
|
|
9
|
-
title: true,
|
|
10
|
-
content: true,
|
|
11
|
-
author: true,
|
|
12
|
-
contentPreview: true,
|
|
13
|
-
metaTitle: true,
|
|
14
|
-
metaDescription: true,
|
|
15
|
-
}).partial();
|
|
16
|
-
UpdatePostTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
17
|
-
uuid: zod_1.z.string().uuid(),
|
|
18
|
-
translationUuid: zod_1.z.string().uuid(),
|
|
19
|
-
});
|
|
20
|
-
UpdatePostTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
21
|
-
data: models_1.PostTranslationSchema,
|
|
22
|
-
});
|
|
23
|
-
})(UpdatePostTranslationCommand || (exports.UpdatePostTranslationCommand = UpdatePostTranslationCommand = {}));
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateCategoryTranslationCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var CreateCategoryTranslationCommand;
|
|
7
|
-
(function (CreateCategoryTranslationCommand) {
|
|
8
|
-
CreateCategoryTranslationCommand.RequestSchema = models_1.CategoryTranslationSchema.pick({
|
|
9
|
-
name: true,
|
|
10
|
-
prompt: true,
|
|
11
|
-
placeholder: true,
|
|
12
|
-
seoName: true,
|
|
13
|
-
locale: true,
|
|
14
|
-
});
|
|
15
|
-
CreateCategoryTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
16
|
-
uuid: zod_1.z.string().uuid(),
|
|
17
|
-
});
|
|
18
|
-
CreateCategoryTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
19
|
-
data: models_1.CategoryTranslationSchema,
|
|
20
|
-
});
|
|
21
|
-
})(CreateCategoryTranslationCommand || (exports.CreateCategoryTranslationCommand = CreateCategoryTranslationCommand = {}));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetAllCategoryTranslationsQuery = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var GetAllCategoryTranslationsQuery;
|
|
7
|
-
(function (GetAllCategoryTranslationsQuery) {
|
|
8
|
-
GetAllCategoryTranslationsQuery.RequestParamSchema = zod_1.z.object({
|
|
9
|
-
uuid: zod_1.z.string().uuid(),
|
|
10
|
-
});
|
|
11
|
-
GetAllCategoryTranslationsQuery.ResponseSchema = zod_1.z.object({
|
|
12
|
-
data: zod_1.z.array(models_1.CategoryTranslationSchema),
|
|
13
|
-
});
|
|
14
|
-
})(GetAllCategoryTranslationsQuery || (exports.GetAllCategoryTranslationsQuery = GetAllCategoryTranslationsQuery = {}));
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateCategoryTranslationCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var UpdateCategoryTranslationCommand;
|
|
7
|
-
(function (UpdateCategoryTranslationCommand) {
|
|
8
|
-
UpdateCategoryTranslationCommand.RequestSchema = models_1.CategoryTranslationSchema.pick({
|
|
9
|
-
name: true,
|
|
10
|
-
prompt: true,
|
|
11
|
-
placeholder: true,
|
|
12
|
-
seoName: true,
|
|
13
|
-
}).partial();
|
|
14
|
-
UpdateCategoryTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
15
|
-
uuid: zod_1.z.string().uuid(),
|
|
16
|
-
translationUuid: zod_1.z.string().uuid(),
|
|
17
|
-
});
|
|
18
|
-
UpdateCategoryTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
19
|
-
data: models_1.CategoryTranslationSchema,
|
|
20
|
-
});
|
|
21
|
-
})(UpdateCategoryTranslationCommand || (exports.UpdateCategoryTranslationCommand = UpdateCategoryTranslationCommand = {}));
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateCourseTranslationCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var CreateCourseTranslationCommand;
|
|
7
|
-
(function (CreateCourseTranslationCommand) {
|
|
8
|
-
CreateCourseTranslationCommand.RequestSchema = models_1.CourseTranslationSchema.pick({
|
|
9
|
-
title: true,
|
|
10
|
-
subtitle: true,
|
|
11
|
-
prerequisites: true,
|
|
12
|
-
description: true,
|
|
13
|
-
skills: true,
|
|
14
|
-
locale: true,
|
|
15
|
-
});
|
|
16
|
-
CreateCourseTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
17
|
-
uuid: zod_1.z.string().uuid(),
|
|
18
|
-
});
|
|
19
|
-
CreateCourseTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
20
|
-
data: models_1.CourseTranslationSchema,
|
|
21
|
-
});
|
|
22
|
-
})(CreateCourseTranslationCommand || (exports.CreateCourseTranslationCommand = CreateCourseTranslationCommand = {}));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateLessonTranslationCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var CreateLessonTranslationCommand;
|
|
7
|
-
(function (CreateLessonTranslationCommand) {
|
|
8
|
-
CreateLessonTranslationCommand.RequestSchema = models_1.LessonTranslationSchema.pick({
|
|
9
|
-
title: true,
|
|
10
|
-
locale: true,
|
|
11
|
-
});
|
|
12
|
-
CreateLessonTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
13
|
-
uuid: zod_1.z.string().uuid(),
|
|
14
|
-
});
|
|
15
|
-
CreateLessonTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
-
data: models_1.LessonTranslationSchema,
|
|
17
|
-
});
|
|
18
|
-
})(CreateLessonTranslationCommand || (exports.CreateLessonTranslationCommand = CreateLessonTranslationCommand = {}));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateSectionTranslationCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var CreateSectionTranslationCommand;
|
|
7
|
-
(function (CreateSectionTranslationCommand) {
|
|
8
|
-
CreateSectionTranslationCommand.RequestSchema = models_1.SectionTranslationSchema.pick({
|
|
9
|
-
title: true,
|
|
10
|
-
locale: true,
|
|
11
|
-
});
|
|
12
|
-
CreateSectionTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
13
|
-
uuid: zod_1.z.string().uuid(),
|
|
14
|
-
});
|
|
15
|
-
CreateSectionTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
-
data: models_1.SectionTranslationSchema,
|
|
17
|
-
});
|
|
18
|
-
})(CreateSectionTranslationCommand || (exports.CreateSectionTranslationCommand = CreateSectionTranslationCommand = {}));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetAllCourseTranslationsQuery = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var GetAllCourseTranslationsQuery;
|
|
7
|
-
(function (GetAllCourseTranslationsQuery) {
|
|
8
|
-
GetAllCourseTranslationsQuery.RequestParamSchema = zod_1.z.object({
|
|
9
|
-
uuid: zod_1.z.string().uuid(),
|
|
10
|
-
});
|
|
11
|
-
GetAllCourseTranslationsQuery.ResponseSchema = zod_1.z.object({
|
|
12
|
-
data: zod_1.z.array(models_1.CourseTranslationSchema),
|
|
13
|
-
});
|
|
14
|
-
})(GetAllCourseTranslationsQuery || (exports.GetAllCourseTranslationsQuery = GetAllCourseTranslationsQuery = {}));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetAllLessonTranslationsQuery = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var GetAllLessonTranslationsQuery;
|
|
7
|
-
(function (GetAllLessonTranslationsQuery) {
|
|
8
|
-
GetAllLessonTranslationsQuery.RequestParamSchema = zod_1.z.object({
|
|
9
|
-
uuid: zod_1.z.string().uuid(),
|
|
10
|
-
});
|
|
11
|
-
GetAllLessonTranslationsQuery.ResponseSchema = zod_1.z.object({
|
|
12
|
-
data: zod_1.z.array(models_1.LessonTranslationSchema),
|
|
13
|
-
});
|
|
14
|
-
})(GetAllLessonTranslationsQuery || (exports.GetAllLessonTranslationsQuery = GetAllLessonTranslationsQuery = {}));
|