rategame-shared 1.1.268 → 1.1.269

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.
@@ -133,6 +133,101 @@ export declare const stadiumSchema: z.ZodObject<{
133
133
  teamLeagues?: string[] | undefined;
134
134
  specialEvent?: boolean | undefined;
135
135
  }>;
136
+ export declare const stadiumForRatingSchema: z.ZodObject<Omit<{
137
+ id: z.ZodOptional<z.ZodString>;
138
+ venueName: z.ZodString;
139
+ city: z.ZodString;
140
+ teams: z.ZodArray<z.ZodObject<{
141
+ id: z.ZodOptional<z.ZodString>;
142
+ name: z.ZodString;
143
+ image: z.ZodString;
144
+ teamCode: z.ZodString;
145
+ 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">]>;
146
+ school: z.ZodOptional<z.ZodString>;
147
+ city: z.ZodOptional<z.ZodString>;
148
+ stadiumUrl: z.ZodOptional<z.ZodString>;
149
+ }, "strip", z.ZodTypeAny, {
150
+ name: string;
151
+ image: string;
152
+ league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
153
+ teamCode: string;
154
+ id?: string | undefined;
155
+ stadiumUrl?: string | undefined;
156
+ school?: string | undefined;
157
+ city?: string | undefined;
158
+ }, {
159
+ name: string;
160
+ image: string;
161
+ league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
162
+ teamCode: string;
163
+ id?: string | undefined;
164
+ stadiumUrl?: string | undefined;
165
+ school?: string | undefined;
166
+ city?: string | undefined;
167
+ }>, "many">;
168
+ teamIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
169
+ teamLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
170
+ rating: z.ZodOptional<z.ZodObject<{
171
+ avg: z.ZodNumber;
172
+ votes: z.ZodObject<{
173
+ options: z.ZodRecord<z.ZodNumber, z.ZodNumber>;
174
+ total: z.ZodNumber;
175
+ }, "strip", z.ZodTypeAny, {
176
+ total: number;
177
+ options: Record<number, number>;
178
+ }, {
179
+ total: number;
180
+ options: Record<number, number>;
181
+ }>;
182
+ }, "strip", z.ZodTypeAny, {
183
+ avg: number;
184
+ votes: {
185
+ total: number;
186
+ options: Record<number, number>;
187
+ };
188
+ }, {
189
+ avg: number;
190
+ votes: {
191
+ total: number;
192
+ options: Record<number, number>;
193
+ };
194
+ }>>;
195
+ specialEvent: z.ZodOptional<z.ZodBoolean>;
196
+ }, "rating">, "strip", z.ZodTypeAny, {
197
+ city: string;
198
+ venueName: string;
199
+ teams: {
200
+ name: string;
201
+ image: string;
202
+ league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
203
+ teamCode: string;
204
+ id?: string | undefined;
205
+ stadiumUrl?: string | undefined;
206
+ school?: string | undefined;
207
+ city?: string | undefined;
208
+ }[];
209
+ id?: string | undefined;
210
+ teamIds?: string[] | undefined;
211
+ teamLeagues?: string[] | undefined;
212
+ specialEvent?: boolean | undefined;
213
+ }, {
214
+ city: string;
215
+ venueName: string;
216
+ teams: {
217
+ name: string;
218
+ image: string;
219
+ league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
220
+ teamCode: string;
221
+ id?: string | undefined;
222
+ stadiumUrl?: string | undefined;
223
+ school?: string | undefined;
224
+ city?: string | undefined;
225
+ }[];
226
+ id?: string | undefined;
227
+ teamIds?: string[] | undefined;
228
+ teamLeagues?: string[] | undefined;
229
+ specialEvent?: boolean | undefined;
230
+ }>;
136
231
  export declare const stadiumRatingSchema: z.ZodObject<{
137
232
  id: z.ZodString;
138
233
  createdAt: z.ZodNumber;
@@ -1585,7 +1680,7 @@ export declare const searchStadiumRatingSchema: z.ZodObject<{
1585
1680
  userId?: string | undefined;
1586
1681
  showEmptyRatings?: string | undefined;
1587
1682
  }>;
1588
- export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
1683
+ export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
1589
1684
  id: z.ZodString;
1590
1685
  createdAt: z.ZodNumber;
1591
1686
  rating: z.ZodNumber;
@@ -2838,7 +2933,103 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
2838
2933
  updatedAt: z.ZodOptional<z.ZodNumber>;
2839
2934
  edited: z.ZodOptional<z.ZodBoolean>;
2840
2935
  userLocation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2841
- }, "createdAt">, "strip", z.ZodTypeAny, {
2936
+ }, "createdAt">, {
2937
+ stadium: z.ZodObject<Omit<{
2938
+ id: z.ZodOptional<z.ZodString>;
2939
+ venueName: z.ZodString;
2940
+ city: z.ZodString;
2941
+ teams: z.ZodArray<z.ZodObject<{
2942
+ id: z.ZodOptional<z.ZodString>;
2943
+ name: z.ZodString;
2944
+ image: z.ZodString;
2945
+ teamCode: z.ZodString;
2946
+ 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">]>;
2947
+ school: z.ZodOptional<z.ZodString>;
2948
+ city: z.ZodOptional<z.ZodString>;
2949
+ stadiumUrl: z.ZodOptional<z.ZodString>;
2950
+ }, "strip", z.ZodTypeAny, {
2951
+ name: string;
2952
+ image: string;
2953
+ league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
2954
+ teamCode: string;
2955
+ id?: string | undefined;
2956
+ stadiumUrl?: string | undefined;
2957
+ school?: string | undefined;
2958
+ city?: string | undefined;
2959
+ }, {
2960
+ name: string;
2961
+ image: string;
2962
+ league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
2963
+ teamCode: string;
2964
+ id?: string | undefined;
2965
+ stadiumUrl?: string | undefined;
2966
+ school?: string | undefined;
2967
+ city?: string | undefined;
2968
+ }>, "many">;
2969
+ teamIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2970
+ teamLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2971
+ rating: z.ZodOptional<z.ZodObject<{
2972
+ avg: z.ZodNumber;
2973
+ votes: z.ZodObject<{
2974
+ options: z.ZodRecord<z.ZodNumber, z.ZodNumber>;
2975
+ total: z.ZodNumber;
2976
+ }, "strip", z.ZodTypeAny, {
2977
+ total: number;
2978
+ options: Record<number, number>;
2979
+ }, {
2980
+ total: number;
2981
+ options: Record<number, number>;
2982
+ }>;
2983
+ }, "strip", z.ZodTypeAny, {
2984
+ avg: number;
2985
+ votes: {
2986
+ total: number;
2987
+ options: Record<number, number>;
2988
+ };
2989
+ }, {
2990
+ avg: number;
2991
+ votes: {
2992
+ total: number;
2993
+ options: Record<number, number>;
2994
+ };
2995
+ }>>;
2996
+ specialEvent: z.ZodOptional<z.ZodBoolean>;
2997
+ }, "rating">, "strip", z.ZodTypeAny, {
2998
+ city: string;
2999
+ venueName: string;
3000
+ teams: {
3001
+ name: string;
3002
+ image: string;
3003
+ league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
3004
+ teamCode: string;
3005
+ id?: string | undefined;
3006
+ stadiumUrl?: string | undefined;
3007
+ school?: string | undefined;
3008
+ city?: string | undefined;
3009
+ }[];
3010
+ id?: string | undefined;
3011
+ teamIds?: string[] | undefined;
3012
+ teamLeagues?: string[] | undefined;
3013
+ specialEvent?: boolean | undefined;
3014
+ }, {
3015
+ city: string;
3016
+ venueName: string;
3017
+ teams: {
3018
+ name: string;
3019
+ image: string;
3020
+ league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
3021
+ teamCode: string;
3022
+ id?: string | undefined;
3023
+ stadiumUrl?: string | undefined;
3024
+ school?: string | undefined;
3025
+ city?: string | undefined;
3026
+ }[];
3027
+ id?: string | undefined;
3028
+ teamIds?: string[] | undefined;
3029
+ teamLeagues?: string[] | undefined;
3030
+ specialEvent?: boolean | undefined;
3031
+ }>;
3032
+ }>, "strip", z.ZodTypeAny, {
2842
3033
  type: "stadium" | "game";
2843
3034
  id: string;
2844
3035
  user: {
@@ -2863,13 +3054,6 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
2863
3054
  city?: string | undefined;
2864
3055
  }[];
2865
3056
  id?: string | undefined;
2866
- rating?: {
2867
- avg: number;
2868
- votes: {
2869
- total: number;
2870
- options: Record<number, number>;
2871
- };
2872
- } | undefined;
2873
3057
  teamIds?: string[] | undefined;
2874
3058
  teamLeagues?: string[] | undefined;
2875
3059
  specialEvent?: boolean | undefined;
@@ -2950,13 +3134,6 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
2950
3134
  city?: string | undefined;
2951
3135
  }[];
