@purpleschool/gptbot 0.8.57 → 0.8.59

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 (335) hide show
  1. package/api/controllers/http/ai-model.ts +1 -0
  2. package/api/controllers/http/community.ts +25 -0
  3. package/api/controllers/http/image-generation.ts +14 -0
  4. package/api/controllers/http/index.ts +3 -0
  5. package/api/controllers/http/page.ts +1 -0
  6. package/api/controllers/http/paraphrase.ts +6 -0
  7. package/api/controllers/http/payment.ts +1 -0
  8. package/api/controllers/http/presentation.ts +1 -0
  9. package/api/controllers/http/product.ts +1 -1
  10. package/api/controllers/http/referral.ts +1 -1
  11. package/api/controllers/http/review.ts +1 -0
  12. package/api/controllers/http/subscription.ts +1 -1
  13. package/api/controllers/http/ui-notification.ts +2 -2
  14. package/api/controllers/http/user-profile.ts +8 -0
  15. package/api/controllers/http/user-to-subscription.ts +1 -0
  16. package/api/controllers/http/user.ts +2 -0
  17. package/api/routes.ts +140 -18
  18. package/build/api/controllers/http/ai-model.js +1 -0
  19. package/build/api/controllers/http/community.js +25 -0
  20. package/build/api/controllers/http/image-generation.js +16 -0
  21. package/build/api/controllers/http/index.js +3 -0
  22. package/build/api/controllers/http/page.js +1 -0
  23. package/build/api/controllers/http/paraphrase.js +6 -0
  24. package/build/api/controllers/http/payment.js +1 -0
  25. package/build/api/controllers/http/presentation.js +1 -0
  26. package/build/api/controllers/http/product.js +1 -1
  27. package/build/api/controllers/http/referral.js +1 -1
  28. package/build/api/controllers/http/review.js +1 -0
  29. package/build/api/controllers/http/subscription.js +1 -1
  30. package/build/api/controllers/http/ui-notification.js +2 -2
  31. package/build/api/controllers/http/user-profile.js +10 -0
  32. package/build/api/controllers/http/user-to-subscription.js +1 -0
  33. package/build/api/controllers/http/user.js +2 -0
  34. package/build/api/routes.js +100 -18
  35. package/build/commands/ai-model/find-formatted-ai-model-v2.command.js +23 -0
  36. package/build/commands/ai-model/find-model-pages.command.js +31 -0
  37. package/build/commands/ai-model/index.js +2 -0
  38. package/build/commands/b2b/submit-balance-top-up-form.command.js +5 -3
  39. package/build/commands/community/archive-community-post.command.js +13 -0
  40. package/build/commands/community/create-community-post.command.js +34 -0
  41. package/build/commands/community/delete-community-post.command.js +13 -0
  42. package/build/commands/community/get-all-community-posts-by-criteria.command.js +25 -0
  43. package/build/commands/community/get-community-post-by-uuid.command.js +14 -0
  44. package/build/commands/community/get-count-of-likes-on-my-posts.command.js +10 -0
  45. package/build/commands/community/get-my-community-posts-by-criteria.command.js +32 -0
  46. package/build/commands/community/get-my-favorite-community-posts.command.js +19 -0
  47. package/build/commands/community/get-my-likes-community-posts.command.js +19 -0
  48. package/build/commands/community/index.js +29 -0
  49. package/build/commands/community/send-report-to-community-post.command.js +15 -0
  50. package/build/commands/community/set-favorite-community-post.command.js +13 -0
  51. package/build/commands/community/set-like-community-post.command.js +14 -0
  52. package/build/commands/community/share-my-community-post.command.js +13 -0
  53. package/build/commands/folder/find-folder-by-uuid-with-chats.command.js +1 -0
  54. package/build/commands/folder/find-folders-by-user.command.js +1 -0
  55. package/build/commands/index.js +2 -0
  56. package/build/commands/payment/check.command.js +1 -1
  57. package/build/commands/payment/index.js +1 -0
  58. package/build/commands/payment/refund-payment.command.js +15 -0
  59. package/build/commands/review/create-review.command.js +1 -1
  60. package/build/commands/review/find-all-reviews.command.js +20 -0
  61. package/build/commands/review/find-reviews.command.js +1 -1
  62. package/build/commands/review/get-review-count.command.js +15 -0
  63. package/build/commands/review/index.js +2 -0
  64. package/build/commands/subscription/create-custom-subscription-plan.command.js +1 -1
  65. package/build/commands/tools/image-editor/retry-image-editor-job.command.js +10 -0
  66. package/build/commands/tools/image-editor/set-reaction-to-image-editor-job.command.js +11 -1
  67. package/build/commands/tools/image-generation/delete-all-image-generation-jobs.command.js +10 -0
  68. package/build/commands/tools/image-generation/delete-image-generation-job-by-uuid.command.js +13 -0
  69. package/build/commands/tools/image-generation/find-image-generation-job-by-uuid.command.js +14 -0
  70. package/build/commands/tools/image-generation/find-image-generation-jobs.command.js +18 -0
  71. package/build/commands/tools/image-generation/get-image-generation-config.command.js +11 -0
  72. package/build/commands/tools/image-generation/image-generation.command.js +23 -0
  73. package/build/commands/tools/image-generation/index.js +24 -0
  74. package/build/commands/tools/image-generation/set-reaction-to-image-generation-job.command.js +28 -0
  75. package/build/commands/tools/image-generation/update-image-generation-job-title.command.js +17 -0
  76. package/build/commands/tools/index.js +1 -0
  77. package/build/commands/tools/music/retry-music-job.command.js +4 -0
  78. package/build/commands/tools/music/set-reaction-to-music-job.command.js +11 -1
  79. package/build/commands/tools/paraphrase/delete-all-paraphrase-jobs.command.js +8 -0
  80. package/build/commands/tools/paraphrase/delete-paraphrase-job-by-uuid.command.js +11 -0
  81. package/build/commands/tools/paraphrase/find-paraphrase-jobs.command.js +18 -0
  82. package/build/commands/tools/paraphrase/index.js +7 -1
  83. package/build/commands/tools/paraphrase/retry-paraphrase-job.command.js +14 -0
  84. package/build/commands/tools/paraphrase/set-reaction-to-paraphrase-job.command.js +28 -0
  85. package/build/commands/tools/paraphrase/update-paraphrase-job-title.command.js +17 -0
  86. package/build/commands/tools/presentation/index.js +1 -0
  87. package/build/commands/tools/presentation/set-reaction-to-presentation.command.js +28 -0
  88. package/build/commands/tools/stt/set-reaction-to-stt-job.command.js +11 -1
  89. package/build/commands/tools/tts/set-reaction-to-tts-job.command.js +11 -1
  90. package/build/commands/tools/video/retry-video-job.command.js +5 -0
  91. package/build/commands/tools/video/set-reaction-to-video-job.command.js +11 -1
  92. package/build/commands/tools/video-editor/retry-video-editor-job.command.js +5 -0
  93. package/build/commands/tools/video-editor/set-reaction-to-video-editor-job.command.js +11 -1
  94. package/build/commands/tools/writer/set-reaction.writer-document.command.js +11 -1
  95. package/build/commands/user/cancel-user-subscription.command.js +21 -0
  96. package/build/commands/user/find-users-by-criteria.command.js +1 -1
  97. package/build/commands/user/get-me.command.js +2 -0
  98. package/build/commands/user/get-user-payments.command.js +26 -0
  99. package/build/commands/user/get-user-products.command.js +1 -1
  100. package/build/commands/user/get-user-subscriptions.command.js +1 -1
  101. package/build/commands/user/index.js +2 -0
  102. package/build/commands/user-profile/delete-avatar.command.js +12 -0
  103. package/build/commands/user-profile/get-user-profile-by-user-id.command.js +14 -0
  104. package/build/commands/user-profile/index.js +20 -0
  105. package/build/commands/user-profile/update-profile.command.js +14 -0
  106. package/build/commands/user-profile/upload-avatar.command.js +11 -0
  107. package/build/commands/user-to-subscription/delete-user-to-subscription.command.js +16 -0
  108. package/build/commands/user-to-subscription/index.js +1 -0
  109. package/build/commands/webmaster-click/get-webmaster-clicks-overview.command.js +3 -6
  110. package/build/constants/cloud-payments/index.js +2 -1
  111. package/build/constants/community/community-post-report/enums/community-post-report-reason.enum.js +18 -0
  112. package/build/constants/community/community-post-report/enums/index.js +17 -0
  113. package/build/constants/community/community-post-report/index.js +17 -0
  114. package/build/constants/community/default-pagination.constant.js +6 -0
  115. package/build/constants/community/enums/community-aspect-ratio.enum.js +11 -0
  116. package/build/constants/community/enums/community-post-visibility.enum.js +8 -0
  117. package/build/constants/community/enums/community-status.enum.js +11 -0
  118. package/build/constants/community/enums/community-tool-type.enum.js +10 -0
  119. package/build/constants/community/enums/community-type.enum.js +11 -0
  120. package/build/constants/community/enums/index.js +21 -0
  121. package/build/constants/community/index.js +19 -0
  122. package/build/constants/errors/errors.js +275 -14
  123. package/build/constants/index.js +4 -0
  124. package/build/constants/model/enums/index.js +17 -0
  125. package/build/constants/model/enums/unified-model-content-type.enum.js +21 -0
  126. package/build/constants/model/index.js +17 -0
  127. package/build/constants/page/enums/page-type.enum.js +1 -0
  128. package/build/constants/payment/enums/index.js +1 -0
  129. package/build/constants/payment/enums/payment-sort-by.enum.js +10 -0
  130. package/build/constants/payment/enums/payment-status.enum.js +1 -0
  131. package/build/constants/presentation/enums/slide-content-type.enum.js +1 -0
  132. package/build/constants/presentation/maps/slide-layout-map.constant.js +1 -0
  133. package/build/constants/subscription/enums/subscription-feature-type.enum.js +6 -0
  134. package/build/constants/subscription/enums/subscription-status.enum.js +2 -2
  135. package/build/constants/tool/enums/index.js +1 -0
  136. package/build/constants/tool/enums/tool-content-type.enum.js +17 -0
  137. package/build/constants/tool/enums/tool-job-status.enum.js +1 -0
  138. package/build/constants/tool-image-generation/enums/image-generation-resolution.enum.js +9 -0
  139. package/build/constants/tool-image-generation/enums/index.js +17 -0
  140. package/build/constants/tool-image-generation/index.js +17 -0
  141. package/build/constants/tool-video/enums/video-pricing-rule-type.enum.js +1 -0
  142. package/build/constants/user-profile/index.js +17 -0
  143. package/build/constants/user-profile/user-profile.constant.js +10 -0
  144. package/build/helpers/image-editor/calculate-image-editor-price.helper.js +13 -0
  145. package/build/helpers/image-editor/index.js +17 -0
  146. package/build/helpers/image-generation/calculate-image-generation-price.helper.js +16 -0
  147. package/build/helpers/image-generation/index.js +17 -0
  148. package/build/helpers/index.js +2 -0
  149. package/build/helpers/video/calculate-video-price.helper.js +5 -1
  150. package/build/models/community/community-post-media-data.schema.js +53 -0
  151. package/build/models/community/community-post-report/community-post-report.schema.js +13 -0
  152. package/build/models/community/community-post-report/index.js +17 -0
  153. package/build/models/community/community-post.schema.js +44 -0
  154. package/build/models/community/index.js +19 -0
  155. package/build/models/index.js +2 -0
  156. package/build/models/order.schema.js +1 -0
  157. package/build/models/page.schema.js +2 -1
  158. package/build/models/payment.schema.js +5 -2
  159. package/build/models/review.schema.js +2 -0
  160. package/build/models/subscription-feature.schema.js +27 -1
  161. package/build/models/tool.schema.js +3 -0
  162. package/build/models/tools/common/attached-tool-file.schema.js +13 -0
  163. package/build/models/tools/common/index.js +17 -0
  164. package/build/models/tools/image-editor/image-editor-config.schema.js +1 -0
  165. package/build/models/tools/image-editor/image-editor-job.schema.js +11 -2
  166. package/build/models/tools/image-editor/image-editor-model.schema.js +9 -1
  167. package/build/models/tools/image-generation/image-generation-config.schema.js +23 -0
  168. package/build/models/tools/image-generation/image-generation-job.schema.js +35 -0
  169. package/build/models/tools/image-generation/image-generation-model.schema.js +41 -0
  170. package/build/models/tools/image-generation/index.js +19 -0
  171. package/build/models/tools/index.js +2 -0
  172. package/build/models/tools/music/music-track.schema.js +1 -0
  173. package/build/models/tools/paraphrase/paraphrase-job.schema.js +5 -0
  174. package/build/models/tools/presentation/pptx-export-payload.schema.js +34 -1
  175. package/build/models/tools/presentation/slide-content-edit.schema.js +18 -1
  176. package/build/models/tools/presentation/slide-content.schema.js +26 -1
  177. package/build/models/tools/stt/stt-job.schema.js +1 -0
  178. package/build/models/tools/tts/tts-job.schema.js +1 -0
  179. package/build/models/tools/video/video-job.schema.js +2 -0
  180. package/build/models/tools/video/video-model.schema.js +8 -1
  181. package/build/models/tools/video-editor/video-editor-job.schema.js +1 -0
  182. package/build/models/tools/writer/writer-document-outline.schema.js +1 -2
  183. package/build/models/user-profile.schema.js +16 -0
  184. package/build/models/webmaster-click.schema.js +2 -2
  185. package/commands/ai-model/find-formatted-ai-model-v2.command.ts +23 -0
  186. package/commands/ai-model/find-model-pages.command.ts +34 -0
  187. package/commands/ai-model/index.ts +2 -0
  188. package/commands/b2b/submit-balance-top-up-form.command.ts +5 -3
  189. package/commands/community/archive-community-post.command.ts +13 -0
  190. package/commands/community/create-community-post.command.ts +40 -0
  191. package/commands/community/delete-community-post.command.ts +13 -0
  192. package/commands/community/get-all-community-posts-by-criteria.command.ts +29 -0
  193. package/commands/community/get-community-post-by-uuid.command.ts +16 -0
  194. package/commands/community/get-count-of-likes-on-my-posts.command.ts +9 -0
  195. package/commands/community/get-my-community-posts-by-criteria.command.ts +40 -0
  196. package/commands/community/get-my-favorite-community-posts.command.ts +19 -0
  197. package/commands/community/get-my-likes-community-posts.command.ts +19 -0
  198. package/commands/community/index.ts +13 -0
  199. package/commands/community/send-report-to-community-post.command.ts +17 -0
  200. package/commands/community/set-favorite-community-post.command.ts +13 -0
  201. package/commands/community/set-like-community-post.command.ts +14 -0
  202. package/commands/community/share-my-community-post.command.ts +13 -0
  203. package/commands/folder/find-folder-by-uuid-with-chats.command.ts +1 -0
  204. package/commands/folder/find-folders-by-user.command.ts +1 -0
  205. package/commands/index.ts +2 -0
  206. package/commands/payment/check.command.ts +1 -1
  207. package/commands/payment/index.ts +1 -0
  208. package/commands/payment/refund-payment.command.ts +17 -0
  209. package/commands/review/create-review.command.ts +1 -1
  210. package/commands/review/find-all-reviews.command.ts +19 -0
  211. package/commands/review/find-reviews.command.ts +1 -1
  212. package/commands/review/get-review-count.command.ts +13 -0
  213. package/commands/review/index.ts +2 -0
  214. package/commands/subscription/create-custom-subscription-plan.command.ts +1 -1
  215. package/commands/tools/image-editor/retry-image-editor-job.command.ts +13 -1
  216. package/commands/tools/image-editor/set-reaction-to-image-editor-job.command.ts +16 -3
  217. package/commands/tools/image-generation/delete-all-image-generation-jobs.command.ts +8 -0
  218. package/commands/tools/image-generation/delete-image-generation-job-by-uuid.command.ts +13 -0
  219. package/commands/tools/image-generation/find-image-generation-job-by-uuid.command.ts +16 -0
  220. package/commands/tools/image-generation/find-image-generation-jobs.command.ts +18 -0
  221. package/commands/tools/image-generation/get-image-generation-config.command.ts +9 -0
  222. package/commands/tools/image-generation/image-generation.command.ts +25 -0
  223. package/commands/tools/image-generation/index.ts +8 -0
  224. package/commands/tools/image-generation/set-reaction-to-image-generation-job.command.ts +33 -0
  225. package/commands/tools/image-generation/update-image-generation-job-title.command.ts +19 -0
  226. package/commands/tools/index.ts +1 -0
  227. package/commands/tools/music/retry-music-job.command.ts +7 -1
  228. package/commands/tools/music/set-reaction-to-music-job.command.ts +16 -3
  229. package/commands/tools/paraphrase/delete-all-paraphrase-jobs.command.ts +6 -0
  230. package/commands/tools/paraphrase/delete-paraphrase-job-by-uuid.command.ts +11 -0
  231. package/commands/tools/paraphrase/find-paraphrase-jobs.command.ts +18 -0
  232. package/commands/tools/paraphrase/index.ts +7 -1
  233. package/commands/tools/paraphrase/retry-paraphrase-job.command.ts +14 -0
  234. package/commands/tools/paraphrase/set-reaction-to-paraphrase-job.command.ts +33 -0
  235. package/commands/tools/paraphrase/update-paraphrase-job-title.command.ts +19 -0
  236. package/commands/tools/presentation/index.ts +1 -0
  237. package/commands/tools/presentation/set-reaction-to-presentation.command.ts +33 -0
  238. package/commands/tools/stt/set-reaction-to-stt-job.command.ts +16 -3
  239. package/commands/tools/tts/set-reaction-to-tts-job.command.ts +16 -3
  240. package/commands/tools/video/retry-video-job.command.ts +8 -1
  241. package/commands/tools/video/set-reaction-to-video-job.command.ts +16 -3
  242. package/commands/tools/video-editor/retry-video-editor-job.command.ts +7 -0
  243. package/commands/tools/video-editor/set-reaction-to-video-editor-job.command.ts +16 -3
  244. package/commands/tools/writer/set-reaction.writer-document.command.ts +16 -3
  245. package/commands/user/cancel-user-subscription.command.ts +21 -0
  246. package/commands/user/find-users-by-criteria.command.ts +1 -1
  247. package/commands/user/get-me.command.ts +2 -0
  248. package/commands/user/get-user-payments.command.ts +27 -0
  249. package/commands/user/get-user-products.command.ts +2 -2
  250. package/commands/user/get-user-subscriptions.command.ts +2 -2
  251. package/commands/user/index.ts +2 -0
  252. package/commands/user-profile/delete-avatar.command.ts +14 -0
  253. package/commands/user-profile/get-user-profile-by-user-id.command.ts +16 -0
  254. package/commands/user-profile/index.ts +4 -0
  255. package/commands/user-profile/update-profile.command.ts +16 -0
  256. package/commands/user-profile/upload-avatar.command.ts +10 -0
  257. package/commands/user-to-subscription/delete-user-to-subscription.command.ts +18 -0
  258. package/commands/user-to-subscription/index.ts +1 -0
  259. package/commands/webmaster-click/get-webmaster-clicks-overview.command.ts +3 -8
  260. package/constants/cloud-payments/index.ts +2 -0
  261. package/constants/community/community-post-report/enums/community-post-report-reason.enum.ts +14 -0
  262. package/constants/community/community-post-report/enums/index.ts +1 -0
  263. package/constants/community/community-post-report/index.ts +1 -0
  264. package/constants/community/default-pagination.constant.ts +4 -0
  265. package/constants/community/enums/community-aspect-ratio.enum.ts +7 -0
  266. package/constants/community/enums/community-post-visibility.enum.ts +4 -0
  267. package/constants/community/enums/community-status.enum.ts +7 -0
  268. package/constants/community/enums/community-tool-type.enum.ts +6 -0
  269. package/constants/community/enums/community-type.enum.ts +7 -0
  270. package/constants/community/enums/index.ts +5 -0
  271. package/constants/community/index.ts +3 -0
  272. package/constants/errors/errors.ts +276 -14
  273. package/constants/index.ts +4 -0
  274. package/constants/model/enums/index.ts +1 -0
  275. package/constants/model/enums/unified-model-content-type.enum.ts +17 -0
  276. package/constants/model/index.ts +1 -0
  277. package/constants/page/enums/page-type.enum.ts +1 -0
  278. package/constants/payment/enums/index.ts +1 -0
  279. package/constants/payment/enums/payment-sort-by.enum.ts +6 -0
  280. package/constants/payment/enums/payment-status.enum.ts +1 -0
  281. package/constants/presentation/enums/slide-content-type.enum.ts +1 -0
  282. package/constants/presentation/maps/slide-layout-map.constant.ts +1 -0
  283. package/constants/subscription/enums/subscription-feature-type.enum.ts +6 -0
  284. package/constants/subscription/enums/subscription-status.enum.ts +2 -2
  285. package/constants/tool/enums/index.ts +1 -0
  286. package/constants/tool/enums/tool-content-type.enum.ts +13 -0
  287. package/constants/tool/enums/tool-job-status.enum.ts +1 -0
  288. package/constants/tool-image-generation/enums/image-generation-resolution.enum.ts +5 -0
  289. package/constants/tool-image-generation/enums/index.ts +1 -0
  290. package/constants/tool-image-generation/index.ts +1 -0
  291. package/constants/tool-video/enums/video-pricing-rule-type.enum.ts +1 -0
  292. package/constants/user-profile/index.ts +1 -0
  293. package/constants/user-profile/user-profile.constant.ts +14 -0
  294. package/helpers/image-editor/calculate-image-editor-price.helper.ts +23 -0
  295. package/helpers/image-editor/index.ts +1 -0
  296. package/helpers/image-generation/calculate-image-generation-price.helper.ts +29 -0
  297. package/helpers/image-generation/index.ts +1 -0
  298. package/helpers/index.ts +2 -0
  299. package/helpers/video/calculate-video-price.helper.ts +7 -1
  300. package/models/community/community-post-media-data.schema.ts +65 -0
  301. package/models/community/community-post-report/community-post-report.schema.ts +11 -0
  302. package/models/community/community-post-report/index.ts +1 -0
  303. package/models/community/community-post.schema.ts +48 -0
  304. package/models/community/index.ts +3 -0
  305. package/models/index.ts +2 -0
  306. package/models/order.schema.ts +1 -0
  307. package/models/page.schema.ts +2 -1
  308. package/models/payment.schema.ts +5 -1
  309. package/models/review.schema.ts +2 -0
  310. package/models/subscription-feature.schema.ts +34 -0
  311. package/models/tool.schema.ts +3 -0
  312. package/models/tools/common/attached-tool-file.schema.ts +13 -0
  313. package/models/tools/common/index.ts +1 -0
  314. package/models/tools/image-editor/image-editor-config.schema.ts +1 -0
  315. package/models/tools/image-editor/image-editor-job.schema.ts +13 -2
  316. package/models/tools/image-editor/image-editor-model.schema.ts +16 -0
  317. package/models/tools/image-generation/image-generation-config.schema.ts +29 -0
  318. package/models/tools/image-generation/image-generation-job.schema.ts +42 -0
  319. package/models/tools/image-generation/image-generation-model.schema.ts +52 -0
  320. package/models/tools/image-generation/index.ts +3 -0
  321. package/models/tools/index.ts +2 -0
  322. package/models/tools/music/music-track.schema.ts +1 -0
  323. package/models/tools/paraphrase/paraphrase-job.schema.ts +5 -0
  324. package/models/tools/presentation/pptx-export-payload.schema.ts +34 -0
  325. package/models/tools/presentation/slide-content-edit.schema.ts +21 -0
  326. package/models/tools/presentation/slide-content.schema.ts +45 -0
  327. package/models/tools/stt/stt-job.schema.ts +1 -0
  328. package/models/tools/tts/tts-job.schema.ts +1 -0
  329. package/models/tools/video/video-job.schema.ts +2 -0
  330. package/models/tools/video/video-model.schema.ts +8 -1
  331. package/models/tools/video-editor/video-editor-job.schema.ts +1 -0
  332. package/models/tools/writer/writer-document-outline.schema.ts +1 -2
  333. package/models/user-profile.schema.ts +15 -0
  334. package/models/webmaster-click.schema.ts +2 -2
  335. package/package.json +1 -1
