@purpleschool/gptbot-tools 0.1.134 → 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 (274) 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/analytics/index.ts +1 -0
  7. package/analytics/job-model-analytics/commands/get-job-model-analytics.command.ts +12 -0
  8. package/analytics/job-model-analytics/commands/index.ts +1 -0
  9. package/analytics/job-model-analytics/index.ts +2 -0
  10. package/analytics/job-model-analytics/routes/index.ts +1 -0
  11. package/analytics/job-model-analytics/routes/job-model-analytics.http.routes.ts +5 -0
  12. package/build/account-merge/commands/index.js +17 -0
  13. package/build/account-merge/commands/transfer-user-jobs.command.js +13 -0
  14. package/build/account-merge/index.js +18 -0
  15. package/build/account-merge/routes/account-merge.amqp.routes.js +6 -0
  16. package/build/account-merge/routes/index.js +17 -0
  17. package/build/analytics/index.js +17 -0
  18. package/build/analytics/job-model-analytics/commands/get-job-model-analytics.command.js +11 -0
  19. package/build/analytics/job-model-analytics/commands/index.js +17 -0
  20. package/build/analytics/job-model-analytics/index.js +18 -0
  21. package/build/analytics/job-model-analytics/routes/index.js +17 -0
  22. package/build/analytics/job-model-analytics/routes/job-model-analytics.http.routes.js +7 -0
  23. package/build/common/enums/file-type.enum.js +8 -0
  24. package/build/common/enums/index.js +1 -0
  25. package/build/common/enums/reasoning-effort.enum.js +6 -1
  26. package/build/image-editor/commands/image-editor.command.js +1 -0
  27. package/build/image-editor/models/image-editor-job.schema.js +2 -0
  28. package/build/image-editor/models/image-editor-model.schema.js +6 -0
  29. package/build/image-generation/models/image-generation-job.schema.js +1 -0
  30. package/build/image-generation/models/image-generation-model.schema.js +1 -0
  31. package/build/image-generation/queries/find-image-generation-jobs.query.js +2 -0
  32. package/build/index.js +15 -0
  33. package/build/marketplace-card/commands/execute-marketplace-card.command.js +7 -0
  34. package/build/marketplace-card/commands/index.js +2 -0
  35. package/build/marketplace-card/commands/soft-delete-all-marketplace-card-jobs.command.js +13 -0
  36. package/build/marketplace-card/commands/update-title-marketplace-card-job.command.js +16 -0
  37. package/build/marketplace-card/models/index.js +1 -0
  38. package/build/marketplace-card/models/marketplace-card-config.schema.js +2 -0
  39. package/build/marketplace-card/routes/marketplace-card.amqp.routes.js +2 -0
  40. package/build/presentation/commands/create-presentation.command.js +3 -0
  41. package/build/presentation/commands/generate-slides.command.js +1 -0
  42. package/build/presentation/commands/get-presentation-slides-generation-price.command.js +1 -0
  43. package/build/presentation/commands/index.js +1 -0
  44. package/build/presentation/commands/reposition-slide.command.js +16 -0
  45. package/build/presentation/enums/index.js +1 -0
  46. package/build/presentation/enums/presentation-target-audience.enum.js +10 -0
  47. package/build/presentation/models/index.js +1 -0
  48. package/build/presentation/models/presentation-template.schema.js +2 -0
  49. package/build/presentation/models/presentation-title-page.schema.js +9 -0
  50. package/build/presentation/models/presentation.schema.js +4 -0
  51. package/build/presentation/models/slide-content-edit.schema.js +24 -12
  52. package/build/presentation/models/slide-content.schema.js +215 -73
  53. package/build/presentation/routes/presentation.routes.js +4 -1
  54. package/build/solving-edu-task/commands/delete-all-solving-edu-task-jobs.command.js +13 -0
  55. package/build/solving-edu-task/commands/delete-solving-edu-task-job-by-uuid.command.js +14 -0
  56. package/build/solving-edu-task/commands/get-solving-edu-task-price.command.js +15 -0
  57. package/build/solving-edu-task/commands/index.js +23 -0
  58. package/build/solving-edu-task/commands/retry-solving-edu-task-job.command.js +25 -0
  59. package/build/solving-edu-task/commands/set-reaction-to-solving-edu-task-job.command.js +27 -0
  60. package/build/solving-edu-task/commands/solving-edu-task.command.js +22 -0
  61. package/build/solving-edu-task/commands/update-solving-edu-task-job-title.command.js +16 -0
  62. package/build/solving-edu-task/index.js +20 -0
  63. package/build/solving-edu-task/models/index.js +19 -0
  64. package/build/solving-edu-task/models/solving-edu-task-config.schema.js +8 -0
  65. package/build/solving-edu-task/models/solving-edu-task-job.schema.js +32 -0
  66. package/build/solving-edu-task/models/solving-edu-task-model.schema.js +27 -0
  67. package/build/solving-edu-task/queries/find-solving-edu-task-job-by-id.query.js +15 -0
  68. package/build/solving-edu-task/queries/find-solving-edu-task-jobs.query.js +28 -0
  69. package/build/solving-edu-task/queries/get-solving-edu-task-config.query.js +11 -0
  70. package/build/solving-edu-task/queries/index.js +19 -0
  71. package/build/solving-edu-task/routes/index.js +17 -0
  72. package/build/solving-edu-task/routes/solving-edu-task.amqp.routes.js +15 -0
  73. package/build/spell-corrector/commands/delete-all-spell-corrector-jobs.command.js +13 -0
  74. package/build/spell-corrector/commands/delete-spell-corrector-job-by-uuid.command.js +14 -0
  75. package/build/spell-corrector/commands/get-spell-corrector-price.command.js +15 -0
  76. package/build/spell-corrector/commands/index.js +23 -0
  77. package/build/spell-corrector/commands/retry-spell-corrector-job.command.js +17 -0
  78. package/build/spell-corrector/commands/set-reaction-to-spell-corrector-job.command.js +27 -0
  79. package/build/spell-corrector/commands/spell-corrector.command.js +18 -0
  80. package/build/spell-corrector/commands/update-spell-corrector-job-title.command.js +16 -0
  81. package/build/spell-corrector/index.js +20 -0
  82. package/build/spell-corrector/models/index.js +19 -0
  83. package/build/spell-corrector/models/spell-corrector-job.schema.js +25 -0
  84. package/build/spell-corrector/models/spell-corrector-model.schema.js +18 -0
  85. package/build/spell-corrector/models/spell-corrector-tool-config.schema.js +9 -0
  86. package/build/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.js +10 -0
  87. package/build/spell-corrector/queries/find-spell-corrector-jobs.query.js +28 -0
  88. package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.js +9 -0
  89. package/build/spell-corrector/queries/index.js +19 -0
  90. package/build/spell-corrector/routes/index.js +17 -0
  91. package/build/spell-corrector/routes/spell-corrector.amqp.routes.js +15 -0
  92. package/build/stt/models/stt-response.schema.js +2 -0
  93. package/build/tool-workspace/commands/index.js +18 -0
  94. package/build/tool-workspace/commands/soft-delete-tool-workspace.command.js +21 -0
  95. package/build/tool-workspace/commands/update-tool-workspace.command.js +26 -0
  96. package/build/tool-workspace/enums/index.js +18 -0
  97. package/build/tool-workspace/enums/tool-workspace-item-slot.enum.js +9 -0
  98. package/build/tool-workspace/enums/tool-workspace-status.enum.js +8 -0
  99. package/build/tool-workspace/index.js +21 -0
  100. package/build/tool-workspace/models/index.js +20 -0
  101. package/build/tool-workspace/models/tool-workspace-contents.schema.js +10 -0
  102. package/build/tool-workspace/models/tool-workspace-item.schema.js +17 -0
  103. package/build/tool-workspace/models/tool-workspace-job.schema.js +17 -0
  104. package/build/tool-workspace/models/tool-workspace.schema.js +17 -0
  105. package/build/tool-workspace/queries/find-tool-workspace-by-uuid.query.js +22 -0
  106. package/build/tool-workspace/queries/find-tool-workspaces.query.js +30 -0
  107. package/build/tool-workspace/queries/index.js +18 -0
  108. package/build/tool-workspace/routes/index.js +17 -0
  109. package/build/tool-workspace/routes/tool-workspace.amqp.routes.js +9 -0
  110. package/build/tools/enums/tool-content-type.enum.js +3 -1
  111. package/build/tools/enums/tool-type.enum.js +2 -0
  112. package/build/tools/models/global-tools-config.schema.js +4 -0
  113. package/build/tools/models/tools-with-configs.schema.js +10 -0
  114. package/build/video/commands/video.command.js +7 -0
  115. package/build/video/const/videoMaxDuration.js +1 -1
  116. package/build/video/enums/video-resolution.enum.js +1 -0
  117. package/build/video/enums/video-strategy.enum.js +1 -0
  118. package/build/video/models/video-config.schema.js +2 -0
  119. package/build/video/models/video-model.schema.js +1 -0
  120. package/build/video-editor/commands/edit-video.command.js +1 -0
  121. package/build/video-editor/commands/get-video-editor-price.command.js +2 -0
  122. package/build/video-editor/commands/retry-video-editor-job.command.js +1 -0
  123. package/build/video-editor/enums/index.js +1 -0
  124. package/build/video-editor/enums/video-editor-pricing-rule-type.enum.js +8 -0
  125. package/build/video-editor/models/video-editor-job.schema.js +7 -1
  126. package/build/video-editor/models/video-editor-model.schema.js +28 -1
  127. package/build/video-editor/utils/calculate-video-editing-price.js +24 -2
  128. package/build/writer/commands/collect-sources.command.js +15 -0
  129. package/build/writer/commands/confirm-source-citation-metadata.command.js +18 -0
  130. package/build/writer/commands/discard-writer-source.command.js +16 -0
  131. package/build/writer/commands/generate-document-outline.command.js +17 -0
  132. package/build/writer/commands/index.js +5 -0
  133. package/build/writer/commands/update-writer-document-outline.command.js +1 -0
  134. package/build/writer/commands/upload-writer-source.command.js +18 -0
  135. package/build/writer/enums/index.js +3 -0
  136. package/build/writer/enums/writer-document-stage.enum.js +6 -0
  137. package/build/writer/enums/writer-source-origin.enum.js +8 -0
  138. package/build/writer/enums/writer-source-status.enum.js +9 -0
  139. package/build/writer/enums/writer-source-type.enum.js +8 -0
  140. package/build/writer/models/index.js +2 -0
  141. package/build/writer/models/writer-document-type.schema.js +1 -1
  142. package/build/writer/models/writer-document.schema.js +3 -0
  143. package/build/writer/models/writer-source-bibliographic-metadata.schema.js +27 -0
  144. package/build/writer/models/writer-source.schema.js +22 -0
  145. package/build/writer/queries/get-writer-document-sources.query.js +15 -0
  146. package/build/writer/queries/index.js +1 -0
  147. package/build/writer/routes/writer.routes.js +6 -0
  148. package/common/enums/file-type.enum.ts +4 -0
  149. package/common/enums/index.ts +1 -0
  150. package/common/enums/reasoning-effort.enum.ts +5 -0
  151. package/image-editor/commands/image-editor.command.ts +1 -0
  152. package/image-editor/models/image-editor-job.schema.ts +2 -0
  153. package/image-editor/models/image-editor-model.schema.ts +9 -0
  154. package/image-generation/models/image-generation-job.schema.ts +2 -1
  155. package/image-generation/models/image-generation-model.schema.ts +1 -0
  156. package/image-generation/queries/find-image-generation-jobs.query.ts +2 -0
  157. package/index.ts +15 -0
  158. package/marketplace-card/commands/execute-marketplace-card.command.ts +7 -0
  159. package/marketplace-card/commands/index.ts +2 -0
  160. package/marketplace-card/commands/soft-delete-all-marketplace-card-jobs.command.ts +13 -0
  161. package/marketplace-card/commands/update-title-marketplace-card-job.command.ts +16 -0
  162. package/marketplace-card/models/index.ts +1 -0
  163. package/marketplace-card/models/marketplace-card-config.schema.ts +2 -0
  164. package/marketplace-card/models/marketplace-card-job.schema.ts +1 -1
  165. package/marketplace-card/routes/marketplace-card.amqp.routes.ts +2 -0
  166. package/package.json +1 -1
  167. package/presentation/commands/create-presentation.command.ts +3 -0
  168. package/presentation/commands/generate-slides.command.ts +2 -1
  169. package/presentation/commands/get-presentation-slides-generation-price.command.ts +1 -0
  170. package/presentation/commands/index.ts +1 -0
  171. package/presentation/commands/reposition-slide.command.ts +16 -0
  172. package/presentation/enums/index.ts +1 -0
  173. package/presentation/enums/presentation-target-audience.enum.ts +6 -0
  174. package/presentation/models/index.ts +1 -0
  175. package/presentation/models/presentation-template.schema.ts +2 -0
  176. package/presentation/models/presentation-title-page.schema.ts +9 -0
  177. package/presentation/models/presentation.schema.ts +5 -1
  178. package/presentation/models/slide-content-edit.schema.ts +36 -24
  179. package/presentation/models/slide-content.schema.ts +294 -90
  180. package/presentation/routes/presentation.routes.ts +4 -0
  181. package/solving-edu-task/commands/delete-all-solving-edu-task-jobs.command.ts +13 -0
  182. package/solving-edu-task/commands/delete-solving-edu-task-job-by-uuid.command.ts +14 -0
  183. package/solving-edu-task/commands/get-solving-edu-task-price.command.ts +17 -0
  184. package/solving-edu-task/commands/index.ts +7 -0
  185. package/solving-edu-task/commands/retry-solving-edu-task-job.command.ts +25 -0
  186. package/solving-edu-task/commands/set-reaction-to-solving-edu-task-job.command.ts +31 -0
  187. package/solving-edu-task/commands/solving-edu-task.command.ts +22 -0
  188. package/solving-edu-task/commands/update-solving-edu-task-job-title.command.ts +16 -0
  189. package/solving-edu-task/index.ts +4 -0
  190. package/solving-edu-task/models/index.ts +3 -0
  191. package/solving-edu-task/models/solving-edu-task-config.schema.ts +8 -0
  192. package/solving-edu-task/models/solving-edu-task-job.schema.ts +35 -0
  193. package/solving-edu-task/models/solving-edu-task-model.schema.ts +30 -0
  194. package/solving-edu-task/queries/find-solving-edu-task-job-by-id.query.ts +16 -0
  195. package/solving-edu-task/queries/find-solving-edu-task-jobs.query.ts +33 -0
  196. package/solving-edu-task/queries/get-solving-edu-task-config.query.ts +11 -0
  197. package/solving-edu-task/queries/index.ts +3 -0
  198. package/solving-edu-task/routes/index.ts +1 -0
  199. package/solving-edu-task/routes/solving-edu-task.amqp.routes.ts +12 -0
  200. package/spell-corrector/commands/delete-all-spell-corrector-jobs.command.ts +13 -0
  201. package/spell-corrector/commands/delete-spell-corrector-job-by-uuid.command.ts +14 -0
  202. package/spell-corrector/commands/get-spell-corrector-price.command.ts +16 -0
  203. package/spell-corrector/commands/index.ts +7 -0
  204. package/spell-corrector/commands/retry-spell-corrector-job.command.ts +17 -0
  205. package/spell-corrector/commands/set-reaction-to-spell-corrector-job.command.ts +30 -0
  206. package/spell-corrector/commands/spell-corrector.command.ts +18 -0
  207. package/spell-corrector/commands/update-spell-corrector-job-title.command.ts +16 -0
  208. package/spell-corrector/index.ts +4 -0
  209. package/spell-corrector/models/index.ts +3 -0
  210. package/spell-corrector/models/spell-corrector-job.schema.ts +25 -0
  211. package/spell-corrector/models/spell-corrector-model.schema.ts +18 -0
  212. package/spell-corrector/models/spell-corrector-tool-config.schema.ts +9 -0
  213. package/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.ts +11 -0
  214. package/spell-corrector/queries/find-spell-corrector-jobs.query.ts +33 -0
  215. package/spell-corrector/queries/get-spell-corrector-tool-config.query.ts +8 -0
  216. package/spell-corrector/queries/index.ts +3 -0
  217. package/spell-corrector/routes/index.ts +1 -0
  218. package/spell-corrector/routes/spell-corrector.amqp.routes.ts +12 -0
  219. package/stt/models/stt-response.schema.ts +2 -0
  220. package/tool-workspace/commands/index.ts +2 -0
  221. package/tool-workspace/commands/soft-delete-tool-workspace.command.ts +25 -0
  222. package/tool-workspace/commands/update-tool-workspace.command.ts +30 -0
  223. package/tool-workspace/enums/index.ts +2 -0
  224. package/tool-workspace/enums/tool-workspace-item-slot.enum.ts +5 -0
  225. package/tool-workspace/enums/tool-workspace-status.enum.ts +4 -0
  226. package/tool-workspace/index.ts +5 -0
  227. package/tool-workspace/models/index.ts +4 -0
  228. package/tool-workspace/models/tool-workspace-contents.schema.ts +10 -0
  229. package/tool-workspace/models/tool-workspace-item.schema.ts +17 -0
  230. package/tool-workspace/models/tool-workspace-job.schema.ts +17 -0
  231. package/tool-workspace/models/tool-workspace.schema.ts +17 -0
  232. package/tool-workspace/queries/find-tool-workspace-by-uuid.query.ts +26 -0
  233. package/tool-workspace/queries/find-tool-workspaces.query.ts +37 -0
  234. package/tool-workspace/queries/index.ts +2 -0
  235. package/tool-workspace/routes/index.ts +1 -0
  236. package/tool-workspace/routes/tool-workspace.amqp.routes.ts +6 -0
  237. package/tools/enums/tool-content-type.enum.ts +3 -1
  238. package/tools/enums/tool-type.enum.ts +2 -0
  239. package/tools/models/global-tools-config.schema.ts +4 -0
  240. package/tools/models/tools-with-configs.schema.ts +14 -0
  241. package/video/commands/video.command.ts +7 -0
  242. package/video/const/videoMaxDuration.ts +1 -1
  243. package/video/enums/video-resolution.enum.ts +1 -0
  244. package/video/enums/video-strategy.enum.ts +1 -0
  245. package/video/models/video-config.schema.ts +2 -0
  246. package/video/models/video-model.schema.ts +1 -0
  247. package/video-editor/commands/edit-video.command.ts +2 -1
  248. package/video-editor/commands/get-video-editor-price.command.ts +2 -0
  249. package/video-editor/commands/retry-video-editor-job.command.ts +5 -1
  250. package/video-editor/enums/index.ts +1 -0
  251. package/video-editor/enums/video-editor-pricing-rule-type.enum.ts +4 -0
  252. package/video-editor/models/video-editor-job.schema.ts +9 -0
  253. package/video-editor/models/video-editor-model.schema.ts +45 -1
  254. package/video-editor/utils/calculate-video-editing-price.ts +45 -2
  255. package/writer/commands/collect-sources.command.ts +15 -0
  256. package/writer/commands/confirm-source-citation-metadata.command.ts +18 -0
  257. package/writer/commands/discard-writer-source.command.ts +18 -0
  258. package/writer/commands/generate-document-outline.command.ts +17 -0
  259. package/writer/commands/index.ts +5 -0
  260. package/writer/commands/update-writer-document-outline.command.ts +1 -0
  261. package/writer/commands/upload-writer-source.command.ts +18 -0
  262. package/writer/enums/index.ts +3 -0
  263. package/writer/enums/writer-document-stage.enum.ts +8 -0
  264. package/writer/enums/writer-source-origin.enum.ts +4 -0
  265. package/writer/enums/writer-source-status.enum.ts +5 -0
  266. package/writer/enums/writer-source-type.enum.ts +4 -0
  267. package/writer/models/index.ts +2 -0
  268. package/writer/models/writer-document-type.schema.ts +1 -1
  269. package/writer/models/writer-document.schema.ts +3 -0
  270. package/writer/models/writer-source-bibliographic-metadata.schema.ts +31 -0
  271. package/writer/models/writer-source.schema.ts +22 -0
  272. package/writer/queries/get-writer-document-sources.query.ts +15 -0
  273. package/writer/queries/index.ts +1 -0
  274. package/writer/routes/writer.routes.ts +6 -0
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GenerateWriterDocumentOutlineCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const models_1 = require("../models");
7
+ var GenerateWriterDocumentOutlineCommand;
8
+ (function (GenerateWriterDocumentOutlineCommand) {
9
+ GenerateWriterDocumentOutlineCommand.RequestSchema = zod_1.z.object({
10
+ uuid: zod_1.z.string().uuid(),
11
+ numPages: zod_1.z.number(),
12
+ description: zod_1.z.string().nullable().optional(),
13
+ userId: zod_1.z.string().uuid().nullable().optional(),
14
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
15
+ });
16
+ GenerateWriterDocumentOutlineCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.WriterDocumentSchema);
17
+ })(GenerateWriterDocumentOutlineCommand || (exports.GenerateWriterDocumentOutlineCommand = GenerateWriterDocumentOutlineCommand = {}));
@@ -22,6 +22,7 @@ __exportStar(require("./update-writer-document-title-page.command"), exports);
22
22
  __exportStar(require("./toggle-writer-document-title-page.command"), exports);
