@purpleschool/gptbot 0.12.70-stage-2 → 0.12.71

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 (273) 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/index.ts +1 -0
  6. package/api/controllers/http/page.ts +0 -4
  7. package/api/controllers/http/palette.ts +6 -0
  8. package/api/controllers/http/prompt-category.ts +0 -4
  9. package/api/controllers/http/prompt-topic.ts +0 -4
  10. package/api/controllers/http/prompt.ts +0 -4
  11. package/api/controllers/http/question.ts +0 -4
  12. package/api/controllers/http/team-account.ts +0 -1
  13. package/api/routes.ts +5 -68
  14. package/build/api/controllers/http/blog.js +0 -3
  15. package/build/api/controllers/http/canvas-template.js +1 -0
  16. package/build/api/controllers/http/category.js +0 -3
  17. package/build/api/controllers/http/course.js +0 -9
  18. package/build/api/controllers/http/index.js +1 -0
  19. package/build/api/controllers/http/page.js +0 -3
  20. package/build/api/controllers/http/palette.js +8 -0
  21. package/build/api/controllers/http/prompt-category.js +0 -3
  22. package/build/api/controllers/http/prompt-topic.js +0 -3
  23. package/build/api/controllers/http/prompt.js +0 -3
  24. package/build/api/controllers/http/question.js +0 -3
  25. package/build/api/controllers/http/team-account.js +0 -1
  26. package/build/api/routes.js +5 -34
  27. package/build/commands/{canvas → ai-studio/canvas}/create-canvas.command.js +1 -1
  28. package/build/commands/{canvas → ai-studio/canvas}/delete-canvas.command.js +1 -1
  29. package/build/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid-with-relations.query.js +1 -1
  30. package/build/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid.query.js +1 -1
  31. package/build/commands/{canvas → ai-studio/canvas}/find-canvases-by-user.query.js +1 -1
  32. package/build/commands/{canvas → ai-studio/canvas}/run-canvas.command.js +1 -1
  33. package/build/commands/{canvas → ai-studio/canvas}/save-canvas.command.js +8 -4
  34. package/build/commands/{canvas → ai-studio/canvas}/update-canvas.command.js +1 -1
  35. package/build/commands/{canvas-edge → ai-studio/canvas-edge}/create-canvas-edge.command.js +2 -2
  36. package/build/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edge-by-source-and-target.query.js +1 -1
  37. package/build/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edges-by-canvas.query.js +1 -1
  38. package/build/commands/{canvas-node → ai-studio/canvas-node}/create-canvas-node.command.js +8 -4
  39. package/build/commands/{canvas-node → ai-studio/canvas-node}/delete-canvas-node.command.js +2 -2
  40. package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-by-uuid.query.js +2 -2
  41. package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-definitions-with-configs.query.js +1 -1
  42. package/build/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-nodes-by-canvas.query.js +1 -1
  43. package/build/commands/{canvas-node → ai-studio/canvas-node}/update-canvas-node.command.js +13 -5
  44. package/build/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-from-template.command.js +1 -1
  45. package/build/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-template.command.js +6 -2
  46. package/build/commands/{canvas-template → ai-studio/canvas-template}/delete-canvas-template.command.js +3 -2
  47. package/build/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-template-by-uuid.query.js +1 -1
  48. package/build/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-templates.query.js +6 -1
  49. package/build/commands/ai-studio/canvas-template/generate-canvas-template-by-prompt.command.js +14 -0
  50. package/build/commands/{canvas-template → ai-studio/canvas-template}/index.js +2 -1
  51. package/build/commands/{canvas-template → ai-studio/canvas-template}/update-canvas-template.command.js +6 -2
  52. package/build/commands/ai-studio/canvas-tool/index.js +17 -0
  53. package/build/commands/ai-studio/canvas-tool/palette/generate-palette.command.js +20 -0
  54. package/build/commands/ai-studio/canvas-tool/palette/get-palette-price.command.js +17 -0
  55. package/build/commands/ai-studio/canvas-tool/palette/index.js +18 -0
  56. package/build/commands/ai-studio/index.js +21 -0
  57. package/build/commands/blog/create-post.command.js +0 -6
  58. package/build/commands/blog/index.js +0 -3
  59. package/build/commands/blog/update-post.command.js +0 -6
  60. package/build/commands/cabinet/get-user-statistics-by-month.command.js +13 -6
  61. package/build/commands/cabinet/get-user-statistics-overview.command.js +1 -5
  62. package/build/commands/category/create-category.command.js +0 -4
  63. package/build/commands/category/index.js +0 -3
  64. package/build/commands/category/update-category.command.js +0 -4
  65. package/build/commands/course/create-course.command.js +0 -5
  66. package/build/commands/course/index.js +0 -9
  67. package/build/commands/index.js +5 -4
  68. package/build/commands/page/create-page.command.js +0 -6
  69. package/build/commands/page/find-page.command.js +2 -10
  70. package/build/commands/page/index.js +0 -3
  71. package/build/commands/page/update-page.command.js +0 -5
  72. package/build/commands/prompt/create-prompt.command.js +0 -2
  73. package/build/commands/prompt/index.js +0 -3
  74. package/build/commands/prompt/update-prompt.command.js +0 -2
  75. package/build/commands/prompt-category/create-prompt-category.command.js +0 -3
  76. package/build/commands/prompt-category/index.js +0 -3
  77. package/build/commands/prompt-category/update-prompt-category.command.js +0 -3
  78. package/build/commands/prompt-topic/create-prompt-topic.command.js +0 -5
  79. package/build/commands/prompt-topic/index.js +0 -3
  80. package/build/commands/prompt-topic/update-prompt-topic.command.js +0 -5
  81. package/build/commands/question/create-question.command.js +0 -2
  82. package/build/commands/question/index.js +0 -3
  83. package/build/commands/question/update-question.command.js +0 -2
  84. package/build/commands/team-account/get-team-account-statistics-by-month.command.js +13 -6
  85. package/build/commands/team-account/get-team-account-statistics-overview.command.js +1 -5
  86. package/build/commands/team-account/index.js +0 -1
  87. package/build/commands/ui-notification/create-admin-broadcast-ui-notification.command.js +2 -9
  88. package/build/commands/unregistered-user/patch-locale.command.js +3 -3
  89. package/build/commands/user/get-me.command.js +1 -2
  90. package/build/commands/user/patch-locale.command.js +3 -3
  91. package/build/constants/cabinet/enums/index.js +0 -1
  92. package/build/constants/subscription/enums/index.js +0 -1
  93. package/build/constants/tool/enums/index.js +1 -0
  94. package/build/constants/tool/enums/job-request-origin.enum.js +8 -0
  95. package/build/constants/user/enums/index.js +1 -0
  96. package/build/constants/user/enums/locale.enum.js +8 -0
  97. package/build/models/canvas-node.schema.js +140 -37
  98. package/build/models/canvas-template.schema.js +21 -5
  99. package/build/models/index.js +0 -10
  100. package/build/models/ui-notification.schema.js +8 -13
  101. package/build/models/user.schema.js +2 -2
  102. package/commands/{canvas → ai-studio/canvas}/create-canvas.command.ts +1 -1
  103. package/commands/{canvas → ai-studio/canvas}/delete-canvas.command.ts +1 -1
  104. package/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid-with-relations.query.ts +1 -1
  105. package/commands/{canvas → ai-studio/canvas}/find-canvas-by-uuid.query.ts +1 -1
  106. package/commands/{canvas → ai-studio/canvas}/find-canvases-by-user.query.ts +1 -1
  107. package/commands/{canvas → ai-studio/canvas}/run-canvas.command.ts +1 -1
  108. package/commands/{canvas → ai-studio/canvas}/save-canvas.command.ts +13 -9
  109. package/commands/{canvas → ai-studio/canvas}/update-canvas.command.ts +1 -1
  110. package/commands/{canvas-edge → ai-studio/canvas-edge}/create-canvas-edge.command.ts +2 -2
  111. package/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edge-by-source-and-target.query.ts +1 -1
  112. package/commands/{canvas-edge → ai-studio/canvas-edge}/find-canvas-edges-by-canvas.query.ts +1 -1
  113. package/commands/ai-studio/canvas-node/create-canvas-node.command.ts +33 -0
  114. package/commands/{canvas-node → ai-studio/canvas-node}/delete-canvas-node.command.ts +2 -2
  115. package/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-by-uuid.query.ts +2 -2
  116. package/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-node-definitions-with-configs.query.ts +1 -1
  117. package/commands/{canvas-node → ai-studio/canvas-node}/find-canvas-nodes-by-canvas.query.ts +1 -1
  118. package/commands/ai-studio/canvas-node/update-canvas-node.command.ts +40 -0
  119. package/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-from-template.command.ts +1 -1
  120. package/commands/{canvas-template → ai-studio/canvas-template}/create-canvas-template.command.ts +7 -2
  121. package/commands/{canvas-template → ai-studio/canvas-template}/delete-canvas-template.command.ts +3 -2
  122. package/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-template-by-uuid.query.ts +1 -1
  123. package/commands/{canvas-template → ai-studio/canvas-template}/find-canvas-templates.query.ts +6 -1
  124. package/commands/ai-studio/canvas-template/generate-canvas-template-by-prompt.command.ts +16 -0
  125. package/commands/{canvas-template → ai-studio/canvas-template}/index.ts +2 -1
  126. package/commands/{canvas-template → ai-studio/canvas-template}/update-canvas-template.command.ts +11 -2
  127. package/commands/ai-studio/canvas-tool/index.ts +1 -0
  128. package/commands/ai-studio/canvas-tool/palette/generate-palette.command.ts +23 -0
  129. package/commands/ai-studio/canvas-tool/palette/get-palette-price.command.ts +17 -0
  130. package/commands/ai-studio/canvas-tool/palette/index.ts +2 -0
  131. package/commands/ai-studio/index.ts +5 -0
  132. package/commands/blog/create-post.command.ts +0 -6
  133. package/commands/blog/index.ts +0 -3
  134. package/commands/blog/update-post.command.ts +0 -6
  135. package/commands/cabinet/get-user-statistics-by-month.command.ts +14 -7
  136. package/commands/cabinet/get-user-statistics-overview.command.ts +2 -6
  137. package/commands/category/create-category.command.ts +0 -4
  138. package/commands/category/index.ts +0 -3
  139. package/commands/category/update-category.command.ts +0 -4
  140. package/commands/course/create-course.command.ts +0 -5
  141. package/commands/course/index.ts +0 -9
  142. package/commands/index.ts +5 -5
  143. package/commands/page/create-page.command.ts +0 -6
  144. package/commands/page/find-page.command.ts +2 -15
  145. package/commands/page/index.ts +0 -3
  146. package/commands/page/update-page.command.ts +0 -5
  147. package/commands/prompt/create-prompt.command.ts +0 -2
  148. package/commands/prompt/index.ts +0 -3
  149. package/commands/prompt/update-prompt.command.ts +0 -2
  150. package/commands/prompt-category/create-prompt-category.command.ts +0 -3
  151. package/commands/prompt-category/index.ts +0 -3
  152. package/commands/prompt-category/update-prompt-category.command.ts +0 -3
  153. package/commands/prompt-topic/create-prompt-topic.command.ts +0 -5
  154. package/commands/prompt-topic/index.ts +0 -3
  155. package/commands/prompt-topic/update-prompt-topic.command.ts +0 -5
  156. package/commands/question/create-question.command.ts +0 -2
  157. package/commands/question/index.ts +0 -3
  158. package/commands/question/update-question.command.ts +0 -2
  159. package/commands/team-account/get-team-account-statistics-by-month.command.ts +14 -7
  160. package/commands/team-account/get-team-account-statistics-overview.command.ts +2 -6
  161. package/commands/team-account/index.ts +0 -1
  162. package/commands/ui-notification/create-admin-broadcast-ui-notification.command.ts +2 -9
  163. package/commands/unregistered-user/patch-locale.command.ts +1 -1
  164. package/commands/user/get-me.command.ts +1 -2
  165. package/commands/user/patch-locale.command.ts +1 -1
  166. package/constants/cabinet/enums/index.ts +0 -1
  167. package/constants/subscription/enums/index.ts +0 -1
  168. package/constants/tool/enums/index.ts +1 -0
  169. package/constants/tool/enums/job-request-origin.enum.ts +4 -0
  170. package/constants/user/enums/index.ts +1 -0
  171. package/constants/user/enums/locale.enum.ts +4 -0
  172. package/models/canvas-node.schema.ts +167 -41
  173. package/models/canvas-template.schema.ts +28 -9
  174. package/models/index.ts +0 -10
  175. package/models/ui-notification.schema.ts +7 -14
  176. package/models/user.schema.ts +1 -1
  177. package/package.json +1 -2
  178. package/build/commands/blog/create-post-translation.command.js +0 -23
  179. package/build/commands/blog/get-all-post-translations.query.js +0 -14
  180. package/build/commands/blog/update-post-translation.command.js +0 -23
  181. package/build/commands/category/create-category-translation.command.js +0 -21
  182. package/build/commands/category/get-all-category-translations.query.js +0 -14
  183. package/build/commands/category/update-category-translation.command.js +0 -21
  184. package/build/commands/course/create-course-translation.command.js +0 -22
  185. package/build/commands/course/create-lesson-translation.command.js +0 -18
  186. package/build/commands/course/create-section-translation.command.js +0 -18
  187. package/build/commands/course/get-all-course-translations.query.js +0 -14
  188. package/build/commands/course/get-all-lesson-translations.query.js +0 -14
  189. package/build/commands/course/get-all-section-translations.query.js +0 -14
  190. package/build/commands/course/update-course-translation.command.js +0 -22
  191. package/build/commands/course/update-lesson-translation.command.js +0 -18
  192. package/build/commands/course/update-section-translation.command.js +0 -18
  193. package/build/commands/page/create-page-translation.command.js +0 -23
  194. package/build/commands/page/get-all-page-translations.query.js +0 -14
  195. package/build/commands/page/update-page-translation.command.js +0 -23
  196. package/build/commands/prompt/create-prompt-translation.command.js +0 -19
  197. package/build/commands/prompt/get-all-prompt-translations.query.js +0 -14
  198. package/build/commands/prompt/update-prompt-translation.command.js +0 -19
  199. package/build/commands/prompt-category/create-prompt-category-translation.command.js +0 -20
  200. package/build/commands/prompt-category/get-all-prompt-category-translations.query.js +0 -14
  201. package/build/commands/prompt-category/update-prompt-category-translation.command.js +0 -20
  202. package/build/commands/prompt-topic/create-prompt-topic-translation.command.js +0 -22
  203. package/build/commands/prompt-topic/get-all-prompt-topic-translations.query.js +0 -14
  204. package/build/commands/prompt-topic/update-prompt-topic-translation.command.js +0 -22
  205. package/build/commands/question/create-question-translation.command.js +0 -19
  206. package/build/commands/question/get-all-question-translations.query.js +0 -14
  207. package/build/commands/question/update-question-translation.command.js +0 -19
  208. package/build/commands/team-account/update-team-account-invite.command.js +0 -17
  209. package/build/constants/cabinet/enums/statistics-request-type.enum.js +0 -24
  210. package/build/constants/subscription/enums/subscription-balance-field.enum.js +0 -8
  211. package/build/models/category-translation.schema.js +0 -16
  212. package/build/models/course-translation.schema.js +0 -17
  213. package/build/models/lesson-translation.schema.js +0 -13
  214. package/build/models/page-translation.schema.js +0 -18
  215. package/build/models/post-translation.schema.js +0 -18
  216. package/build/models/prompt-category-translation.schema.js +0 -18
  217. package/build/models/prompt-topic-translation.schema.js +0 -20
  218. package/build/models/prompt-translation.schema.js +0 -14
  219. package/build/models/question-translation.schema.js +0 -14
  220. package/build/models/section-translation.schema.js +0 -13
  221. package/commands/blog/create-post-translation.command.ts +0 -28
  222. package/commands/blog/get-all-post-translations.query.ts +0 -16
  223. package/commands/blog/update-post-translation.command.ts +0 -28
  224. package/commands/canvas-node/create-canvas-node.command.ts +0 -25
  225. package/commands/canvas-node/update-canvas-node.command.ts +0 -26
  226. package/commands/category/create-category-translation.command.ts +0 -26
  227. package/commands/category/get-all-category-translations.query.ts +0 -16
  228. package/commands/category/update-category-translation.command.ts +0 -26
  229. package/commands/course/create-course-translation.command.ts +0 -27
  230. package/commands/course/create-lesson-translation.command.ts +0 -23
  231. package/commands/course/create-section-translation.command.ts +0 -23
  232. package/commands/course/get-all-course-translations.query.ts +0 -16
  233. package/commands/course/get-all-lesson-translations.query.ts +0 -16
  234. package/commands/course/get-all-section-translations.query.ts +0 -16
  235. package/commands/course/update-course-translation.command.ts +0 -27
  236. package/commands/course/update-lesson-translation.command.ts +0 -23
  237. package/commands/course/update-section-translation.command.ts +0 -23
  238. package/commands/page/create-page-translation.command.ts +0 -28
  239. package/commands/page/get-all-page-translations.query.ts +0 -16
  240. package/commands/page/update-page-translation.command.ts +0 -28
  241. package/commands/prompt/create-prompt-translation.command.ts +0 -24
  242. package/commands/prompt/get-all-prompt-translations.query.ts +0 -16
  243. package/commands/prompt/update-prompt-translation.command.ts +0 -24
  244. package/commands/prompt-category/create-prompt-category-translation.command.ts +0 -25
  245. package/commands/prompt-category/get-all-prompt-category-translations.query.ts +0 -16
  246. package/commands/prompt-category/update-prompt-category-translation.command.ts +0 -25
  247. package/commands/prompt-topic/create-prompt-topic-translation.command.ts +0 -27
  248. package/commands/prompt-topic/get-all-prompt-topic-translations.query.ts +0 -16
  249. package/commands/prompt-topic/update-prompt-topic-translation.command.ts +0 -27
  250. package/commands/question/create-question-translation.command.ts +0 -24
  251. package/commands/question/get-all-question-translations.query.ts +0 -16
  252. package/commands/question/update-question-translation.command.ts +0 -24
  253. package/commands/team-account/update-team-account-invite.command.ts +0 -22
  254. package/constants/cabinet/enums/statistics-request-type.enum.ts +0 -20
  255. package/constants/subscription/enums/subscription-balance-field.enum.ts +0 -4
  256. package/models/category-translation.schema.ts +0 -14
  257. package/models/course-translation.schema.ts +0 -15
  258. package/models/lesson-translation.schema.ts +0 -11
  259. package/models/page-translation.schema.ts +0 -16
  260. package/models/post-translation.schema.ts +0 -16
  261. package/models/prompt-category-translation.schema.ts +0 -13
  262. package/models/prompt-topic-translation.schema.ts +0 -15
  263. package/models/prompt-translation.schema.ts +0 -12
  264. package/models/question-translation.schema.ts +0 -12
  265. package/models/section-translation.schema.ts +0 -11
  266. /package/build/commands/{canvas → ai-studio/canvas}/index.js +0 -0
  267. /package/build/commands/{canvas-edge → ai-studio/canvas-edge}/delete-canvas-edge.command.js +0 -0
  268. /package/build/commands/{canvas-edge → ai-studio/canvas-edge}/index.js +0 -0
  269. /package/build/commands/{canvas-node → ai-studio/canvas-node}/index.js +0 -0
  270. /package/commands/{canvas → ai-studio/canvas}/index.ts +0 -0
  271. /package/commands/{canvas-edge → ai-studio/canvas-edge}/delete-canvas-edge.command.ts +0 -0
  272. /package/commands/{canvas-edge → ai-studio/canvas-edge}/index.ts +0 -0
  273. /package/commands/{canvas-node → ai-studio/canvas-node}/index.ts +0 -0
