@purpleschool/gptbot 0.12.1 → 0.12.2-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 +2 -0
- package/api/controllers/http/category.ts +2 -0
- package/api/controllers/http/course.ts +8 -0
- package/api/controllers/http/page.ts +2 -0
- package/api/controllers/http/prompt-category.ts +2 -0
- package/api/controllers/http/prompt-topic.ts +2 -0
- package/api/controllers/http/prompt.ts +2 -0
- package/api/controllers/http/question.ts +2 -0
- package/api/routes.ts +44 -0
- package/build/api/controllers/http/blog.js +2 -0
- package/build/api/controllers/http/category.js +2 -0
- package/build/api/controllers/http/course.js +6 -0
- package/build/api/controllers/http/page.js +2 -0
- package/build/api/controllers/http/prompt-category.js +2 -0
- package/build/api/controllers/http/prompt-topic.js +2 -0
- package/build/api/controllers/http/prompt.js +2 -0
- package/build/api/controllers/http/question.js +2 -0
- package/build/api/routes.js +22 -0
- package/build/commands/blog/create-post-translation.command.js +25 -0
- package/build/commands/blog/create-post.command.js +6 -0
- package/build/commands/blog/index.js +2 -0
- package/build/commands/blog/update-post-translation.command.js +24 -0
- package/build/commands/blog/update-post.command.js +6 -0
- package/build/commands/category/create-category-translation.command.js +23 -0
- package/build/commands/category/create-category.command.js +4 -0
- package/build/commands/category/index.js +2 -0
- package/build/commands/category/update-category-translation.command.js +22 -0
- package/build/commands/category/update-category.command.js +4 -0
- package/build/commands/course/create-course-translation.command.js +24 -0
- package/build/commands/course/create-course.command.js +5 -0
- package/build/commands/course/create-lesson-translation.command.js +20 -0
- package/build/commands/course/create-section-translation.command.js +20 -0
- package/build/commands/course/index.js +6 -0
- package/build/commands/course/update-course-translation.command.js +23 -0
- package/build/commands/course/update-lesson-translation.command.js +19 -0
- package/build/commands/course/update-section-translation.command.js +19 -0
- package/build/commands/page/create-page-translation.command.js +24 -0
- package/build/commands/page/create-page.command.js +5 -0
- package/build/commands/page/index.js +2 -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 +21 -0
- package/build/commands/prompt/create-prompt.command.js +2 -0
- package/build/commands/prompt/index.js +2 -0
- package/build/commands/prompt/update-prompt-translation.command.js +20 -0
- package/build/commands/prompt/update-prompt.command.js +2 -0
- package/build/commands/prompt-category/create-prompt-category-translation.command.js +22 -0
- package/build/commands/prompt-category/create-prompt-category.command.js +3 -0
- package/build/commands/prompt-category/index.js +2 -0
- package/build/commands/prompt-category/update-prompt-category-translation.command.js +21 -0
- package/build/commands/prompt-category/update-prompt-category.command.js +3 -0
- package/build/commands/prompt-topic/create-prompt-topic-translation.command.js +24 -0
- package/build/commands/prompt-topic/create-prompt-topic.command.js +5 -0
- package/build/commands/prompt-topic/index.js +2 -0
- package/build/commands/prompt-topic/update-prompt-topic-translation.command.js +23 -0
- package/build/commands/prompt-topic/update-prompt-topic.command.js +5 -0
- package/build/commands/question/create-question-translation.command.js +21 -0
- package/build/commands/question/create-question.command.js +2 -0
- package/build/commands/question/index.js +2 -0
- package/build/commands/question/update-question-translation.command.js +20 -0
- package/build/commands/question/update-question.command.js +2 -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/user/enums/index.js +0 -1
- package/build/models/user.schema.js +2 -2
- package/commands/blog/create-post-translation.command.ts +30 -0
- package/commands/blog/create-post.command.ts +6 -0
- package/commands/blog/index.ts +2 -0
- package/commands/blog/update-post-translation.command.ts +29 -0
- package/commands/blog/update-post.command.ts +6 -0
- package/commands/category/create-category-translation.command.ts +28 -0
- package/commands/category/create-category.command.ts +4 -0
- package/commands/category/index.ts +2 -0
- package/commands/category/update-category-translation.command.ts +27 -0
- package/commands/category/update-category.command.ts +4 -0
- package/commands/course/create-course-translation.command.ts +29 -0
- package/commands/course/create-course.command.ts +5 -0
- package/commands/course/create-lesson-translation.command.ts +25 -0
- package/commands/course/create-section-translation.command.ts +25 -0
- package/commands/course/index.ts +6 -0
- package/commands/course/update-course-translation.command.ts +28 -0
- package/commands/course/update-lesson-translation.command.ts +24 -0
- package/commands/course/update-section-translation.command.ts +24 -0
- package/commands/page/create-page-translation.command.ts +29 -0
- package/commands/page/create-page.command.ts +5 -0
- package/commands/page/index.ts +2 -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 +26 -0
- package/commands/prompt/create-prompt.command.ts +2 -0
- package/commands/prompt/index.ts +2 -0
- package/commands/prompt/update-prompt-translation.command.ts +25 -0
- package/commands/prompt/update-prompt.command.ts +2 -0
- package/commands/prompt-category/create-prompt-category-translation.command.ts +27 -0
- package/commands/prompt-category/create-prompt-category.command.ts +3 -0
- package/commands/prompt-category/index.ts +2 -0
- package/commands/prompt-category/update-prompt-category-translation.command.ts +26 -0
- package/commands/prompt-category/update-prompt-category.command.ts +3 -0
- package/commands/prompt-topic/create-prompt-topic-translation.command.ts +29 -0
- package/commands/prompt-topic/create-prompt-topic.command.ts +5 -0
- package/commands/prompt-topic/index.ts +2 -0
- package/commands/prompt-topic/update-prompt-topic-translation.command.ts +28 -0
- package/commands/prompt-topic/update-prompt-topic.command.ts +5 -0
- package/commands/question/create-question-translation.command.ts +26 -0
- package/commands/question/create-question.command.ts +2 -0
- package/commands/question/index.ts +2 -0
- package/commands/question/update-question-translation.command.ts +25 -0
- package/commands/question/update-question.command.ts +2 -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/user/enums/index.ts +0 -1
- package/models/user.schema.ts +1 -1
- package/package.json +2 -1
- package/build/constants/user/enums/locale.enum.js +0 -8
- package/constants/user/enums/locale.enum.ts +0 -4
|
@@ -4,6 +4,11 @@ import { PromptTopicSchema } from '../../models';
|
|
|
4
4
|
export namespace UpdatePromptTopicCommand {
|
|
5
5
|
export const RequestSchema = PromptTopicSchema.omit({
|
|
6
6
|
uuid: true,
|
|
7
|
+
title: true,
|
|
8
|
+
content: true,
|
|
9
|
+
metaTitle: true,
|
|
10
|
+
metaDescription: true,
|
|
11
|
+
seoText: true,
|
|
7
12
|
createdAt: true,
|
|
8
13
|
updatedAt: true,
|
|
9
14
|
}).partial();
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { QuestionSchema } from '../../models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
4
|
+
|
|
5
|
+
export namespace CreateQuestionTranslationCommand {
|
|
6
|
+
export const RequestSchema = QuestionSchema.pick({
|
|
7
|
+
question: true,
|
|
8
|
+
answer: true,
|
|
9
|
+
}).extend({
|
|
10
|
+
locale: z.nativeEnum(LOCALE),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
14
|
+
|
|
15
|
+
export const RequestParamSchema = z.object({
|
|
16
|
+
uuid: z.string().uuid(),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
20
|
+
|
|
21
|
+
export const ResponseSchema = z.object({
|
|
22
|
+
data: QuestionSchema,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
26
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from './create-question.command';
|
|
2
|
+
export * from './create-question-translation.command';
|
|
2
3
|
export * from './delete-question.command';
|
|
3
4
|
export * from './find-question.command';
|
|
4
5
|
export * from './update-question.command';
|
|
6
|
+
export * from './update-question-translation.command';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { QuestionSchema } from '../../models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateQuestionTranslationCommand {
|
|
6
|
+
export const RequestSchema = QuestionSchema.pick({
|
|
7
|
+
question: true,
|
|
8
|
+
answer: true,
|
|
9
|
+
}).partial();
|
|
10
|
+
|
|
11
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
|
|
13
|
+
export const RequestParamSchema = z.object({
|
|
14
|
+
uuid: z.string().uuid(),
|
|
15
|
+
locale: z.nativeEnum(LOCALE),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
19
|
+
|
|
20
|
+
export const ResponseSchema = z.object({
|
|
21
|
+
data: QuestionSchema,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
25
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ROLE, SIGNUP_METHOD, USER_STATUS } from '../../constants';
|
|
3
3
|
import { UserProfileResponseSchema } from '../../models';
|
|
4
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
4
5
|
|
|
5
6
|
export namespace GetMeCommand {
|
|
6
7
|
export const RequestSchema = z.object({});
|
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.2-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.18",
|
|
15
16
|
"zod": "^3.25.67"
|
|
16
17
|
}
|
|
17
18
|
}
|