@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,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./calculate-image-editor-price.helper"), exports);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateImageGenerationPrice = calculateImageGenerationPrice;
4
+ function calculateImageGenerationPrice({ basePrice, params, userHasActiveSubscriptionOrProduct, rules, }) {
5
+ let extra = 0;
6
+ for (const rule of rules !== null && rules !== void 0 ? rules : []) {
7
+ const condition = rule.condition;
8
+ if (condition.resolution && condition.resolution === params.resolution) {
9
+ extra += rule.value;
10
+ }
11
+ if (condition.withoutSub && userHasActiveSubscriptionOrProduct === false) {
12
+ extra += rule.value;
13
+ }
14
+ }
15
+ return basePrice + extra;
16
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./calculate-image-generation-price.helper"), exports);
@@ -22,3 +22,5 @@ __exportStar(require("./tts"), exports);
22
22
  __exportStar(require("./video"), exports);
23
23
  __exportStar(require("./video-editor"), exports);
24
24
  __exportStar(require("./writer"), exports);
25
+ __exportStar(require("./image-editor"), exports);
26
+ __exportStar(require("./image-generation"), exports);
@@ -17,7 +17,11 @@ function matchesCondition(condition, params) {
17
17
  });
18
18
  }
19
19
  function calculateVideoGenerationPrice({ pricePerSecond, params, rules, }) {
20
- const base = pricePerSecond * params.duration;
20
+ const perSecondRule = rules
21
+ .filter((r) => r.type === constants_1.VIDEO_PRICING_RULE_TYPE.PER_SECOND)
22
+ .find((r) => matchesCondition(r.condition, params));
23
+ const effectivePricePerSecond = perSecondRule ? perSecondRule.value : pricePerSecond;
24
+ const base = effectivePricePerSecond * params.duration;
21
25
  const flatMarkup = rules.reduce((sum, r) => {
22
26
  if (r.type !== constants_1.VIDEO_PRICING_RULE_TYPE.FLAT) {
23
27
  return sum;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommunityPostMediaDataSchema = exports.MusicCommunityMediaSchema = exports.VideoEditorCommunityMediaSchema = exports.VideoCommunityMediaSchema = exports.ImageEditorCommunityMediaSchema = exports.ImageCommunityMediaSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const music_track_schema_1 = require("../tools/music/music-track.schema");
7
+ const video_job_schema_1 = require("../tools/video/video-job.schema");
8
+ const file_schema_1 = require("../file.schema");
9
+ const tools_1 = require("../tools");
10
+ exports.ImageCommunityMediaSchema = zod_1.z.object({
11
+ type: zod_1.z.literal(constants_1.COMMUNITY_POST_TYPE.IMAGE),
12
+ text: zod_1.z.string().max(10000),
13
+ files: zod_1.z.array(file_schema_1.FileSchema.pick({ url: true })),
14
+ imageFormat: zod_1.z.nativeEnum(constants_1.IMAGE_FORMAT).nullable(),
15
+ });
16
+ exports.ImageEditorCommunityMediaSchema = zod_1.z.object({
17
+ type: zod_1.z.literal(constants_1.COMMUNITY_POST_TYPE.IMAGE_EDITOR),
18
+ prompt: zod_1.z.string(),
19
+ imageUrls: zod_1.z.array(zod_1.z.string()).nullable(),
20
+ });
21
+ exports.VideoCommunityMediaSchema = zod_1.z.object({
22
+ type: zod_1.z.literal(constants_1.COMMUNITY_POST_TYPE.VIDEO),
23
+ title: zod_1.z.string(),
24
+ prompt: zod_1.z.string(),
25
+ videoUrl: zod_1.z.string().nullable(),
26
+ params: video_job_schema_1.VideoJobParamsSchema,
27
+ });
28
+ exports.VideoEditorCommunityMediaSchema = zod_1.z.object({
29
+ type: zod_1.z.literal(constants_1.COMMUNITY_POST_TYPE.VIDEO_EDITOR),
30
+ title: zod_1.z.string(),
31
+ prompt: zod_1.z.string(),
32
+ inputVideoUrl: zod_1.z.string(),
33
+ outputVideoUrl: zod_1.z.string().nullable(),
34
+ });
35
+ exports.MusicCommunityMediaSchema = zod_1.z.object({
36
+ type: zod_1.z.literal(constants_1.COMMUNITY_POST_TYPE.MUSIC),
37
+ params: tools_1.MusicJobParamsSchema,
38
+ prompt: zod_1.z.string(),
39
+ tracks: zod_1.z.array(music_track_schema_1.MusicTrackSchema.pick({
40
+ audioUrl: true,
41
+ coverUrl: true,
42
+ duration: true,
43
+ title: true,
44
+ tags: true,
45
+ })),
46
+ });
47
+ exports.CommunityPostMediaDataSchema = zod_1.z.discriminatedUnion('type', [
48
+ exports.ImageCommunityMediaSchema,
49
+ exports.ImageEditorCommunityMediaSchema,
50
+ exports.VideoCommunityMediaSchema,
51
+ exports.VideoEditorCommunityMediaSchema,
52
+ exports.MusicCommunityMediaSchema,
53
+ ]);
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommunityPostReportSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../../constants");
6
+ exports.CommunityPostReportSchema = zod_1.z.object({
7
+ uuid: zod_1.z.string().uuid(),
8
+ communityPostId: zod_1.z.string().uuid(),
9
+ userId: zod_1.z.string().uuid(),
10
+ reason: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_REPORT_REASON),
11
+ createdAt: zod_1.z.date(),
12
+ updatedAt: zod_1.z.date(),
13
+ });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./community-post-report.schema"), exports);
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResponseCommunityPostSchema = exports.CommunityPostSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const community_post_media_data_schema_1 = require("./community-post-media-data.schema");
7
+ const icon_variants_schema_1 = require("../icon-variants.schema");
8
+ exports.CommunityPostSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ userId: zod_1.z.string().uuid(),
11
+ caption: zod_1.z.string().nullable(),
12
+ status: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_STATUS),
13
+ visibility: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_VISIBILITY),
14
+ type: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_TYPE),
15
+ mediaData: community_post_media_data_schema_1.CommunityPostMediaDataSchema,
16
+ aiModelId: zod_1.z.string().uuid(),
17
+ aiModelTitle: zod_1.z.string(),
18
+ aiModelIcons: icon_variants_schema_1.IconVariantsSchema,
19
+ messageId: zod_1.z.string().nullable(),
20
+ toolJobId: zod_1.z.string().nullable(),
21
+ toolType: zod_1.z.nativeEnum(constants_1.COMMUNITY_TOOL_TYPE).nullable(),
22
+ views: zod_1.z.number(),
23
+ likesCount: zod_1.z.number(),
24
+ reportsCount: zod_1.z.number(),
25
+ publishedAt: zod_1.z.date().nullable(),
26
+ archivedAt: zod_1.z.date().nullable(),
27
+ createdAt: zod_1.z.date(),
28
+ updatedAt: zod_1.z.date(),
29
+ });
30
+ exports.ResponseCommunityPostSchema = zod_1.z.object({
31
+ uuid: zod_1.z.string().uuid(),
32
+ userId: zod_1.z.string().uuid(),
33
+ caption: zod_1.z.string().nullable(),
34
+ status: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_STATUS),
35
+ visibility: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_VISIBILITY),
36
+ type: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_TYPE),
37
+ mediaData: community_post_media_data_schema_1.CommunityPostMediaDataSchema,
38
+ aiModelId: zod_1.z.string().uuid(),
39
+ aiModelTitle: zod_1.z.string(),
40
+ aiModelIcons: icon_variants_schema_1.IconVariantsSchema,
41
+ views: zod_1.z.number(),
42
+ likesCount: zod_1.z.number(),
43
+ publishedAt: zod_1.z.date().nullable(),
44
+ });
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./community-post.schema"), exports);
18
+ __exportStar(require("./community-post-media-data.schema"), exports);
19
+ __exportStar(require("./community-post-report"), exports);
@@ -71,3 +71,5 @@ __exportStar(require("./webmaster-balance.schema"), exports);
71
71
  __exportStar(require("./user-referrals.schema"), exports);
