@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
|
@@ -46,7 +46,7 @@ exports.tournamentService = exports.TournamentService = void 0;
|
|
|
46
46
|
const typedi_1 = __importStar(require("typedi"));
|
|
47
47
|
const config_repository_1 = require("./config/config.repository");
|
|
48
48
|
const participant_repository_1 = require("./participant/participant.repository");
|
|
49
|
-
const
|
|
49
|
+
const tournament_builder_1 = require("./tournament.builder");
|
|
50
50
|
let TournamentService = class TournamentService {
|
|
51
51
|
repository;
|
|
52
52
|
participantRepository;
|
|
@@ -55,18 +55,11 @@ let TournamentService = class TournamentService {
|
|
|
55
55
|
this.participantRepository = typedi_1.default.get(participant_repository_1.TournamentParticipantRepository);
|
|
56
56
|
}
|
|
57
57
|
async getActive(userId) {
|
|
58
|
-
const tournament = await this.repository.
|
|
58
|
+
const tournament = await this.repository.findActiveLite();
|
|
59
59
|
if (!tournament)
|
|
60
60
|
return null;
|
|
61
61
|
const participant = await this.participantRepository.findByUserAndTournament(userId, tournament._id);
|
|
62
|
-
|
|
63
|
-
return {
|
|
64
|
-
name: tournament.name,
|
|
65
|
-
tag: tournament.tag,
|
|
66
|
-
startDate: tournament.startDate ?? null,
|
|
67
|
-
endDate: tournament.endDate ?? null,
|
|
68
|
-
userStatus: userStatus,
|
|
69
|
-
};
|
|
62
|
+
return tournament_builder_1.TournamentActiveViewBuilder.build(tournament, participant);
|
|
70
63
|
}
|
|
71
64
|
};
|
|
72
65
|
exports.TournamentService = TournamentService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.service.js","sourceRoot":"/","sources":["modules/tournament/tournament.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAG5C,kEAAwE;AACxE,iFAAuF;AACvF,
|
|
1
|
+
{"version":3,"file":"tournament.service.js","sourceRoot":"/","sources":["modules/tournament/tournament.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAG5C,kEAAwE;AACxE,iFAAuF;AACvF,6DAAmE;AAG5D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACrB,UAAU,CAA6B;IACvC,qBAAqB,CAAkC;IAE/D;QACC,IAAI,CAAC,UAAU,GAAG,gBAAS,CAAC,GAAG,CAAC,8CAA0B,CAAC,CAAC;QAC5D,IAAI,CAAC,qBAAqB,GAAG,gBAAS,CAAC,GAAG,CAAC,wDAA+B,CAAC,CAAC;IAC7E,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,MAA+B;QACrD,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;QAC1D,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAE7B,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,uBAAuB,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;QACrG,OAAO,gDAA2B,CAAC,KAAK,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IACnE,CAAC;CACD,CAAA;AAhBY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,gBAAO,GAAE;;GACG,iBAAiB,CAgB7B;AAEY,QAAA,iBAAiB,GAAG,gBAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import Container, { Service } from 'typedi';\nimport { mongoose } from '@typegoose/typegoose';\nimport { ActiveTournamentOutputDTO } from './tournament.validation';\nimport { TournamentConfigRepository } from './config/config.repository';\nimport { TournamentParticipantRepository } from './participant/participant.repository';\nimport { TournamentActiveViewBuilder } from './tournament.builder';\n\n@Service()\nexport class TournamentService {\n\tprivate repository: TournamentConfigRepository;\n\tprivate participantRepository: TournamentParticipantRepository;\n\n\tconstructor() {\n\t\tthis.repository = Container.get(TournamentConfigRepository);\n\t\tthis.participantRepository = Container.get(TournamentParticipantRepository);\n\t}\n\n\tpublic async getActive(userId: mongoose.Types.ObjectId): Promise<ActiveTournamentOutputDTO | null> {\n\t\tconst tournament = await this.repository.findActiveLite();\n\t\tif (!tournament) return null;\n\n\t\tconst participant = await this.participantRepository.findByUserAndTournament(userId, tournament._id);\n\t\treturn TournamentActiveViewBuilder.build(tournament, participant);\n\t}\n}\n\nexport const tournamentService = Container.get(TournamentService);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.types.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.types.ts"],"names":[],"mappings":"AAAA,oBAAY,
|
|
1
|
+
{"version":3,"file":"tournament.types.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.types.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;CAClB;AAED,oBAAY,2BAA2B;IACnC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,QAAQ,aAAa;CACxB"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TournamentParticipantStatus = exports.MatchStatus =
|
|
4
|
-
var TournamentTag;
|
|
5
|
-
(function (TournamentTag) {
|
|
6
|
-
TournamentTag["FOOTBALL_WORLD_CUP"] = "world-cup";
|
|
7
|
-
})(TournamentTag || (exports.TournamentTag = TournamentTag = {}));
|
|
3
|
+
exports.TournamentParticipantStatus = exports.MatchStatus = void 0;
|
|
8
4
|
var MatchStatus;
|
|
9
5
|
(function (MatchStatus) {
|
|
10
6
|
MatchStatus["UPCOMING"] = "upcoming";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.types.js","sourceRoot":"/","sources":["modules/tournament/tournament.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"tournament.types.js","sourceRoot":"/","sources":["modules/tournament/tournament.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;AACnB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAED,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACnC,gDAAiB,CAAA;IACjB,4CAAa,CAAA;IACb,oDAAqB,CAAA;AACzB,CAAC,EAJW,2BAA2B,2CAA3B,2BAA2B,QAItC","sourcesContent":["export enum MatchStatus {\n UPCOMING = 'upcoming',\n STARTED = 'started',\n ENDED = 'ended',\n}\n\nexport enum TournamentParticipantStatus {\n JOINED = 'joined',\n SEEN = 'seen',\n NOT_SEEN = 'not_seen',\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.utils.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,QAAO,IAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"tournament.utils.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,mCAAmC,CAAC;AAGzD,eAAO,MAAM,MAAM,QAAO,IAA4B,CAAC;AAEvD,eAAO,MAAM,oBAAoB,GAAI,YAAY;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,KAAG,IAEnE,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.utcNow = void 0;
|
|
3
|
+
exports.ensureCampaignActive = exports.utcNow = void 0;
|
|
4
|
+
const enum_1 = require("@lyxa.ai/core/dist/utilities/enum");
|
|
5
|
+
const error_common_1 = require("@lyxa.ai/core/dist/utilities/error-common");
|
|
4
6
|
const utcNow = () => new Date(Date.now());
|
|
5
7
|
exports.utcNow = utcNow;
|
|
8
|
+
const ensureCampaignActive = (tournament) => {
|
|
9
|
+
if (tournament.status !== enum_1.Status.ACTIVE)
|
|
10
|
+
throw (0, error_common_1.badRequestError)('Campaign is not active');
|
|
11
|
+
};
|
|
12
|
+
exports.ensureCampaignActive = ensureCampaignActive;
|
|
6
13
|
//# sourceMappingURL=tournament.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.utils.js","sourceRoot":"/","sources":["modules/tournament/tournament.utils.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"tournament.utils.js","sourceRoot":"/","sources":["modules/tournament/tournament.utils.ts"],"names":[],"mappings":";;;AAAA,4DAAyD;AACzD,4EAA0E;AAEnE,MAAM,MAAM,GAAG,GAAS,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AAA1C,QAAA,MAAM,UAAoC;AAEhD,MAAM,oBAAoB,GAAG,CAAC,UAA4B,EAAQ,EAAE;IACvE,IAAI,UAAU,CAAC,MAAM,KAAK,aAAM,CAAC,MAAM;QAAE,MAAM,IAAA,8BAAe,EAAC,wBAAwB,CAAC,CAAC;AAC7F,CAAC,CAAC;AAFW,QAAA,oBAAoB,wBAE/B","sourcesContent":["import {Status} from '@lyxa.ai/core/dist/utilities/enum';\nimport {badRequestError} from '@lyxa.ai/core/dist/utilities/error-common';\n\nexport const utcNow = (): Date => new Date(Date.now());\n\nexport const ensureCampaignActive = (tournament: {status: Status}): void => {\n if (tournament.status !== Status.ACTIVE) throw badRequestError('Campaign is not active');\n};\n"]}
|
|
@@ -1,25 +1,89 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DTO } from '@lyxa.ai/core/dist/utilities/validation/global-validation';
|
|
3
|
-
import { TournamentParticipantStatus } from '
|
|
3
|
+
import { TournamentParticipantStatus, TournamentRewardType } from '@lyxa.ai/core/dist/utilities/enum';
|
|
4
4
|
export declare const UserTournamentStatus: z.ZodNativeEnum<typeof TournamentParticipantStatus>;
|
|
5
5
|
export declare const ActiveTournamentSchema: z.ZodObject<{
|
|
6
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
6
7
|
name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
7
8
|
tag: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
8
9
|
startDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
9
10
|
endDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
10
11
|
userStatus: z.ZodNativeEnum<typeof TournamentParticipantStatus>;
|
|
12
|
+
selectedTeam: z.ZodNullable<z.ZodObject<{
|
|
13
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
14
|
+
name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
15
|
+
picture: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
name: string;
|
|
18
|
+
_id: import("mongoose").Types.ObjectId;
|
|
19
|
+
picture?: string | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
name: string;
|
|
22
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
23
|
+
picture?: string | undefined;
|
|
24
|
+
}>>;
|
|
25
|
+
reward: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<TournamentRewardType.COUPON>;
|
|
27
|
+
couponNamePrefix: z.ZodOptional<z.ZodString>;
|
|
28
|
+
percentage: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
maxDiscountPerOrder: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
type: TournamentRewardType.COUPON;
|
|
32
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
33
|
+
couponNamePrefix?: string | undefined;
|
|
34
|
+
percentage?: number | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
type: TournamentRewardType.COUPON;
|
|
37
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
38
|
+
couponNamePrefix?: string | undefined;
|
|
39
|
+
percentage?: number | undefined;
|
|
40
|
+
}>, z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<TournamentRewardType.FREE_DELIVERY>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
44
|
+
}, {
|
|
45
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
46
|
+
}>]>>;
|
|
11
47
|
}, "strip", z.ZodTypeAny, {
|
|
12
48
|
name: string;
|
|
49
|
+
_id: import("mongoose").Types.ObjectId;
|
|
13
50
|
tag: string;
|
|
51
|
+
selectedTeam: {
|
|
52
|
+
name: string;
|
|
53
|
+
_id: import("mongoose").Types.ObjectId;
|
|
54
|
+
picture?: string | undefined;
|
|
55
|
+
} | null;
|
|
14
56
|
userStatus: TournamentParticipantStatus;
|
|
15
57
|
startDate?: Date | null | undefined;
|
|
16
58
|
endDate?: Date | null | undefined;
|
|
59
|
+
reward?: {
|
|
60
|
+
type: TournamentRewardType.COUPON;
|
|
61
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
62
|
+
couponNamePrefix?: string | undefined;
|
|
63
|
+
percentage?: number | undefined;
|
|
64
|
+
} | {
|
|
65
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
66
|
+
} | undefined;
|
|
17
67
|
}, {
|
|
18
68
|
name: string;
|
|
69
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
19
70
|
tag: string;
|
|
71
|
+
selectedTeam: {
|
|
72
|
+
name: string;
|
|
73
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
74
|
+
picture?: string | undefined;
|
|
75
|
+
} | null;
|
|
20
76
|
userStatus: TournamentParticipantStatus;
|
|
21
77
|
startDate?: Date | null | undefined;
|
|
22
78
|
endDate?: Date | null | undefined;
|
|
79
|
+
reward?: {
|
|
80
|
+
type: TournamentRewardType.COUPON;
|
|
81
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
82
|
+
couponNamePrefix?: string | undefined;
|
|
83
|
+
percentage?: number | undefined;
|
|
84
|
+
} | {
|
|
85
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
86
|
+
} | undefined;
|
|
23
87
|
}>;
|
|
24
88
|
export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
25
89
|
success: z.ZodBoolean;
|
|
@@ -43,24 +107,66 @@ export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
|
43
107
|
}>>;
|
|
44
108
|
documents: z.ZodArray<z.ZodType<{
|
|
45
109
|
name: string;
|
|
110
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
46
111
|
tag: string;
|
|
112
|
+
selectedTeam: {
|
|
113
|
+
name: string;
|
|
114
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
115
|
+
picture?: string | undefined;
|
|
116
|
+
} | null;
|
|
47
117
|
userStatus: TournamentParticipantStatus;
|
|
48
118
|
startDate?: Date | null | undefined;
|
|
49
119
|
endDate?: Date | null | undefined;
|
|
120
|
+
reward?: {
|
|
121
|
+
type: TournamentRewardType.COUPON;
|
|
122
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
123
|
+
couponNamePrefix?: string | undefined;
|
|
124
|
+
percentage?: number | undefined;
|
|
125
|
+
} | {
|
|
126
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
127
|
+
} | undefined;
|
|
50
128
|
} | null, z.ZodTypeDef, {
|
|
51
129
|
name: string;
|
|
130
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
52
131
|
tag: string;
|
|
132
|
+
selectedTeam: {
|
|
133
|
+
name: string;
|
|
134
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
135
|
+
picture?: string | undefined;
|
|
136
|
+
} | null;
|
|
53
137
|
userStatus: TournamentParticipantStatus;
|
|
54
138
|
startDate?: Date | null | undefined;
|
|
55
139
|
endDate?: Date | null | undefined;
|
|
140
|
+
reward?: {
|
|
141
|
+
type: TournamentRewardType.COUPON;
|
|
142
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
143
|
+
couponNamePrefix?: string | undefined;
|
|
144
|
+
percentage?: number | undefined;
|
|
145
|
+
} | {
|
|
146
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
147
|
+
} | undefined;
|
|
56
148
|
} | null>, "many">;
|
|
57
149
|
}, "strip", z.ZodTypeAny, {
|
|
58
150
|
documents: ({
|
|
59
151
|
name: string;
|
|
152
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
60
153
|
tag: string;
|
|
154
|
+
selectedTeam: {
|
|
155
|
+
name: string;
|
|
156
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
157
|
+
picture?: string | undefined;
|
|
158
|
+
} | null;
|
|
61
159
|
userStatus: TournamentParticipantStatus;
|
|
62
160
|
startDate?: Date | null | undefined;
|
|
63
161
|
endDate?: Date | null | undefined;
|
|
162
|
+
reward?: {
|
|
163
|
+
type: TournamentRewardType.COUPON;
|
|
164
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
165
|
+
couponNamePrefix?: string | undefined;
|
|
166
|
+
percentage?: number | undefined;
|
|
167
|
+
} | {
|
|
168
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
169
|
+
} | undefined;
|
|
64
170
|
} | null)[];
|
|
65
171
|
metadata?: {
|
|
66
172
|
page: number;
|
|
@@ -71,10 +177,24 @@ export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
|
71
177
|
}, {
|
|
72
178
|
documents: ({
|
|
73
179
|
name: string;
|
|
180
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
74
181
|
tag: string;
|
|
182
|
+
selectedTeam: {
|
|
183
|
+
name: string;
|
|
184
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
185
|
+
picture?: string | undefined;
|
|
186
|
+
} | null;
|
|
75
187
|
userStatus: TournamentParticipantStatus;
|
|
76
188
|
startDate?: Date | null | undefined;
|
|
77
189
|
endDate?: Date | null | undefined;
|
|
190
|
+
reward?: {
|
|
191
|
+
type: TournamentRewardType.COUPON;
|
|
192
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
193
|
+
couponNamePrefix?: string | undefined;
|
|
194
|
+
percentage?: number | undefined;
|
|
195
|
+
} | {
|
|
196
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
197
|
+
} | undefined;
|
|
78
198
|
} | null)[];
|
|
79
199
|
metadata?: {
|
|
80
200
|
page: number;
|
|
@@ -84,33 +204,89 @@ export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
|
84
204
|
} | undefined;
|
|
85
205
|
}>, z.ZodType<{
|
|
86
206
|
name: string;
|
|
207
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
87
208
|
tag: string;
|
|
209
|
+
selectedTeam: {
|
|
210
|
+
name: string;
|
|
211
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
212
|
+
picture?: string | undefined;
|
|
213
|
+
} | null;
|
|
88
214
|
userStatus: TournamentParticipantStatus;
|
|
89
215
|
startDate?: Date | null | undefined;
|
|
90
216
|
endDate?: Date | null | undefined;
|
|
217
|
+
reward?: {
|
|
218
|
+
type: TournamentRewardType.COUPON;
|
|
219
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
220
|
+
couponNamePrefix?: string | undefined;
|
|
221
|
+
percentage?: number | undefined;
|
|
222
|
+
} | {
|
|
223
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
224
|
+
} | undefined;
|
|
91
225
|
} | null, z.ZodTypeDef, {
|
|
92
226
|
name: string;
|
|
227
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
93
228
|
tag: string;
|
|
229
|
+
selectedTeam: {
|
|
230
|
+
name: string;
|
|
231
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
232
|
+
picture?: string | undefined;
|
|
233
|
+
} | null;
|
|
94
234
|
userStatus: TournamentParticipantStatus;
|
|
95
235
|
startDate?: Date | null | undefined;
|
|
96
236
|
endDate?: Date | null | undefined;
|
|
237
|
+
reward?: {
|
|
238
|
+
type: TournamentRewardType.COUPON;
|
|
239
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
240
|
+
couponNamePrefix?: string | undefined;
|
|
241
|
+
percentage?: number | undefined;
|
|
242
|
+
} | {
|
|
243
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
244
|
+
} | undefined;
|
|
97
245
|
} | null>]>>;
|
|
98
246
|
}, "strip", z.ZodTypeAny, {
|
|
99
247
|
message: string;
|
|
100
248
|
success: boolean;
|
|
101
249
|
data?: {
|
|
102
250
|
name: string;
|
|
251
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
103
252
|
tag: string;
|
|
253
|
+
selectedTeam: {
|
|
254
|
+
name: string;
|
|
255
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
256
|
+
picture?: string | undefined;
|
|
257
|
+
} | null;
|
|
104
258
|
userStatus: TournamentParticipantStatus;
|
|
105
259
|
startDate?: Date | null | undefined;
|
|
106
260
|
endDate?: Date | null | undefined;
|
|
261
|
+
reward?: {
|
|
262
|
+
type: TournamentRewardType.COUPON;
|
|
263
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
264
|
+
couponNamePrefix?: string | undefined;
|
|
265
|
+
percentage?: number | undefined;
|
|
266
|
+
} | {
|
|
267
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
268
|
+
} | undefined;
|
|
107
269
|
} | {
|
|
108
270
|
documents: ({
|
|
109
271
|
name: string;
|
|
272
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
110
273
|
tag: string;
|
|
274
|
+
selectedTeam: {
|
|
275
|
+
name: string;
|
|
276
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
277
|
+
picture?: string | undefined;
|
|
278
|
+
} | null;
|
|
111
279
|
userStatus: TournamentParticipantStatus;
|
|
112
280
|
startDate?: Date | null | undefined;
|
|
113
281
|
endDate?: Date | null | undefined;
|
|
282
|
+
reward?: {
|
|
283
|
+
type: TournamentRewardType.COUPON;
|
|
284
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
285
|
+
couponNamePrefix?: string | undefined;
|
|
286
|
+
percentage?: number | undefined;
|
|
287
|
+
} | {
|
|
288
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
289
|
+
} | undefined;
|
|
114
290
|
} | null)[];
|
|
115
291
|
metadata?: {
|
|
116
292
|
page: number;
|
|
@@ -124,17 +300,45 @@ export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
|
124
300
|
success: boolean;
|
|
125
301
|
data?: {
|
|
126
302
|
name: string;
|
|
303
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
127
304
|
tag: string;
|
|
305
|
+
selectedTeam: {
|
|
306
|
+
name: string;
|
|
307
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
308
|
+
picture?: string | undefined;
|
|
309
|
+
} | null;
|
|
128
310
|
userStatus: TournamentParticipantStatus;
|
|
129
311
|
startDate?: Date | null | undefined;
|
|
130
312
|
endDate?: Date | null | undefined;
|
|
313
|
+
reward?: {
|
|
314
|
+
type: TournamentRewardType.COUPON;
|
|
315
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
316
|
+
couponNamePrefix?: string | undefined;
|
|
317
|
+
percentage?: number | undefined;
|
|
318
|
+
} | {
|
|
319
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
320
|
+
} | undefined;
|
|
131
321
|
} | {
|
|
132
322
|
documents: ({
|
|
133
323
|
name: string;
|
|
324
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
134
325
|
tag: string;
|
|
326
|
+
selectedTeam: {
|
|
327
|
+
name: string;
|
|
328
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
329
|
+
picture?: string | undefined;
|
|
330
|
+
} | null;
|
|
135
331
|
userStatus: TournamentParticipantStatus;
|
|
136
332
|
startDate?: Date | null | undefined;
|
|
137
333
|
endDate?: Date | null | undefined;
|
|
334
|
+
reward?: {
|
|
335
|
+
type: TournamentRewardType.COUPON;
|
|
336
|
+
maxDiscountPerOrder?: number | null | undefined;
|
|
337
|
+
couponNamePrefix?: string | undefined;
|
|
338
|
+
percentage?: number | undefined;
|
|
339
|
+
} | {
|
|
340
|
+
type: TournamentRewardType.FREE_DELIVERY;
|
|
341
|
+
} | undefined;
|
|
138
342
|
} | null)[];
|
|
139
343
|
metadata?: {
|
|
140
344
|
page: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.validation.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.validation.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"tournament.validation.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,GAAG,EAAgB,MAAM,2DAA2D,CAAC;AAE7F,OAAO,EAAC,2BAA2B,EAAE,oBAAoB,EAAC,MAAM,mCAAmC,CAAC;AAEpG,eAAO,MAAM,oBAAoB,qDAA4C,CAAC;AAwB9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASjC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0D,CAAC;AAEtG,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -4,14 +4,35 @@ exports.ActiveTournamentResponseSchema = exports.ActiveTournamentSchema = export
|
|
|
4
4
|
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
|
-
const
|
|
8
|
-
exports.UserTournamentStatus = zod_1.z.nativeEnum(
|
|
7
|
+
const enum_1 = require("@lyxa.ai/core/dist/utilities/enum");
|
|
8
|
+
exports.UserTournamentStatus = zod_1.z.nativeEnum(enum_1.TournamentParticipantStatus);
|
|
9
|
+
const SelectedTeamSchema = zod_1.z.object({
|
|
10
|
+
_id: global_validation_1.ZodValidation.objectId(),
|
|
11
|
+
name: global_validation_1.ZodValidation.string('Team name'),
|
|
12
|
+
picture: global_validation_1.ZodValidation.string('Team picture').optional(),
|
|
13
|
+
});
|
|
14
|
+
const ActiveCouponRewardSchema = zod_1.z.object({
|
|
15
|
+
type: zod_1.z.literal(enum_1.TournamentRewardType.COUPON),
|
|
16
|
+
couponNamePrefix: zod_1.z.string().optional(),
|
|
17
|
+
percentage: zod_1.z.number().optional(),
|
|
18
|
+
maxDiscountPerOrder: zod_1.z.number().nullable().optional(),
|
|
19
|
+
});
|
|
20
|
+
const ActiveFreeDeliveryRewardSchema = zod_1.z.object({
|
|
21
|
+
type: zod_1.z.literal(enum_1.TournamentRewardType.FREE_DELIVERY),
|
|
22
|
+
});
|
|
23
|
+
const ActiveRewardSchema = zod_1.z.discriminatedUnion('type', [
|
|
24
|
+
ActiveCouponRewardSchema,
|
|
25
|
+
ActiveFreeDeliveryRewardSchema,
|
|
26
|
+
]);
|
|
9
27
|
exports.ActiveTournamentSchema = zod_1.z.object({
|
|
28
|
+
_id: global_validation_1.ZodValidation.objectId(),
|
|
10
29
|
name: global_validation_1.ZodValidation.string('Tournament name'),
|
|
11
30
|
tag: global_validation_1.ZodValidation.string('Tournament tag'),
|
|
12
31
|
startDate: zod_1.z.date().nullable().optional(),
|
|
13
32
|
endDate: zod_1.z.date().nullable().optional(),
|
|
14
33
|
userStatus: exports.UserTournamentStatus,
|
|
34
|
+
selectedTeam: SelectedTeamSchema.nullable(),
|
|
35
|
+
reward: ActiveRewardSchema.optional(),
|
|
15
36
|
});
|
|
16
37
|
exports.ActiveTournamentResponseSchema = (0, validation_1.createResponseSchema)(exports.ActiveTournamentSchema.nullable());
|
|
17
38
|
//# sourceMappingURL=tournament.validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.validation.js","sourceRoot":"/","sources":["modules/tournament/tournament.validation.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"tournament.validation.js","sourceRoot":"/","sources":["modules/tournament/tournament.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,iGAA6F;AAC7F,wEAA6E;AAC7E,4DAAoG;AAEvF,QAAA,oBAAoB,GAAG,OAAC,CAAC,UAAU,CAAC,kCAA2B,CAAC,CAAC;AAE9E,MAAM,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,GAAG,EAAE,iCAAa,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,iCAAa,CAAC,MAAM,CAAC,WAAW,CAAC;IACvC,OAAO,EAAE,iCAAa,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;CACxD,CAAC,CAAC;AAEH,MAAM,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,2BAAoB,CAAC,MAAM,CAAC;IAC5C,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC;AAEH,MAAM,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,2BAAoB,CAAC,aAAa,CAAC;CACnD,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACvD,wBAAwB;IACxB,8BAA8B;CAC9B,CAAC,CAAC;AAEU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,GAAG,EAAE,iCAAa,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,iCAAa,CAAC,MAAM,CAAC,iBAAiB,CAAC;IAC7C,GAAG,EAAE,iCAAa,CAAC,MAAM,CAAC,gBAAgB,CAAC;IAC3C,SAAS,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,OAAO,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACvC,UAAU,EAAE,4BAAoB;IAChC,YAAY,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IAC3C,MAAM,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,IAAA,iCAAoB,EAAC,8BAAsB,CAAC,QAAQ,EAAE,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 {TournamentParticipantStatus, TournamentRewardType} from '@lyxa.ai/core/dist/utilities/enum';\n\nexport const UserTournamentStatus = z.nativeEnum(TournamentParticipantStatus);\n\nconst SelectedTeamSchema = z.object({\n\t_id: ZodValidation.objectId(),\n\tname: ZodValidation.string('Team name'),\n\tpicture: ZodValidation.string('Team picture').optional(),\n});\n\nconst ActiveCouponRewardSchema = z.object({\n\ttype: z.literal(TournamentRewardType.COUPON),\n\tcouponNamePrefix: z.string().optional(),\n\tpercentage: z.number().optional(),\n\tmaxDiscountPerOrder: z.number().nullable().optional(),\n});\n\nconst ActiveFreeDeliveryRewardSchema = z.object({\n\ttype: z.literal(TournamentRewardType.FREE_DELIVERY),\n});\n\nconst ActiveRewardSchema = z.discriminatedUnion('type', [\n\tActiveCouponRewardSchema,\n\tActiveFreeDeliveryRewardSchema,\n]);\n\nexport const ActiveTournamentSchema = z.object({\n\t_id: ZodValidation.objectId(),\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\tuserStatus: UserTournamentStatus,\n\tselectedTeam: SelectedTeamSchema.nullable(),\n\treward: ActiveRewardSchema.optional(),\n});\n\nexport const ActiveTournamentResponseSchema = createResponseSchema(ActiveTournamentSchema.nullable());\n\nexport type ActiveTournamentOutputDTO = DTO<typeof ActiveTournamentSchema>;\n"]}
|