@lyxa.ai/marketing 1.0.47 → 1.0.48

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 (329) hide show
  1. package/dist/lib/event/event-initializations.d.ts.map +1 -1
  2. package/dist/lib/event/event-initializations.js +2 -0
  3. package/dist/lib/event/event-initializations.js.map +1 -1
  4. package/dist/lib/index.d.ts +1346 -7
  5. package/dist/lib/index.d.ts.map +1 -1
  6. package/dist/lib/index.js +3 -1
  7. package/dist/lib/index.js.map +1 -1
  8. package/dist/lib/modules/coupon/routers/coupon.router.d.ts +4 -0
  9. package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
  10. package/dist/lib/modules/coupon/services/coupon.service.js +1 -1
  11. package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
  12. package/dist/lib/modules/coupon/services/custom-coupon.service.d.ts +2 -0
  13. package/dist/lib/modules/coupon/services/custom-coupon.service.d.ts.map +1 -1
  14. package/dist/lib/modules/coupon/services/custom-coupon.service.js +1 -1
  15. package/dist/lib/modules/coupon/services/custom-coupon.service.js.map +1 -1
  16. package/dist/lib/modules/coupon/services/global-coupon.service.d.ts +1 -1
  17. package/dist/lib/modules/coupon/services/global-coupon.service.d.ts.map +1 -1
  18. package/dist/lib/modules/coupon/services/global-coupon.service.js +16 -10
  19. package/dist/lib/modules/coupon/services/global-coupon.service.js.map +1 -1
  20. package/dist/lib/modules/coupon/services/helper.service.d.ts +2 -1
  21. package/dist/lib/modules/coupon/services/helper.service.d.ts.map +1 -1
  22. package/dist/lib/modules/coupon/services/helper.service.js +7 -1
  23. package/dist/lib/modules/coupon/services/helper.service.js.map +1 -1
  24. package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts +2 -0
  25. package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
  26. package/dist/lib/modules/coupon/services/individual-store-coupon.service.js +2 -2
  27. package/dist/lib/modules/coupon/services/individual-store-coupon.service.js.map +1 -1
  28. package/dist/lib/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
  29. package/dist/lib/modules/coupon/services/individual-user-coupon.service.js +6 -0
  30. package/dist/lib/modules/coupon/services/individual-user-coupon.service.js.map +1 -1
  31. package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
  32. package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js +20 -1
  33. package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js.map +1 -1
  34. package/dist/lib/modules/coupon/services/referral-code-coupon.service.d.ts.map +1 -1
  35. package/dist/lib/modules/coupon/services/referral-code-coupon.service.js +1 -1
  36. package/dist/lib/modules/coupon/services/referral-code-coupon.service.js.map +1 -1
  37. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.d.ts +1 -1
  38. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
  39. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js +21 -15
  40. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js.map +1 -1
  41. package/dist/lib/modules/coupon/services/shops-categories-coupon.service.d.ts +2 -0
  42. package/dist/lib/modules/coupon/services/shops-categories-coupon.service.d.ts.map +1 -1
  43. package/dist/lib/modules/coupon/services/shops-categories-coupon.service.js +2 -2
  44. package/dist/lib/modules/coupon/services/shops-categories-coupon.service.js.map +1 -1
  45. package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +13 -0
  46. package/dist/lib/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
  47. package/dist/lib/modules/coupon/validations/coupon.validation.js +1 -0
  48. package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
  49. package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts +6 -6
  50. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +6 -6
  51. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +30 -30
  52. package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
  53. package/dist/lib/modules/marketing/services/marketing.service.js +8 -2
  54. package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
  55. package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.d.ts +2 -0
  56. package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
  57. package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js +14 -0
  58. package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js.map +1 -1
  59. package/dist/lib/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +18 -18
  60. package/dist/lib/modules/marketing/validations/discount-marketing.validation.d.ts +30 -30
  61. package/dist/lib/modules/marketing/validations/featured-marketing.validation.d.ts +6 -6
  62. package/dist/lib/modules/marketing/validations/free-delivery-marketing.validation.d.ts +4 -4
  63. package/dist/lib/modules/marketing/validations/marketing.validation.d.ts +2 -2
  64. package/dist/lib/modules/marketing/validations/product-marketing.validation.d.ts +5 -5
  65. package/dist/lib/modules/marketing/validations/punch-marketing.validation.d.ts +4 -4
  66. package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
  67. package/dist/lib/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
  68. package/dist/lib/modules/tournament/config/config.builder.d.ts +5 -0
  69. package/dist/lib/modules/tournament/config/config.builder.d.ts.map +1 -0
  70. package/dist/lib/modules/tournament/config/config.builder.js +19 -0
  71. package/dist/lib/modules/tournament/config/config.builder.js.map +1 -0
  72. package/dist/lib/modules/tournament/config/config.repository.d.ts +13 -0
  73. package/dist/lib/modules/tournament/config/config.repository.d.ts.map +1 -0
  74. package/dist/lib/modules/tournament/config/config.repository.js +77 -0
  75. package/dist/lib/modules/tournament/config/config.repository.js.map +1 -0
  76. package/dist/lib/modules/tournament/config/config.router.d.ts +363 -0
  77. package/dist/lib/modules/tournament/config/config.router.d.ts.map +1 -0
  78. package/dist/lib/modules/tournament/config/config.router.js +40 -0
  79. package/dist/lib/modules/tournament/config/config.router.js.map +1 -0
  80. package/dist/lib/modules/tournament/config/config.service.d.ts +14 -0
  81. package/dist/lib/modules/tournament/config/config.service.d.ts.map +1 -0
  82. package/dist/lib/modules/tournament/config/config.service.js +101 -0
  83. package/dist/lib/modules/tournament/config/config.service.js.map +1 -0
  84. package/dist/lib/modules/tournament/config/config.validation.d.ts +1014 -0
  85. package/dist/lib/modules/tournament/config/config.validation.d.ts.map +1 -0
  86. package/dist/lib/modules/tournament/config/config.validation.js +70 -0
  87. package/dist/lib/modules/tournament/config/config.validation.js.map +1 -0
  88. package/dist/lib/modules/tournament/match/events/match-ended.consumer.d.ts +2 -0
  89. package/dist/lib/modules/tournament/match/events/match-ended.consumer.d.ts.map +1 -0
  90. package/dist/lib/modules/tournament/match/events/match-ended.consumer.js +15 -0
  91. package/dist/lib/modules/tournament/match/events/match-ended.consumer.js.map +1 -0
  92. package/dist/lib/modules/tournament/match/events/match-ended.event.d.ts +14 -0
  93. package/dist/lib/modules/tournament/match/events/match-ended.event.d.ts.map +1 -0
  94. package/dist/lib/modules/tournament/match/events/match-ended.event.js +12 -0
  95. package/dist/lib/modules/tournament/match/events/match-ended.event.js.map +1 -0
  96. package/dist/lib/modules/tournament/match/match.builder.d.ts +38 -0
  97. package/dist/lib/modules/tournament/match/match.builder.d.ts.map +1 -0
  98. package/dist/lib/modules/tournament/match/match.builder.js +37 -0
  99. package/dist/lib/modules/tournament/match/match.builder.js.map +1 -0
  100. package/dist/lib/modules/tournament/match/match.repository.d.ts +13 -0
  101. package/dist/lib/modules/tournament/match/match.repository.d.ts.map +1 -0
  102. package/dist/lib/modules/tournament/match/match.repository.js +84 -0
  103. package/dist/lib/modules/tournament/match/match.repository.js.map +1 -0
  104. package/dist/lib/modules/tournament/match/match.router.d.ts +489 -0
  105. package/dist/lib/modules/tournament/match/match.router.d.ts.map +1 -0
  106. package/dist/lib/modules/tournament/match/match.router.js +56 -0
  107. package/dist/lib/modules/tournament/match/match.router.js.map +1 -0
  108. package/dist/lib/modules/tournament/match/match.service.d.ts +29 -0
  109. package/dist/lib/modules/tournament/match/match.service.d.ts.map +1 -0
  110. package/dist/lib/modules/tournament/match/match.service.js +193 -0
  111. package/dist/lib/modules/tournament/match/match.service.js.map +1 -0
  112. package/dist/lib/modules/tournament/match/match.validation.d.ts +880 -0
  113. package/dist/lib/modules/tournament/match/match.validation.d.ts.map +1 -0
  114. package/dist/lib/modules/tournament/match/match.validation.js +74 -0
  115. package/dist/lib/modules/tournament/match/match.validation.js.map +1 -0
  116. package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts +13 -0
  117. package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts.map +1 -0
  118. package/dist/lib/modules/tournament/notification/jobs/notification.producer.js +28 -0
  119. package/dist/lib/modules/tournament/notification/jobs/notification.producer.js.map +1 -0
  120. package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts +7 -0
  121. package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts.map +1 -0
  122. package/dist/lib/modules/tournament/notification/jobs/notification.worker.js +76 -0
  123. package/dist/lib/modules/tournament/notification/jobs/notification.worker.js.map +1 -0
  124. package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts +10 -0
  125. package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts.map +1 -0
  126. package/dist/lib/modules/tournament/notification/notification.scheduler.service.js +86 -0
  127. package/dist/lib/modules/tournament/notification/notification.scheduler.service.js.map +1 -0
  128. package/dist/lib/modules/tournament/notification/notification.service.d.ts +11 -0
  129. package/dist/lib/modules/tournament/notification/notification.service.d.ts.map +1 -0
  130. package/dist/lib/modules/tournament/notification/notification.service.js +101 -0
  131. package/dist/lib/modules/tournament/notification/notification.service.js.map +1 -0
  132. package/dist/lib/modules/tournament/participant/participant.repository.d.ts +12 -0
  133. package/dist/lib/modules/tournament/participant/participant.repository.d.ts.map +1 -0
  134. package/dist/lib/modules/tournament/participant/participant.repository.js +73 -0
  135. package/dist/lib/modules/tournament/participant/participant.repository.js.map +1 -0
  136. package/dist/lib/modules/tournament/participant/participant.router.d.ts +104 -0
  137. package/dist/lib/modules/tournament/participant/participant.router.d.ts.map +1 -0
  138. package/dist/lib/modules/tournament/participant/participant.router.js +28 -0
  139. package/dist/lib/modules/tournament/participant/participant.router.js.map +1 -0
  140. package/dist/lib/modules/tournament/participant/participant.service.d.ts +14 -0
  141. package/dist/lib/modules/tournament/participant/participant.service.d.ts.map +1 -0
  142. package/dist/lib/modules/tournament/participant/participant.service.js +103 -0
  143. package/dist/lib/modules/tournament/participant/participant.service.js.map +1 -0
  144. package/dist/lib/modules/tournament/participant/participant.validation.d.ts +719 -0
  145. package/dist/lib/modules/tournament/participant/participant.validation.d.ts.map +1 -0
  146. package/dist/lib/modules/tournament/participant/participant.validation.js +44 -0
  147. package/dist/lib/modules/tournament/participant/participant.validation.js.map +1 -0
  148. package/dist/lib/modules/tournament/prediction/prediction.builder.d.ts +14 -0
  149. package/dist/lib/modules/tournament/prediction/prediction.builder.d.ts.map +1 -0
  150. package/dist/lib/modules/tournament/prediction/prediction.builder.js +23 -0
  151. package/dist/lib/modules/tournament/prediction/prediction.builder.js.map +1 -0
  152. package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts +11 -0
  153. package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts.map +1 -0
  154. package/dist/lib/modules/tournament/prediction/prediction.repository.js +73 -0
  155. package/dist/lib/modules/tournament/prediction/prediction.repository.js.map +1 -0
  156. package/dist/lib/modules/tournament/prediction/prediction.router.d.ts +133 -0
  157. package/dist/lib/modules/tournament/prediction/prediction.router.d.ts.map +1 -0
  158. package/dist/lib/modules/tournament/prediction/prediction.router.js +36 -0
  159. package/dist/lib/modules/tournament/prediction/prediction.router.js.map +1 -0
  160. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts +17 -0
  161. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts.map +1 -0
  162. package/dist/lib/modules/tournament/prediction/prediction.service.js +125 -0
  163. package/dist/lib/modules/tournament/prediction/prediction.service.js.map +1 -0
  164. package/dist/lib/modules/tournament/prediction/prediction.validation.d.ts +575 -0
  165. package/dist/lib/modules/tournament/prediction/prediction.validation.d.ts.map +1 -0
  166. package/dist/lib/modules/tournament/prediction/prediction.validation.js +46 -0
  167. package/dist/lib/modules/tournament/prediction/prediction.validation.js.map +1 -0
  168. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +8 -0
  169. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -0
  170. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js +65 -0
  171. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js.map +1 -0
  172. package/dist/lib/modules/tournament/reward/reward.factory.d.ts +6 -0
  173. package/dist/lib/modules/tournament/reward/reward.factory.d.ts.map +1 -0
  174. package/dist/lib/modules/tournament/reward/reward.factory.js +21 -0
  175. package/dist/lib/modules/tournament/reward/reward.factory.js.map +1 -0
  176. package/dist/lib/modules/tournament/reward/reward.interface.d.ts +5 -0
  177. package/dist/lib/modules/tournament/reward/reward.interface.d.ts.map +1 -0
  178. package/dist/lib/modules/tournament/reward/reward.interface.js +3 -0
  179. package/dist/lib/modules/tournament/reward/reward.interface.js.map +1 -0
  180. package/dist/lib/modules/tournament/reward/reward.service.d.ts +6 -0
  181. package/dist/lib/modules/tournament/reward/reward.service.d.ts.map +1 -0
  182. package/dist/lib/modules/tournament/reward/reward.service.js +56 -0
  183. package/dist/lib/modules/tournament/reward/reward.service.js.map +1 -0
  184. package/dist/lib/modules/tournament/reward/reward.types.d.ts +11 -0
  185. package/dist/lib/modules/tournament/reward/reward.types.d.ts.map +1 -0
  186. package/dist/lib/modules/tournament/reward/reward.types.js +8 -0
  187. package/dist/lib/modules/tournament/reward/reward.types.js.map +1 -0
  188. package/dist/lib/modules/tournament/team/team.builder.d.ts +19 -0
  189. package/dist/lib/modules/tournament/team/team.builder.d.ts.map +1 -0
  190. package/dist/lib/modules/tournament/team/team.builder.js +18 -0
  191. package/dist/lib/modules/tournament/team/team.builder.js.map +1 -0
  192. package/dist/lib/modules/tournament/team/team.repository.d.ts +11 -0
  193. package/dist/lib/modules/tournament/team/team.repository.d.ts.map +1 -0
  194. package/dist/lib/modules/tournament/team/team.repository.js +71 -0
  195. package/dist/lib/modules/tournament/team/team.repository.js.map +1 -0
  196. package/dist/lib/modules/tournament/team/team.router.d.ts +237 -0
  197. package/dist/lib/modules/tournament/team/team.router.d.ts.map +1 -0
  198. package/dist/lib/modules/tournament/team/team.router.js +36 -0
  199. package/dist/lib/modules/tournament/team/team.router.js.map +1 -0
  200. package/dist/lib/modules/tournament/team/team.service.d.ts +15 -0
  201. package/dist/lib/modules/tournament/team/team.service.d.ts.map +1 -0
  202. package/dist/lib/modules/tournament/team/team.service.js +137 -0
  203. package/dist/lib/modules/tournament/team/team.service.js.map +1 -0
  204. package/dist/lib/modules/tournament/team/team.validation.d.ts +986 -0
  205. package/dist/lib/modules/tournament/team/team.validation.d.ts.map +1 -0
  206. package/dist/lib/modules/tournament/team/team.validation.js +55 -0
  207. package/dist/lib/modules/tournament/team/team.validation.js.map +1 -0
  208. package/dist/lib/modules/tournament/tournament.router.d.ts +1336 -0
  209. package/dist/lib/modules/tournament/tournament.router.d.ts.map +1 -0
  210. package/dist/lib/modules/tournament/tournament.router.js +17 -0
  211. package/dist/lib/modules/tournament/tournament.router.js.map +1 -0
  212. package/dist/types/event/event-initializations.d.ts.map +1 -1
  213. package/dist/types/events/event-initializations.d.ts +2 -0
  214. package/dist/types/events/event-initializations.d.ts.map +1 -0
  215. package/dist/types/index.d.ts +1346 -7
  216. package/dist/types/index.d.ts.map +1 -1
  217. package/dist/types/modules/coupon/routers/coupon.router.d.ts +4 -0
  218. package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
  219. package/dist/types/modules/coupon/services/custom-coupon.service.d.ts +2 -0
  220. package/dist/types/modules/coupon/services/custom-coupon.service.d.ts.map +1 -1
  221. package/dist/types/modules/coupon/services/global-coupon.service.d.ts +1 -1
  222. package/dist/types/modules/coupon/services/global-coupon.service.d.ts.map +1 -1
  223. package/dist/types/modules/coupon/services/helper.service.d.ts +2 -1
  224. package/dist/types/modules/coupon/services/helper.service.d.ts.map +1 -1
  225. package/dist/types/modules/coupon/services/individual-store-coupon.service.d.ts +2 -0
  226. package/dist/types/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
  227. package/dist/types/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
  228. package/dist/types/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
  229. package/dist/types/modules/coupon/services/referral-code-coupon.service.d.ts.map +1 -1
  230. package/dist/types/modules/coupon/services/referral-reward-coupon.service.d.ts +1 -1
  231. package/dist/types/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
  232. package/dist/types/modules/coupon/services/shops-categories-coupon.service.d.ts +2 -0
  233. package/dist/types/modules/coupon/services/shops-categories-coupon.service.d.ts.map +1 -1
  234. package/dist/types/modules/coupon/validations/coupon.validation.d.ts +13 -0
  235. package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
  236. package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts +6 -6
  237. package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +6 -6
  238. package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +30 -30
  239. package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
  240. package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts +2 -0
  241. package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
  242. package/dist/types/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +18 -18
  243. package/dist/types/modules/marketing/validations/discount-marketing.validation.d.ts +30 -30
  244. package/dist/types/modules/marketing/validations/featured-marketing.validation.d.ts +6 -6
  245. package/dist/types/modules/marketing/validations/free-delivery-marketing.validation.d.ts +4 -4
  246. package/dist/types/modules/marketing/validations/marketing.validation.d.ts +2 -2
  247. package/dist/types/modules/marketing/validations/product-marketing.validation.d.ts +5 -5
  248. package/dist/types/modules/marketing/validations/punch-marketing.validation.d.ts +4 -4
  249. package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
  250. package/dist/types/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
  251. package/dist/types/modules/tournament/config/config.builder.d.ts +5 -0
  252. package/dist/types/modules/tournament/config/config.builder.d.ts.map +1 -0
  253. package/dist/types/modules/tournament/config/config.repository.d.ts +13 -0
  254. package/dist/types/modules/tournament/config/config.repository.d.ts.map +1 -0
  255. package/dist/types/modules/tournament/config/config.router.d.ts +363 -0
  256. package/dist/types/modules/tournament/config/config.router.d.ts.map +1 -0
  257. package/dist/types/modules/tournament/config/config.service.d.ts +14 -0
  258. package/dist/types/modules/tournament/config/config.service.d.ts.map +1 -0
  259. package/dist/types/modules/tournament/config/config.validation.d.ts +1014 -0
  260. package/dist/types/modules/tournament/config/config.validation.d.ts.map +1 -0
  261. package/dist/types/modules/tournament/config/tournament-config.validation.d.ts +201 -0
  262. package/dist/types/modules/tournament/config/tournament-config.validation.d.ts.map +1 -0
  263. package/dist/types/modules/tournament/match/events/match-ended.consumer.d.ts +2 -0
  264. package/dist/types/modules/tournament/match/events/match-ended.consumer.d.ts.map +1 -0
  265. package/dist/types/modules/tournament/match/events/match-ended.event.d.ts +14 -0
  266. package/dist/types/modules/tournament/match/events/match-ended.event.d.ts.map +1 -0
  267. package/dist/types/modules/tournament/match/match.builder.d.ts +38 -0
  268. package/dist/types/modules/tournament/match/match.builder.d.ts.map +1 -0
  269. package/dist/types/modules/tournament/match/match.repository.d.ts +13 -0
  270. package/dist/types/modules/tournament/match/match.repository.d.ts.map +1 -0
  271. package/dist/types/modules/tournament/match/match.router.d.ts +489 -0
  272. package/dist/types/modules/tournament/match/match.router.d.ts.map +1 -0
  273. package/dist/types/modules/tournament/match/match.service.d.ts +29 -0
  274. package/dist/types/modules/tournament/match/match.service.d.ts.map +1 -0
  275. package/dist/types/modules/tournament/match/match.validation.d.ts +880 -0
  276. package/dist/types/modules/tournament/match/match.validation.d.ts.map +1 -0
  277. package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts +13 -0
  278. package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts.map +1 -0
  279. package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts +7 -0
  280. package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts.map +1 -0
  281. package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts +10 -0
  282. package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts.map +1 -0
  283. package/dist/types/modules/tournament/notification/notification.service.d.ts +11 -0
  284. package/dist/types/modules/tournament/notification/notification.service.d.ts.map +1 -0
  285. package/dist/types/modules/tournament/participant/participant.repository.d.ts +12 -0
  286. package/dist/types/modules/tournament/participant/participant.repository.d.ts.map +1 -0
  287. package/dist/types/modules/tournament/participant/participant.router.d.ts +104 -0
  288. package/dist/types/modules/tournament/participant/participant.router.d.ts.map +1 -0
  289. package/dist/types/modules/tournament/participant/participant.service.d.ts +14 -0
  290. package/dist/types/modules/tournament/participant/participant.service.d.ts.map +1 -0
  291. package/dist/types/modules/tournament/participant/participant.validation.d.ts +719 -0
  292. package/dist/types/modules/tournament/participant/participant.validation.d.ts.map +1 -0
  293. package/dist/types/modules/tournament/prediction/prediction.builder.d.ts +14 -0
  294. package/dist/types/modules/tournament/prediction/prediction.builder.d.ts.map +1 -0
  295. package/dist/types/modules/tournament/prediction/prediction.repository.d.ts +11 -0
  296. package/dist/types/modules/tournament/prediction/prediction.repository.d.ts.map +1 -0
  297. package/dist/types/modules/tournament/prediction/prediction.router.d.ts +133 -0
  298. package/dist/types/modules/tournament/prediction/prediction.router.d.ts.map +1 -0
  299. package/dist/types/modules/tournament/prediction/prediction.service.d.ts +17 -0
  300. package/dist/types/modules/tournament/prediction/prediction.service.d.ts.map +1 -0
  301. package/dist/types/modules/tournament/prediction/prediction.validation.d.ts +575 -0
  302. package/dist/types/modules/tournament/prediction/prediction.validation.d.ts.map +1 -0
  303. package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +8 -0
  304. package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -0
  305. package/dist/types/modules/tournament/reward/reward.factory.d.ts +6 -0
  306. package/dist/types/modules/tournament/reward/reward.factory.d.ts.map +1 -0
  307. package/dist/types/modules/tournament/reward/reward.interface.d.ts +5 -0
  308. package/dist/types/modules/tournament/reward/reward.interface.d.ts.map +1 -0
  309. package/dist/types/modules/tournament/reward/reward.service.d.ts +6 -0
  310. package/dist/types/modules/tournament/reward/reward.service.d.ts.map +1 -0
  311. package/dist/types/modules/tournament/reward/reward.types.d.ts +11 -0
  312. package/dist/types/modules/tournament/reward/reward.types.d.ts.map +1 -0
  313. package/dist/types/modules/tournament/team/team.builder.d.ts +19 -0
  314. package/dist/types/modules/tournament/team/team.builder.d.ts.map +1 -0
  315. package/dist/types/modules/tournament/team/team.repository.d.ts +11 -0
  316. package/dist/types/modules/tournament/team/team.repository.d.ts.map +1 -0
  317. package/dist/types/modules/tournament/team/team.router.d.ts +237 -0
  318. package/dist/types/modules/tournament/team/team.router.d.ts.map +1 -0
  319. package/dist/types/modules/tournament/team/team.service.d.ts +15 -0
  320. package/dist/types/modules/tournament/team/team.service.d.ts.map +1 -0
  321. package/dist/types/modules/tournament/team/team.validation.d.ts +986 -0
  322. package/dist/types/modules/tournament/team/team.validation.d.ts.map +1 -0
  323. package/dist/types/modules/tournament/tournament.router.d.ts +1336 -0
  324. package/dist/types/modules/tournament/tournament.router.d.ts.map +1 -0
  325. package/package.json +3 -3
  326. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts +0 -1
  327. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts.map +0 -1
  328. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js +0 -2
  329. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js.map +0 -1
