@purpleschool/gptbot 0.12.0 → 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.
Files changed (123) hide show
  1. package/api/controllers/http/blog.ts +2 -0
  2. package/api/controllers/http/category.ts +2 -0
  3. package/api/controllers/http/course.ts +8 -0
  4. package/api/controllers/http/page.ts +2 -0
  5. package/api/controllers/http/prompt-category.ts +2 -0
  6. package/api/controllers/http/prompt-topic.ts +2 -0
  7. package/api/controllers/http/prompt.ts +2 -0
  8. package/api/controllers/http/question.ts +2 -0
  9. package/api/controllers/http/team-account.ts +1 -0
  10. package/api/routes.ts +46 -0
  11. package/build/api/controllers/http/blog.js +2 -0
  12. package/build/api/controllers/http/category.js +2 -0
  13. package/build/api/controllers/http/course.js +6 -0
  14. package/build/api/controllers/http/page.js +2 -0
  15. package/build/api/controllers/http/prompt-category.js +2 -0
  16. package/build/api/controllers/http/prompt-topic.js +2 -0
  17. package/build/api/controllers/http/prompt.js +2 -0
  18. package/build/api/controllers/http/question.js +2 -0
  19. package/build/api/controllers/http/team-account.js +1 -0
  20. package/build/api/routes.js +23 -0
  21. package/build/commands/blog/create-post-translation.command.js +25 -0
  22. package/build/commands/blog/create-post.command.js +6 -0
  23. package/build/commands/blog/index.js +2 -0
  24. package/build/commands/blog/update-post-translation.command.js +24 -0
  25. package/build/commands/blog/update-post.command.js +6 -0
  26. package/build/commands/category/create-category-translation.command.js +23 -0
  27. package/build/commands/category/create-category.command.js +4 -0
  28. package/build/commands/category/index.js +2 -0
  29. package/build/commands/category/update-category-translation.command.js +22 -0
  30. package/build/commands/category/update-category.command.js +4 -0
  31. package/build/commands/course/create-course-translation.command.js +24 -0
  32. package/build/commands/course/create-course.command.js +5 -0
  33. package/build/commands/course/create-lesson-translation.command.js +20 -0
  34. package/build/commands/course/create-section-translation.command.js +20 -0
  35. package/build/commands/course/index.js +6 -0
  36. package/build/commands/course/update-course-translation.command.js +23 -0
  37. package/build/commands/course/update-lesson-translation.command.js +19 -0
  38. package/build/commands/course/update-section-translation.command.js +19 -0
  39. package/build/commands/page/create-page-translation.command.js +24 -0
  40. package/build/commands/page/create-page.command.js +5 -0
  41. package/build/commands/page/index.js +2 -0
  42. package/build/commands/page/update-page-translation.command.js +23 -0
  43. package/build/commands/page/update-page.command.js +5 -0
  44. package/build/commands/prompt/create-prompt-translation.command.js +21 -0
  45. package/build/commands/prompt/create-prompt.command.js +2 -0
  46. package/build/commands/prompt/index.js +2 -0
  47. package/build/commands/prompt/update-prompt-translation.command.js +20 -0
  48. package/build/commands/prompt/update-prompt.command.js +2 -0
  49. package/build/commands/prompt-category/create-prompt-category-translation.command.js +22 -0
  50. package/build/commands/prompt-category/create-prompt-category.command.js +3 -0
  51. package/build/commands/prompt-category/index.js +2 -0
  52. package/build/commands/prompt-category/update-prompt-category-translation.command.js +21 -0
  53. package/build/commands/prompt-category/update-prompt-category.command.js +3 -0
  54. package/build/commands/prompt-topic/create-prompt-topic-translation.command.js +24 -0
  55. package/build/commands/prompt-topic/create-prompt-topic.command.js +5 -0
  56. package/build/commands/prompt-topic/index.js +2 -0
  57. package/build/commands/prompt-topic/update-prompt-topic-translation.command.js +23 -0
  58. package/build/commands/prompt-topic/update-prompt-topic.command.js +5 -0
  59. package/build/commands/question/create-question-translation.command.js +21 -0
  60. package/build/commands/question/create-question.command.js +2 -0
  61. package/build/commands/question/index.js +2 -0
  62. package/build/commands/question/update-question-translation.command.js +20 -0
  63. package/build/commands/question/update-question.command.js +2 -0
  64. package/build/commands/team-account/index.js +1 -0
  65. package/build/commands/team-account/update-team-account-invite.command.js +17 -0
  66. package/build/commands/unregistered-user/patch-locale.command.js +3 -3
  67. package/build/commands/user/get-me.command.js +2 -1
  68. package/build/commands/user/patch-locale.command.js +3 -3
  69. package/build/constants/user/enums/index.js +0 -1
  70. package/build/models/user.schema.js +2 -2
  71. package/commands/blog/create-post-translation.command.ts +30 -0
  72. package/commands/blog/create-post.command.ts +6 -0
  73. package/commands/blog/index.ts +2 -0
  74. package/commands/blog/update-post-translation.command.ts +29 -0
  75. package/commands/blog/update-post.command.ts +6 -0
  76. package/commands/category/create-category-translation.command.ts +28 -0
  77. package/commands/category/create-category.command.ts +4 -0
  78. package/commands/category/index.ts +2 -0
  79. package/commands/category/update-category-translation.command.ts +27 -0
  80. package/commands/category/update-category.command.ts +4 -0
  81. package/commands/course/create-course-translation.command.ts +29 -0
  82. package/commands/course/create-course.command.ts +5 -0
  83. package/commands/course/create-lesson-translation.command.ts +25 -0
  84. package/commands/course/create-section-translation.command.ts +25 -0
  85. package/commands/course/index.ts +6 -0
  86. package/commands/course/update-course-translation.command.ts +28 -0
  87. package/commands/course/update-lesson-translation.command.ts +24 -0
  88. package/commands/course/update-section-translation.command.ts +24 -0
  89. package/commands/page/create-page-translation.command.ts +29 -0
  90. package/commands/page/create-page.command.ts +5 -0
  91. package/commands/page/index.ts +2 -0
  92. package/commands/page/update-page-translation.command.ts +28 -0
  93. package/commands/page/update-page.command.ts +5 -0
  94. package/commands/prompt/create-prompt-translation.command.ts +26 -0
  95. package/commands/prompt/create-prompt.command.ts +2 -0
  96. package/commands/prompt/index.ts +2 -0
  97. package/commands/prompt/update-prompt-translation.command.ts +25 -0
  98. package/commands/prompt/update-prompt.command.ts +2 -0
  99. package/commands/prompt-category/create-prompt-category-translation.command.ts +27 -0
  100. package/commands/prompt-category/create-prompt-category.command.ts +3 -0
  101. package/commands/prompt-category/index.ts +2 -0
  102. package/commands/prompt-category/update-prompt-category-translation.command.ts +26 -0
  103. package/commands/prompt-category/update-prompt-category.command.ts +3 -0
  104. package/commands/prompt-topic/create-prompt-topic-translation.command.ts +29 -0
  105. package/commands/prompt-topic/create-prompt-topic.command.ts +5 -0
  106. package/commands/prompt-topic/index.ts +2 -0
  107. package/commands/prompt-topic/update-prompt-topic-translation.command.ts +28 -0
  108. package/commands/prompt-topic/update-prompt-topic.command.ts +5 -0
  109. package/commands/question/create-question-translation.command.ts +26 -0
  110. package/commands/question/create-question.command.ts +2 -0
  111. package/commands/question/index.ts +2 -0
  112. package/commands/question/update-question-translation.command.ts +25 -0
  113. package/commands/question/update-question.command.ts +2 -0
  114. package/commands/team-account/index.ts +1 -0
  115. package/commands/team-account/update-team-account-invite.command.ts +22 -0
  116. package/commands/unregistered-user/patch-locale.command.ts +1 -1
  117. package/commands/user/get-me.command.ts +2 -1
  118. package/commands/user/patch-locale.command.ts +1 -1
  119. package/constants/user/enums/index.ts +0 -1
  120. package/models/user.schema.ts +1 -1
  121. package/package.json +2 -1
  122. package/build/constants/user/enums/locale.enum.js +0 -8
  123. package/constants/user/enums/locale.enum.ts +0 -4
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateLessonTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var CreateLessonTranslationCommand;
8
+ (function (CreateLessonTranslationCommand) {
9
+ CreateLessonTranslationCommand.RequestSchema = models_1.LessonSchema.pick({
10
+ title: true,
11
+ }).extend({
12
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
13
+ });
14
+ CreateLessonTranslationCommand.RequestParamSchema = zod_1.z.object({
15
+ uuid: zod_1.z.string().uuid(),
16
+ });
17
+ CreateLessonTranslationCommand.ResponseSchema = zod_1.z.object({
18
+ data: models_1.LessonSchema,
19
+ });
20
+ })(CreateLessonTranslationCommand || (exports.CreateLessonTranslationCommand = CreateLessonTranslationCommand = {}));
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateSectionTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var CreateSectionTranslationCommand;
8
+ (function (CreateSectionTranslationCommand) {
9
+ CreateSectionTranslationCommand.RequestSchema = models_1.SectionSchema.pick({
10
+ title: true,
11
+ }).extend({
12
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
13
+ });
14
+ CreateSectionTranslationCommand.RequestParamSchema = zod_1.z.object({
15
+ uuid: zod_1.z.string().uuid(),
16
+ });
17
+ CreateSectionTranslationCommand.ResponseSchema = zod_1.z.object({
18
+ data: models_1.SectionSchema,
19
+ });
20
+ })(CreateSectionTranslationCommand || (exports.CreateSectionTranslationCommand = CreateSectionTranslationCommand = {}));
@@ -15,5 +15,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-course.command"), exports);
18
+ __exportStar(require("./create-course-translation.command"), exports);
19
+ __exportStar(require("./create-lesson-translation.command"), exports);
20
+ __exportStar(require("./create-section-translation.command"), exports);
18
21
  __exportStar(require("./find-course-by-alias.command"), exports);
