@lyxa.ai/marketing 1.0.48 → 1.0.50

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 (324) hide show
  1. package/dist/lib/event/event-initializations.js +2 -2
  2. package/dist/lib/event/event-initializations.js.map +1 -1
  3. package/dist/lib/index.d.ts +462 -508
  4. package/dist/lib/index.d.ts.map +1 -1
  5. package/dist/lib/modules/coupon/services/coupon.service.d.ts +2 -2
  6. package/dist/lib/modules/coupon/services/coupon.service.d.ts.map +1 -1
  7. package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
  8. package/dist/lib/modules/coupon/services/global-coupon.service.d.ts.map +1 -1
  9. package/dist/lib/modules/coupon/services/global-coupon.service.js +2 -0
  10. package/dist/lib/modules/coupon/services/global-coupon.service.js.map +1 -1
  11. package/dist/lib/modules/coupon/services/helper.service.d.ts.map +1 -1
  12. package/dist/lib/modules/coupon/services/helper.service.js +2 -0
  13. package/dist/lib/modules/coupon/services/helper.service.js.map +1 -1
  14. package/dist/lib/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
  15. package/dist/lib/modules/coupon/services/individual-user-coupon.service.js +2 -0
  16. package/dist/lib/modules/coupon/services/individual-user-coupon.service.js.map +1 -1
  17. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
  18. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js +2 -0
  19. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js.map +1 -1
  20. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts +10 -21
  21. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
  22. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js +5 -4
  23. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js.map +1 -1
  24. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +154 -0
  25. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
  26. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js +13 -1
  27. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js.map +1 -1
  28. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +8 -2
  29. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
  30. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js +11 -2
  31. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js.map +1 -1
  32. package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts +10 -21
  33. package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
  34. package/dist/lib/modules/tournament/config/config.builder.d.ts.map +1 -1
  35. package/dist/lib/modules/tournament/config/config.builder.js +4 -0
  36. package/dist/lib/modules/tournament/config/config.builder.js.map +1 -1
  37. package/dist/lib/modules/tournament/config/config.repository.d.ts +4 -0
  38. package/dist/lib/modules/tournament/config/config.repository.d.ts.map +1 -1
  39. package/dist/lib/modules/tournament/config/config.repository.js +10 -1
  40. package/dist/lib/modules/tournament/config/config.repository.js.map +1 -1
  41. package/dist/lib/modules/tournament/config/config.router.d.ts +106 -218
  42. package/dist/lib/modules/tournament/config/config.router.d.ts.map +1 -1
  43. package/dist/lib/modules/tournament/config/config.service.d.ts +2 -2
  44. package/dist/lib/modules/tournament/config/config.service.d.ts.map +1 -1
  45. package/dist/lib/modules/tournament/config/config.service.js.map +1 -1
  46. package/dist/lib/modules/tournament/config/config.validation.d.ts +446 -692
  47. package/dist/lib/modules/tournament/config/config.validation.d.ts.map +1 -1
  48. package/dist/lib/modules/tournament/config/config.validation.js +44 -28
  49. package/dist/lib/modules/tournament/config/config.validation.js.map +1 -1
  50. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.d.ts +2 -0
  51. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -0
  52. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js +28 -0
  53. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js.map +1 -0
  54. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.d.ts +15 -0
  55. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.d.ts.map +1 -0
  56. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.js +12 -0
  57. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.js.map +1 -0
  58. package/dist/lib/modules/tournament/match/match.builder.d.ts +5 -2
  59. package/dist/lib/modules/tournament/match/match.builder.d.ts.map +1 -1
  60. package/dist/lib/modules/tournament/match/match.builder.js +13 -7
  61. package/dist/lib/modules/tournament/match/match.builder.js.map +1 -1
  62. package/dist/lib/modules/tournament/match/match.repository.d.ts +2 -0
  63. package/dist/lib/modules/tournament/match/match.repository.d.ts.map +1 -1
  64. package/dist/lib/modules/tournament/match/match.repository.js +10 -0
  65. package/dist/lib/modules/tournament/match/match.repository.js.map +1 -1
  66. package/dist/lib/modules/tournament/match/match.router.d.ts +66 -191
  67. package/dist/lib/modules/tournament/match/match.router.d.ts.map +1 -1
  68. package/dist/lib/modules/tournament/match/match.router.js +0 -7
  69. package/dist/lib/modules/tournament/match/match.router.js.map +1 -1
  70. package/dist/lib/modules/tournament/match/match.service.d.ts +1 -12
  71. package/dist/lib/modules/tournament/match/match.service.d.ts.map +1 -1
  72. package/dist/lib/modules/tournament/match/match.service.js +18 -68
  73. package/dist/lib/modules/tournament/match/match.service.js.map +1 -1
  74. package/dist/lib/modules/tournament/match/match.validation.d.ts +96 -34
  75. package/dist/lib/modules/tournament/match/match.validation.d.ts.map +1 -1
  76. package/dist/lib/modules/tournament/match/match.validation.js +5 -2
  77. package/dist/lib/modules/tournament/match/match.validation.js.map +1 -1
  78. package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts +2 -5
  79. package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts.map +1 -1
  80. package/dist/lib/modules/tournament/notification/jobs/notification.producer.js +1 -6
  81. package/dist/lib/modules/tournament/notification/jobs/notification.producer.js.map +1 -1
  82. package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts +2 -0
  83. package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts.map +1 -1
  84. package/dist/lib/modules/tournament/notification/jobs/notification.worker.js +15 -9
  85. package/dist/lib/modules/tournament/notification/jobs/notification.worker.js.map +1 -1
  86. package/dist/lib/modules/tournament/notification/notification-template.repository.d.ts +8 -0
  87. package/dist/lib/modules/tournament/notification/notification-template.repository.d.ts.map +1 -0
  88. package/dist/lib/modules/tournament/notification/notification-template.repository.js +60 -0
  89. package/dist/lib/modules/tournament/notification/notification-template.repository.js.map +1 -0
  90. package/dist/lib/modules/tournament/notification/notification.config.d.ts +10 -0
  91. package/dist/lib/modules/tournament/notification/notification.config.d.ts.map +1 -0
  92. package/dist/lib/modules/tournament/notification/notification.config.js +15 -0
  93. package/dist/lib/modules/tournament/notification/notification.config.js.map +1 -0
  94. package/dist/lib/modules/tournament/notification/notification.schedule.config.d.ts +10 -0
  95. package/dist/lib/modules/tournament/notification/notification.schedule.config.d.ts.map +1 -0
  96. package/dist/lib/modules/tournament/notification/notification.schedule.config.js +15 -0
  97. package/dist/lib/modules/tournament/notification/notification.schedule.config.js.map +1 -0
  98. package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts +4 -4
  99. package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts.map +1 -1
  100. package/dist/lib/modules/tournament/notification/notification.scheduler.service.js +15 -28
  101. package/dist/lib/modules/tournament/notification/notification.scheduler.service.js.map +1 -1
  102. package/dist/lib/modules/tournament/notification/notification.service.d.ts +5 -3
  103. package/dist/lib/modules/tournament/notification/notification.service.d.ts.map +1 -1
  104. package/dist/lib/modules/tournament/notification/notification.service.js +33 -23
  105. package/dist/lib/modules/tournament/notification/notification.service.js.map +1 -1
  106. package/dist/lib/modules/tournament/participant/participant.repository.d.ts +1 -0
  107. package/dist/lib/modules/tournament/participant/participant.repository.d.ts.map +1 -1
  108. package/dist/lib/modules/tournament/participant/participant.repository.js +6 -0
  109. package/dist/lib/modules/tournament/participant/participant.repository.js.map +1 -1
  110. package/dist/lib/modules/tournament/participant/participant.router.d.ts +9 -9
  111. package/dist/lib/modules/tournament/participant/participant.validation.d.ts +84 -84
  112. package/dist/lib/modules/tournament/prediction/prediction.builder.d.ts.map +1 -1
  113. package/dist/lib/modules/tournament/prediction/prediction.builder.js +3 -2
  114. package/dist/lib/modules/tournament/prediction/prediction.builder.js.map +1 -1
  115. package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts +4 -1
  116. package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts.map +1 -1
  117. package/dist/lib/modules/tournament/prediction/prediction.repository.js +20 -2
  118. package/dist/lib/modules/tournament/prediction/prediction.repository.js.map +1 -1
  119. package/dist/lib/modules/tournament/prediction/prediction.router.d.ts +12 -12
  120. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts +9 -0
  121. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
  122. package/dist/lib/modules/tournament/prediction/prediction.service.js +30 -4
  123. package/dist/lib/modules/tournament/prediction/prediction.service.js.map +1 -1
  124. package/dist/lib/modules/tournament/prediction/prediction.validation.d.ts +64 -64
  125. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +3 -0
  126. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -1
  127. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js +21 -5
  128. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js.map +1 -1
  129. package/dist/lib/modules/tournament/reward/reward.builder.d.ts +6 -0
  130. package/dist/lib/modules/tournament/reward/reward.builder.d.ts.map +1 -0
  131. package/dist/lib/modules/tournament/reward/reward.builder.js +44 -0
  132. package/dist/lib/modules/tournament/reward/reward.builder.js.map +1 -0
  133. package/dist/lib/modules/tournament/reward/reward.interface.d.ts.map +1 -1
  134. package/dist/lib/modules/tournament/reward/reward.interface.js.map +1 -1
  135. package/dist/lib/modules/tournament/reward/reward.repository.d.ts +8 -0
  136. package/dist/lib/modules/tournament/reward/reward.repository.d.ts.map +1 -0
  137. package/dist/lib/modules/tournament/reward/reward.repository.js +66 -0
  138. package/dist/lib/modules/tournament/reward/reward.repository.js.map +1 -0
  139. package/dist/lib/modules/tournament/reward/reward.service.d.ts.map +1 -1
  140. package/dist/lib/modules/tournament/reward/reward.service.js.map +1 -1
  141. package/dist/lib/modules/tournament/reward/reward.types.d.ts +1 -1
  142. package/dist/lib/modules/tournament/reward/reward.types.d.ts.map +1 -1
  143. package/dist/lib/modules/tournament/reward/reward.types.js.map +1 -1
  144. package/dist/lib/modules/tournament/schedule/schedule.router.d.ts +27 -0
  145. package/dist/lib/modules/tournament/schedule/schedule.router.d.ts.map +1 -0
  146. package/dist/lib/modules/tournament/schedule/schedule.router.js +17 -0
  147. package/dist/lib/modules/tournament/schedule/schedule.router.js.map +1 -0
  148. package/dist/lib/modules/tournament/schedule/schedule.service.d.ts +10 -0
  149. package/dist/lib/modules/tournament/schedule/schedule.service.d.ts.map +1 -0
  150. package/dist/lib/modules/tournament/schedule/schedule.service.js +87 -0
  151. package/dist/lib/modules/tournament/schedule/schedule.service.js.map +1 -0
  152. package/dist/lib/modules/tournament/score/score.repository.d.ts +13 -0
  153. package/dist/lib/modules/tournament/score/score.repository.d.ts.map +1 -0
  154. package/dist/lib/modules/tournament/score/score.repository.js +70 -0
  155. package/dist/lib/modules/tournament/score/score.repository.js.map +1 -0
  156. package/dist/lib/modules/tournament/score/score.router.d.ts +98 -0
  157. package/dist/lib/modules/tournament/score/score.router.d.ts.map +1 -0
  158. package/dist/lib/modules/tournament/score/score.router.js +20 -0
  159. package/dist/lib/modules/tournament/score/score.router.js.map +1 -0
  160. package/dist/lib/modules/tournament/score/score.service.d.ts +13 -0
  161. package/dist/lib/modules/tournament/score/score.service.d.ts.map +1 -0
  162. package/dist/lib/modules/tournament/score/score.service.js +109 -0
  163. package/dist/lib/modules/tournament/score/score.service.js.map +1 -0
  164. package/dist/lib/modules/tournament/score/score.validation.d.ts +375 -0
  165. package/dist/lib/modules/tournament/score/score.validation.d.ts.map +1 -0
  166. package/dist/lib/modules/tournament/score/score.validation.js +19 -0
  167. package/dist/lib/modules/tournament/score/score.validation.js.map +1 -0
  168. package/dist/lib/modules/tournament/statistics/statistics.builder.d.ts +10 -0
  169. package/dist/lib/modules/tournament/statistics/statistics.builder.d.ts.map +1 -0
  170. package/dist/lib/modules/tournament/statistics/statistics.builder.js +53 -0
  171. package/dist/lib/modules/tournament/statistics/statistics.builder.js.map +1 -0
  172. package/dist/lib/modules/tournament/statistics/statistics.router.d.ts +80 -0
  173. package/dist/lib/modules/tournament/statistics/statistics.router.d.ts.map +1 -0
  174. package/dist/lib/modules/tournament/statistics/statistics.router.js +21 -0
  175. package/dist/lib/modules/tournament/statistics/statistics.router.js.map +1 -0
  176. package/dist/lib/modules/tournament/statistics/statistics.service.d.ts +11 -0
  177. package/dist/lib/modules/tournament/statistics/statistics.service.d.ts.map +1 -0
  178. package/dist/lib/modules/tournament/statistics/statistics.service.js +80 -0
  179. package/dist/lib/modules/tournament/statistics/statistics.service.js.map +1 -0
  180. package/dist/lib/modules/tournament/statistics/statistics.validation.d.ts +404 -0
  181. package/dist/lib/modules/tournament/statistics/statistics.validation.d.ts.map +1 -0
  182. package/dist/lib/modules/tournament/statistics/statistics.validation.js +36 -0
  183. package/dist/lib/modules/tournament/statistics/statistics.validation.js.map +1 -0
  184. package/dist/lib/modules/tournament/team/team.router.d.ts +31 -57
  185. package/dist/lib/modules/tournament/team/team.router.d.ts.map +1 -1
  186. package/dist/lib/modules/tournament/team/team.service.d.ts +1 -0
  187. package/dist/lib/modules/tournament/team/team.service.d.ts.map +1 -1
  188. package/dist/lib/modules/tournament/team/team.service.js +21 -16
  189. package/dist/lib/modules/tournament/team/team.service.js.map +1 -1
  190. package/dist/lib/modules/tournament/team/team.validation.d.ts +68 -18
  191. package/dist/lib/modules/tournament/team/team.validation.d.ts.map +1 -1
  192. package/dist/lib/modules/tournament/team/team.validation.js +4 -2
  193. package/dist/lib/modules/tournament/team/team.validation.js.map +1 -1
  194. package/dist/lib/modules/tournament/tournament.router.d.ts +466 -501
  195. package/dist/lib/modules/tournament/tournament.router.d.ts.map +1 -1
  196. package/dist/lib/modules/tournament/tournament.router.js +14 -0
  197. package/dist/lib/modules/tournament/tournament.router.js.map +1 -1
  198. package/dist/lib/modules/tournament/tournament.service.d.ts +8 -0
  199. package/dist/lib/modules/tournament/tournament.service.d.ts.map +1 -0
  200. package/dist/lib/modules/tournament/tournament.service.js +63 -0
  201. package/dist/lib/modules/tournament/tournament.service.js.map +1 -0
  202. package/dist/lib/modules/tournament/tournament.types.d.ts +9 -0
  203. package/dist/lib/modules/tournament/tournament.types.d.ts.map +1 -0
  204. package/dist/lib/modules/tournament/tournament.types.js +14 -0
  205. package/dist/lib/modules/tournament/tournament.types.js.map +1 -0
  206. package/dist/lib/modules/tournament/tournament.utils.d.ts +2 -0
  207. package/dist/lib/modules/tournament/tournament.utils.d.ts.map +1 -0
  208. package/dist/lib/modules/tournament/tournament.utils.js +6 -0
  209. package/dist/lib/modules/tournament/tournament.utils.js.map +1 -0
  210. package/dist/lib/modules/tournament/tournament.validation.d.ts +133 -0
  211. package/dist/lib/modules/tournament/tournament.validation.d.ts.map +1 -0
  212. package/dist/lib/modules/tournament/tournament.validation.js +14 -0
  213. package/dist/lib/modules/tournament/tournament.validation.js.map +1 -0
  214. package/dist/types/index.d.ts +462 -508
  215. package/dist/types/index.d.ts.map +1 -1
  216. package/dist/types/modules/coupon/services/coupon.service.d.ts +2 -2
  217. package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
  218. package/dist/types/modules/coupon/services/global-coupon.service.d.ts.map +1 -1
  219. package/dist/types/modules/coupon/services/helper.service.d.ts.map +1 -1
  220. package/dist/types/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
  221. package/dist/types/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
  222. package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts +10 -21
  223. package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
  224. package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +154 -0
  225. package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
  226. package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +8 -2
  227. package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
  228. package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts +10 -21
  229. package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
  230. package/dist/types/modules/tournament/config/config.builder.d.ts.map +1 -1
  231. package/dist/types/modules/tournament/config/config.repository.d.ts +4 -0
  232. package/dist/types/modules/tournament/config/config.repository.d.ts.map +1 -1
  233. package/dist/types/modules/tournament/config/config.router.d.ts +106 -218
  234. package/dist/types/modules/tournament/config/config.router.d.ts.map +1 -1
  235. package/dist/types/modules/tournament/config/config.service.d.ts +2 -2
  236. package/dist/types/modules/tournament/config/config.service.d.ts.map +1 -1
  237. package/dist/types/modules/tournament/config/config.validation.d.ts +446 -692
  238. package/dist/types/modules/tournament/config/config.validation.d.ts.map +1 -1
  239. package/dist/types/modules/tournament/match/events/evaluate-predictions.consumer.d.ts +2 -0
  240. package/dist/types/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -0
  241. package/dist/types/modules/tournament/match/events/evaluate-predictions.event.d.ts +15 -0
  242. package/dist/types/modules/tournament/match/events/evaluate-predictions.event.d.ts.map +1 -0
  243. package/dist/types/modules/tournament/match/match.builder.d.ts +5 -2
  244. package/dist/types/modules/tournament/match/match.builder.d.ts.map +1 -1
  245. package/dist/types/modules/tournament/match/match.repository.d.ts +2 -0
  246. package/dist/types/modules/tournament/match/match.repository.d.ts.map +1 -1
  247. package/dist/types/modules/tournament/match/match.router.d.ts +66 -191
  248. package/dist/types/modules/tournament/match/match.router.d.ts.map +1 -1
  249. package/dist/types/modules/tournament/match/match.service.d.ts +1 -12
  250. package/dist/types/modules/tournament/match/match.service.d.ts.map +1 -1
  251. package/dist/types/modules/tournament/match/match.validation.d.ts +96 -34
  252. package/dist/types/modules/tournament/match/match.validation.d.ts.map +1 -1
  253. package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts +2 -5
  254. package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts.map +1 -1
  255. package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts +2 -0
  256. package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts.map +1 -1
  257. package/dist/types/modules/tournament/notification/notification-template.repository.d.ts +8 -0
  258. package/dist/types/modules/tournament/notification/notification-template.repository.d.ts.map +1 -0
  259. package/dist/types/modules/tournament/notification/notification.config.d.ts +10 -0
  260. package/dist/types/modules/tournament/notification/notification.config.d.ts.map +1 -0
  261. package/dist/types/modules/tournament/notification/notification.schedule.config.d.ts +10 -0
  262. package/dist/types/modules/tournament/notification/notification.schedule.config.d.ts.map +1 -0
  263. package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts +4 -4
  264. package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts.map +1 -1
  265. package/dist/types/modules/tournament/notification/notification.service.d.ts +5 -3
  266. package/dist/types/modules/tournament/notification/notification.service.d.ts.map +1 -1
  267. package/dist/types/modules/tournament/participant/participant.repository.d.ts +1 -0
  268. package/dist/types/modules/tournament/participant/participant.repository.d.ts.map +1 -1
  269. package/dist/types/modules/tournament/participant/participant.router.d.ts +9 -9
  270. package/dist/types/modules/tournament/participant/participant.validation.d.ts +84 -84
  271. package/dist/types/modules/tournament/prediction/prediction.builder.d.ts.map +1 -1
  272. package/dist/types/modules/tournament/prediction/prediction.repository.d.ts +4 -1
  273. package/dist/types/modules/tournament/prediction/prediction.repository.d.ts.map +1 -1
  274. package/dist/types/modules/tournament/prediction/prediction.router.d.ts +12 -12
  275. package/dist/types/modules/tournament/prediction/prediction.service.d.ts +9 -0
  276. package/dist/types/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
  277. package/dist/types/modules/tournament/prediction/prediction.validation.d.ts +64 -64
  278. package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +3 -0
  279. package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -1
  280. package/dist/types/modules/tournament/reward/reward.builder.d.ts +6 -0
  281. package/dist/types/modules/tournament/reward/reward.builder.d.ts.map +1 -0
  282. package/dist/types/modules/tournament/reward/reward.interface.d.ts.map +1 -1
  283. package/dist/types/modules/tournament/reward/reward.repository.d.ts +8 -0
  284. package/dist/types/modules/tournament/reward/reward.repository.d.ts.map +1 -0
  285. package/dist/types/modules/tournament/reward/reward.service.d.ts.map +1 -1
  286. package/dist/types/modules/tournament/reward/reward.types.d.ts +1 -1
  287. package/dist/types/modules/tournament/reward/reward.types.d.ts.map +1 -1
  288. package/dist/types/modules/tournament/schedule/schedule.router.d.ts +27 -0
  289. package/dist/types/modules/tournament/schedule/schedule.router.d.ts.map +1 -0
  290. package/dist/types/modules/tournament/schedule/schedule.service.d.ts +10 -0
  291. package/dist/types/modules/tournament/schedule/schedule.service.d.ts.map +1 -0
  292. package/dist/types/modules/tournament/score/score.repository.d.ts +13 -0
  293. package/dist/types/modules/tournament/score/score.repository.d.ts.map +1 -0
  294. package/dist/types/modules/tournament/score/score.router.d.ts +98 -0
  295. package/dist/types/modules/tournament/score/score.router.d.ts.map +1 -0
  296. package/dist/types/modules/tournament/score/score.service.d.ts +13 -0
  297. package/dist/types/modules/tournament/score/score.service.d.ts.map +1 -0
  298. package/dist/types/modules/tournament/score/score.validation.d.ts +375 -0
  299. package/dist/types/modules/tournament/score/score.validation.d.ts.map +1 -0
  300. package/dist/types/modules/tournament/statistics/statistics.builder.d.ts +10 -0
  301. package/dist/types/modules/tournament/statistics/statistics.builder.d.ts.map +1 -0
  302. package/dist/types/modules/tournament/statistics/statistics.router.d.ts +80 -0
  303. package/dist/types/modules/tournament/statistics/statistics.router.d.ts.map +1 -0
  304. package/dist/types/modules/tournament/statistics/statistics.service.d.ts +11 -0
  305. package/dist/types/modules/tournament/statistics/statistics.service.d.ts.map +1 -0
  306. package/dist/types/modules/tournament/statistics/statistics.validation.d.ts +404 -0
  307. package/dist/types/modules/tournament/statistics/statistics.validation.d.ts.map +1 -0
  308. package/dist/types/modules/tournament/team/team.router.d.ts +31 -57
  309. package/dist/types/modules/tournament/team/team.router.d.ts.map +1 -1
  310. package/dist/types/modules/tournament/team/team.service.d.ts +1 -0
  311. package/dist/types/modules/tournament/team/team.service.d.ts.map +1 -1
  312. package/dist/types/modules/tournament/team/team.validation.d.ts +68 -18
  313. package/dist/types/modules/tournament/team/team.validation.d.ts.map +1 -1
  314. package/dist/types/modules/tournament/tournament.router.d.ts +466 -501
  315. package/dist/types/modules/tournament/tournament.router.d.ts.map +1 -1
  316. package/dist/types/modules/tournament/tournament.service.d.ts +8 -0
  317. package/dist/types/modules/tournament/tournament.service.d.ts.map +1 -0
  318. package/dist/types/modules/tournament/tournament.types.d.ts +9 -0
  319. package/dist/types/modules/tournament/tournament.types.d.ts.map +1 -0
  320. package/dist/types/modules/tournament/tournament.utils.d.ts +2 -0
  321. package/dist/types/modules/tournament/tournament.utils.d.ts.map +1 -0
  322. package/dist/types/modules/tournament/tournament.validation.d.ts +133 -0
  323. package/dist/types/modules/tournament/tournament.validation.d.ts.map +1 -0
  324. package/package.json +2 -2
