@purpleschool/gptbot 0.12.70-stage-2 → 0.12.70

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 (206) hide show
  1. package/api/controllers/http/blog.ts +0 -4
  2. package/api/controllers/http/canvas-template.ts +1 -0
  3. package/api/controllers/http/category.ts +0 -4
  4. package/api/controllers/http/course.ts +0 -12
  5. package/api/controllers/http/page.ts +0 -4
  6. package/api/controllers/http/prompt-category.ts +0 -4
  7. package/api/controllers/http/prompt-topic.ts +0 -4
  8. package/api/controllers/http/prompt.ts +0 -4
  9. package/api/controllers/http/question.ts +0 -4
  10. package/api/controllers/http/team-account.ts +0 -1
  11. package/api/routes.ts +1 -68
  12. package/build/api/controllers/http/blog.js +0 -3
  13. package/build/api/controllers/http/canvas-template.js +1 -0
  14. package/build/api/controllers/http/category.js +0 -3
  15. package/build/api/controllers/http/course.js +0 -9
  16. package/build/api/controllers/http/page.js +0 -3
  17. package/build/api/controllers/http/prompt-category.js +0 -3
  18. package/build/api/controllers/http/prompt-topic.js +0 -3
  19. package/build/api/controllers/http/prompt.js +0 -3
  20. package/build/api/controllers/http/question.js +0 -3
  21. package/build/api/controllers/http/team-account.js +0 -1
  22. package/build/api/routes.js +1 -34
  23. package/build/commands/blog/create-post.command.js +0 -6
  24. package/build/commands/blog/index.js +0 -3
  25. package/build/commands/blog/update-post.command.js +0 -6
  26. package/build/commands/cabinet/get-user-statistics-by-month.command.js +13 -6
  27. package/build/commands/cabinet/get-user-statistics-overview.command.js +1 -5
  28. package/build/commands/canvas-template/create-canvas-template.command.js +5 -1
  29. package/build/commands/canvas-template/find-canvas-templates.query.js +5 -0
  30. package/build/commands/canvas-template/generate-canvas-template-by-prompt.command.js +14 -0
  31. package/build/commands/canvas-template/index.js +1 -0
  32. package/build/commands/canvas-template/update-canvas-template.command.js +5 -1
  33. package/build/commands/category/create-category.command.js +0 -4
  34. package/build/commands/category/index.js +0 -3
  35. package/build/commands/category/update-category.command.js +0 -4
  36. package/build/commands/course/create-course.command.js +0 -5
  37. package/build/commands/course/index.js +0 -9
  38. package/build/commands/page/create-page.command.js +0 -6
  39. package/build/commands/page/find-page.command.js +2 -10
  40. package/build/commands/page/index.js +0 -3
  41. package/build/commands/page/update-page.command.js +0 -5
  42. package/build/commands/prompt/create-prompt.command.js +0 -2
  43. package/build/commands/prompt/index.js +0 -3
  44. package/build/commands/prompt/update-prompt.command.js +0 -2
  45. package/build/commands/prompt-category/create-prompt-category.command.js +0 -3
  46. package/build/commands/prompt-category/index.js +0 -3
  47. package/build/commands/prompt-category/update-prompt-category.command.js +0 -3
  48. package/build/commands/prompt-topic/create-prompt-topic.command.js +0 -5
  49. package/build/commands/prompt-topic/index.js +0 -3
  50. package/build/commands/prompt-topic/update-prompt-topic.command.js +0 -5
  51. package/build/commands/question/create-question.command.js +0 -2
  52. package/build/commands/question/index.js +0 -3
  53. package/build/commands/question/update-question.command.js +0 -2
  54. package/build/commands/team-account/get-team-account-statistics-by-month.command.js +13 -6
  55. package/build/commands/team-account/get-team-account-statistics-overview.command.js +1 -5
  56. package/build/commands/team-account/index.js +0 -1
  57. package/build/commands/ui-notification/create-admin-broadcast-ui-notification.command.js +2 -9
  58. package/build/commands/unregistered-user/patch-locale.command.js +3 -3
  59. package/build/commands/user/get-me.command.js +1 -2
  60. package/build/commands/user/patch-locale.command.js +3 -3
  61. package/build/constants/cabinet/enums/index.js +0 -1
  62. package/build/constants/subscription/enums/index.js +0 -1
  63. package/build/constants/tool/enums/index.js +1 -0
  64. package/build/constants/tool/enums/job-request-origin.enum.js +8 -0
  65. package/build/constants/user/enums/index.js +1 -0
  66. package/build/constants/user/enums/locale.enum.js +8 -0
  67. package/build/models/canvas-template.schema.js +15 -3
  68. package/build/models/index.js +0 -10
  69. package/build/models/ui-notification.schema.js +8 -13
  70. package/build/models/user.schema.js +2 -2
  71. package/commands/blog/create-post.command.ts +0 -6
  72. package/commands/blog/index.ts +0 -3
  73. package/commands/blog/update-post.command.ts +0 -6
  74. package/commands/cabinet/get-user-statistics-by-month.command.ts +14 -7
  75. package/commands/cabinet/get-user-statistics-overview.command.ts +2 -6
  76. package/commands/canvas-template/create-canvas-template.command.ts +11 -2
  77. package/commands/canvas-template/find-canvas-templates.query.ts +6 -1
  78. package/commands/canvas-template/generate-canvas-template-by-prompt.command.ts +16 -0
  79. package/commands/canvas-template/index.ts +1 -0
  80. package/commands/canvas-template/update-canvas-template.command.ts +11 -2
  81. package/commands/category/create-category.command.ts +0 -4
  82. package/commands/category/index.ts +0 -3
  83. package/commands/category/update-category.command.ts +0 -4
  84. package/commands/course/create-course.command.ts +0 -5
  85. package/commands/course/index.ts +0 -9
  86. package/commands/page/create-page.command.ts +0 -6
  87. package/commands/page/find-page.command.ts +2 -15
  88. package/commands/page/index.ts +0 -3
  89. package/commands/page/update-page.command.ts +0 -5
  90. package/commands/prompt/create-prompt.command.ts +0 -2
  91. package/commands/prompt/index.ts +0 -3
  92. package/commands/prompt/update-prompt.command.ts +0 -2
  93. package/commands/prompt-category/create-prompt-category.command.ts +0 -3
  94. package/commands/prompt-category/index.ts +0 -3
  95. package/commands/prompt-category/update-prompt-category.command.ts +0 -3
  96. package/commands/prompt-topic/create-prompt-topic.command.ts +0 -5
  97. package/commands/prompt-topic/index.ts +0 -3
  98. package/commands/prompt-topic/update-prompt-topic.command.ts +0 -5
  99. package/commands/question/create-question.command.ts +0 -2
  100. package/commands/question/index.ts +0 -3
  101. package/commands/question/update-question.command.ts +0 -2
  102. package/commands/team-account/find-team-accounts-by-name.command.ts +1 -1
  103. package/commands/team-account/get-team-account-statistics-by-month.command.ts +14 -7
  104. package/commands/team-account/get-team-account-statistics-overview.command.ts +2 -6
  105. package/commands/team-account/index.ts +0 -1
  106. package/commands/ui-notification/create-admin-broadcast-ui-notification.command.ts +2 -9
  107. package/commands/unregistered-user/patch-locale.command.ts +1 -1
  108. package/commands/user/get-me.command.ts +1 -2
  109. package/commands/user/patch-locale.command.ts +1 -1
  110. package/constants/cabinet/enums/index.ts +0 -1
  111. package/constants/subscription/enums/index.ts +0 -1
  112. package/constants/tool/enums/index.ts +1 -0
  113. package/constants/tool/enums/job-request-origin.enum.ts +4 -0
  114. package/constants/user/enums/index.ts +1 -0
  115. package/constants/user/enums/locale.enum.ts +4 -0
  116. package/models/canvas-template.schema.ts +17 -2
  117. package/models/index.ts +0 -10
  118. package/models/ui-notification.schema.ts +7 -14
  119. package/models/user.schema.ts +1 -1
  120. package/package.json +1 -2
  121. package/build/commands/blog/create-post-translation.command.js +0 -23
  122. package/build/commands/blog/get-all-post-translations.query.js +0 -14
  123. package/build/commands/blog/update-post-translation.command.js +0 -23
  124. package/build/commands/category/create-category-translation.command.js +0 -21
  125. package/build/commands/category/get-all-category-translations.query.js +0 -14
  126. package/build/commands/category/update-category-translation.command.js +0 -21
  127. package/build/commands/course/create-course-translation.command.js +0 -22
  128. package/build/commands/course/create-lesson-translation.command.js +0 -18
  129. package/build/commands/course/create-section-translation.command.js +0 -18
  130. package/build/commands/course/get-all-course-translations.query.js +0 -14
  131. package/build/commands/course/get-all-lesson-translations.query.js +0 -14
  132. package/build/commands/course/get-all-section-translations.query.js +0 -14
  133. package/build/commands/course/update-course-translation.command.js +0 -22
  134. package/build/commands/course/update-lesson-translation.command.js +0 -18
  135. package/build/commands/course/update-section-translation.command.js +0 -18
  136. package/build/commands/page/create-page-translation.command.js +0 -23
  137. package/build/commands/page/get-all-page-translations.query.js +0 -14
  138. package/build/commands/page/update-page-translation.command.js +0 -23
  139. package/build/commands/prompt/create-prompt-translation.command.js +0 -19
  140. package/build/commands/prompt/get-all-prompt-translations.query.js +0 -14
  141. package/build/commands/prompt/update-prompt-translation.command.js +0 -19
  142. package/build/commands/prompt-category/create-prompt-category-translation.command.js +0 -20
  143. package/build/commands/prompt-category/get-all-prompt-category-translations.query.js +0 -14
  144. package/build/commands/prompt-category/update-prompt-category-translation.command.js +0 -20
  145. package/build/commands/prompt-topic/create-prompt-topic-translation.command.js +0 -22
  146. package/build/commands/prompt-topic/get-all-prompt-topic-translations.query.js +0 -14
  147. package/build/commands/prompt-topic/update-prompt-topic-translation.command.js +0 -22
  148. package/build/commands/question/create-question-translation.command.js +0 -19
  149. package/build/commands/question/get-all-question-translations.query.js +0 -14
  150. package/build/commands/question/update-question-translation.command.js +0 -19
  151. package/build/commands/team-account/update-team-account-invite.command.js +0 -17
  152. package/build/constants/cabinet/enums/statistics-request-type.enum.js +0 -24
  153. package/build/constants/subscription/enums/subscription-balance-field.enum.js +0 -8
  154. package/build/models/category-translation.schema.js +0 -16
  155. package/build/models/course-translation.schema.js +0 -17
  156. package/build/models/lesson-translation.schema.js +0 -13
  157. package/build/models/page-translation.schema.js +0 -18
  158. package/build/models/post-translation.schema.js +0 -18
  159. package/build/models/prompt-category-translation.schema.js +0 -18
  160. package/build/models/prompt-topic-translation.schema.js +0 -20
  161. package/build/models/prompt-translation.schema.js +0 -14
  162. package/build/models/question-translation.schema.js +0 -14
  163. package/build/models/section-translation.schema.js +0 -13
  164. package/commands/blog/create-post-translation.command.ts +0 -28
  165. package/commands/blog/get-all-post-translations.query.ts +0 -16
  166. package/commands/blog/update-post-translation.command.ts +0 -28
  167. package/commands/category/create-category-translation.command.ts +0 -26
  168. package/commands/category/get-all-category-translations.query.ts +0 -16
  169. package/commands/category/update-category-translation.command.ts +0 -26
  170. package/commands/course/create-course-translation.command.ts +0 -27
  171. package/commands/course/create-lesson-translation.command.ts +0 -23
  172. package/commands/course/create-section-translation.command.ts +0 -23
  173. package/commands/course/get-all-course-translations.query.ts +0 -16
  174. package/commands/course/get-all-lesson-translations.query.ts +0 -16
  175. package/commands/course/get-all-section-translations.query.ts +0 -16
  176. package/commands/course/update-course-translation.command.ts +0 -27
  177. package/commands/course/update-lesson-translation.command.ts +0 -23
  178. package/commands/course/update-section-translation.command.ts +0 -23
  179. package/commands/page/create-page-translation.command.ts +0 -28
  180. package/commands/page/get-all-page-translations.query.ts +0 -16
  181. package/commands/page/update-page-translation.command.ts +0 -28
  182. package/commands/prompt/create-prompt-translation.command.ts +0 -24
  183. package/commands/prompt/get-all-prompt-translations.query.ts +0 -16
  184. package/commands/prompt/update-prompt-translation.command.ts +0 -24
  185. package/commands/prompt-category/create-prompt-category-translation.command.ts +0 -25
  186. package/commands/prompt-category/get-all-prompt-category-translations.query.ts +0 -16
  187. package/commands/prompt-category/update-prompt-category-translation.command.ts +0 -25
  188. package/commands/prompt-topic/create-prompt-topic-translation.command.ts +0 -27
  189. package/commands/prompt-topic/get-all-prompt-topic-translations.query.ts +0 -16
  190. package/commands/prompt-topic/update-prompt-topic-translation.command.ts +0 -27
  191. package/commands/question/create-question-translation.command.ts +0 -24
  192. package/commands/question/get-all-question-translations.query.ts +0 -16
  193. package/commands/question/update-question-translation.command.ts +0 -24
  194. package/commands/team-account/update-team-account-invite.command.ts +0 -22
  195. package/constants/cabinet/enums/statistics-request-type.enum.ts +0 -20
  196. package/constants/subscription/enums/subscription-balance-field.enum.ts +0 -4
  197. package/models/category-translation.schema.ts +0 -14
  198. package/models/course-translation.schema.ts +0 -15
  199. package/models/lesson-translation.schema.ts +0 -11
  200. package/models/page-translation.schema.ts +0 -16
  201. package/models/post-translation.schema.ts +0 -16
  202. package/models/prompt-category-translation.schema.ts +0 -13
  203. package/models/prompt-topic-translation.schema.ts +0 -15
  204. package/models/prompt-translation.schema.ts +0 -12
  205. package/models/question-translation.schema.ts +0 -12
  206. package/models/section-translation.schema.ts +0 -11
