rategame-shared 1.1.268 → 1.1.270
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/schemas/stadium.d.ts +196 -16
- package/dist/schemas/stadium.js +11 -2
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -1570,8 +1665,10 @@ export declare const searchStadiumRatingSchema: z.ZodObject<{
|
|
|
1570
1665
|
showEmptyRatings: z.ZodOptional<z.ZodString>;
|
|
1571
1666
|
userId: z.ZodOptional<z.ZodString>;
|
|
1572
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">]>>;
|
|
1573
1669
|
}, "strip", z.ZodTypeAny, {
|
|
1574
1670
|
offset?: string | undefined;
|
|
1671
|
+
league?: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc" | undefined;
|
|
1575
1672
|
username?: string | undefined;
|
|
1576
1673
|
limit?: string | undefined;
|
|
1577
1674
|
sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | "userLikes:asc" | "userLikes:desc" | undefined;
|
|
@@ -1579,13 +1676,14 @@ export declare const searchStadiumRatingSchema: z.ZodObject<{
|
|
|
1579
1676
|
showEmptyRatings?: string | undefined;
|
|
1580
1677
|
}, {
|
|
1581
1678
|
offset?: string | undefined;
|
|
1679
|
+
league?: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc" | undefined;
|
|
1582
1680
|
username?: string | undefined;
|
|
1583
1681
|
limit?: string | undefined;
|
|
1584
1682
|
sortBy?: "rating:asc" | "rating:desc" | "createdAt:asc" | "createdAt:desc" | "userLikes:asc" | "userLikes:desc" | undefined;
|
|
1585
1683
|
userId?: string | undefined;
|
|
1586
1684
|
showEmptyRatings?: string | undefined;
|
|
1587
1685
|
}>;
|
|
1588
|
-
export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
|
|
1686
|
+
export declare const createStadiumRatingSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
1589
1687
|
id: z.ZodString;
|
|
1590
1688
|
createdAt: z.ZodNumber;
|
|
1591
1689
|
rating: z.ZodNumber;
|
|
@@ -2838,7 +2936,103 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
|
|
|
2838
2936
|
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
2839
2937
|
edited: z.ZodOptional<z.ZodBoolean>;
|
|
2840
2938
|
userLocation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2841
|
-
}, "createdAt">,
|
|
2939
|
+
}, "createdAt">, {
|
|
2940
|
+
stadium: z.ZodObject<Omit<{
|
|
2941
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2942
|
+
venueName: z.ZodString;
|
|
2943
|
+
city: z.ZodString;
|
|
2944
|
+
teams: z.ZodArray<z.ZodObject<{
|
|
2945
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2946
|
+
name: z.ZodString;
|
|
2947
|
+
image: z.ZodString;
|
|
2948
|
+
teamCode: z.ZodString;
|
|
2949
|
+
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">]>;
|
|
2950
|
+
school: z.ZodOptional<z.ZodString>;
|
|
2951
|
+
city: z.ZodOptional<z.ZodString>;
|
|
2952
|
+
stadiumUrl: z.ZodOptional<z.ZodString>;
|
|
2953
|
+
}, "strip", z.ZodTypeAny, {
|
|
2954
|
+
name: string;
|
|
2955
|
+
image: string;
|
|
2956
|
+
league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
|
|
2957
|
+
teamCode: string;
|
|
2958
|
+
id?: string | undefined;
|
|
2959
|
+
stadiumUrl?: string | undefined;
|
|
2960
|
+
school?: string | undefined;
|
|
2961
|
+
city?: string | undefined;
|
|
2962
|
+
}, {
|
|
2963
|
+
name: string;
|
|
2964
|
+
image: string;
|
|
2965
|
+
league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
|
|
2966
|
+
teamCode: string;
|
|
2967
|
+
id?: string | undefined;
|
|
2968
|
+
stadiumUrl?: string | undefined;
|
|
2969
|
+
school?: string | undefined;
|
|
2970
|
+
city?: string | undefined;
|
|
2971
|
+
}>, "many">;
|
|
2972
|
+
teamIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2973
|
+
teamLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2974
|
+
rating: z.ZodOptional<z.ZodObject<{
|
|
2975
|
+
avg: z.ZodNumber;
|
|
2976
|
+
votes: z.ZodObject<{
|
|
2977
|
+
options: z.ZodRecord<z.ZodNumber, z.ZodNumber>;
|
|
2978
|
+
total: z.ZodNumber;
|
|
2979
|
+
}, "strip", z.ZodTypeAny, {
|
|
2980
|
+
total: number;
|
|
2981
|
+
options: Record<number, number>;
|
|
2982
|
+
}, {
|
|
2983
|
+
total: number;
|
|
2984
|
+
options: Record<number, number>;
|
|
2985
|
+
}>;
|
|
2986
|
+
}, "strip", z.ZodTypeAny, {
|
|
2987
|
+
avg: number;
|
|
2988
|
+
votes: {
|
|
2989
|
+
total: number;
|
|
2990
|
+
options: Record<number, number>;
|
|
2991
|
+
};
|
|
2992
|
+
}, {
|
|
2993
|
+
avg: number;
|
|
2994
|
+
votes: {
|
|
2995
|
+
total: number;
|
|
2996
|
+
options: Record<number, number>;
|
|
2997
|
+
};
|
|
2998
|
+
}>>;
|
|
2999
|
+
specialEvent: z.ZodOptional<z.ZodBoolean>;
|
|
3000
|
+
}, "rating">, "strip", z.ZodTypeAny, {
|
|
3001
|
+
city: string;
|
|
3002
|
+
venueName: string;
|
|
3003
|
+
teams: {
|
|
3004
|
+
name: string;
|
|
3005
|
+
image: string;
|
|
3006
|
+
league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
|
|
3007
|
+
teamCode: string;
|
|
3008
|
+
id?: string | undefined;
|
|
3009
|
+
stadiumUrl?: string | undefined;
|
|
3010
|
+
school?: string | undefined;
|
|
3011
|
+
city?: string | undefined;
|
|
3012
|
+
}[];
|
|
3013
|
+
id?: string | undefined;
|
|
3014
|
+
teamIds?: string[] | undefined;
|
|
3015
|
+
teamLeagues?: string[] | undefined;
|
|
3016
|
+
specialEvent?: boolean | undefined;
|
|
3017
|
+
}, {
|
|
3018
|
+
city: string;
|
|
3019
|
+
venueName: string;
|
|
3020
|
+
teams: {
|
|
3021
|
+
name: string;
|
|
3022
|
+
image: string;
|
|
3023
|
+
league: "global" | "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "cbb" | "cfb" | "epl" | "mls" | "wnba" | "cwc";
|
|
3024
|
+
teamCode: string;
|
|
3025
|
+
id?: string | undefined;
|
|
3026
|
+
stadiumUrl?: string | undefined;
|
|
3027
|
+
school?: string | undefined;
|
|
3028
|
+
city?: string | undefined;
|
|
3029
|
+
}[];
|
|
3030
|
+
id?: string | undefined;
|
|
3031
|
+
teamIds?: string[] | undefined;
|
|
3032
|
+
teamLeagues?: string[] | undefined;
|
|
3033
|
+
specialEvent?: boolean | undefined;
|
|
3034
|
+
}>;
|
|
3035
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2842
3036
|
type: "stadium" | "game";
|
|
2843
3037
|
id: string;
|
|
2844
3038
|
user: {
|
|
@@ -2863,13 +3057,6 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
|
|
|
2863
3057
|
city?: string | undefined;
|
|
2864
3058
|
}[];
|
|
2865
3059
|
id?: string | undefined;
|
|
2866
|
-
rating?: {
|
|
2867
|
-
avg: number;
|
|
2868
|
-
votes: {
|
|
2869
|
-
total: number;
|
|
2870
|
-
options: Record<number, number>;
|
|
2871
|
-
};
|
|
2872
|
-
} | undefined;
|
|
2873
3060
|
teamIds?: string[] | undefined;
|
|
2874
3061
|
teamLeagues?: string[] | undefined;
|
|
2875
3062
|
specialEvent?: boolean | undefined;
|
|
@@ -2950,13 +3137,6 @@ export declare const createStadiumRatingSchema: z.ZodObject<Omit<{
|
|
|
2950
3137
|
city?: string | undefined;
|
|
2951
3138
|
}[];
|
|
2952
3139
|
id?: string | undefined;
|
|
2953
|
-
rating?: {
|
|
2954
|
-
avg: number;
|
|
2955
|
-
votes: {
|
|
2956
|
-
total: number;
|
|
2957
|
-
options: Record<number, number>;
|
|
2958
|
-
};
|
|
2959
|
-
} | undefined;
|
|
2960
3140
|
teamIds?: string[] | undefined;
|
|
2961
3141
|
teamLeagues?: string[] | undefined;
|
|
2962
3142
|
specialEvent?: boolean | undefined;
|
package/dist/schemas/stadium.js
CHANGED
|
@@ -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(),
|
|
@@ -67,9 +71,14 @@ exports.searchStadiumRatingSchema = zod_1.z.object({
|
|
|
67
71
|
showEmptyRatings: zod_1.z.string().optional(),
|
|
68
72
|
userId: zod_1.z.string().optional(),
|
|
69
73
|
username: zod_1.z.string().optional(),
|
|
74
|
+
league: sharedTypes_1.leagueSlug.optional(),
|
|
70
75
|
});
|
|
71
|
-
exports.createStadiumRatingSchema = exports.stadiumRatingSchema
|
|
76
|
+
exports.createStadiumRatingSchema = exports.stadiumRatingSchema
|
|
77
|
+
.omit({
|
|
72
78
|
createdAt: true,
|
|
79
|
+
})
|
|
80
|
+
.extend({
|
|
81
|
+
stadium: exports.stadiumForRatingSchema,
|
|
73
82
|
});
|
|
74
83
|
exports.stadiumThreadCommentSchema = zod_1.z.object({
|
|
75
84
|
id: zod_1.z.string(),
|