23
23
  __exportStar(require("./export-writer-document-as-docx.command"), exports);
24
24
  __exportStar(require("./generate-document-contents.command"), exports);
25
+ __exportStar(require("./generate-document-outline.command"), exports);
25
26
  __exportStar(require("./get-writer-content-generation-price.command"), exports);
26
27
  __exportStar(require("./writer-paraphrase.command"), exports);
27
28
  __exportStar(require("./writer-extend-text.command"), exports);
@@ -30,3 +31,7 @@ __exportStar(require("./writer-fix-errors.command"), exports);
30
31
  __exportStar(require("./writer-generate-text.command"), exports);
31
32
  __exportStar(require("./update-writer-document-contents.command"), exports);
32
33
  __exportStar(require("./set-reaction-writer-document.command"), exports);
34
+ __exportStar(require("./collect-sources.command"), exports);
35
+ __exportStar(require("./upload-writer-source.command"), exports);
36
+ __exportStar(require("./confirm-source-citation-metadata.command"), exports);
37
+ __exportStar(require("./discard-writer-source.command"), exports);
@@ -11,6 +11,7 @@ var UpdateWriterDocumentOutlineCommand;
11
11
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
12
  documentId: zod_1.z.string().uuid(),
13
13
  data: models_1.WriterDocumentOutlineSchema,
