@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,5 @@
1
+ export enum TOOL_WORKSPACE_ITEM_SLOT {
2
+ CAPITAL = 'Заглавная',
3
+ INTERNAL = 'Внутренняя',
4
+ VIDEO = 'Видео',
5
+ }
@@ -0,0 +1,4 @@
1
+ export enum TOOL_WORKSPACE_STATUS {
2
+ ACTIVE = 'active',
3
+ DELETED = 'deleted',
4
+ }
@@ -0,0 +1,5 @@
1
+ export * from './commands';
2
+ export * from './queries';
3
+ export * from './models';
4
+ export * from './enums';
5
+ export * from './routes';
@@ -0,0 +1,4 @@
1
+ export * from './tool-workspace.schema';
2
+ export * from './tool-workspace-job.schema';
3
+ export * from './tool-workspace-item.schema';
4
+ export * from './tool-workspace-contents.schema';
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { ToolWorkspaceSchema } from './tool-workspace.schema';
3
+ import { ToolWorkspaceItemSchema } from './tool-workspace-item.schema';
4
+
5
+ export const ToolWorkspaceContentsSchema = z.object({
6
+ workspace: ToolWorkspaceSchema,
7
+ items: z.array(ToolWorkspaceItemSchema),
8
+ });
9
+
10
+ export type ToolWorkspaceContents = z.infer<typeof ToolWorkspaceContentsSchema>;
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { TOOL_TYPE } from '../../tools';
3
+ import { TOOL_WORKSPACE_ITEM_SLOT } from '../enums';
4
+ import { ToolWorkspaceJobSchema } from './tool-workspace-job.schema';
5
+
6
+ export const ToolWorkspaceItemSchema = z.object({
7
+ uuid: z.string().uuid(),
8
+ jobId: z.string().uuid(),
9
+ jobType: z.nativeEnum(TOOL_TYPE),
10
+ slotTitle: z.nativeEnum(TOOL_WORKSPACE_ITEM_SLOT),
11
+ order: z.number().int().min(0),
12
+ content: ToolWorkspaceJobSchema,
13
+ createdAt: z.date(),
14
+ updatedAt: z.date(),
15
+ });
16
+
17
+ export type ToolWorkspaceItem = z.infer<typeof ToolWorkspaceItemSchema>;
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { MarketplaceCardJobSchema } from '../../marketplace-card';
3
+ import { TOOL_TYPE } from '../../tools';
4
+ import { VideoJobSchema } from '../../video';
5
+
6
+ export const ToolWorkspaceJobSchema = z.discriminatedUnion('type', [
7
+ z.object({
8
+ type: z.literal(TOOL_TYPE.MARKETPLACE_CARD_GENERATION),
9
+ job: MarketplaceCardJobSchema,
10
+ }),
11
+ z.object({
12
+ type: z.literal(TOOL_TYPE.VIDEO),
13
+ job: VideoJobSchema,
14
+ }),
15
+ ]);
16
+
17
+ export type ToolWorkspaceJob = z.infer<typeof ToolWorkspaceJobSchema>;
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { TOOL_CONTENT_TYPE } from '../../tools';
3
+ import { TOOL_WORKSPACE_STATUS } from '../enums';
4
+
5
+ export const ToolWorkspaceSchema = z.object({
6
+ uuid: z.string().uuid(),
7
+ toolType: z.nativeEnum(TOOL_CONTENT_TYPE),
8
+ title: z.string(),
9
+ coverUrl: z.string().nullable(),
10
+ status: z.nativeEnum(TOOL_WORKSPACE_STATUS),
11
+ userId: z.string().uuid().nullable().optional(),
12
+ unregisteredUserId: z.string().uuid().nullable().optional(),
13
+ createdAt: z.date(),
14
+ updatedAt: z.date(),
15
+ });
16
+
17
+ export type ToolWorkspace = z.infer<typeof ToolWorkspaceSchema>;
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { ToolWorkspaceContentsSchema } from '../models';
4
+
5
+ export namespace FindToolWorkspaceByUuidQuery {
6
+ export const RequestSchema = z
7
+ .object({
8
+ uuid: z.string().uuid(),
9
+ userId: z.string().uuid().optional(),
10
+ unregisteredUserId: z.string().uuid().optional(),
11
+ })
12
+ .refine(
13
+ (data) => {
14
+ return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
15
+ },
16
+ {
17
+ message: 'At least userId or unregisteredUserId must be present',
18
+ path: ['userId', 'unregisteredUserId'],
19
+ },
20
+ );
21
+
22
+ export type Request = z.infer<typeof RequestSchema>;
23
+
24
+ export const ResponseSchema = ICommandResponseSchema(ToolWorkspaceContentsSchema.nullable());
25
+ export type Response = z.infer<typeof ResponseSchema>;
26
+ }
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { TOOL_CONTENT_TYPE } from '../../tools';
4
+ import { ToolWorkspaceSchema } from '../models';
5
+
6
+ export namespace FindToolWorkspacesQuery {
7
+ export const RequestSchema = z
8
+ .object({
9
+ toolType: z.nativeEnum(TOOL_CONTENT_TYPE).optional(),
10
+ title: z.string().optional(),
11
+ userId: z.string().uuid().optional(),
12
+ unregisteredUserId: z.string().uuid().optional(),
13
+ limit: z.coerce.number().min(1).optional(),
14
+ offset: z.coerce.number().min(0).default(0).optional(),
15
+ })
16
+ .refine(
17
+ (data) => {
18
+ return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
19
+ },
20
+ {
21
+ message: 'At least userId or unregisteredUserId must be present',
22
+ path: ['userId', 'unregisteredUserId'],
23
+ },
24
+ );
25
+
26
+ export type Request = z.infer<typeof RequestSchema>;
27
+
28
+ export const ResponseSchema = ICommandResponseSchema(
29
+ z.object({
30
+ data: z.array(ToolWorkspaceSchema),
31
+ page: z.number(),
32
+ totalPages: z.number(),
33
+ }),
34
+ );
35
+
36
+ export type Response = z.infer<typeof ResponseSchema>;
37
+ }
@@ -0,0 +1,2 @@
1
+ export * from './find-tool-workspaces.query';
2
+ export * from './find-tool-workspace-by-uuid.query';
@@ -0,0 +1 @@
1
+ export * from './tool-workspace.amqp.routes';
@@ -0,0 +1,6 @@
1
+ export const TOOL_WORKSPACE_AMQP_ROUTES = {
2
+ UPDATE: 'tools.workspace.update.rpc',
3
+ SOFT_DELETE: 'tools.workspace.soft-delete.rpc',
4
+ GET: 'tools.workspace.get.rpc',
5
+ LIST: 'tools.workspace.list.rpc',
6
+ } as const;
@@ -11,5 +11,7 @@ export enum TOOL_CONTENT_TYPE {
11
11
  MUSIC = 'MUSIC',
12
12
  INTERIOR_DESIGN = 'INTERIOR_DESIGN',
13
13
  NONE = 'NONE',
14
- MARKETPLACE_CARD_GENERATION = 'MARKETPLACE_CARD_GENERATION',
14
+ MARKETPLACE_CARD_GENERATION = 'MARKETPLACE_CARD',
15
+ SOLVING_EDU_TASK = 'SOLVING_EDU_TASK',
16
+ SPELL_CORRECTOR = 'SPELL_CORRECTOR',
15
17
  }