19
22
  __exportStar(require("./find-course-by-uuid.command"), exports);
23
+ __exportStar(require("./update-course-translation.command"), exports);
24
+ __exportStar(require("./update-lesson-translation.command"), exports);
25
+ __exportStar(require("./update-section-translation.command"), exports);
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateCourseTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var UpdateCourseTranslationCommand;
8
+ (function (UpdateCourseTranslationCommand) {
9
+ UpdateCourseTranslationCommand.RequestSchema = models_1.CourseSchema.pick({
10
+ title: true,
11
+ subtitle: true,
12
+ prerequisites: true,
13
+ description: true,
14
+ skills: true,
15
+ }).partial();
16
+ UpdateCourseTranslationCommand.RequestParamSchema = zod_1.z.object({
17
+ uuid: zod_1.z.string().uuid(),
18
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
19
+ });
20
+ UpdateCourseTranslationCommand.ResponseSchema = zod_1.z.object({
21
+ data: models_1.CourseSchema,
22
+ });
23
+ })(UpdateCourseTranslationCommand || (exports.UpdateCourseTranslationCommand = UpdateCourseTranslationCommand = {}));
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateLessonTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var UpdateLessonTranslationCommand;
8
+ (function (UpdateLessonTranslationCommand) {
9
+ UpdateLessonTranslationCommand.RequestSchema = models_1.LessonSchema.pick({
10
+ title: true,
11
+ }).partial();
12
+ UpdateLessonTranslationCommand.RequestParamSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
15
+ });
16
+ UpdateLessonTranslationCommand.ResponseSchema = zod_1.z.object({
17
+ data: models_1.LessonSchema,
18
+ });
19
+ })(UpdateLessonTranslationCommand || (exports.UpdateLessonTranslationCommand = UpdateLessonTranslationCommand = {}));
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateSectionTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var UpdateSectionTranslationCommand;
8
+ (function (UpdateSectionTranslationCommand) {
9
+ UpdateSectionTranslationCommand.RequestSchema = models_1.SectionSchema.pick({
10
+ title: true,
11
+ }).partial();
12
+ UpdateSectionTranslationCommand.RequestParamSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
15
+ });
16
+ UpdateSectionTranslationCommand.ResponseSchema = zod_1.z.object({
17
+ data: models_1.SectionSchema,
18
+ });
19
+ })(UpdateSectionTranslationCommand || (exports.UpdateSectionTranslationCommand = UpdateSectionTranslationCommand = {}));
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreatePageTranslationCommand = void 0;
4
+ const models_1 = require("../../models");
5
+ const zod_1 = require("zod");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var CreatePageTranslationCommand;
8
+ (function (CreatePageTranslationCommand) {
9
+ CreatePageTranslationCommand.RequestSchema = models_1.PageSchema.pick({
10
+ metaTitle: true,
11
+ metaDescription: true,
12
+ title: true,
13
+ subTitle: true,
14
+ seoTextMd: true,
15
+ }).extend({
16
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
17
+ });
18
+ CreatePageTranslationCommand.RequestParamSchema = zod_1.z.object({
19
+ uuid: zod_1.z.string().uuid(),
20
+ });
21
+ CreatePageTranslationCommand.ResponseSchema = zod_1.z.object({
22
+ data: models_1.PageSchema,
23
+ });
24
+ })(CreatePageTranslationCommand || (exports.CreatePageTranslationCommand = CreatePageTranslationCommand = {}));
@@ -10,6 +10,11 @@ var CreatePageCommand;
10
10
  uuid: true,