72
72
  __exportStar(require("./webmaster-click.schema"), exports);
73
73
  __exportStar(require("./api-key.schema"), exports);
74
+ __exportStar(require("./community"), exports);
75
+ __exportStar(require("./user-profile.schema"), exports);
@@ -10,6 +10,7 @@ exports.OrderSchema = zod_1.z.object({
10
10
  productId: zod_1.z.nullable(zod_1.z.string().uuid()),
11
11
  subscriptionId: zod_1.z.nullable(zod_1.z.string().uuid()),
12
12
  sum: zod_1.z.number(),
13
+ description: zod_1.z.string(),
13
14
  createdAt: zod_1.z.date(),
14
15
  updatedAt: zod_1.z.date(),
15
16
  });
@@ -15,7 +15,8 @@ exports.PageSchema = zod_1.z.object({
15
15
  aIModelId: zod_1.z.string().uuid().nullable().optional(),
16
16
  toolId: zod_1.z.string().uuid().nullable().optional(),
17
17
  toolOptionId: zod_1.z.string().uuid().nullable().optional(),
18
- toolTitle: zod_1.z.string().nullable(),
18
+ toolModelId: zod_1.z.string().uuid().nullable().optional(),
19
+ toolTitle: zod_1.z.string().optional().nullable(),
19
20
  type: zod_1.z.nativeEnum(constants_1.PageType),
20
21
  createdAt: zod_1.z.date(),
21
22
  updatedAt: zod_1.z.date(),
@@ -1,13 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentSchema = void 0;
3
+ exports.PaymentWithDescriptionSchema = exports.PaymentSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.PaymentSchema = zod_1.z.object({
6
6
  uuid: zod_1.z.string().uuid(),
7
7
  link: zod_1.z.nullable(zod_1.z.string()),
8
- status: zod_1.z.boolean(),
8
+ status: zod_1.z.string(),
9
9
  sum: zod_1.z.number(),
10
10
  orderId: zod_1.z.string().uuid(),
11
11
  createdAt: zod_1.z.date(),
12
12
  updatedAt: zod_1.z.date(),
13
13
  });
14
+ exports.PaymentWithDescriptionSchema = exports.PaymentSchema.extend({
15
+ description: zod_1.z.string(),
16
+ });
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReviewSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const constants_1 = require("../constants");
5
6
  exports.ReviewSchema = zod_1.z.object({
6
7
  uuid: zod_1.z.string().uuid(),
7
8
  email: zod_1.z.string().email(),
8
9
  name: zod_1.z.string(),
9
10
  text: zod_1.z.string(),
10
11
  rating: zod_1.z.number().int().step(1).min(0).max(5),
12
+ status: zod_1.z.nativeEnum(constants_1.REVIEW_STATUS),
11
13
  createdAt: zod_1.z.date(),
12
14
  updatedAt: zod_1.z.date(),
13
15
  });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionFeatureSchema = exports.MusicModelAccessFeatureSchema = exports.MusicQuotaFeatureSchema = exports.PresentationQuotaFeatureSchema = exports.VideoModelAccessFeatureSchema = exports.VideoQuotaFeatureSchema = exports.STTQuotaFeatureSchema = exports.STTModelAccessFeatureSchema = exports.TTSQuotaFeatureSchema = exports.ImageGenerationQuotaFeatureSchema = exports.TtsModelAccessFeatureSchema = exports.AdvancedToolsAccessFeatureSchema = exports.WebSearchFeatureSchema = exports.ExtendedContextFeatureSchema = exports.MaxInputLengthFeatureSchema = exports.RequestsQuotaFeatureSchema = exports.AiModelAccessFeatureSchema = exports.CarryoverBalanceFeatureSchema = exports.TokensFeatureSchema = exports.SubscriptionFeatureBaseSchema = void 0;
3
+ exports.SubscriptionFeatureSchema = exports.ImageEditorModelAccessFeatureSchema = exports.ImageEditorQuotaFeatureSchema = exports.WriterModelAccessFeatureSchema = exports.WriterQuotaFeatureSchema = exports.MusicModelAccessFeatureSchema = exports.MusicQuotaFeatureSchema = exports.PresentationQuotaFeatureSchema = exports.VideoModelAccessFeatureSchema = exports.VideoQuotaFeatureSchema = exports.STTQuotaFeatureSchema = exports.STTModelAccessFeatureSchema = exports.TTSQuotaFeatureSchema = exports.ImageGenerationQuotaFeatureSchema = exports.TtsModelAccessFeatureSchema = exports.AdvancedToolsAccessFeatureSchema = exports.WebSearchFeatureSchema = exports.ExtendedContextFeatureSchema = exports.MaxInputLengthFeatureSchema = exports.RequestsQuotaFeatureSchema = exports.AiModelAccessFeatureSchema = exports.CarryoverBalanceFeatureSchema = exports.TokensFeatureSchema = exports.SubscriptionFeatureBaseSchema = void 0;
4
4
  const constants_1 = require("../constants");
5
5
  const zod_1 = require("zod");
6
6
  exports.SubscriptionFeatureBaseSchema = zod_1.z.object({
@@ -121,6 +121,28 @@ exports.MusicModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.ex
121
121
  isAvailable: zod_1.z.boolean(),
122
122
  modelId: zod_1.z.string(),
123
123
  });
124
+ exports.WriterQuotaFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
125
+ kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.WRITER),
126
+ type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.WRITER_QUOTA),
127
+ value: zod_1.z.number(),
128
+ });
129
+ exports.WriterModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
130
+ kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.WRITER),
131
+ type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.WRITER_MODEL_ACCESS),
132
+ isAvailable: zod_1.z.boolean(),
133
+ modelId: zod_1.z.string(),
134
+ });
135
+ exports.ImageEditorQuotaFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
136
+ kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.IMAGE_EDITOR),
137
+ type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.IMAGE_EDITOR_QUOTA),
138
+ value: zod_1.z.number(),
139
+ });
140
+ exports.ImageEditorModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
141
+ kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.IMAGE_EDITOR),
142
+ type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.IMAGE_EDITOR_MODEL_ACCESS),
143
+ isAvailable: zod_1.z.boolean(),
144
+ modelId: zod_1.z.string(),
145
+ });
124
146
  exports.SubscriptionFeatureSchema = zod_1.z.union([
125
147
  exports.AiModelAccessFeatureSchema,
126
148
  exports.RequestsQuotaFeatureSchema,
@@ -140,4 +162,8 @@ exports.SubscriptionFeatureSchema = zod_1.z.union([
140
162
  exports.CarryoverBalanceFeatureSchema,
141
163
  exports.MusicQuotaFeatureSchema,
142
164
  exports.MusicModelAccessFeatureSchema,
165
+ exports.WriterQuotaFeatureSchema,
166
+ exports.WriterModelAccessFeatureSchema,
167
+ exports.ImageEditorQuotaFeatureSchema,
168
+ exports.ImageEditorModelAccessFeatureSchema,
143
169
  ]);
@@ -8,6 +8,9 @@ exports.ToolSchema = zod_1.z.object({
8
8
  title: zod_1.z.string(),
9
9
  description: zod_1.z.string(),
10
10
  icon: zod_1.z.string(),
11
+ alias: zod_1.z.string(),
12
+ bgColor: zod_1.z.string(),
13
+ iconColor: zod_1.z.string(),
11
14
  order: zod_1.z.number(),
12
15
  contentType: zod_1.z.string(),
13
16
  });
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AttachedToolFileSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.AttachedToolFileSchema = zod_1.z.object({
6
+ uuid: zod_1.z.string(),
7
+ url: zod_1.z.string(),
8
+ name: zod_1.z.string(),
9
+ mimeType: zod_1.z.string(),
10
+ type: zod_1.z.string(),
11
+ size: zod_1.z.number(),
12
+ duration: zod_1.z.number().optional().nullable(),
13
+ });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./attached-tool-file.schema"), exports);
@@ -26,6 +26,7 @@ exports.SystemPromptSchema = zod_1.z.object({
26
26
  .optional()
27
27
  .nullable(),
28
28
  order: zod_1.z.number(),
29
+ placeholder: zod_1.z.string().nullable(),
29
30
  });
30
31
  exports.PromptGroupSchema = zod_1.z.object({
31
32
  uuid: zod_1.z.string(),
@@ -4,15 +4,24 @@ exports.ImageEditorJobSchema = exports.ImageEditorJobParamsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const constants_1 = require("../../../constants");
6
6
  const tool_job_schema_1 = require("../../tool-job.schema");
7
+ const file_schema_1 = require("../../file.schema");
8
+ const common_1 = require("../common");
7
9
  exports.ImageEditorJobParamsSchema = zod_1.z.object({
8
- imageUrls: zod_1.z.array(zod_1.z.string()).optional(),
10
+ attachedFiles: zod_1.z.array(common_1.AttachedToolFileSchema),
9
11
  systemPromptId: zod_1.z.string().optional(),
12
+ imageUrls: zod_1.z.string().array().optional(),
10
13
  });
11
14
  exports.ImageEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
12
15
  title: zod_1.z.string(),
13
16
  prompt: zod_1.z.string(),
14
17
  reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
15
- imageUrls: zod_1.z.array(zod_1.z.string()).nullable(),
18
+ imageUrls: zod_1.z.string().array(),
19
+ images: zod_1.z
20
+ .array(file_schema_1.FileSchema.pick({
21
+ uuid: true,
22
+ url: true,
23
+ }))
24
+ .nullable(),
16
25
  params: exports.ImageEditorJobParamsSchema,
17
26
  modelId: zod_1.z.string(),
18
27
  });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ImageEditorModelSchema = exports.ImageEditorModelParamsSchema = void 0;
3
+ exports.ImageEditorModelSchema = exports.ImageEditorModelPricingRulesSchema = exports.ImageEditorModelPricingRuleConditionSchema = exports.ImageEditorModelParamsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const icon_variants_schema_1 = require("../../icon-variants.schema");
6
6
  const unlocked_by_subscription_schema_1 = require("../../unlocked-by-subscription.schema");
@@ -11,6 +11,13 @@ exports.ImageEditorModelParamsSchema = zod_1.z.object({
11
11
  acceptedTypes: zod_1.z.array(zod_1.z.string()),
12
12
  }),
13
13
  });