@@ -9,6 +9,11 @@ var FindCanvasTemplatesQuery;
9
9
  limit: zod_1.z.coerce.number().min(1).default(10),
10
10
  offset: zod_1.z.coerce.number().min(0).default(0),
11
11
  search: zod_1.z.string().trim().optional(),
12
+ isPopular: zod_1.z
13
+ .union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])])
14
+ .transform((value) => (typeof value === 'boolean' ? value : value === 'true'))
15
+ .optional(),
16
+ scope: models_1.CanvasTemplateScopeSchema.optional(),
12
17
  });
13
18
  FindCanvasTemplatesQuery.ResponseSchema = zod_1.z.object({
14
19
  data: zod_1.z.array(models_1.CanvasTemplateSchema),
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GenerateCanvasTemplateByPromptCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var GenerateCanvasTemplateByPromptCommand;
7
+ (function (GenerateCanvasTemplateByPromptCommand) {
8
+ GenerateCanvasTemplateByPromptCommand.RequestSchema = zod_1.z.object({
9
+ prompt: zod_1.z.string().trim().min(1),
10
+ });
11
+ GenerateCanvasTemplateByPromptCommand.ResponseSchema = zod_1.z.object({
12
+ data: models_1.CanvasTemplateSchema,
13
+ });
14
+ })(GenerateCanvasTemplateByPromptCommand || (exports.GenerateCanvasTemplateByPromptCommand = GenerateCanvasTemplateByPromptCommand = {}));
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-canvas-template.command"), exports);
18
18
  __exportStar(require("./create-canvas-from-template.command"), exports);
19
19
  __exportStar(require("./delete-canvas-template.command"), exports);
20
+ __exportStar(require("./generate-canvas-template-by-prompt.command"), exports);
20
21
  __exportStar(require("./find-canvas-template-by-uuid.query"), exports);
21
22
  __exportStar(require("./find-canvas-templates.query"), exports);
22
23
  __exportStar(require("./update-canvas-template.command"), exports);
@@ -11,8 +11,12 @@ var UpdateCanvasTemplateCommand;
11
11
  UpdateCanvasTemplateCommand.RequestSchema = zod_1.z.object({
12
12
  name: zod_1.z.string().trim().min(1).optional(),
13
13
  description: zod_1.z.string().trim().min(1).optional().nullable(),
14
+ isPopular: zod_1.z.boolean().optional(),
15
+ scope: models_1.CanvasTemplateScopeSchema.optional(),
16
+ ownerUserId: zod_1.z.string().uuid().optional().nullable(),
17
+ prompt: zod_1.z.string().trim().min(1).optional().nullable(),
14
18
  previewImageUrl: zod_1.z.string().url().optional().nullable(),
15
- tags: zod_1.z.array(zod_1.z.string().trim().min(1)).optional(),
19
+ tags: zod_1.z.array(models_1.CanvasTemplateTagSchema).optional(),
16
20
  graph: models_1.CanvasTemplateGraphSchema.optional(),
17
21
  });
18
22
  UpdateCanvasTemplateCommand.ResponseSchema = zod_1.z.object({
@@ -7,10 +7,6 @@ var CreateCategoryCommand;
7
7
  (function (CreateCategoryCommand) {
8
8
  CreateCategoryCommand.RequestSchema = models_1.CategorySchema.omit({
9
9
  uuid: true,
10
- name: true,
11
- prompt: true,
12
- placeholder: true,
13
- seoName: true,
14
10
  createdAt: true,
15
11
  updatedAt: true,
16
12
  });
@@ -15,9 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-category.command"), exports);
18
- __exportStar(require("./create-category-translation.command"), exports);
19
18
  __exportStar(require("./delete-category.command"), exports);
20
19
  __exportStar(require("./find-category.command"), exports);
21
- __exportStar(require("./get-all-category-translations.query"), exports);
22
20
  __exportStar(require("./update-category.command"), exports);
23
- __exportStar(require("./update-category-translation.command"), exports);
@@ -9,10 +9,6 @@ var UpdateCategoryCommand;
9
9
  createdAt: true,
10
10
  updatedAt: true,
11
11
  uuid: true,
12
- name: true,
13
- prompt: true,
14
- placeholder: true,
15
- seoName: true,
16
12
  }).partial();
17
13
  UpdateCategoryCommand.RequestParamSchema = zod_1.z.object({
18
14
  uuid: zod_1.z.string().uuid(),
@@ -7,11 +7,6 @@ var CreateCourseCommand;
7
7
  (function (CreateCourseCommand) {
8
8
  CreateCourseCommand.RequestSchema = models_1.CourseSchema.omit({
9
9
  uuid: true,
10
- title: true,
11
- subtitle: true,
12
- prerequisites: true,
13
- description: true,
14
- skills: true,
15
10
  createdAt: true,
16
11
  updatedAt: true,
17
12
  });
@@ -15,14 +15,5 @@ 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);
21
18
  __exportStar(require("./find-course-by-alias.command"), exports);
22
19
  __exportStar(require("./find-course-by-uuid.command"), exports);
23
- __exportStar(require("./get-all-course-translations.query"), exports);
24
- __exportStar(require("./get-all-section-translations.query"), exports);
25
- __exportStar(require("./get-all-lesson-translations.query"), exports);
26
- __exportStar(require("./update-course-translation.command"), exports);
27
- __exportStar(require("./update-lesson-translation.command"), exports);
28
- __exportStar(require("./update-section-translation.command"), exports);
@@ -10,12 +10,6 @@ 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,
18
- toolTitle: true,
19
13
  })
20
14
  .refine((data) => {
21
15
  if (data.type === constants_1.PageType.AI_MODEL) {
@@ -13,18 +13,10 @@ var FindPageCommand;
13
13
  });
14
14
  FindPageCommand.ResponseByUUIDSchema = zod_1.z.object({
15
15
  data: models_1.PageSchema.extend({
16
- locales: zod_1.z.array(models_1.PageTranslationSchema),
17
- category: zod_1.z.union([
18
- models_1.CategorySchema.extend({
19
- locales: zod_1.z.array(models_1.CategoryTranslationSchema),
20
- }),
21
- zod_1.z.null(),
22
- ]),
16
+ category: zod_1.z.union([models_1.CategorySchema, zod_1.z.null()]),
23
17
  aIModel: zod_1.z.union([models_1.AiModelSchema, zod_1.z.null()]),
24
18
  tool: models_1.ToolSchema.nullable(),
25
- questions: zod_1.z.array(models_1.QuestionSchema.extend({
26
- locales: zod_1.z.array(models_1.QuestionTranslationSchema),
27
- })),
19
+ questions: zod_1.z.array(models_1.QuestionSchema),
28
20
  }),
29
21
  });
30
22
  })(FindPageCommand || (exports.FindPageCommand = FindPageCommand = {}));
@@ -15,11 +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-page.command"), exports);
18
- __exportStar(require("./create-page-translation.command"), exports);
19
18
  __exportStar(require("./delete-page.command"), exports);
20
19
  __exportStar(require("./find-page-by-alias.command"), exports);
21
20
  __exportStar(require("./find-pages-by-criteria.command"), exports);
22
21
  __exportStar(require("./find-page.command"), exports);
23
- __exportStar(require("./get-all-page-translations.query"), exports);
24
22
  __exportStar(require("./update-page.command"), exports);
25
- __exportStar(require("./update-page-translation.command"), exports);
@@ -9,11 +9,6 @@ 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,
17
12
  }).partial();
18
13
  UpdatePageCommand.RequestParamSchema = zod_1.z.object({
19
14
  uuid: zod_1.z.string().uuid(),
@@ -10,8 +10,6 @@ var CreatePromptCommand;
10
10
  (function (CreatePromptCommand) {
11
11
  CreatePromptCommand.RequestSchema = models_1.PromptSchema.omit({
12
12
  uuid: true,
13
- title: true,
14
- content: true,
15
13
  createdAt: true,
16
14
  updatedAt: true,
17
15
  });
@@ -15,11 +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-prompt.command"), exports);
18
- __exportStar(require("./create-prompt-translation.command"), exports);
19
18
  __exportStar(require("./delete-prompt.command"), exports);
20
19
  __exportStar(require("./update-prompt.command"), exports);
21
- __exportStar(require("./update-prompt-translation.command"), exports);
22
20
  __exportStar(require("./find-prompt-by-uuid.command"), exports);
23
21
  __exportStar(require("./find-all-prompts.command"), exports);
24
- __exportStar(require("./get-all-prompt-translations.query"), exports);
25
22
  __exportStar(require("./find-prompts-by-topic.command"), exports);
@@ -10,8 +10,6 @@ var UpdatePromptCommand;
10
10
  (function (UpdatePromptCommand) {
11
11
  UpdatePromptCommand.RequestSchema = models_1.PromptSchema.omit({
12
12
  uuid: true,
13
- title: true,
14
- content: true,
15
13
  createdAt: true,
16
14
  updatedAt: true,
17
15
  }).partial();
@@ -10,9 +10,6 @@ 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,
16
13
  createdAt: true,
17
14
  updatedAt: true,
18
15
  });
@@ -15,11 +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-prompt-category.command"), exports);
18
- __exportStar(require("./create-prompt-category-translation.command"), exports);
19
18
  __exportStar(require("./delete-prompt-category.command"), exports);
20
19
  __exportStar(require("./update-prompt-category.command"), exports);
21
- __exportStar(require("./update-prompt-category-translation.command"), exports);
22
20
  __exportStar(require("./find-all-prompt-categories.command"), exports);
23
- __exportStar(require("./get-all-prompt-category-translations.query"), exports);
24
21
  __exportStar(require("./find-prompt-category-by-alias.command"), exports);
25
22
  __exportStar(require("./find-prompt-category-by-uuid.command"), exports);
@@ -10,9 +10,6 @@ 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,
16
13
  createdAt: true,
17
14
  updatedAt: true,
18
15
  }).partial();
@@ -10,11 +10,6 @@ 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,
18
13
  createdAt: true,
19
14
  updatedAt: true,
20
15
  });
@@ -15,12 +15,9 @@ 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);
19
18
  __exportStar(require("./delete-prompt-topic.command"), exports);
20
19
  __exportStar(require("./update-prompt-topic.command"), exports);
21
- __exportStar(require("./update-prompt-topic-translation.command"), exports);
22
20
  __exportStar(require("./find-prompt-topic-by-category.command"), exports);
23
21
  __exportStar(require("./find-prompt-topic-by-alias.command"), exports);
24
22
  __exportStar(require("./find-all-prompt-topics.command"), exports);
25
- __exportStar(require("./get-all-prompt-topic-translations.query"), exports);
26
23
  __exportStar(require("./find-prompt-topic-by-uuid.command"), exports);
@@ -10,11 +10,6 @@ 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,
18
13
  createdAt: true,
19
14
  updatedAt: true,
20
15
  }).partial();
