rategame-shared 1.1.269 → 1.1.271

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.
@@ -1279,7 +1279,7 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1279
1279
  gamesAttended: z.ZodOptional<z.ZodNumber>;
1280
1280
  type: z.ZodUnion<[z.ZodLiteral<"stadium">, z.ZodLiteral<"game">]>;
1281
1281
  game: z.ZodOptional<z.ZodObject<{
1282
- id: z.ZodOptional<z.ZodString>;
1282
+ id: z.ZodString;
1283
1283
  round: z.ZodOptional<z.ZodNumber>;
1284
1284
  league: z.ZodUnion<[z.ZodLiteral<"nba">, z.ZodLiteral<"ncaa">, z.ZodLiteral<"nfl">, z.ZodLiteral<"nhl">, z.ZodLiteral<"mlb">, z.ZodLiteral<"cbb">, z.ZodLiteral<"cfb">, z.ZodLiteral<"epl">, z.ZodLiteral<"mls">, z.ZodLiteral<"wnba">, z.ZodLiteral<"cwc">, z.ZodLiteral<"global">]>;
1285
1285
  homeTeam: z.ZodObject<{
@@ -1389,6 +1389,7 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1389
1389
  startedAt: z.ZodOptional<z.ZodNumber>;
1390
1390
  roundName: z.ZodOptional<z.ZodString>;
1391
1391
  }, "strip", z.ZodTypeAny, {
1392
+ id: string;
1392
1393
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
1393
1394
  homeTeam: {
1394
1395
  name: string;
@@ -1420,7 +1421,6 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1420
1421
  city?: string | undefined;
1421
1422
  venueName?: string | undefined;
1422
1423
  };
1423
- id?: string | undefined;
1424
1424
  round?: number | undefined;
1425
1425
  week?: number | undefined;
1426
1426
  startedAt?: number | undefined;
@@ -1433,6 +1433,7 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1433
1433
  seasonType?: number | undefined;
1434
1434
  roundName?: string | undefined;
1435
1435
  }, {
1436
+ id: string;
1436
1437
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
1437
1438
  homeTeam: {
1438
1439
  name: string;
@@ -1464,7 +1465,6 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1464
1465
  city?: string | undefined;
1465
1466
  venueName?: string | undefined;
1466
1467
  };
1467
- id?: string | undefined;
1468
1468
  round?: number | undefined;
1469
1469
  week?: number | undefined;
1470
1470
  startedAt?: number | undefined;
@@ -1521,6 +1521,7 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1521
1521
  updatedAt?: number | undefined;
1522
1522
  comment?: string | undefined;
1523
1523
  game?: {
1524
+ id: string;
1524
1525
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
1525
1526
  homeTeam: {
1526
1527
  name: string;
@@ -1552,7 +1553,6 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1552
1553
  city?: string | undefined;
1553
1554
  venueName?: string | undefined;
1554
1555
  };
1555
- id?: string | undefined;
1556
1556
  round?: number | undefined;
1557
1557
  week?: number | undefined;
1558
1558
  startedAt?: number | undefined;
@@ -1609,6 +1609,7 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1609
1609
  updatedAt?: number | undefined;
1610
1610
  comment?: string | undefined;
1611
1611
  game?: {
1612
+ id: string;
1612
1613
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
1613
1614
  homeTeam: {
1614
1615
  name: string;
@@ -1640,7 +1641,6 @@ export declare const stadiumRatingSchema: z.ZodObject<{
1640
1641
  city?: string | undefined;
1641
1642
  venueName?: string | undefined;
1642
1643
  };
1643
- id?: string | undefined;
1644
1644
  round?: number | undefined;
1645
1645
  week?: number | undefined;
1646
1646
  startedAt?: number | undefined;
@@ -1665,8 +1665,10 @@ export declare const searchStadiumRatingSchema: z.ZodObject<{
1665
1665
  showEmptyRatings: z.ZodOptional<z.ZodString>;
1666
1666
  userId: z.ZodOptional<z.ZodString>;
1667
1667
  username: z.ZodOptional<z.ZodString>;
1668
+ league: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"nba">, z.ZodLiteral<"ncaa">, z.ZodLiteral<"nfl">, z.ZodLiteral<"nhl">, z.ZodLiteral<"mlb">, z.ZodLiteral<"cbb">, z.ZodLiteral<"cfb">, z.ZodLiteral<"epl">, z.ZodLiteral<"mls">, z.ZodLiteral<"wnba">, z.ZodLiteral<"cwc">, z.ZodLiteral<"global">]>>;
1668
1669
  }, "strip", z.ZodTypeAny, {
1669
1670
  offset?: string | undefined;
1671
+ league?: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc" | undefined;
1670
1672
  username?: string | undefined;
1671
1673
  limit?: string | undefined;
1672
1674
  sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | "userLikes:asc" | "userLikes:desc" | undefined;
@@ -1674,6 +1676,7 @@ export declare const searchStadiumRatingSchema: z.ZodObject<{
1674
1676
  showEmptyRatings?: string | undefined;
1675
1677
  }, {
1676
1678
  offset?: string | undefined;
1679
+ league?: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc" | undefined;
1677
1680
  username?: string | undefined;
1678
1681
  limit?: string | undefined;
1679
1682
  sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | "userLikes:asc" | "userLikes:desc" | undefined;
@@ -2731,7 +2734,7 @@ export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendS
2731
2734
  gamesAttended: z.ZodOptional<z.ZodNumber>;
2732
2735
  type: z.ZodUnion<[z.ZodLiteral<"stadium">, z.ZodLiteral<"game">]>;
2733
2736
  game: z.ZodOptional<z.ZodObject<{
2734
- id: z.ZodOptional<z.ZodString>;
2737
+ id: z.ZodString;
2735
2738
  round: z.ZodOptional<z.ZodNumber>;
2736
2739
  league: z.ZodUnion<[z.ZodLiteral<"nba">, z.ZodLiteral<"ncaa">, z.ZodLiteral<"nfl">, z.ZodLiteral<"nhl">, z.ZodLiteral<"mlb">, z.ZodLiteral<"cbb">, z.ZodLiteral<"cfb">, z.ZodLiteral<"epl">, z.ZodLiteral<"mls">, z.ZodLiteral<"wnba">, z.ZodLiteral<"cwc">, z.ZodLiteral<"global">]>;
2737
2740
  homeTeam: z.ZodObject<{
@@ -2841,6 +2844,7 @@ export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendS
2841
2844
  startedAt: z.ZodOptional<z.ZodNumber>;
2842
2845
  roundName: z.ZodOptional<z.ZodString>;
2843
2846
  }, "strip", z.ZodTypeAny, {
2847
+ id: string;
2844
2848
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
2845
2849
  homeTeam: {
2846
2850
  name: string;
@@ -2872,7 +2876,6 @@ export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendS
2872
2876
  city?: string | undefined;
2873
2877
  venueName?: string | undefined;
2874
2878
  };
2875
- id?: string | undefined;
2876
2879
  round?: number | undefined;
2877
2880
  week?: number | undefined;
2878
2881
  startedAt?: number | undefined;
@@ -2885,6 +2888,7 @@ export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendS
2885
2888
  seasonType?: number | undefined;
2886
2889
  roundName?: string | undefined;
2887
2890
  }, {
2891
+ id: string;
2888
2892
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
2889
2893
  homeTeam: {
2890
2894
  name: string;
@@ -2916,7 +2920,6 @@ export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendS
2916
2920
  city?: string | undefined;
2917
2921
  venueName?: string | undefined;
2918
2922
  };
2919
- id?: string | undefined;
2920
2923
  round?: number | undefined;
2921
2924
  week?: number | undefined;
2922
2925
  startedAt?: number | undefined;
@@ -3061,6 +3064,7 @@ export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendS
3061
3064
  updatedAt?: number | undefined;
3062
3065
  comment?: string | undefined;
3063
3066
  game?: {
3067
+ id: string;
3064
3068
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
3065
3069
  homeTeam: {
3066
3070
  name: string;
@@ -3092,7 +3096,6 @@ export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendS
3092
3096
  city?: string | undefined;
3093
3097
  venueName?: string | undefined;
3094
3098
  };
3095
- id?: string | undefined;
3096
3099
  round?: number | undefined;
3097
3100
  week?: number | undefined;
3098
3101
  startedAt?: number | undefined;
@@ -3141,6 +3144,7 @@ export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendS
3141
3144
  updatedAt?: number | undefined;
3142
3145
  comment?: string | undefined;
3143
3146
  game?: {
3147
+ id: string;
3144
3148
  league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
3145
3149
  homeTeam: {
3146
3150
  name: string;
@@ -3172,7 +3176,6 @@ export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendS
3172
3176
  city?: string | undefined;
3173
3177
  venueName?: string | undefined;
3174
3178
  };
3175
- id?: string | undefined;
3176
3179
  round?: number | undefined;
3177
3180
  week?: number | undefined;
3178
3181
  startedAt?: number | undefined;
@@ -6,6 +6,7 @@ const sharedTypes_1 = require("./sharedTypes");
6
6
  const user_1 = require("./user");
7
7
  const game_1 = require("./game");
8
8
  const game_2 = require("./game");
9
+ const zod_2 = require("zod");
9
10
  const reducedTeamSchema = zod_1.z.object({
10
11
  id: zod_1.z.string().optional(),
11
12
  name: zod_1.z.string(),
@@ -23,17 +24,17 @@ exports.stadiumRatingAggregateSchema = zod_1.z.object({
23
24
  total: zod_1.z.number(),
24
25
  }),
25
26
  });
26
- const reducedGameSchema = zod_1.z.object({
27
- id: zod_1.z.string().optional(),
28
- round: zod_1.z.number().optional(),
27
+ const gameForStadiumRatingSchema = (0, zod_2.object)({
28
+ id: (0, zod_2.string)(),
29
+ round: (0, zod_2.number)().optional(),
29
30
  league: sharedTypes_1.leagueSlug,
30
31
  homeTeam: game_1.gameTeamSchema,
31
32
  awayTeam: game_1.gameTeamSchema,
32
33
  seriesInfo: game_2.seriesInfoSchema.optional(),
33
- week: zod_1.z.number().optional(),
34
- seasonType: zod_1.z.number().optional(),
35
- startedAt: zod_1.z.number().optional(),
36
- roundName: zod_1.z.string().optional(),
34
+ week: (0, zod_2.number)().optional(),
35
+ seasonType: (0, zod_2.number)().optional(),
36
+ startedAt: (0, zod_2.number)().optional(),
37
+ roundName: (0, zod_2.string)().optional(),
37
38
  });
38
39
  exports.stadiumSchema = zod_1.z.object({
39
40
  id: zod_1.z.string().optional(),
@@ -58,7 +59,7 @@ exports.stadiumRatingSchema = zod_1.z.object({
58
59
  stadium: exports.stadiumSchema,
59
60
  gamesAttended: zod_1.z.number().optional(),
60
61
  type: zod_1.z.union([zod_1.z.literal("stadium"), zod_1.z.literal("game")]),
61
- game: reducedGameSchema.optional(),
62
+ game: gameForStadiumRatingSchema.optional(),
62
63
  userLikes: zod_1.z.number().optional(),
63
64
  updatedAt: zod_1.z.number().optional(),
64
65
  edited: zod_1.z.boolean().optional(),
@@ -71,6 +72,7 @@ exports.searchStadiumRatingSchema = zod_1.z.object({
71
72
  showEmptyRatings: zod_1.z.string().optional(),
72
73
  userId: zod_1.z.string().optional(),
73
74
  username: zod_1.z.string().optional(),
75
+ league: sharedTypes_1.leagueSlug.optional(),
74
76
  });
75
77
  exports.createStadiumRatingSchema = exports.stadiumRatingSchema
76
78
  .omit({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.269",
3
+ "version": "1.1.271",
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",