@purpleschool/gptbot 0.9.96 → 0.10.0

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 (344) hide show
  1. package/api/controllers/http/auth.ts +1 -0
  2. package/api/controllers/http/b2b.ts +1 -0
  3. package/api/controllers/http/index.ts +4 -0
  4. package/api/controllers/http/interior-design.ts +14 -0
  5. package/api/controllers/http/marketplace-card.ts +14 -0
  6. package/api/controllers/http/page.ts +2 -0
  7. package/api/controllers/http/payment.ts +1 -0
  8. package/api/controllers/http/product.ts +1 -0
  9. package/api/controllers/http/solving-edu-task.ts +14 -0
  10. package/api/controllers/http/subscription.ts +2 -1
  11. package/api/controllers/http/team-account.ts +21 -0
  12. package/api/routes.ts +125 -2
  13. package/build/api/controllers/http/auth.js +1 -0
  14. package/build/api/controllers/http/b2b.js +1 -0
  15. package/build/api/controllers/http/index.js +4 -0
  16. package/build/api/controllers/http/interior-design.js +16 -0
  17. package/build/api/controllers/http/marketplace-card.js +16 -0
  18. package/build/api/controllers/http/page.js +2 -0
  19. package/build/api/controllers/http/payment.js +1 -0
  20. package/build/api/controllers/http/product.js +1 -0
  21. package/build/api/controllers/http/solving-edu-task.js +16 -0
  22. package/build/api/controllers/http/subscription.js +2 -1
  23. package/build/api/controllers/http/team-account.js +23 -0
  24. package/build/api/routes.js +93 -2
  25. package/build/commands/b2b/get-b2b-documentation.command.js +99 -0
  26. package/build/commands/b2b/index.js +2 -0
  27. package/build/commands/b2b/send-text-request.command.js +2 -5
  28. package/build/commands/b2b/upload-b2b-file.command.js +12 -0
  29. package/build/commands/cabinet/get-user-statistics-by-month.command.js +4 -0
  30. package/build/commands/chat/archive-all.command.js +1 -4
  31. package/build/commands/chat/check-limit.command.js +7 -0
  32. package/build/commands/chat/create-chat.command.js +0 -1
  33. package/build/commands/chat/find-chats.command.js +1 -1
  34. package/build/commands/chat/get-last-active-chat-command.js +0 -1
  35. package/build/commands/index.js +3 -0
  36. package/build/commands/message/create-text-message.command.js +1 -0
  37. package/build/commands/page/find-pages-by-criteria.command.js +36 -0
  38. package/build/commands/page/index.js +1 -0
  39. package/build/commands/payment/find-payments-by-criteria.command.js +53 -0
  40. package/build/commands/payment/index.js +1 -0
  41. package/build/commands/product/buy-product.command.js +25 -1
  42. package/build/commands/product/index.js +1 -0
  43. package/build/commands/product/refund-product.command.js +15 -0
  44. package/build/commands/subscription/buy-subscription.command.js +24 -1
  45. package/build/commands/subscription/index.js +1 -1
  46. package/build/commands/subscription/refund-subscription.command.js +15 -0
  47. package/build/commands/subscription/upgrade-subscription.command.js +25 -1
  48. package/build/commands/team-account/accept-team-account-invite.command.js +14 -0
  49. package/build/commands/team-account/create-manual-team-product.command.js +15 -0
  50. package/build/commands/team-account/create-manual-team-subscription.command.js +16 -0
  51. package/build/commands/team-account/create-team-account.command.js +16 -0
  52. package/build/commands/team-account/find-current-team-account-products.command.js +11 -0
  53. package/build/commands/team-account/find-current-team-account-subscriptions.command.js +11 -0
  54. package/build/commands/team-account/find-team-account-members.command.js +11 -0
  55. package/build/commands/team-account/find-team-account-operations.command.js +15 -0
  56. package/build/commands/team-account/find-team-account-products.command.js +11 -0
  57. package/build/commands/team-account/find-team-account-subscriptions.command.js +11 -0
  58. package/build/commands/team-account/find-team-accounts-by-name.command.js +18 -0
  59. package/build/commands/team-account/get-my-team-account.command.js +11 -0
  60. package/build/commands/team-account/get-team-account-balance.command.js +15 -0
  61. package/build/commands/team-account/index.js +33 -0
  62. package/build/commands/team-account/invite-team-account-member.command.js +17 -0
  63. package/build/commands/team-account/refund-team-account-balance.command.js +14 -0
  64. package/build/commands/team-account/remove-team-account-member.command.js +15 -0
  65. package/build/commands/team-account/update-team-account-member.command.js +23 -0
  66. package/build/commands/team-account/update-team-account.command.js +18 -0
  67. package/build/commands/team-to-product/add-team-to-product.command.js +16 -0
  68. package/build/commands/team-to-product/get-team-to-product-by-uuid.command.js +14 -0
  69. package/build/commands/team-to-product/get-team-to-products.command.js +14 -0
  70. package/build/commands/team-to-product/index.js +20 -0
  71. package/build/commands/team-to-product/update-team-to-product.command.js +21 -0
  72. package/build/commands/team-to-subscription/add-team-to-subscription.command.js +20 -0
  73. package/build/commands/team-to-subscription/get-team-to-subscription-by-uuid.command.js +14 -0
  74. package/build/commands/team-to-subscription/get-team-to-subscriptions.command.js +14 -0
  75. package/build/commands/team-to-subscription/index.js +20 -0
  76. package/build/commands/team-to-subscription/update-team-to-subscription.command.js +31 -0
  77. package/build/commands/tools/image-editor/image-editor.command.js +1 -0
  78. package/build/commands/tools/image-editor/retry-image-editor-job.command.js +1 -0
  79. package/build/commands/tools/index.js +3 -0
  80. package/build/commands/tools/interior-design/delete-all-interior-design-jobs.command.js +8 -0
  81. package/build/commands/tools/interior-design/delete-interior-design-job-by-uuid.command.js +11 -0
  82. package/build/commands/tools/interior-design/find-interior-design-job-by-uuid.command.js +14 -0
  83. package/build/commands/tools/interior-design/find-interior-design-jobs.command.js +18 -0
  84. package/build/commands/tools/interior-design/get-interior-design-tool-config.command.js +11 -0
  85. package/build/commands/tools/interior-design/index.js +25 -0
  86. package/build/commands/tools/interior-design/interior-design.command.js +20 -0
  87. package/build/commands/tools/interior-design/retry-interior-design-job.command.js +25 -0
  88. package/build/commands/tools/interior-design/set-reaction-to-interior-design-job.command.js +28 -0
  89. package/build/commands/tools/interior-design/update-interior-design-job-title.command.js +17 -0
  90. package/build/commands/tools/marketplace-card/delete-all-marketplace-card-jobs.command.js +10 -0
  91. package/build/commands/tools/marketplace-card/delete-marketplace-card-by-uuid.command.js +13 -0
  92. package/build/commands/tools/marketplace-card/execute-marketplace-card.command.js +48 -0
  93. package/build/commands/tools/marketplace-card/find-marketplace-card-job-by-uuid.command.js +14 -0
  94. package/build/commands/tools/marketplace-card/find-marketplace-card-jobs.command.js +18 -0
  95. package/build/commands/tools/marketplace-card/get-marketplace-card-config.command.js +11 -0
  96. package/build/commands/tools/marketplace-card/index.js +25 -0
  97. package/build/commands/tools/marketplace-card/retry-marketplace-card-job.command.js +51 -0
  98. package/build/commands/tools/marketplace-card/set-reaction-to-marketplace-card.command.js +28 -0
  99. package/build/commands/tools/marketplace-card/update-marketplace-card-job-title.command.js +17 -0
  100. package/build/commands/tools/solving-edu-task/delete-all-solving-edu-task-jobs.command.js +10 -0
  101. package/build/commands/tools/solving-edu-task/delete-solving-edu-task-job-by-uuid.command.js +13 -0
  102. package/build/commands/tools/solving-edu-task/find-solving-edu-task-job-by-uuid.command.js +14 -0
  103. package/build/commands/tools/solving-edu-task/find-solving-edu-task-jobs.command.js +18 -0
  104. package/build/commands/tools/solving-edu-task/get-solving-edu-task-tool-config.command.js +11 -0
  105. package/build/commands/tools/solving-edu-task/index.js +25 -0
  106. package/build/commands/tools/solving-edu-task/retry-solving-edu-task-job.command.js +23 -0
  107. package/build/commands/tools/solving-edu-task/set-reaction-to-solving-edu-task-job.command.js +28 -0
  108. package/build/commands/tools/solving-edu-task/solving-edu-task.command.js +30 -0
  109. package/build/commands/tools/solving-edu-task/update-solving-edu-task-job-title.command.js +17 -0
  110. package/build/commands/user/get-me.command.js +2 -1
  111. package/build/commands/user/get-user-payments.command.js +3 -1
  112. package/build/constants/ai-model/enums/index.js +0 -1
  113. package/build/constants/billing/enums/billing-scope.enum.js +8 -0
  114. package/build/constants/{errors → billing/enums}/index.js +1 -2
  115. package/build/constants/billing/index.js +17 -0
  116. package/build/constants/cabinet/enums/index.js +1 -0
  117. package/build/constants/cabinet/enums/statistics-metric-type.enum.js +8 -0
  118. package/build/constants/index.js +2 -1
  119. package/build/constants/model/enums/unified-model-content-type.enum.js +2 -1
  120. package/build/constants/page/enums/index.js +1 -0
  121. package/build/constants/page/enums/page-sort-by.enum.js +8 -0
  122. package/build/constants/payment/enums/index.js +1 -0
  123. package/build/constants/payment/enums/payment-provider.enum.js +8 -0
  124. package/build/constants/product/enums/product-status.enum.js +1 -0
  125. package/build/constants/subscription/enums/subscription-feature-type.enum.js +5 -1
  126. package/build/constants/subscription/enums/subscription-status.enum.js +1 -0
  127. package/build/constants/subscription/enums/user-to-subscription-marks.enum.js +1 -0
  128. package/build/constants/team-account/enums/index.js +20 -0
  129. package/build/constants/team-account/enums/team-account-invite-status.enum.js +10 -0
  130. package/build/constants/team-account/enums/team-account-member-role.enum.js +9 -0
  131. package/build/constants/team-account/enums/team-account-member-status.enum.js +11 -0
  132. package/build/constants/team-account/enums/team-account-operation-type.enum.js +10 -0
  133. package/build/constants/team-account/index.js +17 -0
  134. package/build/constants/tool/enums/index.js +0 -1
  135. package/build/constants/transaction/enums/user-balance-status.enum.js +3 -0
  136. package/build/constants/ui-notification/enums/ui-notification-type.enum.js +1 -0
  137. package/build/constants/user/enums/user-status.js +1 -0
  138. package/build/helpers/index.js +1 -0
  139. package/build/helpers/interior-design/calculate-interior-design-price.helper.js +13 -0
  140. package/build/helpers/interior-design/index.js +17 -0
  141. package/build/models/ai-model.schema.js +0 -1
  142. package/build/models/b2b/b2b-completions-stream-chunk.schema.js +10 -0
  143. package/build/models/b2b/b2b-file-upload-response.schema.js +11 -0
  144. package/build/models/b2b/index.js +18 -0
  145. package/build/models/chat.schema.js +1 -1
  146. package/build/models/community/community-post-media-data.schema.js +1 -0
  147. package/build/models/index.js +3 -0
  148. package/build/models/json-value.schema.js +13 -0
  149. package/build/models/message.schema.js +1 -0
  150. package/build/models/payment.schema.js +8 -3
  151. package/build/models/product.schema.js +2 -0
  152. package/build/models/prompt.schema.js +0 -2
  153. package/build/models/subscription-feature.schema.js +24 -3
  154. package/build/models/subscription.schema.js +1 -0
  155. package/build/models/team-account/index.js +22 -0
  156. package/build/models/team-account/team-account-invite.schema.js +20 -0
  157. package/build/models/team-account/team-account-member.schema.js +17 -0
  158. package/build/models/team-account/team-account-operation.schema.js +12 -0
  159. package/build/models/team-account/team-account.schema.js +14 -0
  160. package/build/models/team-account/team-to-product.schema.js +21 -0
  161. package/build/models/team-account/team-to-subscription.schema.js +31 -0
  162. package/build/models/tools/image-editor/image-editor-job.schema.js +1 -0
  163. package/build/models/tools/image-editor/image-editor-model.schema.js +6 -0
  164. package/build/models/tools/image-generation/image-generation-model.schema.js +8 -5
  165. package/build/models/tools/index.js +3 -0
  166. package/build/models/tools/interior-design/index.js +19 -0
  167. package/build/models/tools/interior-design/interior-design-config.schema.js +23 -0
  168. package/build/models/tools/interior-design/interior-design-job.schema.js +27 -0
  169. package/build/models/tools/interior-design/interior-design-model.schema.js +34 -0
  170. package/build/models/tools/marketplace-card/index.js +18 -0
  171. package/build/models/tools/marketplace-card/marketplace-card-config.schema.js +30 -0
  172. package/build/models/tools/marketplace-card/marketplace-card-job.schema.js +24 -0
  173. package/build/models/tools/solving-edu-task/index.js +19 -0
  174. package/build/models/tools/solving-edu-task/solving-edu-task-config.schema.js +8 -0
  175. package/build/models/tools/solving-edu-task/solving-edu-task-job.schema.js +25 -0
  176. package/build/models/tools/solving-edu-task/solving-edu-task-model.schema.js +22 -0
  177. package/build/models/tools/video-editor/video-editor-job.schema.js +14 -1
  178. package/build/models/user-profile.schema.js +1 -0
  179. package/commands/b2b/get-b2b-documentation.command.ts +121 -0
  180. package/commands/b2b/index.ts +2 -0
  181. package/commands/b2b/send-text-request.command.ts +2 -5
  182. package/commands/b2b/upload-b2b-file.command.ts +14 -0
  183. package/commands/cabinet/get-user-statistics-by-month.command.ts +5 -1
  184. package/commands/chat/archive-all.command.ts +2 -4
  185. package/commands/chat/check-limit.command.ts +7 -0
  186. package/commands/chat/create-chat.command.ts +0 -1
  187. package/commands/chat/find-chats.command.ts +2 -5
  188. package/commands/chat/get-last-active-chat-command.ts +0 -1
  189. package/commands/index.ts +3 -0
  190. package/commands/message/create-text-message.command.ts +1 -0
  191. package/commands/page/find-pages-by-criteria.command.ts +50 -0
  192. package/commands/page/index.ts +1 -0
  193. package/commands/payment/find-payments-by-criteria.command.ts +63 -0
  194. package/commands/payment/index.ts +1 -0
  195. package/commands/product/buy-product.command.ts +27 -1
  196. package/commands/product/index.ts +1 -0
  197. package/commands/product/refund-product.command.ts +17 -0
  198. package/commands/subscription/buy-subscription.command.ts +26 -1
  199. package/commands/subscription/index.ts +1 -1
  200. package/commands/subscription/refund-subscription.command.ts +17 -0
  201. package/commands/subscription/upgrade-subscription.command.ts +27 -1
  202. package/commands/team-account/accept-team-account-invite.command.ts +16 -0
  203. package/commands/team-account/create-manual-team-product.command.ts +17 -0
  204. package/commands/team-account/create-manual-team-subscription.command.ts +18 -0
  205. package/commands/team-account/create-team-account.command.ts +18 -0
  206. package/commands/team-account/find-current-team-account-products.command.ts +10 -0
  207. package/commands/team-account/find-current-team-account-subscriptions.command.ts +10 -0
  208. package/commands/team-account/find-team-account-members.command.ts +10 -0
  209. package/commands/team-account/find-team-account-operations.command.ts +17 -0
  210. package/commands/team-account/find-team-account-products.command.ts +10 -0
  211. package/commands/team-account/find-team-account-subscriptions.command.ts +10 -0
  212. package/commands/team-account/find-team-accounts-by-name.command.ts +20 -0
  213. package/commands/team-account/get-my-team-account.command.ts +10 -0
  214. package/commands/team-account/get-team-account-balance.command.ts +14 -0
  215. package/commands/team-account/index.ts +17 -0
  216. package/commands/team-account/invite-team-account-member.command.ts +19 -0
  217. package/commands/team-account/refund-team-account-balance.command.ts +16 -0
  218. package/commands/team-account/remove-team-account-member.command.ts +17 -0
  219. package/commands/team-account/update-team-account-member.command.ts +25 -0
  220. package/commands/team-account/update-team-account.command.ts +24 -0
  221. package/commands/team-to-product/add-team-to-product.command.ts +18 -0
  222. package/commands/team-to-product/get-team-to-product-by-uuid.command.ts +16 -0
  223. package/commands/team-to-product/get-team-to-products.command.ts +16 -0
  224. package/commands/team-to-product/index.ts +4 -0
  225. package/commands/team-to-product/update-team-to-product.command.ts +26 -0
  226. package/commands/team-to-subscription/add-team-to-subscription.command.ts +22 -0
  227. package/commands/team-to-subscription/get-team-to-subscription-by-uuid.command.ts +16 -0
  228. package/commands/team-to-subscription/get-team-to-subscriptions.command.ts +16 -0
  229. package/commands/team-to-subscription/index.ts +4 -0
  230. package/commands/team-to-subscription/update-team-to-subscription.command.ts +36 -0
  231. package/commands/tools/image-editor/image-editor.command.ts +1 -0
  232. package/commands/tools/image-editor/retry-image-editor-job.command.ts +1 -0
  233. package/commands/tools/index.ts +3 -0
  234. package/commands/tools/interior-design/delete-all-interior-design-jobs.command.ts +6 -0
  235. package/commands/tools/interior-design/delete-interior-design-job-by-uuid.command.ts +11 -0
  236. package/commands/tools/interior-design/find-interior-design-job-by-uuid.command.ts +16 -0
  237. package/commands/tools/interior-design/find-interior-design-jobs.command.ts +18 -0
  238. package/commands/tools/interior-design/get-interior-design-tool-config.command.ts +10 -0
  239. package/commands/tools/interior-design/index.ts +9 -0
  240. package/commands/tools/interior-design/interior-design.command.ts +21 -0
  241. package/commands/tools/interior-design/retry-interior-design-job.command.ts +27 -0
  242. package/commands/tools/interior-design/set-reaction-to-interior-design-job.command.ts +33 -0
  243. package/commands/tools/interior-design/update-interior-design-job-title.command.ts +19 -0
  244. package/commands/tools/marketplace-card/delete-all-marketplace-card-jobs.command.ts +8 -0
  245. package/commands/tools/marketplace-card/delete-marketplace-card-by-uuid.command.ts +13 -0
  246. package/commands/tools/marketplace-card/execute-marketplace-card.command.ts +53 -0
  247. package/commands/tools/marketplace-card/find-marketplace-card-job-by-uuid.command.ts +16 -0
  248. package/commands/tools/marketplace-card/find-marketplace-card-jobs.command.ts +18 -0
  249. package/commands/tools/marketplace-card/get-marketplace-card-config.command.ts +9 -0
  250. package/commands/tools/marketplace-card/index.ts +9 -0
  251. package/commands/tools/marketplace-card/retry-marketplace-card-job.command.ts +57 -0
  252. package/commands/tools/marketplace-card/set-reaction-to-marketplace-card.command.ts +33 -0
  253. package/commands/tools/marketplace-card/update-marketplace-card-job-title.command.ts +19 -0
  254. package/commands/tools/solving-edu-task/delete-all-solving-edu-task-jobs.command.ts +8 -0
  255. package/commands/tools/solving-edu-task/delete-solving-edu-task-job-by-uuid.command.ts +13 -0
  256. package/commands/tools/solving-edu-task/find-solving-edu-task-job-by-uuid.command.ts +16 -0
  257. package/commands/tools/solving-edu-task/find-solving-edu-task-jobs.command.ts +18 -0
  258. package/commands/tools/solving-edu-task/get-solving-edu-task-tool-config.command.ts +9 -0
  259. package/commands/tools/solving-edu-task/index.ts +9 -0
  260. package/commands/tools/solving-edu-task/retry-solving-edu-task-job.command.ts +25 -0
  261. package/commands/tools/solving-edu-task/set-reaction-to-solving-edu-task-job.command.ts +33 -0
  262. package/commands/tools/solving-edu-task/solving-edu-task.command.ts +31 -0
  263. package/commands/tools/solving-edu-task/update-solving-edu-task-job-title.command.ts +19 -0
  264. package/commands/user/get-me.command.ts +2 -1
  265. package/commands/user/get-user-payments.command.ts +4 -2
  266. package/constants/ai-model/enums/index.ts +0 -1
  267. package/constants/billing/enums/billing-scope.enum.ts +4 -0
  268. package/constants/billing/enums/index.ts +1 -0
  269. package/constants/billing/index.ts +1 -0
  270. package/constants/cabinet/enums/index.ts +1 -0
  271. package/constants/cabinet/enums/statistics-metric-type.enum.ts +4 -0
  272. package/constants/index.ts +2 -1
  273. package/constants/model/enums/unified-model-content-type.enum.ts +2 -1
  274. package/constants/page/enums/index.ts +1 -0
  275. package/constants/page/enums/page-sort-by.enum.ts +4 -0
  276. package/constants/payment/enums/index.ts +1 -0
  277. package/constants/payment/enums/payment-provider.enum.ts +4 -0
  278. package/constants/product/enums/product-status.enum.ts +1 -0
  279. package/constants/subscription/enums/subscription-feature-type.enum.ts +5 -1
  280. package/constants/subscription/enums/subscription-status.enum.ts +1 -0
  281. package/constants/subscription/enums/user-to-subscription-marks.enum.ts +1 -0
  282. package/constants/team-account/enums/index.ts +4 -0
  283. package/constants/team-account/enums/team-account-invite-status.enum.ts +6 -0
  284. package/constants/team-account/enums/team-account-member-role.enum.ts +5 -0
  285. package/constants/team-account/enums/team-account-member-status.enum.ts +7 -0
  286. package/constants/team-account/enums/team-account-operation-type.enum.ts +6 -0
  287. package/constants/team-account/index.ts +1 -0
  288. package/constants/tool/enums/index.ts +0 -1
  289. package/constants/transaction/enums/user-balance-status.enum.ts +3 -0
  290. package/constants/ui-notification/enums/ui-notification-type.enum.ts +1 -0
  291. package/constants/user/enums/user-status.ts +1 -0
  292. package/helpers/index.ts +1 -0
  293. package/helpers/interior-design/calculate-interior-design-price.helper.ts +23 -0
  294. package/helpers/interior-design/index.ts +1 -0
  295. package/models/ai-model.schema.ts +3 -7
  296. package/models/b2b/b2b-completions-stream-chunk.schema.ts +10 -0
  297. package/models/b2b/b2b-file-upload-response.schema.ts +14 -0
  298. package/models/b2b/index.ts +2 -0
  299. package/models/chat.schema.ts +1 -1
  300. package/models/community/community-post-media-data.schema.ts +1 -0
  301. package/models/index.ts +3 -0
  302. package/models/json-value.schema.ts +23 -0
  303. package/models/message.schema.ts +1 -0
  304. package/models/payment.schema.ts +7 -2
  305. package/models/product.schema.ts +2 -0
  306. package/models/prompt.schema.ts +0 -2
  307. package/models/subscription-feature.schema.ts +32 -7
  308. package/models/subscription.schema.ts +7 -1
  309. package/models/team-account/index.ts +6 -0
  310. package/models/team-account/team-account-invite.schema.ts +18 -0
  311. package/models/team-account/team-account-member.schema.ts +15 -0
  312. package/models/team-account/team-account-operation.schema.ts +10 -0
  313. package/models/team-account/team-account.schema.ts +12 -0
  314. package/models/team-account/team-to-product.schema.ts +20 -0
  315. package/models/team-account/team-to-subscription.schema.ts +33 -0
  316. package/models/tools/image-editor/image-editor-job.schema.ts +1 -0
  317. package/models/tools/image-editor/image-editor-model.schema.ts +9 -0
  318. package/models/tools/image-generation/image-generation-model.schema.ts +8 -5
  319. package/models/tools/index.ts +3 -0
  320. package/models/tools/interior-design/index.ts +3 -0
  321. package/models/tools/interior-design/interior-design-config.schema.ts +29 -0
  322. package/models/tools/interior-design/interior-design-job.schema.ts +32 -0
  323. package/models/tools/interior-design/interior-design-model.schema.ts +45 -0
  324. package/models/tools/marketplace-card/index.ts +2 -0
  325. package/models/tools/marketplace-card/marketplace-card-config.schema.ts +33 -0
  326. package/models/tools/marketplace-card/marketplace-card-job.schema.ts +25 -0
  327. package/models/tools/solving-edu-task/index.ts +3 -0
  328. package/models/tools/solving-edu-task/solving-edu-task-config.schema.ts +8 -0
  329. package/models/tools/solving-edu-task/solving-edu-task-job.schema.ts +28 -0
  330. package/models/tools/solving-edu-task/solving-edu-task-model.schema.ts +25 -0
  331. package/models/tools/video-editor/video-editor-job.schema.ts +14 -1
  332. package/models/user-profile.schema.ts +1 -0
  333. package/package.json +1 -1
  334. package/build/commands/subscription/create-custom-subscription-plan.command.js +0 -24
  335. package/build/constants/ai-model/enums/ai-model-content-type.enum.js +0 -7
  336. package/build/constants/errors/errors.js +0 -4351
  337. package/build/constants/errors/verbose.js +0 -9
  338. package/build/constants/tool/enums/tool-type.enum.js +0 -12
  339. package/commands/subscription/create-custom-subscription-plan.command.ts +0 -26
  340. package/constants/ai-model/enums/ai-model-content-type.enum.ts +0 -7
  341. package/constants/errors/errors.ts +0 -4391
  342. package/constants/errors/index.ts +0 -2
  343. package/constants/errors/verbose.ts +0 -7
  344. package/constants/tool/enums/tool-type.enum.ts +0 -8
