rategame-shared 1.1.328 → 1.1.330
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/models/rating.d.ts +2 -1
- package/dist/schemas/notification.d.ts +87 -0
- package/dist/schemas/rating.d.ts +173 -0
- package/dist/schemas/rating.js +21 -1
- package/package.json +1 -1
package/dist/models/rating.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { createAgreeRatingSchema, createRatingSchema, profileRatingStatsSchema, ratingCategorySchema, ratingLikeSchema, ratingMiniPickSchema, ratingSchema, roundStatsSchema, searchRatingSchema, seasonGroupStatsSchema, seasonStatsSchema, seriesStatsSchema, threadCommentLikeSchema, threadCommentSchema } from "../schemas/rating";
|
|
2
|
+
import { createAgreeRatingSchema, createRatingSchema, profileRatingStatsSchema, ratingCategorySchema, ratingLikeSchema, ratingMiniEventSchema, ratingMiniPickSchema, ratingSchema, roundStatsSchema, searchRatingSchema, seasonGroupStatsSchema, seasonStatsSchema, seriesStatsSchema, threadCommentLikeSchema, threadCommentSchema } from "../schemas/rating";
|
|
3
3
|
import { seasonGroupingSchema } from "../schemas/sharedTypes";
|
|
4
4
|
export type Rating = z.infer<typeof ratingSchema>;
|
|
5
5
|
export type RatingMiniPick = z.infer<typeof ratingMiniPickSchema>;
|
|
6
|
+
export type RatingMiniEvent = z.infer<typeof ratingMiniEventSchema>;
|
|
6
7
|
export type RatingCategory = z.infer<typeof ratingCategorySchema>;
|
|
7
8
|
export type ProfileRatingStats = z.infer<typeof profileRatingStatsSchema>;
|
|
8
9
|
export type SeasonStats = z.infer<typeof seasonStatsSchema>;
|
|
@@ -359,6 +359,49 @@ export declare const internalNotification: z.ZodObject<{
|
|
|
359
359
|
pickCount?: number | undefined;
|
|
360
360
|
};
|
|
361
361
|
}>>;
|
|
362
|
+
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
363
|
+
id: z.ZodString;
|
|
364
|
+
eventType: z.ZodUnion<[z.ZodLiteral<"achievement">, z.ZodLiteral<"streak">, z.ZodLiteral<"rating_milestone">]>;
|
|
365
|
+
eventData: z.ZodObject<{
|
|
366
|
+
achievementId: z.ZodOptional<z.ZodString>;
|
|
367
|
+
achievementName: z.ZodOptional<z.ZodString>;
|
|
368
|
+
tier: z.ZodOptional<z.ZodNumber>;
|
|
369
|
+
streakNumber: z.ZodOptional<z.ZodNumber>;
|
|
370
|
+
ratingCount: z.ZodOptional<z.ZodNumber>;
|
|
371
|
+
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
achievementId?: string | undefined;
|
|
373
|
+
achievementName?: string | undefined;
|
|
374
|
+
tier?: number | undefined;
|
|
375
|
+
streakNumber?: number | undefined;
|
|
376
|
+
ratingCount?: number | undefined;
|
|
377
|
+
}, {
|
|
378
|
+
achievementId?: string | undefined;
|
|
379
|
+
achievementName?: string | undefined;
|
|
380
|
+
tier?: number | undefined;
|
|
381
|
+
streakNumber?: number | undefined;
|
|
382
|
+
ratingCount?: number | undefined;
|
|
383
|
+
}>;
|
|
384
|
+
}, "strip", z.ZodTypeAny, {
|
|
385
|
+
id: string;
|
|
386
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
387
|
+
eventData: {
|
|
388
|
+
achievementId?: string | undefined;
|
|
389
|
+
achievementName?: string | undefined;
|
|
390
|
+
tier?: number | undefined;
|
|
391
|
+
streakNumber?: number | undefined;
|
|
392
|
+
ratingCount?: number | undefined;
|
|
393
|
+
};
|
|
394
|
+
}, {
|
|
395
|
+
id: string;
|
|
396
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
397
|
+
eventData: {
|
|
398
|
+
achievementId?: string | undefined;
|
|
399
|
+
achievementName?: string | undefined;
|
|
400
|
+
tier?: number | undefined;
|
|
401
|
+
streakNumber?: number | undefined;
|
|
402
|
+
ratingCount?: number | undefined;
|
|
403
|
+
};
|
|
404
|
+
}>, "many">>;
|
|
362
405
|
}, "strip", z.ZodTypeAny, {
|
|
363
406
|
id: string;
|
|
364
407
|
user: {
|
|
@@ -448,6 +491,17 @@ export declare const internalNotification: z.ZodObject<{
|
|
|
448
491
|
edited?: boolean | undefined;
|
|
449
492
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
450
493
|
userLocation?: string | null | undefined;
|
|
494
|
+
events?: {
|
|
495
|
+
id: string;
|
|
496
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
497
|
+
eventData: {
|
|
498
|
+
achievementId?: string | undefined;
|
|
499
|
+
achievementName?: string | undefined;
|
|
500
|
+
tier?: number | undefined;
|
|
501
|
+
streakNumber?: number | undefined;
|
|
502
|
+
ratingCount?: number | undefined;
|
|
503
|
+
};
|
|
504
|
+
}[] | undefined;
|
|
451
505
|
}, {
|
|
452
506
|
id: string;
|
|
453
507
|
user: {
|
|
@@ -537,6 +591,17 @@ export declare const internalNotification: z.ZodObject<{
|
|
|
537
591
|
edited?: boolean | undefined;
|
|
538
592
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
539
593
|
userLocation?: string | null | undefined;
|
|
594
|
+
events?: {
|
|
595
|
+
id: string;
|
|
596
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
597
|
+
eventData: {
|
|
598
|
+
achievementId?: string | undefined;
|
|
599
|
+
achievementName?: string | undefined;
|
|
600
|
+
tier?: number | undefined;
|
|
601
|
+
streakNumber?: number | undefined;
|
|
602
|
+
ratingCount?: number | undefined;
|
|
603
|
+
};
|
|
604
|
+
}[] | undefined;
|
|
540
605
|
}>>;
|
|
541
606
|
}, "strip", z.ZodTypeAny, {
|
|
542
607
|
id: string;
|
|
@@ -643,6 +708,17 @@ export declare const internalNotification: z.ZodObject<{
|
|
|
643
708
|
edited?: boolean | undefined;
|
|
644
709
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
645
710
|
userLocation?: string | null | undefined;
|
|
711
|
+
events?: {
|
|
712
|
+
id: string;
|
|
713
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
714
|
+
eventData: {
|
|
715
|
+
achievementId?: string | undefined;
|
|
716
|
+
achievementName?: string | undefined;
|
|
717
|
+
tier?: number | undefined;
|
|
718
|
+
streakNumber?: number | undefined;
|
|
719
|
+
ratingCount?: number | undefined;
|
|
720
|
+
};
|
|
721
|
+
}[] | undefined;
|
|
646
722
|
} | undefined;
|
|
647
723
|
linkText?: string | undefined;
|
|
648
724
|
}, {
|
|
@@ -750,6 +826,17 @@ export declare const internalNotification: z.ZodObject<{
|
|
|
750
826
|
edited?: boolean | undefined;
|
|
751
827
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
752
828
|
userLocation?: string | null | undefined;
|
|
829
|
+
events?: {
|
|
830
|
+
id: string;
|
|
831
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
832
|
+
eventData: {
|
|
833
|
+
achievementId?: string | undefined;
|
|
834
|
+
achievementName?: string | undefined;
|
|
835
|
+
tier?: number | undefined;
|
|
836
|
+
streakNumber?: number | undefined;
|
|
837
|
+
ratingCount?: number | undefined;
|
|
838
|
+
};
|
|
839
|
+
}[] | undefined;
|
|
753
840
|
} | undefined;
|
|
754
841
|
linkText?: string | undefined;
|
|
755
842
|
}>;
|
package/dist/schemas/rating.d.ts
CHANGED
|
@@ -83,6 +83,49 @@ export declare const ratingMiniPickSchema: import("zod").ZodObject<{
|
|
|
83
83
|
pickCount?: number | undefined;
|
|
84
84
|
};
|
|
85
85
|
}>;
|
|
86
|
+
export declare const ratingMiniEventSchema: import("zod").ZodObject<{
|
|
87
|
+
id: import("zod").ZodString;
|
|
88
|
+
eventType: import("zod").ZodUnion<[import("zod").ZodLiteral<"achievement">, import("zod").ZodLiteral<"streak">, import("zod").ZodLiteral<"rating_milestone">]>;
|
|
89
|
+
eventData: import("zod").ZodObject<{
|
|
90
|
+
achievementId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
91
|
+
achievementName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
92
|
+
tier: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
93
|
+
streakNumber: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
94
|
+
ratingCount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
95
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
96
|
+
achievementId?: string | undefined;
|
|
97
|
+
achievementName?: string | undefined;
|
|
98
|
+
tier?: number | undefined;
|
|
99
|
+
streakNumber?: number | undefined;
|
|
100
|
+
ratingCount?: number | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
achievementId?: string | undefined;
|
|
103
|
+
achievementName?: string | undefined;
|
|
104
|
+
tier?: number | undefined;
|
|
105
|
+
streakNumber?: number | undefined;
|
|
106
|
+
ratingCount?: number | undefined;
|
|
107
|
+
}>;
|
|
108
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
109
|
+
id: string;
|
|
110
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
111
|
+
eventData: {
|
|
112
|
+
achievementId?: string | undefined;
|
|
113
|
+
achievementName?: string | undefined;
|
|
114
|
+
tier?: number | undefined;
|
|
115
|
+
streakNumber?: number | undefined;
|
|
116
|
+
ratingCount?: number | undefined;
|
|
117
|
+
};
|
|
118
|
+
}, {
|
|
119
|
+
id: string;
|
|
120
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
121
|
+
eventData: {
|
|
122
|
+
achievementId?: string | undefined;
|
|
123
|
+
achievementName?: string | undefined;
|
|
124
|
+
tier?: number | undefined;
|
|
125
|
+
streakNumber?: number | undefined;
|
|
126
|
+
ratingCount?: number | undefined;
|
|
127
|
+
};
|
|
128
|
+
}>;
|
|
86
129
|
export declare const ratingCategorySchema: import("zod").ZodUnion<[import("zod").ZodLiteral<"watched">, import("zod").ZodLiteral<"attended">, import("zod").ZodLiteral<"highlights">, import("zod").ZodLiteral<"listened">, import("zod").ZodLiteral<"partiallyWatched">]>;
|
|
87
130
|
export declare const ratingSchema: import("zod").ZodObject<{
|
|
88
131
|
id: import("zod").ZodString;
|
|
@@ -415,6 +458,49 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
415
458
|
pickCount?: number | undefined;
|
|
416
459
|
};
|
|
417
460
|
}>>;
|
|
461
|
+
events: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
462
|
+
id: import("zod").ZodString;
|
|
463
|
+
eventType: import("zod").ZodUnion<[import("zod").ZodLiteral<"achievement">, import("zod").ZodLiteral<"streak">, import("zod").ZodLiteral<"rating_milestone">]>;
|
|
464
|
+
eventData: import("zod").ZodObject<{
|
|
465
|
+
achievementId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
466
|
+
achievementName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
467
|
+
tier: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
468
|
+
streakNumber: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
469
|
+
ratingCount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
470
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
471
|
+
achievementId?: string | undefined;
|
|
472
|
+
achievementName?: string | undefined;
|
|
473
|
+
tier?: number | undefined;
|
|
474
|
+
streakNumber?: number | undefined;
|
|
475
|
+
ratingCount?: number | undefined;
|
|
476
|
+
}, {
|
|
477
|
+
achievementId?: string | undefined;
|
|
478
|
+
achievementName?: string | undefined;
|
|
479
|
+
tier?: number | undefined;
|
|
480
|
+
streakNumber?: number | undefined;
|
|
481
|
+
ratingCount?: number | undefined;
|
|
482
|
+
}>;
|
|
483
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
484
|
+
id: string;
|
|
485
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
486
|
+
eventData: {
|
|
487
|
+
achievementId?: string | undefined;
|
|
488
|
+
achievementName?: string | undefined;
|
|
489
|
+
tier?: number | undefined;
|
|
490
|
+
streakNumber?: number | undefined;
|
|
491
|
+
ratingCount?: number | undefined;
|
|
492
|
+
};
|
|
493
|
+
}, {
|
|
494
|
+
id: string;
|
|
495
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
496
|
+
eventData: {
|
|
497
|
+
achievementId?: string | undefined;
|
|
498
|
+
achievementName?: string | undefined;
|
|
499
|
+
tier?: number | undefined;
|
|
500
|
+
streakNumber?: number | undefined;
|
|
501
|
+
ratingCount?: number | undefined;
|
|
502
|
+
};
|
|
503
|
+
}>, "many">>;
|
|
418
504
|
}, "strip", import("zod").ZodTypeAny, {
|
|
419
505
|
id: string;
|
|
420
506
|
user: {
|
|
@@ -504,6 +590,17 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
504
590
|
edited?: boolean | undefined;
|
|
505
591
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
506
592
|
userLocation?: string | null | undefined;
|
|
593
|
+
events?: {
|
|
594
|
+
id: string;
|
|
595
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
596
|
+
eventData: {
|
|
597
|
+
achievementId?: string | undefined;
|
|
598
|
+
achievementName?: string | undefined;
|
|
599
|
+
tier?: number | undefined;
|
|
600
|
+
streakNumber?: number | undefined;
|
|
601
|
+
ratingCount?: number | undefined;
|
|
602
|
+
};
|
|
603
|
+
}[] | undefined;
|
|
507
604
|
}, {
|
|
508
605
|
id: string;
|
|
509
606
|
user: {
|
|
@@ -593,6 +690,17 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
593
690
|
edited?: boolean | undefined;
|
|
594
691
|
category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
|
|
595
692
|
userLocation?: string | null | undefined;
|
|
693
|
+
events?: {
|
|
694
|
+
id: string;
|
|
695
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
696
|
+
eventData: {
|
|
697
|
+
achievementId?: string | undefined;
|
|
698
|
+
achievementName?: string | undefined;
|
|
699
|
+
tier?: number | undefined;
|
|
700
|
+
streakNumber?: number | undefined;
|
|
701
|
+
ratingCount?: number | undefined;
|
|
702
|
+
};
|
|
703
|
+
}[] | undefined;
|
|
596
704
|
}>;
|
|
597
705
|
export declare const searchRatingSchema: import("zod").ZodObject<{
|
|
598
706
|
q: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1052,6 +1160,49 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
|
|
|
1052
1160
|
pickCount?: number | undefined;
|
|
1053
1161
|
};
|
|
1054
1162
|
}>>;
|
|
1163
|
+
events: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1164
|
+
id: import("zod").ZodString;
|
|
1165
|
+
eventType: import("zod").ZodUnion<[import("zod").ZodLiteral<"achievement">, import("zod").ZodLiteral<"streak">, import("zod").ZodLiteral<"rating_milestone">]>;
|
|
1166
|
+
eventData: import("zod").ZodObject<{
|
|
1167
|
+
achievementId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1168
|
+
achievementName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1169
|
+
tier: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1170
|
+
streakNumber: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1171
|
+
ratingCount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1172
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
1173
|
+
achievementId?: string | undefined;
|
|
1174
|
+
achievementName?: string | undefined;
|
|
1175
|
+
tier?: number | undefined;
|
|
1176
|
+
streakNumber?: number | undefined;
|
|
1177
|
+
ratingCount?: number | undefined;
|
|
1178
|
+
}, {
|
|
1179
|
+
achievementId?: string | undefined;
|
|
1180
|
+
achievementName?: string | undefined;
|
|
1181
|
+
tier?: number | undefined;
|
|
1182
|
+
streakNumber?: number | undefined;
|
|
1183
|
+
ratingCount?: number | undefined;
|
|
1184
|
+
}>;
|
|
1185
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
1186
|
+
id: string;
|
|
1187
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
1188
|
+
eventData: {
|
|
1189
|
+
achievementId?: string | undefined;
|
|
1190
|
+
achievementName?: string | undefined;
|
|
1191
|
+
tier?: number | undefined;
|
|
1192
|
+
streakNumber?: number | undefined;
|
|
1193
|
+
ratingCount?: number | undefined;
|
|
1194
|
+
};
|
|
1195
|
+
}, {
|
|
1196
|
+
id: string;
|
|
1197
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
1198
|
+
eventData: {
|
|
1199
|
+
achievementId?: string | undefined;
|
|
1200
|
+
achievementName?: string | undefined;
|
|
1201
|
+
tier?: number | undefined;
|
|
1202
|
+
streakNumber?: number | undefined;
|
|
1203
|
+
ratingCount?: number | undefined;
|
|
1204
|
+
};
|
|
1205
|
+
}>, "many">>;
|
|
1055
1206
|
}, "id" | "user" | "createdAt">, {
|
|
1056
1207
|
game: import("zod").ZodObject<Omit<{
|
|
1057
1208
|
id: import("zod").ZodString;
|
|
@@ -1244,6 +1395,17 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
|
|
|
1244
1395
|
edited?: boolean | undefined;
|
|
1245
1396
|
category?: "" | "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | null | undefined;
|
|
1246
1397
|
userLocation?: string | null | undefined;
|
|
1398
|
+
events?: {
|
|
1399
|
+
id: string;
|
|
1400
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
1401
|
+
eventData: {
|
|
1402
|
+
achievementId?: string | undefined;
|
|
1403
|
+
achievementName?: string | undefined;
|
|
1404
|
+
tier?: number | undefined;
|
|
1405
|
+
streakNumber?: number | undefined;
|
|
1406
|
+
ratingCount?: number | undefined;
|
|
1407
|
+
};
|
|
1408
|
+
}[] | undefined;
|
|
1247
1409
|
}, {
|
|
1248
1410
|
rating: number;
|
|
1249
1411
|
game: {
|
|
@@ -1290,6 +1452,17 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
|
|
|
1290
1452
|
edited?: boolean | undefined;
|
|
1291
1453
|
category?: "" | "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | null | undefined;
|
|
1292
1454
|
userLocation?: string | null | undefined;
|
|
1455
|
+
events?: {
|
|
1456
|
+
id: string;
|
|
1457
|
+
eventType: "streak" | "achievement" | "rating_milestone";
|
|
1458
|
+
eventData: {
|
|
1459
|
+
achievementId?: string | undefined;
|
|
1460
|
+
achievementName?: string | undefined;
|
|
1461
|
+
tier?: number | undefined;
|
|
1462
|
+
streakNumber?: number | undefined;
|
|
1463
|
+
ratingCount?: number | undefined;
|
|
1464
|
+
};
|
|
1465
|
+
}[] | undefined;
|
|
1293
1466
|
}>;
|
|
1294
1467
|
export declare const threadCommentSchema: import("zod").ZodObject<{
|
|
1295
1468
|
id: import("zod").ZodString;
|
package/dist/schemas/rating.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.seriesStatsSchema = exports.roundStatsSchema = exports.seasonGroupStatsSchema = exports.seasonStatsSchema = exports.profileRatingStatsSchema = exports.threadCommentLikeSchema = exports.threadCommentSchema = exports.createRatingSchema = exports.createAgreeRatingSchema = exports.ratingLikeSchema = exports.searchRatingSchema = exports.ratingSchema = exports.ratingCategorySchema = exports.ratingMiniPickSchema = void 0;
|
|
3
|
+
exports.seriesStatsSchema = exports.roundStatsSchema = exports.seasonGroupStatsSchema = exports.seasonStatsSchema = exports.profileRatingStatsSchema = exports.threadCommentLikeSchema = exports.threadCommentSchema = exports.createRatingSchema = exports.createAgreeRatingSchema = exports.ratingLikeSchema = exports.searchRatingSchema = exports.ratingSchema = exports.ratingCategorySchema = exports.ratingMiniEventSchema = exports.ratingMiniPickSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const game_1 = require("./game");
|
|
6
6
|
const user_1 = require("./user");
|
|
@@ -10,6 +10,25 @@ exports.ratingMiniPickSchema = (0, zod_1.object)({
|
|
|
10
10
|
id: (0, zod_1.string)(),
|
|
11
11
|
team: game_1.gameTeamSchema,
|
|
12
12
|
});
|
|
13
|
+
// Mini event schema for attaching event info to ratings
|
|
14
|
+
exports.ratingMiniEventSchema = (0, zod_1.object)({
|
|
15
|
+
id: (0, zod_1.string)(),
|
|
16
|
+
eventType: (0, zod_1.union)([
|
|
17
|
+
(0, zod_1.literal)("achievement"),
|
|
18
|
+
(0, zod_1.literal)("streak"),
|
|
19
|
+
(0, zod_1.literal)("rating_milestone"),
|
|
20
|
+
]),
|
|
21
|
+
eventData: (0, zod_1.object)({
|
|
22
|
+
// For achievements
|
|
23
|
+
achievementId: (0, zod_1.string)().optional(),
|
|
24
|
+
achievementName: (0, zod_1.string)().optional(),
|
|
25
|
+
tier: (0, zod_1.number)().optional(),
|
|
26
|
+
// For streaks
|
|
27
|
+
streakNumber: (0, zod_1.number)().optional(),
|
|
28
|
+
// For rating milestones
|
|
29
|
+
ratingCount: (0, zod_1.number)().optional(),
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
13
32
|
exports.ratingCategorySchema = (0, zod_1.union)([
|
|
14
33
|
(0, zod_1.literal)("watched"),
|
|
15
34
|
(0, zod_1.literal)("attended"),
|
|
@@ -59,6 +78,7 @@ exports.ratingSchema = (0, zod_1.object)({
|
|
|
59
78
|
category: exports.ratingCategorySchema.optional(),
|
|
60
79
|
userLocation: (0, zod_1.string)().optional().nullable(),
|
|
61
80
|
pick: exports.ratingMiniPickSchema.optional(),
|
|
81
|
+
events: (0, zod_1.array)(exports.ratingMiniEventSchema).optional(),
|
|
62
82
|
});
|
|
63
83
|
exports.searchRatingSchema = (0, zod_1.object)({
|
|
64
84
|
q: (0, zod_1.string)().optional(),
|