2952
3136
  id?: string | undefined;
2953
- rating?: {
2954
- avg: number;
2955
- votes: {
2956
- total: number;
2957
- options: Record<number, number>;
2958
- };
2959
- } | undefined;
2960
3137
  teamIds?: string[] | undefined;
2961
3138
  teamLeagues?: string[] | undefined;
2962
3139
  specialEvent?: boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stadiumThreadCommentSchema = exports.createStadiumRatingSchema = exports.searchStadiumRatingSchema = exports.stadiumRatingSchema = exports.stadiumSchema = exports.stadiumRatingAggregateSchema = void 0;
3
+ exports.stadiumThreadCommentSchema = exports.createStadiumRatingSchema = exports.searchStadiumRatingSchema = exports.stadiumRatingSchema = exports.stadiumForRatingSchema = exports.stadiumSchema = exports.stadiumRatingAggregateSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const sharedTypes_1 = require("./sharedTypes");
6
6
  const user_1 = require("./user");
@@ -45,6 +45,10 @@ exports.stadiumSchema = zod_1.z.object({
45
45
  rating: exports.stadiumRatingAggregateSchema.optional(),
46
46
  specialEvent: zod_1.z.boolean().optional(),
47
47
  });
48
+ // Simplified stadium schema for rating creation (excludes complex rating data)
49
+ exports.stadiumForRatingSchema = exports.stadiumSchema.omit({
50
+ rating: true,
51
+ });
48
52
  exports.stadiumRatingSchema = zod_1.z.object({
49
53
  id: zod_1.z.string(),
50
54
  createdAt: zod_1.z.number(),
@@ -68,8 +72,12 @@ exports.searchStadiumRatingSchema = zod_1.z.object({
68
72
  userId: zod_1.z.string().optional(),
69
73
  username: zod_1.z.string().optional(),
70
74
  });
71
- exports.createStadiumRatingSchema = exports.stadiumRatingSchema.omit({
75
+ exports.createStadiumRatingSchema = exports.stadiumRatingSchema
76
+ .omit({
72
77
  createdAt: true,
78
+ })
79
+ .extend({
80
+ stadium: exports.stadiumForRatingSchema,
73
81
  });
74
82
  exports.stadiumThreadCommentSchema = zod_1.z.object({
75
83
  id: zod_1.z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.268",
3
+ "version": "1.1.269",
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",