@@ -0,0 +1,22 @@
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("./team-account.schema"), exports);
18
+ __exportStar(require("./team-account-member.schema"), exports);
19
+ __exportStar(require("./team-account-invite.schema"), exports);
20
+ __exportStar(require("./team-account-operation.schema"), exports);
21
+ __exportStar(require("./team-to-subscription.schema"), exports);
22
+ __exportStar(require("./team-to-product.schema"), exports);
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamAccountInviteSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.TeamAccountInviteSchema = zod_1.z.object({
6
+ uuid: zod_1.z.string().uuid(),
7
+ teamAccountId: zod_1.z.string().uuid(),
8
+ email: zod_1.z.string().email(),
9
+ invitedByUserId: zod_1.z.string().uuid(),
10
+ acceptedByUserId: zod_1.z.string().uuid().nullable(),
11
+ tokenHash: zod_1.z.string(),
12
+ role: zod_1.z.string(),
13
+ tokenLimit: zod_1.z.number().int().nullable(),
14
+ status: zod_1.z.string(),
15
+ expiresAt: zod_1.z.date(),
16
+ acceptedAt: zod_1.z.date().nullable(),
17
+ revokedAt: zod_1.z.date().nullable(),
18
+ createdAt: zod_1.z.date(),
19
+ updatedAt: zod_1.z.date(),
20
+ });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamAccountMemberSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.TeamAccountMemberSchema = zod_1.z.object({
6
+ uuid: zod_1.z.string().uuid(),
7
+ teamAccountId: zod_1.z.string().uuid(),
8
+ userId: zod_1.z.string().uuid(),
9
+ role: zod_1.z.string(),
10
+ status: zod_1.z.string(),
11
+ tokenLimit: zod_1.z.number().int().nullable(),
12
+ spentTokens: zod_1.z.number().int(),
13
+ joinedAt: zod_1.z.date(),
14
+ leftAt: zod_1.z.date().nullable(),
15
+ createdAt: zod_1.z.date(),
16
+ updatedAt: zod_1.z.date(),
17
+ });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamAccountOperationSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.TeamAccountOperationSchema = zod_1.z.object({
6
+ uuid: zod_1.z.string().uuid(),
7
+ teamAccountId: zod_1.z.string().uuid(),
8
+ initiatorUserId: zod_1.z.string().uuid().nullable(),
9
+ type: zod_1.z.string(),
10
+ amount: zod_1.z.number().int(),
11
+ createdAt: zod_1.z.date(),
12
+ });
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamAccountSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.TeamAccountSchema = zod_1.z.object({
6
+ uuid: zod_1.z.string().uuid(),
7
+ ownerUserId: zod_1.z.string().uuid(),
8
+ name: zod_1.z.string(),
9
+ email: zod_1.z.string().email(),
10
+ logoUrl: zod_1.z.string().nullable(),
11
+ isActive: zod_1.z.boolean(),
12
+ createdAt: zod_1.z.date(),
13
+ updatedAt: zod_1.z.date(),
14
+ });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamToProductWithProductSchema = exports.TeamToProductSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const product_schema_1 = require("../product.schema");
7
+ exports.TeamToProductSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ teamAccountId: zod_1.z.string().uuid(),
10
+ productId: zod_1.z.string().uuid(),
11
+ initTokenBalance: zod_1.z.number(),
12
+ tokenBalance: zod_1.z.number(),
13
+ status: zod_1.z.nativeEnum(constants_1.PRODUCT_STATUS),
14
+ expiresAt: zod_1.z.date().nullable(),
15
+ orderId: zod_1.z.string().uuid().nullable(),
16
+ createdAt: zod_1.z.date(),
17
+ updatedAt: zod_1.z.date(),
18
+ });
19
+ exports.TeamToProductWithProductSchema = exports.TeamToProductSchema.extend({
20
+ product: product_schema_1.ProductSchema,
21
+ });
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamToSubscriptionWithSubscriptionSchema = exports.TeamToSubscriptionSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const subscription_schema_1 = require("../subscription.schema");
7
+ exports.TeamToSubscriptionSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ teamAccountId: zod_1.z.string().uuid(),
10
+ subscriptionId: zod_1.z.string().uuid(),
11
+ cloudPaymentsSubscriptionId: zod_1.z.string().nullable(),
12
+ zenpaymentsInvoiceNumber: zod_1.z.string().nullable(),
13
+ initTokenBalance: zod_1.z.number(),
14
+ tokenBalance: zod_1.z.number(),
15
+ initCarriedOverTokenBalance: zod_1.z.number(),
16
+ carriedOverTokenBalance: zod_1.z.number(),
17
+ startDate: zod_1.z.date().nullable(),
18
+ endDate: zod_1.z.date().nullable(),
19
+ status: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_STATUS),
20
+ active: zod_1.z.boolean(),
21
+ type: zod_1.z.nativeEnum(constants_1.USER_TO_SUBSCRIPTION_TYPE),
22
+ intervalEndDate: zod_1.z.date().nullable(),
23
+ marks: zod_1.z.array(zod_1.z.string()),
24
+ downgradedFromTeamSubscriptionId: zod_1.z.string().uuid().nullable(),
25
+ orderId: zod_1.z.string().uuid().nullable(),
26
+ createdAt: zod_1.z.date(),
27
+ updatedAt: zod_1.z.date(),
28
+ });
29
+ exports.TeamToSubscriptionWithSubscriptionSchema = zod_1.z.intersection(exports.TeamToSubscriptionSchema, zod_1.z.object({
30
+ subscription: subscription_schema_1.SubscriptionSchema,
31
+ }));
@@ -10,6 +10,7 @@ exports.ImageEditorJobParamsSchema = zod_1.z.object({
10
10
  attachedFiles: zod_1.z.array(common_1.AttachedToolFileSchema),
11
11
  systemPromptId: zod_1.z.string().optional(),
12
12
  imageUrls: zod_1.z.string().array().optional(),
13
+ aspectRatio: zod_1.z.string().optional(),
13
14
  });
