@lyxa.ai/marketing 1.0.46 → 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 (341) 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 +1414 -13
  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 +72 -6
  9. package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
  10. package/dist/lib/modules/coupon/routers/coupon.router.js +12 -3
  11. package/dist/lib/modules/coupon/routers/coupon.router.js.map +1 -1
  12. package/dist/lib/modules/coupon/services/coupon.service.d.ts +1 -0
  13. package/dist/lib/modules/coupon/services/coupon.service.d.ts.map +1 -1
  14. package/dist/lib/modules/coupon/services/coupon.service.js +102 -4
  15. package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
  16. package/dist/lib/modules/coupon/services/custom-coupon.service.d.ts +2 -0
  17. package/dist/lib/modules/coupon/services/custom-coupon.service.d.ts.map +1 -1
  18. package/dist/lib/modules/coupon/services/custom-coupon.service.js +1 -1
  19. package/dist/lib/modules/coupon/services/custom-coupon.service.js.map +1 -1
  20. package/dist/lib/modules/coupon/services/global-coupon.service.d.ts +1 -1
  21. package/dist/lib/modules/coupon/services/global-coupon.service.d.ts.map +1 -1
  22. package/dist/lib/modules/coupon/services/global-coupon.service.js +16 -10
  23. package/dist/lib/modules/coupon/services/global-coupon.service.js.map +1 -1
  24. package/dist/lib/modules/coupon/services/helper.service.d.ts +2 -1
  25. package/dist/lib/modules/coupon/services/helper.service.d.ts.map +1 -1
  26. package/dist/lib/modules/coupon/services/helper.service.js +7 -1
  27. package/dist/lib/modules/coupon/services/helper.service.js.map +1 -1
  28. package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts +2 -0
  29. package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
  30. package/dist/lib/modules/coupon/services/individual-store-coupon.service.js +2 -2
  31. package/dist/lib/modules/coupon/services/individual-store-coupon.service.js.map +1 -1
  32. package/dist/lib/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
  33. package/dist/lib/modules/coupon/services/individual-user-coupon.service.js +6 -0
  34. package/dist/lib/modules/coupon/services/individual-user-coupon.service.js.map +1 -1
  35. package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts +10 -4
  36. package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -1
  37. package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js +88 -9
  38. package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js.map +1 -1
  39. package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
  40. package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js +20 -1
  41. package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js.map +1 -1
  42. package/dist/lib/modules/coupon/services/referral-code-coupon.service.d.ts.map +1 -1
  43. package/dist/lib/modules/coupon/services/referral-code-coupon.service.js +1 -1
  44. package/dist/lib/modules/coupon/services/referral-code-coupon.service.js.map +1 -1
  45. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.d.ts +1 -1
  46. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
  47. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js +36 -19
  48. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js.map +1 -1
  49. package/dist/lib/modules/coupon/services/shops-categories-coupon.service.d.ts +2 -0
  50. package/dist/lib/modules/coupon/services/shops-categories-coupon.service.d.ts.map +1 -1
  51. package/dist/lib/modules/coupon/services/shops-categories-coupon.service.js +2 -2
  52. package/dist/lib/modules/coupon/services/shops-categories-coupon.service.js.map +1 -1
  53. package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +359 -34
  54. package/dist/lib/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
  55. package/dist/lib/modules/coupon/validations/coupon.validation.js +16 -3
  56. package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
  57. package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts +6 -6
  58. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +6 -6
  59. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +30 -30
  60. package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
  61. package/dist/lib/modules/marketing/services/marketing.service.js +8 -2
  62. package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
  63. package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.d.ts +2 -0
  64. package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
  65. package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js +14 -0
  66. package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js.map +1 -1
  67. package/dist/lib/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +24 -24
  68. package/dist/lib/modules/marketing/validations/discount-marketing.validation.d.ts +36 -36
  69. package/dist/lib/modules/marketing/validations/featured-marketing.validation.d.ts +6 -6
  70. package/dist/lib/modules/marketing/validations/free-delivery-marketing.validation.d.ts +4 -4
  71. package/dist/lib/modules/marketing/validations/marketing.validation.d.ts +2 -2
  72. package/dist/lib/modules/marketing/validations/product-marketing.validation.d.ts +7 -7
  73. package/dist/lib/modules/marketing/validations/punch-marketing.validation.d.ts +4 -4
  74. package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
  75. package/dist/lib/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
  76. package/dist/lib/modules/tournament/config/config.builder.d.ts +5 -0
  77. package/dist/lib/modules/tournament/config/config.builder.d.ts.map +1 -0
  78. package/dist/lib/modules/tournament/config/config.builder.js +19 -0
  79. package/dist/lib/modules/tournament/config/config.builder.js.map +1 -0
  80. package/dist/lib/modules/tournament/config/config.repository.d.ts +13 -0
  81. package/dist/lib/modules/tournament/config/config.repository.d.ts.map +1 -0
  82. package/dist/lib/modules/tournament/config/config.repository.js +77 -0
  83. package/dist/lib/modules/tournament/config/config.repository.js.map +1 -0
  84. package/dist/lib/modules/tournament/config/config.router.d.ts +363 -0
  85. package/dist/lib/modules/tournament/config/config.router.d.ts.map +1 -0
  86. package/dist/lib/modules/tournament/config/config.router.js +40 -0
  87. package/dist/lib/modules/tournament/config/config.router.js.map +1 -0
  88. package/dist/lib/modules/tournament/config/config.service.d.ts +14 -0
  89. package/dist/lib/modules/tournament/config/config.service.d.ts.map +1 -0
  90. package/dist/lib/modules/tournament/config/config.service.js +101 -0
  91. package/dist/lib/modules/tournament/config/config.service.js.map +1 -0
  92. package/dist/lib/modules/tournament/config/config.validation.d.ts +1014 -0
  93. package/dist/lib/modules/tournament/config/config.validation.d.ts.map +1 -0
  94. package/dist/lib/modules/tournament/config/config.validation.js +70 -0
  95. package/dist/lib/modules/tournament/config/config.validation.js.map +1 -0
  96. package/dist/lib/modules/tournament/match/events/match-ended.consumer.d.ts +2 -0
  97. package/dist/lib/modules/tournament/match/events/match-ended.consumer.d.ts.map +1 -0
  98. package/dist/lib/modules/tournament/match/events/match-ended.consumer.js +15 -0
  99. package/dist/lib/modules/tournament/match/events/match-ended.consumer.js.map +1 -0
  100. package/dist/lib/modules/tournament/match/events/match-ended.event.d.ts +14 -0
  101. package/dist/lib/modules/tournament/match/events/match-ended.event.d.ts.map +1 -0
  102. package/dist/lib/modules/tournament/match/events/match-ended.event.js +12 -0
  103. package/dist/lib/modules/tournament/match/events/match-ended.event.js.map +1 -0
  104. package/dist/lib/modules/tournament/match/match.builder.d.ts +38 -0
  105. package/dist/lib/modules/tournament/match/match.builder.d.ts.map +1 -0
  106. package/dist/lib/modules/tournament/match/match.builder.js +37 -0
  107. package/dist/lib/modules/tournament/match/match.builder.js.map +1 -0
  108. package/dist/lib/modules/tournament/match/match.repository.d.ts +13 -0
  109. package/dist/lib/modules/tournament/match/match.repository.d.ts.map +1 -0
  110. package/dist/lib/modules/tournament/match/match.repository.js +84 -0
  111. package/dist/lib/modules/tournament/match/match.repository.js.map +1 -0
  112. package/dist/lib/modules/tournament/match/match.router.d.ts +489 -0
  113. package/dist/lib/modules/tournament/match/match.router.d.ts.map +1 -0
  114. package/dist/lib/modules/tournament/match/match.router.js +56 -0
  115. package/dist/lib/modules/tournament/match/match.router.js.map +1 -0
  116. package/dist/lib/modules/tournament/match/match.service.d.ts +29 -0
  117. package/dist/lib/modules/tournament/match/match.service.d.ts.map +1 -0
  118. package/dist/lib/modules/tournament/match/match.service.js +193 -0
  119. package/dist/lib/modules/tournament/match/match.service.js.map +1 -0
  120. package/dist/lib/modules/tournament/match/match.validation.d.ts +880 -0
  121. package/dist/lib/modules/tournament/match/match.validation.d.ts.map +1 -0
  122. package/dist/lib/modules/tournament/match/match.validation.js +74 -0
  123. package/dist/lib/modules/tournament/match/match.validation.js.map +1 -0
  124. package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts +13 -0
  125. package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts.map +1 -0
  126. package/dist/lib/modules/tournament/notification/jobs/notification.producer.js +28 -0
  127. package/dist/lib/modules/tournament/notification/jobs/notification.producer.js.map +1 -0
  128. package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts +7 -0
  129. package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts.map +1 -0
  130. package/dist/lib/modules/tournament/notification/jobs/notification.worker.js +76 -0
  131. package/dist/lib/modules/tournament/notification/jobs/notification.worker.js.map +1 -0
  132. package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts +10 -0
  133. package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts.map +1 -0
  134. package/dist/lib/modules/tournament/notification/notification.scheduler.service.js +86 -0
  135. package/dist/lib/modules/tournament/notification/notification.scheduler.service.js.map +1 -0
  136. package/dist/lib/modules/tournament/notification/notification.service.d.ts +11 -0
  137. package/dist/lib/modules/tournament/notification/notification.service.d.ts.map +1 -0
  138. package/dist/lib/modules/tournament/notification/notification.service.js +101 -0
  139. package/dist/lib/modules/tournament/notification/notification.service.js.map +1 -0
  140. package/dist/lib/modules/tournament/participant/participant.repository.d.ts +12 -0
  141. package/dist/lib/modules/tournament/participant/participant.repository.d.ts.map +1 -0
  142. package/dist/lib/modules/tournament/participant/participant.repository.js +73 -0
  143. package/dist/lib/modules/tournament/participant/participant.repository.js.map +1 -0
  144. package/dist/lib/modules/tournament/participant/participant.router.d.ts +104 -0
  145. package/dist/lib/modules/tournament/participant/participant.router.d.ts.map +1 -0
  146. package/dist/lib/modules/tournament/participant/participant.router.js +28 -0
  147. package/dist/lib/modules/tournament/participant/participant.router.js.map +1 -0
  148. package/dist/lib/modules/tournament/participant/participant.service.d.ts +14 -0
  149. package/dist/lib/modules/tournament/participant/participant.service.d.ts.map +1 -0
  150. package/dist/lib/modules/tournament/participant/participant.service.js +103 -0
  151. package/dist/lib/modules/tournament/participant/participant.service.js.map +1 -0
  152. package/dist/lib/modules/tournament/participant/participant.validation.d.ts +719 -0
  153. package/dist/lib/modules/tournament/participant/participant.validation.d.ts.map +1 -0
  154. package/dist/lib/modules/tournament/participant/participant.validation.js +44 -0
  155. package/dist/lib/modules/tournament/participant/participant.validation.js.map +1 -0
  156. package/dist/lib/modules/tournament/prediction/prediction.builder.d.ts +14 -0
  157. package/dist/lib/modules/tournament/prediction/prediction.builder.d.ts.map +1 -0
  158. package/dist/lib/modules/tournament/prediction/prediction.builder.js +23 -0
  159. package/dist/lib/modules/tournament/prediction/prediction.builder.js.map +1 -0
  160. package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts +11 -0
  161. package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts.map +1 -0
  162. package/dist/lib/modules/tournament/prediction/prediction.repository.js +73 -0
  163. package/dist/lib/modules/tournament/prediction/prediction.repository.js.map +1 -0
  164. package/dist/lib/modules/tournament/prediction/prediction.router.d.ts +133 -0
  165. package/dist/lib/modules/tournament/prediction/prediction.router.d.ts.map +1 -0
  166. package/dist/lib/modules/tournament/prediction/prediction.router.js +36 -0
  167. package/dist/lib/modules/tournament/prediction/prediction.router.js.map +1 -0
  168. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts +17 -0
  169. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts.map +1 -0
  170. package/dist/lib/modules/tournament/prediction/prediction.service.js +125 -0
  171. package/dist/lib/modules/tournament/prediction/prediction.service.js.map +1 -0
  172. package/dist/lib/modules/tournament/prediction/prediction.validation.d.ts +575 -0
  173. package/dist/lib/modules/tournament/prediction/prediction.validation.d.ts.map +1 -0
  174. package/dist/lib/modules/tournament/prediction/prediction.validation.js +46 -0
  175. package/dist/lib/modules/tournament/prediction/prediction.validation.js.map +1 -0
  176. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +8 -0
  177. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -0
  178. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js +65 -0
  179. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js.map +1 -0
  180. package/dist/lib/modules/tournament/reward/reward.factory.d.ts +6 -0
  181. package/dist/lib/modules/tournament/reward/reward.factory.d.ts.map +1 -0
  182. package/dist/lib/modules/tournament/reward/reward.factory.js +21 -0
  183. package/dist/lib/modules/tournament/reward/reward.factory.js.map +1 -0
  184. package/dist/lib/modules/tournament/reward/reward.interface.d.ts +5 -0
  185. package/dist/lib/modules/tournament/reward/reward.interface.d.ts.map +1 -0
  186. package/dist/lib/modules/tournament/reward/reward.interface.js +3 -0
  187. package/dist/lib/modules/tournament/reward/reward.interface.js.map +1 -0
  188. package/dist/lib/modules/tournament/reward/reward.service.d.ts +6 -0
  189. package/dist/lib/modules/tournament/reward/reward.service.d.ts.map +1 -0
  190. package/dist/lib/modules/tournament/reward/reward.service.js +56 -0
  191. package/dist/lib/modules/tournament/reward/reward.service.js.map +1 -0
  192. package/dist/lib/modules/tournament/reward/reward.types.d.ts +11 -0
  193. package/dist/lib/modules/tournament/reward/reward.types.d.ts.map +1 -0
  194. package/dist/lib/modules/tournament/reward/reward.types.js +8 -0
  195. package/dist/lib/modules/tournament/reward/reward.types.js.map +1 -0
  196. package/dist/lib/modules/tournament/team/team.builder.d.ts +19 -0
  197. package/dist/lib/modules/tournament/team/team.builder.d.ts.map +1 -0
  198. package/dist/lib/modules/tournament/team/team.builder.js +18 -0
  199. package/dist/lib/modules/tournament/team/team.builder.js.map +1 -0
  200. package/dist/lib/modules/tournament/team/team.repository.d.ts +11 -0
  201. package/dist/lib/modules/tournament/team/team.repository.d.ts.map +1 -0
  202. package/dist/lib/modules/tournament/team/team.repository.js +71 -0
  203. package/dist/lib/modules/tournament/team/team.repository.js.map +1 -0
  204. package/dist/lib/modules/tournament/team/team.router.d.ts +237 -0
  205. package/dist/lib/modules/tournament/team/team.router.d.ts.map +1 -0
  206. package/dist/lib/modules/tournament/team/team.router.js +36 -0
  207. package/dist/lib/modules/tournament/team/team.router.js.map +1 -0
  208. package/dist/lib/modules/tournament/team/team.service.d.ts +15 -0
  209. package/dist/lib/modules/tournament/team/team.service.d.ts.map +1 -0
  210. package/dist/lib/modules/tournament/team/team.service.js +137 -0
  211. package/dist/lib/modules/tournament/team/team.service.js.map +1 -0
  212. package/dist/lib/modules/tournament/team/team.validation.d.ts +986 -0
  213. package/dist/lib/modules/tournament/team/team.validation.d.ts.map +1 -0
  214. package/dist/lib/modules/tournament/team/team.validation.js +55 -0
  215. package/dist/lib/modules/tournament/team/team.validation.js.map +1 -0
  216. package/dist/lib/modules/tournament/tournament.router.d.ts +1336 -0
  217. package/dist/lib/modules/tournament/tournament.router.d.ts.map +1 -0
  218. package/dist/lib/modules/tournament/tournament.router.js +17 -0
  219. package/dist/lib/modules/tournament/tournament.router.js.map +1 -0
  220. package/dist/types/event/event-initializations.d.ts.map +1 -1
  221. package/dist/types/events/event-initializations.d.ts +2 -0
  222. package/dist/types/events/event-initializations.d.ts.map +1 -0
  223. package/dist/types/index.d.ts +1414 -13
  224. package/dist/types/index.d.ts.map +1 -1
  225. package/dist/types/modules/coupon/routers/coupon.router.d.ts +72 -6
  226. package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
  227. package/dist/types/modules/coupon/services/coupon.service.d.ts +1 -0
  228. package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
  229. package/dist/types/modules/coupon/services/custom-coupon.service.d.ts +2 -0
  230. package/dist/types/modules/coupon/services/custom-coupon.service.d.ts.map +1 -1
  231. package/dist/types/modules/coupon/services/global-coupon.service.d.ts +1 -1
  232. package/dist/types/modules/coupon/services/global-coupon.service.d.ts.map +1 -1
  233. package/dist/types/modules/coupon/services/helper.service.d.ts +2 -1
  234. package/dist/types/modules/coupon/services/helper.service.d.ts.map +1 -1
  235. package/dist/types/modules/coupon/services/individual-store-coupon.service.d.ts +2 -0
  236. package/dist/types/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
  237. package/dist/types/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
  238. package/dist/types/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts +10 -4
  239. package/dist/types/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -1
  240. package/dist/types/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
  241. package/dist/types/modules/coupon/services/referral-code-coupon.service.d.ts.map +1 -1
  242. package/dist/types/modules/coupon/services/referral-reward-coupon.service.d.ts +1 -1
  243. package/dist/types/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
  244. package/dist/types/modules/coupon/services/shops-categories-coupon.service.d.ts +2 -0
  245. package/dist/types/modules/coupon/services/shops-categories-coupon.service.d.ts.map +1 -1
  246. package/dist/types/modules/coupon/validations/coupon.validation.d.ts +359 -34
  247. package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
  248. package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts +6 -6
  249. package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +6 -6
  250. package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +30 -30
  251. package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
  252. package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts +2 -0
  253. package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
  254. package/dist/types/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +24 -24
  255. package/dist/types/modules/marketing/validations/discount-marketing.validation.d.ts +36 -36
  256. package/dist/types/modules/marketing/validations/featured-marketing.validation.d.ts +6 -6
  257. package/dist/types/modules/marketing/validations/free-delivery-marketing.validation.d.ts +4 -4
  258. package/dist/types/modules/marketing/validations/marketing.validation.d.ts +2 -2
  259. package/dist/types/modules/marketing/validations/product-marketing.validation.d.ts +7 -7
  260. package/dist/types/modules/marketing/validations/punch-marketing.validation.d.ts +4 -4
  261. package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
  262. package/dist/types/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
  263. package/dist/types/modules/tournament/config/config.builder.d.ts +5 -0
  264. package/dist/types/modules/tournament/config/config.builder.d.ts.map +1 -0
  265. package/dist/types/modules/tournament/config/config.repository.d.ts +13 -0
  266. package/dist/types/modules/tournament/config/config.repository.d.ts.map +1 -0
  267. package/dist/types/modules/tournament/config/config.router.d.ts +363 -0
  268. package/dist/types/modules/tournament/config/config.router.d.ts.map +1 -0
  269. package/dist/types/modules/tournament/config/config.service.d.ts +14 -0
  270. package/dist/types/modules/tournament/config/config.service.d.ts.map +1 -0
  271. package/dist/types/modules/tournament/config/config.validation.d.ts +1014 -0
  272. package/dist/types/modules/tournament/config/config.validation.d.ts.map +1 -0
  273. package/dist/types/modules/tournament/config/tournament-config.validation.d.ts +201 -0
  274. package/dist/types/modules/tournament/config/tournament-config.validation.d.ts.map +1 -0
  275. package/dist/types/modules/tournament/match/events/match-ended.consumer.d.ts +2 -0
  276. package/dist/types/modules/tournament/match/events/match-ended.consumer.d.ts.map +1 -0
  277. package/dist/types/modules/tournament/match/events/match-ended.event.d.ts +14 -0
  278. package/dist/types/modules/tournament/match/events/match-ended.event.d.ts.map +1 -0
  279. package/dist/types/modules/tournament/match/match.builder.d.ts +38 -0
  280. package/dist/types/modules/tournament/match/match.builder.d.ts.map +1 -0
  281. package/dist/types/modules/tournament/match/match.repository.d.ts +13 -0
  282. package/dist/types/modules/tournament/match/match.repository.d.ts.map +1 -0
  283. package/dist/types/modules/tournament/match/match.router.d.ts +489 -0
  284. package/dist/types/modules/tournament/match/match.router.d.ts.map +1 -0
  285. package/dist/types/modules/tournament/match/match.service.d.ts +29 -0
  286. package/dist/types/modules/tournament/match/match.service.d.ts.map +1 -0
  287. package/dist/types/modules/tournament/match/match.validation.d.ts +880 -0
  288. package/dist/types/modules/tournament/match/match.validation.d.ts.map +1 -0
  289. package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts +13 -0
  290. package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts.map +1 -0
  291. package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts +7 -0
  292. package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts.map +1 -0
  293. package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts +10 -0
  294. package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts.map +1 -0
  295. package/dist/types/modules/tournament/notification/notification.service.d.ts +11 -0
  296. package/dist/types/modules/tournament/notification/notification.service.d.ts.map +1 -0
  297. package/dist/types/modules/tournament/participant/participant.repository.d.ts +12 -0
  298. package/dist/types/modules/tournament/participant/participant.repository.d.ts.map +1 -0
  299. package/dist/types/modules/tournament/participant/participant.router.d.ts +104 -0
  300. package/dist/types/modules/tournament/participant/participant.router.d.ts.map +1 -0
  301. package/dist/types/modules/tournament/participant/participant.service.d.ts +14 -0
  302. package/dist/types/modules/tournament/participant/participant.service.d.ts.map +1 -0
  303. package/dist/types/modules/tournament/participant/participant.validation.d.ts +719 -0
  304. package/dist/types/modules/tournament/participant/participant.validation.d.ts.map +1 -0
  305. package/dist/types/modules/tournament/prediction/prediction.builder.d.ts +14 -0
  306. package/dist/types/modules/tournament/prediction/prediction.builder.d.ts.map +1 -0
  307. package/dist/types/modules/tournament/prediction/prediction.repository.d.ts +11 -0
  308. package/dist/types/modules/tournament/prediction/prediction.repository.d.ts.map +1 -0
  309. package/dist/types/modules/tournament/prediction/prediction.router.d.ts +133 -0
  310. package/dist/types/modules/tournament/prediction/prediction.router.d.ts.map +1 -0
  311. package/dist/types/modules/tournament/prediction/prediction.service.d.ts +17 -0
  312. package/dist/types/modules/tournament/prediction/prediction.service.d.ts.map +1 -0
  313. package/dist/types/modules/tournament/prediction/prediction.validation.d.ts +575 -0
  314. package/dist/types/modules/tournament/prediction/prediction.validation.d.ts.map +1 -0
  315. package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +8 -0
  316. package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -0
  317. package/dist/types/modules/tournament/reward/reward.factory.d.ts +6 -0
  318. package/dist/types/modules/tournament/reward/reward.factory.d.ts.map +1 -0
  319. package/dist/types/modules/tournament/reward/reward.interface.d.ts +5 -0
  320. package/dist/types/modules/tournament/reward/reward.interface.d.ts.map +1 -0
  321. package/dist/types/modules/tournament/reward/reward.service.d.ts +6 -0
  322. package/dist/types/modules/tournament/reward/reward.service.d.ts.map +1 -0
  323. package/dist/types/modules/tournament/reward/reward.types.d.ts +11 -0
  324. package/dist/types/modules/tournament/reward/reward.types.d.ts.map +1 -0
  325. package/dist/types/modules/tournament/team/team.builder.d.ts +19 -0
  326. package/dist/types/modules/tournament/team/team.builder.d.ts.map +1 -0
  327. package/dist/types/modules/tournament/team/team.repository.d.ts +11 -0
  328. package/dist/types/modules/tournament/team/team.repository.d.ts.map +1 -0
  329. package/dist/types/modules/tournament/team/team.router.d.ts +237 -0
  330. package/dist/types/modules/tournament/team/team.router.d.ts.map +1 -0
  331. package/dist/types/modules/tournament/team/team.service.d.ts +15 -0
  332. package/dist/types/modules/tournament/team/team.service.d.ts.map +1 -0
  333. package/dist/types/modules/tournament/team/team.validation.d.ts +986 -0
  334. package/dist/types/modules/tournament/team/team.validation.d.ts.map +1 -0
  335. package/dist/types/modules/tournament/tournament.router.d.ts +1336 -0
  336. package/dist/types/modules/tournament/tournament.router.d.ts.map +1 -0
  337. package/package.json +3 -3
  338. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts +0 -1
  339. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts.map +0 -1
  340. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js +0 -2
  341. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js.map +0 -1
