rategame-shared 1.1.239 → 1.1.241

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.
@@ -33978,6 +33978,7 @@ export declare const searchGameSchema: z.ZodObject<{
33978
33978
  seasonGroup: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"combined">, z.ZodLiteral<"regularSeason">, z.ZodLiteral<"playoffs">]>>;
33979
33979
  gamesType: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"topRated">, z.ZodLiteral<"mostRated">]>>;
33980
33980
  season: z.ZodOptional<z.ZodString>;
33981
+ userId: z.ZodOptional<z.ZodString>;
33981
33982
  }, "strip", z.ZodTypeAny, {
33982
33983
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
33983
33984
  offset?: string | undefined;
@@ -33993,6 +33994,7 @@ export declare const searchGameSchema: z.ZodObject<{
33993
33994
  topRatedGames?: string | undefined;
33994
33995
  seasonGroup?: "combined" | "regularSeason" | "playoffs" | undefined;
33995
33996
  gamesType?: "topRated" | "mostRated" | undefined;
33997
+ userId?: string | undefined;
33996
33998
  }, {
33997
33999
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
33998
34000
  offset?: string | undefined;
@@ -34008,6 +34010,7 @@ export declare const searchGameSchema: z.ZodObject<{
34008
34010
  topRatedGames?: string | undefined;
34009
34011
  seasonGroup?: "combined" | "regularSeason" | "playoffs" | undefined;
34010
34012
  gamesType?: "topRated" | "mostRated" | undefined;
34013
+ userId?: string | undefined;
34011
34014
  }>;
34012
34015
  export declare const creatorPickSchema: z.ZodObject<{
34013
34016
  game: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
@@ -338,6 +338,7 @@ exports.searchGameSchema = zod_1.z.object({
338
338
  .union([zod_1.z.literal("topRated"), zod_1.z.literal("mostRated")])
339
339
  .optional(),
340
340
  season: zod_1.z.string().optional(),
341
+ userId: zod_1.z.string().optional(),
341
342
  });
342
343
  exports.creatorPickSchema = zod_1.z.object({
343
344
  game: exports.unionGameSchema,
@@ -400,8 +400,8 @@ export declare const internalNotification: z.ZodObject<{
400
400
  id: string;
401
401
  source: string;
402
402
  text: string;
403
- category: string;
404
403
  userId: string;
404
+ category: string;
405
405
  initiator: {
406
406
  id: string;
407
407
  email: string;
@@ -485,8 +485,8 @@ export declare const internalNotification: z.ZodObject<{
485
485
  id: string;
486
486
  source: string;
487
487
  text: string;
488
- category: string;
489
488
  userId: string;
489
+ category: string;
490
490
  initiator: {
491
491
  id: string;
492
492
  email: string;
@@ -399,12 +399,12 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
399
399
  comment?: string | undefined;
400
400
  teamId?: string | undefined;
401
401
  sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | "userLikes:asc" | "userLikes:desc" | undefined;
402
+ userId?: string | undefined;
402
403
  fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
403
404
  category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
404
405
  userLocation?: string | null | undefined;
405
406
  gameId?: string | undefined;
406
407
  showEmptyRatings?: string | undefined;
407
- userId?: string | undefined;
408
408
  mlbTeamLeague?: string | undefined;
409
409
  division?: string | undefined;
410
410
  }, {
@@ -419,12 +419,12 @@ export declare const searchRatingSchema: import("zod").ZodObject<{
419
419
  comment?: string | undefined;
420
420
  teamId?: string | undefined;
421
421
  sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | "userLikes:asc" | "userLikes:desc" | undefined;
422
+ userId?: string | undefined;
422
423
  fanCategory?: "homeTeam" | "awayTeam" | "winningTeam" | "losingTeam" | "neutral" | undefined;
423
424
  category?: "watched" | "attended" | "highlights" | "listened" | "partiallyWatched" | undefined;
424
425
  userLocation?: string | null | undefined;
425
426
  gameId?: string | undefined;
426
427
  showEmptyRatings?: string | undefined;
427
- userId?: string | undefined;
428
428
  mlbTeamLeague?: string | undefined;
429
429
  division?: string | undefined;
430
430
  }>;
@@ -2,8 +2,8 @@ import { z } from "zod";
2
2
  export declare const userEventSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
4
  userId: z.ZodString;
5
- eventType: z.ZodLiteral<"achievement">;
6
- eventData: z.ZodObject<{
5
+ eventType: z.ZodUnion<[z.ZodLiteral<"achievement">, z.ZodLiteral<"streak">]>;
6
+ eventData: z.ZodUnion<[z.ZodObject<{
7
7
  achievementId: z.ZodString;
8
8
  achievementName: z.ZodString;
9
9
  achievementDescription: z.ZodString;
@@ -21,7 +21,16 @@ export declare const userEventSchema: z.ZodObject<{
21
21
  achievementName: string;
22
22
  achievementDescription: string;
23
23
  tier?: number | undefined;
24
- }>;
24
+ }>, z.ZodObject<{
25
+ streakNumber: z.ZodNumber;
26
+ milestone: z.ZodNumber;
27
+ }, "strip", z.ZodTypeAny, {
28
+ streakNumber: number;
29
+ milestone: number;
30
+ }, {
31
+ streakNumber: number;
32
+ milestone: number;
33
+ }>]>;
25
34
  user: z.ZodObject<{
26
35
  id: z.ZodString;
27
36
  username: z.ZodString;
@@ -42,6 +51,7 @@ export declare const userEventSchema: z.ZodObject<{
42
51
  badge?: string | undefined;
43
52
  }>;
44
53
  createdAt: z.ZodNumber;
54
+ likesCount: z.ZodOptional<z.ZodNumber>;
45
55
  }, "strip", z.ZodTypeAny, {
46
56
  id: string;
47
57
  user: {
@@ -53,14 +63,18 @@ export declare const userEventSchema: z.ZodObject<{
53
63
  };
54
64
  createdAt: number;
55
65
  userId: string;
56
- eventType: "achievement";
66
+ eventType: "streak" | "achievement";
57
67
  eventData: {
58
68
  progress: number;
59
69
  achievementId: string;
60
70
  achievementName: string;
61
71
  achievementDescription: string;
62
72
  tier?: number | undefined;
73
+ } | {
74
+ streakNumber: number;
75
+ milestone: number;
63
76
  };
77
+ likesCount?: number | undefined;
64
78
  }, {
65
79
  id: string;
66
80
  user: {
@@ -72,14 +86,18 @@ export declare const userEventSchema: z.ZodObject<{
72
86
  };
73
87
  createdAt: number;
74
88
  userId: string;
75
- eventType: "achievement";
89
+ eventType: "streak" | "achievement";
76
90
  eventData: {
77
91
  progress: number;
78
92
  achievementId: string;
79
93
  achievementName: string;
80
94
  achievementDescription: string;
81
95
  tier?: number | undefined;
96
+ } | {
97
+ streakNumber: number;
98
+ milestone: number;
82
99
  };
100
+ likesCount?: number | undefined;
83
101
  }>;
84
102
  export declare const userEventCommentSchema: z.ZodObject<{
85
103
  id: z.ZodString;
@@ -6,14 +6,22 @@ const user_1 = require("./user");
6
6
  exports.userEventSchema = zod_1.z.object({
7
7
  id: zod_1.z.string(),
8
8
  userId: zod_1.z.string(),
9
- eventType: (0, zod_1.literal)("achievement"),
10
- eventData: zod_1.z.object({
11
- achievementId: zod_1.z.string(),
12
- achievementName: zod_1.z.string(),
13
- achievementDescription: zod_1.z.string(),
14
- tier: zod_1.z.number().optional(),
15
- progress: zod_1.z.number(),
16
- }),
9
+ eventType: zod_1.z.union([zod_1.z.literal("achievement"), zod_1.z.literal("streak")]),
10
+ eventData: zod_1.z.union([
11
+ // Achievement event data
12
+ zod_1.z.object({
13
+ achievementId: zod_1.z.string(),
14
+ achievementName: zod_1.z.string(),
15
+ achievementDescription: zod_1.z.string(),
16
+ tier: zod_1.z.number().optional(),
17
+ progress: zod_1.z.number(),
18
+ }),
19
+ // Streak event data
20
+ zod_1.z.object({
21
+ streakNumber: zod_1.z.number(),
22
+ milestone: zod_1.z.number(),
23
+ }),
24
+ ]),
17
25
  user: zod_1.z.object({
18
26
  id: zod_1.z.string(),
19
27
  username: zod_1.z.string(),
@@ -22,6 +30,7 @@ exports.userEventSchema = zod_1.z.object({
22
30
  email: zod_1.z.string().optional(),
23
31
  }),
24
32
  createdAt: zod_1.z.number(),
33
+ likesCount: zod_1.z.number().optional(),
25
34
  });
26
35
  exports.userEventCommentSchema = zod_1.z.object({
27
36
  id: zod_1.z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.239",
3
+ "version": "1.1.241",
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",