14
15
  exports.ImageEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
15
16
  title: zod_1.z.string(),
@@ -10,6 +10,12 @@ exports.ImageEditorModelParamsSchema = zod_1.z.object({
10
10
  maxImages: zod_1.z.number(),
11
11
  acceptedTypes: zod_1.z.array(zod_1.z.string()),
12
12
  }),
13
+ aspectRatio: zod_1.z
14
+ .record(zod_1.z.string(), zod_1.z.object({
15
+ width: zod_1.z.number(),
16
+ height: zod_1.z.number(),
17
+ }))
18
+ .optional(),
13
19
  });
14
20
  exports.ImageEditorModelPricingRuleConditionSchema = zod_1.z.object({
15
21
  withoutSub: zod_1.z.boolean().optional(),
@@ -5,11 +5,14 @@ const zod_1 = require("zod");
5
5
  const constants_1 = require("../../../constants");
6
6
  const unlocked_by_subscription_schema_1 = require("../../unlocked-by-subscription.schema");
7
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(),
8
+ aspectRatio: zod_1.z.record(zod_1.z.string(), zod_1.z.union([
9
+ zod_1.z.object({
10
+ width: zod_1.z.number(),
11
+ height: zod_1.z.number(),
12
+ }),
13
+ zod_1.z.string(),
14
+ ])),
15
+ quality: zod_1.z.union([zod_1.z.string(), zod_1.z.record(zod_1.z.string())]).optional(),
13
16
  resolution: zod_1.z
14
17
  .object({
15
18
  options: zod_1.z.array(zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION)),
@@ -26,3 +26,6 @@ __exportStar(require("./image-editor"), exports);
26
26
  __exportStar(require("./video-editor"), exports);
27
27
  __exportStar(require("./music"), exports);
28
28
  __exportStar(require("./image-generation"), exports);
29
+ __exportStar(require("./marketplace-card"), exports);
30
+ __exportStar(require("./interior-design"), exports);
31
+ __exportStar(require("./solving-edu-task"), exports);
@@ -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("./interior-design-config.schema"), exports);
18
+ __exportStar(require("./interior-design-job.schema"), exports);
19
+ __exportStar(require("./interior-design-model.schema"), exports);
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InteriorDesignConfigSchema = exports.InteriorDesignRoomTypesSchema = exports.InteriorDesignStylesSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const interior_design_model_schema_1 = require("./interior-design-model.schema");
6
+ exports.InteriorDesignStylesSchema = zod_1.z.object({
7
+ uuid: zod_1.z.string(),
8
+ title: zod_1.z.string(),
9
+ prompt: zod_1.z.string(),
10
+ sample: zod_1.z.string(),
11
+ order: zod_1.z.number(),
12
+ });
13
+ exports.InteriorDesignRoomTypesSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string(),
15
+ title: zod_1.z.string(),
16
+ prompt: zod_1.z.string(),
17
+ order: zod_1.z.number(),
18
+ });
19
+ exports.InteriorDesignConfigSchema = zod_1.z.object({
20
+ models: zod_1.z.array(interior_design_model_schema_1.InteriorDesignModelSchema),
21
+ styles: zod_1.z.array(exports.InteriorDesignStylesSchema),
22
+ roomTypes: zod_1.z.array(exports.InteriorDesignRoomTypesSchema),
23
+ });
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InteriorDesignJobSchema = exports.InteriorDesignJobParamsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../../constants");
6
+ const tool_job_schema_1 = require("../../tool-job.schema");
7
+ const file_schema_1 = require("../../file.schema");
8
+ const common_1 = require("../common");
9
+ exports.InteriorDesignJobParamsSchema = zod_1.z.object({
10
+ attachedFiles: zod_1.z.array(common_1.AttachedToolFileSchema),
11
+ styleId: zod_1.z.string().optional(),
12
+ roomTypeId: zod_1.z.string().optional(),
13
+ });
14
+ exports.InteriorDesignJobSchema = tool_job_schema_1.ToolJobSchema.extend({
15
+ title: zod_1.z.string(),
16
+ prompt: zod_1.z.string(),
17
+ reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).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(),
25
+ params: exports.InteriorDesignJobParamsSchema,
26
+ modelId: zod_1.z.string(),
27
+ });
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InteriorDesignModelSchema = exports.InteriorDesignModelPricingRulesSchema = exports.InteriorDesignModelPricingRuleConditionSchema = exports.InteriorDesignModelParamsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const icon_variants_schema_1 = require("../../icon-variants.schema");
6
+ const unlocked_by_subscription_schema_1 = require("../../unlocked-by-subscription.schema");
7
+ exports.InteriorDesignModelParamsSchema = zod_1.z.object({
8
+ imageAttachment: zod_1.z.object({
9
+ supported: zod_1.z.boolean(),
10
+ maxImages: zod_1.z.number(),
11
+ acceptedTypes: zod_1.z.array(zod_1.z.string()),
12
+ }),
13
+ });
14
+ exports.InteriorDesignModelPricingRuleConditionSchema = zod_1.z.object({
15
+ withoutSub: zod_1.z.boolean().optional(),
16
+ });
17
+ exports.InteriorDesignModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
18
+ condition: exports.InteriorDesignModelPricingRuleConditionSchema,
19
+ value: zod_1.z.number(),
20
+ }));
21
+ exports.InteriorDesignModelSchema = zod_1.z.object({
22
+ uuid: zod_1.z.string(),
23
+ title: zod_1.z.string(),
24
+ description: zod_1.z.string(),
25
+ price: zod_1.z.number(),
26
+ status: zod_1.z.string(),
27
+ order: zod_1.z.number(),
28
+ icons: icon_variants_schema_1.IconVariantsSchema,
29
+ maxPromptLength: zod_1.z.number(),
30
+ params: exports.InteriorDesignModelParamsSchema,
31
+ pricingRules: exports.InteriorDesignModelPricingRulesSchema,
32
+ unlockedBy: unlocked_by_subscription_schema_1.UnlockedBySchema.nullable(),
33
+ canUse: zod_1.z.boolean(),
34
+ });
@@ -0,0 +1,18 @@
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("./marketplace-card-config.schema"), exports);
18
+ __exportStar(require("./marketplace-card-job.schema"), exports);
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MarketplaceCardConfigSchema = exports.MarketplaceCardModelSchema = exports.MarketplaceCardStylePresetSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const icon_variants_schema_1 = require("../../icon-variants.schema");
6
+ exports.MarketplaceCardStylePresetSchema = zod_1.z.object({
7
+ uuid: zod_1.z.string().uuid(),
8
+ previewImageUrl: zod_1.z.string(),
9
+ order: zod_1.z.number(),
10
+ isActive: zod_1.z.boolean(),
11
+ });
12
+ exports.MarketplaceCardModelSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ price: zod_1.z.number(),
15
+ params: zod_1.z.object({
16
+ imageAttachment: zod_1.z.object({
17
+ supported: zod_1.z.boolean(),
18
+ maxImages: zod_1.z.number(),
19
+ acceptedTypes: zod_1.z.array(zod_1.z.string()),
20
+ }),
21
+ }),
22
+ iconVariants: icon_variants_schema_1.IconVariantsSchema,
23
+ maxPromptLength: zod_1.z.number(),
24
+ supportsImageAttachment: zod_1.z.boolean(),
25
+ maxAttachedImages: zod_1.z.number(),
26
+ });
27
+ exports.MarketplaceCardConfigSchema = zod_1.z.object({
28
+ styles: zod_1.z.array(exports.MarketplaceCardStylePresetSchema),
29
+ models: zod_1.z.array(exports.MarketplaceCardModelSchema),
30
+ });
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MarketplaceCardJobSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../../constants");
6
+ const tool_job_schema_1 = require("../../tool-job.schema");
7
+ exports.MarketplaceCardJobSchema = tool_job_schema_1.ToolJobSchema.extend({
8
+ uuid: zod_1.z.string().uuid(),
9
+ title: zod_1.z.string(),
10
+ subtitle: zod_1.z.string().nullable(),
11
+ reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
12
+ stylePresetId: zod_1.z.string().uuid().nullable(),
13
+ advantages: zod_1.z.array(zod_1.z.string()),
14
+ tags: zod_1.z.array(zod_1.z.string()),
15
+ isCustom: zod_1.z.boolean(),
16
+ customStylePrompt: zod_1.z.string().nullable(),
17
+ inputImages: zod_1.z.array(zod_1.z.object({
18
+ uuid: zod_1.z.string().uuid(),
19
+ url: zod_1.z.string(),
20
+ })),
21
+ resultImages: zod_1.z.array(zod_1.z.string()).nullable(),
22
+ backgroundDescription: zod_1.z.string().nullable(),
23
+ price: zod_1.z.number(),
24
+ });
@@ -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("./solving-edu-task-config.schema"), exports);
18
+ __exportStar(require("./solving-edu-task-job.schema"), exports);
19
+ __exportStar(require("./solving-edu-task-model.schema"), exports);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SolvingEduTaskConfigSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const solving_edu_task_model_schema_1 = require("./solving-edu-task-model.schema");
6
+ exports.SolvingEduTaskConfigSchema = zod_1.z.object({
7
+ models: zod_1.z.array(solving_edu_task_model_schema_1.SolvingEduTaskModelSchema),
8
+ });
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SolvingEduTaskJobSchema = exports.SolvingEduTaskJobParamsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../../constants");
6
+ const common_1 = require("../common");
7
+ const constants_2 = require("../../../constants");
8
+ exports.SolvingEduTaskJobParamsSchema = zod_1.z.object({
9
+ attachedFiles: zod_1.z.array(common_1.AttachedToolFileSchema),
10
+ });
11
+ exports.SolvingEduTaskJobSchema = zod_1.z.object({
12
+ uuid: zod_1.z.string().uuid(),
13
+ prompt: zod_1.z.string(),
14
+ aiOutput: zod_1.z.string().nullable().optional(),
15
+ reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
16
+ title: zod_1.z.string(),
17
+ status: zod_1.z.nativeEnum(constants_2.TOOL_JOB_STATUS),
18
+ modelId: zod_1.z.string(),
19
+ price: zod_1.z.number(),
20
+ params: exports.SolvingEduTaskJobParamsSchema,
21
+ error: zod_1.z.string().nullable(),
22
+ userId: zod_1.z.string().nullable().optional(),
23
+ createdAt: zod_1.z.date(),
24
+ updatedAt: zod_1.z.date(),
25
+ });
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SolvingEduTaskModelSchema = exports.SolvingEduTaskModelParamsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../../constants");
6
+ exports.SolvingEduTaskModelParamsSchema = zod_1.z.object({
7
+ imageAttachment: zod_1.z.object({
8
+ supported: zod_1.z.boolean(),
9
+ maxImages: zod_1.z.number(),
10
+ acceptedTypes: zod_1.z.array(zod_1.z.string()),
11
+ }),
12
+ });
13
+ exports.SolvingEduTaskModelSchema = zod_1.z.object({
14
+ uuid: zod_1.z.string(),
15
+ title: zod_1.z.string(),
16
+ description: zod_1.z.string(),
17
+ price: zod_1.z.number(),
18
+ order: zod_1.z.number(),
19
+ status: zod_1.z.nativeEnum(constants_1.TOOL_MODEL_STATUS),
20
+ maxPromptLength: zod_1.z.number(),
21
+ params: exports.SolvingEduTaskModelParamsSchema,
22
+ });
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VideoEditorJobSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const tool_job_schema_1 = require("../../tool-job.schema");
6
5
  const constants_1 = require("../../../constants");