@@ -14,4 +14,6 @@ export enum TOOL_TYPE {
14
14
  IMAGE_GENERATION = 'IMAGE_GENERATION',
15
15
  MARKETPLACE_CARD_GENERATION = 'MARKETPLACE_CARD_GENERATION',
16
16
  INTERIOR_DESIGN = 'INTERIOR_DESIGN',
17
+ SPELL_CORRECTOR = 'SPELL_CORRECTOR',
18
+ SOLVING_EDU_TASK = 'SOLVING_EDU_TASK',
17
19
  }
@@ -12,6 +12,8 @@ import { TTSConfigSchema } from '../../tts';
12
12
  import { STTConfigSchema } from '../../stt';
13
13
  import { MarketplaceCardConfigSchema } from '../../marketplace-card/models';
14
14
  import { InteriorDesignConfigSchema } from '../../interior-design';
15
+ import { SolvingEduTaskConfigSchema } from '../../solving-edu-task';
16
+ import { SpellCorrectorToolConfigSchema } from '../../spell-corrector';
15
17
 
16
18
  export const GlobalToolsConfigSchema = z.object({
17
19
  [TOOL_CONTENT_TYPE.VIDEO]: VideoConfigSchema,
@@ -26,6 +28,8 @@ export const GlobalToolsConfigSchema = z.object({
26
28
  [TOOL_CONTENT_TYPE.SPEECH_TO_TEXT]: STTConfigSchema,
27
29
  [TOOL_CONTENT_TYPE.MARKETPLACE_CARD_GENERATION]: MarketplaceCardConfigSchema,
28
30
  [TOOL_CONTENT_TYPE.INTERIOR_DESIGN]: InteriorDesignConfigSchema,
31
+ [TOOL_CONTENT_TYPE.SOLVING_EDU_TASK]: SolvingEduTaskConfigSchema,
32
+ [TOOL_CONTENT_TYPE.SPELL_CORRECTOR]: SpellCorrectorToolConfigSchema,
29
33
  });
30
34
 
31
35
  export type GlobalToolsConfig = z.infer<typeof GlobalToolsConfigSchema>;
@@ -13,6 +13,8 @@ import { STTConfigSchema } from '../../stt';
13
13
  import { MarketplaceCardConfigSchema } from '../../marketplace-card/models';
14
14
  import { ToolSchema } from './tool.schema';
15
15
  import { InteriorDesignConfigSchema } from '../../interior-design';
16
+ import { SolvingEduTaskConfigSchema } from '../../solving-edu-task';
17
+ import { SpellCorrectorToolConfigSchema } from '../../spell-corrector';
16
18
 
17
19
  // Discriminated union array: Tools with their configs
18
20
  export const ToolWithConfigSchema = z.discriminatedUnion('contentType', [
@@ -88,6 +90,18 @@ export const ToolWithConfigSchema = z.discriminatedUnion('contentType', [
88
90
  config: InteriorDesignConfigSchema,
89
91
  }),
90
92
  ),
93
+ ToolSchema.merge(
94
+ z.object({
95
+ contentType: z.literal(TOOL_CONTENT_TYPE.SOLVING_EDU_TASK),
96
+ config: SolvingEduTaskConfigSchema,
97
+ }),
98
+ ),
99
+ ToolSchema.merge(
100
+ z.object({
101
+ contentType: z.literal(TOOL_CONTENT_TYPE.SPELL_CORRECTOR),
102
+ config: SpellCorrectorToolConfigSchema,
103
+ }),
104
+ ),
91
105
  ]);
92
106
 
93
107
  export type ToolWithConfig = z.infer<typeof ToolWithConfigSchema>;
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
4
+ import { TOOL_CONTENT_TYPE } from '../../tools';
3
5
  import { VideoJobSchema } from '../models/video-job.schema';
4
6
  import { VideoGenerationRequestParamsSchema } from '../models';
5
7
 
@@ -7,6 +9,11 @@ export namespace VideoCommand {
7
9
  export const RequestSchema = z.object({
8
10
  userId: z.string().uuid().nullable().optional(),
9
11
  unregisteredUserId: z.string().uuid().nullable().optional(),
12
+ workspaceId: z.string().uuid().nullable().optional(),
13
+ workspaceItemId: z.string().uuid().nullable().optional(),
14
+ workspaceToolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable().optional(),
15
+ workspaceSlot: z.nativeEnum(TOOL_WORKSPACE_ITEM_SLOT).optional(),
16
+ workspaceOrder: z.number().int().min(0).optional(),
10
17
  prompt: z.string(),
11
18
  modelId: z.string(),
12
19
  params: VideoGenerationRequestParamsSchema,
@@ -1 +1 @@
1
- export const videoMaxDuration = 8;
1
+ export const videoMaxDuration = 15;
@@ -1,4 +1,5 @@
1
1
  export enum VIDEO_RESOLUTION {
2
+ LOW = '480p',
2
3
  STANDART = '720p',
3
4
  HIGH = '1080p',
4
5
  }
@@ -8,4 +8,5 @@ export enum VIDEO_GENERATION_STRATEGY {
8
8
  SEEDANCE_VIDEO_GENERATION_CALLBACK = 'SEEDANCE_VIDEO_GENERATION_CALLBACK',
9
9
  KLING_VIDEO_GENERATION_CALLBACK = 'KLING_VIDEO_GENERATION_CALLBACK',
10
10
  WAN_2_6_VIDEO_GENERATION_CALLBACK = 'WAN_2_6_VIDEO_GENERATION_CALLBACK',
11
+ GROK_VIDEO_GENERATION_CALLBACK = 'GROK_VIDEO_GENERATION_CALLBACK',
11
12
  }
@@ -1,7 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import { VideoModelSchema } from './video-model.schema';
3
+ import { AiVendorSchema } from '../../ai-vendor';
3
4
 
4
5
  export const VideoConfigSchema = z.object({
6
+ vendors: z.array(AiVendorSchema),
5
7
  models: z.array(VideoModelSchema),
6
8
  });
7
9
 
@@ -83,6 +83,7 @@ export const VideoModelSchema = z.object({
83
83
  params: VideoModelParamsSchema,
84
84
  pricingRules: VideoModelPricingRulesSchema,
85
85
  limitations: z.array(z.nativeEnum(VIDEO_GENERATION_MODEL_LIMITATION)),
86
+ vendorId: z.string().uuid(),
86
87
  createdAt: z.date(),
87
88
  updatedAt: z.date(),
88
89
  });
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { VideoEditorJobSchema } from '../models';
3
+ import { VideoEditorJobSchema, VideoEditorJobParamsSchema } from '../models';
4
4
 
5
5
  export namespace EditVideoCommand {
6
6
  export const RequestSchema = z.object({
@@ -13,6 +13,7 @@ export namespace EditVideoCommand {
13
13
  modelId: z.string().uuid(),
14
14
  tokenReservationId: z.string().uuid(),
15
15
  precalculatedPrice: z.number(),
16
+ params: VideoEditorJobParamsSchema.optional(),
16
17
  });
17
18
  export type Request = z.infer<typeof RequestSchema>;
18
19
 
@@ -1,9 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { VideoEditorPricingRequestParamsSchema } from '../models';
3
4
 
4
5
  export namespace GetVideoEditorPriceCommand {
5
6
  export const RequestSchema = z.object({
6
7
  modelId: z.string(),
8
+ params: VideoEditorPricingRequestParamsSchema,
7
9
  });
8
10
  export type Request = z.infer<typeof RequestSchema>;
9
11
 
@@ -1,6 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { VideoEditorJobSchema } from '../models/video-editor-job.schema';
3
+ import {
4
+ VideoEditorJobParamsSchema,
5
+ VideoEditorJobSchema,
6
+ } from '../models/video-editor-job.schema';
4
7
 
5
8
  export namespace RetryVideoEditorJobCommand {
6
9
  export const RequestSchema = z.object({
@@ -14,6 +17,7 @@ export namespace RetryVideoEditorJobCommand {
14
17
  modelId: z.string().uuid().optional(),
15
18
  tokenReservationId: z.string().uuid(),
16
19
  precalculatedPrice: z.number(),
20
+ params: VideoEditorJobParamsSchema.optional(),
17
21
  });
18
22
  export type Request = z.infer<typeof RequestSchema>;
19
23
 
@@ -1,2 +1,3 @@
1
1
  export * from './video-editor-model-limitation.enum';
2
+ export * from './video-editor-pricing-rule-type.enum';
2
3
  export * from './video-editor-model-strategy.enum';
@@ -0,0 +1,4 @@
1
+ export enum VIDEO_EDITOR_PRICING_RULE_TYPE {
2
+ FLAT = 'flat',
3
+ PER_SECOND = 'per_second',
4
+ }
@@ -2,6 +2,13 @@ import { z } from 'zod';
2
2
  import { JOB_STATUS } from '../../tools';
3
3
  import { USER_REACTION } from '../../common';
4
4
 
5
+ export const VideoEditorJobParamsSchema = z.object({
6
+ duration: z.number().optional(),
7
+ resolution: z.string().optional(),
8
+ });
9
+
10
+ export type VideoEditorJobParams = z.infer<typeof VideoEditorJobParamsSchema>;
11
+
5
12
  export const VideoEditorJobSchema = z.object({
6
13
  uuid: z.string(),
7
14
  prompt: z.string(),
@@ -17,6 +24,8 @@ export const VideoEditorJobSchema = z.object({
17
24
  inputVideoId: z.string().nullable(),
18
25
  outputVideoUrl: z.string().nullable(),
19
26
  outputVideoId: z.string().nullable(),
27
+ previewUrl: z.string().nullable(),
28
+ params: VideoEditorJobParamsSchema.optional(),
20
29
  duration: z.number(),
21
30
  attempts: z.array(z.any()),
22
31
  userId: z.string().nullable().optional(),
@@ -1,6 +1,48 @@
1
1
  import { z } from 'zod';
2
2
  import { IconVariantsSchema, TOOL_MODEL_STATUS } from '../../common';
3
- import { VIDEO_EDITOR_MODEL_LIMITATION, VIDEO_EDITOR_MODEL_STRATEGY } from '../enums';
3
+ import {
4
+ VIDEO_EDITOR_MODEL_LIMITATION,
5
+ VIDEO_EDITOR_MODEL_STRATEGY,
6
+ VIDEO_EDITOR_PRICING_RULE_TYPE,
7
+ } from '../enums';
8
+
9
+ export const VideoEditorModelParamsSchema = z.object({
10
+ duration: z
11
+ .object({
12
+ options: z.array(z.number()),
13
+ })
14
+ .optional(),
15
+ resolution: z
16
+ .object({
17
+ options: z.array(z.string()),
18
+ })
19
+ .optional(),
20
+ });
21
+
22
+ export type VideoEditorModelParams = z.infer<typeof VideoEditorModelParamsSchema>;
23
+
24
+ export const VideoEditorPricingRequestParamsSchema = z.object({
25
+ duration: z.number(),
26
+ resolution: z.string().optional(),
27
+ });
28
+ export type VideoEditorPricingRequestParams = z.infer<typeof VideoEditorPricingRequestParamsSchema>;
29
+
30
+ export const VideoEditorModelPricingRuleConditionSchema = z.object({
31
+ duration: z.number().optional(),
32
+ resolution: z.string().optional(),
33
+ });
34
+ export type VideoEditorModelPricingRuleCondition = z.infer<
35
+ typeof VideoEditorModelPricingRuleConditionSchema
36
+ >;
37
+
38
+ export const VideoEditorModelPricingRulesSchema = z.array(
39
+ z.object({
40
+ type: z.nativeEnum(VIDEO_EDITOR_PRICING_RULE_TYPE),
41
+ condition: VideoEditorModelPricingRuleConditionSchema,
42
+ value: z.number(),
43
+ }),
44
+ );
45
+ export type VideoEditorModelPricingRules = z.infer<typeof VideoEditorModelPricingRulesSchema>;
4
46
 
5
47
  export const VideoEditorModelSchema = z.object({
6
48
  uuid: z.string(),
@@ -15,6 +57,8 @@ export const VideoEditorModelSchema = z.object({
15
57
  maxInputVideoSizeBytes: z.number(),
16
58
  maxInputVideoDurationInSeconds: z.number(),
17
59
  supportedFormats: z.array(z.string()),
60
+ params: VideoEditorModelParamsSchema,
61
+ pricingRules: VideoEditorModelPricingRulesSchema,
18
62
  needsTranslation: z.boolean(),
19
63
  pricePerCall: z.number(),
20
64
  limitations: z.array(z.nativeEnum(VIDEO_EDITOR_MODEL_LIMITATION)),
@@ -1,3 +1,46 @@
1
- export function calculateVideoEditingPrice({ pricePerCall }: { pricePerCall: number }): number {
2
- return pricePerCall;
1
+ import { VIDEO_EDITOR_PRICING_RULE_TYPE } from '../enums';
2
+ import {
3
+ VideoEditorModelPricingRuleCondition,
4
+ VideoEditorModelPricingRules,
5
+ VideoEditorPricingRequestParams,
6
+ } from '../models';
7
+
8
+ function matchesCondition(
9
+ condition: VideoEditorModelPricingRuleCondition,
10
+ params: VideoEditorPricingRequestParams,
11
+ ): boolean {
12
+ const keys = Object.keys(condition) as (keyof VideoEditorModelPricingRuleCondition)[];
13
+
14
+ return keys.every((key) => {
15
+ const expected = condition[key];
16
+ if (expected === undefined || expected === null || expected === '') return true;
17
+
18
+ const value = params[key];
19
+ if (value === undefined || value === null) return false;
20
+
21
+ return value === expected;
22
+ });
23
+ }
24
+
25
+ export function calculateVideoEditingPrice({
26
+ pricePerCall,
27
+ params,
28
+ rules,
29
+ }: {
30
+ pricePerCall: number;
31
+ params: VideoEditorPricingRequestParams;
32
+ rules: VideoEditorModelPricingRules;
33
+ }): number {
34
+ const perSecondRule = rules
35
+ .filter((r) => r.type === VIDEO_EDITOR_PRICING_RULE_TYPE.PER_SECOND)
36
+ .find((r) => matchesCondition(r.condition, params));
37
+
38
+ const base = perSecondRule ? perSecondRule.value * params.duration : pricePerCall;
39
+
40
+ const flatMarkup = rules.reduce((sum, r) => {
41
+ if (r.type !== VIDEO_EDITOR_PRICING_RULE_TYPE.FLAT) return sum;
42
+ return matchesCondition(r.condition, params) ? sum + r.value : sum;
43
+ }, 0);
44
+
45
+ return Math.ceil(base + flatMarkup);
3
46
  }
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { WriterDocumentSchema } from '../models';
4
+
5
+ export namespace CollectWriterDocumentSourcesCommand {
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
+ export type Request = z.infer<typeof RequestSchema>;
12
+
13
+ export const ResponseSchema = ICommandResponseSchema(WriterDocumentSchema);
14
+ export type Response = z.infer<typeof ResponseSchema>;
15
+ }
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { WriterSourceSchema } from '../models/writer-source.schema';
4
+ import { WriterSourceBibliographicMetadataSchema } from '../models/writer-source-bibliographic-metadata.schema';
5
+
6
+ export namespace ConfirmSourceCitationMetadataCommand {
7
+ export const RequestSchema = z.object({
8
+ documentId: z.string().uuid(),
9
+ sourceId: z.string().uuid(),
10
+ bibliographicMetadata: WriterSourceBibliographicMetadataSchema,
11
+ userId: z.string().uuid().nullable().optional(),
12
+ unregisteredUserId: z.string().uuid().nullable().optional(),
13
+ });
14
+ export type Request = z.infer<typeof RequestSchema>;
15
+
16
+ export const ResponseSchema = ICommandResponseSchema(WriterSourceSchema);
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+
4
+ export namespace DiscardWriterSourceCommand {
5
+ export const RequestSchema = z.object({
6
+ sourceId: z.string().uuid(),
7
+ userId: z.string().uuid().nullable().optional(),
8
+ unregisteredUserId: z.string().uuid().nullable().optional(),
9
+ });
10
+ export type Request = z.infer<typeof RequestSchema>;
11
+
12
+ export const ResponseSchema = ICommandResponseSchema(
13
+ z.object({
14
+ isDiscarded: z.boolean(),
15
+ }),
16
+ );
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { WriterDocumentSchema } from '../models';
4
+
5
+ export namespace GenerateWriterDocumentOutlineCommand {
6
+ export const RequestSchema = z.object({
7
+ uuid: z.string().uuid(),
8
+ numPages: z.number(),
9
+ description: z.string().nullable().optional(),
10
+ userId: z.string().uuid().nullable().optional(),
11
+ unregisteredUserId: z.string().uuid().nullable().optional(),
12
+ });
13
+ export type Request = z.infer<typeof RequestSchema>;
14
+
15
+ export const ResponseSchema = ICommandResponseSchema(WriterDocumentSchema);
16
+ export type Response = z.infer<typeof ResponseSchema>;
17
+ }
@@ -6,6 +6,7 @@ export * from './update-writer-document-title-page.command';
6
6
  export * from './toggle-writer-document-title-page.command';
7
7
  export * from './export-writer-document-as-docx.command';
8
8
  export * from './generate-document-contents.command';
9
+ export * from './generate-document-outline.command';
9
10
  export * from './get-writer-content-generation-price.command';
10
11
  export * from './writer-paraphrase.command';
11
12
  export * from './writer-extend-text.command';
@@ -14,3 +15,7 @@ export * from './writer-fix-errors.command';
14
15
  export * from './writer-generate-text.command';
15
16
  export * from './update-writer-document-contents.command';
16
17
  export * from './set-reaction-writer-document.command';
18
+ export * from './collect-sources.command';
19
+ export * from './upload-writer-source.command';
20
+ export * from './confirm-source-citation-metadata.command';
21
+ export * from './discard-writer-source.command';
@@ -8,6 +8,7 @@ export namespace UpdateWriterDocumentOutlineCommand {
8
8
  unregisteredUserId: z.string().uuid().nullable().optional(),
9
9
  documentId: z.string().uuid(),
10
10
  data: WriterDocumentOutlineSchema,
11
+ modelId: z.string().uuid().nullable().optional(),
11
12
  });
12
13
  export type Request = z.infer<typeof RequestSchema>;
13
14
 
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
+ import { WriterSourceSchema } from '../models';
4
+
5
+ export namespace UploadWriterSourceCommand {
6
+ export const RequestSchema = z.object({
7
+ documentId: z.string().uuid(),
8
+ fileId: z.string().uuid(),
9
+ fileUrl: z.string().url(),
10
+ fileMimetype: z.string(),
11
+ userId: z.string().uuid().nullable().optional(),
12
+ unregisteredUserId: z.string().uuid().nullable().optional(),
13
+ });
14
+ export type Request = z.infer<typeof RequestSchema>;
15
+
16
+ export const ResponseSchema = ICommandResponseSchema(WriterSourceSchema);
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -4,3 +4,6 @@ export * from './writer-ai-action-type.enum';
4
4
  export * from './writer-document-section-type.enum';
5
5
  export * from './writer-document-stage.enum';
6
6
  export * from './writer-content-generation-strategy.enum';
7
+ export * from './writer-source-type.enum';
8
+ export * from './writer-source-origin.enum';
9
+ export * from './writer-source-status.enum';
@@ -1,10 +1,18 @@
1
1
  export enum WRITER_DOCUMENT_STAGE {
2
2
  CREATED = 'CREATED',
3
3
 
4
+ ANALYZING_TOPIC = 'ANALYZING_TOPIC',
5
+ TOPIC_ANALYZED = 'TOPIC_ANALYZED',
6
+ TOPIC_ANALYSIS_FAILED = 'TOPIC_ANALYSIS_FAILED',
7
+
4
8
  GENERATING_OUTLINE = 'GENERATING_OUTLINE',
5
9
  OUTLINE_GENERATED = 'OUTLINE_GENERATED',
6
10
  OUTLINE_GENERATION_FAILED = 'OUTLINE_GENERATION_FAILED',
7
11
 
12
+ COLLECTING_SOURCES = 'COLLECTING_SOURCES',
13
+ SOURCES_COLLECTED = 'SOURCES_COLLECTED',
14
+ SOURCES_COLLECTION_FAILED = 'SOURCES_COLLECTION_FAILED',
15
+
8
16
  GENERATING_CONTENT = 'GENERATING_CONTENT',
9
17
  CONTENT_GENERATED = 'CONTENT_GENERATED',
10
18
  CONTENT_GENERATION_FAILED = 'CONTENT_GENERATION_FAILED',
@@ -0,0 +1,4 @@
1
+ export enum WRITER_SOURCE_ORIGIN {
2
+ WEB_SEARCH = 'WEB_SEARCH',
3
+ USER_UPLOAD = 'USER_UPLOAD',
4
+ }