@@ -0,0 +1,65 @@
1
+ import { z } from 'zod';
2
+ import { COMMUNITY_POST_TYPE, IMAGE_FORMAT } from '../../constants';
3
+ import { MusicTrackSchema } from '../tools/music/music-track.schema';
4
+ import { VideoJobParamsSchema } from '../tools/video/video-job.schema';
5
+ import { FileSchema } from '../file.schema';
6
+ import { MusicJobParamsSchema } from '../tools';
7
+
8
+ export const ImageCommunityMediaSchema = z.object({
9
+ type: z.literal(COMMUNITY_POST_TYPE.IMAGE),
10
+ text: z.string().max(10000),
11
+ files: z.array(FileSchema.pick({ url: true })),
12
+ imageFormat: z.nativeEnum(IMAGE_FORMAT).nullable(),
13
+ });
14
+
15
+ export const ImageEditorCommunityMediaSchema = z.object({
16
+ type: z.literal(COMMUNITY_POST_TYPE.IMAGE_EDITOR),
17
+ prompt: z.string(),
18
+ imageUrls: z.array(z.string()).nullable(),
19
+ });
20
+
21
+ export const VideoCommunityMediaSchema = z.object({
22
+ type: z.literal(COMMUNITY_POST_TYPE.VIDEO),
23
+ title: z.string(),
24
+ prompt: z.string(),
25
+ videoUrl: z.string().nullable(),
26
+ params: VideoJobParamsSchema,
27
+ });
28
+
29
+ export const VideoEditorCommunityMediaSchema = z.object({
30
+ type: z.literal(COMMUNITY_POST_TYPE.VIDEO_EDITOR),
31
+ title: z.string(),
32
+ prompt: z.string(),
33
+ inputVideoUrl: z.string(),
34
+ outputVideoUrl: z.string().nullable(),
35
+ });
36
+
37
+ export const MusicCommunityMediaSchema = z.object({
38
+ type: z.literal(COMMUNITY_POST_TYPE.MUSIC),
39
+ params: MusicJobParamsSchema,
40
+ prompt: z.string(),
41
+ tracks: z.array(
42
+ MusicTrackSchema.pick({
43
+ audioUrl: true,
44
+ coverUrl: true,
45
+ duration: true,
46
+ title: true,
47
+ tags: true,
48
+ }),
49
+ ),
50
+ });
51
+
52
+ export const CommunityPostMediaDataSchema = z.discriminatedUnion('type', [
53
+ ImageCommunityMediaSchema,
54
+ ImageEditorCommunityMediaSchema,
55
+ VideoCommunityMediaSchema,
56
+ VideoEditorCommunityMediaSchema,
57
+ MusicCommunityMediaSchema,
58
+ ]);
59
+
60
+ export type CommunityPostMediaData = z.infer<typeof CommunityPostMediaDataSchema>;
61
+ export type ImageCommunityMedia = z.infer<typeof ImageCommunityMediaSchema>;
62
+ export type ImageEditorCommunityMedia = z.infer<typeof ImageEditorCommunityMediaSchema>;
63
+ export type VideoCommunityMedia = z.infer<typeof VideoCommunityMediaSchema>;
64
+ export type VideoEditorCommunityMedia = z.infer<typeof VideoEditorCommunityMediaSchema>;
65
+ export type MusicCommunityMedia = z.infer<typeof MusicCommunityMediaSchema>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { COMMUNITY_POST_REPORT_REASON } from '../../../constants';
3
+
4
+ export const CommunityPostReportSchema = z.object({
5
+ uuid: z.string().uuid(),
6
+ communityPostId: z.string().uuid(),
7
+ userId: z.string().uuid(),
8
+ reason: z.nativeEnum(COMMUNITY_POST_REPORT_REASON),
9
+ createdAt: z.date(),
10
+ updatedAt: z.date(),
11
+ });
@@ -0,0 +1 @@
1
+ export * from './community-post-report.schema';
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ import {
3
+ COMMUNITY_POST_STATUS,
4
+ COMMUNITY_POST_TYPE,
5
+ COMMUNITY_POST_VISIBILITY,
6
+ COMMUNITY_TOOL_TYPE,
7
+ } from '../../constants';
8
+ import { CommunityPostMediaDataSchema } from './community-post-media-data.schema';
9
+ import { IconVariantsSchema } from '../icon-variants.schema';
10
+
11
+ export const CommunityPostSchema = z.object({
12
+ uuid: z.string().uuid(),
13
+ userId: z.string().uuid(),
14
+ caption: z.string().nullable(),
15
+ status: z.nativeEnum(COMMUNITY_POST_STATUS),
16
+ visibility: z.nativeEnum(COMMUNITY_POST_VISIBILITY),
17
+ type: z.nativeEnum(COMMUNITY_POST_TYPE),
18
+ mediaData: CommunityPostMediaDataSchema,
19
+ aiModelId: z.string().uuid(),
20
+ aiModelTitle: z.string(),
21
+ aiModelIcons: IconVariantsSchema,
22
+ messageId: z.string().nullable(),
23
+ toolJobId: z.string().nullable(),
24
+ toolType: z.nativeEnum(COMMUNITY_TOOL_TYPE).nullable(),
25
+ views: z.number(),
26
+ likesCount: z.number(),
27
+ reportsCount: z.number(),
28
+ publishedAt: z.date().nullable(),
29
+ archivedAt: z.date().nullable(),
30
+ createdAt: z.date(),
31
+ updatedAt: z.date(),
32
+ });
33
+
34
+ export const ResponseCommunityPostSchema = z.object({
35
+ uuid: z.string().uuid(),
36
+ userId: z.string().uuid(),
37
+ caption: z.string().nullable(),
38
+ status: z.nativeEnum(COMMUNITY_POST_STATUS),
39
+ visibility: z.nativeEnum(COMMUNITY_POST_VISIBILITY),
40
+ type: z.nativeEnum(COMMUNITY_POST_TYPE),
41
+ mediaData: CommunityPostMediaDataSchema,
42
+ aiModelId: z.string().uuid(),
43
+ aiModelTitle: z.string(),
44
+ aiModelIcons: IconVariantsSchema,
45
+ views: z.number(),
46
+ likesCount: z.number(),
47
+ publishedAt: z.date().nullable(),
48
+ });
@@ -0,0 +1,3 @@
1
+ export * from './community-post.schema';
2
+ export * from './community-post-media-data.schema';
3
+ export * from './community-post-report';
package/models/index.ts CHANGED
@@ -55,3 +55,5 @@ export * from './webmaster-balance.schema';
55
55
  export * from './user-referrals.schema';
