@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":"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 +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,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/marketing",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.53",
|
|
4
4
|
"description": "The Lyxa Marketing microservice",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/lib/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"test:watch": "jest --watch"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@lyxa.ai/core": "1.4.
|
|
22
|
+
"@lyxa.ai/core": "1.4.153",
|
|
23
23
|
"@lyxa.ai/notification": "^1.0.7",
|
|
24
24
|
"@trpc/client": "^11.4.3",
|
|
25
25
|
"@trpc/server": "^11.4.3",
|
|
@@ -46,4 +46,4 @@
|
|
|
46
46
|
"tsc-alias": "^1.8.13",
|
|
47
47
|
"tsconfig-paths": "^4.2.0"
|
|
48
48
|
}
|
|
49
|
-
}
|
|
49
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"match-ended.consumer.d.ts","sourceRoot":"/","sources":["modules/tournament/match/events/match-ended.consumer.ts"],"names":[],"mappings":"AAKA,wBAAsB,4BAA4B,kBAMjD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startTournamentEventConsumer = startTournamentEventConsumer;
|
|
4
|
-
const typegoose_1 = require("@typegoose/typegoose");
|
|
5
|
-
const match_ended_event_1 = require("./match-ended.event");
|
|
6
|
-
const match_service_1 = require("../match.service");
|
|
7
|
-
const event_1 = require("@lyxa.ai/core/dist/libraries/event");
|
|
8
|
-
async function startTournamentEventConsumer() {
|
|
9
|
-
await (0, event_1.subscribeToEvent)(match_ended_event_1.TOURNAMENT_MATCH_ENDED_EVENT, async (payload) => {
|
|
10
|
-
const tournamentId = new typegoose_1.mongoose.Types.ObjectId(payload.tournamentId);
|
|
11
|
-
const matchId = new typegoose_1.mongoose.Types.ObjectId(payload.matchId);
|
|
12
|
-
await match_service_1.matchService.handleMatchEnded(tournamentId, matchId, payload.finalScore);
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=match-ended.consumer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"match-ended.consumer.js","sourceRoot":"/","sources":["modules/tournament/match/events/match-ended.consumer.ts"],"names":[],"mappings":";;AAKA,oEAMC;AAXD,oDAA8C;AAC9C,2DAAoF;AACpF,oDAA8C;AAC9C,8DAAoE;AAE7D,KAAK,UAAU,4BAA4B;IAC9C,MAAM,IAAA,wBAAgB,EAAC,gDAA4B,EAAE,KAAK,EAAE,OAA0B,EAAE,EAAE;QACtF,MAAM,YAAY,GAAG,IAAI,oBAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACvE,MAAM,OAAO,GAAG,IAAI,oBAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7D,MAAM,4BAAY,CAAC,gBAAgB,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACnF,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import {mongoose} from '@typegoose/typegoose';\nimport {MatchEndedPayload, TOURNAMENT_MATCH_ENDED_EVENT} from './match-ended.event';\nimport {matchService} from '../match.service';\nimport {subscribeToEvent} from '@lyxa.ai/core/dist/libraries/event';\n\nexport async function startTournamentEventConsumer() {\n await subscribeToEvent(TOURNAMENT_MATCH_ENDED_EVENT, async (payload: MatchEndedPayload) => {\n const tournamentId = new mongoose.Types.ObjectId(payload.tournamentId);\n const matchId = new mongoose.Types.ObjectId(payload.matchId);\n await matchService.handleMatchEnded(tournamentId, matchId, payload.finalScore);\n });\n}\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseEvent } from '@lyxa.ai/core/dist/libraries/event/BaseEvent';
|
|
2
|
-
export declare const TOURNAMENT_MATCH_ENDED_EVENT = "tournament_match_ended_event";
|
|
3
|
-
export interface MatchEndedPayload {
|
|
4
|
-
tournamentId: string;
|
|
5
|
-
matchId: string;
|
|
6
|
-
finalScore: {
|
|
7
|
-
team1: number;
|
|
8
|
-
team2: number;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export declare class MatchEndedEvent extends BaseEvent<MatchEndedPayload> {
|
|
12
|
-
constructor(payload: MatchEndedPayload);
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=match-ended.event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"match-ended.event.d.ts","sourceRoot":"/","sources":["modules/tournament/match/events/match-ended.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAC;AAEzE,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAE3E,MAAM,WAAW,iBAAiB;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAChD;AAED,qBAAa,eAAgB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;gBACjD,OAAO,EAAE,iBAAiB;CAGzC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MatchEndedEvent = exports.TOURNAMENT_MATCH_ENDED_EVENT = void 0;
|
|
4
|
-
const BaseEvent_1 = require("@lyxa.ai/core/dist/libraries/event/BaseEvent");
|
|
5
|
-
exports.TOURNAMENT_MATCH_ENDED_EVENT = 'tournament_match_ended_event';
|
|
6
|
-
class MatchEndedEvent extends BaseEvent_1.BaseEvent {
|
|
7
|
-
constructor(payload) {
|
|
8
|
-
super(exports.TOURNAMENT_MATCH_ENDED_EVENT, payload);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.MatchEndedEvent = MatchEndedEvent;
|
|
12
|
-
//# sourceMappingURL=match-ended.event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"match-ended.event.js","sourceRoot":"/","sources":["modules/tournament/match/events/match-ended.event.ts"],"names":[],"mappings":";;;AAAA,4EAAyE;AAE5D,QAAA,4BAA4B,GAAG,8BAA8B,CAAC;AAQ3E,MAAa,eAAgB,SAAQ,qBAA4B;IAC7D,YAAY,OAA0B;QAClC,KAAK,CAAC,oCAA4B,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;CACJ;AAJD,0CAIC","sourcesContent":["import { BaseEvent } from '@lyxa.ai/core/dist/libraries/event/BaseEvent';\n\nexport const TOURNAMENT_MATCH_ENDED_EVENT = 'tournament_match_ended_event';\n\nexport interface MatchEndedPayload {\n tournamentId: string;\n matchId: string;\n finalScore: { team1: number; team2: number };\n}\n\nexport class MatchEndedEvent extends BaseEvent<MatchEndedPayload> {\n constructor(payload: MatchEndedPayload) {\n super(TOURNAMENT_MATCH_ENDED_EVENT, payload);\n }\n}\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { JobsOptions } from 'bullmq';
|
|
2
|
-
export declare const TOURNAMENT_NOTIFICATION_QUEUE = "tournament-match-notifications";
|
|
3
|
-
export interface TournamentNotificationJobData {
|
|
4
|
-
tournamentId: string;
|
|
5
|
-
matchId: string;
|
|
6
|
-
target: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function addNotificationJob(name: string, data: TournamentNotificationJobData, options: JobsOptions): Promise<void>;
|
|
9
|
-
export declare function removeNotificationJob(jobId: string): Promise<void>;
|
|
10
|
-
//# sourceMappingURL=notification.producer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.producer.d.ts","sourceRoot":"/","sources":["modules/tournament/notification/jobs/notification.producer.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE5C,eAAO,MAAM,6BAA6B,mCAAmC,CAAC;AAE9E,MAAM,WAAW,6BAA6B;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAClB;AAYD,wBAAsB,kBAAkB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,6BAA6B,EACnC,OAAO,EAAE,WAAW,GACrB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGxE"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TOURNAMENT_NOTIFICATION_QUEUE = void 0;
|
|
4
|
-
exports.addNotificationJob = addNotificationJob;
|
|
5
|
-
exports.removeNotificationJob = removeNotificationJob;
|
|
6
|
-
const core_1 = require("@lyxa.ai/core");
|
|
7
|
-
exports.TOURNAMENT_NOTIFICATION_QUEUE = 'tournament-match-notifications';
|
|
8
|
-
let _queue = null;
|
|
9
|
-
function getQueue() {
|
|
10
|
-
if (!_queue) {
|
|
11
|
-
_queue = (0, core_1.getLibraries)().getBullMQService().createQueue(exports.TOURNAMENT_NOTIFICATION_QUEUE);
|
|
12
|
-
}
|
|
13
|
-
return _queue;
|
|
14
|
-
}
|
|
15
|
-
async function addNotificationJob(name, data, options) {
|
|
16
|
-
await getQueue().add(name, data, options);
|
|
17
|
-
}
|
|
18
|
-
async function removeNotificationJob(jobId) {
|
|
19
|
-
const job = await getQueue().getJob(jobId);
|
|
20
|
-
if (job)
|
|
21
|
-
await job.remove();
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=notification.producer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.producer.js","sourceRoot":"/","sources":["modules/tournament/notification/jobs/notification.producer.ts"],"names":[],"mappings":";;;AAqBA,gDAMC;AAED,sDAGC;AAhCD,wCAA6C;AAGhC,QAAA,6BAA6B,GAAG,gCAAgC,CAAC;AAQ9E,IAAI,MAAM,GAAiB,IAAI,CAAC;AAEhC,SAAS,QAAQ;IACb,IAAI,CAAC,MAAM,EAAE,CAAC;QAEV,MAAM,GAAG,IAAA,mBAAY,GAAE,CAAC,gBAAgB,EAAE,CAAC,WAAW,CAAC,qCAA6B,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,MAAO,CAAC;AACnB,CAAC;AAEM,KAAK,UAAU,kBAAkB,CACpC,IAAY,EACZ,IAAmC,EACnC,OAAoB;IAEpB,MAAM,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAEM,KAAK,UAAU,qBAAqB,CAAC,KAAa;IACrD,MAAM,GAAG,GAAG,MAAM,QAAQ,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,GAAG;QAAE,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;AAChC,CAAC","sourcesContent":["import { getLibraries } from '@lyxa.ai/core';\nimport { Queue, JobsOptions } from 'bullmq';\n\nexport const TOURNAMENT_NOTIFICATION_QUEUE = 'tournament-match-notifications';\n\nexport interface TournamentNotificationJobData {\n tournamentId: string;\n matchId: string;\n target: string;\n}\n\nlet _queue: Queue | null = null;\n\nfunction getQueue(): Queue {\n if (!_queue) {\n // @ts-ignore\n _queue = getLibraries().getBullMQService().createQueue(TOURNAMENT_NOTIFICATION_QUEUE);\n }\n return _queue!;\n}\n\nexport async function addNotificationJob(\n name: string,\n data: TournamentNotificationJobData,\n options: JobsOptions\n): Promise<void> {\n await getQueue().add(name, data, options);\n}\n\nexport async function removeNotificationJob(jobId: string): Promise<void> {\n const job = await getQueue().getJob(jobId);\n if (job) await job.remove();\n}\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare class TournamentNotificationWorker {
|
|
2
|
-
private notificationService;
|
|
3
|
-
private templateRepository;
|
|
4
|
-
private matchRepository;
|
|
5
|
-
constructor();
|
|
6
|
-
startWorker(): void;
|
|
7
|
-
}
|
|
8
|
-
export declare const tournamentNotificationWorker: TournamentNotificationWorker;
|
|
9
|
-
//# sourceMappingURL=notification.worker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.worker.d.ts","sourceRoot":"/","sources":["modules/tournament/notification/jobs/notification.worker.ts"],"names":[],"mappings":"AAQA,qBACa,4BAA4B;IACrC,OAAO,CAAC,mBAAmB,CAAgC;IAC3D,OAAO,CAAC,kBAAkB,CAAiC;IAC3D,OAAO,CAAC,eAAe,CAA4B;;IAQ5C,WAAW,IAAI,IAAI;CAe7B;AAED,eAAO,MAAM,4BAA4B,8BAA8C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.worker.js","sourceRoot":"/","sources":["modules/tournament/notification/jobs/notification.worker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0C;AAC1C,oDAA8C;AAC9C,wCAA2C;AAC3C,mEAAqG;AACrG,kEAAsE;AACtE,0FAAmF;AACnF,mEAAuE;AAGhE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAC7B,mBAAmB,CAAgC;IACnD,kBAAkB,CAAiC;IACnD,eAAe,CAA4B;IAEnD;QACI,IAAI,CAAC,mBAAmB,GAAG,gBAAS,CAAC,GAAG,CAAC,oDAA6B,CAAC,CAAC;QACxE,IAAI,CAAC,kBAAkB,GAAG,gBAAS,CAAC,GAAG,CAAC,iEAA8B,CAAC,CAAC;QACxE,IAAI,CAAC,eAAe,GAAG,gBAAS,CAAC,GAAG,CAAC,4CAAyB,CAAC,CAAC;IACpE,CAAC;IAEM,WAAW;QACd,IAAA,mBAAY,GAAE,CAAC,gBAAgB,EAAE,CAAC,YAAY,CAAC,qDAA6B,EAAE,KAAK,EAAC,GAAG,EAAC,EAAE;YACtF,MAAM,EAAC,YAAY,EAAE,OAAO,EAAE,MAAM,EAAC,GAAG,GAAG,CAAC,IAAqC,CAAC;YAClF,MAAM,eAAe,GAAG,IAAI,oBAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;YAClE,MAAM,UAAU,GAAG,IAAI,oBAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAExD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,eAAe,EAAE,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;YAC1G,IAAI,WAAW;gBAAE,OAAO;YAExB,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;YAC/E,MAAM,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;YAE9G,MAAM,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,eAAe,EAAE,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1F,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA1BY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,gBAAO,GAAE;;GACG,4BAA4B,CA0BxC;AAEY,QAAA,4BAA4B,GAAG,gBAAS,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC","sourcesContent":["import Container, {Service} from 'typedi';\nimport {mongoose} from '@typegoose/typegoose';\nimport {getLibraries} from '@lyxa.ai/core';\nimport {TOURNAMENT_NOTIFICATION_QUEUE, TournamentNotificationJobData} from './notification.producer';\nimport {TournamentNotificationService} from '../notification.service';\nimport {NotificationTemplateRepository} from '../notification-template.repository';\nimport {TournamentMatchRepository} from '../../match/match.repository';\n\n@Service()\nexport class TournamentNotificationWorker {\n private notificationService: TournamentNotificationService;\n private templateRepository: NotificationTemplateRepository;\n private matchRepository: TournamentMatchRepository;\n\n constructor() {\n this.notificationService = Container.get(TournamentNotificationService);\n this.templateRepository = Container.get(NotificationTemplateRepository);\n this.matchRepository = Container.get(TournamentMatchRepository);\n }\n\n public startWorker(): void {\n getLibraries().getBullMQService().createWorker(TOURNAMENT_NOTIFICATION_QUEUE, async job => {\n const {tournamentId, matchId, target} = job.data as TournamentNotificationJobData;\n const tournamentObjId = new mongoose.Types.ObjectId(tournamentId);\n const matchObjId = new mongoose.Types.ObjectId(matchId);\n\n const alreadySent = await this.matchRepository.getNotificationFlag(tournamentObjId, matchObjId, job.name);\n if (alreadySent) return;\n\n const templates = await this.templateRepository.findTemplates(tournamentObjId);\n await this.notificationService.dispatchScheduledJob(job.name, target, templates, tournamentObjId, matchObjId);\n\n await this.matchRepository.setNotificationFlag(tournamentObjId, matchObjId, job.name);\n });\n }\n}\n\nexport const tournamentNotificationWorker = Container.get(TournamentNotificationWorker);\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum NotificationTag {
|
|
2
|
-
TOURNAMENT_ACTIVATION = "tournament-activation",
|
|
3
|
-
MATCH_RESULT_WINNER = "match-result-winner",
|
|
4
|
-
MATCH_RESULT_LOSER = "match-result-loser"
|
|
5
|
-
}
|
|
6
|
-
export declare enum ScheduledTarget {
|
|
7
|
-
GLOBAL = "global",
|
|
8
|
-
UNPREDICTED_PARTICIPANTS = "unpredicted-participants"
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=notification.schedule.config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.schedule.config.d.ts","sourceRoot":"/","sources":["modules/tournament/notification/notification.schedule.config.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACvB,qBAAqB,0BAA0B;IAC/C,mBAAmB,wBAAwB;IAC3C,kBAAkB,uBAAuB;CAC5C;AAED,oBAAY,eAAe;IACvB,MAAM,WAAW;IACjB,wBAAwB,6BAA6B;CACxD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ScheduledTarget = exports.NotificationTag = void 0;
|
|
4
|
-
var NotificationTag;
|
|
5
|
-
(function (NotificationTag) {
|
|
6
|
-
NotificationTag["TOURNAMENT_ACTIVATION"] = "tournament-activation";
|
|
7
|
-
NotificationTag["MATCH_RESULT_WINNER"] = "match-result-winner";
|
|
8
|
-
NotificationTag["MATCH_RESULT_LOSER"] = "match-result-loser";
|
|
9
|
-
})(NotificationTag || (exports.NotificationTag = NotificationTag = {}));
|
|
10
|
-
var ScheduledTarget;
|
|
11
|
-
(function (ScheduledTarget) {
|
|
12
|
-
ScheduledTarget["GLOBAL"] = "global";
|
|
13
|
-
ScheduledTarget["UNPREDICTED_PARTICIPANTS"] = "unpredicted-participants";
|
|
14
|
-
})(ScheduledTarget || (exports.ScheduledTarget = ScheduledTarget = {}));
|
|
15
|
-
//# sourceMappingURL=notification.schedule.config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.schedule.config.js","sourceRoot":"/","sources":["modules/tournament/notification/notification.schedule.config.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,kEAA+C,CAAA;IAC/C,8DAA2C,CAAA;IAC3C,4DAAyC,CAAA;AAC7C,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,oCAAiB,CAAA;IACjB,wEAAqD,CAAA;AACzD,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B","sourcesContent":["export enum NotificationTag {\n TOURNAMENT_ACTIVATION = 'tournament-activation',\n MATCH_RESULT_WINNER = 'match-result-winner',\n MATCH_RESULT_LOSER = 'match-result-loser',\n}\n\nexport enum ScheduledTarget {\n GLOBAL = 'global',\n UNPREDICTED_PARTICIPANTS = 'unpredicted-participants',\n}\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { mongoose } from '@typegoose/typegoose';
|
|
2
|
-
import { ScheduledNotificationConfig } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
3
|
-
export declare class NotificationSchedulerService {
|
|
4
|
-
private jobId;
|
|
5
|
-
private buildJobData;
|
|
6
|
-
scheduleForMatch(matchId: mongoose.Types.ObjectId, tournamentId: mongoose.Types.ObjectId, startingDate: Date, scheduledNotifications: ScheduledNotificationConfig[]): Promise<void>;
|
|
7
|
-
cancelForMatch(matchId: mongoose.Types.ObjectId, scheduledNotifications: ScheduledNotificationConfig[]): Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
export declare const notificationSchedulerService: NotificationSchedulerService;
|
|
10
|
-
//# sourceMappingURL=notification.scheduler.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.scheduler.service.d.ts","sourceRoot":"/","sources":["modules/tournament/notification/notification.scheduler.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAGxF,qBACa,4BAA4B;IACrC,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,YAAY;IAIP,gBAAgB,CACzB,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAChC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACrC,YAAY,EAAE,IAAI,EAClB,sBAAsB,EAAE,2BAA2B,EAAE,GACtD,OAAO,CAAC,IAAI,CAAC;IAcH,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtI;AAED,eAAO,MAAM,4BAA4B,8BAA8C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.scheduler.service.js","sourceRoot":"/","sources":["modules/tournament/notification/notification.scheduler.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAG5C,wEAAwH;AAGjH,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAC7B,KAAK,CAAC,IAAY,EAAE,OAAgC;QACxD,OAAO,cAAc,IAAI,IAAI,OAAO,EAAE,CAAC;IAC3C,CAAC;IAEO,YAAY,CAAC,YAAqC,EAAE,OAAgC,EAAE,MAAc;QACxG,OAAO,EAAE,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC;IAC1F,CAAC;IAEM,KAAK,CAAC,gBAAgB,CACzB,OAAgC,EAChC,YAAqC,EACrC,YAAkB,EAClB,sBAAqD;QAErD,MAAM,OAAO,CAAC,GAAG,CACb,sBAAsB,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE;YAC1D,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,EAAE,GAAG,YAAY,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAC7E,IAAI,KAAK,IAAI,CAAC;gBAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;YACzC,OAAO,IAAA,0CAAkB,EAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;gBAC9E,KAAK;gBACL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC;gBAChC,gBAAgB,EAAE,IAAI;aACzB,CAAC,CAAC;QACP,CAAC,CAAC,CACL,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,OAAgC,EAAE,sBAAqD;QAC/G,MAAM,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAA,6CAAqB,EAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAClH,CAAC;CACJ,CAAA;AA/BY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,gBAAO,GAAE;GACG,4BAA4B,CA+BxC;AAEY,QAAA,4BAA4B,GAAG,gBAAS,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC","sourcesContent":["import Container, { Service } from 'typedi';\nimport { mongoose } from '@typegoose/typegoose';\nimport { ScheduledNotificationConfig } from '@lyxa.ai/core/dist/libraries/mongo/models';\nimport { addNotificationJob, removeNotificationJob, TournamentNotificationJobData } from './jobs/notification.producer';\n\n@Service()\nexport class NotificationSchedulerService {\n private jobId(type: string, matchId: mongoose.Types.ObjectId): string {\n return `tournament-${type}-${matchId}`;\n }\n\n private buildJobData(tournamentId: mongoose.Types.ObjectId, matchId: mongoose.Types.ObjectId, target: string): TournamentNotificationJobData {\n return { tournamentId: tournamentId.toString(), matchId: matchId.toString(), target };\n }\n\n public async scheduleForMatch(\n matchId: mongoose.Types.ObjectId,\n tournamentId: mongoose.Types.ObjectId,\n startingDate: Date,\n scheduledNotifications: ScheduledNotificationConfig[]\n ): Promise<void> {\n await Promise.all(\n scheduledNotifications.map(({ type, durationMins, target }) => {\n const delay = startingDate.getTime() - durationMins * 60 * 1000 - Date.now();\n if (delay <= 0) return Promise.resolve();\n return addNotificationJob(type, this.buildJobData(tournamentId, matchId, target), {\n delay,\n jobId: this.jobId(type, matchId),\n removeOnComplete: true,\n });\n })\n );\n }\n\n public async cancelForMatch(matchId: mongoose.Types.ObjectId, scheduledNotifications: ScheduledNotificationConfig[]): Promise<void> {\n await Promise.all(scheduledNotifications.map(({ type }) => removeNotificationJob(this.jobId(type, matchId))));\n }\n}\n\nexport const notificationSchedulerService = Container.get(NotificationSchedulerService);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-initializations.d.ts","sourceRoot":"/","sources":["events/event-initializations.ts"],"names":[],"mappings":"AACA,wBAAsB,eAAe,kBAAK"}
|