@purpleschool/gptbot-tools 0.1.133 → 0.2.0-stage

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 (305) hide show
  1. package/account-merge/commands/index.ts +1 -0
  2. package/account-merge/commands/transfer-user-jobs.command.ts +13 -0
  3. package/account-merge/index.ts +2 -0
  4. package/account-merge/routes/account-merge.amqp.routes.ts +3 -0
  5. package/account-merge/routes/index.ts +1 -0
  6. package/ai-proxy/routes/ai-proxy.routes.ts +1 -0
  7. package/analytics/index.ts +1 -0
  8. package/analytics/job-model-analytics/commands/get-job-model-analytics.command.ts +12 -0
  9. package/analytics/job-model-analytics/commands/index.ts +1 -0
  10. package/analytics/job-model-analytics/index.ts +2 -0
  11. package/analytics/job-model-analytics/routes/index.ts +1 -0
  12. package/analytics/job-model-analytics/routes/job-model-analytics.http.routes.ts +5 -0
  13. package/build/account-merge/commands/index.js +17 -0
  14. package/build/account-merge/commands/transfer-user-jobs.command.js +13 -0
  15. package/build/account-merge/index.js +18 -0
  16. package/build/account-merge/routes/account-merge.amqp.routes.js +6 -0
  17. package/build/account-merge/routes/index.js +17 -0
  18. package/build/ai-proxy/routes/ai-proxy.routes.js +1 -0
  19. package/build/analytics/index.js +17 -0
  20. package/build/analytics/job-model-analytics/commands/get-job-model-analytics.command.js +11 -0
  21. package/build/analytics/job-model-analytics/commands/index.js +17 -0
  22. package/build/analytics/job-model-analytics/index.js +18 -0
  23. package/build/analytics/job-model-analytics/routes/index.js +17 -0
  24. package/build/analytics/job-model-analytics/routes/job-model-analytics.http.routes.js +7 -0
  25. package/build/common/enums/file-type.enum.js +8 -0
  26. package/build/common/enums/index.js +1 -0
  27. package/build/common/enums/reasoning-effort.enum.js +6 -1
  28. package/build/image-editor/commands/image-editor.command.js +1 -0
  29. package/build/image-editor/models/image-editor-job.schema.js +2 -0
  30. package/build/image-editor/models/image-editor-model.schema.js +6 -0
  31. package/build/image-generation/models/image-generation-job.schema.js +1 -0
  32. package/build/image-generation/models/image-generation-model.schema.js +1 -0
  33. package/build/image-generation/queries/find-image-generation-jobs.query.js +2 -0
  34. package/build/index.js +18 -0
  35. package/build/marketplace-card/commands/execute-marketplace-card.command.js +34 -0
  36. package/build/marketplace-card/commands/get-marketplace-card-price.command.js +13 -0
  37. package/build/marketplace-card/commands/index.js +23 -0
  38. package/build/marketplace-card/commands/retry-marketplace-card-job.command.js +26 -0
  39. package/build/marketplace-card/commands/set-reaction-to-marketplace-card-job.command.js +27 -0
  40. package/build/marketplace-card/commands/soft-delete-all-marketplace-card-jobs.command.js +13 -0
  41. package/build/marketplace-card/commands/soft-delete-marketplace-card-job-by-uuid.command.js +14 -0
  42. package/build/marketplace-card/commands/update-title-marketplace-card-job.command.js +16 -0
  43. package/build/marketplace-card/enums/index.js +17 -0
  44. package/build/marketplace-card/enums/marketplace-card-strategy.enum.js +10 -0
  45. package/build/marketplace-card/index.js +21 -0
  46. package/build/marketplace-card/models/index.js +20 -0
  47. package/build/marketplace-card/models/marketplace-card-config.schema.js +10 -0
  48. package/build/marketplace-card/models/marketplace-card-job.schema.js +34 -0
  49. package/build/marketplace-card/models/marketplace-card-model.schema.js +31 -0
  50. package/build/marketplace-card/models/marketplace-card-style-preset.schema.js +13 -0
  51. package/build/marketplace-card/queries/find-marketplace-card-job-by-uuid.query.js +15 -0
  52. package/build/marketplace-card/queries/find-marketplace-card-jobs.query.js +28 -0
  53. package/build/marketplace-card/queries/get-marketplace-card-config.query.js +11 -0
  54. package/build/marketplace-card/queries/index.js +19 -0
  55. package/build/marketplace-card/routes/index.js +17 -0
  56. package/build/marketplace-card/routes/marketplace-card.amqp.routes.js +15 -0
  57. package/build/presentation/commands/create-presentation.command.js +3 -0
  58. package/build/presentation/commands/generate-slides.command.js +1 -0
  59. package/build/presentation/commands/get-presentation-slides-generation-price.command.js +1 -0
  60. package/build/presentation/commands/index.js +1 -0
  61. package/build/presentation/commands/reposition-slide.command.js +16 -0
  62. package/build/presentation/enums/index.js +1 -0
  63. package/build/presentation/enums/presentation-target-audience.enum.js +10 -0
  64. package/build/presentation/models/index.js +1 -0
  65. package/build/presentation/models/presentation-template.schema.js +2 -0
  66. package/build/presentation/models/presentation-title-page.schema.js +9 -0
  67. package/build/presentation/models/presentation.schema.js +4 -0
  68. package/build/presentation/models/slide-content-edit.schema.js +24 -12
  69. package/build/presentation/models/slide-content.schema.js +215 -73
  70. package/build/presentation/routes/presentation.routes.js +4 -1
  71. package/build/solving-edu-task/commands/delete-all-solving-edu-task-jobs.command.js +13 -0
  72. package/build/solving-edu-task/commands/delete-solving-edu-task-job-by-uuid.command.js +14 -0
  73. package/build/solving-edu-task/commands/get-solving-edu-task-price.command.js +15 -0
  74. package/build/solving-edu-task/commands/index.js +23 -0
  75. package/build/solving-edu-task/commands/retry-solving-edu-task-job.command.js +25 -0
  76. package/build/solving-edu-task/commands/set-reaction-to-solving-edu-task-job.command.js +27 -0
  77. package/build/solving-edu-task/commands/solving-edu-task.command.js +22 -0
  78. package/build/solving-edu-task/commands/update-solving-edu-task-job-title.command.js +16 -0
  79. package/build/solving-edu-task/index.js +20 -0
  80. package/build/solving-edu-task/models/index.js +19 -0
  81. package/build/solving-edu-task/models/solving-edu-task-config.schema.js +8 -0
  82. package/build/solving-edu-task/models/solving-edu-task-job.schema.js +32 -0
  83. package/build/solving-edu-task/models/solving-edu-task-model.schema.js +27 -0
  84. package/build/solving-edu-task/queries/find-solving-edu-task-job-by-id.query.js +15 -0
  85. package/build/solving-edu-task/queries/find-solving-edu-task-jobs.query.js +28 -0
  86. package/build/solving-edu-task/queries/get-solving-edu-task-config.query.js +11 -0
  87. package/build/solving-edu-task/queries/index.js +19 -0
  88. package/build/solving-edu-task/routes/index.js +17 -0
  89. package/build/solving-edu-task/routes/solving-edu-task.amqp.routes.js +15 -0
  90. package/build/spell-corrector/commands/delete-all-spell-corrector-jobs.command.js +13 -0
  91. package/build/spell-corrector/commands/delete-spell-corrector-job-by-uuid.command.js +14 -0
  92. package/build/spell-corrector/commands/get-spell-corrector-price.command.js +15 -0
  93. package/build/spell-corrector/commands/index.js +23 -0
  94. package/build/spell-corrector/commands/retry-spell-corrector-job.command.js +17 -0
  95. package/build/spell-corrector/commands/set-reaction-to-spell-corrector-job.command.js +27 -0
  96. package/build/spell-corrector/commands/spell-corrector.command.js +18 -0
  97. package/build/spell-corrector/commands/update-spell-corrector-job-title.command.js +16 -0
  98. package/build/spell-corrector/index.js +20 -0
  99. package/build/spell-corrector/models/index.js +19 -0
  100. package/build/spell-corrector/models/spell-corrector-job.schema.js +25 -0
  101. package/build/spell-corrector/models/spell-corrector-model.schema.js +18 -0
  102. package/build/spell-corrector/models/spell-corrector-tool-config.schema.js +9 -0
  103. package/build/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.js +10 -0
  104. package/build/spell-corrector/queries/find-spell-corrector-jobs.query.js +28 -0
  105. package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.js +9 -0
  106. package/build/spell-corrector/queries/index.js +19 -0
  107. package/build/spell-corrector/routes/index.js +17 -0
  108. package/build/spell-corrector/routes/spell-corrector.amqp.routes.js +15 -0
  109. package/build/stt/models/stt-response.schema.js +2 -0
  110. package/build/tool-workspace/commands/index.js +18 -0
  111. package/build/tool-workspace/commands/soft-delete-tool-workspace.command.js +21 -0
  112. package/build/tool-workspace/commands/update-tool-workspace.command.js +26 -0
  113. package/build/tool-workspace/enums/index.js +18 -0
  114. package/build/tool-workspace/enums/tool-workspace-item-slot.enum.js +9 -0
  115. package/build/tool-workspace/enums/tool-workspace-status.enum.js +8 -0
  116. package/build/tool-workspace/index.js +21 -0
  117. package/build/tool-workspace/models/index.js +20 -0
  118. package/build/tool-workspace/models/tool-workspace-contents.schema.js +10 -0
  119. package/build/tool-workspace/models/tool-workspace-item.schema.js +17 -0
  120. package/build/tool-workspace/models/tool-workspace-job.schema.js +17 -0
  121. package/build/tool-workspace/models/tool-workspace.schema.js +17 -0
  122. package/build/tool-workspace/queries/find-tool-workspace-by-uuid.query.js +22 -0
  123. package/build/tool-workspace/queries/find-tool-workspaces.query.js +30 -0
  124. package/build/tool-workspace/queries/index.js +18 -0
  125. package/build/tool-workspace/routes/index.js +17 -0
  126. package/build/tool-workspace/routes/tool-workspace.amqp.routes.js +9 -0
  127. package/build/tools/enums/tool-content-type.enum.js +3 -0
  128. package/build/tools/enums/tool-type.enum.js +3 -0
  129. package/build/tools/models/global-tools-config.schema.js +6 -0
  130. package/build/tools/models/tools-with-configs.schema.js +15 -0
  131. package/build/video/commands/video.command.js +7 -0
  132. package/build/video/const/videoMaxDuration.js +1 -1
  133. package/build/video/enums/video-resolution.enum.js +1 -0
  134. package/build/video/enums/video-strategy.enum.js +1 -0
  135. package/build/video/models/video-config.schema.js +2 -0
  136. package/build/video/models/video-model.schema.js +1 -0
  137. package/build/video-editor/commands/edit-video.command.js +1 -0
  138. package/build/video-editor/commands/get-video-editor-price.command.js +2 -0
  139. package/build/video-editor/commands/retry-video-editor-job.command.js +1 -0
  140. package/build/video-editor/enums/index.js +1 -0
  141. package/build/video-editor/enums/video-editor-pricing-rule-type.enum.js +8 -0
  142. package/build/video-editor/models/video-editor-job.schema.js +7 -1
  143. package/build/video-editor/models/video-editor-model.schema.js +28 -1
  144. package/build/video-editor/utils/calculate-video-editing-price.js +24 -2
  145. package/build/writer/commands/collect-sources.command.js +15 -0
  146. package/build/writer/commands/confirm-source-citation-metadata.command.js +18 -0
  147. package/build/writer/commands/discard-writer-source.command.js +16 -0
  148. package/build/writer/commands/generate-document-outline.command.js +17 -0
  149. package/build/writer/commands/index.js +5 -0
  150. package/build/writer/commands/update-writer-document-outline.command.js +1 -0
  151. package/build/writer/commands/upload-writer-source.command.js +18 -0
  152. package/build/writer/enums/index.js +3 -0
  153. package/build/writer/enums/writer-document-stage.enum.js +6 -0
  154. package/build/writer/enums/writer-source-origin.enum.js +8 -0
  155. package/build/writer/enums/writer-source-status.enum.js +9 -0
  156. package/build/writer/enums/writer-source-type.enum.js +8 -0
  157. package/build/writer/models/index.js +2 -0
  158. package/build/writer/models/writer-document-type.schema.js +1 -1
  159. package/build/writer/models/writer-document.schema.js +3 -0
  160. package/build/writer/models/writer-source-bibliographic-metadata.schema.js +27 -0
  161. package/build/writer/models/writer-source.schema.js +22 -0
  162. package/build/writer/queries/get-writer-document-sources.query.js +15 -0
  163. package/build/writer/queries/index.js +1 -0
  164. package/build/writer/routes/writer.routes.js +6 -0
  165. package/common/enums/file-type.enum.ts +4 -0
  166. package/common/enums/index.ts +1 -0
  167. package/common/enums/reasoning-effort.enum.ts +5 -0
  168. package/image-editor/commands/image-editor.command.ts +1 -0
  169. package/image-editor/models/image-editor-job.schema.ts +2 -0
  170. package/image-editor/models/image-editor-model.schema.ts +9 -0
  171. package/image-generation/models/image-generation-job.schema.ts +2 -1
  172. package/image-generation/models/image-generation-model.schema.ts +1 -0
  173. package/image-generation/queries/find-image-generation-jobs.query.ts +2 -0
  174. package/index.ts +18 -0
  175. package/marketplace-card/commands/execute-marketplace-card.command.ts +34 -0
  176. package/marketplace-card/commands/get-marketplace-card-price.command.ts +15 -0
  177. package/marketplace-card/commands/index.ts +7 -0
  178. package/marketplace-card/commands/retry-marketplace-card-job.command.ts +26 -0
  179. package/marketplace-card/commands/set-reaction-to-marketplace-card-job.command.ts +30 -0
  180. package/marketplace-card/commands/soft-delete-all-marketplace-card-jobs.command.ts +13 -0
  181. package/marketplace-card/commands/soft-delete-marketplace-card-job-by-uuid.command.ts +14 -0
  182. package/marketplace-card/commands/update-title-marketplace-card-job.command.ts +16 -0
  183. package/marketplace-card/enums/index.ts +1 -0
  184. package/marketplace-card/enums/marketplace-card-strategy.enum.ts +6 -0
  185. package/marketplace-card/index.ts +5 -0
  186. package/marketplace-card/models/index.ts +4 -0
  187. package/marketplace-card/models/marketplace-card-config.schema.ts +9 -0
  188. package/marketplace-card/models/marketplace-card-job.schema.ts +33 -0
  189. package/marketplace-card/models/marketplace-card-model.schema.ts +34 -0
  190. package/marketplace-card/models/marketplace-card-style-preset.schema.ts +12 -0
  191. package/marketplace-card/queries/find-marketplace-card-job-by-uuid.query.ts +16 -0
  192. package/marketplace-card/queries/find-marketplace-card-jobs.query.ts +33 -0
  193. package/marketplace-card/queries/get-marketplace-card-config.query.ts +10 -0
  194. package/marketplace-card/queries/index.ts +3 -0
  195. package/marketplace-card/routes/index.ts +1 -0
  196. package/marketplace-card/routes/marketplace-card.amqp.routes.ts +12 -0
  197. package/package.json +1 -1
  198. package/presentation/commands/create-presentation.command.ts +3 -0
  199. package/presentation/commands/generate-slides.command.ts +2 -1
  200. package/presentation/commands/get-presentation-slides-generation-price.command.ts +1 -0
  201. package/presentation/commands/index.ts +1 -0
  202. package/presentation/commands/reposition-slide.command.ts +16 -0
  203. package/presentation/enums/index.ts +1 -0
  204. package/presentation/enums/presentation-target-audience.enum.ts +6 -0
  205. package/presentation/models/index.ts +1 -0
  206. package/presentation/models/presentation-template.schema.ts +2 -0
  207. package/presentation/models/presentation-title-page.schema.ts +9 -0
  208. package/presentation/models/presentation.schema.ts +5 -1
  209. package/presentation/models/slide-content-edit.schema.ts +36 -24
  210. package/presentation/models/slide-content.schema.ts +294 -90
  211. package/presentation/routes/presentation.routes.ts +4 -0
  212. package/solving-edu-task/commands/delete-all-solving-edu-task-jobs.command.ts +13 -0
  213. package/solving-edu-task/commands/delete-solving-edu-task-job-by-uuid.command.ts +14 -0
  214. package/solving-edu-task/commands/get-solving-edu-task-price.command.ts +17 -0
  215. package/solving-edu-task/commands/index.ts +7 -0
  216. package/solving-edu-task/commands/retry-solving-edu-task-job.command.ts +25 -0
  217. package/solving-edu-task/commands/set-reaction-to-solving-edu-task-job.command.ts +31 -0
  218. package/solving-edu-task/commands/solving-edu-task.command.ts +22 -0
  219. package/solving-edu-task/commands/update-solving-edu-task-job-title.command.ts +16 -0
  220. package/solving-edu-task/index.ts +4 -0
  221. package/solving-edu-task/models/index.ts +3 -0
  222. package/solving-edu-task/models/solving-edu-task-config.schema.ts +8 -0
  223. package/solving-edu-task/models/solving-edu-task-job.schema.ts +35 -0
  224. package/solving-edu-task/models/solving-edu-task-model.schema.ts +30 -0
  225. package/solving-edu-task/queries/find-solving-edu-task-job-by-id.query.ts +16 -0
  226. package/solving-edu-task/queries/find-solving-edu-task-jobs.query.ts +33 -0
  227. package/solving-edu-task/queries/get-solving-edu-task-config.query.ts +11 -0
  228. package/solving-edu-task/queries/index.ts +3 -0
  229. package/solving-edu-task/routes/index.ts +1 -0
  230. package/solving-edu-task/routes/solving-edu-task.amqp.routes.ts +12 -0
  231. package/spell-corrector/commands/delete-all-spell-corrector-jobs.command.ts +13 -0
  232. package/spell-corrector/commands/delete-spell-corrector-job-by-uuid.command.ts +14 -0
  233. package/spell-corrector/commands/get-spell-corrector-price.command.ts +16 -0
  234. package/spell-corrector/commands/index.ts +7 -0
  235. package/spell-corrector/commands/retry-spell-corrector-job.command.ts +17 -0
  236. package/spell-corrector/commands/set-reaction-to-spell-corrector-job.command.ts +30 -0
  237. package/spell-corrector/commands/spell-corrector.command.ts +18 -0
  238. package/spell-corrector/commands/update-spell-corrector-job-title.command.ts +16 -0
  239. package/spell-corrector/index.ts +4 -0
  240. package/spell-corrector/models/index.ts +3 -0
  241. package/spell-corrector/models/spell-corrector-job.schema.ts +25 -0
  242. package/spell-corrector/models/spell-corrector-model.schema.ts +18 -0
  243. package/spell-corrector/models/spell-corrector-tool-config.schema.ts +9 -0
  244. package/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.ts +11 -0
  245. package/spell-corrector/queries/find-spell-corrector-jobs.query.ts +33 -0
  246. package/spell-corrector/queries/get-spell-corrector-tool-config.query.ts +8 -0
  247. package/spell-corrector/queries/index.ts +3 -0
  248. package/spell-corrector/routes/index.ts +1 -0
  249. package/spell-corrector/routes/spell-corrector.amqp.routes.ts +12 -0
  250. package/stt/models/stt-response.schema.ts +2 -0
  251. package/tool-workspace/commands/index.ts +2 -0
  252. package/tool-workspace/commands/soft-delete-tool-workspace.command.ts +25 -0
  253. package/tool-workspace/commands/update-tool-workspace.command.ts +30 -0
  254. package/tool-workspace/enums/index.ts +2 -0
  255. package/tool-workspace/enums/tool-workspace-item-slot.enum.ts +5 -0
  256. package/tool-workspace/enums/tool-workspace-status.enum.ts +4 -0
  257. package/tool-workspace/index.ts +5 -0
  258. package/tool-workspace/models/index.ts +4 -0
  259. package/tool-workspace/models/tool-workspace-contents.schema.ts +10 -0
  260. package/tool-workspace/models/tool-workspace-item.schema.ts +17 -0
  261. package/tool-workspace/models/tool-workspace-job.schema.ts +17 -0
  262. package/tool-workspace/models/tool-workspace.schema.ts +17 -0
  263. package/tool-workspace/queries/find-tool-workspace-by-uuid.query.ts +26 -0
  264. package/tool-workspace/queries/find-tool-workspaces.query.ts +37 -0
  265. package/tool-workspace/queries/index.ts +2 -0
  266. package/tool-workspace/routes/index.ts +1 -0
  267. package/tool-workspace/routes/tool-workspace.amqp.routes.ts +6 -0
  268. package/tools/enums/tool-content-type.enum.ts +3 -0
  269. package/tools/enums/tool-type.enum.ts +3 -0
  270. package/tools/models/global-tools-config.schema.ts +6 -0
  271. package/tools/models/tools-with-configs.schema.ts +21 -0
  272. package/video/commands/video.command.ts +7 -0
  273. package/video/const/videoMaxDuration.ts +1 -1
  274. package/video/enums/video-resolution.enum.ts +1 -0
  275. package/video/enums/video-strategy.enum.ts +1 -0
  276. package/video/models/video-config.schema.ts +2 -0
  277. package/video/models/video-model.schema.ts +1 -0
  278. package/video-editor/commands/edit-video.command.ts +2 -1
  279. package/video-editor/commands/get-video-editor-price.command.ts +2 -0
  280. package/video-editor/commands/retry-video-editor-job.command.ts +5 -1
  281. package/video-editor/enums/index.ts +1 -0
  282. package/video-editor/enums/video-editor-pricing-rule-type.enum.ts +4 -0
  283. package/video-editor/models/video-editor-job.schema.ts +9 -0
  284. package/video-editor/models/video-editor-model.schema.ts +45 -1
  285. package/video-editor/utils/calculate-video-editing-price.ts +45 -2
  286. package/writer/commands/collect-sources.command.ts +15 -0
  287. package/writer/commands/confirm-source-citation-metadata.command.ts +18 -0
  288. package/writer/commands/discard-writer-source.command.ts +18 -0
  289. package/writer/commands/generate-document-outline.command.ts +17 -0
  290. package/writer/commands/index.ts +5 -0
  291. package/writer/commands/update-writer-document-outline.command.ts +1 -0
  292. package/writer/commands/upload-writer-source.command.ts +18 -0
  293. package/writer/enums/index.ts +3 -0
  294. package/writer/enums/writer-document-stage.enum.ts +8 -0
  295. package/writer/enums/writer-source-origin.enum.ts +4 -0
  296. package/writer/enums/writer-source-status.enum.ts +5 -0
  297. package/writer/enums/writer-source-type.enum.ts +4 -0
  298. package/writer/models/index.ts +2 -0
  299. package/writer/models/writer-document-type.schema.ts +1 -1
  300. package/writer/models/writer-document.schema.ts +3 -0
  301. package/writer/models/writer-source-bibliographic-metadata.schema.ts +31 -0
  302. package/writer/models/writer-source.schema.ts +22 -0
  303. package/writer/queries/get-writer-document-sources.query.ts +15 -0
  304. package/writer/queries/index.ts +1 -0
  305. package/writer/routes/writer.routes.ts +6 -0
