@lyxa.ai/marketing 1.0.49 → 1.0.51
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 +265 -21
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/modules/tournament/config/config.repository.d.ts +3 -0
- package/dist/lib/modules/tournament/config/config.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/config/config.repository.js +3 -0
- package/dist/lib/modules/tournament/config/config.repository.js.map +1 -1
- package/dist/lib/modules/tournament/config/config.router.d.ts +10 -10
- package/dist/lib/modules/tournament/config/config.validation.d.ts +37 -36
- package/dist/lib/modules/tournament/config/config.validation.d.ts.map +1 -1
- package/dist/lib/modules/tournament/config/config.validation.js +4 -3
- package/dist/lib/modules/tournament/config/config.validation.js.map +1 -1
- 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 +9 -1
- package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js.map +1 -1
- package/dist/lib/modules/tournament/match/match.builder.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/match.builder.js +2 -1
- package/dist/lib/modules/tournament/match/match.builder.js.map +1 -1
- package/dist/lib/modules/tournament/match/match.repository.d.ts +2 -0
- package/dist/lib/modules/tournament/match/match.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/match.repository.js +10 -0
- package/dist/lib/modules/tournament/match/match.repository.js.map +1 -1
- package/dist/lib/modules/tournament/match/match.router.d.ts +16 -4
- package/dist/lib/modules/tournament/match/match.router.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/match.service.d.ts +0 -1
- package/dist/lib/modules/tournament/match/match.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/match.service.js +3 -9
- package/dist/lib/modules/tournament/match/match.service.js.map +1 -1
- package/dist/lib/modules/tournament/match/match.validation.d.ts +50 -0
- package/dist/lib/modules/tournament/match/match.validation.d.ts.map +1 -1
- package/dist/lib/modules/tournament/match/match.validation.js +1 -0
- package/dist/lib/modules/tournament/match/match.validation.js.map +1 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts +2 -5
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts.map +1 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.js +1 -6
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.js.map +1 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts +2 -0
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts.map +1 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.js +15 -9
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.js.map +1 -1
- package/dist/lib/modules/tournament/notification/notification-template.repository.d.ts +8 -0
- package/dist/lib/modules/tournament/notification/notification-template.repository.d.ts.map +1 -0
- package/dist/lib/modules/tournament/notification/notification-template.repository.js +60 -0
- package/dist/lib/modules/tournament/notification/notification-template.repository.js.map +1 -0
- package/dist/lib/modules/tournament/notification/notification.config.d.ts +10 -0
- package/dist/lib/modules/tournament/notification/notification.config.d.ts.map +1 -0
- package/dist/lib/modules/tournament/notification/notification.config.js +15 -0
- package/dist/lib/modules/tournament/notification/notification.config.js.map +1 -0
- package/dist/lib/modules/tournament/notification/notification.schedule.config.d.ts +10 -0
- package/dist/lib/modules/tournament/notification/notification.schedule.config.d.ts.map +1 -0
- package/dist/lib/modules/tournament/notification/notification.schedule.config.js +15 -0
- package/dist/lib/modules/tournament/notification/notification.schedule.config.js.map +1 -0
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts +4 -4
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.js +15 -28
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.js.map +1 -1
- package/dist/lib/modules/tournament/notification/notification.service.d.ts +5 -4
- package/dist/lib/modules/tournament/notification/notification.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/notification/notification.service.js +33 -28
- package/dist/lib/modules/tournament/notification/notification.service.js.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.repository.d.ts +3 -0
- package/dist/lib/modules/tournament/participant/participant.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.repository.js +14 -0
- package/dist/lib/modules/tournament/participant/participant.repository.js.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.router.d.ts +27 -4
- package/dist/lib/modules/tournament/participant/participant.router.d.ts.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.router.js +7 -0
- package/dist/lib/modules/tournament/participant/participant.router.js.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.service.d.ts +2 -2
- package/dist/lib/modules/tournament/participant/participant.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.service.js +20 -6
- package/dist/lib/modules/tournament/participant/participant.service.js.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.validation.d.ts +144 -36
- package/dist/lib/modules/tournament/participant/participant.validation.d.ts.map +1 -1
- package/dist/lib/modules/tournament/participant/participant.validation.js +10 -3
- package/dist/lib/modules/tournament/participant/participant.validation.js.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.builder.d.ts.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.builder.js +3 -2
- package/dist/lib/modules/tournament/prediction/prediction.builder.js.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.service.d.ts +1 -0
- package/dist/lib/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/prediction/prediction.service.js +12 -1
- package/dist/lib/modules/tournament/prediction/prediction.service.js.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.builder.d.ts.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.builder.js +2 -1
- package/dist/lib/modules/tournament/reward/reward.builder.js.map +1 -1
- package/dist/lib/modules/tournament/reward/reward.repository.d.ts +8 -0
- package/dist/lib/modules/tournament/reward/reward.repository.d.ts.map +1 -0
- package/dist/lib/modules/tournament/reward/reward.repository.js +66 -0
- package/dist/lib/modules/tournament/reward/reward.repository.js.map +1 -0
- package/dist/lib/modules/tournament/schedule/schedule.router.d.ts +27 -0
- package/dist/lib/modules/tournament/schedule/schedule.router.d.ts.map +1 -0
- package/dist/lib/modules/tournament/schedule/schedule.router.js +17 -0
- package/dist/lib/modules/tournament/schedule/schedule.router.js.map +1 -0
- package/dist/lib/modules/tournament/schedule/schedule.service.d.ts +10 -0
- package/dist/lib/modules/tournament/schedule/schedule.service.d.ts.map +1 -0
- package/dist/lib/modules/tournament/schedule/schedule.service.js +87 -0
- package/dist/lib/modules/tournament/schedule/schedule.service.js.map +1 -0
- package/dist/lib/modules/tournament/score/score.repository.d.ts +8 -1
- package/dist/lib/modules/tournament/score/score.repository.d.ts.map +1 -1
- package/dist/lib/modules/tournament/score/score.repository.js +12 -2
- package/dist/lib/modules/tournament/score/score.repository.js.map +1 -1
- package/dist/lib/modules/tournament/score/score.router.d.ts +98 -0
- package/dist/lib/modules/tournament/score/score.router.d.ts.map +1 -0
- package/dist/lib/modules/tournament/score/score.router.js +20 -0
- package/dist/lib/modules/tournament/score/score.router.js.map +1 -0
- package/dist/lib/modules/tournament/score/score.service.d.ts +7 -0
- package/dist/lib/modules/tournament/score/score.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/score/score.service.js +49 -0
- package/dist/lib/modules/tournament/score/score.service.js.map +1 -1
- package/dist/lib/modules/tournament/score/score.validation.d.ts +375 -0
- package/dist/lib/modules/tournament/score/score.validation.d.ts.map +1 -0
- package/dist/lib/modules/tournament/score/score.validation.js +19 -0
- package/dist/lib/modules/tournament/score/score.validation.js.map +1 -0
- package/dist/lib/modules/tournament/statistics/statistics.builder.d.ts +10 -0
- package/dist/lib/modules/tournament/statistics/statistics.builder.d.ts.map +1 -0
- package/dist/lib/modules/tournament/statistics/statistics.builder.js +53 -0
- package/dist/lib/modules/tournament/statistics/statistics.builder.js.map +1 -0
- package/dist/lib/modules/tournament/statistics/statistics.router.d.ts +80 -0
- package/dist/lib/modules/tournament/statistics/statistics.router.d.ts.map +1 -0
- package/dist/lib/modules/tournament/statistics/statistics.router.js +21 -0
- package/dist/lib/modules/tournament/statistics/statistics.router.js.map +1 -0
- package/dist/lib/modules/tournament/statistics/statistics.service.d.ts +11 -0
- package/dist/lib/modules/tournament/statistics/statistics.service.d.ts.map +1 -0
- package/dist/lib/modules/tournament/statistics/statistics.service.js +80 -0
- package/dist/lib/modules/tournament/statistics/statistics.service.js.map +1 -0
- package/dist/lib/modules/tournament/statistics/statistics.validation.d.ts +404 -0
- package/dist/lib/modules/tournament/statistics/statistics.validation.d.ts.map +1 -0
- package/dist/lib/modules/tournament/statistics/statistics.validation.js +36 -0
- package/dist/lib/modules/tournament/statistics/statistics.validation.js.map +1 -0
- package/dist/lib/modules/tournament/team/team.router.d.ts +9 -3
- package/dist/lib/modules/tournament/team/team.router.d.ts.map +1 -1
- package/dist/lib/modules/tournament/team/team.service.d.ts +1 -0
- package/dist/lib/modules/tournament/team/team.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/team/team.service.js +23 -16
- package/dist/lib/modules/tournament/team/team.service.js.map +1 -1
- package/dist/lib/modules/tournament/team/team.validation.d.ts +54 -4
- package/dist/lib/modules/tournament/team/team.validation.d.ts.map +1 -1
- package/dist/lib/modules/tournament/team/team.validation.js +4 -2
- package/dist/lib/modules/tournament/team/team.validation.js.map +1 -1
- package/dist/lib/modules/tournament/tournament.router.d.ts +370 -125
- package/dist/lib/modules/tournament/tournament.router.d.ts.map +1 -1
- package/dist/lib/modules/tournament/tournament.router.js +13 -2
- package/dist/lib/modules/tournament/tournament.router.js.map +1 -1
- package/dist/lib/modules/tournament/tournament.service.d.ts +3 -1
- package/dist/lib/modules/tournament/tournament.service.d.ts.map +1 -1
- package/dist/lib/modules/tournament/tournament.service.js +17 -2
- package/dist/lib/modules/tournament/tournament.service.js.map +1 -1
- package/dist/lib/modules/tournament/tournament.types.d.ts +14 -0
- package/dist/lib/modules/tournament/tournament.types.d.ts.map +1 -0
- package/dist/lib/modules/tournament/tournament.types.js +20 -0
- package/dist/lib/modules/tournament/tournament.types.js.map +1 -0
- package/dist/lib/modules/tournament/tournament.utils.d.ts +2 -0
- package/dist/lib/modules/tournament/tournament.utils.d.ts.map +1 -0
- package/dist/lib/modules/tournament/tournament.utils.js +6 -0
- package/dist/lib/modules/tournament/tournament.utils.js.map +1 -0
- package/dist/lib/modules/tournament/tournament.validation.d.ts +15 -0
- package/dist/lib/modules/tournament/tournament.validation.d.ts.map +1 -1
- package/dist/lib/modules/tournament/tournament.validation.js +4 -1
- package/dist/lib/modules/tournament/tournament.validation.js.map +1 -1
- package/dist/types/index.d.ts +265 -21
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/tournament/config/config.repository.d.ts +3 -0
- package/dist/types/modules/tournament/config/config.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/config/config.router.d.ts +10 -10
- package/dist/types/modules/tournament/config/config.validation.d.ts +37 -36
- package/dist/types/modules/tournament/config/config.validation.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/match.builder.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/match.repository.d.ts +2 -0
- package/dist/types/modules/tournament/match/match.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/match.router.d.ts +16 -4
- package/dist/types/modules/tournament/match/match.router.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/match.service.d.ts +0 -1
- package/dist/types/modules/tournament/match/match.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/match/match.validation.d.ts +50 -0
- package/dist/types/modules/tournament/match/match.validation.d.ts.map +1 -1
- package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts +2 -5
- package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts.map +1 -1
- package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts +2 -0
- package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts.map +1 -1
- package/dist/types/modules/tournament/notification/notification-template.repository.d.ts +8 -0
- package/dist/types/modules/tournament/notification/notification-template.repository.d.ts.map +1 -0
- package/dist/types/modules/tournament/notification/notification.config.d.ts +10 -0
- package/dist/types/modules/tournament/notification/notification.config.d.ts.map +1 -0
- package/dist/types/modules/tournament/notification/notification.schedule.config.d.ts +10 -0
- package/dist/types/modules/tournament/notification/notification.schedule.config.d.ts.map +1 -0
- package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts +4 -4
- package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/notification/notification.service.d.ts +5 -4
- package/dist/types/modules/tournament/notification/notification.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/participant/participant.repository.d.ts +3 -0
- package/dist/types/modules/tournament/participant/participant.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/participant/participant.router.d.ts +27 -4
- package/dist/types/modules/tournament/participant/participant.router.d.ts.map +1 -1
- package/dist/types/modules/tournament/participant/participant.service.d.ts +2 -2
- package/dist/types/modules/tournament/participant/participant.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/participant/participant.validation.d.ts +144 -36
- package/dist/types/modules/tournament/participant/participant.validation.d.ts.map +1 -1
- package/dist/types/modules/tournament/prediction/prediction.builder.d.ts.map +1 -1
- package/dist/types/modules/tournament/prediction/prediction.service.d.ts +1 -0
- package/dist/types/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/reward/reward.builder.d.ts.map +1 -1
- package/dist/types/modules/tournament/reward/reward.repository.d.ts +8 -0
- package/dist/types/modules/tournament/reward/reward.repository.d.ts.map +1 -0
- package/dist/types/modules/tournament/schedule/schedule.router.d.ts +27 -0
- package/dist/types/modules/tournament/schedule/schedule.router.d.ts.map +1 -0
- package/dist/types/modules/tournament/schedule/schedule.service.d.ts +10 -0
- package/dist/types/modules/tournament/schedule/schedule.service.d.ts.map +1 -0
- package/dist/types/modules/tournament/score/score.repository.d.ts +8 -1
- package/dist/types/modules/tournament/score/score.repository.d.ts.map +1 -1
- package/dist/types/modules/tournament/score/score.router.d.ts +98 -0
- package/dist/types/modules/tournament/score/score.router.d.ts.map +1 -0
- package/dist/types/modules/tournament/score/score.service.d.ts +7 -0
- package/dist/types/modules/tournament/score/score.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/score/score.validation.d.ts +375 -0
- package/dist/types/modules/tournament/score/score.validation.d.ts.map +1 -0
- package/dist/types/modules/tournament/statistics/statistics.builder.d.ts +10 -0
- package/dist/types/modules/tournament/statistics/statistics.builder.d.ts.map +1 -0
- package/dist/types/modules/tournament/statistics/statistics.router.d.ts +80 -0
- package/dist/types/modules/tournament/statistics/statistics.router.d.ts.map +1 -0
- package/dist/types/modules/tournament/statistics/statistics.service.d.ts +11 -0
- package/dist/types/modules/tournament/statistics/statistics.service.d.ts.map +1 -0
- package/dist/types/modules/tournament/statistics/statistics.validation.d.ts +404 -0
- package/dist/types/modules/tournament/statistics/statistics.validation.d.ts.map +1 -0
- package/dist/types/modules/tournament/team/team.router.d.ts +9 -3
- package/dist/types/modules/tournament/team/team.router.d.ts.map +1 -1
- package/dist/types/modules/tournament/team/team.service.d.ts +1 -0
- package/dist/types/modules/tournament/team/team.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/team/team.validation.d.ts +54 -4
- package/dist/types/modules/tournament/team/team.validation.d.ts.map +1 -1
- package/dist/types/modules/tournament/tournament.router.d.ts +370 -125
- package/dist/types/modules/tournament/tournament.router.d.ts.map +1 -1
- package/dist/types/modules/tournament/tournament.service.d.ts +3 -1
- package/dist/types/modules/tournament/tournament.service.d.ts.map +1 -1
- package/dist/types/modules/tournament/tournament.types.d.ts +14 -0
- package/dist/types/modules/tournament/tournament.types.d.ts.map +1 -0
- package/dist/types/modules/tournament/tournament.utils.d.ts +2 -0
- package/dist/types/modules/tournament/tournament.utils.d.ts.map +1 -0
- package/dist/types/modules/tournament/tournament.validation.d.ts +15 -0
- package/dist/types/modules/tournament/tournament.validation.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.router.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.router.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tournament.router.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.router.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAY9C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkB3B,CAAC"}
|
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.tournamentRouter = void 0;
|
|
4
4
|
const trpc_1 = require("@lyxa.ai/core/dist/libraries/trpc");
|
|
5
|
+
const auth_1 = require("@lyxa.ai/core/dist/libraries/auth");
|
|
6
|
+
const auth_2 = require("@lyxa.ai/core/dist/libraries/trpc/middlewares/auth");
|
|
5
7
|
const error_handler_1 = require("@lyxa.ai/core/dist/utilities/error-handler");
|
|
6
8
|
const response_1 = require("@lyxa.ai/core/dist/utilities/response");
|
|
9
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
7
10
|
const config_router_1 = require("./config/config.router");
|
|
8
11
|
const team_router_1 = require("./team/team.router");
|
|
9
12
|
const match_router_1 = require("./match/match.router");
|
|
10
13
|
const participant_router_1 = require("./participant/participant.router");
|
|
11
14
|
const prediction_router_1 = require("./prediction/prediction.router");
|
|
15
|
+
const statistics_router_1 = require("./statistics/statistics.router");
|
|
16
|
+
const schedule_router_1 = require("./schedule/schedule.router");
|
|
17
|
+
const score_router_1 = require("./score/score.router");
|
|
12
18
|
const tournament_validation_1 = require("./tournament.validation");
|
|
13
19
|
const tournament_service_1 = require("./tournament.service");
|
|
14
20
|
exports.tournamentRouter = (0, trpc_1.createTRPCRouter)({
|
|
@@ -17,8 +23,13 @@ exports.tournamentRouter = (0, trpc_1.createTRPCRouter)({
|
|
|
17
23
|
match: match_router_1.matchRouter,
|
|
18
24
|
participant: participant_router_1.participantRouter,
|
|
19
25
|
prediction: prediction_router_1.predictionRouter,
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
statistics: statistics_router_1.statisticsRouter,
|
|
27
|
+
schedule: schedule_router_1.scheduleRouter,
|
|
28
|
+
score: score_router_1.scoreRouter,
|
|
29
|
+
getActive: (0, auth_2.createAuthenticatedProcedure)({ entityTypes: [auth_1.AuthEntityType.USER] })
|
|
30
|
+
.output(tournament_validation_1.ActiveTournamentResponseSchema)
|
|
31
|
+
.query(({ ctx }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
|
|
32
|
+
const result = await tournament_service_1.tournamentService.getActive(new typegoose_1.mongoose.Types.ObjectId(ctx.entity?.id));
|
|
22
33
|
return (0, response_1.response)('Active tournament fetched successfully', result);
|
|
23
34
|
})),
|
|
24
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.router.js","sourceRoot":"/","sources":["modules/tournament/tournament.router.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"tournament.router.js","sourceRoot":"/","sources":["modules/tournament/tournament.router.ts"],"names":[],"mappings":";;;AAAA,4DAAmE;AACnE,4DAAiE;AACjE,6EAAgG;AAChG,8EAAwE;AACxE,oEAA+D;AAC/D,oDAA8C;AAC9C,0DAAoD;AACpD,oDAA8C;AAC9C,uDAAiD;AACjD,yEAAmE;AACnE,sEAAgE;AAChE,sEAAgE;AAChE,gEAA0D;AAC1D,uDAAiD;AACjD,mEAAuE;AACvE,6DAAkE;AAErD,QAAA,gBAAgB,GAAG,IAAA,uBAAgB,EAAC;IAChD,MAAM,EAAE,4BAAY;IACpB,IAAI,EAAE,wBAAU;IAChB,KAAK,EAAE,0BAAW;IAClB,WAAW,EAAE,sCAAiB;IAC9B,UAAU,EAAE,oCAAgB;IAC5B,UAAU,EAAE,oCAAgB;IAC5B,QAAQ,EAAE,gCAAc;IACxB,KAAK,EAAE,0BAAW;IAElB,SAAS,EAAE,IAAA,mCAA4B,EAAC,EAAE,WAAW,EAAE,CAAC,qBAAc,CAAC,IAAI,CAAC,EAAE,CAAC;SAC7E,MAAM,CAAC,sDAA8B,CAAC;SACtC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAClB,4BAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACjC,MAAM,MAAM,GAAG,MAAM,sCAAO,CAAC,SAAS,CAAC,IAAI,oBAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;QACpF,OAAO,IAAA,mBAAQ,EAAC,wCAAwC,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC,CAAC,CACF;CACF,CAAC,CAAC","sourcesContent":["import {createTRPCRouter} from '@lyxa.ai/core/dist/libraries/trpc';\nimport {AuthEntityType} from '@lyxa.ai/core/dist/libraries/auth';\nimport {createAuthenticatedProcedure} from '@lyxa.ai/core/dist/libraries/trpc/middlewares/auth';\nimport {ErrorHandler} from '@lyxa.ai/core/dist/utilities/error-handler';\nimport {response} from '@lyxa.ai/core/dist/utilities/response';\nimport {mongoose} from '@typegoose/typegoose';\nimport {configRouter} from './config/config.router';\nimport {teamRouter} from './team/team.router';\nimport {matchRouter} from './match/match.router';\nimport {participantRouter} from './participant/participant.router';\nimport {predictionRouter} from './prediction/prediction.router';\nimport {statisticsRouter} from './statistics/statistics.router';\nimport {scheduleRouter} from './schedule/schedule.router';\nimport {scoreRouter} from './score/score.router';\nimport {ActiveTournamentResponseSchema} from './tournament.validation';\nimport {tournamentService as service} from './tournament.service';\n\nexport const tournamentRouter = createTRPCRouter({\n\tconfig: configRouter,\n\tteam: teamRouter,\n\tmatch: matchRouter,\n\tparticipant: participantRouter,\n\tprediction: predictionRouter,\n\tstatistics: statisticsRouter,\n\tschedule: scheduleRouter,\n\tscore: scoreRouter,\n\n\tgetActive: createAuthenticatedProcedure({ entityTypes: [AuthEntityType.USER] })\n\t\t.output(ActiveTournamentResponseSchema)\n\t\t.query(({ ctx }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tconst result = await service.getActive(new mongoose.Types.ObjectId(ctx.entity?.id));\n\t\t\t\treturn response('Active tournament fetched successfully', result);\n\t\t\t})\n\t\t),\n});\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { mongoose } from '@typegoose/typegoose';
|
|
1
2
|
import { ActiveTournamentOutputDTO } from './tournament.validation';
|
|
2
3
|
export declare class TournamentService {
|
|
3
4
|
private repository;
|
|
5
|
+
private participantRepository;
|
|
4
6
|
constructor();
|
|
5
|
-
getActive(): Promise<ActiveTournamentOutputDTO | null>;
|
|
7
|
+
getActive(userId: mongoose.Types.ObjectId): Promise<ActiveTournamentOutputDTO | null>;
|
|
6
8
|
}
|
|
7
9
|
export declare const tournamentService: TournamentService;
|
|
8
10
|
//# sourceMappingURL=tournament.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.service.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"tournament.service.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAKpE,qBACa,iBAAiB;IAC7B,OAAO,CAAC,UAAU,CAA6B;IAC/C,OAAO,CAAC,qBAAqB,CAAkC;;IAOlD,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC;CAelG;AAED,eAAO,MAAM,iBAAiB,mBAAmC,CAAC"}
|
|
@@ -45,13 +45,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
45
45
|
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
|
+
const participant_repository_1 = require("./participant/participant.repository");
|
|
49
|
+
const tournament_types_1 = require("./tournament.types");
|
|
48
50
|
let TournamentService = class TournamentService {
|
|
49
51
|
repository;
|
|
52
|
+
participantRepository;
|
|
50
53
|
constructor() {
|
|
51
54
|
this.repository = typedi_1.default.get(config_repository_1.TournamentConfigRepository);
|
|
55
|
+
this.participantRepository = typedi_1.default.get(participant_repository_1.TournamentParticipantRepository);
|
|
52
56
|
}
|
|
53
|
-
async getActive() {
|
|
54
|
-
|
|
57
|
+
async getActive(userId) {
|
|
58
|
+
const tournament = await this.repository.findActiveFull();
|
|
59
|
+
if (!tournament)
|
|
60
|
+
return null;
|
|
61
|
+
const participant = await this.participantRepository.findByUserAndTournament(userId, tournament._id);
|
|
62
|
+
const userStatus = !participant ? tournament_types_1.TournamentParticipantStatus.NOT_SEEN : (participant.status ?? tournament_types_1.TournamentParticipantStatus.JOINED);
|
|
63
|
+
return {
|
|
64
|
+
name: tournament.name,
|
|
65
|
+
tag: tournament.tag,
|
|
66
|
+
startDate: tournament.startDate ?? null,
|
|
67
|
+
endDate: tournament.endDate ?? null,
|
|
68
|
+
userStatus: userStatus,
|
|
69
|
+
};
|
|
55
70
|
}
|
|
56
71
|
};
|
|
57
72
|
exports.TournamentService = TournamentService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.service.js","sourceRoot":"/","sources":["modules/tournament/tournament.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;
|
|
1
|
+
{"version":3,"file":"tournament.service.js","sourceRoot":"/","sources":["modules/tournament/tournament.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAG5C,kEAAwE;AACxE,iFAAuF;AACvF,yDAAiE;AAG1D,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,MAAM,UAAU,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,8CAA2B,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,IAAI,8CAA2B,CAAC,MAAM,CAAC,CAAC;QAEpI,OAAO;YACN,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,GAAG,EAAE,UAAU,CAAC,GAAG;YACnB,SAAS,EAAE,UAAU,CAAC,SAAS,IAAI,IAAI;YACvC,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,IAAI;YACnC,UAAU,EAAE,UAAqD;SACjE,CAAC;IACH,CAAC;CACD,CAAA;AAxBY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,gBAAO,GAAE;;GACG,iBAAiB,CAwB7B;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 { TournamentParticipantStatus } from './tournament.types';\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.findActiveFull();\n\t\tif (!tournament) return null;\n\n\t\tconst participant = await this.participantRepository.findByUserAndTournament(userId, tournament._id);\n\t\tconst userStatus = !participant ? TournamentParticipantStatus.NOT_SEEN : (participant.status ?? TournamentParticipantStatus.JOINED);\n\n\t\treturn {\n\t\t\tname: tournament.name,\n\t\t\ttag: tournament.tag,\n\t\t\tstartDate: tournament.startDate ?? null,\n\t\t\tendDate: tournament.endDate ?? null,\n\t\t\tuserStatus: userStatus as ActiveTournamentOutputDTO['userStatus'],\n\t\t};\n\t}\n}\n\nexport const tournamentService = Container.get(TournamentService);\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum TournamentTag {
|
|
2
|
+
FOOTBALL_WORLD_CUP = "world-cup"
|
|
3
|
+
}
|
|
4
|
+
export declare enum MatchStatus {
|
|
5
|
+
UPCOMING = "upcoming",
|
|
6
|
+
STARTED = "started",
|
|
7
|
+
ENDED = "ended"
|
|
8
|
+
}
|
|
9
|
+
export declare enum TournamentParticipantStatus {
|
|
10
|
+
JOINED = "joined",
|
|
11
|
+
SEEN = "seen",
|
|
12
|
+
NOT_SEEN = "not_seen"
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=tournament.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tournament.types.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.types.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACrB,kBAAkB,cAAc;CACnC;AAED,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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TournamentParticipantStatus = exports.MatchStatus = exports.TournamentTag = void 0;
|
|
4
|
+
var TournamentTag;
|
|
5
|
+
(function (TournamentTag) {
|
|
6
|
+
TournamentTag["FOOTBALL_WORLD_CUP"] = "world-cup";
|
|
7
|
+
})(TournamentTag || (exports.TournamentTag = TournamentTag = {}));
|
|
8
|
+
var MatchStatus;
|
|
9
|
+
(function (MatchStatus) {
|
|
10
|
+
MatchStatus["UPCOMING"] = "upcoming";
|
|
11
|
+
MatchStatus["STARTED"] = "started";
|
|
12
|
+
MatchStatus["ENDED"] = "ended";
|
|
13
|
+
})(MatchStatus || (exports.MatchStatus = MatchStatus = {}));
|
|
14
|
+
var TournamentParticipantStatus;
|
|
15
|
+
(function (TournamentParticipantStatus) {
|
|
16
|
+
TournamentParticipantStatus["JOINED"] = "joined";
|
|
17
|
+
TournamentParticipantStatus["SEEN"] = "seen";
|
|
18
|
+
TournamentParticipantStatus["NOT_SEEN"] = "not_seen";
|
|
19
|
+
})(TournamentParticipantStatus || (exports.TournamentParticipantStatus = TournamentParticipantStatus = {}));
|
|
20
|
+
//# sourceMappingURL=tournament.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tournament.types.js","sourceRoot":"/","sources":["modules/tournament/tournament.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAEX;AAFD,WAAY,aAAa;IACrB,iDAAgC,CAAA;AACpC,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB;AAED,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 TournamentTag {\n FOOTBALL_WORLD_CUP = 'world-cup',\n}\n\nexport 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"]}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tournament.utils.js","sourceRoot":"/","sources":["modules/tournament/tournament.utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,MAAM,GAAG,GAAS,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AAA1C,QAAA,MAAM,UAAoC","sourcesContent":["export const utcNow = (): Date => new Date(Date.now());\n"]}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DTO } from '@lyxa.ai/core/dist/utilities/validation/global-validation';
|
|
3
|
+
import { TournamentParticipantStatus } from './tournament.types';
|
|
4
|
+
export declare const UserTournamentStatus: z.ZodNativeEnum<typeof TournamentParticipantStatus>;
|
|
3
5
|
export declare const ActiveTournamentSchema: z.ZodObject<{
|
|
4
6
|
name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
5
7
|
tag: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
6
8
|
startDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
7
9
|
endDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
10
|
+
userStatus: z.ZodNativeEnum<typeof TournamentParticipantStatus>;
|
|
8
11
|
}, "strip", z.ZodTypeAny, {
|
|
9
12
|
name: string;
|
|
10
13
|
tag: string;
|
|
14
|
+
userStatus: TournamentParticipantStatus;
|
|
11
15
|
startDate?: Date | null | undefined;
|
|
12
16
|
endDate?: Date | null | undefined;
|
|
13
17
|
}, {
|
|
14
18
|
name: string;
|
|
15
19
|
tag: string;
|
|
20
|
+
userStatus: TournamentParticipantStatus;
|
|
16
21
|
startDate?: Date | null | undefined;
|
|
17
22
|
endDate?: Date | null | undefined;
|
|
18
23
|
}>;
|
|
@@ -39,11 +44,13 @@ export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
|
39
44
|
documents: z.ZodArray<z.ZodType<{
|
|
40
45
|
name: string;
|
|
41
46
|
tag: string;
|
|
47
|
+
userStatus: TournamentParticipantStatus;
|
|
42
48
|
startDate?: Date | null | undefined;
|
|
43
49
|
endDate?: Date | null | undefined;
|
|
44
50
|
} | null, z.ZodTypeDef, {
|
|
45
51
|
name: string;
|
|
46
52
|
tag: string;
|
|
53
|
+
userStatus: TournamentParticipantStatus;
|
|
47
54
|
startDate?: Date | null | undefined;
|
|
48
55
|
endDate?: Date | null | undefined;
|
|
49
56
|
} | null>, "many">;
|
|
@@ -51,6 +58,7 @@ export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
|
51
58
|
documents: ({
|
|
52
59
|
name: string;
|
|
53
60
|
tag: string;
|
|
61
|
+
userStatus: TournamentParticipantStatus;
|
|
54
62
|
startDate?: Date | null | undefined;
|
|
55
63
|
endDate?: Date | null | undefined;
|
|
56
64
|
} | null)[];
|
|
@@ -64,6 +72,7 @@ export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
|
64
72
|
documents: ({
|
|
65
73
|
name: string;
|
|
66
74
|
tag: string;
|
|
75
|
+
userStatus: TournamentParticipantStatus;
|
|
67
76
|
startDate?: Date | null | undefined;
|
|
68
77
|
endDate?: Date | null | undefined;
|
|
69
78
|
} | null)[];
|
|
@@ -76,11 +85,13 @@ export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
|
76
85
|
}>, z.ZodType<{
|
|
77
86
|
name: string;
|
|
78
87
|
tag: string;
|
|
88
|
+
userStatus: TournamentParticipantStatus;
|
|
79
89
|
startDate?: Date | null | undefined;
|
|
80
90
|
endDate?: Date | null | undefined;
|
|
81
91
|
} | null, z.ZodTypeDef, {
|
|
82
92
|
name: string;
|
|
83
93
|
tag: string;
|
|
94
|
+
userStatus: TournamentParticipantStatus;
|
|
84
95
|
startDate?: Date | null | undefined;
|
|
85
96
|
endDate?: Date | null | undefined;
|
|
86
97
|
} | null>]>>;
|
|
@@ -90,12 +101,14 @@ export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
|
90
101
|
data?: {
|
|
91
102
|
name: string;
|
|
92
103
|
tag: string;
|
|
104
|
+
userStatus: TournamentParticipantStatus;
|
|
93
105
|
startDate?: Date | null | undefined;
|
|
94
106
|
endDate?: Date | null | undefined;
|
|
95
107
|
} | {
|
|
96
108
|
documents: ({
|
|
97
109
|
name: string;
|
|
98
110
|
tag: string;
|
|
111
|
+
userStatus: TournamentParticipantStatus;
|
|
99
112
|
startDate?: Date | null | undefined;
|
|
100
113
|
endDate?: Date | null | undefined;
|
|
101
114
|
} | null)[];
|
|
@@ -112,12 +125,14 @@ export declare const ActiveTournamentResponseSchema: z.ZodObject<{
|
|
|
112
125
|
data?: {
|
|
113
126
|
name: string;
|
|
114
127
|
tag: string;
|
|
128
|
+
userStatus: TournamentParticipantStatus;
|
|
115
129
|
startDate?: Date | null | undefined;
|
|
116
130
|
endDate?: Date | null | undefined;
|
|
117
131
|
} | {
|
|
118
132
|
documents: ({
|
|
119
133
|
name: string;
|
|
120
134
|
tag: string;
|
|
135
|
+
userStatus: TournamentParticipantStatus;
|
|
121
136
|
startDate?: Date | null | undefined;
|
|
122
137
|
endDate?: Date | null | undefined;
|
|
123
138
|
} | null)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.validation.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAiB,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"tournament.validation.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAiB,MAAM,2DAA2D,CAAC;AAE/F,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEjE,eAAO,MAAM,oBAAoB,qDAA4C,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0D,CAAC;AAEtG,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActiveTournamentResponseSchema = exports.ActiveTournamentSchema = void 0;
|
|
3
|
+
exports.ActiveTournamentResponseSchema = exports.ActiveTournamentSchema = exports.UserTournamentStatus = void 0;
|
|
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 tournament_types_1 = require("./tournament.types");
|
|
8
|
+
exports.UserTournamentStatus = zod_1.z.nativeEnum(tournament_types_1.TournamentParticipantStatus);
|
|
7
9
|
exports.ActiveTournamentSchema = zod_1.z.object({
|
|
8
10
|
name: global_validation_1.ZodValidation.string('Tournament name'),
|
|
9
11
|
tag: global_validation_1.ZodValidation.string('Tournament tag'),
|
|
10
12
|
startDate: zod_1.z.date().nullable().optional(),
|
|
11
13
|
endDate: zod_1.z.date().nullable().optional(),
|
|
14
|
+
userStatus: exports.UserTournamentStatus,
|
|
12
15
|
});
|
|
13
16
|
exports.ActiveTournamentResponseSchema = (0, validation_1.createResponseSchema)(exports.ActiveTournamentSchema.nullable());
|
|
14
17
|
//# sourceMappingURL=tournament.validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.validation.js","sourceRoot":"/","sources":["modules/tournament/tournament.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iGAA+F;AAC/F,wEAA+E;
|
|
1
|
+
{"version":3,"file":"tournament.validation.js","sourceRoot":"/","sources":["modules/tournament/tournament.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iGAA+F;AAC/F,wEAA+E;AAC/E,yDAAiE;AAEpD,QAAA,oBAAoB,GAAG,OAAC,CAAC,UAAU,CAAC,8CAA2B,CAAC,CAAC;AAEjE,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,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;CAChC,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 } from './tournament.types';\n\nexport const UserTournamentStatus = z.nativeEnum(TournamentParticipantStatus);\n\nexport const ActiveTournamentSchema = z.object({\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});\n\nexport const ActiveTournamentResponseSchema = createResponseSchema(ActiveTournamentSchema.nullable());\n\nexport type ActiveTournamentOutputDTO = DTO<typeof ActiveTournamentSchema>;\n"]}
|