6
+ const tool_job_schema_1 = require("../../tool-job.schema");
7
7
  exports.VideoEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
8
8
  title: zod_1.z.string(),
9
9
  prompt: zod_1.z.string(),
@@ -11,7 +11,20 @@ exports.VideoEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
11
11
  inputVideoId: zod_1.z.string().nullable(),
12
12
  inputVideoUrl: zod_1.z.string(),
13
13
  outputVideoUrl: zod_1.z.string().nullable(),
14
+ video: zod_1.z
15
+ .object({
16
+ uuid: zod_1.z.string(),
17
+ url: zod_1.z.string(),
18
+ })
19
+ .nullable(),
20
+ preview: zod_1.z
21
+ .object({
22
+ uuid: zod_1.z.string(),
23
+ url: zod_1.z.string(),
24
+ })
25
+ .nullable(),
14
26
  modelId: zod_1.z.string(),
15
27
  isPublished: zod_1.z.boolean(),
16
28
  postId: zod_1.z.string().nullable(),
29
+ thumbnail: zod_1.z.string().nullable(),
17
30
  });
@@ -7,6 +7,7 @@ exports.UserProfileSchema = zod_1.z.object({
7
7
  name: zod_1.z.string().nullable(),
8
8
  avatarUrl: zod_1.z.string().url().nullable(),
9
9
  avatarKey: zod_1.z.string().nullable(),
10
+ isPremium: zod_1.z.boolean(),
10
11
  createdAt: zod_1.z.date(),
11
12
  updatedAt: zod_1.z.date(),
12
13
  });