11
11
  createdAt: true,
12
12
  updatedAt: true,
13
+ metaTitle: true,
14
+ metaDescription: true,
15
+ title: true,
16
+ subTitle: true,
17
+ seoTextMd: true,
13
18
  })
14
19
  .refine((data) => {
15
20
  if (data.type === constants_1.PageType.AI_MODEL) {
@@ -15,8 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-page.command"), exports);
18
+ __exportStar(require("./create-page-translation.command"), exports);
18
19
  __exportStar(require("./delete-page.command"), exports);
19
20
  __exportStar(require("./find-page-by-alias.command"), exports);
20
21
  __exportStar(require("./find-pages-by-criteria.command"), exports);
21
22
  __exportStar(require("./find-page.command"), exports);
22
23
  __exportStar(require("./update-page.command"), exports);
24
+ __exportStar(require("./update-page-translation.command"), exports);
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdatePageTranslationCommand = void 0;
4
+ const models_1 = require("../../models");
5
+ const zod_1 = require("zod");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var UpdatePageTranslationCommand;
8
+ (function (UpdatePageTranslationCommand) {
9
+ UpdatePageTranslationCommand.RequestSchema = models_1.PageSchema.pick({
10
+ metaTitle: true,
11
+ metaDescription: true,
12
+ title: true,
13
+ subTitle: true,
14
+ seoTextMd: true,
15
+ }).partial();
16
+ UpdatePageTranslationCommand.RequestParamSchema = zod_1.z.object({
17
+ uuid: zod_1.z.string().uuid(),
18
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
19
+ });
20
+ UpdatePageTranslationCommand.ResponseSchema = zod_1.z.object({
21
+ data: models_1.PageSchema,
22
+ });
23
+ })(UpdatePageTranslationCommand || (exports.UpdatePageTranslationCommand = UpdatePageTranslationCommand = {}));
@@ -9,6 +9,11 @@ var UpdatePageCommand;
9
9
  createdAt: true,
10
10
  updatedAt: true,
11
11
  uuid: true,
12
+ metaTitle: true,
13
+ metaDescription: true,
14
+ title: true,
15
+ subTitle: true,
16
+ seoTextMd: true,
12
17
  }).partial();
13
18
  UpdatePageCommand.RequestParamSchema = zod_1.z.object({
14
19
  uuid: zod_1.z.string().uuid(),
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreatePromptTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var CreatePromptTranslationCommand;
8
+ (function (CreatePromptTranslationCommand) {
9
+ CreatePromptTranslationCommand.RequestSchema = models_1.PromptSchema.pick({
10
+ title: true,
11
+ content: true,
12
+ }).extend({
13
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
14
+ });
15
+ CreatePromptTranslationCommand.RequestParamSchema = zod_1.z.object({
16
+ uuid: zod_1.z.string().uuid(),
17
+ });
18
+ CreatePromptTranslationCommand.ResponseSchema = zod_1.z.object({
19
+ data: models_1.PromptSchema,
20
+ });
21
+ })(CreatePromptTranslationCommand || (exports.CreatePromptTranslationCommand = CreatePromptTranslationCommand = {}));
@@ -10,6 +10,8 @@ var CreatePromptCommand;
10
10
  (function (CreatePromptCommand) {
11
11
  CreatePromptCommand.RequestSchema = models_1.PromptSchema.omit({
12
12
  uuid: true,
13
+ title: true,
14
+ content: true,
13
15
  createdAt: true,
14
16
  updatedAt: true,
15
17
  });
@@ -15,8 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-prompt.command"), exports);
18
+ __exportStar(require("./create-prompt-translation.command"), exports);
18
19
  __exportStar(require("./delete-prompt.command"), exports);
19
20
  __exportStar(require("./update-prompt.command"), exports);
21
+ __exportStar(require("./update-prompt-translation.command"), exports);
20
22
  __exportStar(require("./find-prompt-by-uuid.command"), exports);
21
23
  __exportStar(require("./find-all-prompts.command"), exports);
22
24
  __exportStar(require("./find-prompts-by-topic.command"), exports);
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdatePromptTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var UpdatePromptTranslationCommand;
8
+ (function (UpdatePromptTranslationCommand) {
9
+ UpdatePromptTranslationCommand.RequestSchema = models_1.PromptSchema.pick({
10
+ title: true,
11
+ content: true,
12
+ }).partial();
13
+ UpdatePromptTranslationCommand.RequestParamSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
16
+ });
17
+ UpdatePromptTranslationCommand.ResponseSchema = zod_1.z.object({
18
+ data: models_1.PromptSchema,
19
+ });
20
+ })(UpdatePromptTranslationCommand || (exports.UpdatePromptTranslationCommand = UpdatePromptTranslationCommand = {}));
@@ -10,6 +10,8 @@ var UpdatePromptCommand;
10
10
  (function (UpdatePromptCommand) {
11
11
  UpdatePromptCommand.RequestSchema = models_1.PromptSchema.omit({
12
12
  uuid: true,
13
+ title: true,
14
+ content: true,
13
15
  createdAt: true,
14
16
  updatedAt: true,
15
17
  }).partial();
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreatePromptCategoryTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var CreatePromptCategoryTranslationCommand;
8
+ (function (CreatePromptCategoryTranslationCommand) {
9
+ CreatePromptCategoryTranslationCommand.RequestSchema = models_1.PromptCategorySchema.pick({
10
+ title: true,
11
+ metaTitle: true,
12
+ metaDescription: true,
13
+ }).extend({
14
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
15
+ });
16
+ CreatePromptCategoryTranslationCommand.RequestParamSchema = zod_1.z.object({
17
+ uuid: zod_1.z.string().uuid(),
18
+ });
19
+ CreatePromptCategoryTranslationCommand.ResponseSchema = zod_1.z.object({
20
+ data: models_1.PromptCategorySchema,
21
+ });
22
+ })(CreatePromptCategoryTranslationCommand || (exports.CreatePromptCategoryTranslationCommand = CreatePromptCategoryTranslationCommand = {}));
@@ -10,6 +10,9 @@ var CreatePromptCategoryCommand;
10
10
  (function (CreatePromptCategoryCommand) {
11
11
  CreatePromptCategoryCommand.RequestSchema = models_1.PromptCategorySchema.omit({
12
12
  uuid: true,
13
+ title: true,
14
+ metaTitle: true,
15
+ metaDescription: true,
13
16
  createdAt: true,
14
17
  updatedAt: true,
15
18
  });
@@ -15,8 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-prompt-category.command"), exports);
18
+ __exportStar(require("./create-prompt-category-translation.command"), exports);
18
19
  __exportStar(require("./delete-prompt-category.command"), exports);
19
20
  __exportStar(require("./update-prompt-category.command"), exports);
21
+ __exportStar(require("./update-prompt-category-translation.command"), exports);
20
22
  __exportStar(require("./find-all-prompt-categories.command"), exports);
21
23
  __exportStar(require("./find-prompt-category-by-alias.command"), exports);
22
24
  __exportStar(require("./find-prompt-category-by-uuid.command"), exports);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdatePromptCategoryTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var UpdatePromptCategoryTranslationCommand;
8
+ (function (UpdatePromptCategoryTranslationCommand) {
9
+ UpdatePromptCategoryTranslationCommand.RequestSchema = models_1.PromptCategorySchema.pick({
10
+ title: true,
11
+ metaTitle: true,
12
+ metaDescription: true,
13
+ }).partial();
14
+ UpdatePromptCategoryTranslationCommand.RequestParamSchema = zod_1.z.object({
15
+ uuid: zod_1.z.string().uuid(),
16
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
17
+ });
18
+ UpdatePromptCategoryTranslationCommand.ResponseSchema = zod_1.z.object({
19
+ data: models_1.PromptCategorySchema,
20
+ });
21
+ })(UpdatePromptCategoryTranslationCommand || (exports.UpdatePromptCategoryTranslationCommand = UpdatePromptCategoryTranslationCommand = {}));
@@ -10,6 +10,9 @@ var UpdatePromptCategoryCommand;
10
10
  (function (UpdatePromptCategoryCommand) {
11
11
  UpdatePromptCategoryCommand.RequestSchema = models_1.PromptCategorySchema.omit({
12
12
  uuid: true,
13
+ title: true,
14
+ metaTitle: true,
15
+ metaDescription: true,
13
16
  createdAt: true,
14
17
  updatedAt: true,
15
18
  }).partial();
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreatePromptTopicTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var CreatePromptTopicTranslationCommand;
8
+ (function (CreatePromptTopicTranslationCommand) {
9
+ CreatePromptTopicTranslationCommand.RequestSchema = models_1.PromptTopicSchema.pick({
10
+ title: true,
11
+ content: true,
12
+ metaTitle: true,
13
+ metaDescription: true,
14
+ seoText: true,
15
+ }).extend({
16
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
17
+ });
18
+ CreatePromptTopicTranslationCommand.RequestParamSchema = zod_1.z.object({
19
+ uuid: zod_1.z.string().uuid(),
20
+ });
21
+ CreatePromptTopicTranslationCommand.ResponseSchema = zod_1.z.object({
22
+ data: models_1.PromptTopicSchema,
23
+ });
24
+ })(CreatePromptTopicTranslationCommand || (exports.CreatePromptTopicTranslationCommand = CreatePromptTopicTranslationCommand = {}));
@@ -10,6 +10,11 @@ var CreatePromptTopicCommand;
10
10
  (function (CreatePromptTopicCommand) {
11
11
  CreatePromptTopicCommand.RequestSchema = models_1.PromptTopicSchema.omit({
12
12
  uuid: true,
13
+ title: true,
14
+ content: true,
15
+ metaTitle: true,
16
+ metaDescription: true,
17
+ seoText: true,
13
18
  createdAt: true,
14
19
  updatedAt: true,
15
20
  });
@@ -15,8 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-prompt-topic.command"), exports);
18
+ __exportStar(require("./create-prompt-topic-translation.command"), exports);
18
19
  __exportStar(require("./delete-prompt-topic.command"), exports);
19
20
  __exportStar(require("./update-prompt-topic.command"), exports);
21
+ __exportStar(require("./update-prompt-topic-translation.command"), exports);
20
22
  __exportStar(require("./find-prompt-topic-by-category.command"), exports);
21
23
  __exportStar(require("./find-prompt-topic-by-alias.command"), exports);
22
24
  __exportStar(require("./find-all-prompt-topics.command"), exports);
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdatePromptTopicTranslationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var UpdatePromptTopicTranslationCommand;
8
+ (function (UpdatePromptTopicTranslationCommand) {
9
+ UpdatePromptTopicTranslationCommand.RequestSchema = models_1.PromptTopicSchema.pick({
10
+ title: true,
11
+ content: true,
12
+ metaTitle: true,
13
+ metaDescription: true,
14
+ seoText: true,
15
+ }).partial();
16
+ UpdatePromptTopicTranslationCommand.RequestParamSchema = zod_1.z.object({
17
+ uuid: zod_1.z.string().uuid(),
18
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
19
+ });
20
+ UpdatePromptTopicTranslationCommand.ResponseSchema = zod_1.z.object({
21
+ data: models_1.PromptTopicSchema,
22
+ });
23
+ })(UpdatePromptTopicTranslationCommand || (exports.UpdatePromptTopicTranslationCommand = UpdatePromptTopicTranslationCommand = {}));
@@ -10,6 +10,11 @@ var UpdatePromptTopicCommand;
10
10
  (function (UpdatePromptTopicCommand) {
11
11
  UpdatePromptTopicCommand.RequestSchema = models_1.PromptTopicSchema.omit({
12
12
  uuid: true,
13
+ title: true,
14
+ content: true,
15
+ metaTitle: true,
16
+ metaDescription: true,
17
+ seoText: true,
13
18
  createdAt: true,
14
19
  updatedAt: true,
15
20
  }).partial();
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateQuestionTranslationCommand = void 0;
4
+ const models_1 = require("../../models");
5
+ const zod_1 = require("zod");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var CreateQuestionTranslationCommand;
8
+ (function (CreateQuestionTranslationCommand) {
9
+ CreateQuestionTranslationCommand.RequestSchema = models_1.QuestionSchema.pick({
10
+ question: true,
11
+ answer: true,
12
+ }).extend({
13
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
14
+ });
15
+ CreateQuestionTranslationCommand.RequestParamSchema = zod_1.z.object({
16
+ uuid: zod_1.z.string().uuid(),
17
+ });
18
+ CreateQuestionTranslationCommand.ResponseSchema = zod_1.z.object({
19
+ data: models_1.QuestionSchema,
20
+ });
21
+ })(CreateQuestionTranslationCommand || (exports.CreateQuestionTranslationCommand = CreateQuestionTranslationCommand = {}));
@@ -9,6 +9,8 @@ var CreateQuestionCommand;
9
9
  uuid: true,
10
10
  createdAt: true,
11
11
  updatedAt: true,
12
+ question: true,
13
+ answer: true,
12
14
  });
13
15
  CreateQuestionCommand.ResponseSchema = zod_1.z.object({
14
16
  data: models_1.QuestionSchema,
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-question.command"), exports);
18
+ __exportStar(require("./create-question-translation.command"), exports);
18
19
  __exportStar(require("./delete-question.command"), exports);
19
20
  __exportStar(require("./find-question.command"), exports);
20
21
  __exportStar(require("./update-question.command"), exports);
22
+ __exportStar(require("./update-question-translation.command"), exports);
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateQuestionTranslationCommand = void 0;
4
+ const models_1 = require("../../models");
5
+ const zod_1 = require("zod");
6
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
7
+ var UpdateQuestionTranslationCommand;
8
+ (function (UpdateQuestionTranslationCommand) {
9
+ UpdateQuestionTranslationCommand.RequestSchema = models_1.QuestionSchema.pick({
10
+ question: true,
11
+ answer: true,
12
+ }).partial();
13
+ UpdateQuestionTranslationCommand.RequestParamSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
16
+ });
17
+ UpdateQuestionTranslationCommand.ResponseSchema = zod_1.z.object({
18
+ data: models_1.QuestionSchema,
19
+ });
20
+ })(UpdateQuestionTranslationCommand || (exports.UpdateQuestionTranslationCommand = UpdateQuestionTranslationCommand = {}));
@@ -9,6 +9,8 @@ var UpdateQuestionCommand;
9
9
  createdAt: true,
10
10
  updatedAt: true,
11
11
  uuid: true,
12
+ question: true,
13
+ answer: true,
12
14
  }).partial();
13
15
  UpdateQuestionCommand.RequestParamSchema = zod_1.z.object({
14
16
  uuid: zod_1.z.string().uuid(),
@@ -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,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 constants_1 = require("../../constants");
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(constants_1.LOCALE),
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(constants_1.LOCALE),
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(constants_1.LOCALE),
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 constants_1 = require("../../constants");
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(constants_1.LOCALE),
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(constants_1.LOCALE),
13
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
14
14
  }),
15
15
  });
16
16
  })(PatchUserLocaleCommand || (exports.PatchUserLocaleCommand = PatchUserLocaleCommand = {}));
@@ -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);
@@ -4,7 +4,7 @@ exports.UserAggregateSchema = exports.UserSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const user_to_subscription_schema_1 = require("./user-to-subscription.schema");
6
6
  const user_to_product_schema_1 = require("./user-to-product.schema");
7
- const constants_1 = require("../constants");
7
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
8
8
  exports.UserSchema = zod_1.z.object({
9
9
  uuid: zod_1.z.string().uuid(),
10
10
  email: zod_1.z.string().email(),
@@ -16,7 +16,7 @@ exports.UserSchema = zod_1.z.object({
16
16
  restoreTokenHash: zod_1.z.string(),
17
17
  tokenBonusBalance: zod_1.z.number(),
18
18
  role: zod_1.z.string(),
19
- locale: zod_1.z.nativeEnum(constants_1.LOCALE),
19
+ locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
20
20
  createdAt: zod_1.z.date(),
21
21
  updatedAt: zod_1.z.date(),
22
22
  deletedAt: zod_1.z.date().nullable(),