56
56
  export * from './webmaster-click.schema';
57
57
  export * from './api-key.schema';
58
+ export * from './community';
59
+ export * from './user-profile.schema';
@@ -8,6 +8,7 @@ export const OrderSchema = z.object({
8
8
  productId: z.nullable(z.string().uuid()),
9
9
  subscriptionId: z.nullable(z.string().uuid()),
10
10
  sum: z.number(),
11
+ description: z.string(),
11
12
 
12
13
  createdAt: z.date(),
13
14
  updatedAt: z.date(),
@@ -13,7 +13,8 @@ export const PageSchema = z.object({
13
13
  aIModelId: z.string().uuid().nullable().optional(),
14
14
  toolId: z.string().uuid().nullable().optional(),
15
15
  toolOptionId: z.string().uuid().nullable().optional(),
16
- toolTitle: z.string().nullable(),
16
+ toolModelId: z.string().uuid().nullable().optional(),
17
+ toolTitle: z.string().optional().nullable(),
17
18
  type: z.nativeEnum(PageType),
18
19
 
19
20
  createdAt: z.date(),
@@ -3,10 +3,14 @@ import { z } from 'zod';
3
3
  export const PaymentSchema = z.object({
4
4
  uuid: z.string().uuid(),
5
5
  link: z.nullable(z.string()),
6
- status: z.boolean(),
6
+ status: z.string(),
7
7
  sum: z.number(),
8
8
  orderId: z.string().uuid(),
9
9
 
10
10
  createdAt: z.date(),
11
11
  updatedAt: z.date(),
12
12
  });
13
+
14
+ export const PaymentWithDescriptionSchema = PaymentSchema.extend({
15
+ description: z.string(),
16
+ });
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { REVIEW_STATUS } from '../constants';
2
3
 
3
4
  export const ReviewSchema = z.object({
4
5
  uuid: z.string().uuid(),
@@ -6,6 +7,7 @@ export const ReviewSchema = z.object({
6
7
  name: z.string(),
7
8
  text: z.string(),
8
9
  rating: z.number().int().step(1).min(0).max(5),
10
+ status: z.nativeEnum(REVIEW_STATUS),
9
11
 
10
12
  createdAt: z.date(),
11
13
  updatedAt: z.date(),
@@ -162,6 +162,36 @@ export const MusicModelAccessFeatureSchema = SubscriptionFeatureBaseSchema.exten
162
162
  });
163
163
  export type MusicModelAccessFeature = z.infer<typeof MusicModelAccessFeatureSchema>;
164
164
 
165
+ export const WriterQuotaFeatureSchema = SubscriptionFeatureBaseSchema.extend({
166
+ kind: z.literal(SUBSCRIPTION_FEATURE_KIND.WRITER),
167
+ type: z.literal(SUBSCRIPTION_FEATURE_TYPE.WRITER_QUOTA),
168
+ value: z.number(),
169
+ });
170
+ export type WriterQuotaFeature = z.infer<typeof WriterQuotaFeatureSchema>;
171
+
172
+ export const WriterModelAccessFeatureSchema = SubscriptionFeatureBaseSchema.extend({
173
+ kind: z.literal(SUBSCRIPTION_FEATURE_KIND.WRITER),
174
+ type: z.literal(SUBSCRIPTION_FEATURE_TYPE.WRITER_MODEL_ACCESS),
175
+ isAvailable: z.boolean(),
176
+ modelId: z.string(),
177
+ });
178
+ export type WriterModelAccessFeature = z.infer<typeof WriterModelAccessFeatureSchema>;
179
+
180
+ export const ImageEditorQuotaFeatureSchema = SubscriptionFeatureBaseSchema.extend({
181
+ kind: z.literal(SUBSCRIPTION_FEATURE_KIND.IMAGE_EDITOR),
182
+ type: z.literal(SUBSCRIPTION_FEATURE_TYPE.IMAGE_EDITOR_QUOTA),
183
+ value: z.number(),
184
+ });
185
+ export type ImageEditorQuotaFeature = z.infer<typeof ImageEditorQuotaFeatureSchema>;
186
+
187
+ export const ImageEditorModelAccessFeatureSchema = SubscriptionFeatureBaseSchema.extend({
188
+ kind: z.literal(SUBSCRIPTION_FEATURE_KIND.IMAGE_EDITOR),
189
+ type: z.literal(SUBSCRIPTION_FEATURE_TYPE.IMAGE_EDITOR_MODEL_ACCESS),
190
+ isAvailable: z.boolean(),
191
+ modelId: z.string(),
192
+ });
193
+ export type ImageEditorModelAccessFeature = z.infer<typeof ImageEditorModelAccessFeatureSchema>;
194
+
165
195
  export const SubscriptionFeatureSchema = z.union([
166
196
  AiModelAccessFeatureSchema,
167
197
  RequestsQuotaFeatureSchema,
@@ -181,6 +211,10 @@ export const SubscriptionFeatureSchema = z.union([
181
211
  CarryoverBalanceFeatureSchema,
182
212
  MusicQuotaFeatureSchema,
183
213
  MusicModelAccessFeatureSchema,
214
+ WriterQuotaFeatureSchema,
215
+ WriterModelAccessFeatureSchema,
216
+ ImageEditorQuotaFeatureSchema,
217
+ ImageEditorModelAccessFeatureSchema,
184
218
  ]);
185
219
 
186
220
  export type SubscriptionFeature = z.infer<typeof SubscriptionFeatureSchema>;
@@ -6,6 +6,9 @@ export const ToolSchema = z.object({
6
6
  title: z.string(),
7
7
  description: z.string(),
8
8
  icon: z.string(),
9
+ alias: z.string(),
10
+ bgColor: z.string(),
11
+ iconColor: z.string(),
9
12
  order: z.number(),
10
13
  contentType: z.string(),
11
14
  });
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+
3
+ export const AttachedToolFileSchema = z.object({
4
+ uuid: z.string(),
5
+ url: z.string(),
6
+ name: z.string(),
7
+ mimeType: z.string(),
8
+ type: z.string(),
9
+ size: z.number(),
10
+ duration: z.number().optional().nullable(),
11
+ });
12
+
13
+ export type AttachedToolFile = z.infer<typeof AttachedToolFileSchema>;
@@ -0,0 +1 @@
1
+ export * from './attached-tool-file.schema';
@@ -27,6 +27,7 @@ export const SystemPromptSchema = z.object({
27
27
  .optional()
28
28
  .nullable(),
29
29
  order: z.number(),
30
+ placeholder: z.string().nullable(),
30
31
  });
31
32
 
32
33
  export const PromptGroupSchema = z.object({
@@ -1,10 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  import { USER_REACTION } from '../../../constants';
3
3
  import { ToolJobSchema } from '../../tool-job.schema';
4
+ import { FileSchema } from '../../file.schema';
5
+ import { AttachedToolFileSchema } from '../common';
4
6
 
5
7
  export const ImageEditorJobParamsSchema = z.object({
6
- imageUrls: z.array(z.string()).optional(),
8
+ attachedFiles: z.array(AttachedToolFileSchema),
7
9
  systemPromptId: z.string().optional(),
10
+ imageUrls: z.string().array().optional(),
8
11
  });
9
12
 
10
13
  export type ImageEditorJobParams = z.infer<typeof ImageEditorJobParamsSchema>;
@@ -13,7 +16,15 @@ export const ImageEditorJobSchema = ToolJobSchema.extend({
13
16
  title: z.string(),
14
17
  prompt: z.string(),
15
18
  reaction: z.nativeEnum(USER_REACTION).nullable(),
16
- imageUrls: z.array(z.string()).nullable(),
19
+ imageUrls: z.string().array(),
20
+ images: z
21
+ .array(
22
+ FileSchema.pick({
23
+ uuid: true,
24
+ url: true,
25
+ }),
26
+ )
27
+ .nullable(),
17
28
  params: ImageEditorJobParamsSchema,
18
29
  modelId: z.string(),
19
30
  });
@@ -12,6 +12,21 @@ export const ImageEditorModelParamsSchema = z.object({
12
12
 
13
13
  export type ImageEditorModelParams = z.infer<typeof ImageEditorModelParamsSchema>;
14
14
 
15
+ export const ImageEditorModelPricingRuleConditionSchema = z.object({
16
+ withoutSub: z.boolean().optional(),
17
+ });
18
+ export type ImageEditorModelPricingRuleCondition = z.infer<
19
+ typeof ImageEditorModelPricingRuleConditionSchema
20
+ >;
21
+
22
+ export const ImageEditorModelPricingRulesSchema = z.array(
23
+ z.object({
24
+ condition: ImageEditorModelPricingRuleConditionSchema,
25
+ value: z.number(),
26
+ }),
27
+ );
28
+ export type ImageEditorModelPricingRules = z.infer<typeof ImageEditorModelPricingRulesSchema>;
29
+
15
30
  export const ImageEditorModelSchema = z.object({
16
31
  uuid: z.string(),
17
32
  title: z.string(),
@@ -21,6 +36,7 @@ export const ImageEditorModelSchema = z.object({
21
36
  icons: IconVariantsSchema,
22
37
  maxInputLength: z.number(),
23
38
  params: ImageEditorModelParamsSchema,
39
+ pricingRules: ImageEditorModelPricingRulesSchema,
24
40
  unlockedBy: UnlockedBySchema.nullable(),
25
41
  canUse: z.boolean(),
26
42
  });
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ import { ImageGenerationModelSchema } from './image-generation-model.schema';
3
+ import { IconVariantsSchema } from '../../icon-variants.schema';
4
+
5
+ export const ImageGenerationVendorSchema = z.object({
6
+ uuid: z.string().uuid(),
7
+ title: z.string(),
8
+ order: z.number(),
9
+ icons: IconVariantsSchema,
10
+ models: z.array(ImageGenerationModelSchema),
11
+ });
12
+
13
+ export type ImageGenerationVendor = z.infer<typeof ImageGenerationVendorSchema>;
14
+
15
+ export const ImageGenerationPresetSchema = z.object({
16
+ uuid: z.string().uuid(),
17
+ title: z.string(),
18
+ sample: z.string(),
19
+ order: z.number(),
20
+ });
21
+
22
+ export type ImageGenerationPreset = z.infer<typeof ImageGenerationPresetSchema>;
23
+
24
+ export const ImageGenerationConfigSchema = z.object({
25
+ vendors: z.array(ImageGenerationVendorSchema),
26
+ presets: z.array(ImageGenerationPresetSchema),
27
+ });
28
+
29
+ export type ImageGenerationConfig = z.infer<typeof ImageGenerationConfigSchema>;
@@ -0,0 +1,42 @@
1
+ import { z } from 'zod';
2
+ import { ToolJobSchema } from '../../tool-job.schema';
3
+ import { IMAGE_GENERATION_RESOLUTION, USER_REACTION } from '../../../constants';
4
+
5
+ export const ImageGenerationFileAttachmentSchema = z.object({
6
+ uuid: z.string(),
7
+ url: z.string(),
8
+ name: z.string(),
9
+ type: z.string(),
10
+ mimeType: z.string(),
11
+ size: z.number(),
12
+ });
13
+ export type ImageGenerationFileAttachment = z.infer<typeof ImageGenerationFileAttachmentSchema>;
14
+
15
+ export const ImageGenerationJobParamsSchema = z.object({
16
+ aspectRatio: z.string().optional(),
17
+ attachedFiles: z.array(ImageGenerationFileAttachmentSchema),
18
+ enhancePrompt: z.boolean().optional(),
19
+ resolution: z.nativeEnum(IMAGE_GENERATION_RESOLUTION).optional(),
20
+ });
21
+
22
+ export type ImageGenerationJobParams = z.infer<typeof ImageGenerationJobParamsSchema>;
23
+
24
+ export const ImageGenerationJobSchema = ToolJobSchema.extend({
25
+ title: z.string(),
26
+ prompt: z.string(),
27
+ reaction: z.nativeEnum(USER_REACTION).nullable(),
28
+ presetId: z.string().uuid().nullable().optional(),
29
+ output: z.array(z.string()).nullable(),
30
+ images: z
31
+ .array(
32
+ z.object({
33
+ uuid: z.string(),
34
+ url: z.string(),
35
+ }),
36
+ )
37
+ .nullable(),
38
+ params: ImageGenerationJobParamsSchema.optional(),
39
+ modelId: z.string(),
40
+ });
41
+
42
+ export type ImageGenerationJob = z.infer<typeof ImageGenerationJobSchema>;
@@ -0,0 +1,52 @@
1
+ import { z } from 'zod';
2
+ import { UnlockedBySchema } from '../../unlocked-by-subscription.schema';
3
+ import { IMAGE_GENERATION_RESOLUTION } from '../../../constants';
4
+
5
+ export const ImageGenerationModelParamsSchema = z.object({
6
+ aspectRatio: z.record(
7
+ z.string(),
8
+ z.object({
9
+ width: z.number(),
10
+ height: z.number(),
11
+ }),
12
+ ),
13
+ quality: z.string().optional(),
14
+ resolution: z
15
+ .object({
16
+ options: z.array(z.nativeEnum(IMAGE_GENERATION_RESOLUTION)),
17
+ })
18
+ .optional(),
19
+ });
20
+ export type ImageGenerationModelParams = z.infer<typeof ImageGenerationModelParamsSchema>;
21
+
22
+ export const ImageModelPricingRuleConditionSchema = z.object({
23
+ resolution: z.string().optional(),
24
+ withoutSub: z.boolean().optional(),
25
+ });
26
+ export type ImageModelPricingRuleCondition = z.infer<typeof ImageModelPricingRuleConditionSchema>;
27
+
28
+ export const ImageModelPricingRulesSchema = z.array(
29
+ z.object({
30
+ condition: ImageModelPricingRuleConditionSchema,
31
+ value: z.number(),
32
+ }),
33
+ );
34
+ export type ImageModelPricingRules = z.infer<typeof ImageModelPricingRulesSchema>;
35
+
36
+ export const ImageGenerationModelSchema = z.object({
37
+ uuid: z.string().uuid(),
38
+ title: z.string(),
39
+ description: z.string(),
40
+ order: z.number(),
41
+ status: z.string(),
42
+ price: z.number(),
43
+ params: ImageGenerationModelParamsSchema,
44
+ supportsImageAttachment: z.boolean(),
45
+ maxAttachedImages: z.number(),
46
+ maxPromptLength: z.number(),
47
+ pricingRules: ImageModelPricingRulesSchema,
48
+ unlockedBy: UnlockedBySchema.nullable(),
49
+ canUse: z.boolean(),
50
+ });
51
+
52
+ export type ImageGenerationModel = z.infer<typeof ImageGenerationModelSchema>;
@@ -0,0 +1,3 @@
1
+ export * from './image-generation-config.schema';
2
+ export * from './image-generation-job.schema';
3
+ export * from './image-generation-model.schema';
@@ -1,3 +1,4 @@
1
+ export * from './common';
1
2
  export * from './language';
2
3
  export * from './paraphrase';
3
4
  export * from './presentation';
@@ -8,3 +9,4 @@ export * from './writer';
8
9
  export * from './image-editor';
9
10
  export * from './video-editor';
10
11
  export * from './music';
12
+ export * from './image-generation';
@@ -6,6 +6,7 @@ export const MusicTrackSchema = z.object({
6
6
  audioId: z.string(),
7
7
  audioUrl: z.string(),
8
8
  coverUrl: z.string(),
9
+ prompt: z.string().nullable(),
9
10
  tags: z.string(),
10
11
  duration: z.number(),
11
12
 
@@ -1,9 +1,14 @@
1
1
  import { z } from 'zod';
2
2
  import { ToolJobSchema } from '../../tool-job.schema';
3
+ import { PARAPHRASING_INTENSITY, USER_REACTION } from '../../../constants';
3
4
 
4
5
  export const ParaphraseToolJobSchema = ToolJobSchema.extend({
5
6
  styleId: z.string().uuid().nullable().optional(),
6
7
  modelId: z.string().uuid().nullable().optional(),
7
8
  userInput: z.string(),
9
+ title: z.string(),
10
+ typeId: z.string(),
11
+ intensity: z.nativeEnum(PARAPHRASING_INTENSITY),
12
+ reaction: z.nativeEnum(USER_REACTION).nullable(),
8
13
  aiOutput: z.string().nullable().optional(),
9
14
  });
@@ -5,8 +5,22 @@ export enum PPTX_SHAPE_TYPE {
5
5
  PICTURE_BOX = 'picture_box',
6
6
  CUSTOM_SHAPE = 'custom_shape',
7
7
  TABLE = 'table',
8
+ CHEVRON = 'chevron',
8
9
  }
9
10
 
11
+ export enum PPTX_CHEVRON_DIRECTION {
12
+ RIGHT = 'right',
13
+ LEFT = 'left',
14
+ UP = 'up',
15
+ DOWN = 'down',
16
+ }
17
+
18
+ export enum PPTX_ARROW_TYPE {
19
+ RIGHT = 'rightArrow',
20
+ LEFT = 'leftArrow',
21
+ UP = 'upArrow',
22
+ DOWN = 'downArrow',
23
+ }
10
24
  export enum PPTX_H_ALIGN {
11
25
  LEFT = 'left',
12
26
  CENTER = 'center',
@@ -182,6 +196,25 @@ export const PPTXTableShapeSchema = z.object({
182
196
  });
183
197
  export type PPTXTableShape = z.infer<typeof PPTXTableShapeSchema>;
184
198
 
199
+ // Chevron
200
+ export const PPTXChevronShapeSchema = z.object({
201
+ type: z.literal(PPTX_SHAPE_TYPE.CHEVRON),
202
+ direction: z.nativeEnum(PPTX_CHEVRON_DIRECTION).default(PPTX_CHEVRON_DIRECTION.RIGHT),
203
+ position: PPTXPositionSchema,
204
+ fill: PPTXFillSchema.optional(),
205
+ text: z.string().optional(),
206
+ font: PPTXFontSchema.optional(),
207
+ align: z
208
+ .nativeEnum(PPTX_H_ALIGN)
209
+ .optional()
210
+ .default('center' as PPTX_H_ALIGN),
211
+ valign: z
212
+ .nativeEnum(PPTX_V_ALIGN)
213
+ .optional()
214
+ .default('middle' as PPTX_V_ALIGN),
215
+ });
216
+ export type PPTXChevronShape = z.infer<typeof PPTXChevronShapeSchema>;
217
+
185
218
  // Overview
186
219
 
187
220
  export const PPTXShapeSchema = z.discriminatedUnion('type', [
@@ -189,6 +222,7 @@ export const PPTXShapeSchema = z.discriminatedUnion('type', [
189
222
  PPTXPictureBoxSchema,
190
223
  PPTXCustomShapeSchema,
191
224
  PPTXTableShapeSchema,
225
+ PPTXChevronShapeSchema,
192
226
  ]);
193
227
  export type PPTXShape = z.infer<typeof PPTXShapeSchema>;
194
228
 
@@ -12,6 +12,7 @@ import {
12
12
  IBarChartSlideDataStructure,
13
13
  IChartSlideDataStructure,
14
14
  ImageSlotSchema,
15
+ ITimelineSlideDataStructure,
15
16
  } from './slide-content.schema';
16
17
  import { SLIDE_CONTENT_TYPE } from '../../../constants';
17
18
 
@@ -140,6 +141,25 @@ export const ChartSlideDataUserEditSchema = z.object({
140
141
  version: z.literal(1),
141
142
  }) satisfies z.ZodType<IChartSlideDataStructure>;
142
143
 
144
+ export const TimelineSlideDataUserEditSchema = z.object({
145
+ contentType: z.literal(SLIDE_CONTENT_TYPE.TIMELINE),
146
+ title: z.string().min(1).max(500),
147
+ description: z.string().min(1).max(1000),
148
+ timeline: z.object({
149
+ events: z
150
+ .array(
151
+ z.object({
152
+ date: z.string().min(1).max(100),
153
+ title: z.string().min(1).max(200),
154
+ description: z.string().min(1).max(500),
155
+ }),
156
+ )
157
+ .min(2)
158
+ .max(10),
159
+ }),
160
+ version: z.literal(1),
161
+ }) satisfies z.ZodType<ITimelineSlideDataStructure>;
162
+
143
163
  export const SlideContentUserEditSchema = z.discriminatedUnion('contentType', [
144
164
  CoverSlideDataUserEditSchema,
145
165
  StructuredListSlideDataUserEditSchema,
@@ -150,5 +170,6 @@ export const SlideContentUserEditSchema = z.discriminatedUnion('contentType', [
150
170
  ThankYouSlideDataUserEditSchema,
151
171
  TableSlideDataUserEditSchema,
152
172
  ChartSlideDataUserEditSchema,
173
+ TimelineSlideDataUserEditSchema,
153
174
  ]);
154
175
  export type SlideContentUserEdit = z.infer<typeof SlideContentUserEditSchema>;
@@ -108,6 +108,20 @@ export interface IChartSlideDataStructure {
108
108
  version: 1;
109
109
  }
110
110
 
111
+ export interface ITimelineSlideDataStructure {
112
+ contentType: SLIDE_CONTENT_TYPE.TIMELINE;
113
+ title: string;
114
+ description: string;
115
+ timeline: {
116
+ events: Array<{
117
+ date: string;
118
+ title: string;
119
+ description: string;
120
+ }>;
121
+ };
122
+ version: 1;
123
+ }
124
+
111
125
  export const CoverSlideDataSchema = z.object({
112
126
  contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
113
127
  title: z.string().describe('Slide title in about 6 words').min(10).max(150),
@@ -307,6 +321,36 @@ export const ChartSlideDataSchema = z.object({
307
321
  }) satisfies z.ZodType<IChartSlideDataStructure>;
308
322
  export type ChartSlideData = z.infer<typeof ChartSlideDataSchema>;
309
323
 
324
+ export const TimelineSlideDataSchema = z.object({
325
+ contentType: z.literal(SLIDE_CONTENT_TYPE.TIMELINE),
326
+ title: z.string().describe('Slide title in about 6 words').min(10).max(150),
327
+ description: z.string().describe('Brief context for the timeline').min(10).max(200),
328
+ timeline: z.object({
329
+ events: z
330
+ .array(
331
+ z.object({
332
+ date: z
333
+ .string()
334
+ .describe(
335
+ 'Date or time period label. MUST be general/approximate if exact date unknown (e.g., "Early 2020s", "Mid-1990s", "Recent years")',
336
+ )
337
+ .min(2)
338
+ .max(50),
339
+ title: z.string().describe('Event title in 2-4 words').min(5).max(80),
340
+ description: z
341
+ .string()
342
+ .describe('Brief description of the event or milestone')
343
+ .min(20)
344
+ .max(150),
345
+ }),
346
+ )
347
+ .length(5)
348
+ .describe('Timeline must contain exactly 5 chronological events'),
349
+ }),
350
+ version: z.literal(1),
351
+ }) satisfies z.ZodType<ITimelineSlideDataStructure>;
352
+ export type TimelineSlideData = z.infer<typeof TimelineSlideDataSchema>;
353
+
310
354
  export const SlideContentSchema = z.discriminatedUnion('contentType', [
311
355
  CoverSlideDataSchema,
312
356
  StructuredListSlideDataSchema,
@@ -317,5 +361,6 @@ export const SlideContentSchema = z.discriminatedUnion('contentType', [
317
361
  ThankYouSlideDataSchema,
318
362
  TableSlideDataSchema,
319
363
  ChartSlideDataSchema,
364
+ TimelineSlideDataSchema,
320
365
  ]);
321
366
  export type SlideContent = z.infer<typeof SlideContentSchema>;