14
+ modelId: zod_1.z.string().uuid().nullable().optional(),
14
15
  });
15
16
  UpdateWriterDocumentOutlineCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.WriterDocumentOutlineSchema);
16
17
  })(UpdateWriterDocumentOutlineCommand || (exports.UpdateWriterDocumentOutlineCommand = UpdateWriterDocumentOutlineCommand = {}));
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadWriterSourceCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const models_1 = require("../models");
7
+ var UploadWriterSourceCommand;
8
+ (function (UploadWriterSourceCommand) {
9
+ UploadWriterSourceCommand.RequestSchema = zod_1.z.object({
10
+ documentId: zod_1.z.string().uuid(),
11
+ fileId: zod_1.z.string().uuid(),
12
+ fileUrl: zod_1.z.string().url(),
13
+ fileMimetype: zod_1.z.string(),
14
+ userId: zod_1.z.string().uuid().nullable().optional(),
15
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
16
+ });
17
+ UploadWriterSourceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.WriterSourceSchema);
18
+ })(UploadWriterSourceCommand || (exports.UploadWriterSourceCommand = UploadWriterSourceCommand = {}));
@@ -20,3 +20,6 @@ __exportStar(require("./writer-ai-action-type.enum"), exports);
20
20
  __exportStar(require("./writer-document-section-type.enum"), exports);
