@lyxa.ai/marketing 1.0.50 → 1.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/lib/index.d.ts +47 -22
  2. package/dist/lib/index.d.ts.map +1 -1
  3. package/dist/lib/modules/tournament/config/config.router.d.ts +10 -10
  4. package/dist/lib/modules/tournament/config/config.validation.d.ts +36 -37
  5. package/dist/lib/modules/tournament/config/config.validation.d.ts.map +1 -1
  6. package/dist/lib/modules/tournament/config/config.validation.js +3 -4
  7. package/dist/lib/modules/tournament/config/config.validation.js.map +1 -1
  8. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -1
  9. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js +6 -3
  10. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js.map +1 -1
  11. package/dist/lib/modules/tournament/match/match.router.d.ts +4 -4
  12. package/dist/lib/modules/tournament/participant/participant.repository.d.ts +2 -0
  13. package/dist/lib/modules/tournament/participant/participant.repository.d.ts.map +1 -1
  14. package/dist/lib/modules/tournament/participant/participant.repository.js +8 -0
  15. package/dist/lib/modules/tournament/participant/participant.repository.js.map +1 -1
  16. package/dist/lib/modules/tournament/participant/participant.router.d.ts +27 -4
  17. package/dist/lib/modules/tournament/participant/participant.router.d.ts.map +1 -1
  18. package/dist/lib/modules/tournament/participant/participant.router.js +7 -0
  19. package/dist/lib/modules/tournament/participant/participant.router.js.map +1 -1
  20. package/dist/lib/modules/tournament/participant/participant.service.d.ts +2 -2
  21. package/dist/lib/modules/tournament/participant/participant.service.d.ts.map +1 -1
  22. package/dist/lib/modules/tournament/participant/participant.service.js +20 -6
  23. package/dist/lib/modules/tournament/participant/participant.service.js.map +1 -1
  24. package/dist/lib/modules/tournament/participant/participant.validation.d.ts +144 -36
  25. package/dist/lib/modules/tournament/participant/participant.validation.d.ts.map +1 -1
  26. package/dist/lib/modules/tournament/participant/participant.validation.js +10 -3
  27. package/dist/lib/modules/tournament/participant/participant.validation.js.map +1 -1
  28. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
  29. package/dist/lib/modules/tournament/prediction/prediction.service.js +2 -0
  30. package/dist/lib/modules/tournament/prediction/prediction.service.js.map +1 -1
  31. package/dist/lib/modules/tournament/team/team.router.d.ts +4 -4
  32. package/dist/lib/modules/tournament/team/team.service.d.ts.map +1 -1
  33. package/dist/lib/modules/tournament/team/team.service.js +2 -0
  34. package/dist/lib/modules/tournament/team/team.service.js.map +1 -1
  35. package/dist/lib/modules/tournament/team/team.validation.d.ts +14 -14
  36. package/dist/lib/modules/tournament/tournament.router.d.ts +164 -138
  37. package/dist/lib/modules/tournament/tournament.router.d.ts.map +1 -1
  38. package/dist/lib/modules/tournament/tournament.router.js +7 -2
  39. package/dist/lib/modules/tournament/tournament.router.js.map +1 -1
  40. package/dist/lib/modules/tournament/tournament.service.d.ts +3 -1
  41. package/dist/lib/modules/tournament/tournament.service.d.ts.map +1 -1
  42. package/dist/lib/modules/tournament/tournament.service.js +17 -2
  43. package/dist/lib/modules/tournament/tournament.service.js.map +1 -1
  44. package/dist/lib/modules/tournament/tournament.types.d.ts +5 -3
  45. package/dist/lib/modules/tournament/tournament.types.d.ts.map +1 -1
  46. package/dist/lib/modules/tournament/tournament.types.js +7 -5
  47. package/dist/lib/modules/tournament/tournament.types.js.map +1 -1
  48. package/dist/lib/modules/tournament/tournament.validation.d.ts +15 -0
  49. package/dist/lib/modules/tournament/tournament.validation.d.ts.map +1 -1
  50. package/dist/lib/modules/tournament/tournament.validation.js +4 -1
  51. package/dist/lib/modules/tournament/tournament.validation.js.map +1 -1
  52. package/dist/types/index.d.ts +47 -22
  53. package/dist/types/index.d.ts.map +1 -1
  54. package/dist/types/modules/tournament/config/config.router.d.ts +10 -10
  55. package/dist/types/modules/tournament/config/config.validation.d.ts +36 -37
  56. package/dist/types/modules/tournament/config/config.validation.d.ts.map +1 -1
  57. package/dist/types/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -1
  58. package/dist/types/modules/tournament/match/match.router.d.ts +4 -4
  59. package/dist/types/modules/tournament/participant/participant.repository.d.ts +2 -0
  60. package/dist/types/modules/tournament/participant/participant.repository.d.ts.map +1 -1
  61. package/dist/types/modules/tournament/participant/participant.router.d.ts +27 -4
  62. package/dist/types/modules/tournament/participant/participant.router.d.ts.map +1 -1
  63. package/dist/types/modules/tournament/participant/participant.service.d.ts +2 -2
  64. package/dist/types/modules/tournament/participant/participant.service.d.ts.map +1 -1
  65. package/dist/types/modules/tournament/participant/participant.validation.d.ts +144 -36
  66. package/dist/types/modules/tournament/participant/participant.validation.d.ts.map +1 -1
  67. package/dist/types/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
  68. package/dist/types/modules/tournament/team/team.router.d.ts +4 -4
  69. package/dist/types/modules/tournament/team/team.service.d.ts.map +1 -1
  70. package/dist/types/modules/tournament/team/team.validation.d.ts +14 -14
  71. package/dist/types/modules/tournament/tournament.router.d.ts +164 -138
  72. package/dist/types/modules/tournament/tournament.router.d.ts.map +1 -1
  73. package/dist/types/modules/tournament/tournament.service.d.ts +3 -1
  74. package/dist/types/modules/tournament/tournament.service.d.ts.map +1 -1
  75. package/dist/types/modules/tournament/tournament.types.d.ts +5 -3
  76. package/dist/types/modules/tournament/tournament.types.d.ts.map +1 -1
  77. package/dist/types/modules/tournament/tournament.validation.d.ts +15 -0
  78. package/dist/types/modules/tournament/tournament.validation.d.ts.map +1 -1
  79. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"tournament.router.d.ts","sourceRoot":"/","sources":["modules/tournament/tournament.router.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgB3B,CAAC"}
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,8 +2,11 @@
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");
@@ -23,8 +26,10 @@ exports.tournamentRouter = (0, trpc_1.createTRPCRouter)({
23
26
  statistics: statistics_router_1.statisticsRouter,
24
27
  schedule: schedule_router_1.scheduleRouter,
25
28
  score: score_router_1.scoreRouter,
26
- getActive: trpc_1.publicProcedure.output(tournament_validation_1.ActiveTournamentResponseSchema).query(() => error_handler_1.ErrorHandler.wrapAsync(async () => {
27
- const result = await tournament_service_1.tournamentService.getActive();
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));
28
33
  return (0, response_1.response)('Active tournament fetched successfully', result);
29
34
  })),
