@purpleschool/gptbot 0.12.71 → 0.12.72-stage-2
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 +4 -0
- package/api/controllers/http/canvas-template.ts +0 -1
- package/api/controllers/http/category.ts +4 -0
- package/api/controllers/http/course.ts +12 -0
- package/api/controllers/http/index.ts +0 -1
- package/api/controllers/http/page.ts +4 -0
- package/api/controllers/http/prompt-category.ts +4 -0
- package/api/controllers/http/prompt-topic.ts +4 -0
- package/api/controllers/http/prompt.ts +4 -0
- package/api/controllers/http/question.ts +4 -0
- package/api/controllers/http/team-account.ts +1 -0
- package/api/routes.ts +68 -5
- package/build/api/controllers/http/blog.js +3 -0
- package/build/api/controllers/http/canvas-template.js +0 -1
- package/build/api/controllers/http/category.js +3 -0
- package/build/api/controllers/http/course.js +9 -0
- package/build/api/controllers/http/index.js +0 -1
- package/build/api/controllers/http/page.js +3 -0
- package/build/api/controllers/http/prompt-category.js +3 -0
- package/build/api/controllers/http/prompt-topic.js +3 -0
- package/build/api/controllers/http/prompt.js +3 -0
- package/build/api/controllers/http/question.js +3 -0
- package/build/api/controllers/http/team-account.js +1 -0
- package/build/api/routes.js +34 -5
- package/build/commands/blog/create-post-translation.command.js +23 -0
- package/build/commands/blog/create-post.command.js +6 -0
- package/build/commands/blog/get-all-post-translations.query.js +14 -0
- package/build/commands/blog/index.js +3 -0
- package/build/commands/blog/update-post-translation.command.js +23 -0
- package/build/commands/blog/update-post.command.js +6 -0
- package/build/commands/cabinet/get-user-statistics-by-month.command.js +6 -13
- package/build/commands/cabinet/get-user-statistics-overview.command.js +5 -1
- package/build/commands/{ai-studio/canvas → canvas}/create-canvas.command.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/delete-canvas.command.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/find-canvas-by-uuid-with-relations.query.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/find-canvas-by-uuid.query.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/find-canvases-by-user.query.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/run-canvas.command.js +1 -1
- package/build/commands/{ai-studio/canvas → canvas}/save-canvas.command.js +4 -8
- package/build/commands/{ai-studio/canvas → canvas}/update-canvas.command.js +1 -1
- package/build/commands/{ai-studio/canvas-edge → canvas-edge}/create-canvas-edge.command.js +2 -2
- package/build/commands/{ai-studio/canvas-edge → canvas-edge}/find-canvas-edge-by-source-and-target.query.js +1 -1
- package/build/commands/{ai-studio/canvas-edge → canvas-edge}/find-canvas-edges-by-canvas.query.js +1 -1
- package/build/commands/{ai-studio/canvas-node → canvas-node}/create-canvas-node.command.js +4 -8
- package/build/commands/{ai-studio/canvas-node → canvas-node}/delete-canvas-node.command.js +2 -2
- package/build/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-node-by-uuid.query.js +2 -2
- package/build/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-node-definitions-with-configs.query.js +1 -1
- package/build/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-nodes-by-canvas.query.js +1 -1
- package/build/commands/{ai-studio/canvas-node → canvas-node}/update-canvas-node.command.js +5 -13
- package/build/commands/{ai-studio/canvas-template → canvas-template}/create-canvas-from-template.command.js +1 -1
- package/build/commands/{ai-studio/canvas-template → canvas-template}/create-canvas-template.command.js +2 -6
- package/build/commands/{ai-studio/canvas-template → canvas-template}/delete-canvas-template.command.js +2 -3
- package/build/commands/{ai-studio/canvas-template → canvas-template}/find-canvas-template-by-uuid.query.js +1 -1
- package/build/commands/{ai-studio/canvas-template → canvas-template}/find-canvas-templates.query.js +1 -6
- package/build/commands/{ai-studio/canvas-template → canvas-template}/index.js +1 -2
- package/build/commands/{ai-studio/canvas-template → canvas-template}/update-canvas-template.command.js +2 -6
- package/build/commands/category/create-category-translation.command.js +21 -0
- package/build/commands/category/create-category.command.js +4 -0
- package/build/commands/category/get-all-category-translations.query.js +14 -0
- package/build/commands/category/index.js +3 -0
- package/build/commands/category/update-category-translation.command.js +21 -0
- package/build/commands/category/update-category.command.js +4 -0
- package/build/commands/course/create-course-translation.command.js +22 -0
- package/build/commands/course/create-course.command.js +5 -0
- package/build/commands/course/create-lesson-translation.command.js +18 -0
- package/build/commands/course/create-section-translation.command.js +18 -0
- package/build/commands/course/get-all-course-translations.query.js +14 -0
- package/build/commands/course/get-all-lesson-translations.query.js +14 -0
- package/build/commands/course/get-all-section-translations.query.js +14 -0
- package/build/commands/course/index.js +9 -0
- package/build/commands/course/update-course-translation.command.js +22 -0
- package/build/commands/course/update-lesson-translation.command.js +18 -0
- package/build/commands/course/update-section-translation.command.js +18 -0
- package/build/commands/index.js +4 -5
- package/build/commands/page/create-page-translation.command.js +23 -0
- package/build/commands/page/create-page.command.js +6 -0
- package/build/commands/page/find-page.command.js +10 -2
- package/build/commands/page/get-all-page-translations.query.js +14 -0
- package/build/commands/page/index.js +3 -0
- package/build/commands/page/update-page-translation.command.js +23 -0
- package/build/commands/page/update-page.command.js +5 -0
- package/build/commands/prompt/create-prompt-translation.command.js +19 -0
- package/build/commands/prompt/create-prompt.command.js +2 -0
- package/build/commands/prompt/get-all-prompt-translations.query.js +14 -0
- package/build/commands/prompt/index.js +3 -0
- package/build/commands/prompt/update-prompt-translation.command.js +19 -0
- package/build/commands/prompt/update-prompt.command.js +2 -0
- package/build/commands/prompt-category/create-prompt-category-translation.command.js +20 -0
- package/build/commands/prompt-category/create-prompt-category.command.js +3 -0
- package/build/commands/prompt-category/get-all-prompt-category-translations.query.js +14 -0
- package/build/commands/prompt-category/index.js +3 -0
- package/build/commands/prompt-category/update-prompt-category-translation.command.js +20 -0
- package/build/commands/prompt-category/update-prompt-category.command.js +3 -0
- package/build/commands/prompt-topic/create-prompt-topic-translation.command.js +22 -0
- package/build/commands/prompt-topic/create-prompt-topic.command.js +5 -0
- package/build/commands/prompt-topic/get-all-prompt-topic-translations.query.js +14 -0
- package/build/commands/prompt-topic/index.js +3 -0
- package/build/commands/prompt-topic/update-prompt-topic-translation.command.js +22 -0
- package/build/commands/prompt-topic/update-prompt-topic.command.js +5 -0
- package/build/commands/question/create-question-translation.command.js +19 -0
- package/build/commands/question/create-question.command.js +2 -0
- package/build/commands/question/get-all-question-translations.query.js +14 -0
- package/build/commands/question/index.js +3 -0
- package/build/commands/question/update-question-translation.command.js +19 -0
- package/build/commands/question/update-question.command.js +2 -0
- package/build/commands/team-account/get-team-account-statistics-by-month.command.js +6 -13
- package/build/commands/team-account/get-team-account-statistics-overview.command.js +5 -1
- package/build/commands/team-account/index.js +1 -0
- package/build/commands/team-account/update-team-account-invite.command.js +17 -0
- package/build/commands/ui-notification/create-admin-broadcast-ui-notification.command.js +9 -2
- package/build/commands/unregistered-user/patch-locale.command.js +3 -3
- package/build/commands/user/get-me.command.js +2 -1
- package/build/commands/user/patch-locale.command.js +3 -3
- package/build/commands/user/send-telegram-notification.command.js +6 -1
- package/build/constants/cabinet/enums/index.js +1 -0
- package/build/constants/cabinet/enums/statistics-request-type.enum.js +24 -0
- package/build/constants/subscription/enums/index.js +1 -0
- package/build/constants/subscription/enums/subscription-balance-field.enum.js +8 -0
- package/build/constants/tool/enums/index.js +0 -1
- package/build/constants/user/enums/index.js +0 -1
- package/build/models/canvas-node.schema.js +37 -140
- package/build/models/canvas-template.schema.js +5 -21
- package/build/models/category-translation.schema.js +16 -0
- package/build/models/course-translation.schema.js +17 -0
- package/build/models/index.js +10 -0
- package/build/models/lesson-translation.schema.js +13 -0
- package/build/models/page-translation.schema.js +18 -0
- package/build/models/post-translation.schema.js +18 -0
- package/build/models/prompt-category-translation.schema.js +18 -0
- package/build/models/prompt-topic-translation.schema.js +20 -0
- package/build/models/prompt-translation.schema.js +14 -0
- package/build/models/question-translation.schema.js +14 -0
- package/build/models/section-translation.schema.js +13 -0
- package/build/models/ui-notification.schema.js +13 -8
- package/build/models/user.schema.js +2 -2
- package/commands/blog/create-post-translation.command.ts +28 -0
- package/commands/blog/create-post.command.ts +6 -0
- package/commands/blog/get-all-post-translations.query.ts +16 -0
- package/commands/blog/index.ts +3 -0
- package/commands/blog/update-post-translation.command.ts +28 -0
- package/commands/blog/update-post.command.ts +6 -0
- package/commands/cabinet/get-user-statistics-by-month.command.ts +7 -14
- package/commands/cabinet/get-user-statistics-overview.command.ts +6 -2
- package/commands/{ai-studio/canvas → canvas}/create-canvas.command.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/delete-canvas.command.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/find-canvas-by-uuid-with-relations.query.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/find-canvas-by-uuid.query.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/find-canvases-by-user.query.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/run-canvas.command.ts +1 -1
- package/commands/{ai-studio/canvas → canvas}/save-canvas.command.ts +9 -13
- package/commands/{ai-studio/canvas → canvas}/update-canvas.command.ts +1 -1
- package/commands/{ai-studio/canvas-edge → canvas-edge}/create-canvas-edge.command.ts +2 -2
- package/commands/{ai-studio/canvas-edge → canvas-edge}/find-canvas-edge-by-source-and-target.query.ts +1 -1
- package/commands/{ai-studio/canvas-edge → canvas-edge}/find-canvas-edges-by-canvas.query.ts +1 -1
- package/commands/canvas-node/create-canvas-node.command.ts +25 -0
- package/commands/{ai-studio/canvas-node → canvas-node}/delete-canvas-node.command.ts +2 -2
- package/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-node-by-uuid.query.ts +2 -2
- package/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-node-definitions-with-configs.query.ts +1 -1
- package/commands/{ai-studio/canvas-node → canvas-node}/find-canvas-nodes-by-canvas.query.ts +1 -1
- package/commands/canvas-node/update-canvas-node.command.ts +26 -0
- package/commands/{ai-studio/canvas-template → canvas-template}/create-canvas-from-template.command.ts +1 -1
- package/commands/{ai-studio/canvas-template → canvas-template}/create-canvas-template.command.ts +2 -7
- package/commands/{ai-studio/canvas-template → canvas-template}/delete-canvas-template.command.ts +2 -3
- package/commands/{ai-studio/canvas-template → canvas-template}/find-canvas-template-by-uuid.query.ts +1 -1
- package/commands/{ai-studio/canvas-template → canvas-template}/find-canvas-templates.query.ts +1 -6
- package/commands/{ai-studio/canvas-template → canvas-template}/index.ts +1 -2
- package/commands/{ai-studio/canvas-template → canvas-template}/update-canvas-template.command.ts +2 -11
- package/commands/category/create-category-translation.command.ts +26 -0
- package/commands/category/create-category.command.ts +4 -0
- package/commands/category/get-all-category-translations.query.ts +16 -0
- package/commands/category/index.ts +3 -0
- package/commands/category/update-category-translation.command.ts +26 -0
- package/commands/category/update-category.command.ts +4 -0
- package/commands/course/create-course-translation.command.ts +27 -0
- package/commands/course/create-course.command.ts +5 -0
- package/commands/course/create-lesson-translation.command.ts +23 -0
- package/commands/course/create-section-translation.command.ts +23 -0
- package/commands/course/get-all-course-translations.query.ts +16 -0
- package/commands/course/get-all-lesson-translations.query.ts +16 -0
- package/commands/course/get-all-section-translations.query.ts +16 -0
- package/commands/course/index.ts +9 -0
- package/commands/course/update-course-translation.command.ts +27 -0
- package/commands/course/update-lesson-translation.command.ts +23 -0
- package/commands/course/update-section-translation.command.ts +23 -0
- package/commands/index.ts +5 -5
- package/commands/page/create-page-translation.command.ts +28 -0
- package/commands/page/create-page.command.ts +6 -0
- package/commands/page/find-page.command.ts +15 -2
- package/commands/page/get-all-page-translations.query.ts +16 -0
- package/commands/page/index.ts +3 -0
- package/commands/page/update-page-translation.command.ts +28 -0
- package/commands/page/update-page.command.ts +5 -0
- package/commands/prompt/create-prompt-translation.command.ts +24 -0
- package/commands/prompt/create-prompt.command.ts +2 -0
- package/commands/prompt/get-all-prompt-translations.query.ts +16 -0
- package/commands/prompt/index.ts +3 -0
- package/commands/prompt/update-prompt-translation.command.ts +24 -0
- package/commands/prompt/update-prompt.command.ts +2 -0
- package/commands/prompt-category/create-prompt-category-translation.command.ts +25 -0
- package/commands/prompt-category/create-prompt-category.command.ts +3 -0
- package/commands/prompt-category/get-all-prompt-category-translations.query.ts +16 -0
- package/commands/prompt-category/index.ts +3 -0
- package/commands/prompt-category/update-prompt-category-translation.command.ts +25 -0
- package/commands/prompt-category/update-prompt-category.command.ts +3 -0
- package/commands/prompt-topic/create-prompt-topic-translation.command.ts +27 -0
- package/commands/prompt-topic/create-prompt-topic.command.ts +5 -0
- package/commands/prompt-topic/get-all-prompt-topic-translations.query.ts +16 -0
- package/commands/prompt-topic/index.ts +3 -0
- package/commands/prompt-topic/update-prompt-topic-translation.command.ts +27 -0
- package/commands/prompt-topic/update-prompt-topic.command.ts +5 -0
- package/commands/question/create-question-translation.command.ts +24 -0
- package/commands/question/create-question.command.ts +2 -0
- package/commands/question/get-all-question-translations.query.ts +16 -0
- package/commands/question/index.ts +3 -0
- package/commands/question/update-question-translation.command.ts +24 -0
- package/commands/question/update-question.command.ts +2 -0
- package/commands/team-account/get-team-account-statistics-by-month.command.ts +7 -14
- package/commands/team-account/get-team-account-statistics-overview.command.ts +6 -2
- package/commands/team-account/index.ts +1 -0
- package/commands/team-account/update-team-account-invite.command.ts +22 -0
- package/commands/ui-notification/create-admin-broadcast-ui-notification.command.ts +9 -2
- package/commands/unregistered-user/patch-locale.command.ts +1 -1
- package/commands/user/get-me.command.ts +2 -1
- package/commands/user/patch-locale.command.ts +1 -1
- package/commands/user/send-telegram-notification.command.ts +8 -1
- package/constants/cabinet/enums/index.ts +1 -0
- package/constants/cabinet/enums/statistics-request-type.enum.ts +20 -0
- package/constants/subscription/enums/index.ts +1 -0
- package/constants/subscription/enums/subscription-balance-field.enum.ts +4 -0
- package/constants/tool/enums/index.ts +0 -1
- package/constants/user/enums/index.ts +0 -1
- package/models/canvas-node.schema.ts +41 -167
- package/models/canvas-template.schema.ts +9 -28
- package/models/category-translation.schema.ts +14 -0
- package/models/course-translation.schema.ts +15 -0
- package/models/index.ts +10 -0
- package/models/lesson-translation.schema.ts +11 -0
- package/models/page-translation.schema.ts +16 -0
- package/models/post-translation.schema.ts +16 -0
- package/models/prompt-category-translation.schema.ts +13 -0
- package/models/prompt-topic-translation.schema.ts +15 -0
- package/models/prompt-translation.schema.ts +12 -0
- package/models/question-translation.schema.ts +12 -0
- package/models/section-translation.schema.ts +11 -0
- package/models/ui-notification.schema.ts +14 -7
- package/models/user.schema.ts +1 -1
- package/package.json +2 -1
- package/api/controllers/http/palette.ts +0 -6
- package/build/api/controllers/http/palette.js +0 -8
- package/build/commands/ai-studio/canvas-template/generate-canvas-template-by-prompt.command.js +0 -14
- package/build/commands/ai-studio/canvas-tool/index.js +0 -17
- package/build/commands/ai-studio/canvas-tool/palette/generate-palette.command.js +0 -20
- package/build/commands/ai-studio/canvas-tool/palette/get-palette-price.command.js +0 -17
- package/build/commands/ai-studio/canvas-tool/palette/index.js +0 -18
- package/build/commands/ai-studio/index.js +0 -21
- package/build/constants/tool/enums/job-request-origin.enum.js +0 -8
- package/build/constants/user/enums/locale.enum.js +0 -8
- package/commands/ai-studio/canvas-node/create-canvas-node.command.ts +0 -33
- package/commands/ai-studio/canvas-node/update-canvas-node.command.ts +0 -40
- package/commands/ai-studio/canvas-template/generate-canvas-template-by-prompt.command.ts +0 -16
- package/commands/ai-studio/canvas-tool/index.ts +0 -1
- package/commands/ai-studio/canvas-tool/palette/generate-palette.command.ts +0 -23
- package/commands/ai-studio/canvas-tool/palette/get-palette-price.command.ts +0 -17
- package/commands/ai-studio/canvas-tool/palette/index.ts +0 -2
- package/commands/ai-studio/index.ts +0 -5
- package/constants/tool/enums/job-request-origin.enum.ts +0 -4
- package/constants/user/enums/locale.enum.ts +0 -4
- /package/build/commands/{ai-studio/canvas → canvas}/index.js +0 -0
- /package/build/commands/{ai-studio/canvas-edge → canvas-edge}/delete-canvas-edge.command.js +0 -0
- /package/build/commands/{ai-studio/canvas-edge → canvas-edge}/index.js +0 -0
- /package/build/commands/{ai-studio/canvas-node → canvas-node}/index.js +0 -0
- /package/commands/{ai-studio/canvas → canvas}/index.ts +0 -0
- /package/commands/{ai-studio/canvas-edge → canvas-edge}/delete-canvas-edge.command.ts +0 -0
- /package/commands/{ai-studio/canvas-edge → canvas-edge}/index.ts +0 -0
- /package/commands/{ai-studio/canvas-node → canvas-node}/index.ts +0 -0
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetTeamAccountStatisticsByMonthCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
5
6
|
const constants_1 = require("../../constants");
|
|
6
7
|
var GetTeamAccountStatisticsByMonthCommand;
|
|
7
8
|
(function (GetTeamAccountStatisticsByMonthCommand) {
|
|
8
9
|
GetTeamAccountStatisticsByMonthCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
|
|
10
|
+
callOrigin: zod_1.z
|
|
11
|
+
.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN)
|
|
12
|
+
.default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB)
|
|
13
|
+
.optional(),
|
|
10
14
|
metric: zod_1.z
|
|
11
15
|
.nativeEnum(constants_1.STATISTICS_METRIC_TYPE)
|
|
12
16
|
.default(constants_1.STATISTICS_METRIC_TYPE.REQUESTS)
|
|
@@ -15,18 +19,7 @@ var GetTeamAccountStatisticsByMonthCommand;
|
|
|
15
19
|
});
|
|
16
20
|
GetTeamAccountStatisticsByMonthCommand.TeamAccountStatisticsByMonthItemSchema = zod_1.z.object({
|
|
17
21
|
month: zod_1.z.string(),
|
|
18
|
-
|
|
19
|
-
total_audios: zod_1.z.number(),
|
|
20
|
-
total_images: zod_1.z.number(),
|
|
21
|
-
total_videos: zod_1.z.number(),
|
|
22
|
-
total_presentations: zod_1.z.number(),
|
|
23
|
-
total_paraphrases: zod_1.z.number(),
|
|
24
|
-
writers: zod_1.z.object({
|
|
25
|
-
total_writers: zod_1.z.number(),
|
|
26
|
-
total_writer_actions: zod_1.z.number(),
|
|
27
|
-
}),
|
|
28
|
-
total_video_edits: zod_1.z.number(),
|
|
29
|
-
total_musics: zod_1.z.number(),
|
|
22
|
+
statistics: zod_1.z.record(zod_1.z.nativeEnum(constants_1.STATISTICS_REQUEST_TYPE), zod_1.z.number()),
|
|
30
23
|
});
|
|
31
24
|
GetTeamAccountStatisticsByMonthCommand.ResponseSchema = zod_1.z.object({
|
|
32
25
|
data: zod_1.z.array(GetTeamAccountStatisticsByMonthCommand.TeamAccountStatisticsByMonthItemSchema),
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetTeamAccountStatisticsOverviewCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
5
6
|
const constants_1 = require("../../constants");
|
|
6
7
|
var GetTeamAccountStatisticsOverviewCommand;
|
|
7
8
|
(function (GetTeamAccountStatisticsOverviewCommand) {
|
|
@@ -13,7 +14,10 @@ var GetTeamAccountStatisticsOverviewCommand;
|
|
|
13
14
|
message: 'to must be a valid date string',
|
|
14
15
|
}),
|
|
15
16
|
groupBy: zod_1.z.nativeEnum(constants_1.GROUP_BY).default(constants_1.GROUP_BY.DAY),
|
|
16
|
-
|
|
17
|
+
callOrigin: zod_1.z
|
|
18
|
+
.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN)
|
|
19
|
+
.default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB)
|
|
20
|
+
.optional(),
|
|
17
21
|
memberUserId: zod_1.z.string().uuid().optional(),
|
|
18
22
|
});
|
|
19
23
|
GetTeamAccountStatisticsOverviewCommand.TeamAccountStatisticsOverviewItemSchema = zod_1.z.object({
|
|
@@ -18,6 +18,7 @@ __exportStar(require("./create-team-account.command"), exports);
|
|
|
18
18
|
__exportStar(require("./update-team-account.command"), exports);
|
|
19
19
|
__exportStar(require("./cancel-team-trial-subscription.command"), exports);
|
|
20
20
|
__exportStar(require("./invite-team-account-member.command"), exports);
|
|
21
|
+
__exportStar(require("./update-team-account-invite.command"), exports);
|
|
21
22
|
__exportStar(require("./accept-team-account-invite.command"), exports);
|
|
22
23
|
__exportStar(require("./remove-team-account-member.command"), exports);
|
|
23
24
|
__exportStar(require("./leave-team-account-member.command"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateTeamAccountInviteCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var UpdateTeamAccountInviteCommand;
|
|
7
|
+
(function (UpdateTeamAccountInviteCommand) {
|
|
8
|
+
UpdateTeamAccountInviteCommand.RequestParam = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
UpdateTeamAccountInviteCommand.RequestSchema = zod_1.z.object({
|
|
12
|
+
limit: zod_1.z.number().int().positive().nullable(),
|
|
13
|
+
});
|
|
14
|
+
UpdateTeamAccountInviteCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: models_1.TeamAccountInviteResponseSchema,
|
|
16
|
+
});
|
|
17
|
+
})(UpdateTeamAccountInviteCommand || (exports.UpdateTeamAccountInviteCommand = UpdateTeamAccountInviteCommand = {}));
|
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateAdminBroadcastUiNotificationCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
5
6
|
var CreateAdminBroadcastUiNotificationCommand;
|
|
6
7
|
(function (CreateAdminBroadcastUiNotificationCommand) {
|
|
7
8
|
CreateAdminBroadcastUiNotificationCommand.RequestBodySchema = zod_1.z.object({
|
|
8
|
-
title: zod_1.z.
|
|
9
|
-
|
|
9
|
+
title: zod_1.z.object({
|
|
10
|
+
[rugpt_lib_common_1.LOCALE.RU]: zod_1.z.string().trim().min(1),
|
|
11
|
+
[rugpt_lib_common_1.LOCALE.EN]: zod_1.z.string().trim().min(1),
|
|
12
|
+
}),
|
|
13
|
+
message: zod_1.z.object({
|
|
14
|
+
[rugpt_lib_common_1.LOCALE.RU]: zod_1.z.string().trim().min(1),
|
|
15
|
+
[rugpt_lib_common_1.LOCALE.EN]: zod_1.z.string().trim().min(1),
|
|
16
|
+
}),
|
|
10
17
|
onlyRegistered: zod_1.z.boolean().optional(),
|
|
11
18
|
});
|
|
12
19
|
CreateAdminBroadcastUiNotificationCommand.ResponseSchema = zod_1.z.object({
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PatchUnregisteredUserLocaleCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
6
6
|
var PatchUnregisteredUserLocaleCommand;
|
|
7
7
|
(function (PatchUnregisteredUserLocaleCommand) {
|
|
8
8
|
PatchUnregisteredUserLocaleCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
locale: zod_1.z.nativeEnum(
|
|
9
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
10
10
|
});
|
|
11
11
|
PatchUnregisteredUserLocaleCommand.ResponseSchema = zod_1.z.object({
|
|
12
12
|
data: zod_1.z.object({
|
|
13
|
-
locale: zod_1.z.nativeEnum(
|
|
13
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
14
14
|
}),
|
|
15
15
|
});
|
|
16
16
|
})(PatchUnregisteredUserLocaleCommand || (exports.PatchUnregisteredUserLocaleCommand = PatchUnregisteredUserLocaleCommand = {}));
|
|
@@ -4,6 +4,7 @@ exports.GetMeCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
6
|
const models_1 = require("../../models");
|
|
7
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
7
8
|
var GetMeCommand;
|
|
8
9
|
(function (GetMeCommand) {
|
|
9
10
|
GetMeCommand.RequestSchema = zod_1.z.object({});
|
|
@@ -17,7 +18,7 @@ var GetMeCommand;
|
|
|
17
18
|
telegramId: zod_1.z.number().nullable(),
|
|
18
19
|
telegramUserName: zod_1.z.string().nullable(),
|
|
19
20
|
webmasterId: zod_1.z.string().uuid().nullable(),
|
|
20
|
-
locale: zod_1.z.nativeEnum(
|
|
21
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
21
22
|
profile: models_1.UserProfileResponseSchema,
|
|
22
23
|
}),
|
|
23
24
|
});
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PatchUserLocaleCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
6
6
|
var PatchUserLocaleCommand;
|
|
7
7
|
(function (PatchUserLocaleCommand) {
|
|
8
8
|
PatchUserLocaleCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
locale: zod_1.z.nativeEnum(
|
|
9
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
10
10
|
});
|
|
11
11
|
PatchUserLocaleCommand.ResponseSchema = zod_1.z.object({
|
|
12
12
|
data: zod_1.z.object({
|
|
13
|
-
locale: zod_1.z.nativeEnum(
|
|
13
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
14
14
|
}),
|
|
15
15
|
});
|
|
16
16
|
})(PatchUserLocaleCommand || (exports.PatchUserLocaleCommand = PatchUserLocaleCommand = {}));
|
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SendTelegramNotificationCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
5
6
|
const models_1 = require("../../models");
|
|
6
7
|
var SendTelegramNotificationCommand;
|
|
7
8
|
(function (SendTelegramNotificationCommand) {
|
|
9
|
+
SendTelegramNotificationCommand.MessageMdSchema = zod_1.z.object({
|
|
10
|
+
[rugpt_lib_common_1.LOCALE.RU]: zod_1.z.string(),
|
|
11
|
+
[rugpt_lib_common_1.LOCALE.EN]: zod_1.z.string(),
|
|
12
|
+
});
|
|
8
13
|
SendTelegramNotificationCommand.RequestSchema = zod_1.z.object({
|
|
9
14
|
filters: models_1.UserFilterSchema,
|
|
10
|
-
messageMd:
|
|
15
|
+
messageMd: SendTelegramNotificationCommand.MessageMdSchema,
|
|
11
16
|
});
|
|
12
17
|
SendTelegramNotificationCommand.ResponseSchema = zod_1.z.object({
|
|
13
18
|
count: zod_1.z.number(),
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./group-by.enum"), exports);
|
|
18
18
|
__exportStar(require("./statistics-metric-type.enum"), exports);
|
|
19
|
+
__exportStar(require("./statistics-request-type.enum"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STATISTICS_REQUEST_TYPE = void 0;
|
|
4
|
+
var STATISTICS_REQUEST_TYPE;
|
|
5
|
+
(function (STATISTICS_REQUEST_TYPE) {
|
|
6
|
+
STATISTICS_REQUEST_TYPE["IMAGE"] = "IMAGE";
|
|
7
|
+
STATISTICS_REQUEST_TYPE["VIDEO"] = "VIDEO";
|
|
8
|
+
STATISTICS_REQUEST_TYPE["PRESENTATION"] = "PRESENTATION";
|
|
9
|
+
STATISTICS_REQUEST_TYPE["TEXT"] = "TEXT";
|
|
10
|
+
STATISTICS_REQUEST_TYPE["AUDIO"] = "AUDIO";
|
|
11
|
+
STATISTICS_REQUEST_TYPE["PARAPHRASE"] = "PARAPHRASE";
|
|
12
|
+
STATISTICS_REQUEST_TYPE["WRITER"] = "WRITER";
|
|
13
|
+
STATISTICS_REQUEST_TYPE["PRESENTATION_AI_ACTION"] = "PRESENTATION_AI_ACTION";
|
|
14
|
+
STATISTICS_REQUEST_TYPE["WRITER_ACTION"] = "WRITER_ACTION";
|
|
15
|
+
STATISTICS_REQUEST_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
|
|
16
|
+
STATISTICS_REQUEST_TYPE["MUSIC"] = "MUSIC";
|
|
17
|
+
STATISTICS_REQUEST_TYPE["MUSIC_ACTION"] = "MUSIC_ACTION";
|
|
18
|
+
STATISTICS_REQUEST_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
|
|
19
|
+
STATISTICS_REQUEST_TYPE["MARKETPLACE_CARD"] = "MARKETPLACE_CARD";
|
|
20
|
+
STATISTICS_REQUEST_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
|
|
21
|
+
STATISTICS_REQUEST_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
22
|
+
STATISTICS_REQUEST_TYPE["DIAGRAMS"] = "DIAGRAMS";
|
|
23
|
+
STATISTICS_REQUEST_TYPE["HTML_PAGE_BUILDER"] = "HTML_PAGE_BUILDER";
|
|
24
|
+
})(STATISTICS_REQUEST_TYPE || (exports.STATISTICS_REQUEST_TYPE = STATISTICS_REQUEST_TYPE = {}));
|
|
@@ -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("./subscription-action.enum"), exports);
|
|
18
|
+
__exportStar(require("./subscription-balance-field.enum"), exports);
|
|
18
19
|
__exportStar(require("./subscription-feature-type.enum"), exports);
|
|
19
20
|
__exportStar(require("./subscription-plan.enum"), exports);
|
|
20
21
|
__exportStar(require("./subscription-status.enum"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUBSCRIPTION_BALANCE_FIELD = void 0;
|
|
4
|
+
var SUBSCRIPTION_BALANCE_FIELD;
|
|
5
|
+
(function (SUBSCRIPTION_BALANCE_FIELD) {
|
|
6
|
+
SUBSCRIPTION_BALANCE_FIELD["TOKEN_BALANCE"] = "tokenBalance";
|
|
7
|
+
SUBSCRIPTION_BALANCE_FIELD["CARRIED_OVER_TOKEN_BALANCE"] = "carriedOverTokenBalance";
|
|
8
|
+
})(SUBSCRIPTION_BALANCE_FIELD || (exports.SUBSCRIPTION_BALANCE_FIELD = SUBSCRIPTION_BALANCE_FIELD = {}));
|
|
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./tool-content-type.enum"), exports);
|
|
18
18
|
__exportStar(require("./tool-group.enum"), exports);
|
|
19
19
|
__exportStar(require("./tool-job-status.enum"), exports);
|
|
20
|
-
__exportStar(require("./job-request-origin.enum"), exports);
|
|
21
20
|
__exportStar(require("./tool-type.enum"), exports);
|
|
22
21
|
__exportStar(require("./tool-workspace-item-slot.enum"), exports);
|
|
23
22
|
__exportStar(require("./tool-workspace-status.enum"), exports);
|
|
@@ -18,4 +18,3 @@ __exportStar(require("./singup-method.enum"), exports);
|
|
|
18
18
|
__exportStar(require("./user-status"), exports);
|
|
19
19
|
__exportStar(require("./user-sort-by.enum"), exports);
|
|
20
20
|
__exportStar(require("./sort-order.enum"), exports);
|
|
21
|
-
__exportStar(require("./locale.enum"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CanvasNodeSchema = exports.
|
|
3
|
+
exports.CanvasNodeSchema = exports.CanvasNodeErrorSchema = exports.CanvasNodeOutputSchema = exports.CanvasNodeParamsSchemaByType = exports.CanvasNodeParamsSchema = exports.HtmlGenOutputSchema = exports.VarGenOutputSchema = exports.MotionControlOutputSchema = exports.ColorPaletteOutputSchema = exports.AudioGenSTTOutputSchema = exports.AudioGenTTSOutputSchema = exports.VideoGenOutputSchema = exports.ImageGenOutputSchema = exports.TextGenOutputSchema = exports.VarBlockParamsSchema = exports.NoteParamsSchema = exports.FileBlockParamsSchema = exports.VideoBlockParamsSchema = exports.ImageBlockParamsSchema = exports.TextBlockParamsSchema = exports.HtmlGenParamsSchema = exports.VarGenParamsSchema = exports.MotionControlParamsSchema = exports.ColorPaletteParamsSchema = exports.AudioGenParamsSchema = exports.VideoGenParamsSchema = exports.ImageGenParamsSchema = exports.TextGenParamsSchema = exports.CanvasNodePositionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const strictObject = (shape) => zod_1.z.object(shape).strict();
|
|
@@ -49,7 +49,6 @@ exports.AudioGenParamsSchema = zod_1.z.discriminatedUnion('mode', [
|
|
|
49
49
|
]);
|
|
50
50
|
exports.ColorPaletteParamsSchema = strictObject({
|
|
51
51
|
prompt: zod_1.z.string(),
|
|
52
|
-
colors: zod_1.z.array(zod_1.z.string().regex(/^#[0-9A-Fa-f]{6}$/)).optional(),
|
|
53
52
|
});
|
|
54
53
|
exports.MotionControlParamsSchema = strictObject({
|
|
55
54
|
prompt: zod_1.z.string(),
|
|
@@ -106,7 +105,12 @@ exports.AudioGenSTTOutputSchema = strictObject({
|
|
|
106
105
|
transcript: zod_1.z.string(),
|
|
107
106
|
});
|
|
108
107
|
exports.ColorPaletteOutputSchema = strictObject({
|
|
109
|
-
|
|
108
|
+
paletteName: zod_1.z.string(),
|
|
109
|
+
colors: zod_1.z.array(strictObject({
|
|
110
|
+
hex: zod_1.z.string(),
|
|
111
|
+
name: zod_1.z.string(),
|
|
112
|
+
usage: zod_1.z.string(),
|
|
113
|
+
})),
|
|
110
114
|
});
|
|
111
115
|
exports.MotionControlOutputSchema = strictObject({
|
|
112
116
|
resultUrl: zod_1.z.string(),
|
|
@@ -117,6 +121,22 @@ exports.VarGenOutputSchema = strictObject({
|
|
|
117
121
|
exports.HtmlGenOutputSchema = strictObject({
|
|
118
122
|
html: zod_1.z.string(),
|
|
119
123
|
});
|
|
124
|
+
exports.CanvasNodeParamsSchema = zod_1.z.union([
|
|
125
|
+
exports.TextGenParamsSchema,
|
|
126
|
+
exports.ImageGenParamsSchema,
|
|
127
|
+
exports.VideoGenParamsSchema,
|
|
128
|
+
exports.AudioGenParamsSchema,
|
|
129
|
+
exports.ColorPaletteParamsSchema,
|
|
130
|
+
exports.MotionControlParamsSchema,
|
|
131
|
+
exports.VarGenParamsSchema,
|
|
132
|
+
exports.HtmlGenParamsSchema,
|
|
133
|
+
exports.TextBlockParamsSchema,
|
|
134
|
+
exports.ImageBlockParamsSchema,
|
|
135
|
+
exports.VideoBlockParamsSchema,
|
|
136
|
+
exports.FileBlockParamsSchema,
|
|
137
|
+
exports.NoteParamsSchema,
|
|
138
|
+
exports.VarBlockParamsSchema,
|
|
139
|
+
]);
|
|
120
140
|
exports.CanvasNodeParamsSchemaByType = {
|
|
121
141
|
[constants_1.CANVAS_NODE_TYPE.textGen]: exports.TextGenParamsSchema,
|
|
122
142
|
[constants_1.CANVAS_NODE_TYPE.imageGen]: exports.ImageGenParamsSchema,
|
|
@@ -136,156 +156,33 @@ exports.CanvasNodeParamsSchemaByType = {
|
|
|
136
156
|
[constants_1.CANVAS_NODE_TYPE.varBlock]: exports.VarBlockParamsSchema,
|
|
137
157
|
[constants_1.CANVAS_NODE_TYPE.htmlGen]: exports.HtmlGenParamsSchema,
|
|
138
158
|
};
|
|
139
|
-
exports.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
[constants_1.CANVAS_NODE_TYPE.fileBlock]: exports.FileBlockParamsSchema,
|
|
151
|
-
[constants_1.CANVAS_NODE_TYPE.note]: exports.NoteParamsSchema,
|
|
152
|
-
[constants_1.CANVAS_NODE_TYPE.colorPalette]: exports.ColorPaletteOutputSchema,
|
|
153
|
-
[constants_1.CANVAS_NODE_TYPE.motionControl]: exports.MotionControlOutputSchema,
|
|
154
|
-
[constants_1.CANVAS_NODE_TYPE.varGen]: exports.VarGenOutputSchema,
|
|
155
|
-
[constants_1.CANVAS_NODE_TYPE.varBlock]: exports.VarBlockParamsSchema,
|
|
156
|
-
[constants_1.CANVAS_NODE_TYPE.htmlGen]: exports.HtmlGenOutputSchema,
|
|
157
|
-
};
|
|
159
|
+
exports.CanvasNodeOutputSchema = zod_1.z.union([
|
|
160
|
+
exports.TextGenOutputSchema,
|
|
161
|
+
exports.ImageGenOutputSchema,
|
|
162
|
+
exports.VideoGenOutputSchema,
|
|
163
|
+
exports.AudioGenTTSOutputSchema,
|
|
164
|
+
exports.AudioGenSTTOutputSchema,
|
|
165
|
+
exports.ColorPaletteOutputSchema,
|
|
166
|
+
exports.MotionControlOutputSchema,
|
|
167
|
+
exports.VarGenOutputSchema,
|
|
168
|
+
exports.HtmlGenOutputSchema,
|
|
169
|
+
]);
|
|
158
170
|
exports.CanvasNodeErrorSchema = zod_1.z.object({
|
|
159
171
|
code: zod_1.z.string(),
|
|
160
172
|
message: zod_1.z.string(),
|
|
161
173
|
details: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
162
174
|
retryable: zod_1.z.boolean().optional(),
|
|
163
175
|
});
|
|
164
|
-
|
|
165
|
-
if (params === null || params === undefined) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
const schema = exports.CanvasNodeParamsSchemaByType[nodeDefinitionId];
|
|
169
|
-
const result = schema.safeParse(params);
|
|
170
|
-
if (result.success) {
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
for (const issue of result.error.issues) {
|
|
174
|
-
ctx.addIssue(Object.assign(Object.assign({}, issue), { path: ['params', ...issue.path] }));
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
exports.validateCanvasNodeParamsByType = validateCanvasNodeParamsByType;
|
|
178
|
-
const validateCanvasNodeOutputByType = (nodeDefinitionId, output, ctx) => {
|
|
179
|
-
if (output === null || output === undefined) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
const schema = exports.CanvasNodeOutputSchemaByType[nodeDefinitionId];
|
|
183
|
-
const result = schema.safeParse(output);
|
|
184
|
-
if (result.success) {
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
for (const issue of result.error.issues) {
|
|
188
|
-
ctx.addIssue(Object.assign(Object.assign({}, issue), { path: ['output', ...issue.path] }));
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
exports.validateCanvasNodeOutputByType = validateCanvasNodeOutputByType;
|
|
192
|
-
exports.CanvasNodeBaseSchema = zod_1.z.object({
|
|
176
|
+
exports.CanvasNodeSchema = zod_1.z.object({
|
|
193
177
|
uuid: zod_1.z.string().uuid(),
|
|
194
178
|
canvasId: zod_1.z.string().uuid(),
|
|
195
179
|
nodeDefinitionId: zod_1.z.nativeEnum(constants_1.CANVAS_NODE_TYPE),
|
|
196
180
|
position: exports.CanvasNodePositionSchema,
|
|
197
181
|
status: zod_1.z.nativeEnum(constants_1.NODE_RUN_STATUS),
|
|
198
182
|
toolJobId: zod_1.z.string().uuid().nullable(),
|
|
199
|
-
params:
|
|
200
|
-
output:
|
|
183
|
+
params: exports.CanvasNodeParamsSchema.nullable(),
|
|
184
|
+
output: exports.CanvasNodeOutputSchema.nullable(),
|
|
201
185
|
error: exports.CanvasNodeErrorSchema.nullable(),
|
|
202
186
|
createdAt: zod_1.z.date(),
|
|
203
187
|
updatedAt: zod_1.z.date(),
|
|
204
188
|
});
|
|
205
|
-
exports.CanvasNodeSchema = zod_1.z.discriminatedUnion('nodeDefinitionId', [
|
|
206
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
207
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.textGen),
|
|
208
|
-
params: exports.TextGenParamsSchema.nullable(),
|
|
209
|
-
output: exports.TextGenOutputSchema.nullable(),
|
|
210
|
-
}),
|
|
211
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
212
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.imageGen),
|
|
213
|
-
params: exports.ImageGenParamsSchema.nullable(),
|
|
214
|
-
output: exports.ImageGenOutputSchema.nullable(),
|
|
215
|
-
}),
|
|
216
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
217
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.imageEdit),
|
|
218
|
-
params: exports.ImageGenParamsSchema.nullable(),
|
|
219
|
-
output: exports.ImageGenOutputSchema.nullable(),
|
|
220
|
-
}),
|
|
221
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
222
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.videoGen),
|
|
223
|
-
params: exports.VideoGenParamsSchema.nullable(),
|
|
224
|
-
output: exports.VideoGenOutputSchema.nullable(),
|
|
225
|
-
}),
|
|
226
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
227
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.videoEdit),
|
|
228
|
-
params: exports.VideoGenParamsSchema.nullable(),
|
|
229
|
-
output: exports.VideoGenOutputSchema.nullable(),
|
|
230
|
-
}),
|
|
231
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
232
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.ttsGen),
|
|
233
|
-
params: exports.AudioGenParamsSchema.nullable(),
|
|
234
|
-
output: exports.AudioGenTTSOutputSchema.nullable(),
|
|
235
|
-
}),
|
|
236
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
237
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.sttGen),
|
|
238
|
-
params: exports.AudioGenParamsSchema.nullable(),
|
|
239
|
-
output: exports.AudioGenSTTOutputSchema.nullable(),
|
|
240
|
-
}),
|
|
241
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
242
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.textBlock),
|
|
243
|
-
params: exports.TextBlockParamsSchema.nullable(),
|
|
244
|
-
output: exports.TextBlockParamsSchema.nullable(),
|
|
245
|
-
}),
|
|
246
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
247
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.imageBlock),
|
|
248
|
-
params: exports.ImageBlockParamsSchema.nullable(),
|
|
249
|
-
output: exports.ImageBlockParamsSchema.nullable(),
|
|
250
|
-
}),
|
|
251
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
252
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.videoBlock),
|
|
253
|
-
params: exports.VideoBlockParamsSchema.nullable(),
|
|
254
|
-
output: exports.VideoBlockParamsSchema.nullable(),
|
|
255
|
-
}),
|
|
256
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
257
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.fileBlock),
|
|
258
|
-
params: exports.FileBlockParamsSchema.nullable(),
|
|
259
|
-
output: exports.FileBlockParamsSchema.nullable(),
|
|
260
|
-
}),
|
|
261
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
262
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.note),
|
|
263
|
-
params: exports.NoteParamsSchema.nullable(),
|
|
264
|
-
output: exports.NoteParamsSchema.nullable(),
|
|
265
|
-
}),
|
|
266
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
267
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.colorPalette),
|
|
268
|
-
params: exports.ColorPaletteParamsSchema.nullable(),
|
|
269
|
-
output: exports.ColorPaletteOutputSchema.nullable(),
|
|
270
|
-
}),
|
|
271
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
272
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.motionControl),
|
|
273
|
-
params: exports.MotionControlParamsSchema.nullable(),
|
|
274
|
-
output: exports.MotionControlOutputSchema.nullable(),
|
|
275
|
-
}),
|
|
276
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
277
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.varGen),
|
|
278
|
-
params: exports.VarGenParamsSchema.nullable(),
|
|
279
|
-
output: exports.VarGenOutputSchema.nullable(),
|
|
280
|
-
}),
|
|
281
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
282
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.varBlock),
|
|
283
|
-
params: exports.VarBlockParamsSchema.nullable(),
|
|
284
|
-
output: exports.VarBlockParamsSchema.nullable(),
|
|
285
|
-
}),
|
|
286
|
-
exports.CanvasNodeBaseSchema.extend({
|
|
287
|
-
nodeDefinitionId: zod_1.z.literal(constants_1.CANVAS_NODE_TYPE.htmlGen),
|
|
288
|
-
params: exports.HtmlGenParamsSchema.nullable(),
|
|
289
|
-
output: exports.HtmlGenOutputSchema.nullable(),
|
|
290
|
-
}),
|
|
291
|
-
]);
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CanvasTemplateSchema = exports.
|
|
3
|
+
exports.CanvasTemplateSchema = exports.CanvasTemplateGraphSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const canvas_node_schema_1 = require("./canvas-node.schema");
|
|
7
|
-
const CanvasTemplateGraphNodeSchema = zod_1.z
|
|
8
|
-
.object({
|
|
7
|
+
const CanvasTemplateGraphNodeSchema = zod_1.z.object({
|
|
9
8
|
uuid: zod_1.z.string().trim().min(1),
|
|
10
9
|
nodeDefinitionId: zod_1.z.nativeEnum(constants_1.CANVAS_NODE_TYPE),
|
|
11
10
|
position: canvas_node_schema_1.CanvasNodePositionSchema,
|
|
12
|
-
params:
|
|
13
|
-
})
|
|
14
|
-
.superRefine((node, ctx) => {
|
|
15
|
-
(0, canvas_node_schema_1.validateCanvasNodeParamsByType)(node.nodeDefinitionId, node.params, ctx);
|
|
11
|
+
params: canvas_node_schema_1.CanvasNodeParamsSchema.nullable().optional(),
|
|
16
12
|
});
|
|
17
13
|
const CanvasTemplateGraphEdgeSchema = zod_1.z.object({
|
|
18
14
|
sourceId: zod_1.z.string().trim().min(1),
|
|
@@ -54,25 +50,13 @@ exports.CanvasTemplateGraphSchema = zod_1.z
|
|
|
54
50
|
}
|
|
55
51
|
}
|
|
56
52
|
});
|
|
57
|
-
exports.CanvasTemplateScopeSchema = zod_1.z.enum(['public', 'private']);
|
|
58
|
-
exports.CanvasTemplateTagSchema = zod_1.z.object({
|
|
59
|
-
icons: zod_1.z.object({
|
|
60
|
-
svg: zod_1.z.string(),
|
|
61
|
-
png: zod_1.z.string(),
|
|
62
|
-
}),
|
|
63
|
-
alias: zod_1.z.string().trim().min(1),
|
|
64
|
-
title: zod_1.z.string().trim().min(1),
|
|
65
|
-
});
|
|
66
53
|
exports.CanvasTemplateSchema = zod_1.z.object({
|
|
67
54
|
uuid: zod_1.z.string().uuid(),
|
|
68
55
|
name: zod_1.z.string(),
|
|
69
56
|
description: zod_1.z.string().nullable(),
|
|
70
|
-
|
|
71
|
-
scope: exports.CanvasTemplateScopeSchema,
|
|
72
|
-
ownerUserId: zod_1.z.string().uuid().nullable(),
|
|
73
|
-
prompt: zod_1.z.string().nullable(),
|
|
57
|
+
userId: zod_1.z.string().uuid().nullable(),
|
|
74
58
|
previewImageUrl: zod_1.z.string().url().nullable(),
|
|
75
|
-
tags: zod_1.z.array(
|
|
59
|
+
tags: zod_1.z.array(zod_1.z.string()),
|
|
76
60
|
graph: exports.CanvasTemplateGraphSchema,
|
|
77
61
|
createdAt: zod_1.z.date(),
|
|
78
62
|
updatedAt: zod_1.z.date(),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CategoryTranslationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
6
|
+
exports.CategoryTranslationSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
categoryId: zod_1.z.string().uuid(),
|
|
9
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
10
|
+
name: zod_1.z.string().min(3).max(16384),
|
|
11
|
+
prompt: zod_1.z.nullable(zod_1.z.string().min(3).max(16384)),
|
|
12
|
+
placeholder: zod_1.z.nullable(zod_1.z.string()),
|
|
13
|
+
seoName: zod_1.z.string().min(3).max(16384),
|
|
14
|
+
createdAt: zod_1.z.date(),
|
|
15
|
+
updatedAt: zod_1.z.date(),
|
|
16
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CourseTranslationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
6
|
+
exports.CourseTranslationSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
courseId: zod_1.z.string().uuid(),
|
|
9
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
10
|
+
title: zod_1.z.string(),
|
|
11
|
+
subtitle: zod_1.z.string(),
|
|
12
|
+
prerequisites: zod_1.z.string(),
|
|
13
|
+
description: zod_1.z.string(),
|
|
14
|
+
skills: zod_1.z.array(zod_1.z.string()),
|
|
15
|
+
createdAt: zod_1.z.date(),
|
|
16
|
+
updatedAt: zod_1.z.date(),
|
|
17
|
+
});
|
package/build/models/index.js
CHANGED
|
@@ -24,11 +24,13 @@ __exportStar(require("./canvas-node-definition.schema"), exports);
|
|
|
24
24
|
__exportStar(require("./canvas-node.schema"), exports);
|
|
25
25
|
__exportStar(require("./canvas-edge.schema"), exports);
|
|
26
26
|
__exportStar(require("./category.schema"), exports);
|
|
27
|
+
__exportStar(require("./category-translation.schema"), exports);
|
|
27
28
|
__exportStar(require("./chat-with-messages.schema"), exports);
|
|
28
29
|
__exportStar(require("./chat.schema"), exports);
|
|
29
30
|
__exportStar(require("./cloud-payments-receipt.schema"), exports);
|
|
30
31
|
__exportStar(require("./course-author.schema"), exports);
|
|
31
32
|
__exportStar(require("./course.schema"), exports);
|
|
33
|
+
__exportStar(require("./course-translation.schema"), exports);
|
|
32
34
|
__exportStar(require("./date.schema"), exports);
|
|
33
35
|
__exportStar(require("./feedback.schema"), exports);
|
|
34
36
|
__exportStar(require("./file.schema"), exports);
|
|
@@ -36,19 +38,24 @@ __exportStar(require("./key-value.schema"), exports);
|
|
|
36
38
|
__exportStar(require("./form-submission.schema"), exports);
|
|
37
39
|
__exportStar(require("./icon-variants.schema"), exports);
|
|
38
40
|
__exportStar(require("./lesson.schema"), exports);
|
|
41
|
+
__exportStar(require("./lesson-translation.schema"), exports);
|
|
39
42
|
__exportStar(require("./message.schema"), exports);
|
|
40
43
|
__exportStar(require("./midjourney-job.schema"), exports);
|
|
41
44
|
__exportStar(require("./order.schema"), exports);
|
|
42
45
|
__exportStar(require("./page.schema"), exports);
|
|
46
|
+
__exportStar(require("./page-translation.schema"), exports);
|
|
43
47
|
__exportStar(require("./payment-history-item.schema"), exports);
|
|
44
48
|
__exportStar(require("./payment.schema"), exports);
|
|
45
49
|
__exportStar(require("./invoice-for-payment.schema"), exports);
|
|
46
50
|
__exportStar(require("./post.schema"), exports);
|
|
51
|
+
__exportStar(require("./post-translation.schema"), exports);
|
|
47
52
|
__exportStar(require("./product.schema"), exports);
|
|
48
53
|
__exportStar(require("./promocode.schema"), exports);
|
|
49
54
|
__exportStar(require("./question.schema"), exports);
|
|
55
|
+
__exportStar(require("./question-translation.schema"), exports);
|
|
50
56
|
__exportStar(require("./referral-bonus.schema"), exports);
|
|
51
57
|
__exportStar(require("./section.schema"), exports);
|
|
58
|
+
__exportStar(require("./section-translation.schema"), exports);
|
|
52
59
|
__exportStar(require("./subscription-feature.schema"), exports);
|
|
53
60
|
__exportStar(require("./team-subscription-feature.schema"), exports);
|
|
54
61
|
__exportStar(require("./subscription-upgrade-schema"), exports);
|
|
@@ -67,8 +74,11 @@ __exportStar(require("./utm.schema"), exports);
|
|
|
67
74
|
__exportStar(require("./ui-notification.schema"), exports);
|
|
68
75
|
__exportStar(require("./review.schema"), exports);
|
|
69
76
|
__exportStar(require("./prompt-category.schema"), exports);
|
|
77
|
+
__exportStar(require("./prompt-category-translation.schema"), exports);
|
|
70
78
|
__exportStar(require("./prompt-topic.schema"), exports);
|
|
79
|
+
__exportStar(require("./prompt-topic-translation.schema"), exports);
|
|
71
80
|
__exportStar(require("./prompt.schema"), exports);
|
|
81
|
+
__exportStar(require("./prompt-translation.schema"), exports);
|
|
72
82
|
__exportStar(require("./folder.schema"), exports);
|
|
73
83
|
__exportStar(require("./filters.schema"), exports);
|
|
74
84
|
__exportStar(require("./users-filter-notification.schema"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LessonTranslationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
6
|
+
exports.LessonTranslationSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
lessonId: zod_1.z.string().uuid(),
|
|
9
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
10
|
+
title: zod_1.z.string(),
|
|
11
|
+
createdAt: zod_1.z.date(),
|
|
12
|
+
updatedAt: zod_1.z.date(),
|
|
13
|
+
});
|