rategame-shared 1.0.62 → 1.0.64
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/game.d.ts +19 -19
- package/dist/schemas/game.js +2 -2
- package/dist/schemas/rating.d.ts +10 -0
- package/dist/schemas/rating.js +1 -0
- package/package.json +1 -1
package/dist/schemas/game.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
71
71
|
isClosed: z.ZodBoolean;
|
|
72
72
|
startedAt: z.ZodNumber;
|
|
73
73
|
finishedAt: z.ZodNumber;
|
|
74
|
-
ratingWindowClosedAt: z.ZodNumber
|
|
74
|
+
ratingWindowClosedAt: z.ZodOptional<z.ZodNumber>;
|
|
75
75
|
round: z.ZodNumber;
|
|
76
76
|
apiGameId: z.ZodNumber;
|
|
77
77
|
league: z.ZodUnion<[z.ZodLiteral<"ncaa">, z.ZodLiteral<"nba">]>;
|
|
@@ -158,7 +158,7 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
158
158
|
awayTeamWins: number;
|
|
159
159
|
gameNumber: number;
|
|
160
160
|
}>>;
|
|
161
|
-
rating: z.ZodObject<{
|
|
161
|
+
rating: z.ZodOptional<z.ZodObject<{
|
|
162
162
|
avg: z.ZodNumber;
|
|
163
163
|
votes: z.ZodObject<{
|
|
164
164
|
options: z.ZodRecord<z.ZodNumber, z.ZodNumber>;
|
|
@@ -182,14 +182,13 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
182
182
|
total: number;
|
|
183
183
|
options: Record<number, number>;
|
|
184
184
|
};
|
|
185
|
-
}
|
|
185
|
+
}>>;
|
|
186
186
|
}, "strip", z.ZodTypeAny, {
|
|
187
187
|
round: number;
|
|
188
188
|
status: "live" | "scheduled" | "final";
|
|
189
189
|
isClosed: boolean;
|
|
190
190
|
startedAt: number;
|
|
191
191
|
finishedAt: number;
|
|
192
|
-
ratingWindowClosedAt: number;
|
|
193
192
|
apiGameId: number;
|
|
194
193
|
league: "ncaa" | "nba";
|
|
195
194
|
homeTeam: {
|
|
@@ -219,27 +218,27 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
219
218
|
}[];
|
|
220
219
|
periodType: "quarter" | "half";
|
|
221
220
|
periodDuration: number;
|
|
222
|
-
rating: {
|
|
223
|
-
avg: number;
|
|
224
|
-
votes: {
|
|
225
|
-
total: number;
|
|
226
|
-
options: Record<number, number>;
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
221
|
id?: string | undefined;
|
|
222
|
+
ratingWindowClosedAt?: number | undefined;
|
|
230
223
|
seriesInfo?: {
|
|
231
224
|
maxLength: number;
|
|
232
225
|
homeTeamWins: number;
|
|
233
226
|
awayTeamWins: number;
|
|
234
227
|
gameNumber: number;
|
|
235
228
|
} | undefined;
|
|
229
|
+
rating?: {
|
|
230
|
+
avg: number;
|
|
231
|
+
votes: {
|
|
232
|
+
total: number;
|
|
233
|
+
options: Record<number, number>;
|
|
234
|
+
};
|
|
235
|
+
} | undefined;
|
|
236
236
|
}, {
|
|
237
237
|
round: number;
|
|
238
238
|
status: "live" | "scheduled" | "final";
|
|
239
239
|
isClosed: boolean;
|
|
240
240
|
startedAt: number;
|
|
241
241
|
finishedAt: number;
|
|
242
|
-
ratingWindowClosedAt: number;
|
|
243
242
|
apiGameId: number;
|
|
244
243
|
league: "ncaa" | "nba";
|
|
245
244
|
homeTeam: {
|
|
@@ -269,20 +268,21 @@ export declare const gameSchema: z.ZodObject<{
|
|
|
269
268
|
}[];
|
|
270
269
|
periodType: "quarter" | "half";
|
|
271
270
|
periodDuration: number;
|
|
272
|
-
rating: {
|
|
273
|
-
avg: number;
|
|
274
|
-
votes: {
|
|
275
|
-
total: number;
|
|
276
|
-
options: Record<number, number>;
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
271
|
id?: string | undefined;
|
|
272
|
+
ratingWindowClosedAt?: number | undefined;
|
|
280
273
|
seriesInfo?: {
|
|
281
274
|
maxLength: number;
|
|
282
275
|
homeTeamWins: number;
|
|
283
276
|
awayTeamWins: number;
|
|
284
277
|
gameNumber: number;
|
|
285
278
|
} | undefined;
|
|
279
|
+
rating?: {
|
|
280
|
+
avg: number;
|
|
281
|
+
votes: {
|
|
282
|
+
total: number;
|
|
283
|
+
options: Record<number, number>;
|
|
284
|
+
};
|
|
285
|
+
} | undefined;
|
|
286
286
|
}>;
|
|
287
287
|
export declare const searchGameSchema: z.ZodObject<{
|
|
288
288
|
q: z.ZodOptional<z.ZodString>;
|
package/dist/schemas/game.js
CHANGED
|
@@ -34,7 +34,7 @@ exports.gameSchema = zod_1.z.object({
|
|
|
34
34
|
isClosed: zod_1.z.boolean(),
|
|
35
35
|
startedAt: zod_1.z.number(),
|
|
36
36
|
finishedAt: zod_1.z.number(),
|
|
37
|
-
ratingWindowClosedAt: zod_1.z.number(),
|
|
37
|
+
ratingWindowClosedAt: zod_1.z.number().optional(),
|
|
38
38
|
round: zod_1.z.number(),
|
|
39
39
|
apiGameId: zod_1.z.number(),
|
|
40
40
|
league: zod_1.z.union([zod_1.z.literal("ncaa"), zod_1.z.literal("nba")]),
|
|
@@ -50,7 +50,7 @@ exports.gameSchema = zod_1.z.object({
|
|
|
50
50
|
periodType: zod_1.z.union([zod_1.z.literal("half"), zod_1.z.literal("quarter")]),
|
|
51
51
|
periodDuration: zod_1.z.number(),
|
|
52
52
|
seriesInfo: exports.seriesInfoSchema.optional(),
|
|
53
|
-
rating: exports.gameRatingAggregateSchema,
|
|
53
|
+
rating: exports.gameRatingAggregateSchema.optional(),
|
|
54
54
|
});
|
|
55
55
|
exports.searchGameSchema = zod_1.z.object({
|
|
56
56
|
q: zod_1.z.string().optional(),
|
package/dist/schemas/rating.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
25
25
|
game: import("zod").ZodObject<{
|
|
26
26
|
id: import("zod").ZodString;
|
|
27
27
|
round: import("zod").ZodNumber;
|
|
28
|
+
league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">]>;
|
|
28
29
|
homeTeam: import("zod").ZodObject<{
|
|
29
30
|
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
31
|
apiTeamId: import("zod").ZodNumber;
|
|
@@ -78,6 +79,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
78
79
|
}, "strip", import("zod").ZodTypeAny, {
|
|
79
80
|
id: string;
|
|
80
81
|
round: number;
|
|
82
|
+
league: "ncaa" | "nba";
|
|
81
83
|
homeTeam: {
|
|
82
84
|
name: string;
|
|
83
85
|
image: string;
|
|
@@ -99,6 +101,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
99
101
|
}, {
|
|
100
102
|
id: string;
|
|
101
103
|
round: number;
|
|
104
|
+
league: "ncaa" | "nba";
|
|
102
105
|
homeTeam: {
|
|
103
106
|
name: string;
|
|
104
107
|
image: string;
|
|
@@ -133,6 +136,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
133
136
|
game: {
|
|
134
137
|
id: string;
|
|
135
138
|
round: number;
|
|
139
|
+
league: "ncaa" | "nba";
|
|
136
140
|
homeTeam: {
|
|
137
141
|
name: string;
|
|
138
142
|
image: string;
|
|
@@ -168,6 +172,7 @@ export declare const ratingSchema: import("zod").ZodObject<{
|
|
|
168
172
|
game: {
|
|
169
173
|
id: string;
|
|
170
174
|
round: number;
|
|
175
|
+
league: "ncaa" | "nba";
|
|
171
176
|
homeTeam: {
|
|
172
177
|
name: string;
|
|
173
178
|
image: string;
|
|
@@ -294,6 +299,7 @@ export declare const createRatingSchema: import("zod").ZodObject<{
|
|
|
294
299
|
game: import("zod").ZodObject<Omit<{
|
|
295
300
|
id: import("zod").ZodString;
|
|
296
301
|
round: import("zod").ZodNumber;
|
|
302
|
+
league: import("zod").ZodUnion<[import("zod").ZodLiteral<"ncaa">, import("zod").ZodLiteral<"nba">]>;
|
|
297
303
|
homeTeam: import("zod").ZodObject<{
|
|
298
304
|
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
299
305
|
apiTeamId: import("zod").ZodNumber;
|
|
@@ -346,13 +352,16 @@ export declare const createRatingSchema: import("zod").ZodObject<{
|
|
|
346
352
|
}>;
|
|
347
353
|
}, "round" | "homeTeam" | "awayTeam">, "strip", import("zod").ZodTypeAny, {
|
|
348
354
|
id: string;
|
|
355
|
+
league: "ncaa" | "nba";
|
|
349
356
|
}, {
|
|
350
357
|
id: string;
|
|
358
|
+
league: "ncaa" | "nba";
|
|
351
359
|
}>;
|
|
352
360
|
}, "strip", import("zod").ZodTypeAny, {
|
|
353
361
|
rating: number;
|
|
354
362
|
game: {
|
|
355
363
|
id: string;
|
|
364
|
+
league: "ncaa" | "nba";
|
|
356
365
|
};
|
|
357
366
|
comment?: string | undefined;
|
|
358
367
|
userLikes?: number | undefined;
|
|
@@ -360,6 +369,7 @@ export declare const createRatingSchema: import("zod").ZodObject<{
|
|
|
360
369
|
rating: number;
|
|
361
370
|
game: {
|
|
362
371
|
id: string;
|
|
372
|
+
league: "ncaa" | "nba";
|
|
363
373
|
};
|
|
364
374
|
comment?: string | undefined;
|
|
365
375
|
userLikes?: number | undefined;
|
package/dist/schemas/rating.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.ratingSchema = (0, zod_1.object)({
|
|
|
18
18
|
game: (0, zod_1.object)({
|
|
19
19
|
id: (0, zod_1.string)(),
|
|
20
20
|
round: (0, zod_1.number)(),
|
|
21
|
+
league: (0, zod_1.union)([(0, zod_1.literal)("ncaa"), (0, zod_1.literal)("nba")]),
|
|
21
22
|
homeTeam: game_1.gameTeamSchema,
|
|
22
23
|
awayTeam: game_1.gameTeamSchema,
|
|
23
24
|
}),
|