@@ -9,8 +9,6 @@ var CreateQuestionCommand;
9
9
  uuid: true,
10
10
  createdAt: true,
11
11
  updatedAt: true,
12
- question: true,
13
- answer: true,
14
12
  });
15
13
  CreateQuestionCommand.ResponseSchema = zod_1.z.object({
16
14
  data: models_1.QuestionSchema,
@@ -15,9 +15,6 @@ 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);
19
18
  __exportStar(require("./delete-question.command"), exports);
20
19
  __exportStar(require("./find-question.command"), exports);
21
- __exportStar(require("./get-all-question-translations.query"), exports);
22
20
  __exportStar(require("./update-question.command"), exports);
23
- __exportStar(require("./update-question-translation.command"), exports);
@@ -9,8 +9,6 @@ var UpdateQuestionCommand;
9
9
  createdAt: true,
10
10
  updatedAt: true,
11
11
  uuid: true,
12
- question: true,
13
- answer: true,
14
12
  }).partial();
15
13
  UpdateQuestionCommand.RequestParamSchema = zod_1.z.object({
16
14
  uuid: zod_1.z.string().uuid(),
@@ -2,15 +2,11 @@
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");
6
5
  const constants_1 = require("../../constants");
7
6
  var GetTeamAccountStatisticsByMonthCommand;
8
7
  (function (GetTeamAccountStatisticsByMonthCommand) {
9
8
  GetTeamAccountStatisticsByMonthCommand.RequestSchema = zod_1.z.object({
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(),
9
+ origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API).optional(),
14
10
  metric: zod_1.z
15
11
  .nativeEnum(constants_1.STATISTICS_METRIC_TYPE)
16
12
  .default(constants_1.STATISTICS_METRIC_TYPE.REQUESTS)
@@ -19,7 +15,18 @@ var GetTeamAccountStatisticsByMonthCommand;
19
15
  });
20
16
  GetTeamAccountStatisticsByMonthCommand.TeamAccountStatisticsByMonthItemSchema = zod_1.z.object({
21
17
  month: zod_1.z.string(),
22
- statistics: zod_1.z.record(zod_1.z.nativeEnum(constants_1.STATISTICS_REQUEST_TYPE), zod_1.z.number()),
18
+ total_texts: zod_1.z.number(),
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(),
23
30
  });
24
31
  GetTeamAccountStatisticsByMonthCommand.ResponseSchema = zod_1.z.object({
25
32
  data: zod_1.z.array(GetTeamAccountStatisticsByMonthCommand.TeamAccountStatisticsByMonthItemSchema),
@@ -2,7 +2,6 @@
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");
6
5
  const constants_1 = require("../../constants");
7
6
  var GetTeamAccountStatisticsOverviewCommand;
8
7
  (function (GetTeamAccountStatisticsOverviewCommand) {
@@ -14,10 +13,7 @@ var GetTeamAccountStatisticsOverviewCommand;
14
13
  message: 'to must be a valid date string',
15
14
  }),
16
15
  groupBy: zod_1.z.nativeEnum(constants_1.GROUP_BY).default(constants_1.GROUP_BY.DAY),
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(),
16
+ origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API).optional(),
21
17
  memberUserId: zod_1.z.string().uuid().optional(),
22
18
  });
23
19
  GetTeamAccountStatisticsOverviewCommand.TeamAccountStatisticsOverviewItemSchema = zod_1.z.object({
@@ -18,7 +18,6 @@ __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);
22
21
  __exportStar(require("./accept-team-account-invite.command"), exports);
23
22
  __exportStar(require("./remove-team-account-member.command"), exports);
24
23
  __exportStar(require("./leave-team-account-member.command"), exports);
@@ -2,18 +2,11 @@
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");
6
5
  var CreateAdminBroadcastUiNotificationCommand;
7
6
  (function (CreateAdminBroadcastUiNotificationCommand) {
8
7
  CreateAdminBroadcastUiNotificationCommand.RequestBodySchema = zod_1.z.object({
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
- }),
8
+ title: zod_1.z.string().trim().min(1),
9
+ message: zod_1.z.string().trim().min(1),
17
10
  onlyRegistered: zod_1.z.boolean().optional(),
18
11
  });
19
12
  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 rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
5
+ const constants_1 = require("../../constants");
6
6
  var PatchUnregisteredUserLocaleCommand;
7
7
  (function (PatchUnregisteredUserLocaleCommand) {
8
8
  PatchUnregisteredUserLocaleCommand.RequestSchema = zod_1.z.object({
9
- locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
9
+ locale: zod_1.z.nativeEnum(constants_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(rugpt_lib_common_1.LOCALE),
13
+ locale: zod_1.z.nativeEnum(constants_1.LOCALE),
14
14
  }),
15
15
  });
16
16
  })(PatchUnregisteredUserLocaleCommand || (exports.PatchUnregisteredUserLocaleCommand = PatchUnregisteredUserLocaleCommand = {}));
@@ -4,7 +4,6 @@ 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");
8
7
  var GetMeCommand;
9
8
  (function (GetMeCommand) {
10
9
  GetMeCommand.RequestSchema = zod_1.z.object({});
@@ -18,7 +17,7 @@ var GetMeCommand;
18
17
  telegramId: zod_1.z.number().nullable(),
19
18
  telegramUserName: zod_1.z.string().nullable(),
20
19
  webmasterId: zod_1.z.string().uuid().nullable(),
21
- locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
20
+ locale: zod_1.z.nativeEnum(constants_1.LOCALE),
22
21
  profile: models_1.UserProfileResponseSchema,
23
22
  }),
24
23
  });
