rategame-shared 1.1.509 → 1.1.511
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/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/models/playerStats.d.ts +39 -0
- package/dist/models/playerStats.js +2 -0
- package/dist/schemas/communityGame.d.ts +7 -0
- package/dist/schemas/game.d.ts +72 -138
- package/dist/schemas/game.js +3 -3
- package/dist/schemas/miniLeague.d.ts +11 -10
- package/dist/schemas/miniLeague.js +2 -1
- package/dist/schemas/pick.d.ts +189 -372
- package/dist/schemas/pick.js +1 -0
- package/dist/schemas/player.d.ts +3282 -0
- package/dist/schemas/player.js +4 -0
- package/dist/schemas/playerStats.d.ts +1998 -0
- package/dist/schemas/playerStats.js +303 -0
- package/dist/schemas/poll.d.ts +5280 -144
- package/dist/schemas/scorePrediction.d.ts +144 -288
- package/dist/schemas/standings.d.ts +12 -12
- package/dist/schemas/voting.d.ts +32514 -60
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./schemas/saved";
|
|
|
11
11
|
export * from "./schemas/moderation";
|
|
12
12
|
export * from "./schemas/userEvent";
|
|
13
13
|
export * from "./schemas/player";
|
|
14
|
+
export * from "./schemas/playerStats";
|
|
14
15
|
export * from "./schemas/voting";
|
|
15
16
|
export * from "./schemas/stadium";
|
|
16
17
|
export * from "./schemas/experience";
|
|
@@ -52,6 +53,7 @@ export * from "./constants/rankedTags";
|
|
|
52
53
|
export * from "./schemas/rankedTags";
|
|
53
54
|
export * from "./models/rankedTags";
|
|
54
55
|
export * from "./models/player";
|
|
56
|
+
export * from "./models/playerStats";
|
|
55
57
|
export * from "./models/voting";
|
|
56
58
|
export * from "./models/stadium";
|
|
57
59
|
export * from "./models/experience";
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./schemas/saved"), exports);
|
|
|
27
27
|
__exportStar(require("./schemas/moderation"), exports);
|
|
28
28
|
__exportStar(require("./schemas/userEvent"), exports);
|
|
29
29
|
__exportStar(require("./schemas/player"), exports);
|
|
30
|
+
__exportStar(require("./schemas/playerStats"), exports);
|
|
30
31
|
__exportStar(require("./schemas/voting"), exports);
|
|
31
32
|
__exportStar(require("./schemas/stadium"), exports);
|
|
32
33
|
__exportStar(require("./schemas/experience"), exports);
|
|
@@ -68,6 +69,7 @@ __exportStar(require("./constants/rankedTags"), exports);
|
|
|
68
69
|
__exportStar(require("./schemas/rankedTags"), exports);
|
|
69
70
|
__exportStar(require("./models/rankedTags"), exports);
|
|
70
71
|
__exportStar(require("./models/player"), exports);
|
|
72
|
+
__exportStar(require("./models/playerStats"), exports);
|
|
71
73
|
__exportStar(require("./models/voting"), exports);
|
|
72
74
|
__exportStar(require("./models/stadium"), exports);
|
|
73
75
|
__exportStar(require("./models/experience"), exports);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { nbaPlayerSnapshotStatsSchema, wnbaPlayerSnapshotStatsSchema, collegeBasketballPlayerSnapshotStatsSchema, nflPlayerSnapshotStatsSchema, collegeFootballPlayerSnapshotStatsSchema, mlbPlayerSnapshotStatsSchema, nhlPlayerSnapshotStatsSchema, soccerPlayerSnapshotStatsSchema, playerSnapshotStatsSchema } from "../schemas/playerStats";
|
|
3
|
+
export type NBAPlayerSnapshotStats = z.infer<typeof nbaPlayerSnapshotStatsSchema>;
|
|
4
|
+
export type WNBAPlayerSnapshotStats = z.infer<typeof wnbaPlayerSnapshotStatsSchema>;
|
|
5
|
+
export type CollegeBasketballPlayerSnapshotStats = z.infer<typeof collegeBasketballPlayerSnapshotStatsSchema>;
|
|
6
|
+
export type NFLPlayerSnapshotStats = z.infer<typeof nflPlayerSnapshotStatsSchema>;
|
|
7
|
+
export type CollegeFootballPlayerSnapshotStats = z.infer<typeof collegeFootballPlayerSnapshotStatsSchema>;
|
|
8
|
+
export type MLBPlayerSnapshotStats = z.infer<typeof mlbPlayerSnapshotStatsSchema>;
|
|
9
|
+
export type NHLPlayerSnapshotStats = z.infer<typeof nhlPlayerSnapshotStatsSchema>;
|
|
10
|
+
export type SoccerPlayerSnapshotStats = z.infer<typeof soccerPlayerSnapshotStatsSchema>;
|
|
11
|
+
export type PlayerSnapshotStats = z.infer<typeof playerSnapshotStatsSchema>;
|
|
12
|
+
export type PlayerStatValue = string | number | boolean | null;
|
|
13
|
+
export interface PlayerStatsColumn {
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
format?: "percentage" | "threeDecimal" | "oneDecimal";
|
|
17
|
+
}
|
|
18
|
+
export interface PlayerStatsGroup {
|
|
19
|
+
key: string;
|
|
20
|
+
label: string;
|
|
21
|
+
columns: PlayerStatsColumn[];
|
|
22
|
+
}
|
|
23
|
+
export interface GamePlayerStats {
|
|
24
|
+
id: string;
|
|
25
|
+
playerId: number;
|
|
26
|
+
teamId: number;
|
|
27
|
+
firstName: string;
|
|
28
|
+
lastName: string;
|
|
29
|
+
shortName?: string;
|
|
30
|
+
position?: string;
|
|
31
|
+
jerseyNumber: string | number;
|
|
32
|
+
groupKeys: string[];
|
|
33
|
+
stats: Record<string, PlayerStatValue>;
|
|
34
|
+
}
|
|
35
|
+
export interface GamePlayerStatsResponse {
|
|
36
|
+
groups: PlayerStatsGroup[];
|
|
37
|
+
homePlayers: GamePlayerStats[];
|
|
38
|
+
awayPlayers: GamePlayerStats[];
|
|
39
|
+
}
|
|
@@ -1153,6 +1153,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1153
1153
|
rosters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1154
1154
|
teamSide: z.ZodEnum<["home", "away"]>;
|
|
1155
1155
|
players: z.ZodArray<z.ZodObject<{
|
|
1156
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1156
1157
|
firstName: z.ZodString;
|
|
1157
1158
|
lastName: z.ZodString;
|
|
1158
1159
|
jerseyNumber: z.ZodNumber;
|
|
@@ -1165,6 +1166,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1165
1166
|
lastName: string;
|
|
1166
1167
|
positionCategory: string;
|
|
1167
1168
|
jerseyNumber: number;
|
|
1169
|
+
id?: string | undefined;
|
|
1168
1170
|
shortName?: string | undefined;
|
|
1169
1171
|
}, {
|
|
1170
1172
|
position: string;
|
|
@@ -1172,6 +1174,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1172
1174
|
lastName: string;
|
|
1173
1175
|
positionCategory: string;
|
|
1174
1176
|
jerseyNumber: number;
|
|
1177
|
+
id?: string | undefined;
|
|
1175
1178
|
shortName?: string | undefined;
|
|
1176
1179
|
}>, "many">;
|
|
1177
1180
|
saveToTeamRoster: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1183,6 +1186,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1183
1186
|
lastName: string;
|
|
1184
1187
|
positionCategory: string;
|
|
1185
1188
|
jerseyNumber: number;
|
|
1189
|
+
id?: string | undefined;
|
|
1186
1190
|
shortName?: string | undefined;
|
|
1187
1191
|
}[];
|
|
1188
1192
|
saveToTeamRoster?: boolean | undefined;
|
|
@@ -1194,6 +1198,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1194
1198
|
lastName: string;
|
|
1195
1199
|
positionCategory: string;
|
|
1196
1200
|
jerseyNumber: number;
|
|
1201
|
+
id?: string | undefined;
|
|
1197
1202
|
shortName?: string | undefined;
|
|
1198
1203
|
}[];
|
|
1199
1204
|
saveToTeamRoster?: boolean | undefined;
|
|
@@ -1346,6 +1351,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1346
1351
|
lastName: string;
|
|
1347
1352
|
positionCategory: string;
|
|
1348
1353
|
jerseyNumber: number;
|
|
1354
|
+
id?: string | undefined;
|
|
1349
1355
|
shortName?: string | undefined;
|
|
1350
1356
|
}[];
|
|
1351
1357
|
saveToTeamRoster?: boolean | undefined;
|
|
@@ -1498,6 +1504,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1498
1504
|
lastName: string;
|
|
1499
1505
|
positionCategory: string;
|
|
1500
1506
|
jerseyNumber: number;
|
|
1507
|
+
id?: string | undefined;
|
|
1501
1508
|
shortName?: string | undefined;
|
|
1502
1509
|
}[];
|
|
1503
1510
|
saveToTeamRoster?: boolean | undefined;
|