@@ -0,0 +1,65 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ var __metadata = (this && this.__metadata) || function (k, v) {
42
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.CouponRewardHandler = void 0;
46
+ const typedi_1 = __importStar(require("typedi"));
47
+ const individual_user_coupon_service_1 = require("../../../coupon/services/individual-user-coupon.service");
48
+ let CouponRewardHandler = class CouponRewardHandler {
49
+ couponService;
50
+ constructor() {
51
+ this.couponService = typedi_1.default.get(individual_user_coupon_service_1.IndividualUserCouponService);
52
+ }
53
+ async grant(context) {
54
+ await this.couponService.create({
55
+ ...context.payload,
56
+ users: [context.userId],
57
+ });
58
+ }
59
+ };
60
+ exports.CouponRewardHandler = CouponRewardHandler;
61
+ exports.CouponRewardHandler = CouponRewardHandler = __decorate([
62
+ (0, typedi_1.Service)(),
63
+ __metadata("design:paramtypes", [])
64
+ ], CouponRewardHandler);
65
+ //# sourceMappingURL=coupon-reward.handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coupon-reward.handler.js","sourceRoot":"/","sources":["modules/tournament/reward/handlers/coupon-reward.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAG5C,4GAAsG;AAG/F,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IACpB,aAAa,CAA8B;IAEnD;QACI,IAAI,CAAC,aAAa,GAAG,gBAAS,CAAC,GAAG,CAAC,4DAA2B,CAAC,CAAC;IACpE,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAsB;QAC9B,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;YAC5B,GAAG,OAAO,CAAC,OAAO;YAClB,KAAK,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;SACnB,CAAC,CAAC;IACd,CAAC;CACJ,CAAA;AAbY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,gBAAO,GAAE;;GACG,mBAAmB,CAa/B","sourcesContent":["import Container, { Service } from 'typedi';\nimport { IRewardHandler } from '../reward.interface';\nimport { RewardContext } from '../reward.types';\nimport { IndividualUserCouponService } from '@modules/coupon/services/individual-user-coupon.service';\n\n@Service()\nexport class CouponRewardHandler implements IRewardHandler {\n private couponService: IndividualUserCouponService;\n\n constructor() {\n this.couponService = Container.get(IndividualUserCouponService);\n }\n\n async grant(context: RewardContext): Promise<void> {\n await this.couponService.create({\n ...context.payload,\n users: [context.userId],\n } as any);\n }\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import { RewardType } from './reward.types';
2
+ import { IRewardHandler } from './reward.interface';
3
+ export declare class RewardFactory {
4
+ static getHandler(type: RewardType): IRewardHandler;
5
+ }
6
+ //# sourceMappingURL=reward.factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reward.factory.d.ts","sourceRoot":"/","sources":["modules/tournament/reward/reward.factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,qBAAa,aAAa;IACtB,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc;CAQtD"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RewardFactory = void 0;
7
+ const typedi_1 = __importDefault(require("typedi"));
8
+ const reward_types_1 = require("./reward.types");
9
+ const coupon_reward_handler_1 = require("./handlers/coupon-reward.handler");
10
+ class RewardFactory {
11
+ static getHandler(type) {
12
+ switch (type) {
13
+ case reward_types_1.RewardType.COUPON:
14
+ return typedi_1.default.get(coupon_reward_handler_1.CouponRewardHandler);
15
+ default:
16
+ throw new Error(`No handler registered for reward type: ${type}`);
17
+ }
18
+ }
19
+ }
20
+ exports.RewardFactory = RewardFactory;
21
+ //# sourceMappingURL=reward.factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reward.factory.js","sourceRoot":"/","sources":["modules/tournament/reward/reward.factory.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA+B;AAC/B,iDAA4C;AAE5C,4EAAuE;AAEvE,MAAa,aAAa;IACtB,MAAM,CAAC,UAAU,CAAC,IAAgB;QAC9B,QAAQ,IAAI,EAAE,CAAC;YACX,KAAK,yBAAU,CAAC,MAAM;gBAClB,OAAO,gBAAS,CAAC,GAAG,CAAC,2CAAmB,CAAC,CAAC;YAC9C;gBACI,MAAM,IAAI,KAAK,CAAC,0CAA0C,IAAI,EAAE,CAAC,CAAC;QAC1E,CAAC;IACL,CAAC;CACJ;AATD,sCASC","sourcesContent":["import Container from 'typedi';\nimport { RewardType } from './reward.types';\nimport { IRewardHandler } from './reward.interface';\nimport { CouponRewardHandler } from './handlers/coupon-reward.handler';\n\nexport class RewardFactory {\n static getHandler(type: RewardType): IRewardHandler {\n switch (type) {\n case RewardType.COUPON:\n return Container.get(CouponRewardHandler);\n default:\n throw new Error(`No handler registered for reward type: ${type}`);\n }\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { RewardContext } from './reward.types';
2
+ export interface IRewardHandler {
3
+ grant(context: RewardContext): Promise<void>;
4
+ }
5
+ //# sourceMappingURL=reward.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reward.interface.d.ts","sourceRoot":"/","sources":["modules/tournament/reward/reward.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC3B,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=reward.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reward.interface.js","sourceRoot":"/","sources":["modules/tournament/reward/reward.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { RewardContext } from './reward.types';\n\nexport interface IRewardHandler {\n grant(context: RewardContext): Promise<void>;\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import { RewardContext, RewardType } from './reward.types';
2
+ export declare class RewardService {
3
+ grant(type: RewardType, context: RewardContext): Promise<void>;
4
+ }
5
+ export declare const rewardService: RewardService;
6
+ //# sourceMappingURL=reward.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reward.service.d.ts","sourceRoot":"/","sources":["modules/tournament/reward/reward.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG3D,qBACa,aAAa;IAChB,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;CAIvE;AAED,eAAO,MAAM,aAAa,eAA+B,CAAC"}
@@ -0,0 +1,56 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.rewardService = exports.RewardService = void 0;
43
+ const typedi_1 = __importStar(require("typedi"));
44
+ const reward_factory_1 = require("./reward.factory");
45
+ let RewardService = class RewardService {
46
+ async grant(type, context) {
47
+ const handler = reward_factory_1.RewardFactory.getHandler(type);
48
+ await handler.grant(context);
49
+ }
50
+ };
51
+ exports.RewardService = RewardService;
52
+ exports.RewardService = RewardService = __decorate([
53
+ (0, typedi_1.Service)()
54
+ ], RewardService);
55
+ exports.rewardService = typedi_1.default.get(RewardService);
56
+ //# sourceMappingURL=reward.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reward.service.js","sourceRoot":"/","sources":["modules/tournament/reward/reward.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAE5C,qDAAiD;AAG1C,IAAM,aAAa,GAAnB,MAAM,aAAa;IACtB,KAAK,CAAC,KAAK,CAAC,IAAgB,EAAE,OAAsB;QAChD,MAAM,OAAO,GAAG,8BAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;CACJ,CAAA;AALY,sCAAa;wBAAb,aAAa;IADzB,IAAA,gBAAO,GAAE;GACG,aAAa,CAKzB;AAEY,QAAA,aAAa,GAAG,gBAAS,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import Container, { Service } from 'typedi';\nimport { RewardContext, RewardType } from './reward.types';\nimport { RewardFactory } from './reward.factory';\n\n@Service()\nexport class RewardService {\n async grant(type: RewardType, context: RewardContext): Promise<void> {\n const handler = RewardFactory.getHandler(type);\n await handler.grant(context);\n }\n}\n\nexport const rewardService = Container.get(RewardService);\n"]}
@@ -0,0 +1,11 @@
1
+ import { mongoose } from '@typegoose/typegoose';
2
+ export declare enum RewardType {
3
+ COUPON = "coupon"
4
+ }
5
+ export interface RewardContext {
6
+ userId: mongoose.Types.ObjectId;
7
+ tournamentId: mongoose.Types.ObjectId;
8
+ matchId: mongoose.Types.ObjectId;
9
+ payload: Record<string, unknown>;
10
+ }
11
+ //# sourceMappingURL=reward.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reward.types.d.ts","sourceRoot":"/","sources":["modules/tournament/reward/reward.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,oBAAY,UAAU;IAClB,MAAM,WAAW;CACpB;AAED,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAChC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACtC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RewardType = void 0;
4
+ var RewardType;
5
+ (function (RewardType) {
6
+ RewardType["COUPON"] = "coupon";
7
+ })(RewardType || (exports.RewardType = RewardType = {}));
8
+ //# sourceMappingURL=reward.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reward.types.js","sourceRoot":"/","sources":["modules/tournament/reward/reward.types.ts"],"names":[],"mappings":";;;AAEA,IAAY,UAEX;AAFD,WAAY,UAAU;IAClB,+BAAiB,CAAA;AACrB,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB","sourcesContent":["import { mongoose } from '@typegoose/typegoose';\n\nexport enum RewardType {\n COUPON = 'coupon',\n}\n\nexport interface RewardContext {\n userId: mongoose.Types.ObjectId;\n tournamentId: mongoose.Types.ObjectId;\n matchId: mongoose.Types.ObjectId;\n payload: Record<string, unknown>;\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import { mongoose } from '@typegoose/typegoose';
2
+ interface TeamInput {
3
+ name: string;
4
+ picture?: string;
5
+ }
6
+ export declare class TeamBuilder {
7
+ static buildTeam(input: TeamInput): {
8
+ _id: mongoose.Types.ObjectId;
9
+ name: string;
10
+ picture: string | undefined;
11
+ };
12
+ static buildTeams(inputs: TeamInput[]): {
13
+ _id: mongoose.Types.ObjectId;
14
+ name: string;
15
+ picture: string | undefined;
16
+ }[];
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=team.builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team.builder.d.ts","sourceRoot":"/","sources":["modules/tournament/team/team.builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,UAAU,SAAS;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,WAAW;IACpB,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS;;;;;IAQjC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE;;;;;CAGxC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamBuilder = void 0;
4
+ const typegoose_1 = require("@typegoose/typegoose");
5
+ class TeamBuilder {
6
+ static buildTeam(input) {
7
+ return {
8
+ _id: new typegoose_1.mongoose.Types.ObjectId(),
9
+ name: input.name,
10
+ picture: input.picture,
11
+ };
12
+ }
13
+ static buildTeams(inputs) {
14
+ return inputs.map(TeamBuilder.buildTeam);
15
+ }
16
+ }
17
+ exports.TeamBuilder = TeamBuilder;
18
+ //# sourceMappingURL=team.builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team.builder.js","sourceRoot":"/","sources":["modules/tournament/team/team.builder.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAOhD,MAAa,WAAW;IACpB,MAAM,CAAC,SAAS,CAAC,KAAgB;QAC7B,OAAO;YACH,GAAG,EAAE,IAAI,oBAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE;YAClC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,OAAO,EAAE,KAAK,CAAC,OAAO;SACzB,CAAC;IACN,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,MAAmB;QACjC,OAAO,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;CACJ;AAZD,kCAYC","sourcesContent":["import { mongoose } from '@typegoose/typegoose';\n\ninterface TeamInput {\n name: string;\n picture?: string;\n}\n\nexport class TeamBuilder {\n static buildTeam(input: TeamInput) {\n return {\n _id: new mongoose.Types.ObjectId(),\n name: input.name,\n picture: input.picture,\n };\n }\n\n static buildTeams(inputs: TeamInput[]) {\n return inputs.map(TeamBuilder.buildTeam);\n }\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import { mongoose } from '@typegoose/typegoose';
2
+ import { Tournament as Model } from '@lyxa.ai/core/dist/libraries/mongo/models';
3
+ export declare class TournamentTeamRepository {
4
+ private model;
5
+ constructor();
6
+ findById(id: mongoose.Types.ObjectId): Promise<Model | null>;
7
+ findByTeamId(teamId: mongoose.Types.ObjectId): Promise<Model | null>;
8
+ addTeams(id: mongoose.Types.ObjectId, teams: object[]): Promise<Model | null>;
9
+ }
10
+ export declare const tournamentTeamRepository: TournamentTeamRepository;
11
+ //# sourceMappingURL=team.repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team.repository.d.ts","sourceRoot":"/","sources":["modules/tournament/team/team.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,UAAU,IAAI,KAAK,EAAmB,MAAM,2CAA2C,CAAC;AAEjG,qBACa,wBAAwB;IACpC,OAAO,CAAC,KAAK,CAAyB;;IAMhC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAI5D,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAIpE,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;CAKnF;AAED,eAAO,MAAM,wBAAwB,0BAA0C,CAAC"}
@@ -0,0 +1,71 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ var __metadata = (this && this.__metadata) || function (k, v) {
42
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.tournamentTeamRepository = exports.TournamentTeamRepository = void 0;
46
+ const typedi_1 = __importStar(require("typedi"));
47
+ const models_1 = require("@lyxa.ai/core/dist/libraries/mongo/models");
48
+ let TournamentTeamRepository = class TournamentTeamRepository {
49
+ model;
50
+ constructor() {
51
+ this.model = models_1.TournamentModel;
52
+ }
53
+ async findById(id) {
54
+ return this.model.findById(id).lean();
55
+ }
56
+ async findByTeamId(teamId) {
57
+ return this.model.findOne({ 'teams._id': teamId }).lean();
58
+ }
59
+ async addTeams(id, teams) {
60
+ return this.model
61
+ .findByIdAndUpdate(id, { $push: { teams: { $each: teams } } }, { new: true })
62
+ .lean();
63
+ }
64
+ };
65
+ exports.TournamentTeamRepository = TournamentTeamRepository;
66
+ exports.TournamentTeamRepository = TournamentTeamRepository = __decorate([
67
+ (0, typedi_1.Service)(),
68
+ __metadata("design:paramtypes", [])
69
+ ], TournamentTeamRepository);
70
+ exports.tournamentTeamRepository = typedi_1.default.get(TournamentTeamRepository);
71
+ //# sourceMappingURL=team.repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team.repository.js","sourceRoot":"/","sources":["modules/tournament/team/team.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAE5C,sEAAiG;AAG1F,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAC5B,KAAK,CAAyB;IAEtC;QACC,IAAI,CAAC,KAAK,GAAG,wBAAe,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAA2B;QACzC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,EAA2B,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,MAA+B;QACjD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,EAA2B,CAAC;IACpF,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAA2B,EAAE,KAAe;QAC1D,OAAO,IAAI,CAAC,KAAK;aACf,iBAAiB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;aAC5E,IAAI,EAA2B,CAAC;IACnC,CAAC;CACD,CAAA;AApBY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,gBAAO,GAAE;;GACG,wBAAwB,CAoBpC;AAEY,QAAA,wBAAwB,GAAG,gBAAS,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC","sourcesContent":["import Container, { Service } from 'typedi';\nimport { mongoose } from '@typegoose/typegoose';\nimport { Tournament as Model, TournamentModel } from '@lyxa.ai/core/dist/libraries/mongo/models';\n\n@Service()\nexport class TournamentTeamRepository {\n\tprivate model: typeof TournamentModel;\n\n\tconstructor() {\n\t\tthis.model = TournamentModel;\n\t}\n\n\tasync findById(id: mongoose.Types.ObjectId): Promise<Model | null> {\n\t\treturn this.model.findById(id).lean() as Promise<Model | null>;\n\t}\n\n\tasync findByTeamId(teamId: mongoose.Types.ObjectId): Promise<Model | null> {\n\t\treturn this.model.findOne({ 'teams._id': teamId }).lean() as Promise<Model | null>;\n\t}\n\n\tasync addTeams(id: mongoose.Types.ObjectId, teams: object[]): Promise<Model | null> {\n\t\treturn this.model\n\t\t\t.findByIdAndUpdate(id, { $push: { teams: { $each: teams } } }, { new: true })\n\t\t\t.lean() as Promise<Model | null>;\n\t}\n}\n\nexport const tournamentTeamRepository = Container.get(TournamentTeamRepository);\n"]}
@@ -0,0 +1,237 @@
1
+ import { mongoose } from '@typegoose/typegoose';
2
+ export declare const teamRouter: import("@trpc/server").TRPCBuiltRouter<{
3
+ ctx: import("@lyxa.ai/core/dist/libraries/trpc/context").LyxaHTTPContext;
4
+ meta: object;
5
+ errorShape: {
6
+ message: string;
7
+ data: {
8
+ stack: undefined;
9
+ path: undefined;
10
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
11
+ httpStatus: number;
12
+ };
13
+ stack: undefined;
14
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
15
+ };
16
+ transformer: false;
17
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
18
+ add: import("@trpc/server").TRPCMutationProcedure<{
19
+ input: {
20
+ tournamentId: string | mongoose.Types.ObjectId;
21
+ teams: {
22
+ name: string;
23
+ picture?: string | undefined;
24
+ }[];
25
+ };
26
+ output: {
27
+ message: string;
28
+ success: boolean;
29
+ data?: {
30
+ status: import("@lyxa.ai/core/dist/utilities/enum").Status;
31
+ _id: string | mongoose.Types.ObjectId;
32
+ tag: string;
33
+ createdAt?: Date | null | undefined;
34
+ startDate?: Date | null | undefined;
35
+ endDate?: Date | null | undefined;
36
+ updatedAt?: Date | null | undefined;
37
+ matches?: {
38
+ _id: string | mongoose.Types.ObjectId;
39
+ team1: {
40
+ name: string;
41
+ teamId: string | mongoose.Types.ObjectId;
42
+ };
43
+ team2: {
44
+ name: string;
45
+ teamId: string | mongoose.Types.ObjectId;
46
+ };
47
+ score: {
48
+ team1: number | null;
49
+ team2: number | null;
50
+ };
51
+ stage: string;
52
+ endDate?: Date | null | undefined;
53
+ startingDate?: Date | null | undefined;
54
+ additionalTag?: string | undefined;
55
+ winnerId?: string | mongoose.Types.ObjectId | null | undefined;
56
+ }[] | undefined;
57
+ teams?: {
58
+ name: string;
59
+ _id: string | mongoose.Types.ObjectId;
60
+ picture?: string | null | undefined;
61
+ }[] | undefined;
62
+ } | {
63
+ documents: {
64
+ status: import("@lyxa.ai/core/dist/utilities/enum").Status;
65
+ _id: string | mongoose.Types.ObjectId;
66
+ tag: string;
67
+ createdAt?: Date | null | undefined;
68
+ startDate?: Date | null | undefined;
69
+ endDate?: Date | null | undefined;
70
+ updatedAt?: Date | null | undefined;
71
+ matches?: {
72
+ _id: string | mongoose.Types.ObjectId;
73
+ team1: {
74
+ name: string;
75
+ teamId: string | mongoose.Types.ObjectId;
76
+ };
77
+ team2: {
78
+ name: string;
79
+ teamId: string | mongoose.Types.ObjectId;
80
+ };
81
+ score: {
82
+ team1: number | null;
83
+ team2: number | null;
84
+ };
85
+ stage: string;
86
+ endDate?: Date | null | undefined;
87
+ startingDate?: Date | null | undefined;
88
+ additionalTag?: string | undefined;
89
+ winnerId?: string | mongoose.Types.ObjectId | null | undefined;
90
+ }[] | undefined;
91
+ teams?: {
92
+ name: string;
93
+ _id: string | mongoose.Types.ObjectId;
94
+ picture?: string | null | undefined;
95
+ }[] | undefined;
96
+ }[];
97
+ metadata?: {
98
+ page: number;
99
+ size: number;
100
+ totalElements: number;
101
+ totalPages: number;
102
+ } | undefined;
103
+ } | undefined;
104
+ };
105
+ meta: object;
106
+ }>;
107
+ getAll: import("@trpc/server").TRPCQueryProcedure<{
108
+ input: {
109
+ tournamentId: string | mongoose.Types.ObjectId;
110
+ };
111
+ output: {
112
+ message: string;
113
+ success: boolean;
114
+ data?: {
115
+ status: import("@lyxa.ai/core/dist/utilities/enum").Status;
116
+ tag: string;
117
+ tournamentId: string | mongoose.Types.ObjectId;
118
+ teams: {
119
+ name: string;
120
+ _id: string | mongoose.Types.ObjectId;
121
+ picture?: string | undefined;
122
+ }[];
123
+ startDate?: Date | null | undefined;
124
+ endDate?: Date | null | undefined;
125
+ } | {
126
+ documents: {
127
+ status: import("@lyxa.ai/core/dist/utilities/enum").Status;
128
+ tag: string;
129
+ tournamentId: string | mongoose.Types.ObjectId;
130
+ teams: {
131
+ name: string;
132
+ _id: string | mongoose.Types.ObjectId;
133
+ picture?: string | undefined;
134
+ }[];
135
+ startDate?: Date | null | undefined;
136
+ endDate?: Date | null | undefined;
137
+ }[];
138
+ metadata?: {
139
+ page: number;
140
+ size: number;
141
+ totalElements: number;
142
+ totalPages: number;
143
+ } | undefined;
144
+ } | undefined;
145
+ };
146
+ meta: object;
147
+ }>;
148
+ getMatches: import("@trpc/server").TRPCQueryProcedure<{
149
+ input: {
150
+ filter: "completed" | "upcoming";
151
+ tournamentId: string | mongoose.Types.ObjectId;
152
+ };
153
+ output: {
154
+ message: string;
155
+ success: boolean;
156
+ data?: {
157
+ status: import("@lyxa.ai/core/dist/utilities/enum").Status;
158
+ tag: string;
159
+ tournamentId: string | mongoose.Types.ObjectId;
160
+ matches: {
161
+ _id: string | mongoose.Types.ObjectId;
162
+ team1: {
163
+ name: string;
164
+ teamId: string | mongoose.Types.ObjectId;
165
+ };
166
+ team2: {
167
+ name: string;
168
+ teamId: string | mongoose.Types.ObjectId;
169
+ };
170
+ score: {
171
+ team1: number | null;
172
+ team2: number | null;
173
+ };
174
+ stage: string;
175
+ prediction: {
176
+ score: {
177
+ team1: number | null;
178
+ team2: number | null;
179
+ };
180
+ succeeded: boolean | null;
181
+ } | null;
182
+ canPredict: boolean;
183
+ endDate?: Date | null | undefined;
184
+ startingDate?: Date | null | undefined;
185
+ additionalTag?: string | undefined;
186
+ winnerId?: string | mongoose.Types.ObjectId | null | undefined;
187
+ }[];
188
+ startDate?: Date | null | undefined;
189
+ endDate?: Date | null | undefined;
190
+ } | {
191
+ documents: {
192
+ status: import("@lyxa.ai/core/dist/utilities/enum").Status;
193
+ tag: string;
194
+ tournamentId: string | mongoose.Types.ObjectId;
195
+ matches: {
196
+ _id: string | mongoose.Types.ObjectId;
197
+ team1: {
198
+ name: string;
199
+ teamId: string | mongoose.Types.ObjectId;
200
+ };
201
+ team2: {
202
+ name: string;
203
+ teamId: string | mongoose.Types.ObjectId;
204
+ };
205
+ score: {
206
+ team1: number | null;
207
+ team2: number | null;
208
+ };
209
+ stage: string;
210
+ prediction: {
211
+ score: {
212
+ team1: number | null;
213
+ team2: number | null;
214
+ };
215
+ succeeded: boolean | null;
216
+ } | null;
217
+ canPredict: boolean;
218
+ endDate?: Date | null | undefined;
219
+ startingDate?: Date | null | undefined;
220
+ additionalTag?: string | undefined;
221
+ winnerId?: string | mongoose.Types.ObjectId | null | undefined;
222
+ }[];
223
+ startDate?: Date | null | undefined;
224
+ endDate?: Date | null | undefined;
225
+ }[];
226
+ metadata?: {
227
+ page: number;
228
+ size: number;
229
+ totalElements: number;
230
+ totalPages: number;
231
+ } | undefined;
232
+ } | undefined;
233
+ };
234
+ meta: object;
235
+ }>;
236
+ }>>;
237
+ //# sourceMappingURL=team.router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team.router.d.ts","sourceRoot":"/","sources":["modules/tournament/team/team.router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAgBhD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BrB,CAAC"}