rategame-shared 1.1.66 → 1.1.68
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/models/game.d.ts +2 -1
- package/dist/schemas/game.d.ts +228 -50
- package/dist/schemas/game.js +10 -9
- package/dist/schemas/notification.d.ts +16 -16
- package/dist/schemas/rating.d.ts +194 -22
- package/dist/schemas/rating.js +3 -3
- package/dist/schemas/team.d.ts +32 -27
- package/dist/schemas/user.d.ts +8 -8
- package/package.json +1 -1
package/dist/models/game.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { cfbGameSchema, eplGameSchema, gameRatingAggregateSchema, gameSchema, gameTeamSchema, mlbGameSchema, nflGameSchema, searchGameSchema, unionGameSchema, weightedRatingAggregateSchema } from "../schemas/game";
|
|
2
|
+
import { cfbGameSchema, eplGameSchema, gameRatingAggregateSchema, gameSchema, gameTeamSchema, mlbGameSchema, nflGameSchema, searchGameSchema, unionGameSchema, weightedRatingAggregateOptionsSchema, weightedRatingAggregateSchema } from "../schemas/game";
|
|
3
3
|
export type Game = z.infer<typeof gameSchema>;
|
|
4
4
|
export type MLBGame = z.infer<typeof mlbGameSchema>;
|
|
5
5
|
export type GameRatingAggregate = z.infer<typeof gameRatingAggregateSchema>;
|
|
@@ -10,3 +10,4 @@ export type EPLGame = z.infer<typeof eplGameSchema>;
|
|
|
10
10
|
export type NFLGame = z.infer<typeof nflGameSchema>;
|
|
11
11
|
export type CFBGame = z.infer<typeof cfbGameSchema>;
|
|
12
12
|
export type WeightedRatingAggregate = z.infer<typeof weightedRatingAggregateSchema>;
|
|
13
|
+
export type WeightedRatingAggregateOptions = z.infer<typeof weightedRatingAggregateOptionsSchema>;
|
package/dist/schemas/game.d.ts
CHANGED
|
@@ -55,6 +55,34 @@ export declare const gameRatingAggregateSchema: z.ZodObject<{
|
|
|
55
55
|
options: Record<number, number>;
|
|
56
56
|
};
|
|
57
57
|
}>;
|
|
58
|
+
export declare const weightedRatingAggregateOptionsSchema: z.ZodRecord<z.ZodNumber, z.ZodObject<{
|
|
59
|
+
weights: z.ZodRecord<z.ZodNumber, z.ZodObject<{
|
|
60
|
+
weightedRating: z.ZodNumber;
|
|
61
|
+
count: z.ZodNumber;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
weightedRating: number;
|
|
64
|
+
count: number;
|
|
65
|
+
}, {
|
|
66
|
+
weightedRating: number;
|
|
67
|
+
count: number;
|
|
68
|
+
}>>;
|
|
69
|
+
totalWeight: z.ZodNumber;
|
|
70
|
+
count: z.ZodNumber;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
weights: Record<number, {
|
|
73
|
+
weightedRating: number;
|
|
74
|
+
count: number;
|
|
75
|
+
}>;
|
|
76
|
+
count: number;
|
|
77
|
+
totalWeight: number;
|
|
78
|
+
}, {
|
|
79
|
+
weights: Record<number, {
|
|
80
|
+
weightedRating: number;
|
|
81
|
+
count: number;
|
|
82
|
+
}>;
|
|
83
|
+
count: number;
|
|
84
|
+
totalWeight: number;
|
|
85
|
+
}>>;
|
|
58
86
|
export declare const weightedRatingAggregateSchema: z.ZodObject<{
|
|
59
87
|
avg: z.ZodNumber;
|
|
60
88
|
votes: z.ZodObject<{
|
|
@@ -855,7 +883,7 @@ export declare const commonGameSchema: z.ZodObject<{
|
|
|
855
883
|
};
|
|
856
884
|
} | undefined;
|
|
857
885
|
}>;
|
|
858
|
-
export declare const basketballGameSchema: z.ZodObject<{
|
|
886
|
+
export declare const basketballGameSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
859
887
|
id: z.ZodOptional<z.ZodString>;
|
|
860
888
|
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
861
889
|
isClosed: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -967,6 +995,7 @@ export declare const basketballGameSchema: z.ZodObject<{
|
|
|
967
995
|
options: Record<number, number>;
|
|
968
996
|
};
|
|
969
997
|
}>>;
|
|
998
|
+
}, {
|
|
970
999
|
round: z.ZodNumber;
|
|
971
1000
|
timeRemainingMinutes: z.ZodNumber;
|
|
972
1001
|
timeRemainingSeconds: z.ZodNumber;
|
|
@@ -985,7 +1014,7 @@ export declare const basketballGameSchema: z.ZodObject<{
|
|
|
985
1014
|
}>, "many">;
|
|
986
1015
|
periodType: z.ZodUnion<[z.ZodLiteral<"half">, z.ZodLiteral<"quarter">]>;
|
|
987
1016
|
periodDuration: z.ZodNumber;
|
|
988
|
-
}
|
|
1017
|
+
}>, "strip", z.ZodTypeAny, {
|
|
989
1018
|
round: number;
|
|
990
1019
|
status: "live" | "scheduled" | "final";
|
|
991
1020
|
startedAt: number;
|
|
@@ -1107,7 +1136,7 @@ export declare const inningSchema: z.ZodObject<{
|
|
|
1107
1136
|
homeScore: number;
|
|
1108
1137
|
inningNumber: number;
|
|
1109
1138
|
}>;
|
|
1110
|
-
export declare const mlbGameSchema: z.ZodObject<{
|
|
1139
|
+
export declare const mlbGameSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
1111
1140
|
id: z.ZodOptional<z.ZodString>;
|
|
1112
1141
|
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
1113
1142
|
isClosed: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1219,6 +1248,7 @@ export declare const mlbGameSchema: z.ZodObject<{
|
|
|
1219
1248
|
options: Record<number, number>;
|
|
1220
1249
|
};
|
|
1221
1250
|
}>>;
|
|
1251
|
+
}, {
|
|
1222
1252
|
totalInningsRemaining: z.ZodNumber;
|
|
1223
1253
|
innings: z.ZodArray<z.ZodObject<{
|
|
1224
1254
|
inningNumber: z.ZodNumber;
|
|
@@ -1247,7 +1277,7 @@ export declare const mlbGameSchema: z.ZodObject<{
|
|
|
1247
1277
|
runnerOnFirst: z.ZodOptional<z.ZodBoolean>;
|
|
1248
1278
|
runnerOnSecond: z.ZodOptional<z.ZodBoolean>;
|
|
1249
1279
|
runnerOnThird: z.ZodOptional<z.ZodBoolean>;
|
|
1250
|
-
}
|
|
1280
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1251
1281
|
status: "live" | "scheduled" | "final";
|
|
1252
1282
|
startedAt: number;
|
|
1253
1283
|
finishedAt: number;
|
|
@@ -1376,7 +1406,7 @@ export declare const mlbGameSchema: z.ZodObject<{
|
|
|
1376
1406
|
runnerOnSecond?: boolean | undefined;
|
|
1377
1407
|
runnerOnThird?: boolean | undefined;
|
|
1378
1408
|
}>;
|
|
1379
|
-
export declare const eplGameSchema: z.ZodObject<{
|
|
1409
|
+
export declare const eplGameSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
1380
1410
|
id: z.ZodOptional<z.ZodString>;
|
|
1381
1411
|
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
1382
1412
|
isClosed: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1384,6 +1414,69 @@ export declare const eplGameSchema: z.ZodObject<{
|
|
|
1384
1414
|
finishedAt: z.ZodNumber;
|
|
1385
1415
|
ratingWindowClosedAt: z.ZodOptional<z.ZodNumber>;
|
|
1386
1416
|
apiGameId: z.ZodNumber;
|
|
1417
|
+
league: z.ZodUnion<[z.ZodLiteral<"ncaa">, z.ZodLiteral<"nba">, z.ZodLiteral<"mlb">, z.ZodLiteral<"nfl">, z.ZodLiteral<"nhl">, z.ZodLiteral<"mls">, z.ZodLiteral<"cfb">, z.ZodLiteral<"cbb">, z.ZodLiteral<"epl">]>;
|
|
1418
|
+
homeTeam: z.ZodObject<{
|
|
1419
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1420
|
+
apiTeamId: z.ZodNumber;
|
|
1421
|
+
name: z.ZodString;
|
|
1422
|
+
score: z.ZodNumber;
|
|
1423
|
+
isWinner: z.ZodOptional<z.ZodBoolean>;
|
|
1424
|
+
image: z.ZodString;
|
|
1425
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
1426
|
+
teamCode: z.ZodOptional<z.ZodString>;
|
|
1427
|
+
scoreExtraTime: z.ZodOptional<z.ZodNumber>;
|
|
1428
|
+
}, "strip", z.ZodTypeAny, {
|
|
1429
|
+
name: string;
|
|
1430
|
+
image: string;
|
|
1431
|
+
apiTeamId: number;
|
|
1432
|
+
score: number;
|
|
1433
|
+
id?: string | undefined;
|
|
1434
|
+
isWinner?: boolean | undefined;
|
|
1435
|
+
seed?: number | undefined;
|
|
1436
|
+
teamCode?: string | undefined;
|
|
1437
|
+
scoreExtraTime?: number | undefined;
|
|
1438
|
+
}, {
|
|
1439
|
+
name: string;
|
|
1440
|
+
image: string;
|
|
1441
|
+
apiTeamId: number;
|
|
1442
|
+
score: number;
|
|
1443
|
+
id?: string | undefined;
|
|
1444
|
+
isWinner?: boolean | undefined;
|
|
1445
|
+
seed?: number | undefined;
|
|
1446
|
+
teamCode?: string | undefined;
|
|
1447
|
+
scoreExtraTime?: number | undefined;
|
|
1448
|
+
}>;
|
|
1449
|
+
awayTeam: z.ZodObject<{
|
|
1450
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1451
|
+
apiTeamId: z.ZodNumber;
|
|
1452
|
+
name: z.ZodString;
|
|
1453
|
+
score: z.ZodNumber;
|
|
1454
|
+
isWinner: z.ZodOptional<z.ZodBoolean>;
|
|
1455
|
+
image: z.ZodString;
|
|
1456
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
1457
|
+
teamCode: z.ZodOptional<z.ZodString>;
|
|
1458
|
+
scoreExtraTime: z.ZodOptional<z.ZodNumber>;
|
|
1459
|
+
}, "strip", z.ZodTypeAny, {
|
|
1460
|
+
name: string;
|
|
1461
|
+
image: string;
|
|
1462
|
+
apiTeamId: number;
|
|
1463
|
+
score: number;
|
|
1464
|
+
id?: string | undefined;
|
|
1465
|
+
isWinner?: boolean | undefined;
|
|
1466
|
+
seed?: number | undefined;
|
|
1467
|
+
teamCode?: string | undefined;
|
|
1468
|
+
scoreExtraTime?: number | undefined;
|
|
1469
|
+
}, {
|
|
1470
|
+
name: string;
|
|
1471
|
+
image: string;
|
|
1472
|
+
apiTeamId: number;
|
|
1473
|
+
score: number;
|
|
1474
|
+
id?: string | undefined;
|
|
1475
|
+
isWinner?: boolean | undefined;
|
|
1476
|
+
seed?: number | undefined;
|
|
1477
|
+
teamCode?: string | undefined;
|
|
1478
|
+
scoreExtraTime?: number | undefined;
|
|
1479
|
+
}>;
|
|
1387
1480
|
seriesInfo: z.ZodOptional<z.ZodObject<{
|
|
1388
1481
|
homeTeamWins: z.ZodNumber;
|
|
1389
1482
|
awayTeamWins: z.ZodNumber;
|
|
@@ -1425,6 +1518,7 @@ export declare const eplGameSchema: z.ZodObject<{
|
|
|
1425
1518
|
options: Record<number, number>;
|
|
1426
1519
|
};
|
|
1427
1520
|
}>>;
|
|
1521
|
+
}, {
|
|
1428
1522
|
league: z.ZodLiteral<"epl">;
|
|
1429
1523
|
week: z.ZodNumber;
|
|
1430
1524
|
period: z.ZodString;
|
|
@@ -1434,21 +1528,23 @@ export declare const eplGameSchema: z.ZodObject<{
|
|
|
1434
1528
|
venueType: z.ZodString;
|
|
1435
1529
|
attendance: z.ZodNumber;
|
|
1436
1530
|
aggregateScore: z.ZodString;
|
|
1437
|
-
homeTeam: z.ZodObject<{
|
|
1531
|
+
homeTeam: z.ZodObject<z.objectUtil.extendShape<{
|
|
1438
1532
|
id: z.ZodOptional<z.ZodString>;
|
|
1439
|
-
name: z.ZodString;
|
|
1440
|
-
image: z.ZodString;
|
|
1441
1533
|
apiTeamId: z.ZodNumber;
|
|
1534
|
+
name: z.ZodString;
|
|
1442
1535
|
score: z.ZodNumber;
|
|
1443
1536
|
isWinner: z.ZodOptional<z.ZodBoolean>;
|
|
1537
|
+
image: z.ZodString;
|
|
1444
1538
|
seed: z.ZodOptional<z.ZodNumber>;
|
|
1445
1539
|
teamCode: z.ZodOptional<z.ZodString>;
|
|
1540
|
+
scoreExtraTime: z.ZodOptional<z.ZodNumber>;
|
|
1541
|
+
}, {
|
|
1446
1542
|
scorePeriod1: z.ZodNumber;
|
|
1447
1543
|
scorePeriod2: z.ZodNumber;
|
|
1448
1544
|
scoreExtraTime: z.ZodNumber;
|
|
1449
1545
|
scorePenalty: z.ZodNumber;
|
|
1450
1546
|
venueName: z.ZodOptional<z.ZodString>;
|
|
1451
|
-
}
|
|
1547
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1452
1548
|
name: string;
|
|
1453
1549
|
image: string;
|
|
1454
1550
|
apiTeamId: number;
|
|
@@ -1477,21 +1573,23 @@ export declare const eplGameSchema: z.ZodObject<{
|
|
|
1477
1573
|
teamCode?: string | undefined;
|
|
1478
1574
|
venueName?: string | undefined;
|
|
1479
1575
|
}>;
|
|
1480
|
-
awayTeam: z.ZodObject<{
|
|
1576
|
+
awayTeam: z.ZodObject<z.objectUtil.extendShape<{
|
|
1481
1577
|
id: z.ZodOptional<z.ZodString>;
|
|
1482
|
-
name: z.ZodString;
|
|
1483
|
-
image: z.ZodString;
|
|
1484
1578
|
apiTeamId: z.ZodNumber;
|
|
1579
|
+
name: z.ZodString;
|
|
1485
1580
|
score: z.ZodNumber;
|
|
1486
1581
|
isWinner: z.ZodOptional<z.ZodBoolean>;
|
|
1582
|
+
image: z.ZodString;
|
|
1487
1583
|
seed: z.ZodOptional<z.ZodNumber>;
|
|
1488
1584
|
teamCode: z.ZodOptional<z.ZodString>;
|
|
1585
|
+
scoreExtraTime: z.ZodOptional<z.ZodNumber>;
|
|
1586
|
+
}, {
|
|
1489
1587
|
scorePeriod1: z.ZodNumber;
|
|
1490
1588
|
scorePeriod2: z.ZodNumber;
|
|
1491
1589
|
scoreExtraTime: z.ZodNumber;
|
|
1492
1590
|
scorePenalty: z.ZodNumber;
|
|
1493
1591
|
venueName: z.ZodOptional<z.ZodString>;
|
|
1494
|
-
}
|
|
1592
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1495
1593
|
name: string;
|
|
1496
1594
|
image: string;
|
|
1497
1595
|
apiTeamId: number;
|
|
@@ -1521,7 +1619,7 @@ export declare const eplGameSchema: z.ZodObject<{
|
|
|
1521
1619
|
venueName?: string | undefined;
|
|
1522
1620
|
}>;
|
|
1523
1621
|
hadExtraTime: z.ZodBoolean;
|
|
1524
|
-
}
|
|
1622
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1525
1623
|
status: "live" | "scheduled" | "final";
|
|
1526
1624
|
week: number;
|
|
1527
1625
|
startedAt: number;
|
|
@@ -1644,15 +1742,14 @@ export declare const eplGameSchema: z.ZodObject<{
|
|
|
1644
1742
|
};
|
|
1645
1743
|
} | undefined;
|
|
1646
1744
|
}>;
|
|
1647
|
-
export declare const nflGameSchema: z.ZodObject<{
|
|
1745
|
+
export declare const nflGameSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1648
1746
|
id: z.ZodOptional<z.ZodString>;
|
|
1649
1747
|
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
1650
|
-
quarter: z.ZodNullable<z.ZodString>;
|
|
1651
|
-
week: z.ZodOptional<z.ZodNumber>;
|
|
1652
1748
|
isClosed: z.ZodOptional<z.ZodBoolean>;
|
|
1653
1749
|
startedAt: z.ZodNumber;
|
|
1654
1750
|
finishedAt: z.ZodNumber;
|
|
1655
1751
|
ratingWindowClosedAt: z.ZodOptional<z.ZodNumber>;
|
|
1752
|
+
apiGameId: z.ZodNumber;
|
|
1656
1753
|
league: z.ZodUnion<[z.ZodLiteral<"ncaa">, z.ZodLiteral<"nba">, z.ZodLiteral<"mlb">, z.ZodLiteral<"nfl">, z.ZodLiteral<"nhl">, z.ZodLiteral<"mls">, z.ZodLiteral<"cfb">, z.ZodLiteral<"cbb">, z.ZodLiteral<"epl">]>;
|
|
1657
1754
|
homeTeam: z.ZodObject<{
|
|
1658
1755
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1757,13 +1854,17 @@ export declare const nflGameSchema: z.ZodObject<{
|
|
|
1757
1854
|
options: Record<number, number>;
|
|
1758
1855
|
};
|
|
1759
1856
|
}>>;
|
|
1857
|
+
}, {
|
|
1760
1858
|
possession: z.ZodNullable<z.ZodString>;
|
|
1761
1859
|
down: z.ZodNullable<z.ZodNumber>;
|
|
1762
1860
|
distance: z.ZodNullable<z.ZodString>;
|
|
1763
1861
|
yardLine: z.ZodNullable<z.ZodNumber>;
|
|
1764
1862
|
seasonType: z.ZodNumber;
|
|
1765
1863
|
season: z.ZodNumber;
|
|
1864
|
+
week: z.ZodOptional<z.ZodNumber>;
|
|
1865
|
+
quarter: z.ZodNullable<z.ZodString>;
|
|
1766
1866
|
yardLineTerritory: z.ZodNullable<z.ZodString>;
|
|
1867
|
+
}>, {
|
|
1767
1868
|
apiGameId: z.ZodString;
|
|
1768
1869
|
timeRemaining: z.ZodNullable<z.ZodString>;
|
|
1769
1870
|
redZone: z.ZodNullable<z.ZodString>;
|
|
@@ -1812,7 +1913,7 @@ export declare const nflGameSchema: z.ZodObject<{
|
|
|
1812
1913
|
GeoLong: number | null;
|
|
1813
1914
|
Type: string | null;
|
|
1814
1915
|
}>>;
|
|
1815
|
-
}
|
|
1916
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1816
1917
|
status: "live" | "scheduled" | "final";
|
|
1817
1918
|
quarter: string | null;
|
|
1818
1919
|
startedAt: number;
|
|
@@ -1969,11 +2070,9 @@ export declare const nflGameSchema: z.ZodObject<{
|
|
|
1969
2070
|
Type: string | null;
|
|
1970
2071
|
} | undefined;
|
|
1971
2072
|
}>;
|
|
1972
|
-
export declare const cfbGameSchema: z.ZodObject<{
|
|
2073
|
+
export declare const cfbGameSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1973
2074
|
id: z.ZodOptional<z.ZodString>;
|
|
1974
2075
|
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
1975
|
-
quarter: z.ZodNullable<z.ZodString>;
|
|
1976
|
-
week: z.ZodOptional<z.ZodNumber>;
|
|
1977
2076
|
isClosed: z.ZodOptional<z.ZodBoolean>;
|
|
1978
2077
|
startedAt: z.ZodNumber;
|
|
1979
2078
|
finishedAt: z.ZodNumber;
|
|
@@ -2083,13 +2182,17 @@ export declare const cfbGameSchema: z.ZodObject<{
|
|
|
2083
2182
|
options: Record<number, number>;
|
|
2084
2183
|
};
|
|
2085
2184
|
}>>;
|
|
2185
|
+
}, {
|
|
2086
2186
|
possession: z.ZodNullable<z.ZodString>;
|
|
2087
2187
|
down: z.ZodNullable<z.ZodNumber>;
|
|
2088
2188
|
distance: z.ZodNullable<z.ZodString>;
|
|
2089
2189
|
yardLine: z.ZodNullable<z.ZodNumber>;
|
|
2090
2190
|
seasonType: z.ZodNumber;
|
|
2091
2191
|
season: z.ZodNumber;
|
|
2192
|
+
week: z.ZodOptional<z.ZodNumber>;
|
|
2193
|
+
quarter: z.ZodNullable<z.ZodString>;
|
|
2092
2194
|
yardLineTerritory: z.ZodNullable<z.ZodString>;
|
|
2195
|
+
}>, {
|
|
2093
2196
|
timeRemainingMinutes: z.ZodNumber;
|
|
2094
2197
|
timeRemainingSeconds: z.ZodNumber;
|
|
2095
2198
|
periods: z.ZodArray<z.ZodObject<{
|
|
@@ -2134,7 +2237,7 @@ export declare const cfbGameSchema: z.ZodObject<{
|
|
|
2134
2237
|
Dome: boolean;
|
|
2135
2238
|
}>>;
|
|
2136
2239
|
attendance: z.ZodNumber;
|
|
2137
|
-
}
|
|
2240
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2138
2241
|
status: "live" | "scheduled" | "final";
|
|
2139
2242
|
quarter: string | null;
|
|
2140
2243
|
startedAt: number;
|
|
@@ -2277,7 +2380,7 @@ export declare const cfbGameSchema: z.ZodObject<{
|
|
|
2277
2380
|
Dome: boolean;
|
|
2278
2381
|
} | undefined;
|
|
2279
2382
|
}>;
|
|
2280
|
-
export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
2383
|
+
export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
2281
2384
|
id: z.ZodOptional<z.ZodString>;
|
|
2282
2385
|
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
2283
2386
|
isClosed: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2389,6 +2492,7 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2389
2492
|
options: Record<number, number>;
|
|
2390
2493
|
};
|
|
2391
2494
|
}>>;
|
|
2495
|
+
}, {
|
|
2392
2496
|
round: z.ZodNumber;
|
|
2393
2497
|
timeRemainingMinutes: z.ZodNumber;
|
|
2394
2498
|
timeRemainingSeconds: z.ZodNumber;
|
|
@@ -2407,7 +2511,7 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2407
2511
|
}>, "many">;
|
|
2408
2512
|
periodType: z.ZodUnion<[z.ZodLiteral<"half">, z.ZodLiteral<"quarter">]>;
|
|
2409
2513
|
periodDuration: z.ZodNumber;
|
|
2410
|
-
}
|
|
2514
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2411
2515
|
round: number;
|
|
2412
2516
|
status: "live" | "scheduled" | "final";
|
|
2413
2517
|
startedAt: number;
|
|
@@ -2515,7 +2619,7 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2515
2619
|
options: Record<number, number>;
|
|
2516
2620
|
};
|
|
2517
2621
|
} | undefined;
|
|
2518
|
-
}>, z.ZodObject<{
|
|
2622
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
2519
2623
|
id: z.ZodOptional<z.ZodString>;
|
|
2520
2624
|
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
2521
2625
|
isClosed: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2627,6 +2731,7 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2627
2731
|
options: Record<number, number>;
|
|
2628
2732
|
};
|
|
2629
2733
|
}>>;
|
|
2734
|
+
}, {
|
|
2630
2735
|
totalInningsRemaining: z.ZodNumber;
|
|
2631
2736
|
innings: z.ZodArray<z.ZodObject<{
|
|
2632
2737
|
inningNumber: z.ZodNumber;
|
|
@@ -2655,7 +2760,7 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2655
2760
|
runnerOnFirst: z.ZodOptional<z.ZodBoolean>;
|
|
2656
2761
|
runnerOnSecond: z.ZodOptional<z.ZodBoolean>;
|
|
2657
2762
|
runnerOnThird: z.ZodOptional<z.ZodBoolean>;
|
|
2658
|
-
}
|
|
2763
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2659
2764
|
status: "live" | "scheduled" | "final";
|
|
2660
2765
|
startedAt: number;
|
|
2661
2766
|
finishedAt: number;
|
|
@@ -2783,7 +2888,7 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2783
2888
|
runnerOnFirst?: boolean | undefined;
|
|
2784
2889
|
runnerOnSecond?: boolean | undefined;
|
|
2785
2890
|
runnerOnThird?: boolean | undefined;
|
|
2786
|
-
}>, z.ZodObject<{
|
|
2891
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
2787
2892
|
id: z.ZodOptional<z.ZodString>;
|
|
2788
2893
|
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
2789
2894
|
isClosed: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2791,6 +2896,69 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2791
2896
|
finishedAt: z.ZodNumber;
|
|
2792
2897
|
ratingWindowClosedAt: z.ZodOptional<z.ZodNumber>;
|
|
2793
2898
|
apiGameId: z.ZodNumber;
|
|
2899
|
+
league: z.ZodUnion<[z.ZodLiteral<"ncaa">, z.ZodLiteral<"nba">, z.ZodLiteral<"mlb">, z.ZodLiteral<"nfl">, z.ZodLiteral<"nhl">, z.ZodLiteral<"mls">, z.ZodLiteral<"cfb">, z.ZodLiteral<"cbb">, z.ZodLiteral<"epl">]>;
|
|
2900
|
+
homeTeam: z.ZodObject<{
|
|
2901
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2902
|
+
apiTeamId: z.ZodNumber;
|
|
2903
|
+
name: z.ZodString;
|
|
2904
|
+
score: z.ZodNumber;
|
|
2905
|
+
isWinner: z.ZodOptional<z.ZodBoolean>;
|
|
2906
|
+
image: z.ZodString;
|
|
2907
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
2908
|
+
teamCode: z.ZodOptional<z.ZodString>;
|
|
2909
|
+
scoreExtraTime: z.ZodOptional<z.ZodNumber>;
|
|
2910
|
+
}, "strip", z.ZodTypeAny, {
|
|
2911
|
+
name: string;
|
|
2912
|
+
image: string;
|
|
2913
|
+
apiTeamId: number;
|
|
2914
|
+
score: number;
|
|
2915
|
+
id?: string | undefined;
|
|
2916
|
+
isWinner?: boolean | undefined;
|
|
2917
|
+
seed?: number | undefined;
|
|
2918
|
+
teamCode?: string | undefined;
|
|
2919
|
+
scoreExtraTime?: number | undefined;
|
|
2920
|
+
}, {
|
|
2921
|
+
name: string;
|
|
2922
|
+
image: string;
|
|
2923
|
+
apiTeamId: number;
|
|
2924
|
+
score: number;
|
|
2925
|
+
id?: string | undefined;
|
|
2926
|
+
isWinner?: boolean | undefined;
|
|
2927
|
+
seed?: number | undefined;
|
|
2928
|
+
teamCode?: string | undefined;
|
|
2929
|
+
scoreExtraTime?: number | undefined;
|
|
2930
|
+
}>;
|
|
2931
|
+
awayTeam: z.ZodObject<{
|
|
2932
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2933
|
+
apiTeamId: z.ZodNumber;
|
|
2934
|
+
name: z.ZodString;
|
|
2935
|
+
score: z.ZodNumber;
|
|
2936
|
+
isWinner: z.ZodOptional<z.ZodBoolean>;
|
|
2937
|
+
image: z.ZodString;
|
|
2938
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
2939
|
+
teamCode: z.ZodOptional<z.ZodString>;
|
|
2940
|
+
scoreExtraTime: z.ZodOptional<z.ZodNumber>;
|
|
2941
|
+
}, "strip", z.ZodTypeAny, {
|
|
2942
|
+
name: string;
|
|
2943
|
+
image: string;
|
|
2944
|
+
apiTeamId: number;
|
|
2945
|
+
score: number;
|
|
2946
|
+
id?: string | undefined;
|
|
2947
|
+
isWinner?: boolean | undefined;
|
|
2948
|
+
seed?: number | undefined;
|
|
2949
|
+
teamCode?: string | undefined;
|
|
2950
|
+
scoreExtraTime?: number | undefined;
|
|
2951
|
+
}, {
|
|
2952
|
+
name: string;
|
|
2953
|
+
image: string;
|
|
2954
|
+
apiTeamId: number;
|
|
2955
|
+
score: number;
|
|
2956
|
+
id?: string | undefined;
|
|
2957
|
+
isWinner?: boolean | undefined;
|
|
2958
|
+
seed?: number | undefined;
|
|
2959
|
+
teamCode?: string | undefined;
|
|
2960
|
+
scoreExtraTime?: number | undefined;
|
|
2961
|
+
}>;
|
|
2794
2962
|
seriesInfo: z.ZodOptional<z.ZodObject<{
|
|
2795
2963
|
homeTeamWins: z.ZodNumber;
|
|
2796
2964
|
awayTeamWins: z.ZodNumber;
|
|
@@ -2832,6 +3000,7 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2832
3000
|
options: Record<number, number>;
|
|
2833
3001
|
};
|
|
2834
3002
|
}>>;
|
|
3003
|
+
}, {
|
|
2835
3004
|
league: z.ZodLiteral<"epl">;
|
|
2836
3005
|
week: z.ZodNumber;
|
|
2837
3006
|
period: z.ZodString;
|
|
@@ -2841,21 +3010,23 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2841
3010
|
venueType: z.ZodString;
|
|
2842
3011
|
attendance: z.ZodNumber;
|
|
2843
3012
|
aggregateScore: z.ZodString;
|
|
2844
|
-
homeTeam: z.ZodObject<{
|
|
3013
|
+
homeTeam: z.ZodObject<z.objectUtil.extendShape<{
|
|
2845
3014
|
id: z.ZodOptional<z.ZodString>;
|
|
2846
|
-
name: z.ZodString;
|
|
2847
|
-
image: z.ZodString;
|
|
2848
3015
|
apiTeamId: z.ZodNumber;
|
|
3016
|
+
name: z.ZodString;
|
|
2849
3017
|
score: z.ZodNumber;
|
|
2850
3018
|
isWinner: z.ZodOptional<z.ZodBoolean>;
|
|
3019
|
+
image: z.ZodString;
|
|
2851
3020
|
seed: z.ZodOptional<z.ZodNumber>;
|
|
2852
3021
|
teamCode: z.ZodOptional<z.ZodString>;
|
|
3022
|
+
scoreExtraTime: z.ZodOptional<z.ZodNumber>;
|
|
3023
|
+
}, {
|
|
2853
3024
|
scorePeriod1: z.ZodNumber;
|
|
2854
3025
|
scorePeriod2: z.ZodNumber;
|
|
2855
3026
|
scoreExtraTime: z.ZodNumber;
|
|
2856
3027
|
scorePenalty: z.ZodNumber;
|
|
2857
3028
|
venueName: z.ZodOptional<z.ZodString>;
|
|
2858
|
-
}
|
|
3029
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2859
3030
|
name: string;
|
|
2860
3031
|
image: string;
|
|
2861
3032
|
apiTeamId: number;
|
|
@@ -2884,21 +3055,23 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2884
3055
|
teamCode?: string | undefined;
|
|
2885
3056
|
venueName?: string | undefined;
|
|
2886
3057
|
}>;
|
|
2887
|
-
awayTeam: z.ZodObject<{
|
|
3058
|
+
awayTeam: z.ZodObject<z.objectUtil.extendShape<{
|
|
2888
3059
|
id: z.ZodOptional<z.ZodString>;
|
|
2889
|
-
name: z.ZodString;
|
|
2890
|
-
image: z.ZodString;
|
|
2891
3060
|
apiTeamId: z.ZodNumber;
|
|
3061
|
+
name: z.ZodString;
|
|
2892
3062
|
score: z.ZodNumber;
|
|
2893
3063
|
isWinner: z.ZodOptional<z.ZodBoolean>;
|
|
3064
|
+
image: z.ZodString;
|
|
2894
3065
|
seed: z.ZodOptional<z.ZodNumber>;
|
|
2895
3066
|
teamCode: z.ZodOptional<z.ZodString>;
|
|
3067
|
+
scoreExtraTime: z.ZodOptional<z.ZodNumber>;
|
|
3068
|
+
}, {
|
|
2896
3069
|
scorePeriod1: z.ZodNumber;
|
|
2897
3070
|
scorePeriod2: z.ZodNumber;
|
|
2898
3071
|
scoreExtraTime: z.ZodNumber;
|
|
2899
3072
|
scorePenalty: z.ZodNumber;
|
|
2900
3073
|
venueName: z.ZodOptional<z.ZodString>;
|
|
2901
|
-
}
|
|
3074
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2902
3075
|
name: string;
|
|
2903
3076
|
image: string;
|
|
2904
3077
|
apiTeamId: number;
|
|
@@ -2928,7 +3101,7 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2928
3101
|
venueName?: string | undefined;
|
|
2929
3102
|
}>;
|
|
2930
3103
|
hadExtraTime: z.ZodBoolean;
|
|
2931
|
-
}
|
|
3104
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2932
3105
|
status: "live" | "scheduled" | "final";
|
|
2933
3106
|
week: number;
|
|
2934
3107
|
startedAt: number;
|
|
@@ -3050,15 +3223,14 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3050
3223
|
options: Record<number, number>;
|
|
3051
3224
|
};
|
|
3052
3225
|
} | undefined;
|
|
3053
|
-
}>, z.ZodObject<{
|
|
3226
|
+
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3054
3227
|
id: z.ZodOptional<z.ZodString>;
|
|
3055
3228
|
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
3056
|
-
quarter: z.ZodNullable<z.ZodString>;
|
|
3057
|
-
week: z.ZodOptional<z.ZodNumber>;
|
|
3058
3229
|
isClosed: z.ZodOptional<z.ZodBoolean>;
|
|
3059
3230
|
startedAt: z.ZodNumber;
|
|
3060
3231
|
finishedAt: z.ZodNumber;
|
|
3061
3232
|
ratingWindowClosedAt: z.ZodOptional<z.ZodNumber>;
|
|
3233
|
+
apiGameId: z.ZodNumber;
|
|
3062
3234
|
league: z.ZodUnion<[z.ZodLiteral<"ncaa">, z.ZodLiteral<"nba">, z.ZodLiteral<"mlb">, z.ZodLiteral<"nfl">, z.ZodLiteral<"nhl">, z.ZodLiteral<"mls">, z.ZodLiteral<"cfb">, z.ZodLiteral<"cbb">, z.ZodLiteral<"epl">]>;
|
|
3063
3235
|
homeTeam: z.ZodObject<{
|
|
3064
3236
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -3163,13 +3335,17 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3163
3335
|
options: Record<number, number>;
|
|
3164
3336
|
};
|
|
3165
3337
|
}>>;
|
|
3338
|
+
}, {
|
|
3166
3339
|
possession: z.ZodNullable<z.ZodString>;
|
|
3167
3340
|
down: z.ZodNullable<z.ZodNumber>;
|
|
3168
3341
|
distance: z.ZodNullable<z.ZodString>;
|
|
3169
3342
|
yardLine: z.ZodNullable<z.ZodNumber>;
|
|
3170
3343
|
seasonType: z.ZodNumber;
|
|
3171
3344
|
season: z.ZodNumber;
|
|
3345
|
+
week: z.ZodOptional<z.ZodNumber>;
|
|
3346
|
+
quarter: z.ZodNullable<z.ZodString>;
|
|
3172
3347
|
yardLineTerritory: z.ZodNullable<z.ZodString>;
|
|
3348
|
+
}>, {
|
|
3173
3349
|
apiGameId: z.ZodString;
|
|
3174
3350
|
timeRemaining: z.ZodNullable<z.ZodString>;
|
|
3175
3351
|
redZone: z.ZodNullable<z.ZodString>;
|
|
@@ -3218,7 +3394,7 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3218
3394
|
GeoLong: number | null;
|
|
3219
3395
|
Type: string | null;
|
|
3220
3396
|
}>>;
|
|
3221
|
-
}
|
|
3397
|
+
}>, "strip", z.ZodTypeAny, {
|
|
3222
3398
|
status: "live" | "scheduled" | "final";
|
|
3223
3399
|
quarter: string | null;
|
|
3224
3400
|
startedAt: number;
|
|
@@ -3374,11 +3550,9 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3374
3550
|
GeoLong: number | null;
|
|
3375
3551
|
Type: string | null;
|
|
3376
3552
|
} | undefined;
|
|
3377
|
-
}>, z.ZodObject<{
|
|
3553
|
+
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3378
3554
|
id: z.ZodOptional<z.ZodString>;
|
|
3379
3555
|
status: z.ZodUnion<[z.ZodLiteral<"scheduled">, z.ZodLiteral<"live">, z.ZodLiteral<"final">]>;
|
|
3380
|
-
quarter: z.ZodNullable<z.ZodString>;
|
|
3381
|
-
week: z.ZodOptional<z.ZodNumber>;
|
|
3382
3556
|
isClosed: z.ZodOptional<z.ZodBoolean>;
|
|
3383
3557
|
startedAt: z.ZodNumber;
|
|
3384
3558
|
finishedAt: z.ZodNumber;
|
|
@@ -3488,13 +3662,17 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3488
3662
|
options: Record<number, number>;
|
|
3489
3663
|
};
|
|
3490
3664
|
}>>;
|
|
3665
|
+
}, {
|
|
3491
3666
|
possession: z.ZodNullable<z.ZodString>;
|
|
3492
3667
|
down: z.ZodNullable<z.ZodNumber>;
|
|
3493
3668
|
distance: z.ZodNullable<z.ZodString>;
|
|
3494
3669
|
yardLine: z.ZodNullable<z.ZodNumber>;
|
|
3495
3670
|
seasonType: z.ZodNumber;
|
|
3496
3671
|
season: z.ZodNumber;
|
|
3672
|
+
week: z.ZodOptional<z.ZodNumber>;
|
|
3673
|
+
quarter: z.ZodNullable<z.ZodString>;
|
|
3497
3674
|
yardLineTerritory: z.ZodNullable<z.ZodString>;
|
|
3675
|
+
}>, {
|
|
3498
3676
|
timeRemainingMinutes: z.ZodNumber;
|
|
3499
3677
|
timeRemainingSeconds: z.ZodNumber;
|
|
3500
3678
|
periods: z.ZodArray<z.ZodObject<{
|
|
@@ -3539,7 +3717,7 @@ export declare const unionGameSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3539
3717
|
Dome: boolean;
|
|
3540
3718
|
}>>;
|
|
3541
3719
|
attendance: z.ZodNumber;
|
|
3542
|
-
}
|
|
3720
|
+
}>, "strip", z.ZodTypeAny, {
|
|
3543
3721
|
status: "live" | "scheduled" | "final";
|
|
3544
3722
|
quarter: string | null;
|
|
3545
3723
|
startedAt: number;
|
|
@@ -3693,20 +3871,20 @@ export declare const searchGameSchema: z.ZodObject<{
|
|
|
3693
3871
|
offset: z.ZodOptional<z.ZodString>;
|
|
3694
3872
|
}, "strip", z.ZodTypeAny, {
|
|
3695
3873
|
league: "nba" | "ncaa" | "mlb" | "nfl" | "nhl" | "mls" | "cfb" | "cbb" | "epl";
|
|
3696
|
-
|
|
3697
|
-
teamId?: string | undefined;
|
|
3874
|
+
offset?: string | undefined;
|
|
3698
3875
|
round?: string | undefined;
|
|
3876
|
+
q?: string | undefined;
|
|
3699
3877
|
createdAt?: "12h" | "daily" | "weekly" | undefined;
|
|
3878
|
+
teamId?: string | undefined;
|
|
3700
3879
|
sortBy?: "rating.avg:asc" | "rating.avg:desc" | "startedAt:asc" | "startedAt:desc" | undefined;
|
|
3701
3880
|
limit?: string | undefined;
|
|
3702
|
-
offset?: string | undefined;
|
|
3703
3881
|
}, {
|
|
3704
3882
|
league: "nba" | "ncaa" | "mlb" | "nfl" | "nhl" | "mls" | "cfb" | "cbb" | "epl";
|
|
3705
|
-
|
|
3706
|
-
teamId?: string | undefined;
|
|
3883
|
+
offset?: string | undefined;
|
|
3707
3884
|
round?: string | undefined;
|
|
3885
|
+
q?: string | undefined;
|
|
3708
3886
|
createdAt?: "12h" | "daily" | "weekly" | undefined;
|
|
3887
|
+
teamId?: string | undefined;
|
|
3709
3888
|
sortBy?: "rating.avg:asc" | "rating.avg:desc" | "startedAt:asc" | "startedAt:desc" | undefined;
|
|
3710
3889
|
limit?: string | undefined;
|
|
3711
|
-
offset?: string | undefined;
|
|
3712
3890
|
}>;
|
package/dist/schemas/game.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchGameSchema = exports.unionGameSchema = exports.cfbGameSchema = exports.nflGameSchema = exports.eplGameSchema = exports.mlbGameSchema = exports.inningSchema = exports.basketballGameSchema = exports.commonGameSchema = exports.gameSchema = exports.seriesInfoSchema = exports.weightedRatingAggregateSchema = exports.gameRatingAggregateSchema = exports.gameTeamSchema = void 0;
|
|
3
|
+
exports.searchGameSchema = exports.unionGameSchema = exports.cfbGameSchema = exports.nflGameSchema = exports.eplGameSchema = exports.mlbGameSchema = exports.inningSchema = exports.basketballGameSchema = exports.commonGameSchema = exports.gameSchema = exports.seriesInfoSchema = exports.weightedRatingAggregateSchema = exports.weightedRatingAggregateOptionsSchema = exports.gameRatingAggregateSchema = exports.gameTeamSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.gameTeamSchema = zod_1.z.object({
|
|
6
6
|
id: zod_1.z.string().optional(),
|
|
@@ -20,17 +20,18 @@ exports.gameRatingAggregateSchema = zod_1.z.object({
|
|
|
20
20
|
total: zod_1.z.number(),
|
|
21
21
|
}),
|
|
22
22
|
});
|
|
23
|
+
exports.weightedRatingAggregateOptionsSchema = zod_1.z.record(zod_1.z.number(), zod_1.z.object({
|
|
24
|
+
weights: zod_1.z.record(zod_1.z.number(), zod_1.z.object({
|
|
25
|
+
weightedRating: zod_1.z.number(),
|
|
26
|
+
count: zod_1.z.number(),
|
|
27
|
+
})),
|
|
28
|
+
totalWeight: zod_1.z.number(),
|
|
29
|
+
count: zod_1.z.number(),
|
|
30
|
+
}));
|
|
23
31
|
exports.weightedRatingAggregateSchema = zod_1.z.object({
|
|
24
32
|
avg: zod_1.z.number(),
|
|
25
33
|
votes: zod_1.z.object({
|
|
26
|
-
options:
|
|
27
|
-
weights: zod_1.z.record(zod_1.z.number(), zod_1.z.object({
|
|
28
|
-
weightedRating: zod_1.z.number(),
|
|
29
|
-
count: zod_1.z.number(),
|
|
30
|
-
})),
|
|
31
|
-
totalWeight: zod_1.z.number(),
|
|
32
|
-
count: zod_1.z.number(),
|
|
33
|
-
})),
|
|
34
|
+
options: exports.weightedRatingAggregateOptionsSchema,
|
|
34
35
|
total: zod_1.z.number(),
|
|
35
36
|
totalWeight: zod_1.z.number(),
|
|
36
37
|
}),
|