21
21
  __exportStar(require("./writer-document-stage.enum"), exports);
22
22
  __exportStar(require("./writer-content-generation-strategy.enum"), exports);
23
+ __exportStar(require("./writer-source-type.enum"), exports);
24
+ __exportStar(require("./writer-source-origin.enum"), exports);
25
+ __exportStar(require("./writer-source-status.enum"), exports);
@@ -4,9 +4,15 @@ exports.WRITER_DOCUMENT_STAGE = void 0;
4
4
  var WRITER_DOCUMENT_STAGE;
5
5
  (function (WRITER_DOCUMENT_STAGE) {
6
6
  WRITER_DOCUMENT_STAGE["CREATED"] = "CREATED";
7
+ WRITER_DOCUMENT_STAGE["ANALYZING_TOPIC"] = "ANALYZING_TOPIC";
8
+ WRITER_DOCUMENT_STAGE["TOPIC_ANALYZED"] = "TOPIC_ANALYZED";
9
+ WRITER_DOCUMENT_STAGE["TOPIC_ANALYSIS_FAILED"] = "TOPIC_ANALYSIS_FAILED";
7
10
  WRITER_DOCUMENT_STAGE["GENERATING_OUTLINE"] = "GENERATING_OUTLINE";
8
11
  WRITER_DOCUMENT_STAGE["OUTLINE_GENERATED"] = "OUTLINE_GENERATED";
9
12
  WRITER_DOCUMENT_STAGE["OUTLINE_GENERATION_FAILED"] = "OUTLINE_GENERATION_FAILED";
13
+ WRITER_DOCUMENT_STAGE["COLLECTING_SOURCES"] = "COLLECTING_SOURCES";
14
+ WRITER_DOCUMENT_STAGE["SOURCES_COLLECTED"] = "SOURCES_COLLECTED";
15
+ WRITER_DOCUMENT_STAGE["SOURCES_COLLECTION_FAILED"] = "SOURCES_COLLECTION_FAILED";
10
16
  WRITER_DOCUMENT_STAGE["GENERATING_CONTENT"] = "GENERATING_CONTENT";
11
17
  WRITER_DOCUMENT_STAGE["CONTENT_GENERATED"] = "CONTENT_GENERATED";
12
18
  WRITER_DOCUMENT_STAGE["CONTENT_GENERATION_FAILED"] = "CONTENT_GENERATION_FAILED";
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WRITER_SOURCE_ORIGIN = void 0;
4
+ var WRITER_SOURCE_ORIGIN;
5
+ (function (WRITER_SOURCE_ORIGIN) {
6
+ WRITER_SOURCE_ORIGIN["WEB_SEARCH"] = "WEB_SEARCH";
7
+ WRITER_SOURCE_ORIGIN["USER_UPLOAD"] = "USER_UPLOAD";
8
+ })(WRITER_SOURCE_ORIGIN || (exports.WRITER_SOURCE_ORIGIN = WRITER_SOURCE_ORIGIN = {}));
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WRITER_SOURCE_STATUS = void 0;
4
+ var WRITER_SOURCE_STATUS;
5
+ (function (WRITER_SOURCE_STATUS) {
6
+ WRITER_SOURCE_STATUS["READY"] = "READY";
7
+ WRITER_SOURCE_STATUS["REQUIRES_CITATION_METADATA_CONFIRMATION"] = "REQUIRES_CITATION_METADATA_CONFIRMATION";
8
+ WRITER_SOURCE_STATUS["DISCARDED"] = "DISCARDED";
9
+ })(WRITER_SOURCE_STATUS || (exports.WRITER_SOURCE_STATUS = WRITER_SOURCE_STATUS = {}));
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WRITER_SOURCE_TYPE = void 0;
4
+ var WRITER_SOURCE_TYPE;
5
+ (function (WRITER_SOURCE_TYPE) {
6
+ WRITER_SOURCE_TYPE["JOURNAL_ARTICLE"] = "JOURNAL_ARTICLE";
7
+ WRITER_SOURCE_TYPE["BOOK"] = "BOOK";
8
+ })(WRITER_SOURCE_TYPE || (exports.WRITER_SOURCE_TYPE = WRITER_SOURCE_TYPE = {}));
@@ -21,3 +21,5 @@ __exportStar(require("./writer-document-outline.schema"), exports);
21
21
  __exportStar(require("./writer-document-title-page.schema"), exports);
22
22
  __exportStar(require("./writer-document.schema"), exports);
23
23
  __exportStar(require("./writer-document-type.schema"), exports);
24
+ __exportStar(require("./writer-source.schema"), exports);
25
+ __exportStar(require("./writer-source-bibliographic-metadata.schema"), exports);
@@ -10,9 +10,9 @@ exports.WriterDocumentTypeSchema = zod_1.z.object({
10
10
  order: zod_1.z.number(),
11
11
  minPages: zod_1.z.number(),
12
12
  maxPages: zod_1.z.number(),
13
+ skipSources: zod_1.z.boolean(),
13
14
  pageRange: zod_1.z.array(zod_1.z.number()),
14
15
  needsTableOfContents: zod_1.z.boolean(),
15
- needsCitations: zod_1.z.boolean(),
16
16
  createdAt: zod_1.z.date(),
17
17
  updatedAt: zod_1.z.date(),
18
18
  });
@@ -22,6 +22,9 @@ exports.WriterDocumentSchema = zod_1.z.object({
22
22
  modelId: zod_1.z.string().nullable(),
23
23
  reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
24
24
  dislikeReason: zod_1.z.string().nullable(),
25
+ description: zod_1.z.string().nullable(),
26
+ internalError: zod_1.z.string().nullable(),
27
+ skipSources: zod_1.z.boolean(),
25
28
  pages: zod_1.z.number(),
26
29
  isDeleted: zod_1.z.boolean(),
27
30
  tokenReservationId: zod_1.z.string().nullable().optional(),
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WriterSourceBibliographicMetadataSchema = exports.JournalArticleBibliographicMetadataSchema = exports.BookBibliographicMetadataSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("../enums");
6
+ exports.BookBibliographicMetadataSchema = zod_1.z.object({
7
+ type: zod_1.z.literal(enums_1.WRITER_SOURCE_TYPE.BOOK),
8
+ title: zod_1.z.string(),
9
+ authors: zod_1.z.string(),
10
+ year: zod_1.z.number(),
11
+ publicationCity: zod_1.z.string(),
12
+ publisher: zod_1.z.string(),
13
+ pageCount: zod_1.z.number().nullable(),
14
+ });
15
+ exports.JournalArticleBibliographicMetadataSchema = zod_1.z.object({
16
+ type: zod_1.z.literal(enums_1.WRITER_SOURCE_TYPE.JOURNAL_ARTICLE),
17
+ title: zod_1.z.string(),
18
+ authors: zod_1.z.string(),
19
+ year: zod_1.z.number(),
20
+ journalName: zod_1.z.string(),
21
+ issueNumber: zod_1.z.string(),
22
+ pageRange: zod_1.z.string(),
23
+ });
24
+ exports.WriterSourceBibliographicMetadataSchema = zod_1.z.discriminatedUnion('type', [
25
+ exports.BookBibliographicMetadataSchema,
26
+ exports.JournalArticleBibliographicMetadataSchema,
27
+ ]);
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WriterSourceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("../enums");
6
+ const writer_source_bibliographic_metadata_schema_1 = require("./writer-source-bibliographic-metadata.schema");
7
+ exports.WriterSourceSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ query: zod_1.z.string().nullable(),
10
+ url: zod_1.z.string(),
11
+ snippet: zod_1.z.string().nullable(),
12
+ inclusionReason: zod_1.z.string().nullable(),
13
+ sourceOrigin: zod_1.z.nativeEnum(enums_1.WRITER_SOURCE_ORIGIN),
14
+ content: zod_1.z.string().nullable(),
15
+ documentId: zod_1.z.string().uuid(),
16
+ fileId: zod_1.z.string().nullable(),
17
+ citation: zod_1.z.string().nullable(),
18
+ status: zod_1.z.nativeEnum(enums_1.WRITER_SOURCE_STATUS),
19
+ bibliographicMetadata: writer_source_bibliographic_metadata_schema_1.WriterSourceBibliographicMetadataSchema.nullable(),
20
+ createdAt: zod_1.z.date(),
21
+ updatedAt: zod_1.z.date(),
22
+ });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetWriterDocumentSourcesQueryContract = void 0;
4
+ const zod_1 = require("zod");
5
+ const command_response_schema_1 = require("../../common/models/command-response.schema");
6
+ const models_1 = require("../models");
7
+ var GetWriterDocumentSourcesQueryContract;
8
+ (function (GetWriterDocumentSourcesQueryContract) {
9
+ GetWriterDocumentSourcesQueryContract.RequestSchema = zod_1.z.object({
10
+ uuid: zod_1.z.string().uuid(),
11
+ userId: zod_1.z.string().uuid().nullable().optional(),
12
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ });
14
+ GetWriterDocumentSourcesQueryContract.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.array(models_1.WriterSourceSchema));
15
+ })(GetWriterDocumentSourcesQueryContract || (exports.GetWriterDocumentSourcesQueryContract = GetWriterDocumentSourcesQueryContract = {}));
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./find-writer-documents.query"), exports);
18
18
  __exportStar(require("./get-writer-config.query"), exports);
19
19
  __exportStar(require("./find-writer-document-by-uuid.query"), exports);
20
+ __exportStar(require("./get-writer-document-sources.query"), exports);
@@ -13,6 +13,12 @@ exports.WRITER_AMQP_ROUTES = {
13
13
  TOGGLE_DOCUMENT_TITLE_PAGE: 'tools.writer.toggle-document-title-page.rpc',
14
14
  UPDATE_DOCUMENT_CONTENTS: 'tools.writer.update-document-contents.rpc',
15
15
  GENERATE_DOCUMENT_CONTENTS: 'tools.writer.generate-document-contents.rpc',
16
+ GENERATE_DOCUMENT_OUTLINE: 'tools.writer.generate-document-outline.rpc',
17
+ COLLECT_SOURCES: 'tools.writer.collect-sources.rpc',
18
+ GET_DOCUMENT_SOURCES: 'tools.writer.get-document-sources.rpc',
19
+ UPLOAD_SOURCE: 'tools.writer.upload-source.rpc',
20
+ CONFIRM_SOURCE_CITATION_METADATA: 'tools.writer.confirm-source-citation-metadata.rpc',
21
+ DISCARD_SOURCE: 'tools.writer.discard-source.rpc',
16
22
  GET_CONTENT_GENERATION_PRICE: 'tools.writer.content-generation.get-price.rpc',
17
23
  PARAPHRASE: 'tools.writer.actions.paraphrase.rpc',
18
24
  EXTEND_TEXT: 'tools.writer.actions.extend-text.rpc',
@@ -0,0 +1,4 @@
1
+ export enum FILE_TYPE {
2
+ PDF = 'PDF',
3
+ DOCX = 'DOCX',
4
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './reasoning-effort.enum';
2
2
  export * from './user-reaction.enum';
3
3
  export * from './tool-model-status.enum';
4
+ export * from './file-type.enum';
@@ -3,3 +3,8 @@ export enum REASONING_EFFORT {
3
3
  MEDIUM = 'medium',
4
4
  HIGH = 'high',
5
5
  }
6
+
7
+ export enum IMAGE_DETAIL {
8
+ LOW = 'low',
9
+ HIGH = 'high',
10
+ }
@@ -12,6 +12,7 @@ export namespace ImageEditorCommand {
12
12
  params: z.object({
13
13
  attachedFiles: z.array(AttachedFileSchema),
14
14
  systemPromptId: z.string().optional(),
15
+ aspectRatio: z.string().optional(),
15
16
  }),
16
17
  userHasActiveSubscriptionOrProduct: z.boolean(),
17
18
  tokenReservationId: z.string().uuid(),
@@ -6,6 +6,8 @@ export const ImageEditorJobParamsSchema = z.object({
6
6
  attachedFiles: z.array(AttachedFileSchema).optional(),
7
7
  imageUrls: z.array(z.string()).optional(),
8
8
  systemPromptId: z.string().optional(),
9
+ aspectRatio: z.string().optional(),
10
+ userHasActiveSubscriptionOrProduct: z.boolean().optional(),
9
11
  });
10
12
 
11
13
  export type ImageEditorJobParams = z.infer<typeof ImageEditorJobParamsSchema>;
@@ -8,6 +8,13 @@ export const ImageEditorModelParamsSchema = z.object({
8
8
  maxImages: z.number(),
9
9
  acceptedTypes: z.array(z.string()),
10
10
  }),
11
+ aspectRatio: z.record(
12
+ z.string(),
13
+ z.object({
14
+ width: z.number(),
15
+ height: z.number(),
16
+ }),
17
+ ),
11
18
  });
12
19
 
13
20
  export type ImageEditorModelParams = z.infer<typeof ImageEditorModelParamsSchema>;
@@ -32,6 +39,8 @@ export const ImageEditorModelSchema = z.object({
32
39
  title: z.string(),
33
40
  description: z.string(),
34
41
  aiModel: z.string(),
42
+ isNew: z.boolean(),
43
+ tierLabel: z.string(),
35
44
  pricePerImage: z.number(),
36
45
  order: z.number(),
37
46
  status: z.nativeEnum(TOOL_MODEL_STATUS),
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { JOB_STATUS } from '../../tools';
2
+ import { JOB_REQUEST_ORIGIN, JOB_STATUS } from '../../tools';
3
3
  import { AttachedFileSchema, USER_REACTION } from '../../common';
4
4
  import { IMAGE_GENERATION_RESOLUTION } from '../enums';
5
5
 
@@ -29,6 +29,7 @@ export const ImageGenerationJobSchema = z.object({
29
29
  userId: z.string().nullable().optional(),
30
30
  unregisteredUserId: z.string().nullable().optional(),
31
31
  isPublished: z.boolean(),
32
+ origin: z.nativeEnum(JOB_REQUEST_ORIGIN),
32
33
  postId: z.string().nullable(),
33
34
  isDeleted: z.boolean(),
34
35
  internalError: z.string().nullable(),
@@ -46,6 +46,7 @@ export const ImageGenerationModelSchema = z.object({
46
46
  title: z.string(),
47
47
  description: z.string(),
48
48
  aiModel: z.string(),
49
+ isNew: z.boolean(),
49
50
  price: z.number(),
50
51
  order: z.number(),
51
52
  params: ImageGenerationModelParamsSchema,
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
3
  import { ImageGenerationJobSchema } from '../models';
4
+ import { JOB_REQUEST_ORIGIN } from '../../tools/enums/job-request-origin.enum';
4
5
 
5
6
  export namespace FindImageGenerationJobsQuery {
6
7
  export const RequestSchema = z
@@ -10,6 +11,7 @@ export namespace FindImageGenerationJobsQuery {
10
11
  title: z.string().optional(),
11
12
  limit: z.coerce.number().min(1).optional(),
12
13
  offset: z.coerce.number().min(0).default(0).optional(),
14
+ origin: z.nativeEnum(JOB_REQUEST_ORIGIN).optional(),
13
15
  })
14
16
  .refine(
15
17
  (data) => {
package/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './common';
2
+ export * from './account-merge';
2
3
  export * from './paraphrase';
3
4
  export * from './tools';
4
5
  export * from './stt';
@@ -14,6 +15,10 @@ export * from './music';
14
15
  export * from './ai-proxy';
15
16
  export * from './ai-vendor';
16
17
  export * from './marketplace-card';
18
+ export * from './analytics';
19
+ export * from './solving-edu-task';
20
+ export * from './spell-corrector';
21
+ export * from './tool-workspace';
17
22
 
18
23
  import * as common from './common';
19
24
  import * as paraphrase from './paraphrase';
@@ -31,6 +36,11 @@ import * as music from './music';
31
36
  import * as aiVendor from './ai-vendor';
32
37
  import * as interiorDesign from './interior-design';
33
38
  import * as marketplaceCard from './marketplace-card';
39
+ import * as analytics from './analytics';
40
+ import * as solvingEduTask from './solving-edu-task';
41
+ import * as spellCorrector from './spell-corrector';
42
+ import * as accountMerge from './account-merge';
43
+ import * as toolWorkspace from './tool-workspace';
34
44
 
35
45
  export namespace ToolService {
36
46
  export import Common = common;
@@ -49,4 +59,9 @@ export namespace ToolService {
49
59
  export import AiVendor = aiVendor;
50
60
  export import InteriorDesign = interiorDesign;
51
61
  export import MarketplaceCard = marketplaceCard;
62
+ export import Analytics = analytics;
63
+ export import SolvingEduTask = solvingEduTask;
64
+ export import SpellCorrector = spellCorrector;
65
+ export import AccountMerge = accountMerge;
66
+ export import ToolWorkspace = toolWorkspace;
52
67
  }
@@ -1,11 +1,18 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
3
  import { MarketplaceCardJobSchema } from '../models';
4
+ import { TOOL_CONTENT_TYPE } from '../../tools';
5
+ import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
4
6
 
5
7
  export namespace ExecuteMarketplaceCardCommand {
6
8
  export const RequestSchema = z.object({
7
9
  userId: z.string().uuid().nullable().optional(),
8
10
  unregisteredUserId: z.string().uuid().nullable().optional(),
11
+ workspaceId: z.string().uuid().nullable().optional(),
12
+ workspaceItemId: z.string().uuid().nullable().optional(),
13
+ workspaceToolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable().optional(),
14
+ workspaceSlot: z.nativeEnum(TOOL_WORKSPACE_ITEM_SLOT).optional(),
15
+ workspaceOrder: z.number().int().min(0).optional(),
9
16
  params: z.object({
10
17
  title: z.string(),
11
18
  subtitle: z.string().nullable().optional(),
@@ -3,3 +3,5 @@ export * from './set-reaction-to-marketplace-card-job.command';
3
3
  export * from './soft-delete-marketplace-card-job-by-uuid.command';
4
4
  export * from './retry-marketplace-card-job.command';
5
5
  export * from './get-marketplace-card-price.command';
6
+ export * from './soft-delete-all-marketplace-card-jobs.command';
7
+ export * from './update-title-marketplace-card-job.command';
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+
4
+ export namespace SoftDeleteAllMarketplaceCardJobsCommand {
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,16 @@
1
+ import { z } from 'zod';
2
+ import { MarketplaceCardJobSchema } from '../models';
3
+ import { ICommandResponseSchema } from '../../common';
4
+
5
+ export namespace UpdateTitleMarketplaceCardJobCommand {
6
+ export const RequestSchema = z.object({
7
+ userId: z.string().uuid().nullable().optional(),
8
+ unregisteredUserId: z.string().uuid().nullable().optional(),
9
+ uuid: z.string(),
10
+ title: z.string(),
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
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './marketplace-card-job.schema';
2
2
  export * from './marketplace-card-config.schema';
3
3
  export * from './marketplace-card-style-preset.schema';
4
+ export * from './marketplace-card-model.schema';
@@ -1,7 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import { MarketplaceCardStylePresetSchema } from './marketplace-card-style-preset.schema';
3
+ import { MarketplaceCardModelSchema } from './marketplace-card-model.schema';
3
4
 
4
5
  export const MarketplaceCardConfigSchema = z.object({
5
6
  styles: z.array(MarketplaceCardStylePresetSchema),
7
+ models: z.array(MarketplaceCardModelSchema),
6
8
  });
7
9
  export type MarketplaceCardConfigModel = z.infer<typeof MarketplaceCardConfigSchema>;
@@ -30,4 +30,4 @@ export const MarketplaceCardJobSchema = z.object({
30
30
  completedAt: z.date().nullable().optional(),
31
31
  updatedAt: z.date(),
32
32
  });
33
- export type MarketplaceCardModel = z.infer<typeof MarketplaceCardJobSchema>;
33
+ export type MarketplaceCardJob = z.infer<typeof MarketplaceCardJobSchema>;
@@ -7,4 +7,6 @@ export const MARKETPLACE_CARD_AMQP_ROUTES = {
7
7
  SET_REACTION: 'tools.marketplace-card.jobs.set-reaction.rpc',
8
8
  SOFT_DELETE: 'tools.marketplace-card.soft-delete.rpc',
9
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',
10
12
  } as const;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.1.134",
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>;