@@ -10,7 +10,19 @@ export const ImageSlotSchema = z.object({
10
10
  .string()
11
11
  .uuid()
12
12
  .describe('Generate a valid uuid for image slot, that will be used for future lookups'),
13
- prompt: z.string().describe('Image prompt for slide'),
13
+ prompt: z
14
+ .string()
15
+ .describe(
16
+ 'Image generation prompt. MUST be written in ENGLISH regardless of the presentation language. ' +
17
+ 'AI image generators excel at: atmospheric scenes, landscapes, cityscapes, architecture, nature, abstract light and texture, anonymous silhouettes, artistic photography. ' +
18
+ 'AI fundamentally cannot render accurately: legible text on any surface, complex diagrams or flowcharts, data charts/graphs, specific product logos, clocks, precise mechanical parts. ' +
19
+ 'Choose scene types from the first category. Avoid anything in the second. ' +
20
+ 'Structure: [subject/scene] → [mood/atmosphere] → [lighting] → [visual style]. ' +
21
+ 'Evoke the emotional register of the slide — do not illustrate the topic literally. ' +
22
+ 'MODERATION: if the slide topic involves conflict, suffering, politics, or crime, redirect to abstract/atmospheric imagery (fog, ruins, empty landscapes) rather than depicting the subject directly — flagged prompts produce empty placeholders. ' +
23
+ 'GOOD: "A lone figure on an observation deck at dusk gazing over an illuminated city. Cinematic wide-angle, golden-hour light, photorealistic." ' +
24
+ 'BAD: "A bar chart showing quarterly growth. A robot at a laptop with code on the screen."',
25
+ ),
14
26
  });
