@purpleschool/gptbot 0.12.81 → 0.12.82

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.
@@ -7,6 +7,7 @@ var CreatePostTranslationCommand;
7
7
  (function (CreatePostTranslationCommand) {
8
8
  CreatePostTranslationCommand.RequestSchema = models_1.PostTranslationSchema.pick({
9
9
  title: true,
10
+ image: true,
10
11
  content: true,
11
12
  author: true,
12
13
  contentPreview: true,
@@ -5,17 +5,9 @@ const models_1 = require("../../models");
5
5
  const zod_1 = require("zod");
6
6
  var CreatePostCommand;
7
7
  (function (CreatePostCommand) {
8
- CreatePostCommand.RequestSchema = models_1.PostSchema.omit({
9
- uuid: true,
10
- title: true,
11
- author: true,
12
- views: true,
13
- content: true,
14
- contentPreview: true,
15
- metaTitle: true,
16
- metaDescription: true,
17
- createdAt: true,
18
- updatedAt: true,
8
+ CreatePostCommand.RequestSchema = models_1.PostSchema.pick({
9
+ alias: true,
10
+ type: true,
19
11
  });
20
12
  CreatePostCommand.RequestParamSchema = models_1.PostSchema.pick({
21
13
  type: true,
@@ -7,6 +7,7 @@ var UpdatePostTranslationCommand;
7
7
  (function (UpdatePostTranslationCommand) {
8
8
  UpdatePostTranslationCommand.RequestSchema = models_1.PostTranslationSchema.pick({
9
9
  title: true,
10
+ image: true,
10
11
  content: true,
11
12
  author: true,
12
13
  contentPreview: true,
@@ -5,14 +5,12 @@ const zod_1 = require("zod");
5
5
  const models_1 = require("../../models");
6
6
  var CreateCategoryCommand;
7
7
  (function (CreateCategoryCommand) {
8
- CreateCategoryCommand.RequestSchema = models_1.CategorySchema.omit({
9
- uuid: true,
10
- name: true,
11
- prompt: true,
12
- placeholder: true,
13
- seoName: true,
14
- createdAt: true,
15
- updatedAt: true,
8
+ CreateCategoryCommand.RequestSchema = models_1.CategorySchema.pick({
9
+ mainCategoryId: true,
10
+ type: true,
11
+ order: true,
12
+ contentType: true,
13
+ marks: true,
16
14
  });
17
15
  CreateCategoryCommand.ResponseSchema = zod_1.z.object({
18
16
  data: models_1.CategorySchema,
@@ -5,15 +5,11 @@ const zod_1 = require("zod");
5
5
  const models_1 = require("../../models");
6
6
  var CreateCourseCommand;
7
7
  (function (CreateCourseCommand) {
8
- CreateCourseCommand.RequestSchema = models_1.CourseSchema.omit({
9
- uuid: true,
10
- title: true,
11
- subtitle: true,
12
- prerequisites: true,
13
- description: true,
14
- skills: true,
15
- createdAt: true,
16
- updatedAt: true,
8
+ CreateCourseCommand.RequestSchema = models_1.CourseSchema.pick({
9
+ alias: true,
10
+ author: true,
11
+ videoId: true,
12
+ status: true,
17
13
  });
18
14
  CreateCourseCommand.ResponseSchema = zod_1.z.object({
19
15
  data: models_1.CourseSchema,
@@ -6,16 +6,14 @@ const models_1 = require("../../models");
6
6
  const zod_1 = require("zod");
7
7
  var CreatePageCommand;
8
8
  (function (CreatePageCommand) {
9
- CreatePageCommand.RequestSchema = models_1.PageSchema.omit({
10
- uuid: true,
11
- createdAt: true,
12
- updatedAt: true,
13
- metaTitle: true,
14
- metaDescription: true,
15
- title: true,
16
- subTitle: true,
17
- seoTextMd: true,
18
- toolTitle: true,
9
+ CreatePageCommand.RequestSchema = models_1.PageSchema.pick({
10
+ alias: true,
11
+ categoryId: true,
12
+ aIModelId: true,
13
+ toolId: true,
14
+ toolOptionId: true,
15
+ toolModelId: true,
16
+ type: true,
19
17
  })
20
18
  .refine((data) => {
21
19
  if (data.type === constants_1.PageType.AI_MODEL) {
@@ -8,12 +8,8 @@ const zod_1 = __importDefault(require("zod"));
8
8
  const models_1 = require("../../models");
9
9
  var CreatePromptCommand;
10
10
  (function (CreatePromptCommand) {
11
- CreatePromptCommand.RequestSchema = models_1.PromptSchema.omit({
12
- uuid: true,
13
- title: true,
14
- content: true,
15
- createdAt: true,
16
- updatedAt: true,
11
+ CreatePromptCommand.RequestSchema = models_1.PromptSchema.pick({
12
+ topicId: true,
17
13
  });
18
14
  CreatePromptCommand.ResponseSchema = zod_1.default.object({
19
15
  data: models_1.PromptSchema,
@@ -8,13 +8,9 @@ const zod_1 = __importDefault(require("zod"));
8
8
  const models_1 = require("../../models");
9
9
  var CreatePromptCategoryCommand;
10
10
  (function (CreatePromptCategoryCommand) {
11
- CreatePromptCategoryCommand.RequestSchema = models_1.PromptCategorySchema.omit({
12
- uuid: true,
13
- title: true,
14
- metaTitle: true,
15
- metaDescription: true,
16
- createdAt: true,
17
- updatedAt: true,
11
+ CreatePromptCategoryCommand.RequestSchema = models_1.PromptCategorySchema.pick({
12
+ icon: true,
13
+ alias: true,
18
14
  });
19
15
  CreatePromptCategoryCommand.ResponseSchema = zod_1.default.object({
20
16
  data: models_1.PromptCategorySchema,
@@ -8,15 +8,9 @@ const zod_1 = __importDefault(require("zod"));
8
8
  const models_1 = require("../../models");
9
9
  var CreatePromptTopicCommand;
10
10
  (function (CreatePromptTopicCommand) {
11
- CreatePromptTopicCommand.RequestSchema = models_1.PromptTopicSchema.omit({
12
- uuid: true,
13
- title: true,
14
- content: true,
15
- metaTitle: true,
16
- metaDescription: true,
17
- seoText: true,
18
- createdAt: true,
19
- updatedAt: true,
11
+ CreatePromptTopicCommand.RequestSchema = models_1.PromptTopicSchema.pick({
12
+ categoryId: true,
13
+ alias: true,
20
14
  });
21
15
  CreatePromptTopicCommand.ResponseSchema = zod_1.default.object({
22
16
  data: models_1.PromptTopicSchema,
@@ -5,12 +5,8 @@ const zod_1 = require("zod");
5
5
  const models_1 = require("../../models");
6
6
  var CreateQuestionCommand;
7
7
  (function (CreateQuestionCommand) {
8
- CreateQuestionCommand.RequestSchema = models_1.QuestionSchema.omit({
9
- uuid: true,
10
- createdAt: true,
11
- updatedAt: true,
12
- question: true,
13
- answer: true,
8
+ CreateQuestionCommand.RequestSchema = models_1.QuestionSchema.pick({
9
+ pageId: true,
14
10
  });
15
11
  CreateQuestionCommand.ResponseSchema = zod_1.z.object({
16
12
  data: models_1.QuestionSchema,
@@ -8,6 +8,7 @@ exports.PostTranslationSchema = zod_1.z.object({
8
8
  postId: zod_1.z.string().uuid(),
9
9
  locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
10
10
  title: zod_1.z.string(),
11
+ image: zod_1.z.nullable(zod_1.z.string()),
11
12
  content: zod_1.z.string(),
12
13
  author: zod_1.z.string(),
13
14
  contentPreview: zod_1.z.nullable(zod_1.z.string()),
@@ -7,7 +7,7 @@ exports.PostSchema = zod_1.z.object({
7
7
  uuid: zod_1.z.string().uuid(),
8
8
  title: zod_1.z.string(),
9
9
  alias: zod_1.z.string(),
10
- image: zod_1.z.string(),
10
+ image: zod_1.z.nullable(zod_1.z.string()),
11
11
  content: zod_1.z.string(),
12
12
  author: zod_1.z.string(),
13
13
  contentPreview: zod_1.z.nullable(zod_1.z.string()),
@@ -4,6 +4,7 @@ import { z } from 'zod';
4
4
  export namespace CreatePostTranslationCommand {
5
5
  export const RequestSchema = PostTranslationSchema.pick({
6
6
  title: true,
7
+ image: true,
7
8
  content: true,
8
9
  author: true,
9
10
  contentPreview: true,
@@ -2,17 +2,9 @@ import { PostSchema } from '../../models';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export namespace CreatePostCommand {
5
- export const RequestSchema = PostSchema.omit({
6
- uuid: true,
7
- title: true,
8
- author: true,
9
- views: true,
10
- content: true,
11
- contentPreview: true,
12
- metaTitle: true,
13
- metaDescription: true,
14
- createdAt: true,
15
- updatedAt: true,
5
+ export const RequestSchema = PostSchema.pick({
6
+ alias: true,
7
+ type: true,
16
8
  });
17
9
  export type Request = z.infer<typeof RequestSchema>;
18
10
 
@@ -4,6 +4,7 @@ import { z } from 'zod';
4
4
  export namespace UpdatePostTranslationCommand {
5
5
  export const RequestSchema = PostTranslationSchema.pick({
6
6
  title: true,
7
+ image: true,
7
8
  content: true,
8
9
  author: true,
9
10
  contentPreview: true,
@@ -2,14 +2,12 @@ import { z } from 'zod';
2
2
  import { CategorySchema } from '../../models';
3
3
 
4
4
  export namespace CreateCategoryCommand {
5
- export const RequestSchema = CategorySchema.omit({
6
- uuid: true,
7
- name: true,
8
- prompt: true,
9
- placeholder: true,
10
- seoName: true,
11
- createdAt: true,
12
- updatedAt: true,
5
+ export const RequestSchema = CategorySchema.pick({
6
+ mainCategoryId: true,
7
+ type: true,
8
+ order: true,
9
+ contentType: true,
10
+ marks: true,
13
11
  });
14
12
 
15
13
  export type Request = z.infer<typeof RequestSchema>;
@@ -2,15 +2,11 @@ import { z } from 'zod';
2
2
  import { CourseSchema } from '../../models';
3
3
 
4
4
  export namespace CreateCourseCommand {
5
- export const RequestSchema = CourseSchema.omit({
6
- uuid: true,
7
- title: true,
8
- subtitle: true,
9
- prerequisites: true,
10
- description: true,
11
- skills: true,
12
- createdAt: true,
13
- updatedAt: true,
5
+ export const RequestSchema = CourseSchema.pick({
6
+ alias: true,
7
+ author: true,
8
+ videoId: true,
9
+ status: true,
14
10
  });
15
11
 
16
12
  export type Request = z.infer<typeof RequestSchema>;
@@ -3,16 +3,14 @@ import { PageSchema } from '../../models';
3
3
  import { z } from 'zod';
4
4
 
5
5
  export namespace CreatePageCommand {
6
- export const RequestSchema = PageSchema.omit({
7
- uuid: true,
8
- createdAt: true,
9
- updatedAt: true,
10
- metaTitle: true,
11
- metaDescription: true,
12
- title: true,
13
- subTitle: true,
14
- seoTextMd: true,
15
- toolTitle: true,
6
+ export const RequestSchema = PageSchema.pick({
7
+ alias: true,
8
+ categoryId: true,
9
+ aIModelId: true,
10
+ toolId: true,
11
+ toolOptionId: true,
12
+ toolModelId: true,
13
+ type: true,
16
14
  })
17
15
  .refine(
18
16
  (data) => {
@@ -2,12 +2,8 @@ import z from 'zod';
2
2
  import { PromptSchema } from '../../models';
3
3
 
4
4
  export namespace CreatePromptCommand {
5
- export const RequestSchema = PromptSchema.omit({
6
- uuid: true,
7
- title: true,
8
- content: true,
9
- createdAt: true,
10
- updatedAt: true,
5
+ export const RequestSchema = PromptSchema.pick({
6
+ topicId: true,
11
7
  });
12
8
 
13
9
  export type Request = z.infer<typeof RequestSchema>;
@@ -2,13 +2,9 @@ import z from 'zod';
2
2
  import { PromptCategorySchema } from '../../models';
3
3
 
4
4
  export namespace CreatePromptCategoryCommand {
5
- export const RequestSchema = PromptCategorySchema.omit({
6
- uuid: true,
7
- title: true,
8
- metaTitle: true,
9
- metaDescription: true,
10
- createdAt: true,
11
- updatedAt: true,
5
+ export const RequestSchema = PromptCategorySchema.pick({
6
+ icon: true,
7
+ alias: true,
12
8
  });
13
9
 
14
10
  export type Request = z.infer<typeof RequestSchema>;
@@ -2,15 +2,9 @@ import z from 'zod';
2
2
  import { PromptTopicSchema } from '../../models';
3
3
 
4
4
  export namespace CreatePromptTopicCommand {
5
- export const RequestSchema = PromptTopicSchema.omit({
6
- uuid: true,
7
- title: true,
8
- content: true,
9
- metaTitle: true,
10
- metaDescription: true,
11
- seoText: true,
12
- createdAt: true,
13
- updatedAt: true,
5
+ export const RequestSchema = PromptTopicSchema.pick({
6
+ categoryId: true,
7
+ alias: true,
14
8
  });
15
9
 
16
10
  export type Request = z.infer<typeof RequestSchema>;
@@ -2,12 +2,8 @@ import { z } from 'zod';
2
2
  import { QuestionSchema } from '../../models';
3
3
 
4
4
  export namespace CreateQuestionCommand {
5
- export const RequestSchema = QuestionSchema.omit({
6
- uuid: true,
7
- createdAt: true,
8
- updatedAt: true,
9
- question: true,
10
- answer: true,
5
+ export const RequestSchema = QuestionSchema.pick({
6
+ pageId: true,
11
7
  });
12
8
 
13
9
  export type Request = z.infer<typeof RequestSchema>;
@@ -6,6 +6,7 @@ export const PostTranslationSchema = z.object({
6
6
  postId: z.string().uuid(),
7
7
  locale: z.nativeEnum(LOCALE),
8
8
  title: z.string(),
9
+ image: z.nullable(z.string()),
9
10
  content: z.string(),
10
11
  author: z.string(),
11
12
  contentPreview: z.nullable(z.string()),
@@ -5,7 +5,7 @@ export const PostSchema = z.object({
5
5
  uuid: z.string().uuid(),
6
6
  title: z.string(),
7
7
  alias: z.string(),
8
- image: z.string(),
8
+ image: z.nullable(z.string()),
9
9
  content: z.string(),
10
10
  author: z.string(),
11
11
  contentPreview: z.nullable(z.string()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.12.81",
3
+ "version": "0.12.82",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",