@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
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common';
3
+ import { MarketplaceCardJobSchema } from '../models';
4
+
5
+ export namespace FindMarketplaceCardJobByUuidQuery {
6
+ export const RequestSchema = z.object({
7
+ uuid: z.string().uuid(),
8
+ userId: z.string().uuid().nullable().optional(),
9
+ unregisteredUserId: z.string().uuid().nullable().optional(),
10
+ });
11
+
12
+ export type Request = z.infer<typeof RequestSchema>;
13
+
14
+ export const ResponseSchema = ICommandResponseSchema(MarketplaceCardJobSchema);
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { MarketplaceCardJobSchema } from '../models';
4
+
5
+ export namespace FindMarketplaceCardJobsQuery {
6
+ export const RequestSchema = z
7
+ .object({
8
+ userId: z.string().uuid().optional(),
9
+ unregisteredUserId: z.string().uuid().optional(),
10
+ title: z.string().optional(),
11
+ limit: z.coerce.number().min(1).optional(),
12
+ offset: z.coerce.number().min(0).default(0).optional(),
13
+ })
14
+ .refine(
15
+ (data) => {
16
+ return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
17
+ },
18
+ {
19
+ message: 'At least userId or unregisteredUserId must be present',
20
+ path: ['userId', 'unregisteredUserId'],
21
+ },
22
+ );
23
+ export type Request = z.infer<typeof RequestSchema>;
24
+
25
+ export const ResponseSchema = ICommandResponseSchema(
26
+ z.object({
27
+ data: z.array(MarketplaceCardJobSchema),
28
+ page: z.number(),
29
+ totalPages: z.number(),
30
+ }),
31
+ );
32
+ export type Response = z.infer<typeof ResponseSchema>;
33
+ }
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common';
3
+ import { MarketplaceCardConfigSchema } from '../models';
4
+
5
+ export namespace GetMarketplaceCardConfigQuery {
6
+ export const RequestSchema = z.object({});
7
+ export type Request = z.infer<typeof RequestSchema>;
8
+ export const ResponseSchema = ICommandResponseSchema(MarketplaceCardConfigSchema);
9
+ export type Response = z.infer<typeof ResponseSchema>;
10
+ }
@@ -0,0 +1,3 @@
1
+ export * from './get-marketplace-card-config.query';
2
+ export * from './find-marketplace-card-job-by-uuid.query';
3
+ export * from './find-marketplace-card-jobs.query';
@@ -0,0 +1 @@
1
+ export * from './marketplace-card.amqp.routes';
@@ -0,0 +1,12 @@
1
+ export const MARKETPLACE_CARD_AMQP_ROUTES = {
2
+ CONFIG: 'tools.marketplace-card.config.rpc',
3
+ EXECUTE: 'tools.marketplace-card.execute.rpc',
4
+ GET_JOB: 'tools.marketplace-card.jobs.get.rpc',
5
+ GET_PRICE: 'tools.marketplace-card.get-price.rpc',
6
+ LIST_JOBS: 'tools.marketplace-card.jobs.list.rpc',
7
+ SET_REACTION: 'tools.marketplace-card.jobs.set-reaction.rpc',
8
+ SOFT_DELETE: 'tools.marketplace-card.soft-delete.rpc',
9
+ RETRY: 'tools.marketplace-card.jobs.retry.rpc',
10
+ UPDATE_TITLE: 'tools.marketplace-card.jobs.update-title.rpc',
11
+ SOFT_DELETE_ALL: 'tools.marketplace-card.jobs.soft-delete-all.rpc',
12
+ } as const;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.1.133",
3
+ "version": "0.2.0-stage",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common';
3
3
  import { PresentationSchema } from '../models';
4
+ import { PRESENTATION_TARGET_AUDIENCE } from '../enums';
4
5
 
5
6
  export namespace CreatePresentationCommand {
6
7
  export const RequestSchema = z.object({
@@ -10,6 +11,8 @@ export namespace CreatePresentationCommand {
10
11
  languageId: z.string(),
11
12
  prompt: z.string(),
12
13
  slideCount: z.number(),
14
+ targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE).optional(),
15
+ userHasActiveSubscriptionOrProduct: z.boolean(),
13
16
  });
14
17
  export type Request = z.infer<typeof RequestSchema>;
15
18
 
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common';
3
- import { PresentationSchema } from '../models';
3
+ import { PresentationSchema, PresentationTitlePageSchema } from '../models';
4
4
 
5
5
  export namespace GenerateSlidesCommand {
6
6
  export const RequestSchema = z.object({
@@ -9,6 +9,7 @@ export namespace GenerateSlidesCommand {
9
9
  unregisteredUserId: z.string().uuid().nullable().optional(),
10
10
  tokenReservationId: z.string().uuid(),
11
11
  precalculatedPrice: z.number(),
12
+ titlePage: PresentationTitlePageSchema.optional().nullable(),
12
13
  });
13
14
  export type Request = z.infer<typeof RequestSchema>;
14
15
 
@@ -4,6 +4,7 @@ import { ICommandResponseSchema } from '../../common';
4
4
  export namespace GetPresentationSlidesGenerationPriceCommand {
5
5
  export const RequestSchema = z.object({
6
6
  slideCount: z.number().int().min(1),
7
+ templateId: z.string().uuid(),
7
8
  });
8
9
  export type Request = z.infer<typeof RequestSchema>;
9
10
 
@@ -9,6 +9,7 @@ export * from './export-as-pptx.command';
9
9
  export * from './generate-slides.command';
10
10
  export * from './get-presentation-slides-generation-price.command';
11
11
  export * from './reposition-slide-outline.command';
12
+ export * from './reposition-slide.command';
12
13
  export * from './update-slide-outline.command';
13
14
  export * from './update-presentation.command';
14
15
  export * from './update-presentation-outline.command';
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common';
3
+
4
+ export namespace RepositionSlideCommand {
5
+ export const RequestSchema = z.object({
6
+ presentationId: z.string().uuid(),
7
+ slideId: z.string().uuid(),
8
+ userId: z.string().uuid().nullable().optional(),
9
+ unregisteredUserId: z.string().uuid().nullable().optional(),
10
+ newPosition: z.number(),
11
+ });
12
+ export type Request = z.infer<typeof RequestSchema>;
13
+
14
+ export const ResponseSchema = ICommandResponseSchema(z.boolean());
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -8,3 +8,4 @@ export * from './slide-image-slot-action.enum';
8
8
  export * from './presentation-ai-action-call-status.enum';
9
9
  export * from './presentation-ai-action-type.enum';
10
10
  export * from './presentation-ai-action-pricing-type.enum';
11
+ export * from './presentation-target-audience.enum';
@@ -0,0 +1,6 @@
1
+ export enum PRESENTATION_TARGET_AUDIENCE {
2
+ NONE = 'NONE',
3
+ SCHOOL = 'SCHOOL',
4
+ UNIVERSITY = 'UNIVERSITY',
5
+ BUSINESS = 'BUSINESS',
6
+ }
@@ -8,3 +8,4 @@ export * from './slide.schema';
8
8
  export * from './slide-image-slot.schema';
9
9
  export * from './slide-content.schema';
10
10
  export * from './presentation-ai-action.schema';
11
+ export * from './presentation-title-page.schema';
@@ -5,7 +5,9 @@ export const PresentationTemplateSchema = z.object({
5
5
  title: z.string(),
6
6
  image: z.string(),
7
7
  order: z.number(),
8
+ price: z.number(),
8
9
  imagePlaceholder: z.string(),
10
+ isPremium: z.boolean(),
9
11
  createdAt: z.date(),
10
12
  updatedAt: z.date(),
11
13
  });
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+
3
+ export const PresentationTitlePageSchema = z.object({
4
+ author: z.string().optional().nullable(),
5
+ createdAt: z.date().optional().nullable(),
6
+ email: z.string().email().optional().nullable(),
7
+ });
8
+
9
+ export type PresentationTitlePage = z.infer<typeof PresentationTitlePageSchema>;
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { PRESENTATION_STAGE } from '../enums';
2
+ import { PRESENTATION_STAGE, PRESENTATION_TARGET_AUDIENCE } from '../enums';
3
3
  import { SlideOutlineSchema } from './slide-outline.schema';
4
4
  import { SlideSchema } from './slide.schema';
5
5
  import { USER_REACTION } from '../../common';
6
+ import { PresentationTitlePageSchema } from './presentation-title-page.schema';
6
7
 
7
8
  export const PresentationSchema = z.object({
8
9
  uuid: z.string().uuid(),
@@ -22,6 +23,8 @@ export const PresentationSchema = z.object({
22
23
  tokenReservationId: z.string().nullable().optional(),
23
24
  lastContentUpdateAt: z.date().nullable(),
24
25
  lastPptxExportedAt: z.date().nullable(),
26
+ titlePage: PresentationTitlePageSchema.nullable(),
27
+ targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE),
25
28
  createdAt: z.date(),
26
29
  updatedAt: z.date(),
27
30
  });
@@ -36,5 +39,6 @@ export type PresentationWithSlides = z.infer<typeof PresentationWithSlidesSchema
36
39
  export const PresentationUpdateSchema = PresentationSchema.pick({
37
40
  title: true,
38
41
  templateId: true,
42
+ titlePage: true,
39
43
  }).partial();
40
44
  export type PresentationUpdate = z.infer<typeof PresentationUpdateSchema>;
@@ -19,36 +19,48 @@ import {
19
19
  export const CoverSlideDataUserEditSchema = z.object({
20
20
  contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
21
21
  title: z.string().min(1).max(500),
22
- author: z.object({
23
- label: z.string().min(1).max(100),
24
- value: z.string().min(1).max(200),
25
- }),
26
- date: z.object({
27
- label: z.string().min(1).max(100),
28
- value: z.string().min(1).max(200),
29
- }),
30
- email: z.object({
31
- label: z.string().min(1).max(100),
32
- value: z.string().min(1).max(200),
33
- }),
22
+ author: z
23
+ .object({
24
+ label: z.string().min(1).max(100),
25
+ value: z.string().min(1).max(200),
26
+ })
27
+ .optional(),
28
+ date: z
29
+ .object({
30
+ label: z.string().min(1).max(100),
31
+ value: z.string().min(1).max(200),
32
+ })
33
+ .optional(),
34
+ email: z
35
+ .object({
36
+ label: z.string().min(1).max(100),
37
+ value: z.string().min(1).max(200),
38
+ })
39
+ .optional(),
34
40
  version: z.literal(1),
35
41
  }) satisfies z.ZodType<ICoverSlideDataStructure>;
36
42
 
37
43
  export const ThankYouSlideDataUserEditSchema = z.object({
38
44
  contentType: z.literal(SLIDE_CONTENT_TYPE.THANK_YOU),
39
45
  title: z.string().min(1).max(500),
40
- author: z.object({
41
- label: z.string().min(1).max(100),
42
- value: z.string().min(1).max(200),
43
- }),
44
- date: z.object({
45
- label: z.string().min(1).max(100),
46
- value: z.string().min(1).max(200),
47
- }),
48
- email: z.object({
49
- label: z.string().min(1).max(100),
50
- value: z.string().min(1).max(200),
51
- }),
46
+ author: z
47
+ .object({
48
+ label: z.string().min(1).max(100),
49
+ value: z.string().min(1).max(200),
50
+ })
51
+ .optional(),
52
+ date: z
53
+ .object({
54
+ label: z.string().min(1).max(100),
55
+ value: z.string().min(1).max(200),
56
+ })
57
+ .optional(),
58
+ email: z
59
+ .object({
60
+ label: z.string().min(1).max(100),
61
+ value: z.string().min(1).max(200),
62
+ })
63
+ .optional(),
52
64
  version: z.literal(1),
53
65
  }) satisfies z.ZodType<IThankYouSlideDataStructure>;
54
66