rategame-shared 1.1.521 → 1.1.523
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/article.js
CHANGED
|
@@ -48,7 +48,7 @@ exports.articleSchema = zod_1.z.object({
|
|
|
48
48
|
slug: zod_1.z.string(),
|
|
49
49
|
title: zod_1.z.string().min(1).max(200),
|
|
50
50
|
// Markdown body (GFM).
|
|
51
|
-
body: zod_1.z.string().min(1).max(
|
|
51
|
+
body: zod_1.z.string().min(1).max(50000),
|
|
52
52
|
imageUrl: zod_1.z.string().optional().nullable(),
|
|
53
53
|
// Resized WebP variants populated by the `resizeArticleImage` cloud function.
|
|
54
54
|
// Consumers should prefer the smallest variant that still looks crisp and fall
|
|
@@ -82,7 +82,7 @@ exports.articleSchema = zod_1.z.object({
|
|
|
82
82
|
exports.createArticleSchema = zod_1.z.object({
|
|
83
83
|
id: zod_1.z.string().min(1).max(120).optional(),
|
|
84
84
|
title: zod_1.z.string().min(1).max(200),
|
|
85
|
-
body: zod_1.z.string().min(1).max(
|
|
85
|
+
body: zod_1.z.string().min(1).max(50000),
|
|
86
86
|
imageUrl: zod_1.z.string().optional().nullable(),
|
|
87
87
|
entities: zod_1.z.array(exports.articleEntitySchema).max(10).optional(),
|
|
88
88
|
user: user_1.reducedUserSchema,
|
|
@@ -92,7 +92,7 @@ exports.createArticleSchema = zod_1.z.object({
|
|
|
92
92
|
*/
|
|
93
93
|
exports.updateArticleSchema = zod_1.z.object({
|
|
94
94
|
title: zod_1.z.string().min(1).max(200).optional(),
|
|
95
|
-
body: zod_1.z.string().min(1).max(
|
|
95
|
+
body: zod_1.z.string().min(1).max(50000).optional(),
|
|
96
96
|
imageUrl: zod_1.z.string().optional().nullable(),
|
|
97
97
|
entities: zod_1.z.array(exports.articleEntitySchema).max(10).optional(),
|
|
98
98
|
});
|
|
@@ -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()) => {
|