@lyxa.ai/marketing 1.0.52 → 1.0.54

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 (509) hide show
  1. package/dist/lib/index.d.ts +946 -53
  2. package/dist/lib/index.d.ts.map +1 -1
  3. package/dist/lib/index.js +1 -1
  4. package/dist/lib/index.js.map +1 -1
  5. package/dist/lib/modules/coupon/routers/coupon.router.d.ts +647 -0
  6. package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
  7. package/dist/lib/modules/coupon/routers/coupon.router.js +7 -0
  8. package/dist/lib/modules/coupon/routers/coupon.router.js.map +1 -1
  9. package/dist/lib/modules/coupon/services/coupon.service.d.ts +8 -1
  10. package/dist/lib/modules/coupon/services/coupon.service.d.ts.map +1 -1
  11. package/dist/lib/modules/coupon/services/coupon.service.js +231 -27
  12. package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
  13. package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -1
  14. package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js +17 -4
  15. package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js.map +1 -1
  16. package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +26 -0
  17. package/dist/lib/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
  18. package/dist/lib/modules/coupon/validations/coupon.validation.js +10 -1
  19. package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
  20. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts +40 -40
  21. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js +9 -9
  22. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js.map +1 -1
  23. package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts +0 -1
  24. package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts.map +1 -1
  25. package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.js +2 -5
  26. package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.js.map +1 -1
  27. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +1 -0
  28. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -1
  29. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js +2 -0
  30. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js.map +1 -1
  31. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +53 -40
  32. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
  33. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js +3 -2
  34. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js.map +1 -1
  35. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +3 -9
  36. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
  37. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js +4 -7
  38. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js.map +1 -1
  39. package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts +1 -0
  40. package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts.map +1 -1
  41. package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.js +15 -0
  42. package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.js.map +1 -1
  43. package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts +88 -42
  44. package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
  45. package/dist/lib/modules/limited-time-offer/limited-time-offer.router.js +23 -0
  46. package/dist/lib/modules/limited-time-offer/limited-time-offer.router.js.map +1 -1
  47. package/dist/lib/modules/limited-time-offer/limited-time-offer.service.d.ts +19 -0
  48. package/dist/lib/modules/limited-time-offer/limited-time-offer.service.d.ts.map +1 -0
  49. package/dist/lib/modules/limited-time-offer/limited-time-offer.service.js +84 -0
  50. package/dist/lib/modules/limited-time-offer/limited-time-offer.service.js.map +1 -0
  51. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.builder.d.ts +13 -0
  52. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.builder.d.ts.map +1 -0
  53. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.builder.js +22 -0
  54. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.builder.js.map +1 -0
  55. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.d.ts +20 -0
  56. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.d.ts.map +1 -0
  57. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.js +26 -0
  58. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.js.map +1 -0
  59. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.service.d.ts +8 -0
  60. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.service.d.ts.map +1 -0
  61. package/dist/lib/modules/{tournament/notification/notification.scheduler.service.js → limited-time-offer/notification/limited-time-offer-notification.service.js} +15 -28
  62. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.service.js.map +1 -0
  63. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.type.d.ts +5 -0
  64. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.type.d.ts.map +1 -0
  65. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.type.js +3 -0
  66. package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.type.js.map +1 -0
  67. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js +1 -1
  68. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js.map +1 -1
  69. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +13 -0
  70. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts.map +1 -1
  71. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js +75 -0
  72. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js.map +1 -1
  73. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +6 -2
  74. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts.map +1 -1
  75. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts +1 -0
  76. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts.map +1 -0
  77. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js +2 -0
  78. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js.map +1 -0
  79. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +6 -1
  80. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts.map +1 -1
  81. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.js +3 -2
  82. package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.js.map +1 -1
  83. package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +12 -2
  84. package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
  85. package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js +80 -27
  86. package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js.map +1 -1
  87. package/dist/lib/modules/marketing/services/marketing.service.d.ts +1 -0
  88. package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
  89. package/dist/lib/modules/marketing/services/marketing.service.js +9 -0
  90. package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
  91. package/dist/lib/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
  92. package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
  93. package/dist/lib/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
  94. package/dist/lib/modules/tournament/config/config.builder.d.ts.map +1 -1
  95. package/dist/lib/modules/tournament/config/config.builder.js +4 -0
  96. package/dist/lib/modules/tournament/config/config.builder.js.map +1 -1
  97. package/dist/lib/modules/tournament/config/config.repository.d.ts +8 -2
  98. package/dist/lib/modules/tournament/config/config.repository.d.ts.map +1 -1
  99. package/dist/lib/modules/tournament/config/config.repository.js +30 -1
  100. package/dist/lib/modules/tournament/config/config.repository.js.map +1 -1
  101. package/dist/lib/modules/tournament/config/config.router.d.ts +92 -2
  102. package/dist/lib/modules/tournament/config/config.router.d.ts.map +1 -1
  103. package/dist/lib/modules/tournament/config/config.types.d.ts +15 -0
  104. package/dist/lib/modules/tournament/config/config.types.d.ts.map +1 -0
  105. package/dist/lib/modules/tournament/config/config.types.js +3 -0
  106. package/dist/lib/modules/tournament/config/config.types.js.map +1 -0
  107. package/dist/lib/modules/tournament/config/config.validation.d.ts +395 -15
  108. package/dist/lib/modules/tournament/config/config.validation.d.ts.map +1 -1
  109. package/dist/lib/modules/tournament/config/config.validation.js +17 -2
  110. package/dist/lib/modules/tournament/config/config.validation.js.map +1 -1
  111. package/dist/lib/modules/tournament/integration/integration.factory.d.ts +4 -0
  112. package/dist/lib/modules/tournament/integration/integration.factory.d.ts.map +1 -0
  113. package/dist/lib/modules/tournament/integration/integration.factory.js +18 -0
  114. package/dist/lib/modules/tournament/integration/integration.factory.js.map +1 -0
  115. package/dist/lib/modules/tournament/integration/interfaces/ITournamentService.d.ts +36 -0
  116. package/dist/lib/modules/tournament/integration/interfaces/ITournamentService.d.ts.map +1 -0
  117. package/dist/lib/modules/tournament/integration/interfaces/ITournamentService.js +3 -0
  118. package/dist/lib/modules/tournament/integration/interfaces/ITournamentService.js.map +1 -0
  119. package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.d.ts +14 -0
  120. package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.d.ts.map +1 -0
  121. package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.js +92 -0
  122. package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.js.map +1 -0
  123. package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.d.ts +51 -0
  124. package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.d.ts.map +1 -0
  125. package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.js +3 -0
  126. package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.js.map +1 -0
  127. package/dist/lib/modules/tournament/integration/providers/api-football/index.d.ts +3 -0
  128. package/dist/lib/modules/tournament/integration/providers/api-football/index.d.ts.map +1 -0
  129. package/dist/lib/modules/tournament/integration/providers/api-football/index.js +19 -0
  130. package/dist/lib/modules/tournament/integration/providers/api-football/index.js.map +1 -0
  131. package/dist/lib/modules/tournament/integration/providers/index.d.ts +3 -0
  132. package/dist/lib/modules/tournament/integration/providers/index.d.ts.map +1 -0
  133. package/dist/lib/modules/tournament/integration/providers/index.js +19 -0
  134. package/dist/lib/modules/tournament/integration/providers/index.js.map +1 -0
  135. package/dist/lib/modules/tournament/integration/providers/mock.provider.d.ts +7 -0
  136. package/dist/lib/modules/tournament/integration/providers/mock.provider.d.ts.map +1 -0
  137. package/dist/lib/modules/tournament/integration/providers/mock.provider.js +22 -0
  138. package/dist/lib/modules/tournament/integration/providers/mock.provider.js.map +1 -0
  139. package/dist/lib/modules/tournament/integration/tournamentService.d.ts +9 -0
  140. package/dist/lib/modules/tournament/integration/tournamentService.d.ts.map +1 -0
  141. package/dist/lib/modules/tournament/integration/tournamentService.js +20 -0
  142. package/dist/lib/modules/tournament/integration/tournamentService.js.map +1 -0
  143. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -1
  144. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js +47 -11
  145. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js.map +1 -1
  146. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.d.ts +7 -3
  147. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.d.ts.map +1 -1
  148. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.js +1 -1
  149. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.js.map +1 -1
  150. package/dist/lib/modules/tournament/match/events/match-evaluation.orchestrator.d.ts +14 -0
  151. package/dist/lib/modules/tournament/match/events/match-evaluation.orchestrator.d.ts.map +1 -0
  152. package/dist/lib/modules/tournament/{notification/jobs/notification.worker.js → match/events/match-evaluation.orchestrator.js} +31 -27
  153. package/dist/lib/modules/tournament/match/events/match-evaluation.orchestrator.js.map +1 -0
  154. package/dist/lib/modules/tournament/match/match.builder.d.ts +13 -34
  155. package/dist/lib/modules/tournament/match/match.builder.d.ts.map +1 -1
  156. package/dist/lib/modules/tournament/match/match.builder.js +31 -10
  157. package/dist/lib/modules/tournament/match/match.builder.js.map +1 -1
  158. package/dist/lib/modules/tournament/match/match.repository.d.ts +1 -1
  159. package/dist/lib/modules/tournament/match/match.repository.d.ts.map +1 -1
  160. package/dist/lib/modules/tournament/match/match.repository.js.map +1 -1
  161. package/dist/lib/modules/tournament/match/match.router.d.ts +36 -0
  162. package/dist/lib/modules/tournament/match/match.router.d.ts.map +1 -1
  163. package/dist/lib/modules/tournament/match/match.service.d.ts +3 -0
  164. package/dist/lib/modules/tournament/match/match.service.d.ts.map +1 -1
  165. package/dist/lib/modules/tournament/match/match.service.js +15 -12
  166. package/dist/lib/modules/tournament/match/match.service.js.map +1 -1
  167. package/dist/lib/modules/tournament/match/match.types.d.ts +51 -0
  168. package/dist/lib/modules/tournament/match/match.types.d.ts.map +1 -0
  169. package/dist/lib/modules/tournament/match/match.types.js +3 -0
  170. package/dist/lib/modules/tournament/match/match.types.js.map +1 -0
  171. package/dist/lib/modules/tournament/notification/notification-template.repository.d.ts +2 -1
  172. package/dist/lib/modules/tournament/notification/notification-template.repository.d.ts.map +1 -1
  173. package/dist/lib/modules/tournament/notification/notification-template.repository.js +2 -1
  174. package/dist/lib/modules/tournament/notification/notification-template.repository.js.map +1 -1
  175. package/dist/lib/modules/tournament/notification/notification.builder.d.ts +30 -0
  176. package/dist/lib/modules/tournament/notification/notification.builder.d.ts.map +1 -0
  177. package/dist/lib/modules/tournament/notification/notification.builder.js +35 -0
  178. package/dist/lib/modules/tournament/notification/notification.builder.js.map +1 -0
  179. package/dist/lib/modules/tournament/notification/notification.config.d.ts +10 -9
  180. package/dist/lib/modules/tournament/notification/notification.config.d.ts.map +1 -1
  181. package/dist/lib/modules/tournament/notification/notification.config.js +0 -12
  182. package/dist/lib/modules/tournament/notification/notification.config.js.map +1 -1
  183. package/dist/lib/modules/tournament/notification/notification.service.d.ts +5 -3
  184. package/dist/lib/modules/tournament/notification/notification.service.d.ts.map +1 -1
  185. package/dist/lib/modules/tournament/notification/notification.service.js +23 -15
  186. package/dist/lib/modules/tournament/notification/notification.service.js.map +1 -1
  187. package/dist/lib/modules/tournament/participant/participant.builder.d.ts +12 -0
  188. package/dist/lib/modules/tournament/participant/participant.builder.d.ts.map +1 -0
  189. package/dist/lib/modules/tournament/participant/participant.builder.js +17 -0
  190. package/dist/lib/modules/tournament/participant/participant.builder.js.map +1 -0
  191. package/dist/lib/modules/tournament/participant/participant.repository.d.ts +8 -7
  192. package/dist/lib/modules/tournament/participant/participant.repository.d.ts.map +1 -1
  193. package/dist/lib/modules/tournament/participant/participant.repository.js +12 -2
  194. package/dist/lib/modules/tournament/participant/participant.repository.js.map +1 -1
  195. package/dist/lib/modules/tournament/participant/participant.service.d.ts +1 -0
  196. package/dist/lib/modules/tournament/participant/participant.service.d.ts.map +1 -1
  197. package/dist/lib/modules/tournament/participant/participant.service.js +15 -17
  198. package/dist/lib/modules/tournament/participant/participant.service.js.map +1 -1
  199. package/dist/lib/modules/tournament/prediction/prediction.builder.d.ts +3 -9
  200. package/dist/lib/modules/tournament/prediction/prediction.builder.d.ts.map +1 -1
  201. package/dist/lib/modules/tournament/prediction/prediction.builder.js.map +1 -1
  202. package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts +11 -3
  203. package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts.map +1 -1
  204. package/dist/lib/modules/tournament/prediction/prediction.repository.js +47 -0
  205. package/dist/lib/modules/tournament/prediction/prediction.repository.js.map +1 -1
  206. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts +1 -1
  207. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
  208. package/dist/lib/modules/tournament/prediction/prediction.service.js +16 -26
  209. package/dist/lib/modules/tournament/prediction/prediction.service.js.map +1 -1
  210. package/dist/lib/modules/tournament/prediction/prediction.types.d.ts +17 -0
  211. package/dist/lib/modules/tournament/prediction/prediction.types.d.ts.map +1 -0
  212. package/dist/lib/modules/tournament/prediction/prediction.types.js +3 -0
  213. package/dist/lib/modules/tournament/prediction/prediction.types.js.map +1 -0
  214. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +8 -5
  215. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -1
  216. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js +58 -16
  217. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js.map +1 -1
  218. package/dist/lib/modules/tournament/reward/reward.builder.d.ts +5 -2
  219. package/dist/lib/modules/tournament/reward/reward.builder.d.ts.map +1 -1
  220. package/dist/lib/modules/tournament/reward/reward.builder.js +44 -28
  221. package/dist/lib/modules/tournament/reward/reward.builder.js.map +1 -1
  222. package/dist/lib/modules/tournament/reward/reward.factory.d.ts +1 -1
  223. package/dist/lib/modules/tournament/reward/reward.factory.d.ts.map +1 -1
  224. package/dist/lib/modules/tournament/reward/reward.factory.js.map +1 -1
  225. package/dist/lib/modules/tournament/reward/reward.interface.d.ts +2 -2
  226. package/dist/lib/modules/tournament/reward/reward.interface.d.ts.map +1 -1
  227. package/dist/lib/modules/tournament/reward/reward.interface.js.map +1 -1
  228. package/dist/lib/modules/tournament/reward/reward.service.d.ts +1 -1
  229. package/dist/lib/modules/tournament/reward/reward.service.d.ts.map +1 -1
  230. package/dist/lib/modules/tournament/reward/reward.service.js +1 -1
  231. package/dist/lib/modules/tournament/reward/reward.service.js.map +1 -1
  232. package/dist/lib/modules/tournament/reward/reward.types.d.ts +35 -2
  233. package/dist/lib/modules/tournament/reward/reward.types.d.ts.map +1 -1
  234. package/dist/lib/modules/tournament/reward/reward.types.js.map +1 -1
  235. package/dist/lib/modules/tournament/schedule/schedule.router.d.ts.map +1 -1
  236. package/dist/lib/modules/tournament/schedule/schedule.router.js +1 -3
  237. package/dist/lib/modules/tournament/schedule/schedule.router.js.map +1 -1
  238. package/dist/lib/modules/tournament/schedule/schedule.service.d.ts +3 -0
  239. package/dist/lib/modules/tournament/schedule/schedule.service.d.ts.map +1 -1
  240. package/dist/lib/modules/tournament/schedule/schedule.service.js +30 -1
  241. package/dist/lib/modules/tournament/schedule/schedule.service.js.map +1 -1
  242. package/dist/lib/modules/tournament/score/score.repository.d.ts +13 -0
  243. package/dist/lib/modules/tournament/score/score.repository.d.ts.map +1 -1
  244. package/dist/lib/modules/tournament/score/score.repository.js +20 -0
  245. package/dist/lib/modules/tournament/score/score.repository.js.map +1 -1
  246. package/dist/lib/modules/tournament/score/score.service.d.ts +3 -0
  247. package/dist/lib/modules/tournament/score/score.service.d.ts.map +1 -1
  248. package/dist/lib/modules/tournament/score/score.service.js +3 -0
  249. package/dist/lib/modules/tournament/score/score.service.js.map +1 -1
  250. package/dist/lib/modules/tournament/statistics/statistics.builder.d.ts +5 -0
  251. package/dist/lib/modules/tournament/statistics/statistics.builder.d.ts.map +1 -1
  252. package/dist/lib/modules/tournament/statistics/statistics.builder.js +47 -28
  253. package/dist/lib/modules/tournament/statistics/statistics.builder.js.map +1 -1
  254. package/dist/lib/modules/tournament/statistics/statistics.router.d.ts +4 -2
  255. package/dist/lib/modules/tournament/statistics/statistics.router.d.ts.map +1 -1
  256. package/dist/lib/modules/tournament/statistics/statistics.service.js +4 -4
  257. package/dist/lib/modules/tournament/statistics/statistics.service.js.map +1 -1
  258. package/dist/lib/modules/tournament/statistics/statistics.validation.d.ts +32 -14
  259. package/dist/lib/modules/tournament/statistics/statistics.validation.d.ts.map +1 -1
  260. package/dist/lib/modules/tournament/statistics/statistics.validation.js +2 -1
  261. package/dist/lib/modules/tournament/statistics/statistics.validation.js.map +1 -1
  262. package/dist/lib/modules/tournament/sync/sync.repository.d.ts +11 -0
  263. package/dist/lib/modules/tournament/sync/sync.repository.d.ts.map +1 -0
  264. package/dist/lib/modules/tournament/sync/sync.repository.js +67 -0
  265. package/dist/lib/modules/tournament/sync/sync.repository.js.map +1 -0
  266. package/dist/lib/modules/tournament/sync/sync.router.d.ts +27 -0
  267. package/dist/lib/modules/tournament/sync/sync.router.d.ts.map +1 -0
  268. package/dist/lib/modules/tournament/sync/sync.router.js +15 -0
  269. package/dist/lib/modules/tournament/sync/sync.router.js.map +1 -0
  270. package/dist/lib/modules/tournament/sync/sync.service.d.ts +9 -0
  271. package/dist/lib/modules/tournament/sync/sync.service.d.ts.map +1 -0
  272. package/dist/lib/modules/tournament/sync/sync.service.js +117 -0
  273. package/dist/lib/modules/tournament/sync/sync.service.js.map +1 -0
  274. package/dist/lib/modules/tournament/team/team.builder.d.ts +4 -0
  275. package/dist/lib/modules/tournament/team/team.builder.d.ts.map +1 -1
  276. package/dist/lib/modules/tournament/team/team.builder.js +6 -0
  277. package/dist/lib/modules/tournament/team/team.builder.js.map +1 -1
  278. package/dist/lib/modules/tournament/team/team.repository.d.ts +3 -0
  279. package/dist/lib/modules/tournament/team/team.repository.d.ts.map +1 -1
  280. package/dist/lib/modules/tournament/team/team.repository.js +6 -0
  281. package/dist/lib/modules/tournament/team/team.repository.js.map +1 -1
  282. package/dist/lib/modules/tournament/team/team.router.d.ts +22 -4
  283. package/dist/lib/modules/tournament/team/team.router.d.ts.map +1 -1
  284. package/dist/lib/modules/tournament/team/team.router.js +1 -1
  285. package/dist/lib/modules/tournament/team/team.router.js.map +1 -1
  286. package/dist/lib/modules/tournament/team/team.service.d.ts +2 -1
  287. package/dist/lib/modules/tournament/team/team.service.d.ts.map +1 -1
  288. package/dist/lib/modules/tournament/team/team.service.js +26 -23
  289. package/dist/lib/modules/tournament/team/team.service.js.map +1 -1
  290. package/dist/lib/modules/tournament/team/team.validation.d.ts +23 -24
  291. package/dist/lib/modules/tournament/team/team.validation.d.ts.map +1 -1
  292. package/dist/lib/modules/tournament/team/team.validation.js +3 -4
  293. package/dist/lib/modules/tournament/team/team.validation.js.map +1 -1
  294. package/dist/lib/modules/tournament/tournament.builder.d.ts +11 -0
  295. package/dist/lib/modules/tournament/tournament.builder.d.ts.map +1 -0
  296. package/dist/lib/modules/tournament/tournament.builder.js +34 -0
  297. package/dist/lib/modules/tournament/tournament.builder.js.map +1 -0
  298. package/dist/lib/modules/tournament/tournament.router.d.ts +210 -10
  299. package/dist/lib/modules/tournament/tournament.router.d.ts.map +1 -1
  300. package/dist/lib/modules/tournament/tournament.router.js +2 -0
  301. package/dist/lib/modules/tournament/tournament.router.js.map +1 -1
  302. package/dist/lib/modules/tournament/tournament.service.d.ts.map +1 -1
  303. package/dist/lib/modules/tournament/tournament.service.js +3 -10
  304. package/dist/lib/modules/tournament/tournament.service.js.map +1 -1
  305. package/dist/lib/modules/tournament/tournament.utils.d.ts +4 -0
  306. package/dist/lib/modules/tournament/tournament.utils.d.ts.map +1 -1
  307. package/dist/lib/modules/tournament/tournament.utils.js +8 -1
  308. package/dist/lib/modules/tournament/tournament.utils.js.map +1 -1
  309. package/dist/lib/modules/tournament/tournament.validation.d.ts +205 -1
  310. package/dist/lib/modules/tournament/tournament.validation.d.ts.map +1 -1
  311. package/dist/lib/modules/tournament/tournament.validation.js +23 -2
  312. package/dist/lib/modules/tournament/tournament.validation.js.map +1 -1
  313. package/dist/types/index.d.ts +946 -53
  314. package/dist/types/index.d.ts.map +1 -1
  315. package/dist/types/modules/coupon/routers/coupon.router.d.ts +647 -0
  316. package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
  317. package/dist/types/modules/coupon/services/coupon.service.d.ts +8 -1
  318. package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
  319. package/dist/types/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -1
  320. package/dist/types/modules/coupon/validations/coupon.validation.d.ts +26 -0
  321. package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
  322. package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts +42 -40
  323. package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
  324. package/dist/types/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts +0 -1
  325. package/dist/types/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts.map +1 -1
  326. package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +1 -0
  327. package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -1
  328. package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +53 -40
  329. package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
  330. package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +3 -9
  331. package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
  332. package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts +1 -0
  333. package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts.map +1 -1
  334. package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts +88 -42
  335. package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
  336. package/dist/types/modules/limited-time-offer/limited-time-offer.service.d.ts +24 -0
  337. package/dist/types/modules/limited-time-offer/limited-time-offer.service.d.ts.map +1 -0
  338. package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.builder.d.ts +13 -0
  339. package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.builder.d.ts.map +1 -0
  340. package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.constants.d.ts +20 -0
  341. package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.constants.d.ts.map +1 -0
  342. package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.service.d.ts +8 -0
  343. package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.service.d.ts.map +1 -0
  344. package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.type.d.ts +5 -0
  345. package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.type.d.ts.map +1 -0
  346. package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +13 -0
  347. package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts.map +1 -1
  348. package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +6 -2
  349. package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts.map +1 -1
  350. package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +6 -1
  351. package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts.map +1 -1
  352. package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +22 -2
  353. package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
  354. package/dist/types/modules/marketing/services/marketing.service.d.ts +1 -0
  355. package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
  356. package/dist/types/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
  357. package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
  358. package/dist/types/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
  359. package/dist/types/modules/tournament/config/config.builder.d.ts.map +1 -1
  360. package/dist/types/modules/tournament/config/config.repository.d.ts +8 -2
  361. package/dist/types/modules/tournament/config/config.repository.d.ts.map +1 -1
  362. package/dist/types/modules/tournament/config/config.router.d.ts +92 -2
  363. package/dist/types/modules/tournament/config/config.router.d.ts.map +1 -1
  364. package/dist/types/modules/tournament/config/config.types.d.ts +15 -0
  365. package/dist/types/modules/tournament/config/config.types.d.ts.map +1 -0
  366. package/dist/types/modules/tournament/config/config.validation.d.ts +395 -15
  367. package/dist/types/modules/tournament/config/config.validation.d.ts.map +1 -1
  368. package/dist/types/modules/tournament/integration/integration.factory.d.ts +4 -0
  369. package/dist/types/modules/tournament/integration/integration.factory.d.ts.map +1 -0
  370. package/dist/types/modules/tournament/integration/interfaces/ITournamentService.d.ts +36 -0
  371. package/dist/types/modules/tournament/integration/interfaces/ITournamentService.d.ts.map +1 -0
  372. package/dist/types/modules/tournament/integration/providers/api-football/api-football.provider.d.ts +14 -0
  373. package/dist/types/modules/tournament/integration/providers/api-football/api-football.provider.d.ts.map +1 -0
  374. package/dist/types/modules/tournament/integration/providers/api-football/api-football.types.d.ts +51 -0
  375. package/dist/types/modules/tournament/integration/providers/api-football/api-football.types.d.ts.map +1 -0
  376. package/dist/types/modules/tournament/integration/providers/api-football/index.d.ts +3 -0
  377. package/dist/types/modules/tournament/integration/providers/api-football/index.d.ts.map +1 -0
  378. package/dist/types/modules/tournament/integration/providers/index.d.ts +3 -0
  379. package/dist/types/modules/tournament/integration/providers/index.d.ts.map +1 -0
  380. package/dist/types/modules/tournament/integration/providers/mock.provider.d.ts +7 -0
  381. package/dist/types/modules/tournament/integration/providers/mock.provider.d.ts.map +1 -0
  382. package/dist/types/modules/tournament/integration/tournamentService.d.ts +9 -0
  383. package/dist/types/modules/tournament/integration/tournamentService.d.ts.map +1 -0
  384. package/dist/types/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -1
  385. package/dist/types/modules/tournament/match/events/evaluate-predictions.event.d.ts +7 -3
  386. package/dist/types/modules/tournament/match/events/evaluate-predictions.event.d.ts.map +1 -1
  387. package/dist/types/modules/tournament/match/events/match-evaluation.orchestrator.d.ts +14 -0
  388. package/dist/types/modules/tournament/match/events/match-evaluation.orchestrator.d.ts.map +1 -0
  389. package/dist/types/modules/tournament/match/match.builder.d.ts +13 -34
  390. package/dist/types/modules/tournament/match/match.builder.d.ts.map +1 -1
  391. package/dist/types/modules/tournament/match/match.repository.d.ts +1 -1
  392. package/dist/types/modules/tournament/match/match.repository.d.ts.map +1 -1
  393. package/dist/types/modules/tournament/match/match.router.d.ts +36 -0
  394. package/dist/types/modules/tournament/match/match.router.d.ts.map +1 -1
  395. package/dist/types/modules/tournament/match/match.service.d.ts +3 -0
  396. package/dist/types/modules/tournament/match/match.service.d.ts.map +1 -1
  397. package/dist/types/modules/tournament/match/match.types.d.ts +51 -0
  398. package/dist/types/modules/tournament/match/match.types.d.ts.map +1 -0
  399. package/dist/types/modules/tournament/notification/notification-template.repository.d.ts +2 -1
  400. package/dist/types/modules/tournament/notification/notification-template.repository.d.ts.map +1 -1
  401. package/dist/types/modules/tournament/notification/notification.builder.d.ts +30 -0
  402. package/dist/types/modules/tournament/notification/notification.builder.d.ts.map +1 -0
  403. package/dist/types/modules/tournament/notification/notification.config.d.ts +10 -9
  404. package/dist/types/modules/tournament/notification/notification.config.d.ts.map +1 -1
  405. package/dist/types/modules/tournament/notification/notification.service.d.ts +5 -3
  406. package/dist/types/modules/tournament/notification/notification.service.d.ts.map +1 -1
  407. package/dist/types/modules/tournament/participant/participant.builder.d.ts +12 -0
  408. package/dist/types/modules/tournament/participant/participant.builder.d.ts.map +1 -0
  409. package/dist/types/modules/tournament/participant/participant.repository.d.ts +8 -7
  410. package/dist/types/modules/tournament/participant/participant.repository.d.ts.map +1 -1
  411. package/dist/types/modules/tournament/participant/participant.service.d.ts +1 -0
  412. package/dist/types/modules/tournament/participant/participant.service.d.ts.map +1 -1
  413. package/dist/types/modules/tournament/prediction/prediction.builder.d.ts +3 -9
  414. package/dist/types/modules/tournament/prediction/prediction.builder.d.ts.map +1 -1
  415. package/dist/types/modules/tournament/prediction/prediction.repository.d.ts +11 -3
  416. package/dist/types/modules/tournament/prediction/prediction.repository.d.ts.map +1 -1
  417. package/dist/types/modules/tournament/prediction/prediction.service.d.ts +1 -1
  418. package/dist/types/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
  419. package/dist/types/modules/tournament/prediction/prediction.types.d.ts +17 -0
  420. package/dist/types/modules/tournament/prediction/prediction.types.d.ts.map +1 -0
  421. package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +8 -5
  422. package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -1
  423. package/dist/types/modules/tournament/reward/reward.builder.d.ts +5 -2
  424. package/dist/types/modules/tournament/reward/reward.builder.d.ts.map +1 -1
  425. package/dist/types/modules/tournament/reward/reward.factory.d.ts +1 -1
  426. package/dist/types/modules/tournament/reward/reward.factory.d.ts.map +1 -1
  427. package/dist/types/modules/tournament/reward/reward.interface.d.ts +2 -2
  428. package/dist/types/modules/tournament/reward/reward.interface.d.ts.map +1 -1
  429. package/dist/types/modules/tournament/reward/reward.service.d.ts +1 -1
  430. package/dist/types/modules/tournament/reward/reward.service.d.ts.map +1 -1
  431. package/dist/types/modules/tournament/reward/reward.types.d.ts +35 -2
  432. package/dist/types/modules/tournament/reward/reward.types.d.ts.map +1 -1
  433. package/dist/types/modules/tournament/schedule/schedule.router.d.ts.map +1 -1
  434. package/dist/types/modules/tournament/schedule/schedule.service.d.ts +3 -0
  435. package/dist/types/modules/tournament/schedule/schedule.service.d.ts.map +1 -1
  436. package/dist/types/modules/tournament/score/score.repository.d.ts +13 -0
  437. package/dist/types/modules/tournament/score/score.repository.d.ts.map +1 -1
  438. package/dist/types/modules/tournament/score/score.service.d.ts +3 -0
  439. package/dist/types/modules/tournament/score/score.service.d.ts.map +1 -1
  440. package/dist/types/modules/tournament/statistics/statistics.builder.d.ts +5 -0
  441. package/dist/types/modules/tournament/statistics/statistics.builder.d.ts.map +1 -1
  442. package/dist/types/modules/tournament/statistics/statistics.router.d.ts +4 -2
  443. package/dist/types/modules/tournament/statistics/statistics.router.d.ts.map +1 -1
  444. package/dist/types/modules/tournament/statistics/statistics.validation.d.ts +32 -14
  445. package/dist/types/modules/tournament/statistics/statistics.validation.d.ts.map +1 -1
  446. package/dist/types/modules/tournament/sync/sync.repository.d.ts +11 -0
  447. package/dist/types/modules/tournament/sync/sync.repository.d.ts.map +1 -0
  448. package/dist/types/modules/tournament/sync/sync.router.d.ts +27 -0
  449. package/dist/types/modules/tournament/sync/sync.router.d.ts.map +1 -0
  450. package/dist/types/modules/tournament/sync/sync.service.d.ts +9 -0
  451. package/dist/types/modules/tournament/sync/sync.service.d.ts.map +1 -0
  452. package/dist/types/modules/tournament/team/team.builder.d.ts +4 -0
  453. package/dist/types/modules/tournament/team/team.builder.d.ts.map +1 -1
  454. package/dist/types/modules/tournament/team/team.repository.d.ts +3 -0
  455. package/dist/types/modules/tournament/team/team.repository.d.ts.map +1 -1
  456. package/dist/types/modules/tournament/team/team.router.d.ts +22 -4
  457. package/dist/types/modules/tournament/team/team.router.d.ts.map +1 -1
  458. package/dist/types/modules/tournament/team/team.service.d.ts +2 -1
  459. package/dist/types/modules/tournament/team/team.service.d.ts.map +1 -1
  460. package/dist/types/modules/tournament/team/team.validation.d.ts +23 -24
  461. package/dist/types/modules/tournament/team/team.validation.d.ts.map +1 -1
  462. package/dist/types/modules/tournament/tournament.builder.d.ts +11 -0
  463. package/dist/types/modules/tournament/tournament.builder.d.ts.map +1 -0
  464. package/dist/types/modules/tournament/tournament.router.d.ts +210 -10
  465. package/dist/types/modules/tournament/tournament.router.d.ts.map +1 -1
  466. package/dist/types/modules/tournament/tournament.service.d.ts.map +1 -1
  467. package/dist/types/modules/tournament/tournament.utils.d.ts +4 -0
  468. package/dist/types/modules/tournament/tournament.utils.d.ts.map +1 -1
  469. package/dist/types/modules/tournament/tournament.validation.d.ts +205 -1
  470. package/dist/types/modules/tournament/tournament.validation.d.ts.map +1 -1
  471. package/package.json +2 -2
  472. package/dist/lib/modules/tournament/match/events/match-ended.consumer.d.ts +0 -2
  473. package/dist/lib/modules/tournament/match/events/match-ended.consumer.d.ts.map +0 -1
  474. package/dist/lib/modules/tournament/match/events/match-ended.consumer.js +0 -15
  475. package/dist/lib/modules/tournament/match/events/match-ended.consumer.js.map +0 -1
  476. package/dist/lib/modules/tournament/match/events/match-ended.event.d.ts +0 -14
  477. package/dist/lib/modules/tournament/match/events/match-ended.event.d.ts.map +0 -1
  478. package/dist/lib/modules/tournament/match/events/match-ended.event.js +0 -12
  479. package/dist/lib/modules/tournament/match/events/match-ended.event.js.map +0 -1
  480. package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts +0 -10
  481. package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts.map +0 -1
  482. package/dist/lib/modules/tournament/notification/jobs/notification.producer.js +0 -23
  483. package/dist/lib/modules/tournament/notification/jobs/notification.producer.js.map +0 -1
  484. package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts +0 -9
  485. package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts.map +0 -1
  486. package/dist/lib/modules/tournament/notification/jobs/notification.worker.js.map +0 -1
  487. package/dist/lib/modules/tournament/notification/notification.schedule.config.d.ts +0 -10
  488. package/dist/lib/modules/tournament/notification/notification.schedule.config.d.ts.map +0 -1
  489. package/dist/lib/modules/tournament/notification/notification.schedule.config.js +0 -15
  490. package/dist/lib/modules/tournament/notification/notification.schedule.config.js.map +0 -1
  491. package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts +0 -10
  492. package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts.map +0 -1
  493. package/dist/lib/modules/tournament/notification/notification.scheduler.service.js.map +0 -1
  494. package/dist/types/events/event-initializations.d.ts +0 -2
  495. package/dist/types/events/event-initializations.d.ts.map +0 -1
  496. package/dist/types/modules/tournament/config/tournament-config.validation.d.ts +0 -201
  497. package/dist/types/modules/tournament/config/tournament-config.validation.d.ts.map +0 -1
  498. package/dist/types/modules/tournament/match/events/match-ended.consumer.d.ts +0 -2
  499. package/dist/types/modules/tournament/match/events/match-ended.consumer.d.ts.map +0 -1
  500. package/dist/types/modules/tournament/match/events/match-ended.event.d.ts +0 -14
  501. package/dist/types/modules/tournament/match/events/match-ended.event.d.ts.map +0 -1
  502. package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts +0 -10
  503. package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts.map +0 -1
  504. package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts +0 -9
  505. package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts.map +0 -1
  506. package/dist/types/modules/tournament/notification/notification.schedule.config.d.ts +0 -10
  507. package/dist/types/modules/tournament/notification/notification.schedule.config.d.ts.map +0 -1
  508. package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts +0 -10
  509. package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"config.validation.d.ts","sourceRoot":"/","sources":["modules/tournament/config/config.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,GAAG,EAAgB,MAAM,2DAA2D,CAAC;AAE7F,OAAO,EAAC,MAAM,EAAE,oBAAoB,EAAC,MAAM,mCAAmC,CAAC;AA0C/E,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAatC,CAAC;AAEJ,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA+C,CAAC;AAC3F,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgE,CAAC;AAEhH,MAAM,MAAM,8BAA8B,GAAG,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC;AACtF,MAAM,MAAM,8BAA8B,GAAG,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC;AACtF,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC3E,MAAM,MAAM,iCAAiC,GAAG,GAAG,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -11,8 +11,8 @@ const TournamentFreeDeliveryRewardSchema = zod_1.z.object({
11
11
  const TournamentCouponRewardSchema = zod_1.z.object({
12
12
  type: zod_1.z.literal(enum_1.TournamentRewardType.COUPON),
13
13
  couponNamePrefix: global_validation_1.ZodValidation.string('Coupon name prefix'),
14
- percentage: global_validation_1.ZodValidation.number('Percentage'),
15
- maxDiscountPerOrder: global_validation_1.ZodValidation.number('Max discount per order').nullable().optional(),
14
+ percentage: global_validation_1.ZodValidation.number('Percentage', { min: 1, max: 100, isInt: true }),
15
+ maxDiscountPerOrder: global_validation_1.ZodValidation.number('Max discount per order', { isPositive: true }),
16
16
  });
17
17
  const TournamentCouponRewardOutputSchema = zod_1.z.object({
18
18
  type: zod_1.z.literal(enum_1.TournamentRewardType.COUPON),
@@ -37,6 +37,15 @@ const TournamentRewardListOutputSchema = zod_1.z.discriminatedUnion('type', [
37
37
  TournamentCouponRewardListOutputSchema,
38
38
  TournamentFreeDeliveryRewardSchema,
39
39
  ]);
40
+ const TournamentNotificationTemplateSchema = zod_1.z.record(global_validation_1.ZodValidation.enumType(enum_1.TournamentNotificationTag, 'Notification tag'), zod_1.z.object({
41
+ title: global_validation_1.ZodValidation.string('Notification title'),
42
+ body: global_validation_1.ZodValidation.string('Notification body'),
43
+ }));
44
+ const TournamentScheduledNotificationSchema = zod_1.z.object({
45
+ type: global_validation_1.ZodValidation.enumType(enum_1.TournamentNotificationTag, 'Notification tag'),
46
+ durationMins: zod_1.z.number().min(0),
47
+ target: global_validation_1.ZodValidation.enumType(enum_1.TournamentScheduledNotificationTarget, 'Notification target'),
48
+ });
40
49
  exports.CreateTournamentConfigSchema = zod_1.z
41
50
  .object({
42
51
  name: global_validation_1.ZodValidation.string('Tournament name'),
@@ -45,6 +54,8 @@ exports.CreateTournamentConfigSchema = zod_1.z
45
54
  endDate: global_validation_1.ZodValidation.date('End date'),
46
55
  status: global_validation_1.ZodValidation.enumType(enum_1.Status, 'Status').optional(),
47
56
  reward: TournamentRewardSchema.optional(),
57
+ notificationTemplates: TournamentNotificationTemplateSchema.optional(),
58
+ scheduledNotifications: zod_1.z.array(TournamentScheduledNotificationSchema).optional(),
48
59
  })
49
60
  .superRefine((d, ctx) => {
50
61
  if (d.endDate <= d.startDate) {
@@ -60,6 +71,8 @@ exports.UpdateTournamentConfigSchema = zod_1.z
60
71
  endDate: global_validation_1.ZodValidation.date('End date').optional(),
61
72
  status: global_validation_1.ZodValidation.enumType(enum_1.Status, 'Status').optional(),
62
73
  reward: TournamentRewardSchema.optional(),
74
+ notificationTemplates: TournamentNotificationTemplateSchema.optional(),
75
+ scheduledNotifications: zod_1.z.array(TournamentScheduledNotificationSchema).optional(),
63
76
  })
64
77
  .superRefine((d, ctx) => {
65
78
  if (d.startDate && d.endDate && d.endDate <= d.startDate) {
@@ -76,6 +89,8 @@ exports.TournamentConfigSchema = zod_1.z.object({
76
89
  reward: TournamentRewardOutputSchema.optional(),
77
90
  createdAt: zod_1.z.date().nullable().optional(),
78
91
  updatedAt: zod_1.z.date().nullable().optional(),
92
+ notificationTemplates: TournamentNotificationTemplateSchema.optional(),
93
+ scheduledNotifications: zod_1.z.array(TournamentScheduledNotificationSchema).optional(),
79
94
  });
80
95
  exports.TournamentConfigListItemSchema = exports.TournamentConfigSchema.extend({
81
96
  reward: TournamentRewardListOutputSchema.optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"config.validation.js","sourceRoot":"/","sources":["modules/tournament/config/config.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,iGAA6F;AAC7F,wEAA6E;AAC7E,4DAA+E;AAE/E,MAAM,kCAAkC,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,2BAAoB,CAAC,aAAa,CAAC;CACnD,CAAC,CAAC;AAEH,MAAM,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,2BAAoB,CAAC,MAAM,CAAC;IAC5C,gBAAgB,EAAE,iCAAa,CAAC,MAAM,CAAC,oBAAoB,CAAC;IAC5D,UAAU,EAAE,iCAAa,CAAC,MAAM,CAAC,YAAY,CAAC;IAC9C,mBAAmB,EAAE,iCAAa,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACzF,CAAC,CAAC;AAEH,MAAM,kCAAkC,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,IAA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} from '@lyxa.ai/core/dist/utilities/validation';\nimport {Status, TournamentRewardType} from '@lyxa.ai/core/dist/utilities/enum';\n\nconst TournamentFreeDeliveryRewardSchema = z.object({\n\ttype: z.literal(TournamentRewardType.FREE_DELIVERY),\n});\n\nconst TournamentCouponRewardSchema = z.object({\n\ttype: z.literal(TournamentRewardType.COUPON),\n\tcouponNamePrefix: ZodValidation.string('Coupon name prefix'),\n\tpercentage: ZodValidation.number('Percentage'),\n\tmaxDiscountPerOrder: ZodValidation.number('Max discount per order').nullable().optional(),\n});\n\nconst TournamentCouponRewardOutputSchema = z.object({\n\ttype: z.literal(TournamentRewardType.COUPON),\n\tcouponNamePrefix: ZodValidation.string('Coupon name prefix').optional(),\n\tpercentage: ZodValidation.number('Percentage').optional(),\n\tmaxDiscountPerOrder: ZodValidation.number('Max discount per order').nullable().optional(),\n});\n\nconst TournamentCouponRewardListOutputSchema = z.object({\n\ttype: z.literal(TournamentRewardType.COUPON),\n\tpercentage: ZodValidation.number('Percentage').optional(),\n\tmaxDiscountPerOrder: ZodValidation.number('Max discount per order').nullable().optional(),\n});\n\nconst TournamentRewardSchema = z.discriminatedUnion('type', [\n\tTournamentCouponRewardSchema,\n\tTournamentFreeDeliveryRewardSchema,\n]);\n\nconst TournamentRewardOutputSchema = z.discriminatedUnion('type', [\n\tTournamentCouponRewardOutputSchema,\n\tTournamentFreeDeliveryRewardSchema,\n]);\n\nconst TournamentRewardListOutputSchema = z.discriminatedUnion('type', [\n\tTournamentCouponRewardListOutputSchema,\n\tTournamentFreeDeliveryRewardSchema,\n]);\n\n\nexport const CreateTournamentConfigSchema = z\n\t.object({\n\t\tname: ZodValidation.string('Tournament name'),\n\t\ttag: ZodValidation.string('Tournament tag'),\n\t\tstartDate: ZodValidation.date('Start date'),\n\t\tendDate: ZodValidation.date('End date'),\n\t\tstatus: ZodValidation.enumType(Status, 'Status').optional(),\n\t\treward: TournamentRewardSchema.optional(),\n\t})\n\t.superRefine((d, ctx) => {\n\t\tif (d.endDate <= d.startDate) {\n\t\t\tctx.addIssue({ code: z.ZodIssueCode.custom, message: 'End date must be after start date', path: ['endDate'] });\n\t\t}\n\t});\n\nexport const UpdateTournamentConfigSchema = z\n\t.object({\n\t\t_id: ZodValidation.objectId(),\n\t\tname: ZodValidation.string('Tournament name').optional(),\n\t\ttag: ZodValidation.string('Tournament tag').optional(),\n\t\tstartDate: ZodValidation.date('Start date').optional(),\n\t\tendDate: ZodValidation.date('End date').optional(),\n\t\tstatus: ZodValidation.enumType(Status, 'Status').optional(),\n\t\treward: TournamentRewardSchema.optional(),\n\t})\n\t.superRefine((d, ctx) => {\n\t\tif (d.startDate && d.endDate && d.endDate <= d.startDate) {\n\t\t\tctx.addIssue({ code: z.ZodIssueCode.custom, message: 'End date must be after start date', path: ['endDate'] });\n\t\t}\n\t});\n\nexport const TournamentConfigSchema = z.object({\n\t_id: ZodValidation.objectId().optional(),\n\tname: ZodValidation.string('Tournament name'),\n\ttag: ZodValidation.string('Tournament tag'),\n\tstartDate: z.date().nullable().optional(),\n\tendDate: z.date().nullable().optional(),\n\tstatus: ZodValidation.enumType(Status, 'Status'),\n\treward: TournamentRewardOutputSchema.optional(),\n\tcreatedAt: z.date().nullable().optional(),\n\tupdatedAt: z.date().nullable().optional(),\n});\n\nexport const TournamentConfigListItemSchema = TournamentConfigSchema.extend({\n\treward: TournamentRewardListOutputSchema.optional(),\n});\n\nexport const TournamentConfigResponseSchema = createResponseSchema(TournamentConfigSchema);\nexport const TournamentConfigListResponseSchema = createResponseSchema(z.array(TournamentConfigListItemSchema));\n\nexport type CreateTournamentConfigInputDTO = DTO<typeof CreateTournamentConfigSchema>;\nexport type UpdateTournamentConfigInputDTO = DTO<typeof UpdateTournamentConfigSchema>;\nexport type TournamentConfigOutputDTO = DTO<typeof TournamentConfigSchema>;\nexport type TournamentConfigListItemOutputDTO = DTO<typeof TournamentConfigListItemSchema>;\n"]}
1
+ {"version":3,"file":"config.validation.js","sourceRoot":"/","sources":["modules/tournament/config/config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AAK,CAAC,qCAAqC,CAAC,CAAC,QAAQ,EAAE;CACjF,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,8BAAsB,CAAC,MAAM,CAAC;IAC3E,MAAM,EAAE,gCAAgC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,IAAA,iCAAoB,EAAC,8BAAsB,CAAC,CAAC;AAC9E,QAAA,kCAAkC,GAAG,IAAA,iCAAoB,EAAC,OAAC,CAAC,KAAK,CAAC,sCAA8B,CAAC,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';\nimport {Status, TournamentNotificationTag, TournamentRewardType, TournamentScheduledNotificationTarget} from '@lyxa.ai/core/dist/utilities/enum';\n\nconst TournamentFreeDeliveryRewardSchema = z.object({\n\ttype: z.literal(TournamentRewardType.FREE_DELIVERY),\n});\n\nconst TournamentCouponRewardSchema = z.object({\n\ttype: z.literal(TournamentRewardType.COUPON),\n\tcouponNamePrefix: ZodValidation.string('Coupon name prefix'),\n\tpercentage: ZodValidation.number('Percentage', { min: 1, max: 100, isInt: true }),\n\tmaxDiscountPerOrder: ZodValidation.number('Max discount per order', { isPositive: true }),\n});\n\nconst TournamentCouponRewardOutputSchema = z.object({\n\ttype: z.literal(TournamentRewardType.COUPON),\n\tcouponNamePrefix: ZodValidation.string('Coupon name prefix').optional(),\n\tpercentage: ZodValidation.number('Percentage').optional(),\n\tmaxDiscountPerOrder: ZodValidation.number('Max discount per order').nullable().optional(),\n});\n\nconst TournamentCouponRewardListOutputSchema = z.object({\n\ttype: z.literal(TournamentRewardType.COUPON),\n\tpercentage: ZodValidation.number('Percentage').optional(),\n\tmaxDiscountPerOrder: ZodValidation.number('Max discount per order').nullable().optional(),\n});\n\nconst TournamentRewardSchema = z.discriminatedUnion('type', [\n\tTournamentCouponRewardSchema,\n\tTournamentFreeDeliveryRewardSchema,\n]);\n\nconst TournamentRewardOutputSchema = z.discriminatedUnion('type', [\n\tTournamentCouponRewardOutputSchema,\n\tTournamentFreeDeliveryRewardSchema,\n]);\n\nconst TournamentRewardListOutputSchema = z.discriminatedUnion('type', [\n\tTournamentCouponRewardListOutputSchema,\n\tTournamentFreeDeliveryRewardSchema,\n]);\n\nconst TournamentNotificationTemplateSchema = z.record(\n\tZodValidation.enumType(TournamentNotificationTag, 'Notification tag'),\n\tz.object({\n\t\ttitle: ZodValidation.string('Notification title'),\n\t\tbody: ZodValidation.string('Notification body'),\n\t})\n);\n\nconst TournamentScheduledNotificationSchema = z.object({\n\ttype: ZodValidation.enumType(TournamentNotificationTag, 'Notification tag'),\n\tdurationMins: z.number().min(0),\n\ttarget: ZodValidation.enumType(TournamentScheduledNotificationTarget, 'Notification target'),\n});\n\nexport const CreateTournamentConfigSchema = z\n\t.object({\n\t\tname: ZodValidation.string('Tournament name'),\n\t\ttag: ZodValidation.string('Tournament tag'),\n\t\tstartDate: ZodValidation.date('Start date'),\n\t\tendDate: ZodValidation.date('End date'),\n\t\tstatus: ZodValidation.enumType(Status, 'Status').optional(),\n\t\treward: TournamentRewardSchema.optional(),\n\t\tnotificationTemplates: TournamentNotificationTemplateSchema.optional(),\n\t\tscheduledNotifications: z.array(TournamentScheduledNotificationSchema).optional(),\n\t})\n\t.superRefine((d, ctx) => {\n\t\tif (d.endDate <= d.startDate) {\n\t\t\tctx.addIssue({ code: z.ZodIssueCode.custom, message: 'End date must be after start date', path: ['endDate'] });\n\t\t}\n\t});\n\nexport const UpdateTournamentConfigSchema = z\n\t.object({\n\t\t_id: ZodValidation.objectId(),\n\t\tname: ZodValidation.string('Tournament name').optional(),\n\t\ttag: ZodValidation.string('Tournament tag').optional(),\n\t\tstartDate: ZodValidation.date('Start date').optional(),\n\t\tendDate: ZodValidation.date('End date').optional(),\n\t\tstatus: ZodValidation.enumType(Status, 'Status').optional(),\n\t\treward: TournamentRewardSchema.optional(),\n\t\tnotificationTemplates: TournamentNotificationTemplateSchema.optional(),\n\t\tscheduledNotifications: z.array(TournamentScheduledNotificationSchema).optional(),\n\t})\n\t.superRefine((d, ctx) => {\n\t\tif (d.startDate && d.endDate && d.endDate <= d.startDate) {\n\t\t\tctx.addIssue({ code: z.ZodIssueCode.custom, message: 'End date must be after start date', path: ['endDate'] });\n\t\t}\n\t});\n\nexport const TournamentConfigSchema = z.object({\n\t_id: ZodValidation.objectId().optional(),\n\tname: ZodValidation.string('Tournament name'),\n\ttag: ZodValidation.string('Tournament tag'),\n\tstartDate: z.date().nullable().optional(),\n\tendDate: z.date().nullable().optional(),\n\tstatus: ZodValidation.enumType(Status, 'Status'),\n\treward: TournamentRewardOutputSchema.optional(),\n\tcreatedAt: z.date().nullable().optional(),\n\tupdatedAt: z.date().nullable().optional(),\n\tnotificationTemplates: TournamentNotificationTemplateSchema.optional(),\n\tscheduledNotifications: z.array(TournamentScheduledNotificationSchema).optional(),\n});\n\nexport const TournamentConfigListItemSchema = TournamentConfigSchema.extend({\n\treward: TournamentRewardListOutputSchema.optional(),\n});\n\nexport const TournamentConfigResponseSchema = createResponseSchema(TournamentConfigSchema);\nexport const TournamentConfigListResponseSchema = createResponseSchema(z.array(TournamentConfigListItemSchema));\n\nexport type CreateTournamentConfigInputDTO = DTO<typeof CreateTournamentConfigSchema>;\nexport type UpdateTournamentConfigInputDTO = DTO<typeof UpdateTournamentConfigSchema>;\nexport type TournamentConfigOutputDTO = DTO<typeof TournamentConfigSchema>;\nexport type TournamentConfigListItemOutputDTO = DTO<typeof TournamentConfigListItemSchema>;\n"]}
@@ -0,0 +1,4 @@
1
+ import { TournamentProvider } from '@lyxa.ai/core/dist/utilities/enum';
2
+ import { TournamentService } from './tournamentService';
3
+ export declare function createTournamentService(provider: TournamentProvider, apiKey: string): TournamentService;
4
+ //# sourceMappingURL=integration.factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.factory.d.ts","sourceRoot":"/","sources":["modules/tournament/integration/integration.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAWvG"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTournamentService = createTournamentService;
4
+ const enum_1 = require("@lyxa.ai/core/dist/utilities/enum");
5
+ const tournamentService_1 = require("./tournamentService");
6
+ const providers_1 = require("./providers");
7
+ function createTournamentService(provider, apiKey) {
8
+ if (process.env.USE_MOCK_INTEGRATION === 'true' || process.env.NODE_ENV === 'test') {
9
+ return new tournamentService_1.TournamentService(new providers_1.MockTournamentProvider());
10
+ }
11
+ switch (provider) {
12
+ case enum_1.TournamentProvider.API_FOOTBALL:
13
+ return new tournamentService_1.TournamentService(new providers_1.ApiFootballProvider({ apiKey }));
14
+ default:
15
+ throw new Error(`Unknown tournament provider: "${provider}"`);
16
+ }
17
+ }
18
+ //# sourceMappingURL=integration.factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.factory.js","sourceRoot":"/","sources":["modules/tournament/integration/integration.factory.ts"],"names":[],"mappings":";;AAIA,0DAWC;AAfD,4DAAuE;AACvE,2DAAwD;AACxD,2CAA0E;AAE1E,SAAgB,uBAAuB,CAAC,QAA4B,EAAE,MAAc;IAChF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;QACjF,OAAO,IAAI,qCAAiB,CAAC,IAAI,kCAAsB,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,QAAQ,QAAQ,EAAE,CAAC;QACf,KAAK,yBAAkB,CAAC,YAAY;YAChC,OAAO,IAAI,qCAAiB,CAAC,IAAI,+BAAmB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACtE;YACI,MAAM,IAAI,KAAK,CAAC,iCAAiC,QAAQ,GAAG,CAAC,CAAC;IACtE,CAAC;AACL,CAAC","sourcesContent":["import { TournamentProvider } from '@lyxa.ai/core/dist/utilities/enum';\nimport { TournamentService } from './tournamentService';\nimport { ApiFootballProvider, MockTournamentProvider } from './providers';\n\nexport function createTournamentService(provider: TournamentProvider, apiKey: string): TournamentService {\n if (process.env.USE_MOCK_INTEGRATION === 'true' || process.env.NODE_ENV === 'test') {\n return new TournamentService(new MockTournamentProvider());\n }\n\n switch (provider) {\n case TournamentProvider.API_FOOTBALL:\n return new TournamentService(new ApiFootballProvider({ apiKey }));\n default:\n throw new Error(`Unknown tournament provider: \"${provider}\"`);\n }\n}\n"]}
@@ -0,0 +1,36 @@
1
+ export interface MatchScore {
2
+ externalId: string;
3
+ homeScore: number;
4
+ awayScore: number;
5
+ status: string;
6
+ elapsed: number | null;
7
+ ended: boolean;
8
+ }
9
+ export interface TeamStanding {
10
+ teamExternalId: string;
11
+ group: string;
12
+ rank: number;
13
+ points: number;
14
+ played: number;
15
+ won: number;
16
+ drawn: number;
17
+ lost: number;
18
+ goalDiff: number;
19
+ }
20
+ export interface FootballTeam {
21
+ externalId: string;
22
+ name: string;
23
+ code: string;
24
+ logoUrl: string;
25
+ }
26
+ export interface FootballQueryParams {
27
+ leagueId?: number;
28
+ season?: number;
29
+ externalIds?: string[];
30
+ }
31
+ export interface ITournamentService {
32
+ getLiveScores(params?: FootballQueryParams): Promise<MatchScore[]>;
33
+ getStandings(params?: FootballQueryParams): Promise<TeamStanding[]>;
34
+ getTeams(params?: FootballQueryParams): Promise<FootballTeam[]>;
35
+ }
36
+ //# sourceMappingURL=ITournamentService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITournamentService.d.ts","sourceRoot":"/","sources":["modules/tournament/integration/interfaces/ITournamentService.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IAC/B,aAAa,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IACnE,YAAY,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IACpE,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CACnE"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITournamentService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITournamentService.js","sourceRoot":"/","sources":["modules/tournament/integration/interfaces/ITournamentService.ts"],"names":[],"mappings":"","sourcesContent":["export interface MatchScore {\n externalId: string;\n homeScore: number;\n awayScore: number;\n status: string;\n elapsed: number | null;\n ended: boolean;\n}\n\nexport interface TeamStanding {\n teamExternalId: string;\n group: string;\n rank: number;\n points: number;\n played: number;\n won: number;\n drawn: number;\n lost: number;\n goalDiff: number;\n}\n\nexport interface FootballTeam {\n externalId: string;\n name: string;\n code: string;\n logoUrl: string;\n}\n\nexport interface FootballQueryParams {\n leagueId?: number;\n season?: number;\n externalIds?: string[];\n}\n\nexport interface ITournamentService {\n getLiveScores(params?: FootballQueryParams): Promise<MatchScore[]>;\n getStandings(params?: FootballQueryParams): Promise<TeamStanding[]>;\n getTeams(params?: FootballQueryParams): Promise<FootballTeam[]>;\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { FootballQueryParams, FootballTeam, ITournamentService, MatchScore, TeamStanding } from '../../interfaces/ITournamentService';
2
+ interface Config {
3
+ apiKey: string;
4
+ }
5
+ export declare class ApiFootballProvider implements ITournamentService {
6
+ private readonly config;
7
+ constructor(config: Config);
8
+ private get;
9
+ getLiveScores(params?: FootballQueryParams): Promise<MatchScore[]>;
10
+ getStandings(params?: FootballQueryParams): Promise<TeamStanding[]>;
11
+ getTeams(params?: FootballQueryParams): Promise<FootballTeam[]>;
12
+ }
13
+ export {};
14
+ //# sourceMappingURL=api-football.provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-football.provider.d.ts","sourceRoot":"/","sources":["modules/tournament/integration/providers/api-football/api-football.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,YAAY,EACf,MAAM,qCAAqC,CAAC;AAI7C,UAAU,MAAM;IAAG,MAAM,EAAE,MAAM,CAAA;CAAE;AAKnC,qBAAa,mBAAoB,YAAW,kBAAkB;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;YAE7B,GAAG;IAQX,aAAa,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAyBlE,YAAY,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAuBnE,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAiBxE"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiFootballProvider = void 0;
4
+ const core_1 = require("@lyxa.ai/core");
5
+ const BASE_URL = 'https://v3.football.api-sports.io';
6
+ const ENDED_STATUSES = new Set(['FT', 'AET', 'PEN']);
7
+ class ApiFootballProvider {
8
+ config;
9
+ constructor(config) {
10
+ this.config = config;
11
+ }
12
+ async get(path) {
13
+ const res = await fetch(`${BASE_URL}${path}`, {
14
+ headers: { 'x-apisports-key': this.config.apiKey },
15
+ });
16
+ if (!res.ok)
17
+ throw new Error(`API-Football request failed: ${res.status} ${path}`);
18
+ return res.json();
19
+ }
20
+ async getLiveScores(params) {
21
+ const query = new URLSearchParams();
22
+ if (params?.externalIds?.length) {
23
+ query.set('ids', params.externalIds.join('-'));
24
+ }
25
+ else {
26
+ query.set('date', new Date().toISOString().split('T')[0]);
27
+ if (params?.leagueId !== undefined)
28
+ query.set('league', String(params.leagueId));
29
+ if (params?.season !== undefined)
30
+ query.set('season', String(params.season));
31
+ }
32
+ const data = await this.get(`/fixtures?${query}`);
33
+ const scores = data.response.map(({ fixture, goals }) => ({
34
+ externalId: String(fixture.id),
35
+ homeScore: goals.home ?? 0,
36
+ awayScore: goals.away ?? 0,
37
+ status: fixture.status.short,
38
+ elapsed: fixture.status.elapsed,
39
+ ended: ENDED_STATUSES.has(fixture.status.short),
40
+ }));
41
+ (0, core_1.getLibraries)().getLoggerKit().info('Live scores fetched', {
42
+ tag: 'tournament.sync.live-scores',
43
+ data: { params, query: query.toString(), total: scores.length, scores },
44
+ });
45
+ return scores;
46
+ }
47
+ async getStandings(params) {
48
+ const query = new URLSearchParams();
49
+ if (params?.leagueId !== undefined)
50
+ query.set('league', String(params.leagueId));
51
+ if (params?.season !== undefined)
52
+ query.set('season', String(params.season));
53
+ const data = await this.get(`/standings?${query}`);
54
+ const standings = data.response[0].league.standings.flat().map(entry => ({
55
+ teamExternalId: String(entry.team.id),
56
+ group: entry.group,
57
+ rank: entry.rank,
58
+ points: entry.points,
59
+ played: entry.all.played,
60
+ won: entry.all.win,
61
+ drawn: entry.all.draw,
62
+ lost: entry.all.lose,
63
+ goalDiff: entry.all.goals.for - entry.all.goals.against,
64
+ }));
65
+ (0, core_1.getLibraries)().getLoggerKit().info('Standings fetched', {
66
+ tag: 'tournament.sync.standings',
67
+ data: { params, query: query.toString(), total: standings.length, standings },
68
+ });
69
+ return standings;
70
+ }
71
+ async getTeams(params) {
72
+ const query = new URLSearchParams();
73
+ if (params?.leagueId !== undefined)
74
+ query.set('league', String(params.leagueId));
75
+ if (params?.season !== undefined)
76
+ query.set('season', String(params.season));
77
+ const data = await this.get(`/teams?${query}`);
78
+ const teams = data.response.map(({ team }) => ({
79
+ externalId: String(team.id),
80
+ name: team.name,
81
+ code: team.code,
82
+ logoUrl: team.logo,
83
+ }));
84
+ (0, core_1.getLibraries)().getLoggerKit().info('Teams fetched', {
85
+ tag: 'tournament.sync.teams',
86
+ data: { params, query: query.toString(), total: teams.length, teams },
87
+ });
88
+ return teams;
89
+ }
90
+ }
91
+ exports.ApiFootballProvider = ApiFootballProvider;
92
+ //# sourceMappingURL=api-football.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-football.provider.js","sourceRoot":"/","sources":["modules/tournament/integration/providers/api-football/api-football.provider.ts"],"names":[],"mappings":";;;AAQA,wCAA2C;AAI3C,MAAM,QAAQ,GAAG,mCAAm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,CAAC,CAAC,CAAC;QACjF,IAAI,MAAM,EAAE,MAAM,KAAK,SAAS;YAAE,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7E,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAmB,UAAU,KAAK,EAAE,CAAC,CAAC;QACjE,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;YAC3C,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,IAAI;SACrB,CAAC,CAAC,CAAC;QACJ,IAAA,mBAAY,GAAE,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE;YAChD,GAAG,EAAE,uBAAuB;YAC5B,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE;SACxE,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AA5ED,kDA4EC","sourcesContent":["import {\n FootballQueryParams,\n FootballTeam,\n ITournamentService,\n MatchScore,\n TeamStanding\n} from '../../interfaces/ITournamentService';\nimport {ApiFixturesResponse, ApiStandingsResponse, ApiTeamsResponse} from './api-football.types';\nimport {getLibraries} from '@lyxa.ai/core';\n\ninterface Config { apiKey: string }\n\nconst BASE_URL = 'https://v3.football.api-sports.io';\nconst ENDED_STATUSES = new Set(['FT', 'AET', 'PEN']);\n\nexport class ApiFootballProvider implements ITournamentService {\n constructor(private readonly config: Config) {}\n\n private async get<T>(path: string): Promise<T> {\n const res = await fetch(`${BASE_URL}${path}`, {\n headers: { 'x-apisports-key': this.config.apiKey },\n });\n if (!res.ok) throw new Error(`API-Football request failed: ${res.status} ${path}`);\n return res.json() as Promise<T>;\n }\n\n async getLiveScores(params?: FootballQueryParams): Promise<MatchScore[]> {\n const query = new URLSearchParams();\n if (params?.externalIds?.length) {\n query.set('ids', params.externalIds.join('-'));\n } else {\n query.set('date', new Date().toISOString().split('T')[0]);\n if (params?.leagueId !== undefined) query.set('league', String(params.leagueId));\n if (params?.season !== undefined) query.set('season', String(params.season));\n }\n const data = await this.get<ApiFixturesResponse>(`/fixtures?${query}`);\n const scores = data.response.map(({ fixture, goals }) => ({\n externalId: String(fixture.id),\n homeScore: goals.home ?? 0,\n awayScore: goals.away ?? 0,\n status: fixture.status.short,\n elapsed: fixture.status.elapsed,\n ended: ENDED_STATUSES.has(fixture.status.short),\n }));\n getLibraries().getLoggerKit().info('Live scores fetched', {\n tag: 'tournament.sync.live-scores',\n data: { params, query: query.toString(), total: scores.length, scores },\n });\n return scores;\n }\n\n async getStandings(params?: FootballQueryParams): Promise<TeamStanding[]> {\n const query = new URLSearchParams();\n if (params?.leagueId !== undefined) query.set('league', String(params.leagueId));\n if (params?.season !== undefined) query.set('season', String(params.season));\n const data = await this.get<ApiStandingsResponse>(`/standings?${query}`);\n const standings = data.response[0].league.standings.flat().map(entry => ({\n teamExternalId: String(entry.team.id),\n group: entry.group,\n rank: entry.rank,\n points: entry.points,\n played: entry.all.played,\n won: entry.all.win,\n drawn: entry.all.draw,\n lost: entry.all.lose,\n goalDiff: entry.all.goals.for - entry.all.goals.against,\n }));\n getLibraries().getLoggerKit().info('Standings fetched', {\n tag: 'tournament.sync.standings',\n data: { params, query: query.toString(), total: standings.length, standings },\n });\n return standings;\n }\n\n async getTeams(params?: FootballQueryParams): Promise<FootballTeam[]> {\n const query = new URLSearchParams();\n if (params?.leagueId !== undefined) query.set('league', String(params.leagueId));\n if (params?.season !== undefined) query.set('season', String(params.season));\n const data = await this.get<ApiTeamsResponse>(`/teams?${query}`);\n const teams = data.response.map(({ team }) => ({\n externalId: String(team.id),\n name: team.name,\n code: team.code,\n logoUrl: team.logo,\n }));\n getLibraries().getLoggerKit().info('Teams fetched', {\n tag: 'tournament.sync.teams',\n data: { params, query: query.toString(), total: teams.length, teams },\n });\n return teams;\n }\n}\n"]}
@@ -0,0 +1,51 @@
1
+ export interface ApiFixturesResponse {
2
+ response: Array<{
3
+ fixture: {
4
+ id: number;
5
+ status: {
6
+ short: string;
7
+ elapsed: number | null;
8
+ };
9
+ };
10
+ goals: {
11
+ home: number | null;
12
+ away: number | null;
13
+ };
14
+ }>;
15
+ }
16
+ export interface ApiStandingEntry {
17
+ rank: number;
18
+ team: {
19
+ id: number;
20
+ };
21
+ group: string;
22
+ points: number;
23
+ all: {
24
+ played: number;
25
+ win: number;
26
+ draw: number;
27
+ lose: number;
28
+ goals: {
29
+ for: number;
30
+ against: number;
31
+ };
32
+ };
33
+ }
34
+ export interface ApiStandingsResponse {
35
+ response: Array<{
36
+ league: {
37
+ standings: ApiStandingEntry[][];
38
+ };
39
+ }>;
40
+ }
41
+ export interface ApiTeamsResponse {
42
+ response: Array<{
43
+ team: {
44
+ id: number;
45
+ name: string;
46
+ code: string;
47
+ logo: string;
48
+ };
49
+ }>;
50
+ }
51
+ //# sourceMappingURL=api-football.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-football.types.d.ts","sourceRoot":"/","sources":["modules/tournament/integration/providers/api-football/api-football.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAChC,QAAQ,EAAE,KAAK,CAAC;QACZ,OAAO,EAAE;YACL,EAAE,EAAE,MAAM,CAAC;YACX,MAAM,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;aAAE,CAAC;SACrD,CAAC;QACF,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;YAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;KACvD,CAAC,CAAC;CACN;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE;QACD,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;KAC3C,CAAC;CACL;AAED,MAAM,WAAW,oBAAoB;IACjC,QAAQ,EAAE,KAAK,CAAC;QACZ,MAAM,EAAE;YAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,CAAA;SAAE,CAAC;KAC/C,CAAC,CAAC;CACN;AAED,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KAClE,CAAC,CAAC;CACN"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=api-football.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-football.types.js","sourceRoot":"/","sources":["modules/tournament/integration/providers/api-football/api-football.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface ApiFixturesResponse {\n response: Array<{\n fixture: {\n id: number;\n status: { short: string; elapsed: number | null };\n };\n goals: { home: number | null; away: number | null };\n }>;\n}\n\nexport interface ApiStandingEntry {\n rank: number;\n team: { id: number };\n group: string;\n points: number;\n all: {\n played: number;\n win: number;\n draw: number;\n lose: number;\n goals: { for: number; against: number };\n };\n}\n\nexport interface ApiStandingsResponse {\n response: Array<{\n league: { standings: ApiStandingEntry[][] };\n }>;\n}\n\nexport interface ApiTeamsResponse {\n response: Array<{\n team: { id: number; name: string; code: string; logo: string };\n }>;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './api-football.provider';
2
+ export * from './api-football.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/tournament/integration/providers/api-football/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./api-football.provider"), exports);
18
+ __exportStar(require("./api-football.types"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/tournament/integration/providers/api-football/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,uDAAqC","sourcesContent":["export * from './api-football.provider';\nexport * from './api-football.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './api-football';
2
+ export * from './mock.provider';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/tournament/integration/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./api-football"), exports);
18
+ __exportStar(require("./mock.provider"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/tournament/integration/providers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,kDAAgC","sourcesContent":["export * from './api-football';\nexport * from './mock.provider';\n"]}
@@ -0,0 +1,7 @@
1
+ import { ITournamentService, FootballQueryParams, MatchScore, TeamStanding, FootballTeam } from '../interfaces/ITournamentService';
2
+ export declare class MockTournamentProvider implements ITournamentService {
3
+ getLiveScores(_params?: FootballQueryParams): Promise<MatchScore[]>;
4
+ getStandings(_params?: FootballQueryParams): Promise<TeamStanding[]>;
5
+ getTeams(_params?: FootballQueryParams): Promise<FootballTeam[]>;
6
+ }
7
+ //# sourceMappingURL=mock.provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock.provider.d.ts","sourceRoot":"/","sources":["modules/tournament/integration/providers/mock.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEnI,qBAAa,sBAAuB,YAAW,kBAAkB;IACvD,aAAa,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAInE,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAOpE,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAMzE"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MockTournamentProvider = void 0;
4
+ class MockTournamentProvider {
5
+ async getLiveScores(_params) {
6
+ return [{ externalId: '1', homeScore: 1, awayScore: 0, status: '1H', elapsed: 34, ended: false }];
7
+ }
8
+ async getStandings(_params) {
9
+ return [
10
+ { teamExternalId: '1', group: 'Group A', rank: 1, points: 9, played: 3, won: 3, drawn: 0, lost: 0, goalDiff: 5 },
11
+ { teamExternalId: '2', group: 'Group A', rank: 2, points: 6, played: 3, won: 2, drawn: 0, lost: 1, goalDiff: 2 },
12
+ ];
13
+ }
14
+ async getTeams(_params) {
15
+ return [
16
+ { externalId: '1', name: 'Brazil', code: 'BRA', logoUrl: 'https://mock/fra.png' },
17
+ { externalId: '2', name: 'France', code: 'FRA', logoUrl: 'https://mock/fra.png' },
18
+ ];
19
+ }
20
+ }
21
+ exports.MockTournamentProvider = MockTournamentProvider;
22
+ //# sourceMappingURL=mock.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock.provider.js","sourceRoot":"/","sources":["modules/tournament/integration/providers/mock.provider.ts"],"names":[],"mappings":";;;AAEA,MAAa,sBAAsB;IAC/B,KAAK,CAAC,aAAa,CAAC,OAA6B;QAC7C,OAAO,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACtG,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAA6B;QAC5C,OAAO;YACH,EAAE,cAAc,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE;YAChH,EAAE,cAAc,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE;SACnH,CAAC;IACN,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAA6B;QACxC,OAAO;YACH,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE;YACjF,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE;SACpF,CAAC;IACN,CAAC;CACJ;AAlBD,wDAkBC","sourcesContent":["import { ITournamentService, FootballQueryParams, MatchScore, TeamStanding, FootballTeam } from '../interfaces/ITournamentService';\n\nexport class MockTournamentProvider implements ITournamentService {\n async getLiveScores(_params?: FootballQueryParams): Promise<MatchScore[]> {\n return [{ externalId: '1', homeScore: 1, awayScore: 0, status: '1H', elapsed: 34, ended: false }];\n }\n\n async getStandings(_params?: FootballQueryParams): Promise<TeamStanding[]> {\n return [\n { teamExternalId: '1', group: 'Group A', rank: 1, points: 9, played: 3, won: 3, drawn: 0, lost: 0, goalDiff: 5 },\n { teamExternalId: '2', group: 'Group A', rank: 2, points: 6, played: 3, won: 2, drawn: 0, lost: 1, goalDiff: 2 },\n ];\n }\n\n async getTeams(_params?: FootballQueryParams): Promise<FootballTeam[]> {\n return [\n { externalId: '1', name: 'Brazil', code: 'BRA', logoUrl: 'https://mock/fra.png' },\n { externalId: '2', name: 'France', code: 'FRA', logoUrl: 'https://mock/fra.png' },\n ];\n }\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import { ITournamentService, FootballQueryParams, MatchScore, TeamStanding, FootballTeam } from './interfaces/ITournamentService';
2
+ export declare class TournamentService {
3
+ private readonly provider;
4
+ constructor(provider: ITournamentService);
5
+ getLiveScores(params?: FootballQueryParams): Promise<MatchScore[]>;
6
+ getStandings(params?: FootballQueryParams): Promise<TeamStanding[]>;
7
+ getTeams(params?: FootballQueryParams): Promise<FootballTeam[]>;
8
+ }
9
+ //# sourceMappingURL=tournamentService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tournamentService.d.ts","sourceRoot":"/","sources":["modules/tournament/integration/tournamentService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAElI,qBAAa,iBAAiB;IACd,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,kBAAkB;IAEzD,aAAa,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAIlE,YAAY,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAInE,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAGlE"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TournamentService = void 0;
4
+ class TournamentService {
5
+ provider;
6
+ constructor(provider) {
7
+ this.provider = provider;
8
+ }
9
+ getLiveScores(params) {
10
+ return this.provider.getLiveScores(params);
11
+ }
12
+ getStandings(params) {
13
+ return this.provider.getStandings(params);
14
+ }
15
+ getTeams(params) {
16
+ return this.provider.getTeams(params);
17
+ }
18
+ }
19
+ exports.TournamentService = TournamentService;
20
+ //# sourceMappingURL=tournamentService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tournamentService.js","sourceRoot":"/","sources":["modules/tournament/integration/tournamentService.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IACG;IAA7B,YAA6B,QAA4B;QAA5B,aAAQ,GAAR,QAAQ,CAAoB;IAAG,CAAC;IAE7D,aAAa,CAAC,MAA4B;QACtC,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED,YAAY,CAAC,MAA4B;QACrC,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,QAAQ,CAAC,MAA4B;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;CACJ;AAdD,8CAcC","sourcesContent":["import { ITournamentService, FootballQueryParams, MatchScore, TeamStanding, FootballTeam } from './interfaces/ITournamentService';\n\nexport class TournamentService {\n constructor(private readonly provider: ITournamentService) {}\n\n getLiveScores(params?: FootballQueryParams): Promise<MatchScore[]> {\n return this.provider.getLiveScores(params);\n }\n\n getStandings(params?: FootballQueryParams): Promise<TeamStanding[]> {\n return this.provider.getStandings(params);\n }\n\n getTeams(params?: FootballQueryParams): Promise<FootballTeam[]> {\n return this.provider.getTeams(params);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"evaluate-predictions.consumer.d.ts","sourceRoot":"/","sources":["modules/tournament/match/events/evaluate-predictions.consumer.ts"],"names":[],"mappings":"AAWA,wBAAsB,2BAA2B,kBAuBhD"}
1
+ {"version":3,"file":"evaluate-predictions.consumer.d.ts","sourceRoot":"/","sources":["modules/tournament/match/events/evaluate-predictions.consumer.ts"],"names":[],"mappings":"AAeA,wBAAsB,2BAA2B,kBA4DhD"}