15
27
  export type ImageSlot = z.infer<typeof ImageSlotSchema>;
16
28
 
@@ -26,18 +38,18 @@ export type IconSlot = z.infer<typeof IconSlotSchema>;
26
38
  export interface ICoverSlideDataStructure {
27
39
  contentType: SLIDE_CONTENT_TYPE.COVER;
28
40
  title: string;
29
- author: { label: string; value: string };
30
- date: { label: string; value: string };
31
- email: { label: string; value: string };
41
+ author?: { label: string; value: string };
42
+ date?: { label: string; value: string };
43
+ email?: { label: string; value: string };
32
44
  version: 1;
33
45
  }
34
46
 
35
47
  export interface IThankYouSlideDataStructure {
36
48
  contentType: SLIDE_CONTENT_TYPE.THANK_YOU;
37
49
  title: string;
38
- author: { label: string; value: string };
39
- date: { label: string; value: string };
40
- email: { label: string; value: string };
50
+ author?: { label: string; value: string };
51
+ date?: { label: string; value: string };
52
+ email?: { label: string; value: string };
41
53
  version: 1;
42
54
  }
43
55
 
@@ -125,24 +137,28 @@ export interface ITimelineSlideDataStructure {
125
137
  export const CoverSlideDataSchema = z.object({
126
138
  contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
127
139
  title: z.string().describe('Slide title in about 6 words').min(10).max(150),
128
- author: z.object({
129
- label: z.string().describe('Literal "Author" in presentation\'s language'),
130
- value: z
131
- .string()
132
- .describe('Literal "Author of the presentation" in presentation\'s language'),
133
- }),
134
- date: z.object({
135
- label: z.string().describe('Literal "Date" in presentation\'s language'),
136
- value: z
137
- .string()
138
- .describe(
139
- 'Date of the presentation in the "dd month yyyy" format in presentation\'s locale',
140
- ),
141
- }),
142
- email: z.object({
143
- label: z.string().describe('Just default word "Email"'),
144
- value: z.string().describe('Just default "email@example.com"'),
145
- }),
140
+ author: z
141
+ .object({
142
+ label: z.string().describe('Literal "Author" in presentation\'s language'),
143
+ value: z.string().describe('Author value from titlePage if provided'),
144
+ })
145
+ .optional(),
146
+ date: z
147
+ .object({
148
+ label: z.string().describe('Literal "Date" in presentation\'s language'),
149
+ value: z
150
+ .string()
151
+ .describe(
152
+ 'Date from titlePage in the "dd month yyyy" format in presentation\'s locale',
153
+ ),
154
+ })
155
+ .optional(),
156
+ email: z
157
+ .object({
158
+ label: z.string().describe('Localized contact/email label'),
159
+ value: z.string().describe('Email value from titlePage if provided'),
160
+ })
161
+ .optional(),
146
162
  version: z.literal(1),
147
163
  }) satisfies z.ZodType<ICoverSlideDataStructure>;
148
164
  export type CoverSlideData = z.infer<typeof CoverSlideDataSchema>;
@@ -154,41 +170,65 @@ export const ThankYouSlideDataSchema = z.object({
154
170
  .describe('"Thank you for your attention" in presentation\'s language')
155
171
  .min(10)
156
172
  .max(150),
157
- author: z.object({
158
- label: z.string().describe('"Author" in presentation\'s language'),
159
- value: z.string().describe('"Author of the presentation" in presentation\'s language'),
160
- }),
161
- date: z.object({
162
- label: z.string().describe('"Date" in presentation\'s language'),
163
- value: z
164
- .string()
165
- .describe(
166
- 'Date of the presentation in the "dd month yyyy" format in presentation\'s locale',
167
- ),
168
- }),
169
- email: z.object({
170
- label: z.string().describe('Just default word "Email"'),
171
- value: z.string().describe('Just default "email@example.com"'),
172
- }),
173
+ author: z
174
+ .object({
175
+ label: z.string().describe('Literal "Author" in presentation\'s language'),
176
+ value: z.string().describe('Author value from titlePage if provided'),
177
+ })
178
+ .optional(),
179
+ date: z
180
+ .object({
181
+ label: z.string().describe('Literal "Date" in presentation\'s language'),
182
+ value: z
183
+ .string()
184
+ .describe(
185
+ 'Date from titlePage in the "dd month yyyy" format in presentation\'s locale',
186
+ ),
187
+ })
188
+ .optional(),
189
+ email: z
190
+ .object({
191
+ label: z.string().describe('Localized contact/email label'),
192
+ value: z.string().describe('Email value from titlePage if provided'),
193
+ })
194
+ .optional(),
173
195
  version: z.literal(1),
174
196
  }) satisfies z.ZodType<IThankYouSlideDataStructure>;
175
197
  export type ThankYouSlideData = z.infer<typeof ThankYouSlideDataSchema>;
176
198
 
177
199
  export const StructuredListSlideDataSchema = z.object({
178
200
  contentType: z.literal(SLIDE_CONTENT_TYPE.STRUCTURED_LIST),
179
- title: z.string().describe('Slide title, 2–6 words').max(150),
180
- description: z.string().describe('One short framing sentence'),
201
+ title: z
202
+ .string()
203
+ .describe(
204
+ 'Slide headline — 2–4 words naming the group. A noun phrase, NOT a full sentence. Displayed in very large font on the left panel.',
205
+ )
206
+ .min(5)
207
+ .max(40),
208
+ description: z
209
+ .string()
210
+ .describe(
211
+ 'One framing sentence answering "What are these 4 things about?". Displayed in small text below the title on the left panel.',
212
+ )
213
+ .min(30)
214
+ .max(80),
181
215
  list: z
182
216
  .array(
183
217
  z.object({
184
- title: z.string().describe('2–4 words, concrete'),
218
+ title: z
219
+ .string()
220
+ .describe(
221
+ '2–4 concrete words. A noun phrase or short verb phrase. All 4 titles MUST be grammatically parallel. Displayed in bold next to a large number (01–04).',
222
+ )
223
+ .min(3)
224
+ .max(30),
185
225
  description: z
186
226
  .string()
187
227
  .describe(
188
- "One clear short framing sentence. DON'T CUT THE TEXT SHORT MID WORD/SENTENCE!. Generate less content if that happened",
228
+ 'ONE complete sentence that expands on the title with a specific fact or benefit. NEVER just restate the title. NEVER cut short mid-word or mid-sentence. All 4 descriptions must be roughly equal in length.',
189
229
  )
190
230
  .min(50)
191
- .max(120),
231
+ .max(100),
192
232
  }),
193
233
  )
194
234
  .length(4),
@@ -198,14 +238,25 @@ export type StructuredListSlideData = z.infer<typeof StructuredListSlideDataSche
198
238
 
199
239
  export const TextSlideDataSchema = z.object({
200
240
  contentType: z.literal(SLIDE_CONTENT_TYPE.TEXT),
201
- title: z.string().describe('Slide title in about 6 words').min(10).max(150),
241
+ title: z
242
+ .string()
243
+ .describe(
244
+ 'Slide headline rendered in very large bold font. Keep to 3–7 words (max 70 characters). It should name the topic or thesis — not summarise all content.',
245
+ )
246
+ .min(10)
247
+ .max(70),
202
248
  description: z
203
249
  .string()
204
250
  .describe(
205
- "Fairly long textual description of the point presented in the title. A couple of paragraphs. Consider maximum amount of text to be 600 characters. Don't cut the text short.",
251
+ 'Expository prose split into 2–3 paragraphs separated by \\n\\n (double newline). Total length 300–800 characters. ' +
252
+ 'Use **bold** to highlight 1–3 key terms per paragraph (NOT entire sentences). ' +
253
+ 'Use *italics* for definitions, counter-points, or light emphasis (1 per paragraph max). ' +
254
+ 'NO bullet points, NO markdown headers, NO numbered lists. ' +
255
+ 'Each paragraph covers ONE focused idea: e.g. context → main argument → implication. ' +
256
+ 'Do NOT start consecutive paragraphs with the same word. Do NOT cut text short mid-sentence.',
206
257
  )
207
258
  .min(300)
208
- .max(600),
259
+ .max(800),
209
260
  version: z.literal(1),
210
261
  }) satisfies z.ZodType<ITextSlideDataStructure>;
211
262
  export type TextSlideData = z.infer<typeof TextSlideDataSchema>;
@@ -237,24 +288,53 @@ export type ContentsSlideData = z.infer<typeof ContentsSlideDataSchema>;
237
288
  export const ImageSlideDataSchema = z
238
289
  .object({
239
290
  contentType: z.literal(SLIDE_CONTENT_TYPE.TEXT_WITH_IMAGE),
240
- title: z.string().describe('Slide title in about 6 words').min(10).max(200),
241
- description: z
291
+ title: z
242
292
  .string()
243
- .describe("Text that elaborates on the title and doesn't just describe the image")
293
+ .describe(
294
+ 'Slide headline rendered in very large bold font on the LEFT column. Keep to 3–7 words (max 70 characters). Aim for under 50 characters to avoid overflow. A noun phrase or short declarative phrase — NOT a full sentence.',
295
+ )
244
296
  .min(10)
297
+ .max(70),
298
+ description: z
299
+ .string()
300
+ .describe(
301
+ 'Expository prose in 2 paragraphs separated by \\n\\n (double newline). Total length 150–500 characters. ' +
302
+ 'Use **bold** for 1–2 key terms per paragraph (NOT entire sentences). ' +
303
+ 'Use *italics* for definitions or emphasis at most once per paragraph. ' +
304
+ 'NO bullet points, NO headers, NO numbered lists. ' +
305
+ 'Each paragraph covers ONE focused idea. NEVER reference or describe the image in the text. ' +
306
+ 'The image provides visual atmosphere — the text must stand alone as complete, readable prose.',
307
+ )
308
+ .min(150)
245
309
  .max(500),
246
310
  imageSlot: ImageSlotSchema,
247
311
  version: z.literal(1),
248
312
  })
249
313
  .describe(
250
- 'Slide that contains a title, description of the title',
314
+ 'Slide with a large title and prose description on the left, and a full-bleed supporting image on the right.',
251
315
  ) satisfies z.ZodType<IImageSlideDataStructure>;
252
316
  export type ImageSlideData = z.infer<typeof ImageSlideDataSchema>;
253
317
 
254
318
  export const SectionBreakSlideDataSchema = z.object({
255
319
  contentType: z.literal(SLIDE_CONTENT_TYPE.SECTION_BREAK),
256
- title: z.string().describe('Slide title in about 6 words').min(10).max(200),
257
- description: z.string().describe('Description of the slide in about 6 words').min(10).max(200),
320
+ title: z
321
+ .string()
322
+ .describe(
323
+ 'The section name — a clean noun phrase of 3–6 words that names the thematic block which follows. ' +
324
+ 'NEVER prefix with "Раздел:", "Section:", "Part:", "Глава:", or any structural label. ' +
325
+ 'NEVER include numbers. Just the name itself. ' +
326
+ 'GOOD: "Технологические достижения". BAD: "Раздел 2: Технологические достижения".',
327
+ )
328
+ .min(5)
329
+ .max(60),
330
+ description: z
331
+ .string()
332
+ .describe(
333
+ 'One sentence (up to 100 characters) that briefly hints at the content of the upcoming section. ' +
334
+ 'Should complement the title without repeating it. No markdown, no labels.',
335
+ )
336
+ .min(10)
337
+ .max(120),
258
338
  version: z.literal(1),
259
339
  }) satisfies z.ZodType<ISectionBreakSlideDataStructure>;
260
340
  export type SectionBreakSlideData = z.infer<typeof SectionBreakSlideDataSchema>;
@@ -263,25 +343,73 @@ export const TableSlideDataSchema = z.object({
263
343
  contentType: z.literal(SLIDE_CONTENT_TYPE.TABLE),
264
344
  title: z
265
345
  .string()
266
- .describe('Slide title and table title at the same time in a couple of words')
346
+ .describe(
347
+ 'Table name — 2–4 words rendered as large bold heading above the table. ' +
348
+ 'Doubles as both the slide title and the table heading. Keep concise.',
349
+ )
350
+ .min(5)
351
+ .max(55),
352
+ description: z
353
+ .string()
354
+ .describe(
355
+ 'One short sentence (max 80 characters) describing what the table shows. ' +
356
+ 'Rendered in small gray text below the title. No markdown.',
357
+ )
267
358
  .min(10)
268
- .max(200),
269
- description: z.string().describe('Description of the table represents').min(10).max(200),
359
+ .max(100),
270
360
  table: z.object({
271
361
  columnHeaders: z
272
- .array(z.string().min(1).max(50))
273
- .min(1)
274
- .max(10)
275
- .describe('Array of column header labels'),
362
+ .array(
363
+ z
364
+ .string()
365
+ .min(1)
366
+ .max(20)
367
+ .describe(
368
+ 'Column label. Keep SHORT — 1–3 words. Include units here (e.g., "Сумма, ₽"), not in cells. ' +
369
+ 'When hasRowHeaders is true, the first header should be a single space " " or a short category label.',
370
+ ),
371
+ )
372
+ .min(2)
373
+ .max(5)
374
+ .describe(
375
+ 'Column header labels. MAXIMUM 5 columns total. Recommended 3–4 data columns. ' +
376
+ 'More columns will overflow the slide — NEVER exceed 5.',
377
+ ),
276
378
  rows: z
277
- .array(z.array(z.string().min(1).max(75)))
278
- .min(3)
379
+ .array(
380
+ z
381
+ .array(
382
+ z
383
+ .string()
384
+ .min(1)
385
+ .max(40)
386
+ .describe(
387
+ 'Cell content. NUMERIC tables: numbers only (e.g., "1 200", "85%"). ' +
388
+ 'TEXTUAL tables: 1–3 words maximum — keywords or short phrases ONLY, NEVER full sentences. ' +
389
+ 'Row header cells (first cell when hasRowHeaders=true): category label, max 22 characters.',
390
+ ),
391
+ )
392
+ .describe('One row. Cell count MUST equal columnHeaders length exactly.'),
393
+ )
394
+ .min(2)
279
395
  .max(4)
280
396
  .describe(
281
- 'Table rows; each row must have exactly the same number of cells as columnHeaders',
397
+ 'Table rows. Max 4 rows total. ' +
398
+ 'When hasSummaryRow is true, the LAST row is the summary row — so at most 3 regular rows + 1 summary = 4 total. ' +
399
+ 'NEVER exceed 4 rows.',
400
+ ),
401
+ hasRowHeaders: z
402
+ .boolean()
403
+ .describe(
404
+ 'True when the first cell of each row is a descriptive label or category (pivot table). ' +
405
+ 'False for plain data tables where all cells are equivalent data.',
406
+ ),
407
+ hasSummaryRow: z
408
+ .boolean()
409
+ .describe(
410
+ 'True when the last row contains totals, averages, or aggregated values. ' +
411
+ 'That summary row must be the last element of the rows array.',
282
412
  ),
283
- hasRowHeaders: z.boolean().describe('If table needs special row headers, set this to true'),
284
- hasSummaryRow: z.boolean().describe('If table needs a summary row, set this to true'),
285
413
  }),
286
414
  version: z.literal(1),
287
415
  }) satisfies z.ZodType<ITableSlideDataStructure>;
@@ -291,37 +419,85 @@ export type TableSlideData = z.infer<typeof TableSlideDataSchema>;
291
419
  export const BarChartSlideDataSchema = z.object({
292
420
  type: z.literal(SLIDE_CHART_TYPE.BAR),
293
421
  categories: z
294
- .array(z.string())
295
- .min(1)
296
- .max(12)
297
- .describe('Category labels (e.g., months, products, regions)'),
422
+ .array(z.string().min(1).max(20))
423
+ .min(3)
424
+ .max(10)
425
+ .describe(
426
+ 'Category labels (e.g., months, product names, departments). ' +
427
+ 'Recommended: 4–8 items. Keep each label SHORT — 1–3 words, max 15 characters. ' +
428
+ 'Categories work best when naturally ordered: time periods, rankings, or comparable groups.',
429
+ ),
298
430
  series: z
299
431
  .array(
300
432
  z.object({
301
433
  name: z
302
434
  .string()
303
- .describe('Series name for legend. Try to include measurements if needed'),
304
- data: z.array(z.number()).describe('Values corresponding to categories'),
435
+ .max(40)
436
+ .describe(
437
+ 'Series name shown in the chart legend. Do NOT include units here — units belong in the unit field. ' +
438
+ 'GOOD: "Рост продаж". BAD: "Рост продаж (%)" or "Выручка (₽)".',
439
+ ),
440
+ data: z
441
+ .array(z.number())
442
+ .min(3)
443
+ .describe(
444
+ 'Numeric values corresponding to categories. ' +
445
+ 'MUST have EXACTLY the same number of values as categories — mismatch will break the chart. ' +
446
+ 'Use round numbers or simple approximations. NEVER hallucinate precise figures. ' +
447
+ 'Values should show meaningful variation — avoid all bars being the same height.',
448
+ ),
305
449
  type: z
306
450
  .number()
307
451
  .min(0)
308
452
  .max(11)
309
- .describe('Series type. Used to discriminate colors when applying theme'),
453
+ .describe(
454
+ 'Color index from the theme palette. ALWAYS use 0 (primary blue). Never change this value.',
455
+ ),
310
456
  }),
311
457
  )
312
458
  .min(1)
313
459
  .max(1)
314
- .describe('Data series for the chart. Only one series is supported'),
315
- yAxisLabel: z.string().max(40).optional().describe('Y-axis label'),
316
- unit: z.string().max(10).optional().describe('Unit symbol (%, $, etc.)'),
460
+ .describe('Data series. Only ONE series is supported. Never add more than one.'),
461
+ yAxisLabel: z
462
+ .string()
463
+ .max(30)
464
+ .optional()
465
+ .describe(
466
+ 'Y-axis label. Include ONLY when the axis needs a descriptor that is not already covered by the unit field. ' +
467
+ 'GOOD use: "Количество студентов" (when there is no unit symbol). ' +
468
+ 'OMIT when unit is set (e.g., "%", "₽") — the unit already contextualises the values.',
469
+ ),
470
+ unit: z
471
+ .string()
472
+ .max(10)
473
+ .optional()
474
+ .describe(
475
+ 'Unit symbol displayed with each bar value (e.g., "%", "₽", "шт.", "млн"). ' +
476
+ 'ALWAYS include when values represent percentages, currency, or any measurable quantity with a unit. ' +
477
+ 'Omit only for dimensionless counts that are self-explanatory (e.g., raw ranking scores without a fixed scale).',
478
+ ),
317
479
  version: z.literal(1),
318
480
  }) satisfies z.ZodType<IBarChartSlideDataStructure>;
319
481
  export type BarChartSlideData = z.infer<typeof BarChartSlideDataSchema>;
320
482
 
321
483
  export const ChartSlideDataSchema = z.object({
322
484
  contentType: z.literal(SLIDE_CONTENT_TYPE.CHART),
323
- title: z.string().describe('Slide title in about 2-6 words').max(100),
324
- description: z.string().describe("Information on slide's topic").max(600),
485
+ title: z
486
+ .string()
487
+ .describe(
488
+ 'Chart name — 2–4 words rendered as large bold heading on the LEFT panel of the slide. ' +
489
+ 'Keep short: the left panel is narrow and the title font is very large.',
490
+ )
491
+ .min(5)
492
+ .max(50),
493
+ description: z
494
+ .string()
495
+ .describe(
496
+ '1–2 sentences (max 120 characters) explaining what the chart shows. ' +
497
+ 'Rendered in small gray text below the title on the LEFT panel. No markdown.',
498
+ )
499
+ .min(10)
500
+ .max(150),
325
501
  chart: z.discriminatedUnion('type', [BarChartSlideDataSchema]),
326
502
  version: z.literal(1),
327
503
  }) satisfies z.ZodType<IChartSlideDataStructure>;
@@ -329,8 +505,22 @@ export type ChartSlideData = z.infer<typeof ChartSlideDataSchema>;
329
505
 
330
506
  export const TimelineSlideDataSchema = z.object({
331
507
  contentType: z.literal(SLIDE_CONTENT_TYPE.TIMELINE),
332
- title: z.string().describe('Slide title in about 6 words').min(10).max(150),
333
- description: z.string().describe('Brief context for the timeline').min(10).max(200),
508
+ title: z
509
+ .string()
510
+ .describe(
511
+ 'Timeline name — 2–5 words, rendered as large bold heading above the timeline. ' +
512
+ 'Names the subject or scope of the chronological sequence.',
513
+ )
514
+ .min(5)
515
+ .max(65),
516
+ description: z
517
+ .string()
518
+ .describe(
519
+ 'One sentence (max 100 characters) providing context for the timeline. ' +
520
+ 'Rendered in small gray text below the title. No markdown.',
521
+ )
522
+ .min(10)
523
+ .max(120),
334
524
  timeline: z.object({
335
525
  events: z
336
526
  .array(
@@ -338,26 +528,40 @@ export const TimelineSlideDataSchema = z.object({
338
528
  date: z
339
529
  .string()
340
530
  .describe(
341
- 'Date or time period label. MUST be general/approximate if exact date unknown (e.g., "Early 2020s", "Mid-1990s", "Recent years")',
531
+ 'Temporal label displayed inside the arrow/chevron shape at the top of each column. ' +
532
+ 'MUST be SHORT — max 20 characters — to fit inside the arrow. ' +
533
+ 'Use a year ("2015"), a range ("2010–2015"), a quarter ("Q1 2023"), ' +
534
+ 'an approximate period ("Early 2020s", "Середина 2010-х"), ' +
535
+ 'or a phase label ("Этап 1", "Запуск") for process timelines. ' +
536
+ 'NEVER fabricate specific dates you are not certain about.',
342
537
  )
343
538
  .min(2)
344
- .max(50),
539
+ .max(25),
345
540
  title: z
346
541
  .string()
347
542
  .describe(
348
- 'Event title. Prefer 2 words, max 3 words. Keep it short and punchy.',
543
+ 'Event name in bold below the arrow. 2–3 words maximum. ' +
544
+ 'Short and punchy — the column is narrow, long titles wrap to many lines. ' +
545
+ 'GOOD: "Первый запуск", "Выход на рынок". BAD: "Успешный выход компании на международный рынок".',
349
546
  )
350
- .min(5)
351
- .max(60),
547
+ .min(3)
548
+ .max(35),
352
549
  description: z
353
550
  .string()
354
- .describe('Brief description of the event or milestone')
551
+ .describe(
552
+ 'Brief description below the event title. 1–2 sentences, max 100 characters. ' +
553
+ 'The column is narrow — text wraps to ~5 lines at this limit. ' +
554
+ 'Do NOT exceed 100 characters or the description will overflow off the slide.',
555
+ )
355
556
  .min(20)
356
- .max(150),
557
+ .max(110),
357
558
  }),
358
559
  )
359
- .length(4)
360
- .describe('Timeline must contain exactly 4 chronological events'),
560
+ .length(5)
561
+ .describe(
562
+ 'Exactly 5 chronological events in sequential order (oldest → newest). ' +
563
+ 'The template renders exactly 5 equal columns — NEVER generate fewer or more.',
564
+ ),
361
565
  }),
362
566
  version: z.literal(1),
363
567
  }) satisfies z.ZodType<ITimelineSlideDataStructure>;
@@ -27,3 +27,7 @@ export const PRESENTATION_SLIDE_OUTLINE_AMQP_ROUTES = {
27
27
  UPDATE: 'tools.presentation.slide-outline.update-slide-outline.rpc',
28
28
  DELETE: 'tools.presentation.slide-outline.delete-slide-outline.rpc',
29
29
  };
30
+
31
+ export const PRESENTATION_SLIDE_AMQP_ROUTES = {
32
+ REPOSITION: 'tools.presentation.slide.reposition-slide.rpc',
33
+ } as const;
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+
4
+ export namespace DeleteAllSolvingEduTaskJobsCommand {
5
+ export const RequestSchema = z.object({
6
+ userId: z.string().uuid().nullable().optional(),
7
+ unregisteredUserId: z.string().uuid().nullable().optional(),
8
+ });
9
+ export type Request = z.infer<typeof RequestSchema>;
10
+
11
+ export const ResponseSchema = ICommandResponseSchema(z.boolean());
12
+ export type Response = z.infer<typeof ResponseSchema>;
13
+ }
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+
4
+ export namespace DeleteSolvingEduTaskJobByUuidCommand {
5
+ export const RequestSchema = z.object({
6
+ userId: z.string().uuid().nullable().optional(),
7
+ unregisteredUserId: z.string().uuid().nullable().optional(),
8
+ uuid: z.string().uuid(),
9
+ });
10
+ export type Request = z.infer<typeof RequestSchema>;
11
+
12
+ export const ResponseSchema = ICommandResponseSchema(z.boolean());
13
+ export type Response = z.infer<typeof ResponseSchema>;
14
+ }
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+
4
+ export namespace GetSolvingEduTaskPriceCommand {
5
+ export const RequestSchema = z.object({
6
+ modelId: z.string().uuid(),
7
+ });
8
+ export type Request = z.infer<typeof RequestSchema>;
9
+
10
+ export const ResponseDataSchema = z.object({
11
+ price: z.number(),
12
+ });
13
+ export type ResponseData = z.infer<typeof ResponseDataSchema>;
14
+
15
+ export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
16
+ export type Response = z.infer<typeof ResponseSchema>;
17
+ }
@@ -0,0 +1,7 @@
1
+ export * from './delete-all-solving-edu-task-jobs.command';
2
+ export * from './delete-solving-edu-task-job-by-uuid.command';
3
+ export * from './get-solving-edu-task-price.command';
4
+ export * from './retry-solving-edu-task-job.command';
5
+ export * from './set-reaction-to-solving-edu-task-job.command';
6
+ export * from './solving-edu-task.command';
7
+ export * from './update-solving-edu-task-job-title.command';
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { SolvingEduTaskJobSchema } from '../models';
4
+ import { AttachedFileSchema } from '../../common';
5
+
6
+ export namespace RetrySolvingEduTaskJobCommand {
7
+ export const RequestSchema = z.object({
8
+ uuid: z.string().uuid(),
9
+ tokenReservationId: z.string().uuid().optional(),
10
+ precalculatedPrice: z.number().optional(),
11
+ userId: z.string().uuid().nullable().optional(),
12
+ unregisteredUserId: z.string().uuid().nullable().optional(),
13
+ prompt: z.string().optional(),
14
+ modelId: z.string().uuid().optional(),
15
+ params: z
16
+ .object({
17
+ attachedFiles: z.array(AttachedFileSchema),
18
+ })
19
+ .optional(),
20
+ });
21
+ export type Request = z.infer<typeof RequestSchema>;
22
+
23
+ export const ResponseSchema = ICommandResponseSchema(SolvingEduTaskJobSchema);
24
+ export type Response = z.infer<typeof ResponseSchema>;
25
+ }
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ import { USER_REACTION } from '../../common';
3
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
4
+ import { SolvingEduTaskJobSchema } from '../models';
5
+
6
+ export namespace SetReactionToSolvingEduTaskJobCommand {
7
+ export const RequestSchema = z
8
+ .object({
9
+ userId: z.string().uuid().nullable().optional(),
10
+ unregisteredUserId: z.string().uuid().nullable().optional(),
11
+ uuid: z.string().uuid(),
12
+ reaction: z.nativeEnum(USER_REACTION).nullable(),
13
+ dislikeReason: z.string().nullable().default(null),
14
+ })
15
+ .refine(
16
+ (data) => {
17
+ if (data.reaction !== USER_REACTION.DISLIKED && data.dislikeReason) {
18
+ return false;
19
+ }
20
+ return true;
21
+ },
22
+ {
23
+ message: 'Dislike reason is not allowed when reaction is not disliked',
24
+ },
25
+ );
26
+
27
+ export type Request = z.infer<typeof RequestSchema>;
28
+
29
+ export const ResponseSchema = ICommandResponseSchema(SolvingEduTaskJobSchema);
30
+ export type Response = z.infer<typeof ResponseSchema>;
31
+ }