@@ -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 rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
5
+ const constants_1 = require("../../constants");
6
6
  var PatchUserLocaleCommand;
7
7
  (function (PatchUserLocaleCommand) {
8
8
  PatchUserLocaleCommand.RequestSchema = zod_1.z.object({
9
- locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
9
+ locale: zod_1.z.nativeEnum(constants_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(rugpt_lib_common_1.LOCALE),
13
+ locale: zod_1.z.nativeEnum(constants_1.LOCALE),
14
14
  }),
15
15
  });
16
16
  })(PatchUserLocaleCommand || (exports.PatchUserLocaleCommand = PatchUserLocaleCommand = {}));
@@ -16,4 +16,3 @@ 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);
@@ -15,7 +15,6 @@ 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);
19
18
  __exportStar(require("./subscription-feature-type.enum"), exports);
20
19
  __exportStar(require("./subscription-plan.enum"), exports);
21
20
  __exportStar(require("./subscription-status.enum"), exports);
@@ -17,6 +17,7 @@ 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);
20
21
  __exportStar(require("./tool-type.enum"), exports);
21
22
  __exportStar(require("./tool-workspace-item-slot.enum"), exports);
22
23
  __exportStar(require("./tool-workspace-status.enum"), exports);
@@ -0,0 +1,8 @@
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 = {}));
@@ -18,3 +18,4 @@ __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);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LOCALE = void 0;
4
+ var LOCALE;
5
+ (function (LOCALE) {
6
+ LOCALE["RU"] = "ru";
7
+ LOCALE["EN"] = "en";
8
+ })(LOCALE || (exports.LOCALE = LOCALE = {}));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CanvasTemplateSchema = exports.CanvasTemplateGraphSchema = void 0;
3
+ exports.CanvasTemplateSchema = exports.CanvasTemplateTagSchema = exports.CanvasTemplateScopeSchema = 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");
@@ -50,13 +50,25 @@ exports.CanvasTemplateGraphSchema = zod_1.z
50
50
  }