@@ -0,0 +1,121 @@
1
+ import { z } from 'zod';
2
+ import { AI_MODEL_FEATURE } from '../../constants';
3
+ import {
4
+ AiModelSchema,
5
+ IconVariantsSchema,
6
+ ImageGenerationModelSchema,
7
+ JsonObjectSchema,
8
+ JsonValueSchema,
9
+ } from '../../models';
10
+
11
+ export namespace GetB2bDocumentationCommand {
12
+ export const HttpMethodSchema = z.enum(['GET', 'POST', 'PATCH', 'DELETE']);
13
+ export type HttpMethod = z.infer<typeof HttpMethodSchema>;
14
+
15
+ export const AuthTypeSchema = z.enum(['jwt', 'apiKey', 'none']);
16
+ export type AuthType = z.infer<typeof AuthTypeSchema>;
17
+
18
+ export const HeaderSchema = z.object({
19
+ name: z.string(),
20
+ required: z.boolean(),
21
+ description: z.string().optional(),
22
+ });
23
+
24
+ export const EndpointParamSchema = z.object({
25
+ name: z.string(),
26
+ required: z.boolean(),
27
+ schemaRef: z.string(),
28
+ });
29
+
30
+ export const EndpointBodySchema = z.object({
31
+ schemaRef: z.string(),
32
+ contentType: z.string().optional(),
33
+ });
34
+
35
+ export const EndpointExampleSchema = z.object({
36
+ title: z.string(),
37
+ curl: z.string().optional(),
38
+ curlTemplate: z.string().optional(),
39
+ variables: z
40
+ .array(
41
+ z.object({
42
+ name: z.string(),
43
+ description: z.string().optional(),
44
+ }),
45
+ )
46
+ .optional(),
47
+ request: JsonValueSchema.optional(),
48
+ response: JsonValueSchema.optional(),
49
+ });
50
+
51
+ export const EndpointSchema = z.object({
52
+ id: z.string(),
53
+ title: z.string(),
54
+ description: z.string().optional(),
55
+ method: HttpMethodSchema,
56
+ path: z.string(),
57
+ auth: AuthTypeSchema,
58
+ headers: z.array(HeaderSchema).optional(),
59
+ pathParams: z.array(EndpointParamSchema).optional(),
60
+ requestBody: EndpointBodySchema.optional(),
61
+ responseBody: EndpointBodySchema.optional(),
62
+ notes: z.array(z.string()).optional(),
63
+ examples: z.array(EndpointExampleSchema).optional(),
64
+ });
65
+
66
+ export const ErrorSchema = z.object({
67
+ id: z.string(),
68
+ httpStatus: z.number().int().optional(),
69
+ message: z.string(),
70
+ description: z.string().optional(),
71
+ relatedEndpoints: z.array(z.string()).optional(),
72
+ });
73
+
74
+ export const JsonSchemaSchema = z.object({
75
+ id: z.string(),
76
+ title: z.string().optional(),
77
+ jsonSchema: JsonObjectSchema,
78
+ });
79
+
80
+ export const SectionSchema = z.object({
81
+ id: z.string(),
82
+ title: z.string(),
83
+ body: z.string(),
84
+ });
85
+
86
+ const B2bDocTextModelSchema = AiModelSchema.omit({
87
+ createdAt: true,
88
+ updatedAt: true,
89
+ }).extend({
90
+ createdAt: z.string(),
91
+ updatedAt: z.string(),
92
+ aiModel: z.string(),
93
+ });
94
+
95
+ const B2bDocImageModelSchema = ImageGenerationModelSchema.extend({
96
+ aiModel: z.string(),
97
+ iconVariants: IconVariantsSchema,
98
+ });
99
+
100
+ export const ReferencesSchema = z
101
+ .object({
102
+ textModels: z.array(B2bDocTextModelSchema).optional(),
103
+ imageModels: z.array(B2bDocImageModelSchema).optional(),
104
+ features: z.array(z.nativeEnum(AI_MODEL_FEATURE)).optional(),
105
+ supportedFileMimeTypes: z.array(z.string()).optional(),
106
+ })
107
+ .partial()
108
+ .optional();
109
+
110
+ export const ResponseSchema = z.object({
111
+ data: z.object({
112
+ endpoints: z.array(EndpointSchema),
113
+ errors: z.array(ErrorSchema),
114
+ schemas: z.array(JsonSchemaSchema),
115
+ extraSections: z.array(SectionSchema),
116
+ references: ReferencesSchema,
117
+ }),
118
+ });
119
+
120
+ export type Response = z.infer<typeof ResponseSchema>;
121
+ }
@@ -4,3 +4,5 @@ export * from './send-text-request.command';
4
4
  export * from './send-image-request.command';
5
5
  export * from './submit-balance-top-up-form.command';
6
6
  export * from './find-b2b-image-generation-job-by-uuid.command';
7
+ export * from './get-b2b-documentation.command';
8
+ export * from './upload-b2b-file.command';
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { AI_MODEL_FEATURE } from '../../constants';
3
+ import { B2bCompletionsStreamChunkSchema } from '../../models';
3
4
 
4
5
  export namespace SendTextRequestCommand {
5
6
  export const BodySchema = z.object({
@@ -13,11 +14,7 @@ export namespace SendTextRequestCommand {
13
14
  'x-rugpt-key': z.string(),
14
15
  });
15
16
 
16
- export const ResponseSchema = z.object({
17
- data: z.object({
18
- text: z.string(),
19
- }),
20
- });
17
+ export const ResponseSchema = B2bCompletionsStreamChunkSchema;
21
18
 
22
19
  // ✅ Types
23
20
  export type Body = z.infer<typeof BodySchema>;