@purpleschool/gptbot 0.12.39 → 0.12.40-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/category.ts +4 -0
- package/api/controllers/http/chat-private.ts +0 -1
- package/api/controllers/http/chat-public.ts +0 -1
- package/api/controllers/http/course.ts +12 -0
- 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 -2
- package/build/api/controllers/http/blog.js +3 -0
- package/build/api/controllers/http/category.js +3 -0
- package/build/api/controllers/http/chat-private.js +0 -1
- package/build/api/controllers/http/chat-public.js +0 -1
- package/build/api/controllers/http/course.js +9 -0
- 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 -2
- 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/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/chat/index.js +0 -1
- 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/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/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/constants/cabinet/enums/index.js +1 -0
- package/build/constants/cabinet/enums/statistics-request-type.enum.js +22 -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/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/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/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/chat/index.ts +0 -1
- 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/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/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/constants/cabinet/enums/index.ts +1 -0
- package/constants/cabinet/enums/statistics-request-type.enum.ts +18 -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/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/user.schema.ts +1 -1
- package/package.json +2 -1
- package/build/commands/chat/calculate-chat-price.command.js +0 -18
- package/build/constants/tool/enums/job-request-origin.enum.js +0 -8
- package/build/constants/user/enums/locale.enum.js +0 -8
- package/commands/chat/calculate-chat-price.command.ts +0 -19
- package/constants/tool/enums/job-request-origin.enum.ts +0 -4
- package/constants/user/enums/locale.enum.ts +0 -4
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from './tool-content-type.enum';
|
|
2
2
|
export * from './tool-group.enum';
|
|
3
3
|
export * from './tool-job-status.enum';
|
|
4
|
-
export * from './job-request-origin.enum';
|
|
5
4
|
export * from './tool-type.enum';
|
|
6
5
|
export * from './tool-workspace-item-slot.enum';
|
|
7
6
|
export * from './tool-workspace-status.enum';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
|
+
|
|
4
|
+
export const CategoryTranslationSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
categoryId: z.string().uuid(),
|
|
7
|
+
locale: z.nativeEnum(LOCALE),
|
|
8
|
+
name: z.string().min(3).max(16384),
|
|
9
|
+
prompt: z.nullable(z.string().min(3).max(16384)),
|
|
10
|
+
placeholder: z.nullable(z.string()),
|
|
11
|
+
seoName: z.string().min(3).max(16384),
|
|
12
|
+
createdAt: z.date(),
|
|
13
|
+
updatedAt: z.date(),
|
|
14
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
|
+
|
|
4
|
+
export const CourseTranslationSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
courseId: z.string().uuid(),
|
|
7
|
+
locale: z.nativeEnum(LOCALE),
|
|
8
|
+
title: z.string(),
|
|
9
|
+
subtitle: z.string(),
|
|
10
|
+
prerequisites: z.string(),
|
|
11
|
+
description: z.string(),
|
|
12
|
+
skills: z.array(z.string()),
|
|
13
|
+
createdAt: z.date(),
|
|
14
|
+
updatedAt: z.date(),
|
|
15
|
+
});
|
package/models/index.ts
CHANGED
|
@@ -4,11 +4,13 @@ export * from './ai-model-formatted.schema';
|
|
|
4
4
|
export * from './ai-model.schema';
|
|
5
5
|
export * from './ai-vendor.schema';
|
|
6
6
|
export * from './category.schema';
|
|
7
|
+
export * from './category-translation.schema';
|
|
7
8
|
export * from './chat-with-messages.schema';
|
|
8
9
|
export * from './chat.schema';
|
|
9
10
|
export * from './cloud-payments-receipt.schema';
|
|
10
11
|
export * from './course-author.schema';
|
|
11
12
|
export * from './course.schema';
|
|
13
|
+
export * from './course-translation.schema';
|
|
12
14
|
export * from './date.schema';
|
|
13
15
|
export * from './feedback.schema';
|
|
14
16
|
export * from './file.schema';
|
|
@@ -16,19 +18,24 @@ export * from './key-value.schema';
|
|
|
16
18
|
export * from './form-submission.schema';
|
|
17
19
|
export * from './icon-variants.schema';
|
|
18
20
|
export * from './lesson.schema';
|
|
21
|
+
export * from './lesson-translation.schema';
|
|
19
22
|
export * from './message.schema';
|
|
20
23
|
export * from './midjourney-job.schema';
|
|
21
24
|
export * from './order.schema';
|
|
22
25
|
export * from './page.schema';
|
|
26
|
+
export * from './page-translation.schema';
|
|
23
27
|
export * from './payment-history-item.schema';
|
|
24
28
|
export * from './payment.schema';
|
|
25
29
|
export * from './invoice-for-payment.schema';
|
|
26
30
|
export * from './post.schema';
|
|
31
|
+
export * from './post-translation.schema';
|
|
27
32
|
export * from './product.schema';
|
|
28
33
|
export * from './promocode.schema';
|
|
29
34
|
export * from './question.schema';
|
|
35
|
+
export * from './question-translation.schema';
|
|
30
36
|
export * from './referral-bonus.schema';
|
|
31
37
|
export * from './section.schema';
|
|
38
|
+
export * from './section-translation.schema';
|
|
32
39
|
export * from './subscription-feature.schema';
|
|
33
40
|
export * from './team-subscription-feature.schema';
|
|
34
41
|
export * from './subscription-upgrade-schema';
|
|
@@ -47,8 +54,11 @@ export * from './utm.schema';
|
|
|
47
54
|
export * from './ui-notification.schema';
|
|
48
55
|
export * from './review.schema';
|
|
49
56
|
export * from './prompt-category.schema';
|
|
57
|
+
export * from './prompt-category-translation.schema';
|
|
50
58
|
export * from './prompt-topic.schema';
|
|
59
|
+
export * from './prompt-topic-translation.schema';
|
|
51
60
|
export * from './prompt.schema';
|
|
61
|
+
export * from './prompt-translation.schema';
|
|
52
62
|
export * from './folder.schema';
|
|
53
63
|
export * from './filters.schema';
|
|
54
64
|
export * from './users-filter-notification.schema';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
|
+
|
|
4
|
+
export const LessonTranslationSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
lessonId: z.string().uuid(),
|
|
7
|
+
locale: z.nativeEnum(LOCALE),
|
|
8
|
+
title: z.string(),
|
|
9
|
+
createdAt: z.date(),
|
|
10
|
+
updatedAt: z.date(),
|
|
11
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
|
+
|
|
4
|
+
export const PageTranslationSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
pageId: z.string().uuid(),
|
|
7
|
+
locale: z.nativeEnum(LOCALE),
|
|
8
|
+
metaTitle: z.string().min(3).max(16384),
|
|
9
|
+
metaDescription: z.string().min(3).max(16384),
|
|
10
|
+
title: z.string().min(3).max(16384),
|
|
11
|
+
subTitle: z.string().min(3).max(16384),
|
|
12
|
+
seoTextMd: z.string().min(3).max(16384),
|
|
13
|
+
toolTitle: z.string().nullable(),
|
|
14
|
+
createdAt: z.date(),
|
|
15
|
+
updatedAt: z.date(),
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
|
+
|
|
4
|
+
export const PostTranslationSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
postId: z.string().uuid(),
|
|
7
|
+
locale: z.nativeEnum(LOCALE),
|
|
8
|
+
title: z.string(),
|
|
9
|
+
content: z.string(),
|
|
10
|
+
author: z.string(),
|
|
11
|
+
contentPreview: z.nullable(z.string()),
|
|
12
|
+
metaTitle: z.nullable(z.string()),
|
|
13
|
+
metaDescription: z.nullable(z.string()),
|
|
14
|
+
createdAt: z.date(),
|
|
15
|
+
updatedAt: z.date(),
|
|
16
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
|
+
|
|
4
|
+
export const PromptCategoryTranslationSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
promptCategoryId: z.string().uuid(),
|
|
7
|
+
locale: z.nativeEnum(LOCALE),
|
|
8
|
+
title: z.string(),
|
|
9
|
+
metaTitle: z.string().nullable(),
|
|
10
|
+
metaDescription: z.string().nullable(),
|
|
11
|
+
createdAt: z.date(),
|
|
12
|
+
updatedAt: z.date(),
|
|
13
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
|
+
|
|
4
|
+
export const PromptTopicTranslationSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
promptTopicId: z.string().uuid(),
|
|
7
|
+
locale: z.nativeEnum(LOCALE),
|
|
8
|
+
title: z.string(),
|
|
9
|
+
content: z.string(),
|
|
10
|
+
metaTitle: z.string().nullable(),
|
|
11
|
+
metaDescription: z.string().nullable(),
|
|
12
|
+
seoText: z.string().nullable(),
|
|
13
|
+
createdAt: z.date(),
|
|
14
|
+
updatedAt: z.date(),
|
|
15
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
|
+
|
|
4
|
+
export const PromptTranslationSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
promptId: z.string().uuid(),
|
|
7
|
+
locale: z.nativeEnum(LOCALE),
|
|
8
|
+
title: z.string().nullable(),
|
|
9
|
+
content: z.string(),
|
|
10
|
+
createdAt: z.date(),
|
|
11
|
+
updatedAt: z.date(),
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
|
+
|
|
4
|
+
export const QuestionTranslationSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
questionId: z.string().uuid(),
|
|
7
|
+
locale: z.nativeEnum(LOCALE),
|
|
8
|
+
question: z.string().min(3).max(16384),
|
|
9
|
+
answer: z.string().min(3).max(16384),
|
|
10
|
+
createdAt: z.date(),
|
|
11
|
+
updatedAt: z.date(),
|
|
12
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
3
|
+
|
|
4
|
+
export const SectionTranslationSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
sectionId: z.string().uuid(),
|
|
7
|
+
locale: z.nativeEnum(LOCALE),
|
|
8
|
+
title: z.string(),
|
|
9
|
+
createdAt: z.date(),
|
|
10
|
+
updatedAt: z.date(),
|
|
11
|
+
});
|
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 '@purpleschool/rugpt-lib-common';
|
|
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.40-stage-2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"author": "",
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@purpleschool/rugpt-lib-common": "^0.0.21",
|
|
15
16
|
"zod": "^3.25.67"
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CalculateChatPriceCommand = void 0;
|
|
4
|
-
const constants_1 = require("../../constants");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
var CalculateChatPriceCommand;
|
|
7
|
-
(function (CalculateChatPriceCommand) {
|
|
8
|
-
CalculateChatPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
text: zod_1.z.string(),
|
|
10
|
-
chatId: zod_1.z.string().uuid().optional(),
|
|
11
|
-
aiModelId: zod_1.z.string().uuid(),
|
|
12
|
-
files: zod_1.z.array(zod_1.z.string().uuid()).optional().default([]),
|
|
13
|
-
features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)).optional().default([]),
|
|
14
|
-
});
|
|
15
|
-
CalculateChatPriceCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
-
price: zod_1.z.number(),
|
|
17
|
-
});
|
|
18
|
-
})(CalculateChatPriceCommand || (exports.CalculateChatPriceCommand = CalculateChatPriceCommand = {}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JOB_REQUEST_ORIGIN = void 0;
|
|
4
|
-
var JOB_REQUEST_ORIGIN;
|
|
5
|
-
(function (JOB_REQUEST_ORIGIN) {
|
|
6
|
-
JOB_REQUEST_ORIGIN["API"] = "api";
|
|
7
|
-
JOB_REQUEST_ORIGIN["B2B"] = "b2b";
|
|
8
|
-
})(JOB_REQUEST_ORIGIN || (exports.JOB_REQUEST_ORIGIN = JOB_REQUEST_ORIGIN = {}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AI_MODEL_FEATURE } from '../../constants';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
export namespace CalculateChatPriceCommand {
|
|
5
|
-
export const RequestSchema = z.object({
|
|
6
|
-
text: z.string(),
|
|
7
|
-
chatId: z.string().uuid().optional(),
|
|
8
|
-
aiModelId: z.string().uuid(),
|
|
9
|
-
files: z.array(z.string().uuid()).optional().default([]),
|
|
10
|
-
features: z.array(z.nativeEnum(AI_MODEL_FEATURE)).optional().default([]),
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export const ResponseSchema = z.object({
|
|
14
|
-
price: z.number(),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
18
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
-
}
|