@@ -0,0 +1,80 @@
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.statisticsService = exports.StatisticsService = void 0;
46
+ const typedi_1 = __importStar(require("typedi"));
47
+ const participant_repository_1 = require("../participant/participant.repository");
48
+ const config_repository_1 = require("../config/config.repository");
49
+ const reward_repository_1 = require("../reward/reward.repository");
50
+ const statistics_builder_1 = require("./statistics.builder");
51
+ let StatisticsService = class StatisticsService {
52
+ participantRepository;
53
+ configRepository;
54
+ rewardRepository;
55
+ constructor() {
56
+ this.participantRepository = typedi_1.default.get(participant_repository_1.TournamentParticipantRepository);
57
+ this.configRepository = typedi_1.default.get(config_repository_1.TournamentConfigRepository);
58
+ this.rewardRepository = typedi_1.default.get(reward_repository_1.RewardRepository);
59
+ }
60
+ async getActiveByUser(userId) {
61
+ const tournament = await this.configRepository.findActiveFull();
62
+ if (!tournament)
63
+ return null;
64
+ const participant = await this.participantRepository.findByUserAndTournament(userId, tournament._id);
65
+ if (!participant)
66
+ return null;
67
+ const couponIds = participant.predictions
68
+ .filter(p => p.coupon)
69
+ .map(p => p.coupon);
70
+ const couponCodeMap = await this.rewardRepository.findCouponCodesByIds(couponIds);
71
+ return statistics_builder_1.StatisticsBuilder.buildUserTournamentStats(participant, tournament, couponCodeMap);
72
+ }
73
+ };
74
+ exports.StatisticsService = StatisticsService;
75
+ exports.StatisticsService = StatisticsService = __decorate([
76
+ (0, typedi_1.Service)(),
77
+ __metadata("design:paramtypes", [])
78
+ ], StatisticsService);
79
+ exports.statisticsService = typedi_1.default.get(StatisticsService);
80
+ //# sourceMappingURL=statistics.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statistics.service.js","sourceRoot":"/","sources":["modules/tournament/statistics/statistics.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAE5C,kFAAwF;AACxF,mEAAyE;AACzE,mEAA+D;AAC/D,6DAAyD;AAIlD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAClB,qBAAqB,CAAkC;IACvD,gBAAgB,CAA6B;IAC7C,gBAAgB,CAAmB;IAE3C;QACI,IAAI,CAAC,qBAAqB,GAAG,gBAAS,CAAC,GAAG,CAAC,wDAA+B,CAAC,CAAC;QAC5E,IAAI,CAAC,gBAAgB,GAAG,gBAAS,CAAC,GAAG,CAAC,8CAA0B,CAAC,CAAC;QAClE,IAAI,CAAC,gBAAgB,GAAG,gBAAS,CAAC,GAAG,CAAC,oCAAgB,CAAC,CAAC;IAC5D,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,MAA+B;QACxD,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC;QAChE,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAE7B,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,uBAAuB,CACxE,MAAM,EACN,UAAU,CAAC,GAAG,CACjB,CAAC;QACF,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,CAAC;QAE9B,MAAM,SAAS,GAAG,WAAW,CAAC,WAAW;aACpC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;aACrB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAiC,CAAC,CAAC;QAEnD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;QAElF,OAAO,sCAAiB,CAAC,wBAAwB,CAAC,WAAkB,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;IACrG,CAAC;CACJ,CAAA;AA7BY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,gBAAO,GAAE;;GACG,iBAAiB,CA6B7B;AAEY,QAAA,iBAAiB,GAAG,gBAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import Container, { Service } from 'typedi';\nimport { mongoose } from '@typegoose/typegoose';\nimport { TournamentParticipantRepository } from '../participant/participant.repository';\nimport { TournamentConfigRepository } from '../config/config.repository';\nimport { RewardRepository } from '../reward/reward.repository';\nimport { StatisticsBuilder } from './statistics.builder';\nimport { UserTournamentStatsOutputDTO } from './statistics.validation';\n\n@Service()\nexport class StatisticsService {\n private participantRepository: TournamentParticipantRepository;\n private configRepository: TournamentConfigRepository;\n private rewardRepository: RewardRepository;\n\n constructor() {\n this.participantRepository = Container.get(TournamentParticipantRepository);\n this.configRepository = Container.get(TournamentConfigRepository);\n this.rewardRepository = Container.get(RewardRepository);\n }\n\n public async getActiveByUser(userId: mongoose.Types.ObjectId): Promise<UserTournamentStatsOutputDTO | null> {\n const tournament = await this.configRepository.findActiveFull();\n if (!tournament) return null;\n\n const participant = await this.participantRepository.findByUserAndTournament(\n userId,\n tournament._id\n );\n if (!participant) return null;\n\n const couponIds = participant.predictions\n .filter(p => p.coupon)\n .map(p => p.coupon as mongoose.Types.ObjectId);\n\n const couponCodeMap = await this.rewardRepository.findCouponCodesByIds(couponIds);\n\n return StatisticsBuilder.buildUserTournamentStats(participant as any, tournament, couponCodeMap);\n }\n}\n\nexport const statisticsService = Container.get(StatisticsService);\n"]}
@@ -0,0 +1,404 @@
1
+ import { z } from 'zod';
2
+ import { DTO } from '@lyxa.ai/core/dist/utilities/validation/global-validation';
3
+ export declare const GetUserTournamentStatsSchema: z.ZodObject<{
4
+ userId: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ userId: import("mongoose").Types.ObjectId;
7
+ }, {
8
+ userId: string | import("mongoose").Types.ObjectId;
9
+ }>;
10
+ export declare const UserTournamentMatchViewSchema: z.ZodObject<{
11
+ id: z.ZodString;
12
+ teams: z.ZodString;
13
+ date: z.ZodNullable<z.ZodString>;
14
+ prediction: z.ZodNullable<z.ZodString>;
15
+ realScore: z.ZodNullable<z.ZodString>;
16
+ result: z.ZodNullable<z.ZodEnum<["won", "lost", "pending"]>>;
17
+ coupon: z.ZodNullable<z.ZodString>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ date: string | null;
20
+ coupon: string | null;
21
+ id: string;
22
+ result: "won" | "lost" | "pending" | null;
23
+ teams: string;
24
+ prediction: string | null;
25
+ realScore: string | null;
26
+ }, {
27
+ date: string | null;
28
+ coupon: string | null;
29
+ id: string;
30
+ result: "won" | "lost" | "pending" | null;
31
+ teams: string;
32
+ prediction: string | null;
33
+ realScore: string | null;
34
+ }>;
35
+ export declare const UserTournamentStatsSchema: z.ZodNullable<z.ZodObject<{
36
+ name: z.ZodString;
37
+ joinedAt: z.ZodNullable<z.ZodDate>;
38
+ selectedTeam: z.ZodObject<{
39
+ name: z.ZodString;
40
+ flag: z.ZodNullable<z.ZodString>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ name: string;
43
+ flag: string | null;
44
+ }, {
45
+ name: string;
46
+ flag: string | null;
47
+ }>;
48
+ stats: z.ZodObject<{
49
+ predictionsMade: z.ZodNumber;
50
+ correctPredictions: z.ZodNumber;
51
+ couponsWon: z.ZodNumber;
52
+ }, "strip", z.ZodTypeAny, {
53
+ predictionsMade: number;
54
+ correctPredictions: number;
55
+ couponsWon: number;
56
+ }, {
57
+ predictionsMade: number;
58
+ correctPredictions: number;
59
+ couponsWon: number;
60
+ }>;
61
+ matches: z.ZodArray<z.ZodObject<{
62
+ id: z.ZodString;
63
+ teams: z.ZodString;
64
+ date: z.ZodNullable<z.ZodString>;
65
+ prediction: z.ZodNullable<z.ZodString>;
66
+ realScore: z.ZodNullable<z.ZodString>;
67
+ result: z.ZodNullable<z.ZodEnum<["won", "lost", "pending"]>>;
68
+ coupon: z.ZodNullable<z.ZodString>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ date: string | null;
71
+ coupon: string | null;
72
+ id: string;
73
+ result: "won" | "lost" | "pending" | null;
74
+ teams: string;
75
+ prediction: string | null;
76
+ realScore: string | null;
77
+ }, {
78
+ date: string | null;
79
+ coupon: string | null;
80
+ id: string;
81
+ result: "won" | "lost" | "pending" | null;
82
+ teams: string;
83
+ prediction: string | null;
84
+ realScore: string | null;
85
+ }>, "many">;
86
+ }, "strip", z.ZodTypeAny, {
87
+ name: string;
88
+ joinedAt: Date | null;
89
+ stats: {
90
+ predictionsMade: number;
91
+ correctPredictions: number;
92
+ couponsWon: number;
93
+ };
94
+ matches: {
95
+ date: string | null;
96
+ coupon: string | null;
97
+ id: string;
98
+ result: "won" | "lost" | "pending" | null;
99
+ teams: string;
100
+ prediction: string | null;
101
+ realScore: string | null;
102
+ }[];
103
+ selectedTeam: {
104
+ name: string;
105
+ flag: string | null;
106
+ };
107
+ }, {
108
+ name: string;
109
+ joinedAt: Date | null;
110
+ stats: {
111
+ predictionsMade: number;
112
+ correctPredictions: number;
113
+ couponsWon: number;
114
+ };
115
+ matches: {
116
+ date: string | null;
117
+ coupon: string | null;
118
+ id: string;
119
+ result: "won" | "lost" | "pending" | null;
120
+ teams: string;
121
+ prediction: string | null;
122
+ realScore: string | null;
123
+ }[];
124
+ selectedTeam: {
125
+ name: string;
126
+ flag: string | null;
127
+ };
128
+ }>>;
129
+ export declare const UserTournamentStatsResponseSchema: z.ZodObject<{
130
+ success: z.ZodBoolean;
131
+ message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
132
+ data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
133
+ metadata: z.ZodOptional<z.ZodObject<{
134
+ page: z.ZodNumber;
135
+ size: z.ZodNumber;
136
+ totalElements: z.ZodNumber;
137
+ totalPages: z.ZodNumber;
138
+ }, "strip", z.ZodTypeAny, {
139
+ page: number;
140
+ size: number;
141
+ totalElements: number;
142
+ totalPages: number;
143
+ }, {
144
+ page: number;
145
+ size: number;
146
+ totalElements: number;
147
+ totalPages: number;
148
+ }>>;
149
+ documents: z.ZodArray<z.ZodType<{
150
+ name: string;
151
+ joinedAt: Date | null;
152
+ stats: {
153
+ predictionsMade: number;
154
+ correctPredictions: number;
155
+ couponsWon: number;
156
+ };
157
+ matches: {
158
+ date: string | null;
159
+ coupon: string | null;
160
+ id: string;
161
+ result: "won" | "lost" | "pending" | null;
162
+ teams: string;
163
+ prediction: string | null;
164
+ realScore: string | null;
165
+ }[];
166
+ selectedTeam: {
167
+ name: string;
168
+ flag: string | null;
169
+ };
170
+ } | null, z.ZodTypeDef, {
171
+ name: string;
172
+ joinedAt: Date | null;
173
+ stats: {
174
+ predictionsMade: number;
175
+ correctPredictions: number;
176
+ couponsWon: number;
177
+ };
178
+ matches: {
179
+ date: string | null;
180
+ coupon: string | null;
181
+ id: string;
182
+ result: "won" | "lost" | "pending" | null;
183
+ teams: string;
184
+ prediction: string | null;
185
+ realScore: string | null;
186
+ }[];
187
+ selectedTeam: {
188
+ name: string;
189
+ flag: string | null;
190
+ };
191
+ } | null>, "many">;
192
+ }, "strip", z.ZodTypeAny, {
193
+ documents: ({
194
+ name: string;
195
+ joinedAt: Date | null;
196
+ stats: {
197
+ predictionsMade: number;
198
+ correctPredictions: number;
199
+ couponsWon: number;
200
+ };
201
+ matches: {
202
+ date: string | null;
203
+ coupon: string | null;
204
+ id: string;
205
+ result: "won" | "lost" | "pending" | null;
206
+ teams: string;
207
+ prediction: string | null;
208
+ realScore: string | null;
209
+ }[];
210
+ selectedTeam: {
211
+ name: string;
212
+ flag: string | null;
213
+ };
214
+ } | null)[];
215
+ metadata?: {
216
+ page: number;
217
+ size: number;
218
+ totalElements: number;
219
+ totalPages: number;
220
+ } | undefined;
221
+ }, {
222
+ documents: ({
223
+ name: string;
224
+ joinedAt: Date | null;
225
+ stats: {
226
+ predictionsMade: number;
227
+ correctPredictions: number;
228
+ couponsWon: number;
229
+ };
230
+ matches: {
231
+ date: string | null;
232
+ coupon: string | null;
233
+ id: string;
234
+ result: "won" | "lost" | "pending" | null;
235
+ teams: string;
236
+ prediction: string | null;
237
+ realScore: string | null;
238
+ }[];
239
+ selectedTeam: {
240
+ name: string;
241
+ flag: string | null;
242
+ };
243
+ } | null)[];
244
+ metadata?: {
245
+ page: number;
246
+ size: number;
247
+ totalElements: number;
248
+ totalPages: number;
249
+ } | undefined;
250
+ }>, z.ZodType<{
251
+ name: string;
252
+ joinedAt: Date | null;
253
+ stats: {
254
+ predictionsMade: number;
255
+ correctPredictions: number;
256
+ couponsWon: number;
257
+ };
258
+ matches: {
259
+ date: string | null;
260
+ coupon: string | null;
261
+ id: string;
262
+ result: "won" | "lost" | "pending" | null;
263
+ teams: string;
264
+ prediction: string | null;
265
+ realScore: string | null;
266
+ }[];
267
+ selectedTeam: {
268
+ name: string;
269
+ flag: string | null;
270
+ };
271
+ } | null, z.ZodTypeDef, {
272
+ name: string;
273
+ joinedAt: Date | null;
274
+ stats: {
275
+ predictionsMade: number;
276
+ correctPredictions: number;
277
+ couponsWon: number;
278
+ };
279
+ matches: {
280
+ date: string | null;
281
+ coupon: string | null;
282
+ id: string;
283
+ result: "won" | "lost" | "pending" | null;
284
+ teams: string;
285
+ prediction: string | null;
286
+ realScore: string | null;
287
+ }[];
288
+ selectedTeam: {
289
+ name: string;
290
+ flag: string | null;
291
+ };
292
+ } | null>]>>;
293
+ }, "strip", z.ZodTypeAny, {
294
+ message: string;
295
+ success: boolean;
296
+ data?: {
297
+ name: string;
298
+ joinedAt: Date | null;
299
+ stats: {
300
+ predictionsMade: number;
301
+ correctPredictions: number;
302
+ couponsWon: number;
303
+ };
304
+ matches: {
305
+ date: string | null;
306
+ coupon: string | null;
307
+ id: string;
308
+ result: "won" | "lost" | "pending" | null;
309
+ teams: string;
310
+ prediction: string | null;
311
+ realScore: string | null;
312
+ }[];
313
+ selectedTeam: {
314
+ name: string;
315
+ flag: string | null;
316
+ };
317
+ } | {
318
+ documents: ({
319
+ name: string;
320
+ joinedAt: Date | null;
321
+ stats: {
322
+ predictionsMade: number;
323
+ correctPredictions: number;
324
+ couponsWon: number;
325
+ };
326
+ matches: {
327
+ date: string | null;
328
+ coupon: string | null;
329
+ id: string;
330
+ result: "won" | "lost" | "pending" | null;
331
+ teams: string;
332
+ prediction: string | null;
333
+ realScore: string | null;
334
+ }[];
335
+ selectedTeam: {
336
+ name: string;
337
+ flag: string | null;
338
+ };
339
+ } | null)[];
340
+ metadata?: {
341
+ page: number;
342
+ size: number;
343
+ totalElements: number;
344
+ totalPages: number;
345
+ } | undefined;
346
+ } | null | undefined;
347
+ }, {
348
+ message: string;
349
+ success: boolean;
350
+ data?: {
351
+ name: string;
352
+ joinedAt: Date | null;
353
+ stats: {
354
+ predictionsMade: number;
355
+ correctPredictions: number;
356
+ couponsWon: number;
357
+ };
358
+ matches: {
359
+ date: string | null;
360
+ coupon: string | null;
361
+ id: string;
362
+ result: "won" | "lost" | "pending" | null;
363
+ teams: string;
364
+ prediction: string | null;
365
+ realScore: string | null;
366
+ }[];
367
+ selectedTeam: {
368
+ name: string;
369
+ flag: string | null;
370
+ };
371
+ } | {
372
+ documents: ({
373
+ name: string;
374
+ joinedAt: Date | null;
375
+ stats: {
376
+ predictionsMade: number;
377
+ correctPredictions: number;
378
+ couponsWon: number;
379
+ };
380
+ matches: {
381
+ date: string | null;
382
+ coupon: string | null;
383
+ id: string;
384
+ result: "won" | "lost" | "pending" | null;
385
+ teams: string;
386
+ prediction: string | null;
387
+ realScore: string | null;
388
+ }[];
389
+ selectedTeam: {
390
+ name: string;
391
+ flag: string | null;
392
+ };
393
+ } | null)[];
394
+ metadata?: {
395
+ page: number;
396
+ size: number;
397
+ totalElements: number;
398
+ totalPages: number;
399
+ } | undefined;
400
+ } | null | undefined;
401
+ }>;
402
+ export type GetUserTournamentStatsInputDTO = DTO<typeof GetUserTournamentStatsSchema>;
403
+ export type UserTournamentStatsOutputDTO = DTO<typeof UserTournamentStatsSchema>;
404
+ //# sourceMappingURL=statistics.validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statistics.validation.d.ts","sourceRoot":"/","sources":["modules/tournament/statistics/statistics.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAiB,MAAM,2DAA2D,CAAC;AAG/F,eAAO,MAAM,4BAA4B;;;;;;EAEvC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;EAQxC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAe1B,CAAC;AAEb,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkD,CAAC;AAEjG,MAAM,MAAM,8BAA8B,GAAG,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC;AACtF,MAAM,MAAM,4BAA4B,GAAG,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserTournamentStatsResponseSchema = exports.UserTournamentStatsSchema = exports.UserTournamentMatchViewSchema = exports.GetUserTournamentStatsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const global_validation_1 = require("@lyxa.ai/core/dist/utilities/validation/global-validation");
6
+ const validation_1 = require("@lyxa.ai/core/dist/utilities/validation");
7
+ exports.GetUserTournamentStatsSchema = zod_1.z.object({
8
+ userId: global_validation_1.ZodValidation.objectId('User id'),
9
+ });
10
+ exports.UserTournamentMatchViewSchema = zod_1.z.object({
11
+ id: zod_1.z.string(),
12
+ teams: zod_1.z.string(),
13
+ date: zod_1.z.string().nullable(),
14
+ prediction: zod_1.z.string().nullable(),
15
+ realScore: zod_1.z.string().nullable(),
16
+ result: zod_1.z.enum(['won', 'lost', 'pending']).nullable(),
17
+ coupon: zod_1.z.string().nullable(),
18
+ });
19
+ exports.UserTournamentStatsSchema = zod_1.z
20
+ .object({
21
+ name: zod_1.z.string(),
22
+ joinedAt: zod_1.z.date().nullable(),
23
+ selectedTeam: zod_1.z.object({
24
+ name: zod_1.z.string(),
25
+ flag: zod_1.z.string().nullable(),
26
+ }),
27
+ stats: zod_1.z.object({
28
+ predictionsMade: zod_1.z.number(),
29
+ correctPredictions: zod_1.z.number(),
30
+ couponsWon: zod_1.z.number(),
31
+ }),
32
+ matches: zod_1.z.array(exports.UserTournamentMatchViewSchema),
33
+ })
34
+ .nullable();
35
+ exports.UserTournamentStatsResponseSchema = (0, validation_1.createResponseSchema)(exports.UserTournamentStatsSchema);
36
+ //# sourceMappingURL=statistics.validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statistics.validation.js","sourceRoot":"/","sources":["modules/tournament/statistics/statistics.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iGAA+F;AAC/F,wEAA+E;AAElE,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,iCAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;CACzC,CAAC,CAAC;AAEU,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IACrD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAEU,QAAA,yBAAyB,GAAG,OAAC;KACxC,MAAM,CAAC;IACP,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC7B,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC3B,CAAC;IACF,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC;QACf,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;QAC3B,kBAAkB,EAAE,OAAC,CAAC,MAAM,EAAE;QAC9B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;KACtB,CAAC;IACF,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,qCAA6B,CAAC;CAC/C,CAAC;KACD,QAAQ,EAAE,CAAC;AAEA,QAAA,iCAAiC,GAAG,IAAA,iCAAoB,EAAC,iCAAyB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { DTO, ZodValidation } from '@lyxa.ai/core/dist/utilities/validation/global-validation';\nimport { createResponseSchema } from '@lyxa.ai/core/dist/utilities/validation';\n\nexport const GetUserTournamentStatsSchema = z.object({\n\tuserId: ZodValidation.objectId('User id'),\n});\n\nexport const UserTournamentMatchViewSchema = z.object({\n\tid: z.string(),\n\tteams: z.string(),\n\tdate: z.string().nullable(),\n\tprediction: z.string().nullable(),\n\trealScore: z.string().nullable(),\n\tresult: z.enum(['won', 'lost', 'pending']).nullable(),\n\tcoupon: z.string().nullable(),\n});\n\nexport const UserTournamentStatsSchema = z\n\t.object({\n\t\tname: z.string(),\n\t\tjoinedAt: z.date().nullable(),\n\t\tselectedTeam: z.object({\n\t\t\tname: z.string(),\n\t\t\tflag: z.string().nullable(),\n\t\t}),\n\t\tstats: z.object({\n\t\t\tpredictionsMade: z.number(),\n\t\t\tcorrectPredictions: z.number(),\n\t\t\tcouponsWon: z.number(),\n\t\t}),\n\t\tmatches: z.array(UserTournamentMatchViewSchema),\n\t})\n\t.nullable();\n\nexport const UserTournamentStatsResponseSchema = createResponseSchema(UserTournamentStatsSchema);\n\nexport type GetUserTournamentStatsInputDTO = DTO<typeof GetUserTournamentStatsSchema>;\nexport type UserTournamentStatsOutputDTO = DTO<typeof UserTournamentStatsSchema>;\n"]}