14
+ exports.ImageEditorModelPricingRuleConditionSchema = zod_1.z.object({
15
+ withoutSub: zod_1.z.boolean().optional(),
16
+ });
17
+ exports.ImageEditorModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
18
+ condition: exports.ImageEditorModelPricingRuleConditionSchema,
19
+ value: zod_1.z.number(),
20
+ }));
14
21
  exports.ImageEditorModelSchema = zod_1.z.object({
15
22
  uuid: zod_1.z.string(),
16
23
  title: zod_1.z.string(),
@@ -20,6 +27,7 @@ exports.ImageEditorModelSchema = zod_1.z.object({
20
27
  icons: icon_variants_schema_1.IconVariantsSchema,
21
28
  maxInputLength: zod_1.z.number(),
22
29
  params: exports.ImageEditorModelParamsSchema,
30
+ pricingRules: exports.ImageEditorModelPricingRulesSchema,
23
31
  unlockedBy: unlocked_by_subscription_schema_1.UnlockedBySchema.nullable(),
24
32
  canUse: zod_1.z.boolean(),
25
33
  });
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageGenerationConfigSchema = exports.ImageGenerationPresetSchema = exports.ImageGenerationVendorSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const image_generation_model_schema_1 = require("./image-generation-model.schema");
6
+ const icon_variants_schema_1 = require("../../icon-variants.schema");
7
+ exports.ImageGenerationVendorSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ title: zod_1.z.string(),
10
+ order: zod_1.z.number(),
11
+ icons: icon_variants_schema_1.IconVariantsSchema,
12
+ models: zod_1.z.array(image_generation_model_schema_1.ImageGenerationModelSchema),
13
+ });
14
+ exports.ImageGenerationPresetSchema = zod_1.z.object({
15
+ uuid: zod_1.z.string().uuid(),
16
+ title: zod_1.z.string(),
17
+ sample: zod_1.z.string(),
18
+ order: zod_1.z.number(),
19
+ });
20
+ exports.ImageGenerationConfigSchema = zod_1.z.object({
21
+ vendors: zod_1.z.array(exports.ImageGenerationVendorSchema),
22
+ presets: zod_1.z.array(exports.ImageGenerationPresetSchema),
23
+ });
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageGenerationJobSchema = exports.ImageGenerationJobParamsSchema = exports.ImageGenerationFileAttachmentSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const tool_job_schema_1 = require("../../tool-job.schema");
6
+ const constants_1 = require("../../../constants");
7
+ exports.ImageGenerationFileAttachmentSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string(),
9
+ url: zod_1.z.string(),
10
+ name: zod_1.z.string(),
11
+ type: zod_1.z.string(),
12
+ mimeType: zod_1.z.string(),
13
+ size: zod_1.z.number(),
14
+ });
15
+ exports.ImageGenerationJobParamsSchema = zod_1.z.object({
16
+ aspectRatio: zod_1.z.string().optional(),
17
+ attachedFiles: zod_1.z.array(exports.ImageGenerationFileAttachmentSchema),
18
+ enhancePrompt: zod_1.z.boolean().optional(),
19
+ resolution: zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION).optional(),
20
+ });
21
+ exports.ImageGenerationJobSchema = tool_job_schema_1.ToolJobSchema.extend({
22
+ title: zod_1.z.string(),
23
+ prompt: zod_1.z.string(),
24
+ reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
25
+ presetId: zod_1.z.string().uuid().nullable().optional(),
26
+ output: zod_1.z.array(zod_1.z.string()).nullable(),
27
+ images: zod_1.z
28
+ .array(zod_1.z.object({
29
+ uuid: zod_1.z.string(),
30
+ url: zod_1.z.string(),
31
+ }))
32
+ .nullable(),
33
+ params: exports.ImageGenerationJobParamsSchema.optional(),
34
+ modelId: zod_1.z.string(),
35
+ });
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageGenerationModelSchema = exports.ImageModelPricingRulesSchema = exports.ImageModelPricingRuleConditionSchema = exports.ImageGenerationModelParamsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const unlocked_by_subscription_schema_1 = require("../../unlocked-by-subscription.schema");
6
+ const constants_1 = require("../../../constants");
7
+ exports.ImageGenerationModelParamsSchema = zod_1.z.object({
8
+ aspectRatio: zod_1.z.record(zod_1.z.string(), zod_1.z.object({
9
+ width: zod_1.z.number(),
10
+ height: zod_1.z.number(),
11
+ })),
12
+ quality: zod_1.z.string().optional(),
13
+ resolution: zod_1.z
14
+ .object({
15
+ options: zod_1.z.array(zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION)),
16
+ })
17
+ .optional(),
18
+ });
19
+ exports.ImageModelPricingRuleConditionSchema = zod_1.z.object({
20
+ resolution: zod_1.z.string().optional(),
21
+ withoutSub: zod_1.z.boolean().optional(),
22
+ });
23
+ exports.ImageModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
24
+ condition: exports.ImageModelPricingRuleConditionSchema,
25
+ value: zod_1.z.number(),
26
+ }));
27
+ exports.ImageGenerationModelSchema = zod_1.z.object({
28
+ uuid: zod_1.z.string().uuid(),
29
+ title: zod_1.z.string(),
30
+ description: zod_1.z.string(),
31
+ order: zod_1.z.number(),
32
+ status: zod_1.z.string(),
33
+ price: zod_1.z.number(),
34
+ params: exports.ImageGenerationModelParamsSchema,
35
+ supportsImageAttachment: zod_1.z.boolean(),
36
+ maxAttachedImages: zod_1.z.number(),
37
+ maxPromptLength: zod_1.z.number(),
38
+ pricingRules: exports.ImageModelPricingRulesSchema,
39
+ unlockedBy: unlocked_by_subscription_schema_1.UnlockedBySchema.nullable(),
40
+ canUse: zod_1.z.boolean(),
41
+ });
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./image-generation-config.schema"), exports);
18
+ __exportStar(require("./image-generation-job.schema"), exports);
19
+ __exportStar(require("./image-generation-model.schema"), exports);
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./common"), exports);
17
18
  __exportStar(require("./language"), exports);