30
35
  });
@@ -1 +1 @@
1
- {"version":3,"file":"tournament.router.js","sourceRoot":"/","sources":["modules/tournament/tournament.router.ts"],"names":[],"mappings":";;;AAAA,4DAAoF;AACpF,8EAAwE;AACxE,oEAA+D;AAC/D,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,sBAAe,CAAC,MAAM,CAAC,sDAA8B,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAC5E,4BAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACjC,MAAM,MAAM,GAAG,MAAM,sCAAO,CAAC,SAAS,EAAE,CAAC;QACzC,OAAO,IAAA,mBAAQ,EAAC,wCAAwC,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC,CAAC,CACF;CACD,CAAC,CAAC","sourcesContent":["import {createTRPCRouter, publicProcedure} from '@lyxa.ai/core/dist/libraries/trpc';\nimport {ErrorHandler} from '@lyxa.ai/core/dist/utilities/error-handler';\nimport {response} from '@lyxa.ai/core/dist/utilities/response';\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: publicProcedure.output(ActiveTournamentResponseSchema).query(() =>\n\t\tErrorHandler.wrapAsync(async () => {\n\t\t\tconst result = await service.getActive();\n\t\t\treturn response('Active tournament fetched successfully', result);\n\t\t})\n\t),\n});\n"]}
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;AAGpE,qBACa,iBAAiB;IAC7B,OAAO,CAAC,UAAU,CAA6B;;IAMlC,SAAS,IAAI,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC;CAGnE;AAED,eAAO,MAAM,iBAAiB,mBAAmC,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
- return this.repository.findActive();
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;AAE5C,kEAAwE;AAGjE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACrB,UAAU,CAA6B;IAE/C;QACC,IAAI,CAAC,UAAU,GAAG,gBAAS,CAAC,GAAG,CAAC,8CAA0B,CAAC,CAAC;IAC7D,CAAC;IAEM,KAAK,CAAC,SAAS;QACrB,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,EAA+C,CAAC;IAClF,CAAC;CACD,CAAA;AAVY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,gBAAO,GAAE;;GACG,iBAAiB,CAU7B;AAEY,QAAA,iBAAiB,GAAG,gBAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import Container, { Service } from 'typedi';\nimport { ActiveTournamentOutputDTO } from './tournament.validation';\nimport { TournamentConfigRepository } from './config/config.repository';\n\n@Service()\nexport class TournamentService {\n\tprivate repository: TournamentConfigRepository;\n\n\tconstructor() {\n\t\tthis.repository = Container.get(TournamentConfigRepository);\n\t}\n\n\tpublic async getActive(): Promise<ActiveTournamentOutputDTO | null> {\n\t\treturn this.repository.findActive() as Promise<ActiveTournamentOutputDTO | null>;\n\t}\n}\n\nexport const tournamentService = Container.get(TournamentService);\n"]}
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"]}
@@ -1,9 +1,11 @@
1
- export declare enum TournamentTag {
2
- FOOTBALL_WORLD_CUP = "world-cup"
3
- }
4
1
  export declare enum MatchStatus {
5
2
  UPCOMING = "upcoming",
6
3
  STARTED = "started",
7
4
  ENDED = "ended"
8
5
  }