51
51
  }
52
52
  });
53
+ exports.CanvasTemplateScopeSchema = zod_1.z.enum(['public', 'private']);
54
+ exports.CanvasTemplateTagSchema = zod_1.z.object({
55
+ icons: zod_1.z.object({
56
+ svg: zod_1.z.string(),
57
+ png: zod_1.z.string(),
58
+ }),
59
+ alias: zod_1.z.string().trim().min(1),
60
+ title: zod_1.z.string().trim().min(1),
61
+ });
53
62
  exports.CanvasTemplateSchema = zod_1.z.object({
54
63
  uuid: zod_1.z.string().uuid(),
55
64
  name: zod_1.z.string(),
56
65
  description: zod_1.z.string().nullable(),
57
- userId: zod_1.z.string().uuid().nullable(),
66
+ isPopular: zod_1.z.boolean(),
67
+ scope: exports.CanvasTemplateScopeSchema,
68
+ ownerUserId: zod_1.z.string().uuid().nullable(),
69
+ prompt: zod_1.z.string().nullable(),
58
70
  previewImageUrl: zod_1.z.string().url().nullable(),
59
- tags: zod_1.z.array(zod_1.z.string()),
71
+ tags: zod_1.z.array(exports.CanvasTemplateTagSchema),
60
72
  graph: exports.CanvasTemplateGraphSchema,
61
73
  createdAt: zod_1.z.date(),
62
74
  updatedAt: zod_1.z.date(),
@@ -24,13 +24,11 @@ __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);
28
27
  __exportStar(require("./chat-with-messages.schema"), exports);
29
28
  __exportStar(require("./chat.schema"), exports);
30
29
  __exportStar(require("./cloud-payments-receipt.schema"), exports);
31
30
  __exportStar(require("./course-author.schema"), exports);
32
31
  __exportStar(require("./course.schema"), exports);
33
- __exportStar(require("./course-translation.schema"), exports);
34
32
  __exportStar(require("./date.schema"), exports);
35
33
  __exportStar(require("./feedback.schema"), exports);
36
34
  __exportStar(require("./file.schema"), exports);
@@ -38,24 +36,19 @@ __exportStar(require("./key-value.schema"), exports);
38
36
  __exportStar(require("./form-submission.schema"), exports);
39
37
  __exportStar(require("./icon-variants.schema"), exports);
40
38
  __exportStar(require("./lesson.schema"), exports);
41
- __exportStar(require("./lesson-translation.schema"), exports);
42
39
  __exportStar(require("./message.schema"), exports);
43
40
  __exportStar(require("./midjourney-job.schema"), exports);
44
41
  __exportStar(require("./order.schema"), exports);
45
42
  __exportStar(require("./page.schema"), exports);
46
- __exportStar(require("./page-translation.schema"), exports);
47
43
  __exportStar(require("./payment-history-item.schema"), exports);
48
44
  __exportStar(require("./payment.schema"), exports);
49
45
  __exportStar(require("./invoice-for-payment.schema"), exports);
50
46
  __exportStar(require("./post.schema"), exports);
51
- __exportStar(require("./post-translation.schema"), exports);
52
47
  __exportStar(require("./product.schema"), exports);
53
48
  __exportStar(require("./promocode.schema"), exports);
54
49
  __exportStar(require("./question.schema"), exports);
55
- __exportStar(require("./question-translation.schema"), exports);
56
50
  __exportStar(require("./referral-bonus.schema"), exports);
57
51
  __exportStar(require("./section.schema"), exports);
58
- __exportStar(require("./section-translation.schema"), exports);
59
52
  __exportStar(require("./subscription-feature.schema"), exports);
60
53
  __exportStar(require("./team-subscription-feature.schema"), exports);
61
54
  __exportStar(require("./subscription-upgrade-schema"), exports);
@@ -74,11 +67,8 @@ __exportStar(require("./utm.schema"), exports);
74
67
  __exportStar(require("./ui-notification.schema"), exports);
75
68
  __exportStar(require("./review.schema"), exports);
76
69
  __exportStar(require("./prompt-category.schema"), exports);
77
- __exportStar(require("./prompt-category-translation.schema"), exports);
78
70
  __exportStar(require("./prompt-topic.schema"), exports);
79
- __exportStar(require("./prompt-topic-translation.schema"), exports);
80
71
  __exportStar(require("./prompt.schema"), exports);
81
- __exportStar(require("./prompt-translation.schema"), exports);
82
72
  __exportStar(require("./folder.schema"), exports);
83
73
  __exportStar(require("./filters.schema"), exports);
84
74
  __exportStar(require("./users-filter-notification.schema"), exports);