18
19
  __exportStar(require("./paraphrase"), exports);
19
20
  __exportStar(require("./presentation"), exports);
@@ -24,3 +25,4 @@ __exportStar(require("./writer"), exports);
24
25
  __exportStar(require("./image-editor"), exports);
25
26
  __exportStar(require("./video-editor"), exports);
26
27
  __exportStar(require("./music"), exports);
28
+ __exportStar(require("./image-generation"), exports);
@@ -8,6 +8,7 @@ exports.MusicTrackSchema = zod_1.z.object({
8
8
  audioId: zod_1.z.string(),
9
9
  audioUrl: zod_1.z.string(),
10
10
  coverUrl: zod_1.z.string(),
11
+ prompt: zod_1.z.string().nullable(),
11
12
  tags: zod_1.z.string(),
12
13
  duration: zod_1.z.number(),
13
14
  genJobId: zod_1.z.string().nullable().optional(),
@@ -3,9 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ParaphraseToolJobSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const tool_job_schema_1 = require("../../tool-job.schema");
6
+ const constants_1 = require("../../../constants");
6
7
  exports.ParaphraseToolJobSchema = tool_job_schema_1.ToolJobSchema.extend({
7
8
  styleId: zod_1.z.string().uuid().nullable().optional(),
8
9
  modelId: zod_1.z.string().uuid().nullable().optional(),
9
10
  userInput: zod_1.z.string(),
11
+ title: zod_1.z.string(),
12
+ typeId: zod_1.z.string(),
13
+ intensity: zod_1.z.nativeEnum(constants_1.PARAPHRASING_INTENSITY),
14
+ reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
10
15
  aiOutput: zod_1.z.string().nullable().optional(),
11
16
  });