@@ -4,10 +4,6 @@ import { CategorySchema } from '../../models';
4
4
  export namespace CreateCategoryCommand {
5
5
  export const RequestSchema = CategorySchema.omit({
6
6
  uuid: true,
7
- name: true,
8
- prompt: true,
9
- placeholder: true,
10
- seoName: true,
11
7
  createdAt: true,
12
8
  updatedAt: true,
13
9
  });
@@ -1,7 +1,4 @@
1
1
  export * from './create-category.command';
2
- export * from './create-category-translation.command';
3
2
  export * from './delete-category.command';
4
3
  export * from './find-category.command';
5
- export * from './get-all-category-translations.query';
6
4
  export * from './update-category.command';
7
- export * from './update-category-translation.command';
@@ -6,10 +6,6 @@ export namespace UpdateCategoryCommand {
6
6
  createdAt: true,
7
7
  updatedAt: true,
8
8
  uuid: true,
9
- name: true,
10
- prompt: true,
11
- placeholder: true,
12
- seoName: true,
13
9
  }).partial();
14
10
 
15
11
  export type Request = z.infer<typeof RequestSchema>;
@@ -4,11 +4,6 @@ import { CourseSchema } from '../../models';
4
4
  export namespace CreateCourseCommand {
5
5
  export const RequestSchema = CourseSchema.omit({
6
6
  uuid: true,
7
- title: true,
8
- subtitle: true,
9
- prerequisites: true,
10
- description: true,
11
- skills: true,
12
7
  createdAt: true,
13
8
  updatedAt: true,
14
9
  });
@@ -1,12 +1,3 @@
1
1
  export * from './create-course.command';
2
- export * from './create-course-translation.command';
3
- export * from './create-lesson-translation.command';
4
- export * from './create-section-translation.command';
5
2
  export * from './find-course-by-alias.command';
6
3
  export * from './find-course-by-uuid.command';
7
- export * from './get-all-course-translations.query';
8
- export * from './get-all-section-translations.query';
9
- export * from './get-all-lesson-translations.query';
10
- export * from './update-course-translation.command';
11
- export * from './update-lesson-translation.command';
12
- export * from './update-section-translation.command';
package/commands/index.ts CHANGED
@@ -3,9 +3,11 @@ export * from './ai-model';
3
3
  export * from './ai-vendor';
4
4
  export * from './auth';
5
5
  export * from './blog';
6
- export * from './canvas';
7
- export * from './canvas-node';
8
- export * from './canvas-edge';
6
+ export * from './ai-studio/canvas';
7
+ export * from './ai-studio/canvas-node';
8
+ export * from './ai-studio/canvas-edge';
9
+ export * from './ai-studio/canvas-template';
10
+ export * from './ai-studio/canvas-tool';
9
11
  export * from './category';
10
12
  export * from './chat';
11
13
  export * from './course';
@@ -49,5 +51,3 @@ export * from './user-profile';
49
51
  export * from './team-account';
50
52
  export * from './team-to-subscription';
51
53
  export * from './team-to-product';
52
-
53
- export * from './canvas-template';
@@ -7,12 +7,6 @@ export namespace CreatePageCommand {
7
7
  uuid: true,
8
8
  createdAt: true,
9
9
  updatedAt: true,
10
- metaTitle: true,
11
- metaDescription: true,
12
- title: true,
13
- subTitle: true,
14
- seoTextMd: true,
15
- toolTitle: true,
16
10
  })
