@lyxa.ai/marketing 1.0.51 → 1.0.53
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.
- package/dist/lib/index.d.ts +323 -77
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js +16 -3
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js.map +1 -1
- package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts +1117 -285
- package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/all-coupons.validation.js +16 -2
- package/dist/lib/modules/coupon/validations/all-coupons.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/index.d.ts +0 -1
- package/dist/lib/modules/coupon/validations/index.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/index.js +0 -1
- package/dist/lib/modules/coupon/validations/index.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts +32 -32
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js +9 -9
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts +0 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.js +2 -5
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +1 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js +2 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +19 -6
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js +3 -2
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +3 -9
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js +4 -7
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts +1 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.js +15 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts +96 -50
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.js +23 -0
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.d.ts +18 -0
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.js +78 -0
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +12 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js +68 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +22 -18
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js +2 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +88 -83
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.js +3 -2
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +10 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js +68 -22
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js.map +1 -1
- package/dist/lib/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
- package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
- package/dist/lib/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
- package/dist/lib/modules/tournament/config/config.builder.d.ts.map +1 -1
- package/dist/lib/modules/tournament/config/config.builder.js +4 -0
- package/dist/lib/modules/tournament/config/config.builder.js.map +1 -1
- package/dist/lib/modules/tournament/config/config.repository.d.ts +8 -2
- package/dist/lib/modules/tournament/config/config.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/config/config.repository.js +30 -1
- package/dist/lib/modules/tournament/config/config.repository.js.map +1 -1
- package/dist/lib/modules/tournament/config/config.router.d.ts +102 -12
- package/dist/lib/modules/tournament/config/config.router.d.ts.map +1 -1
- package/dist/lib/modules/tournament/config/config.types.d.ts +15 -0
- package/dist/lib/modules/tournament/config/config.types.d.ts.map +1 -0
- package/dist/lib/modules/tournament/config/config.types.js +3 -0
- package/dist/lib/modules/tournament/config/config.types.js.map +1 -0
- package/dist/lib/modules/tournament/config/config.validation.d.ts +431 -52
- package/dist/lib/modules/tournament/config/config.validation.d.ts.map +1 -1
- package/dist/lib/modules/tournament/config/config.validation.js +20 -6
- package/dist/lib/modules/tournament/config/config.validation.js.map +1 -1
- package/dist/lib/modules/tournament/integration/integration.factory.d.ts +4 -0
- package/dist/lib/modules/tournament/integration/integration.factory.d.ts.map +1 -0
- package/dist/lib/modules/tournament/integration/integration.factory.js +18 -0
- package/dist/lib/modules/tournament/integration/integration.factory.js.map +1 -0
- package/dist/lib/modules/tournament/integration/interfaces/ITournamentService.d.ts +36 -0
- package/dist/lib/modules/tournament/integration/interfaces/ITournamentService.d.ts.map +1 -0
- package/dist/lib/modules/tournament/integration/interfaces/ITournamentService.js +3 -0
- package/dist/lib/modules/tournament/integration/interfaces/ITournamentService.js.map +1 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.d.ts +14 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.d.ts.map +1 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.js +92 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.js.map +1 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.d.ts +51 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.d.ts.map +1 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.js +3 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.js.map +1 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/index.d.ts +3 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/index.d.ts.map +1 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/index.js +19 -0
- package/dist/lib/modules/tournament/integration/providers/api-football/index.js.map +1 -0
- package/dist/lib/modules/tournament/integration/providers/index.d.ts +3 -0
- package/dist/lib/modules/tournament/integration/providers/index.d.ts.map +1 -0
- package/dist/lib/modules/tournament/integration/providers/index.js +19 -0
- package/dist/lib/modules/tournament/integration/providers/index.js.map +1 -0
- package/dist/lib/modules/tournament/integration/providers/mock.provider.d.ts +7 -0
- package/dist/lib/modules/tournament/integration/providers/mock.provider.d.ts.map +1 -0
- package/dist/lib/modules/tournament/integration/providers/mock.provider.js +22 -0
- package/dist/lib/modules/tournament/integration/providers/mock.provider.js.map +1 -0
- package/dist/lib/modules/tournament/integration/tournamentService.d.ts +9 -0
- package/dist/lib/modules/tournament/integration/tournamentService.d.ts.map +1 -0
- package/dist/lib/modules/tournament/integration/tournamentService.js +20 -0
- package/dist/lib/modules/tournament/integration/tournamentService.js.map +1 -0
- package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js +50 -11
- package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js.map +1 -1
- package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.d.ts +7 -3
- package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.js +1 -1
- package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.js.map +1 -1
- package/dist/lib/modules/tournament/match/events/match-evaluation.orchestrator.d.ts +14 -0
- package/dist/lib/modules/tournament/match/events/match-evaluation.orchestrator.d.ts.map +1 -0
- package/dist/lib/modules/tournament/{notification/jobs/notification.worker.js → match/events/match-evaluation.orchestrator.js} +31 -27
- package/dist/lib/modules/tournament/match/events/match-evaluation.orchestrator.js.map +1 -0
- package/dist/lib/modules/tournament/match/match.builder.d.ts +13 -34
- package/dist/lib/modules/tournament/match/match.builder.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/match.builder.js +31 -10
- package/dist/lib/modules/tournament/match/match.builder.js.map +1 -1
- package/dist/lib/modules/tournament/match/match.repository.d.ts +1 -1
- package/dist/lib/modules/tournament/match/match.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/match.repository.js.map +1 -1
- package/dist/lib/modules/tournament/match/match.router.d.ts +40 -4
- package/dist/lib/modules/tournament/match/match.router.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/match.service.d.ts +3 -0
- package/dist/lib/modules/tournament/match/match.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/match.service.js +15 -12
- package/dist/lib/modules/tournament/match/match.service.js.map +1 -1
- package/dist/lib/modules/tournament/match/match.types.d.ts +51 -0
- package/dist/lib/modules/tournament/match/match.types.d.ts.map +1 -0
- package/dist/lib/modules/tournament/match/match.types.js +3 -0
- package/dist/lib/modules/tournament/match/match.types.js.map +1 -0
- package/dist/lib/modules/tournament/notification/notification-template.repository.d.ts +2 -1
- package/dist/lib/modules/tournament/notification/notification-template.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/notification/notification-template.repository.js +2 -1
- package/dist/lib/modules/tournament/notification/notification-template.repository.js.map +1 -1
- package/dist/lib/modules/tournament/notification/notification.builder.d.ts +30 -0
- package/dist/lib/modules/tournament/notification/notification.builder.d.ts.map +1 -0
- package/dist/lib/modules/tournament/notification/notification.builder.js +35 -0
- package/dist/lib/modules/tournament/notification/notification.builder.js.map +1 -0
- package/dist/lib/modules/tournament/notification/notification.config.d.ts +10 -9
- package/dist/lib/modules/tournament/notification/notification.config.d.ts.map +1 -1
- package/dist/lib/modules/tournament/notification/notification.config.js +0 -12
- package/dist/lib/modules/tournament/notification/notification.config.js.map +1 -1
- package/dist/lib/modules/tournament/notification/notification.service.d.ts +5 -3
- package/dist/lib/modules/tournament/notification/notification.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/notification/notification.service.js +23 -15
- package/dist/lib/modules/tournament/notification/notification.service.js.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.builder.d.ts +12 -0
- package/dist/lib/modules/tournament/participant/participant.builder.d.ts.map +1 -0
- package/dist/lib/modules/tournament/participant/participant.builder.js +17 -0
- package/dist/lib/modules/tournament/participant/participant.builder.js.map +1 -0
- package/dist/lib/modules/tournament/participant/participant.repository.d.ts +8 -7
- package/dist/lib/modules/tournament/participant/participant.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.repository.js +12 -2
- package/dist/lib/modules/tournament/participant/participant.repository.js.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.service.d.ts +1 -0
- package/dist/lib/modules/tournament/participant/participant.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.service.js +15 -17
- package/dist/lib/modules/tournament/participant/participant.service.js.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.builder.d.ts +3 -9
- package/dist/lib/modules/tournament/prediction/prediction.builder.d.ts.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.builder.js.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts +11 -3
- package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.repository.js +47 -0
- package/dist/lib/modules/tournament/prediction/prediction.repository.js.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.service.d.ts +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.service.js +16 -26
- package/dist/lib/modules/tournament/prediction/prediction.service.js.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.types.d.ts +17 -0
- package/dist/lib/modules/tournament/prediction/prediction.types.d.ts.map +1 -0
- package/dist/lib/modules/tournament/prediction/prediction.types.js +3 -0
- package/dist/lib/modules/tournament/prediction/prediction.types.js.map +1 -0
- package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +8 -5
- package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -1
- package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js +58 -16
- package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.builder.d.ts +5 -2
- package/dist/lib/modules/tournament/reward/reward.builder.d.ts.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.builder.js +44 -28
- package/dist/lib/modules/tournament/reward/reward.builder.js.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.factory.d.ts +1 -1
- package/dist/lib/modules/tournament/reward/reward.factory.d.ts.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.factory.js.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.interface.d.ts +2 -2
- package/dist/lib/modules/tournament/reward/reward.interface.d.ts.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.interface.js.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.service.d.ts +1 -1
- package/dist/lib/modules/tournament/reward/reward.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.service.js +1 -1
- package/dist/lib/modules/tournament/reward/reward.service.js.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.types.d.ts +35 -2
- package/dist/lib/modules/tournament/reward/reward.types.d.ts.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.types.js.map +1 -1
- package/dist/lib/modules/tournament/schedule/schedule.router.d.ts.map +1 -1
- package/dist/lib/modules/tournament/schedule/schedule.router.js +1 -3
- package/dist/lib/modules/tournament/schedule/schedule.router.js.map +1 -1
- package/dist/lib/modules/tournament/schedule/schedule.service.d.ts +3 -0
- package/dist/lib/modules/tournament/schedule/schedule.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/schedule/schedule.service.js +30 -1
- package/dist/lib/modules/tournament/schedule/schedule.service.js.map +1 -1
- package/dist/lib/modules/tournament/score/score.repository.d.ts +13 -0
- package/dist/lib/modules/tournament/score/score.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/score/score.repository.js +20 -0
- package/dist/lib/modules/tournament/score/score.repository.js.map +1 -1
- package/dist/lib/modules/tournament/score/score.service.d.ts +3 -0
- package/dist/lib/modules/tournament/score/score.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/score/score.service.js +3 -0
- package/dist/lib/modules/tournament/score/score.service.js.map +1 -1
- package/dist/lib/modules/tournament/statistics/statistics.builder.d.ts +5 -0
- package/dist/lib/modules/tournament/statistics/statistics.builder.d.ts.map +1 -1
- package/dist/lib/modules/tournament/statistics/statistics.builder.js +47 -28
- package/dist/lib/modules/tournament/statistics/statistics.builder.js.map +1 -1
- package/dist/lib/modules/tournament/statistics/statistics.router.d.ts +4 -2
- package/dist/lib/modules/tournament/statistics/statistics.router.d.ts.map +1 -1
- package/dist/lib/modules/tournament/statistics/statistics.service.js +4 -4
- package/dist/lib/modules/tournament/statistics/statistics.service.js.map +1 -1
- package/dist/lib/modules/tournament/statistics/statistics.validation.d.ts +32 -14
- package/dist/lib/modules/tournament/statistics/statistics.validation.d.ts.map +1 -1
- package/dist/lib/modules/tournament/statistics/statistics.validation.js +2 -1
- package/dist/lib/modules/tournament/statistics/statistics.validation.js.map +1 -1
- package/dist/lib/modules/tournament/sync/sync.repository.d.ts +11 -0
- package/dist/lib/modules/tournament/sync/sync.repository.d.ts.map +1 -0
- package/dist/lib/modules/tournament/{notification/notification.scheduler.service.js → sync/sync.repository.js} +22 -28
- package/dist/lib/modules/tournament/sync/sync.repository.js.map +1 -0
- package/dist/lib/modules/tournament/sync/sync.router.d.ts +27 -0
- package/dist/lib/modules/tournament/sync/sync.router.d.ts.map +1 -0
- package/dist/lib/modules/tournament/sync/sync.router.js +15 -0
- package/dist/lib/modules/tournament/sync/sync.router.js.map +1 -0
- package/dist/lib/modules/tournament/sync/sync.service.d.ts +9 -0
- package/dist/lib/modules/tournament/sync/sync.service.d.ts.map +1 -0
- package/dist/lib/modules/tournament/sync/sync.service.js +117 -0
- package/dist/lib/modules/tournament/sync/sync.service.js.map +1 -0
- package/dist/lib/modules/tournament/team/team.builder.d.ts +4 -0
- package/dist/lib/modules/tournament/team/team.builder.d.ts.map +1 -1
- package/dist/lib/modules/tournament/team/team.builder.js +6 -0
- package/dist/lib/modules/tournament/team/team.builder.js.map +1 -1
- package/dist/lib/modules/tournament/team/team.repository.d.ts +3 -0
- package/dist/lib/modules/tournament/team/team.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/team/team.repository.js +6 -0
- package/dist/lib/modules/tournament/team/team.repository.js.map +1 -1
- package/dist/lib/modules/tournament/team/team.router.d.ts +24 -6
- package/dist/lib/modules/tournament/team/team.router.d.ts.map +1 -1
- package/dist/lib/modules/tournament/team/team.router.js +1 -1
- package/dist/lib/modules/tournament/team/team.router.js.map +1 -1
- package/dist/lib/modules/tournament/team/team.service.d.ts +2 -1
- package/dist/lib/modules/tournament/team/team.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/team/team.service.js +26 -23
- package/dist/lib/modules/tournament/team/team.service.js.map +1 -1
- package/dist/lib/modules/tournament/team/team.validation.d.ts +23 -24
- package/dist/lib/modules/tournament/team/team.validation.d.ts.map +1 -1
- package/dist/lib/modules/tournament/team/team.validation.js +3 -4
- package/dist/lib/modules/tournament/team/team.validation.js.map +1 -1
- package/dist/lib/modules/tournament/tournament.builder.d.ts +11 -0
- package/dist/lib/modules/tournament/tournament.builder.d.ts.map +1 -0
- package/dist/lib/modules/tournament/tournament.builder.js +34 -0
- package/dist/lib/modules/tournament/tournament.builder.js.map +1 -0
- package/dist/lib/modules/tournament/tournament.router.d.ts +226 -26
- package/dist/lib/modules/tournament/tournament.router.d.ts.map +1 -1
- package/dist/lib/modules/tournament/tournament.router.js +2 -0
- package/dist/lib/modules/tournament/tournament.router.js.map +1 -1
- package/dist/lib/modules/tournament/tournament.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/tournament.service.js +3 -10
- package/dist/lib/modules/tournament/tournament.service.js.map +1 -1
- package/dist/lib/modules/tournament/tournament.types.d.ts +0 -3
- package/dist/lib/modules/tournament/tournament.types.d.ts.map +1 -1
- package/dist/lib/modules/tournament/tournament.types.js +1 -5
- package/dist/lib/modules/tournament/tournament.types.js.map +1 -1
- package/dist/lib/modules/tournament/tournament.utils.d.ts +4 -0
- package/dist/lib/modules/tournament/tournament.utils.d.ts.map +1 -1
- package/dist/lib/modules/tournament/tournament.utils.js +8 -1
- package/dist/lib/modules/tournament/tournament.utils.js.map +1 -1
- package/dist/lib/modules/tournament/tournament.validation.d.ts +205 -1
- package/dist/lib/modules/tournament/tournament.validation.d.ts.map +1 -1
- package/dist/lib/modules/tournament/tournament.validation.js +23 -2
- package/dist/lib/modules/tournament/tournament.validation.js.map +1 -1
- package/dist/types/index.d.ts +323 -77
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts +1117 -285
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/index.d.ts +0 -1
- package/dist/types/modules/coupon/validations/index.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts +34 -32
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts +0 -1
- package/dist/types/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +1 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +19 -6
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +3 -9
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts +1 -0
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts +96 -50
- package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/limited-time-offer.service.d.ts +23 -0
- package/dist/types/modules/limited-time-offer/limited-time-offer.service.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +12 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +22 -18
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +88 -83
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +20 -1
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
- package/dist/types/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
- package/dist/types/modules/tournament/config/config.builder.d.ts.map +1 -1
- package/dist/types/modules/tournament/config/config.repository.d.ts +8 -2
- package/dist/types/modules/tournament/config/config.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/config/config.router.d.ts +102 -12
- package/dist/types/modules/tournament/config/config.router.d.ts.map +1 -1
- package/dist/types/modules/tournament/config/config.types.d.ts +15 -0
- package/dist/types/modules/tournament/config/config.types.d.ts.map +1 -0
- package/dist/types/modules/tournament/config/config.validation.d.ts +431 -52
- package/dist/types/modules/tournament/config/config.validation.d.ts.map +1 -1
- package/dist/types/modules/tournament/integration/integration.factory.d.ts +4 -0
- package/dist/types/modules/tournament/integration/integration.factory.d.ts.map +1 -0
- package/dist/types/modules/tournament/integration/interfaces/ITournamentService.d.ts +36 -0
- package/dist/types/modules/tournament/integration/interfaces/ITournamentService.d.ts.map +1 -0
- package/dist/types/modules/tournament/integration/providers/api-football/api-football.provider.d.ts +14 -0
- package/dist/types/modules/tournament/integration/providers/api-football/api-football.provider.d.ts.map +1 -0
- package/dist/types/modules/tournament/integration/providers/api-football/api-football.types.d.ts +51 -0
- package/dist/types/modules/tournament/integration/providers/api-football/api-football.types.d.ts.map +1 -0
- package/dist/types/modules/tournament/integration/providers/api-football/index.d.ts +3 -0
- package/dist/types/modules/tournament/integration/providers/api-football/index.d.ts.map +1 -0
- package/dist/types/modules/tournament/integration/providers/index.d.ts +3 -0
- package/dist/types/modules/tournament/integration/providers/index.d.ts.map +1 -0
- package/dist/types/modules/tournament/integration/providers/mock.provider.d.ts +7 -0
- package/dist/types/modules/tournament/integration/providers/mock.provider.d.ts.map +1 -0
- package/dist/types/modules/tournament/integration/tournamentService.d.ts +9 -0
- package/dist/types/modules/tournament/integration/tournamentService.d.ts.map +1 -0
- package/dist/types/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/events/evaluate-predictions.event.d.ts +7 -3
- package/dist/types/modules/tournament/match/events/evaluate-predictions.event.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/events/match-evaluation.orchestrator.d.ts +14 -0
- package/dist/types/modules/tournament/match/events/match-evaluation.orchestrator.d.ts.map +1 -0
- package/dist/types/modules/tournament/match/match.builder.d.ts +13 -34
- package/dist/types/modules/tournament/match/match.builder.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/match.repository.d.ts +1 -1
- package/dist/types/modules/tournament/match/match.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/match.router.d.ts +40 -4
- package/dist/types/modules/tournament/match/match.router.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/match.service.d.ts +3 -0
- package/dist/types/modules/tournament/match/match.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/match.types.d.ts +51 -0
- package/dist/types/modules/tournament/match/match.types.d.ts.map +1 -0
- package/dist/types/modules/tournament/notification/notification-template.repository.d.ts +2 -1
- package/dist/types/modules/tournament/notification/notification-template.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/notification/notification.builder.d.ts +30 -0
- package/dist/types/modules/tournament/notification/notification.builder.d.ts.map +1 -0
- package/dist/types/modules/tournament/notification/notification.config.d.ts +10 -9
- package/dist/types/modules/tournament/notification/notification.config.d.ts.map +1 -1
- package/dist/types/modules/tournament/notification/notification.service.d.ts +5 -3
- package/dist/types/modules/tournament/notification/notification.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/participant/participant.builder.d.ts +12 -0
- package/dist/types/modules/tournament/participant/participant.builder.d.ts.map +1 -0
- package/dist/types/modules/tournament/participant/participant.repository.d.ts +8 -7
- package/dist/types/modules/tournament/participant/participant.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/participant/participant.service.d.ts +1 -0
- package/dist/types/modules/tournament/participant/participant.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/prediction/prediction.builder.d.ts +3 -9
- package/dist/types/modules/tournament/prediction/prediction.builder.d.ts.map +1 -1
- package/dist/types/modules/tournament/prediction/prediction.repository.d.ts +11 -3
- package/dist/types/modules/tournament/prediction/prediction.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/prediction/prediction.service.d.ts +1 -1
- package/dist/types/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/prediction/prediction.types.d.ts +17 -0
- package/dist/types/modules/tournament/prediction/prediction.types.d.ts.map +1 -0
- package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +8 -5
- package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -1
- package/dist/types/modules/tournament/reward/reward.builder.d.ts +5 -2
- package/dist/types/modules/tournament/reward/reward.builder.d.ts.map +1 -1
- package/dist/types/modules/tournament/reward/reward.factory.d.ts +1 -1
- package/dist/types/modules/tournament/reward/reward.factory.d.ts.map +1 -1
- package/dist/types/modules/tournament/reward/reward.interface.d.ts +2 -2
- package/dist/types/modules/tournament/reward/reward.interface.d.ts.map +1 -1
- package/dist/types/modules/tournament/reward/reward.service.d.ts +1 -1
- package/dist/types/modules/tournament/reward/reward.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/reward/reward.types.d.ts +35 -2
- package/dist/types/modules/tournament/reward/reward.types.d.ts.map +1 -1
- package/dist/types/modules/tournament/schedule/schedule.router.d.ts.map +1 -1
- package/dist/types/modules/tournament/schedule/schedule.service.d.ts +3 -0
- package/dist/types/modules/tournament/schedule/schedule.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/score/score.repository.d.ts +13 -0
- package/dist/types/modules/tournament/score/score.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/score/score.service.d.ts +3 -0
- package/dist/types/modules/tournament/score/score.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/statistics/statistics.builder.d.ts +5 -0
- package/dist/types/modules/tournament/statistics/statistics.builder.d.ts.map +1 -1
- package/dist/types/modules/tournament/statistics/statistics.router.d.ts +4 -2
- package/dist/types/modules/tournament/statistics/statistics.router.d.ts.map +1 -1
- package/dist/types/modules/tournament/statistics/statistics.validation.d.ts +32 -14
- package/dist/types/modules/tournament/statistics/statistics.validation.d.ts.map +1 -1
- package/dist/types/modules/tournament/sync/sync.repository.d.ts +11 -0
- package/dist/types/modules/tournament/sync/sync.repository.d.ts.map +1 -0
- package/dist/types/modules/tournament/sync/sync.router.d.ts +27 -0
- package/dist/types/modules/tournament/sync/sync.router.d.ts.map +1 -0
- package/dist/types/modules/tournament/sync/sync.service.d.ts +9 -0
- package/dist/types/modules/tournament/sync/sync.service.d.ts.map +1 -0
- package/dist/types/modules/tournament/team/team.builder.d.ts +4 -0
- package/dist/types/modules/tournament/team/team.builder.d.ts.map +1 -1
- package/dist/types/modules/tournament/team/team.repository.d.ts +3 -0
- package/dist/types/modules/tournament/team/team.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/team/team.router.d.ts +24 -6
- package/dist/types/modules/tournament/team/team.router.d.ts.map +1 -1
- package/dist/types/modules/tournament/team/team.service.d.ts +2 -1
- package/dist/types/modules/tournament/team/team.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/team/team.validation.d.ts +23 -24
- package/dist/types/modules/tournament/team/team.validation.d.ts.map +1 -1
- package/dist/types/modules/tournament/tournament.builder.d.ts +11 -0
- package/dist/types/modules/tournament/tournament.builder.d.ts.map +1 -0
- package/dist/types/modules/tournament/tournament.router.d.ts +226 -26
- package/dist/types/modules/tournament/tournament.router.d.ts.map +1 -1
- package/dist/types/modules/tournament/tournament.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/tournament.types.d.ts +0 -3
- package/dist/types/modules/tournament/tournament.types.d.ts.map +1 -1
- package/dist/types/modules/tournament/tournament.utils.d.ts +4 -0
- package/dist/types/modules/tournament/tournament.utils.d.ts.map +1 -1
- package/dist/types/modules/tournament/tournament.validation.d.ts +205 -1
- package/dist/types/modules/tournament/tournament.validation.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/lib/modules/tournament/match/events/match-ended.consumer.d.ts +0 -2
- package/dist/lib/modules/tournament/match/events/match-ended.consumer.d.ts.map +0 -1
- package/dist/lib/modules/tournament/match/events/match-ended.consumer.js +0 -15
- package/dist/lib/modules/tournament/match/events/match-ended.consumer.js.map +0 -1
- package/dist/lib/modules/tournament/match/events/match-ended.event.d.ts +0 -14
- package/dist/lib/modules/tournament/match/events/match-ended.event.d.ts.map +0 -1
- package/dist/lib/modules/tournament/match/events/match-ended.event.js +0 -12
- package/dist/lib/modules/tournament/match/events/match-ended.event.js.map +0 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts +0 -10
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts.map +0 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.js +0 -23
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.js.map +0 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts +0 -9
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts.map +0 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.js.map +0 -1
- package/dist/lib/modules/tournament/notification/notification.schedule.config.d.ts +0 -10
- package/dist/lib/modules/tournament/notification/notification.schedule.config.d.ts.map +0 -1
- package/dist/lib/modules/tournament/notification/notification.schedule.config.js +0 -15
- package/dist/lib/modules/tournament/notification/notification.schedule.config.js.map +0 -1
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts +0 -10
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts.map +0 -1
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.js.map +0 -1
- package/dist/types/events/event-initializations.d.ts +0 -2
- package/dist/types/events/event-initializations.d.ts.map +0 -1
- package/dist/types/modules/tournament/config/tournament-config.validation.d.ts +0 -201
- package/dist/types/modules/tournament/config/tournament-config.validation.d.ts.map +0 -1
- package/dist/types/modules/tournament/match/events/match-ended.consumer.d.ts +0 -2
- package/dist/types/modules/tournament/match/events/match-ended.consumer.d.ts.map +0 -1
- package/dist/types/modules/tournament/match/events/match-ended.event.d.ts +0 -14
- package/dist/types/modules/tournament/match/events/match-ended.event.d.ts.map +0 -1
- package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts +0 -10
- package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts.map +0 -1
- package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts +0 -9
- package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts.map +0 -1
- package/dist/types/modules/tournament/notification/notification.schedule.config.d.ts +0 -10
- package/dist/types/modules/tournament/notification/notification.schedule.config.d.ts.map +0 -1
- package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts +0 -10
- 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,
|
|
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,yBAAyB,EAAE,oBAAoB,EAAE,qCAAqC,EAAC,MAAM,mCAAmC,CAAC;AAuDjJ,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAetC,CAAC;AAEJ,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
|
@@ -5,15 +5,14 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const global_validation_1 = require("@lyxa.ai/core/dist/utilities/validation/global-validation");
|
|
6
6
|
const validation_1 = require("@lyxa.ai/core/dist/utilities/validation");
|
|
7
7
|
const enum_1 = require("@lyxa.ai/core/dist/utilities/enum");
|
|
8
|
-
const tournament_types_1 = require("../tournament.types");
|
|
9
8
|
const TournamentFreeDeliveryRewardSchema = zod_1.z.object({
|
|
10
9
|
type: zod_1.z.literal(enum_1.TournamentRewardType.FREE_DELIVERY),
|
|
11
10
|
});
|
|
12
11
|
const TournamentCouponRewardSchema = zod_1.z.object({
|
|
13
12
|
type: zod_1.z.literal(enum_1.TournamentRewardType.COUPON),
|
|
14
13
|
couponNamePrefix: global_validation_1.ZodValidation.string('Coupon name prefix'),
|
|
15
|
-
percentage: global_validation_1.ZodValidation.number('Percentage'),
|
|
16
|
-
maxDiscountPerOrder: global_validation_1.ZodValidation.number('Max discount per order')
|
|
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 }),
|
|
17
16
|
});
|
|
18
17
|
const TournamentCouponRewardOutputSchema = zod_1.z.object({
|
|
19
18
|
type: zod_1.z.literal(enum_1.TournamentRewardType.COUPON),
|
|
@@ -38,14 +37,25 @@ const TournamentRewardListOutputSchema = zod_1.z.discriminatedUnion('type', [
|
|
|
38
37
|
TournamentCouponRewardListOutputSchema,
|
|
39
38
|
TournamentFreeDeliveryRewardSchema,
|
|
40
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
|
+
});
|
|
41
49
|
exports.CreateTournamentConfigSchema = zod_1.z
|
|
42
50
|
.object({
|
|
43
51
|
name: global_validation_1.ZodValidation.string('Tournament name'),
|
|
44
|
-
tag: global_validation_1.ZodValidation.
|
|
52
|
+
tag: global_validation_1.ZodValidation.string('Tournament tag'),
|
|
45
53
|
startDate: global_validation_1.ZodValidation.date('Start date'),
|
|
46
54
|
endDate: global_validation_1.ZodValidation.date('End date'),
|
|
47
55
|
status: global_validation_1.ZodValidation.enumType(enum_1.Status, 'Status').optional(),
|
|
48
56
|
reward: TournamentRewardSchema.optional(),
|
|
57
|
+
notificationTemplates: TournamentNotificationTemplateSchema.optional(),
|
|
58
|
+
scheduledNotifications: zod_1.z.array(TournamentScheduledNotificationSchema).optional(),
|
|
49
59
|
})
|
|
50
60
|
.superRefine((d, ctx) => {
|
|
51
61
|
if (d.endDate <= d.startDate) {
|
|
@@ -56,11 +66,13 @@ exports.UpdateTournamentConfigSchema = zod_1.z
|
|
|
56
66
|
.object({
|
|
57
67
|
_id: global_validation_1.ZodValidation.objectId(),
|
|
58
68
|
name: global_validation_1.ZodValidation.string('Tournament name').optional(),
|
|
59
|
-
tag: global_validation_1.ZodValidation.
|
|
69
|
+
tag: global_validation_1.ZodValidation.string('Tournament tag').optional(),
|
|
60
70
|
startDate: global_validation_1.ZodValidation.date('Start date').optional(),
|
|
61
71
|
endDate: global_validation_1.ZodValidation.date('End date').optional(),
|
|
62
72
|
status: global_validation_1.ZodValidation.enumType(enum_1.Status, 'Status').optional(),
|
|
63
73
|
reward: TournamentRewardSchema.optional(),
|
|
74
|
+
notificationTemplates: TournamentNotificationTemplateSchema.optional(),
|
|
75
|
+
scheduledNotifications: zod_1.z.array(TournamentScheduledNotificationSchema).optional(),
|
|
64
76
|
})
|
|
65
77
|
.superRefine((d, ctx) => {
|
|
66
78
|
if (d.startDate && d.endDate && d.endDate <= d.startDate) {
|
|
@@ -70,13 +82,15 @@ exports.UpdateTournamentConfigSchema = zod_1.z
|
|
|
70
82
|
exports.TournamentConfigSchema = zod_1.z.object({
|
|
71
83
|
_id: global_validation_1.ZodValidation.objectId().optional(),
|
|
72
84
|
name: global_validation_1.ZodValidation.string('Tournament name'),
|
|
73
|
-
tag: global_validation_1.ZodValidation.
|
|
85
|
+
tag: global_validation_1.ZodValidation.string('Tournament tag'),
|
|
74
86
|
startDate: zod_1.z.date().nullable().optional(),
|
|
75
87
|
endDate: zod_1.z.date().nullable().optional(),
|
|
76
88
|
status: global_validation_1.ZodValidation.enumType(enum_1.Status, 'Status'),
|
|
77
89
|
reward: TournamentRewardOutputSchema.optional(),
|
|
78
90
|
createdAt: zod_1.z.date().nullable().optional(),
|
|
79
91
|
updatedAt: zod_1.z.date().nullable().optional(),
|
|
92
|
+
notificationTemplates: TournamentNotificationTemplateSchema.optional(),
|
|
93
|
+
scheduledNotifications: zod_1.z.array(TournamentScheduledNotificationSchema).optional(),
|
|
80
94
|
});
|
|
81
95
|
exports.TournamentConfigListItemSchema = exports.TournamentConfigSchema.extend({
|
|
82
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,
|
|
1
|
+
{"version":3,"file":"config.validation.js","sourceRoot":"/","sources":["modules/tournament/config/config.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,iGAA6F;AAC7F,wEAA6E;AAC7E,4DAAiJ;AAEjJ,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,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACjF,mBAAmB,EAAE,iCAAa,CAAC,MAAM,CAAC,wBAAwB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;CACzF,CAAC,CAAC;AAEH,MAAM,kCAAkC,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,2BAAoB,CAAC,MAAM,CAAC;IAC5C,gBAAgB,EAAE,iCAAa,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;IACvE,UAAU,EAAE,iCAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;IACzD,mBAAmB,EAAE,iCAAa,CAAC,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AC,QAAQ,EAAE;IAC/C,SAAS,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,SAAS,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,qBAAqB,EAAE,oCAAoC,CAAC,QAAQ,EAAE;IACtE,sBAAsB,EAAE,OAAC,CAAC,KAAK,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 @@
|
|
|
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"]}
|
package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.d.ts
ADDED
|
@@ -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"}
|
package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.js
ADDED
|
@@ -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
|
package/dist/lib/modules/tournament/integration/providers/api-football/api-football.provider.js.map
ADDED
|
@@ -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,mCAAmC,CAAC;AACrD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAErD,MAAa,mBAAmB;IACC;IAA7B,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEvC,KAAK,CAAC,GAAG,CAAI,IAAY;QAC7B,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,IAAI,EAAE,EAAE;YAC1C,OAAO,EAAE,EAAE,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;SACrD,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,GAAG,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC;QACnF,OAAO,GAAG,CAAC,IAAI,EAAgB,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,MAA4B;QAC5C,MAAM,KAAK,GAAG,IAAI,eAAe,EAAE,CAAC;QACpC,IAAI,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;YAC9B,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACnD,CAAC;aAAM,CA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ent":["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"]}
|
package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.d.ts
ADDED
|
@@ -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
|
package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.d.ts.map
ADDED
|
@@ -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"}
|
package/dist/lib/modules/tournament/integration/providers/api-football/api-football.types.js.map
ADDED
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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":"
|
|
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"}
|