@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
|
@@ -130,22 +130,28 @@ export declare const TournamentMatchSchema: z.ZodObject<{
|
|
|
130
130
|
team1: z.ZodObject<{
|
|
131
131
|
teamId: 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>]>;
|
|
132
132
|
name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
133
|
+
picture: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
133
134
|
}, "strip", z.ZodTypeAny, {
|
|
134
135
|
name: string;
|
|
135
136
|
teamId: import("mongoose").Types.ObjectId;
|
|
137
|
+
picture?: string | undefined;
|
|
136
138
|
}, {
|
|
137
139
|
name: string;
|
|
138
140
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
141
|
+
picture?: string | undefined;
|
|
139
142
|
}>;
|
|
140
143
|
team2: z.ZodObject<{
|
|
141
144
|
teamId: 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>]>;
|
|
142
145
|
name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
146
|
+
picture: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
143
147
|
}, "strip", z.ZodTypeAny, {
|
|
144
148
|
name: string;
|
|
145
149
|
teamId: import("mongoose").Types.ObjectId;
|
|
150
|
+
picture?: string | undefined;
|
|
146
151
|
}, {
|
|
147
152
|
name: string;
|
|
148
153
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
154
|
+
picture?: string | undefined;
|
|
149
155
|
}>;
|
|
150
156
|
score: z.ZodObject<{
|
|
151
157
|
team1: z.ZodNullable<z.ZodNumber>;
|
|
@@ -190,10 +196,12 @@ export declare const TournamentMatchSchema: z.ZodObject<{
|
|
|
190
196
|
team1: {
|
|
191
197
|
name: string;
|
|
192
198
|
teamId: import("mongoose").Types.ObjectId;
|
|
199
|
+
picture?: string | undefined;
|
|
193
200
|
};
|
|
194
201
|
team2: {
|
|
195
202
|
name: string;
|
|
196
203
|
teamId: import("mongoose").Types.ObjectId;
|
|
204
|
+
picture?: string | undefined;
|
|
197
205
|
};
|
|
198
206
|
score: {
|
|
199
207
|
team1: number | null;
|
|
@@ -216,10 +224,12 @@ export declare const TournamentMatchSchema: z.ZodObject<{
|
|
|
216
224
|
team1: {
|
|
217
225
|
name: string;
|
|
218
226
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
227
|
+
picture?: string | undefined;
|
|
219
228
|
};
|
|
220
229
|
team2: {
|
|
221
230
|
name: string;
|
|
222
231
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
232
|
+
picture?: string | undefined;
|
|
223
233
|
};
|
|
224
234
|
score: {
|
|
225
235
|
team1: number | null;
|
|
@@ -263,10 +273,12 @@ export declare const TournamentMatchResponseSchema: z.ZodObject<{
|
|
|
263
273
|
team1: {
|
|
264
274
|
name: string;
|
|
265
275
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
276
|
+
picture?: string | undefined;
|
|
266
277
|
};
|
|
267
278
|
team2: {
|
|
268
279
|
name: string;
|
|
269
280
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
281
|
+
picture?: string | undefined;
|
|
270
282
|
};
|
|
271
283
|
score: {
|
|
272
284
|
team1: number | null;
|
|
@@ -289,10 +301,12 @@ export declare const TournamentMatchResponseSchema: z.ZodObject<{
|
|
|
289
301
|
team1: {
|
|
290
302
|
name: string;
|
|
291
303
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
304
|
+
picture?: string | undefined;
|
|
292
305
|
};
|
|
293
306
|
team2: {
|
|
294
307
|
name: string;
|
|
295
308
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
309
|
+
picture?: string | undefined;
|
|
296
310
|
};
|
|
297
311
|
score: {
|
|
298
312
|
team1: number | null;
|
|
@@ -317,10 +331,12 @@ export declare const TournamentMatchResponseSchema: z.ZodObject<{
|
|
|
317
331
|
team1: {
|
|
318
332
|
name: string;
|
|
319
333
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
334
|
+
picture?: string | undefined;
|
|
320
335
|
};
|
|
321
336
|
team2: {
|
|
322
337
|
name: string;
|
|
323
338
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
339
|
+
picture?: string | undefined;
|
|
324
340
|
};
|
|
325
341
|
score: {
|
|
326
342
|
team1: number | null;
|
|
@@ -351,10 +367,12 @@ export declare const TournamentMatchResponseSchema: z.ZodObject<{
|
|
|
351
367
|
team1: {
|
|
352
368
|
name: string;
|
|
353
369
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
370
|
+
picture?: string | undefined;
|
|
354
371
|
};
|
|
355
372
|
team2: {
|
|
356
373
|
name: string;
|
|
357
374
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
375
|
+
picture?: string | undefined;
|
|
358
376
|
};
|
|
359
377
|
score: {
|
|
360
378
|
team1: number | null;
|
|
@@ -384,10 +402,12 @@ export declare const TournamentMatchResponseSchema: z.ZodObject<{
|
|
|
384
402
|
team1: {
|
|
385
403
|
name: string;
|
|
386
404
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
405
|
+
picture?: string | undefined;
|
|
387
406
|
};
|
|
388
407
|
team2: {
|
|
389
408
|
name: string;
|
|
390
409
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
410
|
+
picture?: string | undefined;
|
|
391
411
|
};
|
|
392
412
|
score: {
|
|
393
413
|
team1: number | null;
|
|
@@ -410,10 +430,12 @@ export declare const TournamentMatchResponseSchema: z.ZodObject<{
|
|
|
410
430
|
team1: {
|
|
411
431
|
name: string;
|
|
412
432
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
433
|
+
picture?: string | undefined;
|
|
413
434
|
};
|
|
414
435
|
team2: {
|
|
415
436
|
name: string;
|
|
416
437
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
438
|
+
picture?: string | undefined;
|
|
417
439
|
};
|
|
418
440
|
score: {
|
|
419
441
|
team1: number | null;
|
|
@@ -440,10 +462,12 @@ export declare const TournamentMatchResponseSchema: z.ZodObject<{
|
|
|
440
462
|
team1: {
|
|
441
463
|
name: string;
|
|
442
464
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
465
|
+
picture?: string | undefined;
|
|
443
466
|
};
|
|
444
467
|
team2: {
|
|
445
468
|
name: string;
|
|
446
469
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
470
|
+
picture?: string | undefined;
|
|
447
471
|
};
|
|
448
472
|
score: {
|
|
449
473
|
team1: number | null;
|
|
@@ -467,10 +491,12 @@ export declare const TournamentMatchResponseSchema: z.ZodObject<{
|
|
|
467
491
|
team1: {
|
|
468
492
|
name: string;
|
|
469
493
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
494
|
+
picture?: string | undefined;
|
|
470
495
|
};
|
|
471
496
|
team2: {
|
|
472
497
|
name: string;
|
|
473
498
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
499
|
+
picture?: string | undefined;
|
|
474
500
|
};
|
|
475
501
|
score: {
|
|
476
502
|
team1: number | null;
|
|
@@ -504,10 +530,12 @@ export declare const TournamentMatchResponseSchema: z.ZodObject<{
|
|
|
504
530
|
team1: {
|
|
505
531
|
name: string;
|
|
506
532
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
533
|
+
picture?: string | undefined;
|
|
507
534
|
};
|
|
508
535
|
team2: {
|
|
509
536
|
name: string;
|
|
510
537
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
538
|
+
picture?: string | undefined;
|
|
511
539
|
};
|
|
512
540
|
score: {
|
|
513
541
|
team1: number | null;
|
|
@@ -531,10 +559,12 @@ export declare const TournamentMatchResponseSchema: z.ZodObject<{
|
|
|
531
559
|
team1: {
|
|
532
560
|
name: string;
|
|
533
561
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
562
|
+
picture?: string | undefined;
|
|
534
563
|
};
|
|
535
564
|
team2: {
|
|
536
565
|
name: string;
|
|
537
566
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
567
|
+
picture?: string | undefined;
|
|
538
568
|
};
|
|
539
569
|
score: {
|
|
540
570
|
team1: number | null;
|
|
@@ -586,10 +616,12 @@ export declare const TournamentMatchListResponseSchema: z.ZodObject<{
|
|
|
586
616
|
team1: {
|
|
587
617
|
name: string;
|
|
588
618
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
619
|
+
picture?: string | undefined;
|
|
589
620
|
};
|
|
590
621
|
team2: {
|
|
591
622
|
name: string;
|
|
592
623
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
624
|
+
picture?: string | undefined;
|
|
593
625
|
};
|
|
594
626
|
score: {
|
|
595
627
|
team1: number | null;
|
|
@@ -612,10 +644,12 @@ export declare const TournamentMatchListResponseSchema: z.ZodObject<{
|
|
|
612
644
|
team1: {
|
|
613
645
|
name: string;
|
|
614
646
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
647
|
+
picture?: string | undefined;
|
|
615
648
|
};
|
|
616
649
|
team2: {
|
|
617
650
|
name: string;
|
|
618
651
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
652
|
+
picture?: string | undefined;
|
|
619
653
|
};
|
|
620
654
|
score: {
|
|
621
655
|
team1: number | null;
|
|
@@ -640,10 +674,12 @@ export declare const TournamentMatchListResponseSchema: z.ZodObject<{
|
|
|
640
674
|
team1: {
|
|
641
675
|
name: string;
|
|
642
676
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
677
|
+
picture?: string | undefined;
|
|
643
678
|
};
|
|
644
679
|
team2: {
|
|
645
680
|
name: string;
|
|
646
681
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
682
|
+
picture?: string | undefined;
|
|
647
683
|
};
|
|
648
684
|
score: {
|
|
649
685
|
team1: number | null;
|
|
@@ -674,10 +710,12 @@ export declare const TournamentMatchListResponseSchema: z.ZodObject<{
|
|
|
674
710
|
team1: {
|
|
675
711
|
name: string;
|
|
676
712
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
713
|
+
picture?: string | undefined;
|
|
677
714
|
};
|
|
678
715
|
team2: {
|
|
679
716
|
name: string;
|
|
680
717
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
718
|
+
picture?: string | undefined;
|
|
681
719
|
};
|
|
682
720
|
score: {
|
|
683
721
|
team1: number | null;
|
|
@@ -707,10 +745,12 @@ export declare const TournamentMatchListResponseSchema: z.ZodObject<{
|
|
|
707
745
|
team1: {
|
|
708
746
|
name: string;
|
|
709
747
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
748
|
+
picture?: string | undefined;
|
|
710
749
|
};
|
|
711
750
|
team2: {
|
|
712
751
|
name: string;
|
|
713
752
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
753
|
+
picture?: string | undefined;
|
|
714
754
|
};
|
|
715
755
|
score: {
|
|
716
756
|
team1: number | null;
|
|
@@ -733,10 +773,12 @@ export declare const TournamentMatchListResponseSchema: z.ZodObject<{
|
|
|
733
773
|
team1: {
|
|
734
774
|
name: string;
|
|
735
775
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
776
|
+
picture?: string | undefined;
|
|
736
777
|
};
|
|
737
778
|
team2: {
|
|
738
779
|
name: string;
|
|
739
780
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
781
|
+
picture?: string | undefined;
|
|
740
782
|
};
|
|
741
783
|
score: {
|
|
742
784
|
team1: number | null;
|
|
@@ -763,10 +805,12 @@ export declare const TournamentMatchListResponseSchema: z.ZodObject<{
|
|
|
763
805
|
team1: {
|
|
764
806
|
name: string;
|
|
765
807
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
808
|
+
picture?: string | undefined;
|
|
766
809
|
};
|
|
767
810
|
team2: {
|
|
768
811
|
name: string;
|
|
769
812
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
813
|
+
picture?: string | undefined;
|
|
770
814
|
};
|
|
771
815
|
score: {
|
|
772
816
|
team1: number | null;
|
|
@@ -790,10 +834,12 @@ export declare const TournamentMatchListResponseSchema: z.ZodObject<{
|
|
|
790
834
|
team1: {
|
|
791
835
|
name: string;
|
|
792
836
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
837
|
+
picture?: string | undefined;
|
|
793
838
|
};
|
|
794
839
|
team2: {
|
|
795
840
|
name: string;
|
|
796
841
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
842
|
+
picture?: string | undefined;
|
|
797
843
|
};
|
|
798
844
|
score: {
|
|
799
845
|
team1: number | null;
|
|
@@ -827,10 +873,12 @@ export declare const TournamentMatchListResponseSchema: z.ZodObject<{
|
|
|
827
873
|
team1: {
|
|
828
874
|
name: string;
|
|
829
875
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
876
|
+
picture?: string | undefined;
|
|
830
877
|
};
|
|
831
878
|
team2: {
|
|
832
879
|
name: string;
|
|
833
880
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
881
|
+
picture?: string | undefined;
|
|
834
882
|
};
|
|
835
883
|
score: {
|
|
836
884
|
team1: number | null;
|
|
@@ -854,10 +902,12 @@ export declare const TournamentMatchListResponseSchema: z.ZodObject<{
|
|
|
854
902
|
team1: {
|
|
855
903
|
name: string;
|
|
856
904
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
905
|
+
picture?: string | undefined;
|
|
857
906
|
};
|
|
858
907
|
team2: {
|
|
859
908
|
name: string;
|
|
860
909
|
teamId: string | import("mongoose").Types.ObjectId;
|
|
910
|
+
picture?: string | undefined;
|
|
861
911
|
};
|
|
862
912
|
score: {
|
|
863
913
|
team1: number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match.validation.d.ts","sourceRoot":"/","sources":["modules/tournament/match/match.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAiB,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"match.validation.d.ts","sourceRoot":"/","sources":["modules/tournament/match/match.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAiB,MAAM,2DAA2D,CAAC;AAqC/F,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGrC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;EAErC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOnC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA8C,CAAC;AACzF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAuD,CAAC;AAEtG,MAAM,MAAM,4BAA4B,GAAG,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAClF,MAAM,MAAM,4BAA4B,GAAG,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAClF,MAAM,MAAM,wBAAwB,GAAG,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC1E,MAAM,MAAM,0BAA0B,GAAG,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC9E,MAAM,MAAM,wBAAwB,GAAG,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -11,6 +11,7 @@ const MatchScoreSchema = zod_1.z.object({
|
|
|
11
11
|
const MatchTeamSchema = zod_1.z.object({
|
|
12
12
|
teamId: global_validation_1.ZodValidation.objectId('Team id'),
|
|
13
13
|
name: global_validation_1.ZodValidation.string('Team name'),
|
|
14
|
+
picture: global_validation_1.ZodValidation.string('Team picture').optional(),
|
|
14
15
|
});
|
|
15
16
|
const MatchPredictionSchema = zod_1.z.object({
|
|
16
17
|
score: MatchScoreSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match.validation.js","sourceRoot":"/","sources":["modules/tournament/match/match.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iGAA+F;AAC/F,wEAA+E;AAE/E,MAAM,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACjC,KAAK,EAAE,iCAAa,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;IACtD,KAAK,EAAE,iCAAa,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,MAAM,EAAE,iCAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;IACzC,IAAI,EAAE,iCAAa,CAAC,MAAM,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"match.validation.js","sourceRoot":"/","sources":["modules/tournament/match/match.validation.ts"],"names":[],"mappings":"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","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\nconst MatchScoreSchema = z.object({\n\tteam1: ZodValidation.number('Team 1 score').nullable(),\n\tteam2: ZodValidation.number('Team 2 score').nullable(),\n});\n\nconst MatchTeamSchema = z.object({\n\tteamId: ZodValidation.objectId('Team id'),\n\tname: ZodValidation.string('Team name'),\n\tpicture: ZodValidation.string('Team picture').optional(),\n});\n\nconst MatchPredictionSchema = z.object({\n\tscore: MatchScoreSchema,\n\tsucceeded: z.boolean().nullable().optional(),\n});\n\nconst MatchInputSchema = z\n\t.object({\n\t\tstage: ZodValidation.string('Stage'),\n\t\tteam1Id: ZodValidation.objectId('Team 1 id'),\n\t\tteam2Id: ZodValidation.objectId('Team 2 id'),\n\t\tstartingDate: ZodValidation.date('Starting date'),\n\t\tendDate: ZodValidation.date('End date').optional(),\n\t\tadditionalTag: ZodValidation.string('Additional tag').optional(),\n\t})\n\t.superRefine((d, ctx) => {\n\t\tif (d.team1Id.toString() === d.team2Id.toString()) {\n\t\t\tctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Teams must be different', path: ['team2Id'] });\n\t\t}\n\t\tif (d.endDate && d.endDate <= d.startingDate) {\n\t\t\tctx.addIssue({ code: z.ZodIssueCode.custom, message: 'End date must be after start date', path: ['endDate'] });\n\t\t}\n\t});\n\nexport const AddTournamentMatchesSchema = z.object({\n\ttournamentId: ZodValidation.objectId('Tournament id'),\n\tmatches: z.array(MatchInputSchema).min(1, 'At least one match is required'),\n});\n\nexport const GetTournamentMatchesSchema = z.object({\n\ttournamentId: ZodValidation.objectId('Tournament id'),\n});\n\nexport const UpdateMatchScoreSchema = z.object({\n\ttournamentId: ZodValidation.objectId('Tournament id'),\n\tmatchId: ZodValidation.objectId('Match id'),\n\tteam1Score: ZodValidation.number('Team 1 score', { min: 0, isInt: true }),\n\tteam2Score: ZodValidation.number('Team 2 score', { min: 0, isInt: true }),\n\twinnerId: ZodValidation.objectId('Winner id').optional(),\n});\n\nexport const StartTournamentMatchSchema = z.object({\n\ttournamentId: ZodValidation.objectId('Tournament id'),\n\tmatchId: ZodValidation.objectId('Match id'),\n});\n\nexport const EndTournamentMatchSchema = z.object({\n\ttournamentId: ZodValidation.objectId('Tournament id'),\n\tmatchId: ZodValidation.objectId('Match id'),\n\tfinalScore: z.object({\n\t\tteam1: ZodValidation.number('Team 1 score', {min: 0, isInt: true}),\n\t\tteam2: ZodValidation.number('Team 2 score', {min: 0, isInt: true}),\n\t}).optional(),\n});\n\nexport const TournamentMatchSchema = z.object({\n\t_id: ZodValidation.objectId(),\n\tadditionalTag: ZodValidation.string('Additional tag').optional(),\n\tstage: ZodValidation.string('Stage'),\n\tteam1: MatchTeamSchema,\n\tteam2: MatchTeamSchema,\n\tscore: MatchScoreSchema,\n\tprediction: MatchPredictionSchema.optional().nullable(),\n\twinnerId: ZodValidation.objectId('Winner id').nullable().optional(),\n\tstartingDate: z.date().nullable().optional(),\n\tendDate: z.date().nullable().optional(),\n});\n\nexport const TournamentMatchResponseSchema = createResponseSchema(TournamentMatchSchema);\nexport const TournamentMatchListResponseSchema = createResponseSchema(z.array(TournamentMatchSchema));\n\nexport type AddTournamentMatchesInputDTO = DTO<typeof AddTournamentMatchesSchema>;\nexport type StartTournamentMatchInputDTO = DTO<typeof StartTournamentMatchSchema>;\nexport type UpdateMatchScoreInputDTO = DTO<typeof UpdateMatchScoreSchema>;\nexport type EndTournamentMatchInputDTO = DTO<typeof EndTournamentMatchSchema>;\nexport type TournamentMatchOutputDTO = DTO<typeof TournamentMatchSchema>;\n"]}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { JobsOptions } from 'bullmq';
|
|
2
2
|
export declare const TOURNAMENT_NOTIFICATION_QUEUE = "tournament-match-notifications";
|
|
3
|
-
export declare enum TournamentNotificationJobName {
|
|
4
|
-
NOTIFY_3H_BEFORE = "notify-3h-before",
|
|
5
|
-
NOTIFY_15MIN_BEFORE = "notify-15min-before"
|
|
6
|
-
}
|
|
7
3
|
export interface TournamentNotificationJobData {
|
|
8
4
|
tournamentId: string;
|
|
9
5
|
matchId: string;
|
|
6
|
+
target: string;
|
|
10
7
|
}
|
|
11
|
-
export declare function addNotificationJob(name:
|
|
8
|
+
export declare function addNotificationJob(name: string, data: TournamentNotificationJobData, options: JobsOptions): Promise<void>;
|
|
12
9
|
export declare function removeNotificationJob(jobId: string): Promise<void>;
|
|
13
10
|
//# sourceMappingURL=notification.producer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TOURNAMENT_NOTIFICATION_QUEUE = void 0;
|
|
4
4
|
exports.addNotificationJob = addNotificationJob;
|
|
5
5
|
exports.removeNotificationJob = removeNotificationJob;
|
|
6
6
|
const core_1 = require("@lyxa.ai/core");
|
|
7
7
|
exports.TOURNAMENT_NOTIFICATION_QUEUE = 'tournament-match-notifications';
|
|
8
|
-
var TournamentNotificationJobName;
|
|
9
|
-
(function (TournamentNotificationJobName) {
|
|
10
|
-
TournamentNotificationJobName["NOTIFY_3H_BEFORE"] = "notify-3h-before";
|
|
11
|
-
TournamentNotificationJobName["NOTIFY_15MIN_BEFORE"] = "notify-15min-before";
|
|
12
|
-
})(TournamentNotificationJobName || (exports.TournamentNotificationJobName = TournamentNotificationJobName = {}));
|
|
13
8
|
let _queue = null;
|
|
14
9
|
function getQueue() {
|
|
15
10
|
if (!_queue) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.producer.js","sourceRoot":"/","sources":["modules/tournament/notification/jobs/notification.producer.ts"],"names":[],"mappings":";;;
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.worker.d.ts","sourceRoot":"/","sources":["modules/tournament/notification/jobs/notification.worker.ts"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -48,22 +48,28 @@ const typegoose_1 = require("@typegoose/typegoose");
|
|
|
48
48
|
const core_1 = require("@lyxa.ai/core");
|
|
49
49
|
const notification_producer_1 = require("./notification.producer");
|
|
50
50
|
const notification_service_1 = require("../notification.service");
|
|
51
|
+
const notification_template_repository_1 = require("../notification-template.repository");
|
|
52
|
+
const match_repository_1 = require("../../match/match.repository");
|
|
51
53
|
let TournamentNotificationWorker = class TournamentNotificationWorker {
|
|
52
54
|
notificationService;
|
|
55
|
+
templateRepository;
|
|
56
|
+
matchRepository;
|
|
53
57
|
constructor() {
|
|
54
58
|
this.notificationService = typedi_1.default.get(notification_service_1.TournamentNotificationService);
|
|
59
|
+
this.templateRepository = typedi_1.default.get(notification_template_repository_1.NotificationTemplateRepository);
|
|
60
|
+
this.matchRepository = typedi_1.default.get(match_repository_1.TournamentMatchRepository);
|
|
55
61
|
}
|
|
56
62
|
startWorker() {
|
|
57
63
|
(0, core_1.getLibraries)().getBullMQService().createWorker(notification_producer_1.TOURNAMENT_NOTIFICATION_QUEUE, async (job) => {
|
|
58
|
-
const { tournamentId, matchId } = job.data;
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
const { tournamentId, matchId, target } = job.data;
|
|
65
|
+
const tournamentObjId = new typegoose_1.mongoose.Types.ObjectId(tournamentId);
|
|
66
|
+
const matchObjId = new typegoose_1.mongoose.Types.ObjectId(matchId);
|
|
67
|
+
const alreadySent = await this.matchRepository.getNotificationFlag(tournamentObjId, matchObjId, job.name);
|
|
68
|
+
if (alreadySent)
|
|
69
|
+
return;
|
|
70
|
+
const templates = await this.templateRepository.findTemplates(tournamentObjId);
|
|
71
|
+
await this.notificationService.dispatchScheduledJob(job.name, target, templates, tournamentObjId, matchObjId);
|
|
72
|
+
await this.matchRepository.setNotificationFlag(tournamentObjId, matchObjId, job.name);
|
|
67
73
|
});
|
|
68
74
|
}
|
|
69
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.worker.js","sourceRoot":"/","sources":["modules/tournament/notification/jobs/notification.worker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
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"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { mongoose } from '@typegoose/typegoose';
|
|
2
|
+
import { NotificationMessage } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
3
|
+
export declare class NotificationTemplateRepository {
|
|
4
|
+
private model;
|
|
5
|
+
findTemplates(tournamentId: mongoose.Types.ObjectId): Promise<Map<string, NotificationMessage>>;
|
|
6
|
+
}
|
|
7
|
+
export declare const notificationTemplateRepository: NotificationTemplateRepository;
|
|
8
|
+
//# sourceMappingURL=notification-template.repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-template.repository.d.ts","sourceRoot":"/","sources":["modules/tournament/notification/notification-template.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAmB,MAAM,2CAA2C,CAAC;AAEjG,qBACa,8BAA8B;IACvC,OAAO,CAAC,KAAK,CAAmB;IAEnB,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CAM/G;AAED,eAAO,MAAM,8BAA8B,gCAAgD,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.notificationTemplateRepository = exports.NotificationTemplateRepository = void 0;
|
|
43
|
+
const typedi_1 = __importStar(require("typedi"));
|
|
44
|
+
const models_1 = require("@lyxa.ai/core/dist/libraries/mongo/models");
|
|
45
|
+
let NotificationTemplateRepository = class NotificationTemplateRepository {
|
|
46
|
+
model = models_1.TournamentModel;
|
|
47
|
+
async findTemplates(tournamentId) {
|
|
48
|
+
const doc = await this.model.findById(tournamentId, { notificationTemplates: 1 }).lean();
|
|
49
|
+
if (!doc)
|
|
50
|
+
throw new Error(`Tournament not found: ${tournamentId}`);
|
|
51
|
+
const raw = doc.notificationTemplates;
|
|
52
|
+
return new Map(Object.entries(raw ?? {}));
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.NotificationTemplateRepository = NotificationTemplateRepository;
|
|
56
|
+
exports.NotificationTemplateRepository = NotificationTemplateRepository = __decorate([
|
|
57
|
+
(0, typedi_1.Service)()
|
|
58
|
+
], NotificationTemplateRepository);
|
|
59
|
+
exports.notificationTemplateRepository = typedi_1.default.get(NotificationTemplateRepository);
|
|
60
|
+
//# sourceMappingURL=notification-template.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-template.repository.js","sourceRoot":"/","sources":["modules/tournament/notification/notification-template.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAE5C,sEAAiG;AAG1F,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAC/B,KAAK,GAAG,wBAAe,CAAC;IAEzB,KAAK,CAAC,aAAa,CAAC,YAAqC;QAC5D,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,EAAE,qBAAqB,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACzF,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,YAAY,EAAE,CAAC,CAAC;QACnE,MAAM,GAAG,GAAG,GAAG,CAAC,qBAAwE,CAAC;QACzF,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;CACJ,CAAA;AATY,wEAA8B;yCAA9B,8BAA8B;IAD1C,IAAA,gBAAO,GAAE;GACG,8BAA8B,CAS1C;AAEY,QAAA,8BAA8B,GAAG,gBAAS,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC","sourcesContent":["import Container, { Service } from 'typedi';\nimport { mongoose } from '@typegoose/typegoose';\nimport { NotificationMessage, TournamentModel } from '@lyxa.ai/core/dist/libraries/mongo/models';\n\n@Service()\nexport class NotificationTemplateRepository {\n private model = TournamentModel;\n\n public async findTemplates(tournamentId: mongoose.Types.ObjectId): Promise<Map<string, NotificationMessage>> {\n const doc = await this.model.findById(tournamentId, { notificationTemplates: 1 }).lean();\n if (!doc) throw new Error(`Tournament not found: ${tournamentId}`);\n const raw = doc.notificationTemplates as Record<string, NotificationMessage> | undefined;\n return new Map(Object.entries(raw ?? {}));\n }\n}\n\nexport const notificationTemplateRepository = Container.get(NotificationTemplateRepository);\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
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.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.config.d.ts","sourceRoot":"/","sources":["modules/tournament/notification/notification.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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.config.js","sourceRoot":"/","sources":["modules/tournament/notification/notification.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"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|