rategame-shared 1.1.327 → 1.1.329

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.
@@ -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
+ event: z.ZodOptional<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
+ }>>;
362
405
  }, "strip", z.ZodTypeAny, {
363
406
  id: string;
364
407
  user: {
@@ -418,6 +461,17 @@ export declare const internalNotification: z.ZodObject<{
418
461
  seasonType?: number | undefined;
419
462
  roundName?: string | undefined;
420
463
  };
464
+ event?: {
465
+ id: string;
466
+ eventType: "streak" | "achievement" | "rating_milestone";
467
+ eventData: {
468
+ achievementId?: string | undefined;
469
+ achievementName?: string | undefined;
470
+ tier?: number | undefined;
471
+ streakNumber?: number | undefined;
472
+ ratingCount?: number | undefined;
473
+ };
474
+ } | undefined;
421
475
  pick?: {
422
476
  id: string;
423
477
  team: {
@@ -507,6 +561,17 @@ export declare const internalNotification: z.ZodObject<{
507
561
  seasonType?: number | undefined;
508
562
  roundName?: string | undefined;
509
563
  };
564
+ event?: {
565
+ id: string;
566
+ eventType: "streak" | "achievement" | "rating_milestone";
567
+ eventData: {
568
+ achievementId?: string | undefined;
569
+ achievementName?: string | undefined;
570
+ tier?: number | undefined;
571
+ streakNumber?: number | undefined;
572
+ ratingCount?: number | undefined;
573
+ };
574
+ } | undefined;
510
575
  pick?: {
511
576
  id: string;
512
577
  team: {
@@ -613,6 +678,17 @@ export declare const internalNotification: z.ZodObject<{
613
678
  seasonType?: number | undefined;
614
679
  roundName?: string | undefined;
615
680
  };
681
+ event?: {
682
+ id: string;
683
+ eventType: "streak" | "achievement" | "rating_milestone";
684
+ eventData: {
685
+ achievementId?: string | undefined;
686
+ achievementName?: string | undefined;
687
+ tier?: number | undefined;
688
+ streakNumber?: number | undefined;
689
+ ratingCount?: number | undefined;
690
+ };
691
+ } | undefined;
616
692
  pick?: {
617
693
  id: string;
618
694
  team: {
@@ -720,6 +796,17 @@ export declare const internalNotification: z.ZodObject<{
720
796
  seasonType?: number | undefined;
721
797
  roundName?: string | undefined;
722
798
  };
799
+ event?: {
800
+ id: string;
801
+ eventType: "streak" | "achievement" | "rating_milestone";
802
+ eventData: {
803
+ achievementId?: string | undefined;
804
+ achievementName?: string | undefined;
805
+ tier?: number | undefined;
806
+ streakNumber?: number | undefined;
807
+ ratingCount?: number | undefined;
808
+ };
809
+ } | undefined;
723
810
  pick?: {
724
811
  id: string;
725
812
  team: {
@@ -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
+ event: import("zod").ZodOptional<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
+ }>>;
418
504
  }, "strip", import("zod").ZodTypeAny, {
419
505
  id: string;
420
506
  user: {
@@ -474,6 +560,17 @@ export declare const ratingSchema: import("zod").ZodObject<{
474
560
  seasonType?: number | undefined;
475
561
  roundName?: string | undefined;
476
562
  };
563
+ event?: {
564
+ id: string;
565
+ eventType: "streak" | "achievement" | "rating_milestone";
566
+ eventData: {
567
+ achievementId?: string | undefined;
568
+ achievementName?: string | undefined;
569
+ tier?: number | undefined;
570
+ streakNumber?: number | undefined;
571
+ ratingCount?: number | undefined;
572
+ };
573
+ } | undefined;
477
574
  pick?: {
478
575
  id: string;
479
576
  team: {
@@ -563,6 +660,17 @@ export declare const ratingSchema: import("zod").ZodObject<{
563
660
  seasonType?: number | undefined;
564
661
  roundName?: string | undefined;
565
662
  };
663
+ event?: {
664
+ id: string;
665
+ eventType: "streak" | "achievement" | "rating_milestone";
666
+ eventData: {
667
+ achievementId?: string | undefined;
668
+ achievementName?: string | undefined;
669
+ tier?: number | undefined;
670
+ streakNumber?: number | undefined;
671
+ ratingCount?: number | undefined;
672
+ };
673
+ } | undefined;
566
674
  pick?: {
567
675
  id: string;
568
676
  team: {
@@ -1052,6 +1160,49 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
1052
1160
  pickCount?: number | undefined;
1053
1161
  };
1054
1162
  }>>;
1163
+ event: import("zod").ZodOptional<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
+ }>>;
1055
1206
  }, "id" | "user" | "createdAt">, {
1056
1207
  game: import("zod").ZodObject<Omit<{
1057
1208
  id: import("zod").ZodString;
@@ -1214,6 +1365,17 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
1214
1365
  seasonType?: number | undefined;
1215
1366
  };
1216
1367
  id?: string | undefined;
1368
+ event?: {
1369
+ id: string;
1370
+ eventType: "streak" | "achievement" | "rating_milestone";
1371
+ eventData: {
1372
+ achievementId?: string | undefined;
1373
+ achievementName?: string | undefined;
1374
+ tier?: number | undefined;
1375
+ streakNumber?: number | undefined;
1376
+ ratingCount?: number | undefined;
1377
+ };
1378
+ } | undefined;
1217
1379
  pick?: {
1218
1380
  id: string;
1219
1381
  team: {
@@ -1260,6 +1422,17 @@ export declare const createRatingSchema: import("zod").ZodObject<import("zod").o
1260
1422
  seasonType?: number | undefined;
1261
1423
  };
1262
1424
  id?: string | undefined;
1425
+ event?: {
1426
+ id: string;
1427
+ eventType: "streak" | "achievement" | "rating_milestone";
1428
+ eventData: {
1429
+ achievementId?: string | undefined;
1430
+ achievementName?: string | undefined;
1431
+ tier?: number | undefined;
1432
+ streakNumber?: number | undefined;
1433
+ ratingCount?: number | undefined;
1434
+ };
1435
+ } | undefined;
1263
1436
  pick?: {
1264
1437
  id: string;
1265
1438
  team: {
@@ -4701,14 +4874,17 @@ export declare const profileRatingStatsSchema: import("zod").ZodObject<{
4701
4874
  avgRating: import("zod").ZodString;
4702
4875
  ratedGames: import("zod").ZodString;
4703
4876
  stadiumRatings: import("zod").ZodNumber;
4877
+ experienceRatings: import("zod").ZodNumber;
4704
4878
  }, "strip", import("zod").ZodTypeAny, {
4705
4879
  avgRating: string;
4706
4880
  ratedGames: string;
4707
4881
  stadiumRatings: number;
4882
+ experienceRatings: number;
4708
4883
  }, {
4709
4884
  avgRating: string;
4710
4885
  ratedGames: string;
4711
4886
  stadiumRatings: number;
4887
+ experienceRatings: number;
4712
4888
  }>;
4713
4889
  export declare const seasonStatsSchema: import("zod").ZodObject<{
4714
4890
  season: import("zod").ZodString;
@@ -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
+ event: exports.ratingMiniEventSchema.optional(),
62
82
  });
63
83
  exports.searchRatingSchema = (0, zod_1.object)({
64
84
  q: (0, zod_1.string)().optional(),
@@ -156,6 +176,7 @@ exports.profileRatingStatsSchema = (0, zod_1.object)({
156
176
  avgRating: (0, zod_1.string)(),
157
177
  ratedGames: (0, zod_1.string)(),
158
178
  stadiumRatings: (0, zod_1.number)(),
179
+ experienceRatings: (0, zod_1.number)(),
159
180
  });
160
181
  exports.seasonStatsSchema = (0, zod_1.object)({
161
182
  season: (0, zod_1.string)(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.327",
3
+ "version": "1.1.329",
4
4
  "description": "This package contains shared resources for the Rate Game project.",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",