rategame-shared 1.1.522 → 1.1.524
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/miniLeague.d.ts +11 -11
- package/dist/schemas/miniLeague.js +2 -2
- package/dist/schemas/player.d.ts +46 -0
- package/dist/schemas/player.js +12 -0
- package/dist/schemas/poll.d.ts +152 -0
- package/dist/schemas/voting.d.ts +952 -0
- package/package.json +1 -1
|
@@ -5,9 +5,9 @@ export declare const CBB_CONFERENCES: string[];
|
|
|
5
5
|
/** Max sports/platform leagues selectable when creating a mini league. */
|
|
6
6
|
export declare const MINI_LEAGUE_MAX_PLATFORM_LEAGUES = 2;
|
|
7
7
|
/** Max active mini leagues a user can create (own) at once. */
|
|
8
|
-
export declare const MINI_LEAGUE_MAX_CREATED_PER_USER =
|
|
8
|
+
export declare const MINI_LEAGUE_MAX_CREATED_PER_USER = 10;
|
|
9
9
|
/** Max active mini leagues a user can join (not own) at once. */
|
|
10
|
-
export declare const MINI_LEAGUE_MAX_JOINED_PER_USER =
|
|
10
|
+
export declare const MINI_LEAGUE_MAX_JOINED_PER_USER = 20;
|
|
11
11
|
/** Combined cap when both create and join allotments are full. */
|
|
12
12
|
export declare const MINI_LEAGUE_MAX_MEMBERSHIPS_PER_USER: number;
|
|
13
13
|
export type MiniLeagueAllotmentCounts = {
|
|
@@ -1277,7 +1277,7 @@ export declare const miniLeagueSchema: z.ZodObject<{
|
|
|
1277
1277
|
canLeaveOnboarding: z.ZodOptional<z.ZodBoolean>;
|
|
1278
1278
|
selectedLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1279
1279
|
selectedTeams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1280
|
-
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1280
|
+
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** Defaults to true when endAt is omitted. */
|
|
1281
1281
|
scorePredictionChallenges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1282
1282
|
challengeId: z.ZodString;
|
|
1283
1283
|
challengeLeague: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
@@ -3061,7 +3061,7 @@ export declare const miniLeagueMemberSchema: z.ZodObject<{
|
|
|
3061
3061
|
canLeaveOnboarding: z.ZodOptional<z.ZodBoolean>;
|
|
3062
3062
|
selectedLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3063
3063
|
selectedTeams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3064
|
-
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3064
|
+
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** Defaults to true when endAt is omitted. */
|
|
3065
3065
|
scorePredictionChallenges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3066
3066
|
challengeId: z.ZodString;
|
|
3067
3067
|
challengeLeague: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
@@ -5310,7 +5310,7 @@ export declare const miniLeagueInvitationSchema: z.ZodObject<{
|
|
|
5310
5310
|
canLeaveOnboarding: z.ZodOptional<z.ZodBoolean>;
|
|
5311
5311
|
selectedLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5312
5312
|
selectedTeams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5313
|
-
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5313
|
+
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** Defaults to true when endAt is omitted. */
|
|
5314
5314
|
scorePredictionChallenges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5315
5315
|
challengeId: z.ZodString;
|
|
5316
5316
|
challengeLeague: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
@@ -6966,7 +6966,7 @@ export declare const miniLeagueInvitationSchema: z.ZodObject<{
|
|
|
6966
6966
|
canLeaveOnboarding: z.ZodOptional<z.ZodBoolean>;
|
|
6967
6967
|
selectedLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6968
6968
|
selectedTeams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6969
|
-
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6969
|
+
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** Defaults to true when endAt is omitted. */
|
|
6970
6970
|
scorePredictionChallenges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6971
6971
|
challengeId: z.ZodString;
|
|
6972
6972
|
challengeLeague: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
@@ -8855,7 +8855,7 @@ export declare const miniLeagueInviteLinkPreviewDtoSchema: z.ZodObject<{
|
|
|
8855
8855
|
canLeaveOnboarding: z.ZodOptional<z.ZodBoolean>;
|
|
8856
8856
|
selectedLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8857
8857
|
selectedTeams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8858
|
-
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8858
|
+
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** Defaults to true when endAt is omitted. */
|
|
8859
8859
|
scorePredictionChallenges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8860
8860
|
challengeId: z.ZodString;
|
|
8861
8861
|
challengeLeague: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
@@ -10585,7 +10585,7 @@ export declare const miniLeagueListResponseDtoSchema: z.ZodObject<{
|
|
|
10585
10585
|
canLeaveOnboarding: z.ZodOptional<z.ZodBoolean>;
|
|
10586
10586
|
selectedLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10587
10587
|
selectedTeams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10588
|
-
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10588
|
+
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** Defaults to true when endAt is omitted. */
|
|
10589
10589
|
scorePredictionChallenges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10590
10590
|
challengeId: z.ZodString;
|
|
10591
10591
|
challengeLeague: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
@@ -12453,7 +12453,7 @@ export declare const miniLeagueMembersResponseDtoSchema: z.ZodObject<{
|
|
|
12453
12453
|
canLeaveOnboarding: z.ZodOptional<z.ZodBoolean>;
|
|
12454
12454
|
selectedLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12455
12455
|
selectedTeams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12456
|
-
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12456
|
+
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** Defaults to true when endAt is omitted. */
|
|
12457
12457
|
scorePredictionChallenges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12458
12458
|
challengeId: z.ZodString;
|
|
12459
12459
|
challengeLeague: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
@@ -14904,7 +14904,7 @@ export declare const miniLeagueInvitationsResponseDtoSchema: z.ZodObject<{
|
|
|
14904
14904
|
canLeaveOnboarding: z.ZodOptional<z.ZodBoolean>;
|
|
14905
14905
|
selectedLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14906
14906
|
selectedTeams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14907
|
-
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14907
|
+
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** Defaults to true when endAt is omitted. */
|
|
14908
14908
|
scorePredictionChallenges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
14909
14909
|
challengeId: z.ZodString;
|
|
14910
14910
|
challengeLeague: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
@@ -16560,7 +16560,7 @@ export declare const miniLeagueInvitationsResponseDtoSchema: z.ZodObject<{
|
|
|
16560
16560
|
canLeaveOnboarding: z.ZodOptional<z.ZodBoolean>;
|
|
16561
16561
|
selectedLeagues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
16562
16562
|
selectedTeams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
16563
|
-
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
16563
|
+
joinedChallengeIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** Defaults to true when endAt is omitted. */
|
|
16564
16564
|
scorePredictionChallenges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16565
16565
|
challengeId: z.ZodString;
|
|
16566
16566
|
challengeLeague: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
@@ -58,9 +58,9 @@ exports.CBB_CONFERENCES = [
|
|
|
58
58
|
/** Max sports/platform leagues selectable when creating a mini league. */
|
|
59
59
|
exports.MINI_LEAGUE_MAX_PLATFORM_LEAGUES = 2;
|
|
60
60
|
/** Max active mini leagues a user can create (own) at once. */
|
|
61
|
-
exports.MINI_LEAGUE_MAX_CREATED_PER_USER =
|
|
61
|
+
exports.MINI_LEAGUE_MAX_CREATED_PER_USER = 10;
|
|
62
62
|
/** Max active mini leagues a user can join (not own) at once. */
|
|
63
|
-
exports.MINI_LEAGUE_MAX_JOINED_PER_USER =
|
|
63
|
+
exports.MINI_LEAGUE_MAX_JOINED_PER_USER = 20;
|
|
64
64
|
/** Combined cap when both create and join allotments are full. */
|
|
65
65
|
exports.MINI_LEAGUE_MAX_MEMBERSHIPS_PER_USER = exports.MINI_LEAGUE_MAX_CREATED_PER_USER + exports.MINI_LEAGUE_MAX_JOINED_PER_USER;
|
|
66
66
|
const countMiniLeagueAllotments = (leagues, userId, now = Date.now()) => {
|
package/dist/schemas/player.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare const playerSchema: z.ZodObject<{
|
|
|
12
12
|
leagueId: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
13
13
|
teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
14
|
status: z.ZodOptional<z.ZodString>;
|
|
15
|
+
image: z.ZodOptional<z.ZodString>;
|
|
15
16
|
stats: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
16
17
|
id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
17
18
|
player_id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1007,6 +1008,31 @@ export declare const playerSchema: z.ZodObject<{
|
|
|
1007
1008
|
lineup_position?: string | null | undefined;
|
|
1008
1009
|
was_substitute?: boolean | null | undefined;
|
|
1009
1010
|
}>]>>;
|
|
1011
|
+
fanStats: z.ZodOptional<z.ZodObject<{
|
|
1012
|
+
votes: z.ZodNumber;
|
|
1013
|
+
teamVoteShare: z.ZodNumber;
|
|
1014
|
+
gameAvgRating: z.ZodNumber;
|
|
1015
|
+
potgWins: z.ZodNumber;
|
|
1016
|
+
gamesPlayed: z.ZodNumber;
|
|
1017
|
+
potgRank: z.ZodNumber;
|
|
1018
|
+
updatedAt: z.ZodNumber;
|
|
1019
|
+
}, "strip", z.ZodTypeAny, {
|
|
1020
|
+
updatedAt: number;
|
|
1021
|
+
votes: number;
|
|
1022
|
+
teamVoteShare: number;
|
|
1023
|
+
gameAvgRating: number;
|
|
1024
|
+
potgWins: number;
|
|
1025
|
+
gamesPlayed: number;
|
|
1026
|
+
potgRank: number;
|
|
1027
|
+
}, {
|
|
1028
|
+
updatedAt: number;
|
|
1029
|
+
votes: number;
|
|
1030
|
+
teamVoteShare: number;
|
|
1031
|
+
gameAvgRating: number;
|
|
1032
|
+
potgWins: number;
|
|
1033
|
+
gamesPlayed: number;
|
|
1034
|
+
potgRank: number;
|
|
1035
|
+
}>>;
|
|
1010
1036
|
}, "strip", z.ZodTypeAny, {
|
|
1011
1037
|
position: string;
|
|
1012
1038
|
teamId: number;
|
|
@@ -1017,6 +1043,7 @@ export declare const playerSchema: z.ZodObject<{
|
|
|
1017
1043
|
jerseyNumber: number;
|
|
1018
1044
|
leagueId: string;
|
|
1019
1045
|
id?: string | undefined;
|
|
1046
|
+
image?: string | undefined;
|
|
1020
1047
|
status?: string | undefined;
|
|
1021
1048
|
teams?: string[] | undefined;
|
|
1022
1049
|
bdlPlayerId?: number | undefined;
|
|
@@ -1341,6 +1368,15 @@ export declare const playerSchema: z.ZodObject<{
|
|
|
1341
1368
|
lineup_position?: string | null | undefined;
|
|
1342
1369
|
was_substitute?: boolean | null | undefined;
|
|
1343
1370
|
} | undefined;
|
|
1371
|
+
fanStats?: {
|
|
1372
|
+
updatedAt: number;
|
|
1373
|
+
votes: number;
|
|
1374
|
+
teamVoteShare: number;
|
|
1375
|
+
gameAvgRating: number;
|
|
1376
|
+
potgWins: number;
|
|
1377
|
+
gamesPlayed: number;
|
|
1378
|
+
potgRank: number;
|
|
1379
|
+
} | undefined;
|
|
1344
1380
|
}, {
|
|
1345
1381
|
position: string;
|
|
1346
1382
|
teamId: number;
|
|
@@ -1351,6 +1387,7 @@ export declare const playerSchema: z.ZodObject<{
|
|
|
1351
1387
|
jerseyNumber: number;
|
|
1352
1388
|
leagueId: string;
|
|
1353
1389
|
id?: string | undefined;
|
|
1390
|
+
image?: string | undefined;
|
|
1354
1391
|
status?: string | undefined;
|
|
1355
1392
|
teams?: string[] | undefined;
|
|
1356
1393
|
bdlPlayerId?: number | undefined;
|
|
@@ -1675,6 +1712,15 @@ export declare const playerSchema: z.ZodObject<{
|
|
|
1675
1712
|
lineup_position?: string | null | undefined;
|
|
1676
1713
|
was_substitute?: boolean | null | undefined;
|
|
1677
1714
|
} | undefined;
|
|
1715
|
+
fanStats?: {
|
|
1716
|
+
updatedAt: number;
|
|
1717
|
+
votes: number;
|
|
1718
|
+
teamVoteShare: number;
|
|
1719
|
+
gameAvgRating: number;
|
|
1720
|
+
potgWins: number;
|
|
1721
|
+
gamesPlayed: number;
|
|
1722
|
+
potgRank: number;
|
|
1723
|
+
} | undefined;
|
|
1678
1724
|
}>;
|
|
1679
1725
|
/**
|
|
1680
1726
|
* Schema for a player row parsed from CSV upload.
|
package/dist/schemas/player.js
CHANGED
|
@@ -17,7 +17,19 @@ exports.playerSchema = zod_1.z.object({
|
|
|
17
17
|
leagueId: sharedTypes_1.leagueSlug,
|
|
18
18
|
teams: zod_1.z.array(zod_1.z.string()).optional(),
|
|
19
19
|
status: zod_1.z.string().optional(),
|
|
20
|
+
image: zod_1.z.string().optional(),
|
|
20
21
|
stats: playerStats_1.playerSnapshotStatsSchema.optional(),
|
|
22
|
+
fanStats: zod_1.z
|
|
23
|
+
.object({
|
|
24
|
+
votes: zod_1.z.number(),
|
|
25
|
+
teamVoteShare: zod_1.z.number(),
|
|
26
|
+
gameAvgRating: zod_1.z.number(),
|
|
27
|
+
potgWins: zod_1.z.number(),
|
|
28
|
+
gamesPlayed: zod_1.z.number(),
|
|
29
|
+
potgRank: zod_1.z.number(),
|
|
30
|
+
updatedAt: zod_1.z.number(),
|
|
31
|
+
})
|
|
32
|
+
.optional(),
|
|
21
33
|
});
|
|
22
34
|
/**
|
|
23
35
|
* Schema for a player row parsed from CSV upload.
|
package/dist/schemas/poll.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare const pollOptionSchema: z.ZodObject<{
|
|
|
31
31
|
leagueId: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
32
32
|
teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
33
33
|
status: z.ZodOptional<z.ZodString>;
|
|
34
|
+
image: z.ZodOptional<z.ZodString>;
|
|
34
35
|
stats: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
35
36
|
id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
36
37
|
player_id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1026,6 +1027,31 @@ export declare const pollOptionSchema: z.ZodObject<{
|
|
|
1026
1027
|
lineup_position?: string | null | undefined;
|
|
1027
1028
|
was_substitute?: boolean | null | undefined;
|
|
1028
1029
|
}>]>>;
|
|
1030
|
+
fanStats: z.ZodOptional<z.ZodObject<{
|
|
1031
|
+
votes: z.ZodNumber;
|
|
1032
|
+
teamVoteShare: z.ZodNumber;
|
|
1033
|
+
gameAvgRating: z.ZodNumber;
|
|
1034
|
+
potgWins: z.ZodNumber;
|
|
1035
|
+
gamesPlayed: z.ZodNumber;
|
|
1036
|
+
potgRank: z.ZodNumber;
|
|
1037
|
+
updatedAt: z.ZodNumber;
|
|
1038
|
+
}, "strip", z.ZodTypeAny, {
|
|
1039
|
+
updatedAt: number;
|
|
1040
|
+
votes: number;
|
|
1041
|
+
teamVoteShare: number;
|
|
1042
|
+
gameAvgRating: number;
|
|
1043
|
+
potgWins: number;
|
|
1044
|
+
gamesPlayed: number;
|
|
1045
|
+
potgRank: number;
|
|
1046
|
+
}, {
|
|
1047
|
+
updatedAt: number;
|
|
1048
|
+
votes: number;
|
|
1049
|
+
teamVoteShare: number;
|
|
1050
|
+
gameAvgRating: number;
|
|
1051
|
+
potgWins: number;
|
|
1052
|
+
gamesPlayed: number;
|
|
1053
|
+
potgRank: number;
|
|
1054
|
+
}>>;
|
|
1029
1055
|
}, "strip", z.ZodTypeAny, {
|
|
1030
1056
|
position: string;
|
|
1031
1057
|
teamId: number;
|
|
@@ -1036,6 +1062,7 @@ export declare const pollOptionSchema: z.ZodObject<{
|
|
|
1036
1062
|
jerseyNumber: number;
|
|
1037
1063
|
leagueId: string;
|
|
1038
1064
|
id?: string | undefined;
|
|
1065
|
+
image?: string | undefined;
|
|
1039
1066
|
status?: string | undefined;
|
|
1040
1067
|
teams?: string[] | undefined;
|
|
1041
1068
|
bdlPlayerId?: number | undefined;
|
|
@@ -1360,6 +1387,15 @@ export declare const pollOptionSchema: z.ZodObject<{
|
|
|
1360
1387
|
lineup_position?: string | null | undefined;
|
|
1361
1388
|
was_substitute?: boolean | null | undefined;
|
|
1362
1389
|
} | undefined;
|
|
1390
|
+
fanStats?: {
|
|
1391
|
+
updatedAt: number;
|
|
1392
|
+
votes: number;
|
|
1393
|
+
teamVoteShare: number;
|
|
1394
|
+
gameAvgRating: number;
|
|
1395
|
+
potgWins: number;
|
|
1396
|
+
gamesPlayed: number;
|
|
1397
|
+
potgRank: number;
|
|
1398
|
+
} | undefined;
|
|
1363
1399
|
}, {
|
|
1364
1400
|
position: string;
|
|
1365
1401
|
teamId: number;
|
|
@@ -1370,6 +1406,7 @@ export declare const pollOptionSchema: z.ZodObject<{
|
|
|
1370
1406
|
jerseyNumber: number;
|
|
1371
1407
|
leagueId: string;
|
|
1372
1408
|
id?: string | undefined;
|
|
1409
|
+
image?: string | undefined;
|
|
1373
1410
|
status?: string | undefined;
|
|
1374
1411
|
teams?: string[] | undefined;
|
|
1375
1412
|
bdlPlayerId?: number | undefined;
|
|
@@ -1694,6 +1731,15 @@ export declare const pollOptionSchema: z.ZodObject<{
|
|
|
1694
1731
|
lineup_position?: string | null | undefined;
|
|
1695
1732
|
was_substitute?: boolean | null | undefined;
|
|
1696
1733
|
} | undefined;
|
|
1734
|
+
fanStats?: {
|
|
1735
|
+
updatedAt: number;
|
|
1736
|
+
votes: number;
|
|
1737
|
+
teamVoteShare: number;
|
|
1738
|
+
gameAvgRating: number;
|
|
1739
|
+
potgWins: number;
|
|
1740
|
+
gamesPlayed: number;
|
|
1741
|
+
potgRank: number;
|
|
1742
|
+
} | undefined;
|
|
1697
1743
|
}>;
|
|
1698
1744
|
teamLogoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1699
1745
|
mostVotedGame: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
|
|
@@ -21934,6 +21980,7 @@ export declare const pollOptionSchema: z.ZodObject<{
|
|
|
21934
21980
|
jerseyNumber: number;
|
|
21935
21981
|
leagueId: string;
|
|
21936
21982
|
id?: string | undefined;
|
|
21983
|
+
image?: string | undefined;
|
|
21937
21984
|
status?: string | undefined;
|
|
21938
21985
|
teams?: string[] | undefined;
|
|
21939
21986
|
bdlPlayerId?: number | undefined;
|
|
@@ -22258,6 +22305,15 @@ export declare const pollOptionSchema: z.ZodObject<{
|
|
|
22258
22305
|
lineup_position?: string | null | undefined;
|
|
22259
22306
|
was_substitute?: boolean | null | undefined;
|
|
22260
22307
|
} | undefined;
|
|
22308
|
+
fanStats?: {
|
|
22309
|
+
updatedAt: number;
|
|
22310
|
+
votes: number;
|
|
22311
|
+
teamVoteShare: number;
|
|
22312
|
+
gameAvgRating: number;
|
|
22313
|
+
potgWins: number;
|
|
22314
|
+
gamesPlayed: number;
|
|
22315
|
+
potgRank: number;
|
|
22316
|
+
} | undefined;
|
|
22261
22317
|
};
|
|
22262
22318
|
primaryColor?: string | null | undefined;
|
|
22263
22319
|
mostVotedGame?: {
|
|
@@ -23739,6 +23795,7 @@ export declare const pollOptionSchema: z.ZodObject<{
|
|
|
23739
23795
|
jerseyNumber: number;
|
|
23740
23796
|
leagueId: string;
|
|
23741
23797
|
id?: string | undefined;
|
|
23798
|
+
image?: string | undefined;
|
|
23742
23799
|
status?: string | undefined;
|
|
23743
23800
|
teams?: string[] | undefined;
|
|
23744
23801
|
bdlPlayerId?: number | undefined;
|
|
@@ -24063,6 +24120,15 @@ export declare const pollOptionSchema: z.ZodObject<{
|
|
|
24063
24120
|
lineup_position?: string | null | undefined;
|
|
24064
24121
|
was_substitute?: boolean | null | undefined;
|
|
24065
24122
|
} | undefined;
|
|
24123
|
+
fanStats?: {
|
|
24124
|
+
updatedAt: number;
|
|
24125
|
+
votes: number;
|
|
24126
|
+
teamVoteShare: number;
|
|
24127
|
+
gameAvgRating: number;
|
|
24128
|
+
potgWins: number;
|
|
24129
|
+
gamesPlayed: number;
|
|
24130
|
+
potgRank: number;
|
|
24131
|
+
} | undefined;
|
|
24066
24132
|
};
|
|
24067
24133
|
primaryColor?: string | null | undefined;
|
|
24068
24134
|
mostVotedGame?: {
|
|
@@ -27223,6 +27289,7 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
27223
27289
|
leagueId: 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<"fifa">, z.ZodLiteral<"laliga">, z.ZodLiteral<"seriea">, z.ZodLiteral<"bundesliga">, z.ZodLiteral<"ligue1">, z.ZodLiteral<"ucl">, z.ZodUnion<[z.ZodLiteral<"global">, z.ZodString]>]>;
|
|
27224
27290
|
teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
27225
27291
|
status: z.ZodOptional<z.ZodString>;
|
|
27292
|
+
image: z.ZodOptional<z.ZodString>;
|
|
27226
27293
|
stats: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
27227
27294
|
id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
27228
27295
|
player_id: z.ZodOptional<z.ZodNumber>;
|
|
@@ -28218,6 +28285,31 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
28218
28285
|
lineup_position?: string | null | undefined;
|
|
28219
28286
|
was_substitute?: boolean | null | undefined;
|
|
28220
28287
|
}>]>>;
|
|
28288
|
+
fanStats: z.ZodOptional<z.ZodObject<{
|
|
28289
|
+
votes: z.ZodNumber;
|
|
28290
|
+
teamVoteShare: z.ZodNumber;
|
|
28291
|
+
gameAvgRating: z.ZodNumber;
|
|
28292
|
+
potgWins: z.ZodNumber;
|
|
28293
|
+
gamesPlayed: z.ZodNumber;
|
|
28294
|
+
potgRank: z.ZodNumber;
|
|
28295
|
+
updatedAt: z.ZodNumber;
|
|
28296
|
+
}, "strip", z.ZodTypeAny, {
|
|
28297
|
+
updatedAt: number;
|
|
28298
|
+
votes: number;
|
|
28299
|
+
teamVoteShare: number;
|
|
28300
|
+
gameAvgRating: number;
|
|
28301
|
+
potgWins: number;
|
|
28302
|
+
gamesPlayed: number;
|
|
28303
|
+
potgRank: number;
|
|
28304
|
+
}, {
|
|
28305
|
+
updatedAt: number;
|
|
28306
|
+
votes: number;
|
|
28307
|
+
teamVoteShare: number;
|
|
28308
|
+
gameAvgRating: number;
|
|
28309
|
+
potgWins: number;
|
|
28310
|
+
gamesPlayed: number;
|
|
28311
|
+
potgRank: number;
|
|
28312
|
+
}>>;
|
|
28221
28313
|
}, "strip", z.ZodTypeAny, {
|
|
28222
28314
|
position: string;
|
|
28223
28315
|
teamId: number;
|
|
@@ -28228,6 +28320,7 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
28228
28320
|
jerseyNumber: number;
|
|
28229
28321
|
leagueId: string;
|
|
28230
28322
|
id?: string | undefined;
|
|
28323
|
+
image?: string | undefined;
|
|
28231
28324
|
status?: string | undefined;
|
|
28232
28325
|
teams?: string[] | undefined;
|
|
28233
28326
|
bdlPlayerId?: number | undefined;
|
|
@@ -28552,6 +28645,15 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
28552
28645
|
lineup_position?: string | null | undefined;
|
|
28553
28646
|
was_substitute?: boolean | null | undefined;
|
|
28554
28647
|
} | undefined;
|
|
28648
|
+
fanStats?: {
|
|
28649
|
+
updatedAt: number;
|
|
28650
|
+
votes: number;
|
|
28651
|
+
teamVoteShare: number;
|
|
28652
|
+
gameAvgRating: number;
|
|
28653
|
+
potgWins: number;
|
|
28654
|
+
gamesPlayed: number;
|
|
28655
|
+
potgRank: number;
|
|
28656
|
+
} | undefined;
|
|
28555
28657
|
}, {
|
|
28556
28658
|
position: string;
|
|
28557
28659
|
teamId: number;
|
|
@@ -28562,6 +28664,7 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
28562
28664
|
jerseyNumber: number;
|
|
28563
28665
|
leagueId: string;
|
|
28564
28666
|
id?: string | undefined;
|
|
28667
|
+
image?: string | undefined;
|
|
28565
28668
|
status?: string | undefined;
|
|
28566
28669
|
teams?: string[] | undefined;
|
|
28567
28670
|
bdlPlayerId?: number | undefined;
|
|
@@ -28886,6 +28989,15 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
28886
28989
|
lineup_position?: string | null | undefined;
|
|
28887
28990
|
was_substitute?: boolean | null | undefined;
|
|
28888
28991
|
} | undefined;
|
|
28992
|
+
fanStats?: {
|
|
28993
|
+
updatedAt: number;
|
|
28994
|
+
votes: number;
|
|
28995
|
+
teamVoteShare: number;
|
|
28996
|
+
gameAvgRating: number;
|
|
28997
|
+
potgWins: number;
|
|
28998
|
+
gamesPlayed: number;
|
|
28999
|
+
potgRank: number;
|
|
29000
|
+
} | undefined;
|
|
28889
29001
|
}>;
|
|
28890
29002
|
teamLogoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28891
29003
|
mostVotedGame: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
|
|
@@ -49126,6 +49238,7 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
49126
49238
|
jerseyNumber: number;
|
|
49127
49239
|
leagueId: string;
|
|
49128
49240
|
id?: string | undefined;
|
|
49241
|
+
image?: string | undefined;
|
|
49129
49242
|
status?: string | undefined;
|
|
49130
49243
|
teams?: string[] | undefined;
|
|
49131
49244
|
bdlPlayerId?: number | undefined;
|
|
@@ -49450,6 +49563,15 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
49450
49563
|
lineup_position?: string | null | undefined;
|
|
49451
49564
|
was_substitute?: boolean | null | undefined;
|
|
49452
49565
|
} | undefined;
|
|
49566
|
+
fanStats?: {
|
|
49567
|
+
updatedAt: number;
|
|
49568
|
+
votes: number;
|
|
49569
|
+
teamVoteShare: number;
|
|
49570
|
+
gameAvgRating: number;
|
|
49571
|
+
potgWins: number;
|
|
49572
|
+
gamesPlayed: number;
|
|
49573
|
+
potgRank: number;
|
|
49574
|
+
} | undefined;
|
|
49453
49575
|
};
|
|
49454
49576
|
primaryColor?: string | null | undefined;
|
|
49455
49577
|
mostVotedGame?: {
|
|
@@ -50931,6 +51053,7 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
50931
51053
|
jerseyNumber: number;
|
|
50932
51054
|
leagueId: string;
|
|
50933
51055
|
id?: string | undefined;
|
|
51056
|
+
image?: string | undefined;
|
|
50934
51057
|
status?: string | undefined;
|
|
50935
51058
|
teams?: string[] | undefined;
|
|
50936
51059
|
bdlPlayerId?: number | undefined;
|
|
@@ -51255,6 +51378,15 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
51255
51378
|
lineup_position?: string | null | undefined;
|
|
51256
51379
|
was_substitute?: boolean | null | undefined;
|
|
51257
51380
|
} | undefined;
|
|
51381
|
+
fanStats?: {
|
|
51382
|
+
updatedAt: number;
|
|
51383
|
+
votes: number;
|
|
51384
|
+
teamVoteShare: number;
|
|
51385
|
+
gameAvgRating: number;
|
|
51386
|
+
potgWins: number;
|
|
51387
|
+
gamesPlayed: number;
|
|
51388
|
+
potgRank: number;
|
|
51389
|
+
} | undefined;
|
|
51258
51390
|
};
|
|
51259
51391
|
primaryColor?: string | null | undefined;
|
|
51260
51392
|
mostVotedGame?: {
|
|
@@ -52746,6 +52878,7 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
52746
52878
|
jerseyNumber: number;
|
|
52747
52879
|
leagueId: string;
|
|
52748
52880
|
id?: string | undefined;
|
|
52881
|
+
image?: string | undefined;
|
|
52749
52882
|
status?: string | undefined;
|
|
52750
52883
|
teams?: string[] | undefined;
|
|
52751
52884
|
bdlPlayerId?: number | undefined;
|
|
@@ -53070,6 +53203,15 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
53070
53203
|
lineup_position?: string | null | undefined;
|
|
53071
53204
|
was_substitute?: boolean | null | undefined;
|
|
53072
53205
|
} | undefined;
|
|
53206
|
+
fanStats?: {
|
|
53207
|
+
updatedAt: number;
|
|
53208
|
+
votes: number;
|
|
53209
|
+
teamVoteShare: number;
|
|
53210
|
+
gameAvgRating: number;
|
|
53211
|
+
potgWins: number;
|
|
53212
|
+
gamesPlayed: number;
|
|
53213
|
+
potgRank: number;
|
|
53214
|
+
} | undefined;
|
|
53073
53215
|
};
|
|
53074
53216
|
primaryColor?: string | null | undefined;
|
|
53075
53217
|
mostVotedGame?: {
|
|
@@ -54572,6 +54714,7 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
54572
54714
|
jerseyNumber: number;
|
|
54573
54715
|
leagueId: string;
|
|
54574
54716
|
id?: string | undefined;
|
|
54717
|
+
image?: string | undefined;
|
|
54575
54718
|
status?: string | undefined;
|
|
54576
54719
|
teams?: string[] | undefined;
|
|
54577
54720
|
bdlPlayerId?: number | undefined;
|
|
@@ -54896,6 +55039,15 @@ export declare const pollSchema: z.ZodObject<{
|
|
|
54896
55039
|
lineup_position?: string | null | undefined;
|
|
54897
55040
|
was_substitute?: boolean | null | undefined;
|
|
54898
55041
|
} | undefined;
|
|
55042
|
+
fanStats?: {
|
|
55043
|
+
updatedAt: number;
|
|
55044
|
+
votes: number;
|
|
55045
|
+
teamVoteShare: number;
|
|
55046
|
+
gameAvgRating: number;
|
|
55047
|
+
potgWins: number;
|
|
55048
|
+
gamesPlayed: number;
|
|
55049
|
+
potgRank: number;
|
|
55050
|
+
} | undefined;
|
|
54899
55051
|
};
|
|
54900
55052
|
primaryColor?: string | null | undefined;
|
|
54901
55053
|
mostVotedGame?: {
|