6
+ export declare enum TournamentParticipantStatus {
7
+ JOINED = "joined",
8
+ SEEN = "seen",
9
+ NOT_SEEN = "not_seen"
10
+ }
9
11
  //# sourceMappingURL=tournament.types.d.ts.map
@@ -1 +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"}
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,14 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MatchStatus = exports.TournamentTag = void 0;
4
- var TournamentTag;
5
- (function (TournamentTag) {
6
- TournamentTag["FOOTBALL_WORLD_CUP"] = "world-cup";
7
- })(TournamentTag || (exports.TournamentTag = TournamentTag = {}));
3
+ exports.TournamentParticipantStatus = exports.MatchStatus = void 0;
8
4
  var MatchStatus;
9
5
  (function (MatchStatus) {
10
6
  MatchStatus["UPCOMING"] = "upcoming";
11
7
  MatchStatus["STARTED"] = "started";
12
8
  MatchStatus["ENDED"] = "ended";
13
9
  })(MatchStatus || (exports.MatchStatus = MatchStatus = {}));
10
+ var TournamentParticipantStatus;
11
+ (function (TournamentParticipantStatus) {
12
+ TournamentParticipantStatus["JOINED"] = "joined";
13
+ TournamentParticipantStatus["SEEN"] = "seen";
14
+ TournamentParticipantStatus["NOT_SEEN"] = "not_seen";
15
+ })(TournamentParticipantStatus || (exports.TournamentParticipantStatus = TournamentParticipantStatus = {}));
14
16
  //# sourceMappingURL=tournament.types.js.map
@@ -1 +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","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"]}
1
+ {"version":3,"file":"tournament.types.js","sourceRoot":"/","sources":["modules/tournament/tournament.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;AACnB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAED,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACnC,gDAAiB,CAAA;IACjB,4CAAa,CAAA;IACb,oDAAqB,CAAA;AACzB,CAAC,EAJW,2BAA2B,2CAA3B,2BAA2B,QAItC","sourcesContent":["export enum MatchStatus {\n UPCOMING = 'upcoming',\n STARTED = 'started',\n ENDED = 'ended',\n}\n\nexport enum TournamentParticipantStatus {\n JOINED = 'joined',\n SEEN = 'seen',\n NOT_SEEN = 'not_seen',\n}\n"]}
@@ -1,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;AAG/F,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0D,CAAC;AAEtG,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,OAAO,sBAAsB,CAAC,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;AAElE,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;CACvC,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';\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});\n\nexport const ActiveTournamentResponseSchema = createResponseSchema(ActiveTournamentSchema.nullable());\n\nexport type ActiveTournamentOutputDTO = DTO<typeof ActiveTournamentSchema>;\n"]}
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"]}