@@ -0,0 +1,489 @@
1
+ export declare const matchRouter: import("@trpc/server").TRPCBuiltRouter<{
2
+ ctx: import("@lyxa.ai/core/dist/libraries/trpc/context").LyxaHTTPContext;
3
+ meta: object;
4
+ errorShape: {
5
+ message: string;
6
+ data: {
7
+ stack: undefined;
8
+ path: undefined;
9
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
10
+ httpStatus: number;
11
+ };
12
+ stack: undefined;
13
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
14
+ };
15
+ transformer: false;
16
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
17
+ add: import("@trpc/server").TRPCMutationProcedure<{
18
+ input: {
19
+ tournamentId: string | import("mongoose").Types.ObjectId;
20
+ matches: {
21
+ stage: string;
22
+ team1Id: string | import("mongoose").Types.ObjectId;
23
+ team2Id: string | import("mongoose").Types.ObjectId;
24
+ startingDate: string | Date;
25
+ endDate?: string | Date | undefined;
26
+ additionalTag?: string | undefined;
27
+ }[];
28
+ };
29
+ output: {
30
+ message: string;
31
+ success: boolean;
32
+ data?: {
33
+ status: import("@lyxa.ai/core/dist/utilities/enum").Status;
34
+ _id: string | import("mongoose").Types.ObjectId;
35
+ tag: string;
36
+ createdAt?: Date | null | undefined;
37
+ startDate?: Date | null | undefined;
38
+ endDate?: Date | null | undefined;
39
+ updatedAt?: Date | null | undefined;
40
+ matches?: {
41
+ _id: string | import("mongoose").Types.ObjectId;
42
+ team1: {
43
+ name: string;
44
+ teamId: string | import("mongoose").Types.ObjectId;
45
+ };
46
+ team2: {
47
+ name: string;
48
+ teamId: string | import("mongoose").Types.ObjectId;
49
+ };
50
+ score: {
51
+ team1: number | null;
52
+ team2: number | null;
53
+ };
54
+ stage: string;
55
+ endDate?: Date | null | undefined;
56
+ startingDate?: Date | null | undefined;
57
+ additionalTag?: string | undefined;
58
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
59
+ }[] | undefined;
60
+ teams?: {
61
+ name: string;
62
+ _id: string | import("mongoose").Types.ObjectId;
63
+ picture?: string | null | undefined;
64
+ }[] | undefined;
65
+ } | {
66
+ documents: {
67
+ status: import("@lyxa.ai/core/dist/utilities/enum").Status;
68
+ _id: string | import("mongoose").Types.ObjectId;
69
+ tag: string;
70
+ createdAt?: Date | null | undefined;
71
+ startDate?: Date | null | undefined;
72
+ endDate?: Date | null | undefined;
73
+ updatedAt?: Date | null | undefined;
74
+ matches?: {
75
+ _id: string | import("mongoose").Types.ObjectId;
76
+ team1: {
77
+ name: string;
78
+ teamId: string | import("mongoose").Types.ObjectId;
79
+ };
80
+ team2: {
81
+ name: string;
82
+ teamId: string | import("mongoose").Types.ObjectId;
83
+ };
84
+ score: {
85
+ team1: number | null;
86
+ team2: number | null;
87
+ };
88
+ stage: string;
89
+ endDate?: Date | null | undefined;
90
+ startingDate?: Date | null | undefined;
91
+ additionalTag?: string | undefined;
92
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
93
+ }[] | undefined;
94
+ teams?: {
95
+ name: string;
96
+ _id: string | import("mongoose").Types.ObjectId;
97
+ picture?: string | null | undefined;
98
+ }[] | undefined;
99
+ }[];
100
+ metadata?: {
101
+ page: number;
102
+ size: number;
103
+ totalElements: number;
104
+ totalPages: number;
105
+ } | undefined;
106
+ } | undefined;
107
+ };
108
+ meta: object;
109
+ }>;
110
+ getAll: import("@trpc/server").TRPCQueryProcedure<{
111
+ input: {
112
+ tournamentId: string | import("mongoose").Types.ObjectId;
113
+ };
114
+ output: {
115
+ message: string;
116
+ success: boolean;
117
+ data?: {
118
+ _id: string | import("mongoose").Types.ObjectId;
119
+ team1: {
120
+ name: string;
121
+ teamId: string | import("mongoose").Types.ObjectId;
122
+ };
123
+ team2: {
124
+ name: string;
125
+ teamId: string | import("mongoose").Types.ObjectId;
126
+ };
127
+ score: {
128
+ team1: number | null;
129
+ team2: number | null;
130
+ };
131
+ stage: string;
132
+ endDate?: Date | null | undefined;
133
+ startingDate?: Date | null | undefined;
134
+ additionalTag?: string | undefined;
135
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
136
+ prediction?: {
137
+ score: {
138
+ team1: number | null;
139
+ team2: number | null;
140
+ };
141
+ succeeded?: boolean | null | undefined;
142
+ } | null | undefined;
143
+ }[] | {
144
+ documents: {
145
+ _id: string | import("mongoose").Types.ObjectId;
146
+ team1: {
147
+ name: string;
148
+ teamId: string | import("mongoose").Types.ObjectId;
149
+ };
150
+ team2: {
151
+ name: string;
152
+ teamId: string | import("mongoose").Types.ObjectId;
153
+ };
154
+ score: {
155
+ team1: number | null;
156
+ team2: number | null;
157
+ };
158
+ stage: string;
159
+ endDate?: Date | null | undefined;
160
+ startingDate?: Date | null | undefined;
161
+ additionalTag?: string | undefined;
162
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
163
+ prediction?: {
164
+ score: {
165
+ team1: number | null;
166
+ team2: number | null;
167
+ };
168
+ succeeded?: boolean | null | undefined;
169
+ } | null | undefined;
170
+ }[][];
171
+ metadata?: {
172
+ page: number;
173
+ size: number;
174
+ totalElements: number;
175
+ totalPages: number;
176
+ } | undefined;
177
+ } | undefined;
178
+ };
179
+ meta: object;
180
+ }>;
181
+ start: import("@trpc/server").TRPCMutationProcedure<{
182
+ input: {
183
+ tournamentId: string | import("mongoose").Types.ObjectId;
184
+ matchId: string | import("mongoose").Types.ObjectId;
185
+ };
186
+ output: {
187
+ message: string;
188
+ success: boolean;
189
+ data?: {
190
+ _id: string | import("mongoose").Types.ObjectId;
191
+ team1: {
192
+ name: string;
193
+ teamId: string | import("mongoose").Types.ObjectId;
194
+ };
195
+ team2: {
196
+ name: string;
197
+ teamId: string | import("mongoose").Types.ObjectId;
198
+ };
199
+ score: {
200
+ team1: number | null;
201
+ team2: number | null;
202
+ };
203
+ stage: string;
204
+ endDate?: Date | null | undefined;
205
+ startingDate?: Date | null | undefined;
206
+ additionalTag?: string | undefined;
207
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
208
+ prediction?: {
209
+ score: {
210
+ team1: number | null;
211
+ team2: number | null;
212
+ };
213
+ succeeded?: boolean | null | undefined;
214
+ } | null | undefined;
215
+ } | {
216
+ documents: {
217
+ _id: string | import("mongoose").Types.ObjectId;
218
+ team1: {
219
+ name: string;
220
+ teamId: string | import("mongoose").Types.ObjectId;
221
+ };
222
+ team2: {
223
+ name: string;
224
+ teamId: string | import("mongoose").Types.ObjectId;
225
+ };
226
+ score: {
227
+ team1: number | null;
228
+ team2: number | null;
229
+ };
230
+ stage: string;
231
+ endDate?: Date | null | undefined;
232
+ startingDate?: Date | null | undefined;
233
+ additionalTag?: string | undefined;
234
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
235
+ prediction?: {
236
+ score: {
237
+ team1: number | null;
238
+ team2: number | null;
239
+ };
240
+ succeeded?: boolean | null | undefined;
241
+ } | null | undefined;
242
+ }[];
243
+ metadata?: {
244
+ page: number;
245
+ size: number;
246
+ totalElements: number;
247
+ totalPages: number;
248
+ } | undefined;
249
+ } | undefined;
250
+ };
251
+ meta: object;
252
+ }>;
253
+ updateScore: import("@trpc/server").TRPCMutationProcedure<{
254
+ input: {
255
+ tournamentId: string | import("mongoose").Types.ObjectId;
256
+ matchId: string | import("mongoose").Types.ObjectId;
257
+ team1Score: number;
258
+ team2Score: number;
259
+ winnerId?: string | import("mongoose").Types.ObjectId | undefined;
260
+ };
261
+ output: {
262
+ message: string;
263
+ success: boolean;
264
+ data?: {
265
+ _id: string | import("mongoose").Types.ObjectId;
266
+ team1: {
267
+ name: string;
268
+ teamId: string | import("mongoose").Types.ObjectId;
269
+ };
270
+ team2: {
271
+ name: string;
272
+ teamId: string | import("mongoose").Types.ObjectId;
273
+ };
274
+ score: {
275
+ team1: number | null;
276
+ team2: number | null;
277
+ };
278
+ stage: string;
279
+ endDate?: Date | null | undefined;
280
+ startingDate?: Date | null | undefined;
281
+ additionalTag?: string | undefined;
282
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
283
+ prediction?: {
284
+ score: {
285
+ team1: number | null;
286
+ team2: number | null;
287
+ };
288
+ succeeded?: boolean | null | undefined;
289
+ } | null | undefined;
290
+ } | {
291
+ documents: {
292
+ _id: string | import("mongoose").Types.ObjectId;
293
+ team1: {
294
+ name: string;
295
+ teamId: string | import("mongoose").Types.ObjectId;
296
+ };
297
+ team2: {
298
+ name: string;
299
+ teamId: string | import("mongoose").Types.ObjectId;
300
+ };
301
+ score: {
302
+ team1: number | null;
303
+ team2: number | null;
304
+ };
305
+ stage: string;
306
+ endDate?: Date | null | undefined;
307
+ startingDate?: Date | null | undefined;
308
+ additionalTag?: string | undefined;
309
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
310
+ prediction?: {
311
+ score: {
312
+ team1: number | null;
313
+ team2: number | null;
314
+ };
315
+ succeeded?: boolean | null | undefined;
316
+ } | null | undefined;
317
+ }[];
318
+ metadata?: {
319
+ page: number;
320
+ size: number;
321
+ totalElements: number;
322
+ totalPages: number;
323
+ } | undefined;
324
+ } | undefined;
325
+ };
326
+ meta: object;
327
+ }>;
328
+ end: import("@trpc/server").TRPCMutationProcedure<{
329
+ input: {
330
+ tournamentId: string | import("mongoose").Types.ObjectId;
331
+ matchId: string | import("mongoose").Types.ObjectId;
332
+ endDate?: string | Date | undefined;
333
+ winnerId?: string | import("mongoose").Types.ObjectId | undefined;
334
+ };
335
+ output: {
336
+ message: string;
337
+ success: boolean;
338
+ data?: {
339
+ _id: string | import("mongoose").Types.ObjectId;
340
+ team1: {
341
+ name: string;
342
+ teamId: string | import("mongoose").Types.ObjectId;
343
+ };
344
+ team2: {
345
+ name: string;
346
+ teamId: string | import("mongoose").Types.ObjectId;
347
+ };
348
+ score: {
349
+ team1: number | null;
350
+ team2: number | null;
351
+ };
352
+ stage: string;
353
+ endDate?: Date | null | undefined;
354
+ startingDate?: Date | null | undefined;
355
+ additionalTag?: string | undefined;
356
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
357
+ prediction?: {
358
+ score: {
359
+ team1: number | null;
360
+ team2: number | null;
361
+ };
362
+ succeeded?: boolean | null | undefined;
363
+ } | null | undefined;
364
+ } | {
365
+ documents: {
366
+ _id: string | import("mongoose").Types.ObjectId;
367
+ team1: {
368
+ name: string;
369
+ teamId: string | import("mongoose").Types.ObjectId;
370
+ };
371
+ team2: {
372
+ name: string;
373
+ teamId: string | import("mongoose").Types.ObjectId;
374
+ };
375
+ score: {
376
+ team1: number | null;
377
+ team2: number | null;
378
+ };
379
+ stage: string;
380
+ endDate?: Date | null | undefined;
381
+ startingDate?: Date | null | undefined;
382
+ additionalTag?: string | undefined;
383
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
384
+ prediction?: {
385
+ score: {
386
+ team1: number | null;
387
+ team2: number | null;
388
+ };
389
+ succeeded?: boolean | null | undefined;
390
+ } | null | undefined;
391
+ }[];
392
+ metadata?: {
393
+ page: number;
394
+ size: number;
395
+ totalElements: number;
396
+ totalPages: number;
397
+ } | undefined;
398
+ } | undefined;
399
+ };
400
+ meta: object;
401
+ }>;
402
+ delete: import("@trpc/server").TRPCMutationProcedure<{
403
+ input: {
404
+ tournamentId: string | import("mongoose").Types.ObjectId;
405
+ matchId: string | import("mongoose").Types.ObjectId;
406
+ };
407
+ output: {
408
+ message: string;
409
+ success: boolean;
410
+ data?: {
411
+ status: import("@lyxa.ai/core/dist/utilities/enum").Status;
412
+ _id: string | import("mongoose").Types.ObjectId;
413
+ tag: string;
414
+ createdAt?: Date | null | undefined;
415
+ startDate?: Date | null | undefined;
416
+ endDate?: Date | null | undefined;
417
+ updatedAt?: Date | null | undefined;
418
+ matches?: {
419
+ _id: string | import("mongoose").Types.ObjectId;
420
+ team1: {
421
+ name: string;
422
+ teamId: string | import("mongoose").Types.ObjectId;
423
+ };
424
+ team2: {
425
+ name: string;
426
+ teamId: string | import("mongoose").Types.ObjectId;
427
+ };
428
+ score: {
429
+ team1: number | null;
430
+ team2: number | null;
431
+ };
432
+ stage: string;
433
+ endDate?: Date | null | undefined;
434
+ startingDate?: Date | null | undefined;
435
+ additionalTag?: string | undefined;
436
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
437
+ }[] | undefined;
438
+ teams?: {
439
+ name: string;
440
+ _id: string | import("mongoose").Types.ObjectId;
441
+ picture?: string | null | undefined;
442
+ }[] | undefined;
443
+ } | {
444
+ documents: {
445
+ status: import("@lyxa.ai/core/dist/utilities/enum").Status;
446
+ _id: string | import("mongoose").Types.ObjectId;
447
+ tag: string;
448
+ createdAt?: Date | null | undefined;
449
+ startDate?: Date | null | undefined;
450
+ endDate?: Date | null | undefined;
451
+ updatedAt?: Date | null | undefined;
452
+ matches?: {
453
+ _id: string | import("mongoose").Types.ObjectId;
454
+ team1: {
455
+ name: string;
456
+ teamId: string | import("mongoose").Types.ObjectId;
457
+ };
458
+ team2: {
459
+ name: string;
460
+ teamId: string | import("mongoose").Types.ObjectId;
461
+ };
462
+ score: {
463
+ team1: number | null;
464
+ team2: number | null;
465
+ };
466
+ stage: string;
467
+ endDate?: Date | null | undefined;
468
+ startingDate?: Date | null | undefined;
469
+ additionalTag?: string | undefined;
470
+ winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
471
+ }[] | undefined;
472
+ teams?: {
473
+ name: string;
474
+ _id: string | import("mongoose").Types.ObjectId;
475
+ picture?: string | null | undefined;
476
+ }[] | undefined;
477
+ }[];
478
+ metadata?: {
479
+ page: number;
480
+ size: number;
481
+ totalElements: number;
482
+ totalPages: number;
483
+ } | undefined;
484
+ } | undefined;
485
+ };
486
+ meta: object;
487
+ }>;
488
+ }>>;
489
+ //# sourceMappingURL=match.router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match.router.d.ts","sourceRoot":"/","sources":["modules/tournament/match/match.router.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DtB,CAAC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.matchRouter = void 0;
4
+ const trpc_1 = require("@lyxa.ai/core/dist/libraries/trpc");
5
+ const auth_1 = require("@lyxa.ai/core/dist/libraries/auth");
6
+ const auth_2 = require("@lyxa.ai/core/dist/libraries/trpc/middlewares/auth");
7
+ const error_handler_1 = require("@lyxa.ai/core/dist/utilities/error-handler");
8
+ const response_1 = require("@lyxa.ai/core/dist/utilities/response");
9
+ const match_service_1 = require("./match.service");
10
+ const match_validation_1 = require("./match.validation");
11
+ const config_validation_1 = require("../config/config.validation");
12
+ exports.matchRouter = (0, trpc_1.createTRPCRouter)({
13
+ add: (0, auth_2.createAuthenticatedProcedure)({ entityTypes: [auth_1.AuthEntityType.CRM] })
14
+ .input(match_validation_1.AddTournamentMatchesSchema)
15
+ .output(config_validation_1.TournamentConfigResponseSchema)
16
+ .mutation(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
17
+ const result = await match_service_1.matchService.add(input);
18
+ return (0, response_1.response)('Matches added successfully', result);
19
+ })),
20
+ getAll: trpc_1.publicProcedure
21
+ .input(match_validation_1.GetTournamentMatchesSchema)
22
+ .output(match_validation_1.TournamentMatchListResponseSchema)
23
+ .query(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
24
+ const result = await match_service_1.matchService.getAll(input.tournamentId);
25
+ return (0, response_1.response)('Matches fetched successfully', result);
26
+ })),
27
+ start: (0, auth_2.createAuthenticatedProcedure)({ entityTypes: [auth_1.AuthEntityType.CRM] })
28
+ .input(match_validation_1.StartTournamentMatchSchema)
29
+ .output(match_validation_1.TournamentMatchResponseSchema)
30
+ .mutation(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
31
+ const result = await match_service_1.matchService.start(input);
32
+ return (0, response_1.response)('Match started successfully', result);
33
+ })),
34
+ updateScore: (0, auth_2.createAuthenticatedProcedure)({ entityTypes: [auth_1.AuthEntityType.CRM] })
35
+ .input(match_validation_1.UpdateMatchScoreSchema)
36
+ .output(match_validation_1.TournamentMatchResponseSchema)
37
+ .mutation(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
38
+ const result = await match_service_1.matchService.updateScore(input);
39
+ return (0, response_1.response)('Match score updated successfully', result);
40
+ })),
41
+ end: (0, auth_2.createAuthenticatedProcedure)({ entityTypes: [auth_1.AuthEntityType.CRM] })
42
+ .input(match_validation_1.EndTournamentMatchSchema)
43
+ .output(match_validation_1.TournamentMatchResponseSchema)
44
+ .mutation(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
45
+ const result = await match_service_1.matchService.end(input);
46
+ return (0, response_1.response)('Match ended successfully', result);
47
+ })),
48
+ delete: (0, auth_2.createAuthenticatedProcedure)({ entityTypes: [auth_1.AuthEntityType.CRM] })
49
+ .input(match_validation_1.EndTournamentMatchSchema.pick({ tournamentId: true, matchId: true }))
50
+ .output(config_validation_1.TournamentConfigResponseSchema)
51
+ .mutation(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
52
+ const result = await match_service_1.matchService.delete(input.tournamentId, input.matchId);
53
+ return (0, response_1.response)('Match deleted successfully', result);
54
+ })),
55
+ });
56
+ //# sourceMappingURL=match.router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match.router.js","sourceRoot":"/","sources":["modules/tournament/match/match.router.ts"],"names":[],"mappings":"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","sourcesContent":["import { createTRPCRouter, publicProcedure } from '@lyxa.ai/core/dist/libraries/trpc';\nimport { AuthEntityType } from '@lyxa.ai/core/dist/libraries/auth';\nimport { createAuthenticatedProcedure } from '@lyxa.ai/core/dist/libraries/trpc/middlewares/auth';\nimport { ErrorHandler } from '@lyxa.ai/core/dist/utilities/error-handler';\nimport { response } from '@lyxa.ai/core/dist/utilities/response';\nimport { matchService as service } from './match.service';\nimport {\n\tAddTournamentMatchesSchema,\n\tEndTournamentMatchSchema,\n\tGetTournamentMatchesSchema,\n\tStartTournamentMatchSchema,\n\tTournamentMatchListResponseSchema,\n\tTournamentMatchResponseSchema,\n\tUpdateMatchScoreSchema,\n} from './match.validation';\nimport { TournamentConfigResponseSchema } from '../config/config.validation';\n\nexport const matchRouter = createTRPCRouter({\n\tadd: createAuthenticatedProcedure({ entityTypes: [AuthEntityType.CRM] })\n\t\t.input(AddTournamentMatchesSchema)\n\t\t.output(TournamentConfigResponseSchema)\n\t\t.mutation(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tconst result = await service.add(input);\n\t\t\t\treturn response('Matches added successfully', result);\n\t\t\t})\n\t\t),\n\n\tgetAll: publicProcedure\n\t\t.input(GetTournamentMatchesSchema)\n\t\t.output(TournamentMatchListResponseSchema)\n\t\t.query(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tconst result = await service.getAll(input.tournamentId);\n\t\t\t\treturn response('Matches fetched successfully', result);\n\t\t\t})\n\t\t),\n\n\tstart: createAuthenticatedProcedure({ entityTypes: [AuthEntityType.CRM] })\n\t\t.input(StartTournamentMatchSchema)\n\t\t.output(TournamentMatchResponseSchema)\n\t\t.mutation(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tconst result = await service.start(input);\n\t\t\t\treturn response('Match started successfully', result);\n\t\t\t})\n\t\t),\n\n\tupdateScore: createAuthenticatedProcedure({ entityTypes: [AuthEntityType.CRM] })\n\t\t.input(UpdateMatchScoreSchema)\n\t\t.output(TournamentMatchResponseSchema)\n\t\t.mutation(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tconst result = await service.updateScore(input);\n\t\t\t\treturn response('Match score updated successfully', result);\n\t\t\t})\n\t\t),\n\n\tend: createAuthenticatedProcedure({ entityTypes: [AuthEntityType.CRM] })\n\t\t.input(EndTournamentMatchSchema)\n\t\t.output(TournamentMatchResponseSchema)\n\t\t.mutation(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tconst result = await service.end(input);\n\t\t\t\treturn response('Match ended successfully', result);\n\t\t\t})\n\t\t),\n\n\tdelete: createAuthenticatedProcedure({ entityTypes: [AuthEntityType.CRM] })\n\t\t.input(EndTournamentMatchSchema.pick({ tournamentId: true, matchId: true }))\n\t\t.output(TournamentConfigResponseSchema)\n\t\t.mutation(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tconst result = await service.delete(input.tournamentId, input.matchId);\n\t\t\t\treturn response('Match deleted successfully', result);\n\t\t\t})\n\t\t),\n});\n"]}
@@ -0,0 +1,29 @@
1
+ import { mongoose } from '@typegoose/typegoose';
2
+ import { AddTournamentMatchesInputDTO, EndTournamentMatchInputDTO, StartTournamentMatchInputDTO, TournamentMatchOutputDTO, UpdateMatchScoreInputDTO } from './match.validation';
3
+ import { TournamentConfigOutputDTO } from '../config/config.validation';
4
+ export declare class MatchService {
5
+ private repository;
6
+ private notificationScheduler;
7
+ private notificationService;
8
+ private participantService;
9
+ private predictionRepository;
10
+ private rewardService;
11
+ constructor();
12
+ private getTournament;
13
+ private getMatch;
14
+ private validateWinner;
15
+ private resolveMatchTeams;
16
+ private applyMatchUpdate;
17
+ handleMatchEnded(tournamentId: mongoose.Types.ObjectId, matchId: mongoose.Types.ObjectId, finalScore: {
18
+ team1: number;
19
+ team2: number;
20
+ }): Promise<void>;
21
+ add(input: AddTournamentMatchesInputDTO): Promise<TournamentConfigOutputDTO>;
22
+ getAll(tournamentId: mongoose.Types.ObjectId): Promise<TournamentMatchOutputDTO[]>;
23
+ start(input: StartTournamentMatchInputDTO): Promise<TournamentMatchOutputDTO>;
24
+ updateScore(input: UpdateMatchScoreInputDTO): Promise<TournamentMatchOutputDTO>;
25
+ end(input: EndTournamentMatchInputDTO): Promise<TournamentMatchOutputDTO>;
26
+ delete(tournamentId: mongoose.Types.ObjectId, matchId: mongoose.Types.ObjectId): Promise<TournamentConfigOutputDTO>;
27
+ }
28
+ export declare const matchService: MatchService;
29
+ //# sourceMappingURL=match.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match.service.d.ts","sourceRoot":"/","sources":["modules/tournament/match/match.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EACH,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,wBAAwB,EAC3B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAYxE,qBACa,YAAY;IACrB,OAAO,CAAC,UAAU,CAA4B;IAC9C,OAAO,CAAC,qBAAqB,CAA+B;IAC5D,OAAO,CAAC,mBAAmB,CAAgC;IAC3D,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,aAAa,CAAgB;;YAWvB,aAAa;IAM3B,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,iBAAiB;YAQX,gBAAgB;IAajB,gBAAgB,CACzB,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACrC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAChC,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAC7C,OAAO,CAAC,IAAI,CAAC;IA8BH,GAAG,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAoB5E,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAKlF,KAAK,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAgB7E,WAAW,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAO/E,GAAG,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAqBzE,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,yBAAyB,CAAC;CASnI;AAED,eAAO,MAAM,YAAY,cAA8B,CAAC"}