17
11
  .refine(
18
12
  (data) => {
@@ -1,11 +1,8 @@
1
1
  import {
2
2
  AiModelSchema,
3
3
  CategorySchema,
4
- CategoryTranslationSchema,
5
4
  PageSchema,
6
- PageTranslationSchema,
7
5
  QuestionSchema,
8
- QuestionTranslationSchema,
9
6
  ToolSchema,
10
7
  } from '../../models';
11
8
  import { z } from 'zod';
@@ -25,20 +22,10 @@ export namespace FindPageCommand {
25
22
 
26
23
  export const ResponseByUUIDSchema = z.object({
27
24
  data: PageSchema.extend({
28
- locales: z.array(PageTranslationSchema),
29
- category: z.union([
30
- CategorySchema.extend({
31
- locales: z.array(CategoryTranslationSchema),
32
- }),
33
- z.null(),
34
- ]),
25
+ category: z.union([CategorySchema, z.null()]),
35
26
  aIModel: z.union([AiModelSchema, z.null()]),
36
27
  tool: ToolSchema.nullable(),
37
- questions: z.array(
38
- QuestionSchema.extend({
39
- locales: z.array(QuestionTranslationSchema),
40
- }),
41
- ),
28
+ questions: z.array(QuestionSchema),
42
29
  }),
43
30
  });
44
31
 
@@ -1,9 +1,6 @@
1
1
  export * from './create-page.command';
2
- export * from './create-page-translation.command';
3
2
  export * from './delete-page.command';
4
3
  export * from './find-page-by-alias.command';
5
4
  export * from './find-pages-by-criteria.command';
6
5
  export * from './find-page.command';
7
- export * from './get-all-page-translations.query';
8
6
  export * from './update-page.command';
9
- export * from './update-page-translation.command';
@@ -6,11 +6,6 @@ export namespace UpdatePageCommand {
6
6
  createdAt: true,
7
7
  updatedAt: true,
8
8
  uuid: true,
9
- metaTitle: true,
10
- metaDescription: true,
11
- title: true,
12
- subTitle: true,
13
- seoTextMd: true,
14
9
  }).partial();
15
10
 
16
11
  export type Request = z.infer<typeof RequestSchema>;
@@ -4,8 +4,6 @@ import { PromptSchema } from '../../models';
4
4
  export namespace CreatePromptCommand {
5
5
  export const RequestSchema = PromptSchema.omit({
6
6
  uuid: true,
7
- title: true,
8
- content: true,
9
7
  createdAt: true,
10
8
  updatedAt: true,
11
9
  });
@@ -1,9 +1,6 @@
1
1
  export * from './create-prompt.command';
2
- export * from './create-prompt-translation.command';
3
2
  export * from './delete-prompt.command';
4
3
  export * from './update-prompt.command';
5
- export * from './update-prompt-translation.command';
6
4
  export * from './find-prompt-by-uuid.command';
7
5
  export * from './find-all-prompts.command';
8
- export * from './get-all-prompt-translations.query';
9
6
  export * from './find-prompts-by-topic.command';
@@ -4,8 +4,6 @@ import { PromptSchema } from '../../models';
4
4
  export namespace UpdatePromptCommand {
5
5
  export const RequestSchema = PromptSchema.omit({
6
6
  uuid: true,
7
- title: true,
8
- content: true,
9
7
  createdAt: true,
10
8
  updatedAt: true,
11
9
  }).partial();
@@ -4,9 +4,6 @@ import { PromptCategorySchema } from '../../models';
4
4
  export namespace CreatePromptCategoryCommand {
5
5
  export const RequestSchema = PromptCategorySchema.omit({
6
6
  uuid: true,
7
- title: true,
8
- metaTitle: true,
9
- metaDescription: true,
10
7
  createdAt: true,
11
8
  updatedAt: true,
12
9
  });
@@ -1,9 +1,6 @@
1
1
  export * from './create-prompt-category.command';
2
- export * from './create-prompt-category-translation.command';
3
2
  export * from './delete-prompt-category.command';
4
3
  export * from './update-prompt-category.command';
5
- export * from './update-prompt-category-translation.command';
6
4
  export * from './find-all-prompt-categories.command';
7
- export * from './get-all-prompt-category-translations.query';
8
5
  export * from './find-prompt-category-by-alias.command';
9
6
  export * from './find-prompt-category-by-uuid.command';
@@ -4,9 +4,6 @@ import { PromptCategorySchema } from '../../models';
4
4
  export namespace UpdatePromptCategoryCommand {
5
5
  export const RequestSchema = PromptCategorySchema.omit({
6
6
  uuid: true,
7
- title: true,
8
- metaTitle: true,
9
- metaDescription: true,
10
7
  createdAt: true,
11
8
  updatedAt: true,
12
9
  }).partial();
@@ -4,11 +4,6 @@ import { PromptTopicSchema } from '../../models';
4
4
  export namespace CreatePromptTopicCommand {
5
5
  export const RequestSchema = PromptTopicSchema.omit({
6
6
  uuid: true,
7
- title: true,
8
- content: true,
9
- metaTitle: true,
10
- metaDescription: true,
11
- seoText: true,
12
7
  createdAt: true,
13
8
  updatedAt: true,
14
9
  });
@@ -1,10 +1,7 @@
1
1
  export * from './create-prompt-topic.command';
2
- export * from './create-prompt-topic-translation.command';
3
2
  export * from './delete-prompt-topic.command';
4
3
  export * from './update-prompt-topic.command';
5
- export * from './update-prompt-topic-translation.command';
6
4
  export * from './find-prompt-topic-by-category.command';
7
5
  export * from './find-prompt-topic-by-alias.command';
8
6
  export * from './find-all-prompt-topics.command';
9
- export * from './get-all-prompt-topic-translations.query';
10
7
  export * from './find-prompt-topic-by-uuid.command';
@@ -4,11 +4,6 @@ import { PromptTopicSchema } from '../../models';
4
4
  export namespace UpdatePromptTopicCommand {
5
5
  export const RequestSchema = PromptTopicSchema.omit({
6
6
  uuid: true,
7
- title: true,
8
- content: true,
9
- metaTitle: true,
10
- metaDescription: true,
11
- seoText: true,
12
7
  createdAt: true,
13
8
  updatedAt: true,
14
9
  }).partial();
@@ -6,8 +6,6 @@ export namespace CreateQuestionCommand {
6
6
  uuid: true,
7
7
  createdAt: true,
8
8
  updatedAt: true,
9
- question: true,
10
- answer: true,
11
9
  });
12
10
 
13
11
  export type Request = z.infer<typeof RequestSchema>;
@@ -1,7 +1,4 @@
1
1
  export * from './create-question.command';
2
- export * from './create-question-translation.command';
3
2
  export * from './delete-question.command';
4
3
  export * from './find-question.command';
5
- export * from './get-all-question-translations.query';
6
4
  export * from './update-question.command';
7
- export * from './update-question-translation.command';
@@ -6,8 +6,6 @@ export namespace UpdateQuestionCommand {
6
6
  createdAt: true,
7
7
  updatedAt: true,
8
8
  uuid: true,
9
- question: true,
10
- answer: true,
11
9
  }).partial();
12
10
 
13
11
  export type Request = z.infer<typeof RequestSchema>;
@@ -1,13 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
3
- import { STATISTICS_METRIC_TYPE, STATISTICS_REQUEST_TYPE } from '../../constants';
2
+ import { JOB_REQUEST_ORIGIN, STATISTICS_METRIC_TYPE } from '../../constants';
4
3
 
5
4
  export namespace GetTeamAccountStatisticsByMonthCommand {
6
5
  export const RequestSchema = z.object({
7
- callOrigin: z
8
- .nativeEnum(STATISTICS_CALL_ORIGIN)
9
- .default(STATISTICS_CALL_ORIGIN.WEB)
10
- .optional(),
6
+ origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API).optional(),
11
7
  metric: z
12
8
  .nativeEnum(STATISTICS_METRIC_TYPE)
13
9
  .default(STATISTICS_METRIC_TYPE.REQUESTS)
@@ -19,7 +15,18 @@ export namespace GetTeamAccountStatisticsByMonthCommand {
19
15
 
20
16
  export const TeamAccountStatisticsByMonthItemSchema = z.object({
21
17
  month: z.string(),
22
- statistics: z.record(z.nativeEnum(STATISTICS_REQUEST_TYPE), z.number()),
18
+ total_texts: z.number(),
19
+ total_audios: z.number(),
20
+ total_images: z.number(),
21
+ total_videos: z.number(),
22
+ total_presentations: z.number(),
23
+ total_paraphrases: z.number(),
24
+ writers: z.object({
25
+ total_writers: z.number(),
26
+ total_writer_actions: z.number(),
27
+ }),
28
+ total_video_edits: z.number(),
29
+ total_musics: z.number(),
23
30
  });
24
31
 
25
32
  export const ResponseSchema = z.object({
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
3
- import { GROUP_BY } from '../../constants';
2
+ import { GROUP_BY, JOB_REQUEST_ORIGIN } from '../../constants';
4
3
 
5
4
  export namespace GetTeamAccountStatisticsOverviewCommand {
6
5
  export const RequestSchema = z.object({
@@ -11,10 +10,7 @@ export namespace GetTeamAccountStatisticsOverviewCommand {
11
10
  message: 'to must be a valid date string',
12
11
  }),
13
12
  groupBy: z.nativeEnum(GROUP_BY).default(GROUP_BY.DAY),
14
- callOrigin: z
15
- .nativeEnum(STATISTICS_CALL_ORIGIN)
16
- .default(STATISTICS_CALL_ORIGIN.WEB)
17
- .optional(),
13
+ origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API).optional(),
18
14
  memberUserId: z.string().uuid().optional(),
19
15
  });
20
16
 
@@ -2,7 +2,6 @@ export * from './create-team-account.command';
2
2
  export * from './update-team-account.command';
3
3
  export * from './cancel-team-trial-subscription.command';
4
4
  export * from './invite-team-account-member.command';
5
- export * from './update-team-account-invite.command';
6
5
  export * from './accept-team-account-invite.command';
7
6
  export * from './remove-team-account-member.command';
8
7
  export * from './leave-team-account-member.command';
@@ -1,16 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { LOCALE } from '@purpleschool/rugpt-lib-common';
3
2
 
4
3
  export namespace CreateAdminBroadcastUiNotificationCommand {
5
4
  export const RequestBodySchema = z.object({
6
- title: z.object({
7
- [LOCALE.RU]: z.string().trim().min(1),
8
- [LOCALE.EN]: z.string().trim().min(1),
9
- }),
10
- message: z.object({
11
- [LOCALE.RU]: z.string().trim().min(1),
12
- [LOCALE.EN]: z.string().trim().min(1),
13
- }),
5
+ title: z.string().trim().min(1),
6
+ message: z.string().trim().min(1),
14
7
  onlyRegistered: z.boolean().optional(),
15
8
  });
16
9
 
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { LOCALE } from '@purpleschool/rugpt-lib-common';
2
+ import { LOCALE } from '../../constants';
3
3
 
4
4
  export namespace PatchUnregisteredUserLocaleCommand {
5
5
  export const RequestSchema = z.object({
@@ -1,7 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { ROLE, SIGNUP_METHOD, USER_STATUS } from '../../constants';
2
+ import { LOCALE, ROLE, SIGNUP_METHOD, USER_STATUS } from '../../constants';
3
3
  import { UserProfileResponseSchema } from '../../models';
4
- import { LOCALE } from '@purpleschool/rugpt-lib-common';
5
4
 
6
5
  export namespace GetMeCommand {
7
6
  export const RequestSchema = z.object({});
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { LOCALE } from '@purpleschool/rugpt-lib-common';
2
+ import { LOCALE } from '../../constants';
3
3
 
4
4
  export namespace PatchUserLocaleCommand {
5
5
  export const RequestSchema = z.object({
@@ -1,3 +1,2 @@
1
1
  export * from './group-by.enum';
2
2
  export * from './statistics-metric-type.enum';
3
- export * from './statistics-request-type.enum';
@@ -1,5 +1,4 @@
1
1
  export * from './subscription-action.enum';
2
- export * from './subscription-balance-field.enum';
3
2
  export * from './subscription-feature-type.enum';
4
3
  export * from './subscription-plan.enum';
5
4
  export * from './subscription-status.enum';
@@ -1,6 +1,7 @@
1
1
  export * from './tool-content-type.enum';
2
2
  export * from './tool-group.enum';
3
3
  export * from './tool-job-status.enum';
4
+ export * from './job-request-origin.enum';
4
5
  export * from './tool-type.enum';
5
6
  export * from './tool-workspace-item-slot.enum';
6
7
  export * from './tool-workspace-status.enum';
@@ -0,0 +1,4 @@
1
+ export enum JOB_REQUEST_ORIGIN {
2
+ API = 'api',
3
+ B2B = 'b2b',
4
+ }
@@ -2,3 +2,4 @@ export * from './singup-method.enum';
2
2
  export * from './user-status';
3
3
  export * from './user-sort-by.enum';
4
4
  export * from './sort-order.enum';
5
+ export * from './locale.enum';
@@ -0,0 +1,4 @@
1
+ export enum LOCALE {
2
+ RU = 'ru',
3
+ EN = 'en',
4
+ }