rategame-shared 1.1.449 → 1.1.451
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/helpers/fancyText.d.ts +5 -0
- package/dist/helpers/fancyText.js +29 -0
- package/dist/helpers/favoriteTeams.d.ts +26 -0
- package/dist/helpers/favoriteTeams.js +91 -0
- package/dist/helpers/index.js +1 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/models/attendance.d.ts +5 -0
- package/dist/models/attendance.js +2 -0
- package/dist/schemas/article.d.ts +20 -5
- package/dist/schemas/attendance.d.ts +125 -0
- package/dist/schemas/attendance.js +28 -0
- package/dist/schemas/chat.d.ts +5 -5
- package/dist/schemas/experience.d.ts +4 -4
- package/dist/schemas/game.d.ts +20 -20
- package/dist/schemas/list.d.ts +5 -5
- package/dist/schemas/moderation.d.ts +4 -4
- package/dist/schemas/pick.d.ts +51 -38
- package/dist/schemas/pick.js +4 -1
- package/dist/schemas/poll.d.ts +16 -16
- package/dist/schemas/rating.d.ts +3 -3
- package/dist/schemas/scorePrediction.d.ts +27 -27
- package/dist/schemas/stadium.d.ts +119 -4
- package/dist/schemas/stadium.js +17 -1
- package/dist/schemas/trivia.d.ts +5 -5
- package/dist/schemas/user.d.ts +8 -8
- package/dist/schemas/user.js +0 -1
- package/dist/schemas/userEvent.d.ts +3 -3
- package/dist/schemas/voting.d.ts +9 -9
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const FANCY_TEXT_ERROR_MESSAGE = "Fancy or styled characters are not allowed. Please use normal letters and numbers.";
|
|
2
|
+
/**
|
|
3
|
+
* Detects mathematical-alphanumeric, fullwidth, and similar disguised characters.
|
|
4
|
+
*/
|
|
5
|
+
export declare function containsFancyText(value: string | null | undefined): boolean;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.containsFancyText = exports.FANCY_TEXT_ERROR_MESSAGE = void 0;
|
|
4
|
+
exports.FANCY_TEXT_ERROR_MESSAGE = 'Fancy or styled characters are not allowed. Please use normal letters and numbers.';
|
|
5
|
+
/** Unicode ranges used for disguised / styled text (not normal user input). */
|
|
6
|
+
const FANCY_CODE_POINT_RANGES = [
|
|
7
|
+
[0x1d400, 0x1d7ff],
|
|
8
|
+
[0x1d800, 0x1daff],
|
|
9
|
+
[0x1f100, 0x1f1ff],
|
|
10
|
+
[0x2100, 0x214f],
|
|
11
|
+
[0x2460, 0x24ff],
|
|
12
|
+
[0xff01, 0xff5e], // Fullwidth ASCII variants
|
|
13
|
+
];
|
|
14
|
+
const isFancyCodePoint = (code) => FANCY_CODE_POINT_RANGES.some(([start, end]) => code >= start && code <= end);
|
|
15
|
+
/**
|
|
16
|
+
* Detects mathematical-alphanumeric, fullwidth, and similar disguised characters.
|
|
17
|
+
*/
|
|
18
|
+
function containsFancyText(value) {
|
|
19
|
+
if (!value)
|
|
20
|
+
return false;
|
|
21
|
+
for (const char of value) {
|
|
22
|
+
const code = char.codePointAt(0);
|
|
23
|
+
if (code !== undefined && isFancyCodePoint(code)) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
exports.containsFancyText = containsFancyText;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const DEFAULT_FAVORITE_TEAM_LEAGUE_ORDER: readonly ["nba", "mlb", "wbc", "nfl", "nhl", "iho", "epl", "fifa", "cbb", "cfb", "mls", "wnba", "cwc"];
|
|
2
|
+
export type FavoriteTeamLookup = {
|
|
3
|
+
id?: string | number;
|
|
4
|
+
name?: string;
|
|
5
|
+
image?: string;
|
|
6
|
+
primaryColor?: string | null;
|
|
7
|
+
countryId?: string | number;
|
|
8
|
+
};
|
|
9
|
+
export type FavoriteTeamChip = {
|
|
10
|
+
key: string;
|
|
11
|
+
league: string;
|
|
12
|
+
teamImage: string;
|
|
13
|
+
teamId: string;
|
|
14
|
+
teamName: string;
|
|
15
|
+
primaryColor: string | null;
|
|
16
|
+
countryId?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function getFavoriteTeamChipKey({ league, teamId, countryId, }: {
|
|
19
|
+
league: string;
|
|
20
|
+
teamId: string;
|
|
21
|
+
countryId?: string;
|
|
22
|
+
}): string;
|
|
23
|
+
export declare function buildFavoriteTeamChips(favoriteTeamsPerLeague: Record<string, string> | undefined, allTeams: Record<string, FavoriteTeamLookup[] | undefined> | undefined): FavoriteTeamChip[];
|
|
24
|
+
export declare function sortFavoriteTeamChips(chips: FavoriteTeamChip[], favoriteTeamsOrder?: string[]): FavoriteTeamChip[];
|
|
25
|
+
export declare function buildFavoriteTeamsOrderFromChips(chips: FavoriteTeamChip[]): string[];
|
|
26
|
+
export declare function syncFavoriteTeamsOrder(favoriteTeamsOrder: string[] | undefined, chips: FavoriteTeamChip[]): string[];
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.syncFavoriteTeamsOrder = exports.buildFavoriteTeamsOrderFromChips = exports.sortFavoriteTeamChips = exports.buildFavoriteTeamChips = exports.getFavoriteTeamChipKey = exports.DEFAULT_FAVORITE_TEAM_LEAGUE_ORDER = void 0;
|
|
4
|
+
exports.DEFAULT_FAVORITE_TEAM_LEAGUE_ORDER = [
|
|
5
|
+
"nba",
|
|
6
|
+
"mlb",
|
|
7
|
+
"wbc",
|
|
8
|
+
"nfl",
|
|
9
|
+
"nhl",
|
|
10
|
+
"iho",
|
|
11
|
+
"epl",
|
|
12
|
+
"fifa",
|
|
13
|
+
"cbb",
|
|
14
|
+
"cfb",
|
|
15
|
+
"mls",
|
|
16
|
+
"wnba",
|
|
17
|
+
"cwc",
|
|
18
|
+
];
|
|
19
|
+
function getFavoriteTeamChipKey({ league, teamId, countryId, }) {
|
|
20
|
+
return countryId ? `country-${countryId}` : `${league}-${teamId}`;
|
|
21
|
+
}
|
|
22
|
+
exports.getFavoriteTeamChipKey = getFavoriteTeamChipKey;
|
|
23
|
+
function buildFavoriteTeamChips(favoriteTeamsPerLeague, allTeams) {
|
|
24
|
+
if (!favoriteTeamsPerLeague)
|
|
25
|
+
return [];
|
|
26
|
+
const chipsByKey = new Map();
|
|
27
|
+
Object.entries(favoriteTeamsPerLeague).forEach(([league, teamId]) => {
|
|
28
|
+
var _a, _b, _c;
|
|
29
|
+
const leagueKey = league === "ncaa" ? "cbb" : league;
|
|
30
|
+
const favoriteTeam = (_a = allTeams === null || allTeams === void 0 ? void 0 : allTeams[leagueKey]) === null || _a === void 0 ? void 0 : _a.find(item => { var _a; return ((_a = item === null || item === void 0 ? void 0 : item.id) === null || _a === void 0 ? void 0 : _a.toString()) === teamId; });
|
|
31
|
+
if (!(favoriteTeam === null || favoriteTeam === void 0 ? void 0 : favoriteTeam.image))
|
|
32
|
+
return;
|
|
33
|
+
const countryId = favoriteTeam.countryId
|
|
34
|
+
? String(favoriteTeam.countryId)
|
|
35
|
+
: undefined;
|
|
36
|
+
const key = getFavoriteTeamChipKey({
|
|
37
|
+
league: leagueKey,
|
|
38
|
+
teamId,
|
|
39
|
+
countryId,
|
|
40
|
+
});
|
|
41
|
+
if (chipsByKey.has(key))
|
|
42
|
+
return;
|
|
43
|
+
chipsByKey.set(key, {
|
|
44
|
+
key,
|
|
45
|
+
league: leagueKey,
|
|
46
|
+
teamImage: favoriteTeam.image,
|
|
47
|
+
teamId,
|
|
48
|
+
teamName: (_b = favoriteTeam.name) !== null && _b !== void 0 ? _b : "",
|
|
49
|
+
primaryColor: (_c = favoriteTeam.primaryColor) !== null && _c !== void 0 ? _c : null,
|
|
50
|
+
countryId,
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
return Array.from(chipsByKey.values());
|
|
54
|
+
}
|
|
55
|
+
exports.buildFavoriteTeamChips = buildFavoriteTeamChips;
|
|
56
|
+
function sortFavoriteTeamChips(chips, favoriteTeamsOrder) {
|
|
57
|
+
if (!chips.length)
|
|
58
|
+
return chips;
|
|
59
|
+
const orderIndex = new Map((favoriteTeamsOrder !== null && favoriteTeamsOrder !== void 0 ? favoriteTeamsOrder : []).map((key, index) => [key, index]));
|
|
60
|
+
return [...chips].sort((a, b) => {
|
|
61
|
+
const aOrder = orderIndex.get(a.key);
|
|
62
|
+
const bOrder = orderIndex.get(b.key);
|
|
63
|
+
if (aOrder !== undefined && bOrder !== undefined) {
|
|
64
|
+
return aOrder - bOrder;
|
|
65
|
+
}
|
|
66
|
+
if (aOrder !== undefined)
|
|
67
|
+
return -1;
|
|
68
|
+
if (bOrder !== undefined)
|
|
69
|
+
return 1;
|
|
70
|
+
const aIndex = exports.DEFAULT_FAVORITE_TEAM_LEAGUE_ORDER.indexOf(a.league);
|
|
71
|
+
const bIndex = exports.DEFAULT_FAVORITE_TEAM_LEAGUE_ORDER.indexOf(b.league);
|
|
72
|
+
return ((aIndex === -1 ? exports.DEFAULT_FAVORITE_TEAM_LEAGUE_ORDER.length : aIndex) -
|
|
73
|
+
(bIndex === -1 ? exports.DEFAULT_FAVORITE_TEAM_LEAGUE_ORDER.length : bIndex));
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
exports.sortFavoriteTeamChips = sortFavoriteTeamChips;
|
|
77
|
+
function buildFavoriteTeamsOrderFromChips(chips) {
|
|
78
|
+
return sortFavoriteTeamChips(chips).map(chip => chip.key);
|
|
79
|
+
}
|
|
80
|
+
exports.buildFavoriteTeamsOrderFromChips = buildFavoriteTeamsOrderFromChips;
|
|
81
|
+
function syncFavoriteTeamsOrder(favoriteTeamsOrder, chips) {
|
|
82
|
+
const chipKeys = new Set(chips.map(chip => chip.key));
|
|
83
|
+
const syncedOrder = (favoriteTeamsOrder !== null && favoriteTeamsOrder !== void 0 ? favoriteTeamsOrder : []).filter(key => chipKeys.has(key));
|
|
84
|
+
chips.forEach(chip => {
|
|
85
|
+
if (!syncedOrder.includes(chip.key)) {
|
|
86
|
+
syncedOrder.push(chip.key);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return syncedOrder;
|
|
90
|
+
}
|
|
91
|
+
exports.syncFavoriteTeamsOrder = syncFavoriteTeamsOrder;
|
package/dist/helpers/index.js
CHANGED
|
@@ -154,13 +154,6 @@ exports.achievementsMap = {
|
|
|
154
154
|
description: "Rate every game played by your favorite team in a season.",
|
|
155
155
|
type: "global",
|
|
156
156
|
},
|
|
157
|
-
true_believer: {
|
|
158
|
-
id: "true_believer",
|
|
159
|
-
name: "True Believer",
|
|
160
|
-
description: "Rate every game your favorite team plays in a season.",
|
|
161
|
-
type: "global",
|
|
162
|
-
seasonal: true,
|
|
163
|
-
},
|
|
164
157
|
ride_or_die: {
|
|
165
158
|
id: "ride_or_die",
|
|
166
159
|
name: "Ride or Die",
|
|
@@ -740,7 +733,7 @@ exports.achievementsMap = {
|
|
|
740
733
|
name: "Crystal Ball",
|
|
741
734
|
description: "Make correct game-winner picks (lifetime).",
|
|
742
735
|
tiers: {
|
|
743
|
-
bronze: { threshold:
|
|
736
|
+
bronze: { threshold: 10 },
|
|
744
737
|
silver: { threshold: 50 },
|
|
745
738
|
gold: { threshold: 100 },
|
|
746
739
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export * from "./schemas/poll";
|
|
|
26
26
|
export * from "./schemas/scorePrediction";
|
|
27
27
|
export * from "./schemas/reactivation";
|
|
28
28
|
export * from "./schemas/standings";
|
|
29
|
+
export * from "./schemas/attendance";
|
|
29
30
|
export * from "./models/user";
|
|
30
31
|
export * from "./models/rating";
|
|
31
32
|
export * from "./models/game";
|
|
@@ -55,4 +56,5 @@ export * from "./models/poll";
|
|
|
55
56
|
export * from "./models/scorePrediction";
|
|
56
57
|
export * from "./models/reactivation";
|
|
57
58
|
export * from "./models/standings";
|
|
59
|
+
export * from "./models/attendance";
|
|
58
60
|
export * from "./constants";
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __exportStar(require("./schemas/poll"), exports);
|
|
|
42
42
|
__exportStar(require("./schemas/scorePrediction"), exports);
|
|
43
43
|
__exportStar(require("./schemas/reactivation"), exports);
|
|
44
44
|
__exportStar(require("./schemas/standings"), exports);
|
|
45
|
+
__exportStar(require("./schemas/attendance"), exports);
|
|
45
46
|
__exportStar(require("./models/user"), exports);
|
|
46
47
|
__exportStar(require("./models/rating"), exports);
|
|
47
48
|
__exportStar(require("./models/game"), exports);
|
|
@@ -71,4 +72,5 @@ __exportStar(require("./models/poll"), exports);
|
|
|
71
72
|
__exportStar(require("./models/scorePrediction"), exports);
|
|
72
73
|
__exportStar(require("./models/reactivation"), exports);
|
|
73
74
|
__exportStar(require("./models/standings"), exports);
|
|
75
|
+
__exportStar(require("./models/attendance"), exports);
|
|
74
76
|
__exportStar(require("./constants"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { attendanceSchema, attendanceResponseSchema, createAttendanceSchema } from "../schemas/attendance";
|
|
3
|
+
export type Attendance = z.infer<typeof attendanceSchema>;
|
|
4
|
+
export type CreateAttendance = z.infer<typeof createAttendanceSchema>;
|
|
5
|
+
export type AttendanceResponse = z.infer<typeof attendanceResponseSchema>;
|
|
@@ -1015,8 +1015,11 @@ export declare const articleSchema: z.ZodObject<{
|
|
|
1015
1015
|
count: number;
|
|
1016
1016
|
}[] | undefined;
|
|
1017
1017
|
}>>;
|
|
1018
|
-
achievements: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"speed_rater">, z.ZodLiteral<"take_this">, z.ZodLiteral<"front_runner">, z.ZodLiteral<"loyal_till_the_end">, z.ZodLiteral<"around_the_world">, z.ZodLiteral<"take_off">, z.ZodLiteral<"embrace_debate">, z.ZodLiteral<"fan_of_the_people">, z.ZodLiteral<"the_peoples_fan">, z.ZodLiteral<"take_titan">, z.ZodLiteral<"take_first">, z.ZodLiteral<"hall_of_takes">, z.ZodLiteral<"superfan">, z.ZodLiteral<"
|
|
1018
|
+
achievements: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"speed_rater">, z.ZodLiteral<"take_this">, z.ZodLiteral<"front_runner">, z.ZodLiteral<"loyal_till_the_end">, z.ZodLiteral<"around_the_world">, z.ZodLiteral<"take_off">, z.ZodLiteral<"embrace_debate">, z.ZodLiteral<"fan_of_the_people">, z.ZodLiteral<"the_peoples_fan">, z.ZodLiteral<"take_titan">, z.ZodLiteral<"take_first">, z.ZodLiteral<"hall_of_takes">, z.ZodLiteral<"superfan">, z.ZodLiteral<"ride_or_die">, z.ZodLiteral<"through_thick_n_thin">, z.ZodLiteral<"fan-tastic">, z.ZodLiteral<"marathon_fan">, z.ZodLiteral<"new_years_resolution">, z.ZodLiteral<"dog_days_of_summer">, z.ZodLiteral<"50_50_club">, z.ZodLiteral<"ball_knower">, z.ZodLiteral<"heating_up">, z.ZodLiteral<"full_court_press">, z.ZodLiteral<"grid_iron_guru">, z.ZodLiteral<"across_the_yard">, z.ZodLiteral<"pigskin_power">, z.ZodLiteral<"goal_getter">, z.ZodLiteral<"footie_fanatic">, z.ZodLiteral<"campaign_conqueror">, z.ZodLiteral<"diamond_hands">, z.ZodLiteral<"field_of_dreams">, z.ZodLiteral<"charlie_hustle">, z.ZodLiteral<"power_play">, z.ZodLiteral<"ice_king">, z.ZodLiteral<"marleau_master">, z.ZodLiteral<"the_admiral">, z.ZodLiteral<"the_kick_six">, z.ZodLiteral<"coin_toss">, z.ZodLiteral<"golden_jacket">, z.ZodLiteral<"pop_the_champagne">, z.ZodLiteral<"game_grower">, z.ZodLiteral<"fandon_donovan">, z.ZodLiteral<"soccer_stud">, z.ZodLiteral<"the_big_o">, z.ZodLiteral<"the_grateful_red">, z.ZodLiteral<"mad_march">, z.ZodLiteral<"the_logo">, z.ZodLiteral<"the_big_dipper">, z.ZodLiteral<"mid_table">, z.ZodLiteral<"fan_of_the_match">, z.ZodLiteral<"super_mario">, z.ZodLiteral<"dick_butkus">, z.ZodLiteral<"hit_the_heismann">, z.ZodLiteral<"lobos_legacy">, z.ZodLiteral<"tau3asi">, z.ZodLiteral<"queenb">, z.ZodLiteral<"rookie_rater">, z.ZodLiteral<"six_three">, z.ZodLiteral<"groupie">, z.ZodLiteral<"for_your_confederations">, z.ZodLiteral<"group_stage_glory">, z.ZodLiteral<"six_confederations">, z.ZodLiteral<"world_on_a_string">, z.ZodLiteral<"knockout_king">, z.ZodLiteral<"host_with_the_most">, z.ZodLiteral<"the_golden_globe">, z.ZodLiteral<"world_beater">, z.ZodLiteral<"group_theory">, z.ZodLiteral<"cold_reading">, z.ZodLiteral<"sixteenth_sense">, z.ZodLiteral<"quarter_oracle">, z.ZodLiteral<"penultimate_prophet">, z.ZodLiteral<"called_the_cup">, z.ZodLiteral<"a_list">, z.ZodLiteral<"fan_in_the_arena">, z.ZodLiteral<"stadium_pulse">, z.ZodLiteral<"ballot_box">, z.ZodLiteral<"pin_drop">, z.ZodLiteral<"card_complete">, z.ZodLiteral<"pride_of_a_nation">, z.ZodLiteral<"flow_state">, z.ZodLiteral<"crystal_ball">, z.ZodLiteral<"strive_for_greatness">, z.ZodLiteral<"like_mike">, z.ZodLiteral<"joltin_joe">]>, z.ZodObject<{
|
|
1019
1019
|
id: z.ZodString;
|
|
1020
|
+
/**
|
|
1021
|
+
* Schema for updating an existing article.
|
|
1022
|
+
*/
|
|
1020
1023
|
name: z.ZodString;
|
|
1021
1024
|
description: z.ZodString;
|
|
1022
1025
|
progress: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2330,8 +2333,11 @@ export declare const createArticleSchema: z.ZodObject<{
|
|
|
2330
2333
|
count: number;
|
|
2331
2334
|
}[] | undefined;
|
|
2332
2335
|
}>>;
|
|
2333
|
-
achievements: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"speed_rater">, z.ZodLiteral<"take_this">, z.ZodLiteral<"front_runner">, z.ZodLiteral<"loyal_till_the_end">, z.ZodLiteral<"around_the_world">, z.ZodLiteral<"take_off">, z.ZodLiteral<"embrace_debate">, z.ZodLiteral<"fan_of_the_people">, z.ZodLiteral<"the_peoples_fan">, z.ZodLiteral<"take_titan">, z.ZodLiteral<"take_first">, z.ZodLiteral<"hall_of_takes">, z.ZodLiteral<"superfan">, z.ZodLiteral<"
|
|
2336
|
+
achievements: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"speed_rater">, z.ZodLiteral<"take_this">, z.ZodLiteral<"front_runner">, z.ZodLiteral<"loyal_till_the_end">, z.ZodLiteral<"around_the_world">, z.ZodLiteral<"take_off">, z.ZodLiteral<"embrace_debate">, z.ZodLiteral<"fan_of_the_people">, z.ZodLiteral<"the_peoples_fan">, z.ZodLiteral<"take_titan">, z.ZodLiteral<"take_first">, z.ZodLiteral<"hall_of_takes">, z.ZodLiteral<"superfan">, z.ZodLiteral<"ride_or_die">, z.ZodLiteral<"through_thick_n_thin">, z.ZodLiteral<"fan-tastic">, z.ZodLiteral<"marathon_fan">, z.ZodLiteral<"new_years_resolution">, z.ZodLiteral<"dog_days_of_summer">, z.ZodLiteral<"50_50_club">, z.ZodLiteral<"ball_knower">, z.ZodLiteral<"heating_up">, z.ZodLiteral<"full_court_press">, z.ZodLiteral<"grid_iron_guru">, z.ZodLiteral<"across_the_yard">, z.ZodLiteral<"pigskin_power">, z.ZodLiteral<"goal_getter">, z.ZodLiteral<"footie_fanatic">, z.ZodLiteral<"campaign_conqueror">, z.ZodLiteral<"diamond_hands">, z.ZodLiteral<"field_of_dreams">, z.ZodLiteral<"charlie_hustle">, z.ZodLiteral<"power_play">, z.ZodLiteral<"ice_king">, z.ZodLiteral<"marleau_master">, z.ZodLiteral<"the_admiral">, z.ZodLiteral<"the_kick_six">, z.ZodLiteral<"coin_toss">, z.ZodLiteral<"golden_jacket">, z.ZodLiteral<"pop_the_champagne">, z.ZodLiteral<"game_grower">, z.ZodLiteral<"fandon_donovan">, z.ZodLiteral<"soccer_stud">, z.ZodLiteral<"the_big_o">, z.ZodLiteral<"the_grateful_red">, z.ZodLiteral<"mad_march">, z.ZodLiteral<"the_logo">, z.ZodLiteral<"the_big_dipper">, z.ZodLiteral<"mid_table">, z.ZodLiteral<"fan_of_the_match">, z.ZodLiteral<"super_mario">, z.ZodLiteral<"dick_butkus">, z.ZodLiteral<"hit_the_heismann">, z.ZodLiteral<"lobos_legacy">, z.ZodLiteral<"tau3asi">, z.ZodLiteral<"queenb">, z.ZodLiteral<"rookie_rater">, z.ZodLiteral<"six_three">, z.ZodLiteral<"groupie">, z.ZodLiteral<"for_your_confederations">, z.ZodLiteral<"group_stage_glory">, z.ZodLiteral<"six_confederations">, z.ZodLiteral<"world_on_a_string">, z.ZodLiteral<"knockout_king">, z.ZodLiteral<"host_with_the_most">, z.ZodLiteral<"the_golden_globe">, z.ZodLiteral<"world_beater">, z.ZodLiteral<"group_theory">, z.ZodLiteral<"cold_reading">, z.ZodLiteral<"sixteenth_sense">, z.ZodLiteral<"quarter_oracle">, z.ZodLiteral<"penultimate_prophet">, z.ZodLiteral<"called_the_cup">, z.ZodLiteral<"a_list">, z.ZodLiteral<"fan_in_the_arena">, z.ZodLiteral<"stadium_pulse">, z.ZodLiteral<"ballot_box">, z.ZodLiteral<"pin_drop">, z.ZodLiteral<"card_complete">, z.ZodLiteral<"pride_of_a_nation">, z.ZodLiteral<"flow_state">, z.ZodLiteral<"crystal_ball">, z.ZodLiteral<"strive_for_greatness">, z.ZodLiteral<"like_mike">, z.ZodLiteral<"joltin_joe">]>, z.ZodObject<{
|
|
2334
2337
|
id: z.ZodString;
|
|
2338
|
+
/**
|
|
2339
|
+
* Schema for updating an existing article.
|
|
2340
|
+
*/
|
|
2335
2341
|
name: z.ZodString;
|
|
2336
2342
|
description: z.ZodString;
|
|
2337
2343
|
progress: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3699,8 +3705,11 @@ export declare const articleThreadCommentSchema: z.ZodObject<{
|
|
|
3699
3705
|
count: number;
|
|
3700
3706
|
}[] | undefined;
|
|
3701
3707
|
}>>;
|
|
3702
|
-
achievements: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"speed_rater">, z.ZodLiteral<"take_this">, z.ZodLiteral<"front_runner">, z.ZodLiteral<"loyal_till_the_end">, z.ZodLiteral<"around_the_world">, z.ZodLiteral<"take_off">, z.ZodLiteral<"embrace_debate">, z.ZodLiteral<"fan_of_the_people">, z.ZodLiteral<"the_peoples_fan">, z.ZodLiteral<"take_titan">, z.ZodLiteral<"take_first">, z.ZodLiteral<"hall_of_takes">, z.ZodLiteral<"superfan">, z.ZodLiteral<"
|
|
3708
|
+
achievements: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"speed_rater">, z.ZodLiteral<"take_this">, z.ZodLiteral<"front_runner">, z.ZodLiteral<"loyal_till_the_end">, z.ZodLiteral<"around_the_world">, z.ZodLiteral<"take_off">, z.ZodLiteral<"embrace_debate">, z.ZodLiteral<"fan_of_the_people">, z.ZodLiteral<"the_peoples_fan">, z.ZodLiteral<"take_titan">, z.ZodLiteral<"take_first">, z.ZodLiteral<"hall_of_takes">, z.ZodLiteral<"superfan">, z.ZodLiteral<"ride_or_die">, z.ZodLiteral<"through_thick_n_thin">, z.ZodLiteral<"fan-tastic">, z.ZodLiteral<"marathon_fan">, z.ZodLiteral<"new_years_resolution">, z.ZodLiteral<"dog_days_of_summer">, z.ZodLiteral<"50_50_club">, z.ZodLiteral<"ball_knower">, z.ZodLiteral<"heating_up">, z.ZodLiteral<"full_court_press">, z.ZodLiteral<"grid_iron_guru">, z.ZodLiteral<"across_the_yard">, z.ZodLiteral<"pigskin_power">, z.ZodLiteral<"goal_getter">, z.ZodLiteral<"footie_fanatic">, z.ZodLiteral<"campaign_conqueror">, z.ZodLiteral<"diamond_hands">, z.ZodLiteral<"field_of_dreams">, z.ZodLiteral<"charlie_hustle">, z.ZodLiteral<"power_play">, z.ZodLiteral<"ice_king">, z.ZodLiteral<"marleau_master">, z.ZodLiteral<"the_admiral">, z.ZodLiteral<"the_kick_six">, z.ZodLiteral<"coin_toss">, z.ZodLiteral<"golden_jacket">, z.ZodLiteral<"pop_the_champagne">, z.ZodLiteral<"game_grower">, z.ZodLiteral<"fandon_donovan">, z.ZodLiteral<"soccer_stud">, z.ZodLiteral<"the_big_o">, z.ZodLiteral<"the_grateful_red">, z.ZodLiteral<"mad_march">, z.ZodLiteral<"the_logo">, z.ZodLiteral<"the_big_dipper">, z.ZodLiteral<"mid_table">, z.ZodLiteral<"fan_of_the_match">, z.ZodLiteral<"super_mario">, z.ZodLiteral<"dick_butkus">, z.ZodLiteral<"hit_the_heismann">, z.ZodLiteral<"lobos_legacy">, z.ZodLiteral<"tau3asi">, z.ZodLiteral<"queenb">, z.ZodLiteral<"rookie_rater">, z.ZodLiteral<"six_three">, z.ZodLiteral<"groupie">, z.ZodLiteral<"for_your_confederations">, z.ZodLiteral<"group_stage_glory">, z.ZodLiteral<"six_confederations">, z.ZodLiteral<"world_on_a_string">, z.ZodLiteral<"knockout_king">, z.ZodLiteral<"host_with_the_most">, z.ZodLiteral<"the_golden_globe">, z.ZodLiteral<"world_beater">, z.ZodLiteral<"group_theory">, z.ZodLiteral<"cold_reading">, z.ZodLiteral<"sixteenth_sense">, z.ZodLiteral<"quarter_oracle">, z.ZodLiteral<"penultimate_prophet">, z.ZodLiteral<"called_the_cup">, z.ZodLiteral<"a_list">, z.ZodLiteral<"fan_in_the_arena">, z.ZodLiteral<"stadium_pulse">, z.ZodLiteral<"ballot_box">, z.ZodLiteral<"pin_drop">, z.ZodLiteral<"card_complete">, z.ZodLiteral<"pride_of_a_nation">, z.ZodLiteral<"flow_state">, z.ZodLiteral<"crystal_ball">, z.ZodLiteral<"strive_for_greatness">, z.ZodLiteral<"like_mike">, z.ZodLiteral<"joltin_joe">]>, z.ZodObject<{
|
|
3703
3709
|
id: z.ZodString;
|
|
3710
|
+
/**
|
|
3711
|
+
* Schema for updating an existing article.
|
|
3712
|
+
*/
|
|
3704
3713
|
name: z.ZodString;
|
|
3705
3714
|
description: z.ZodString;
|
|
3706
3715
|
progress: z.ZodOptional<z.ZodNumber>;
|
|
@@ -4882,8 +4891,11 @@ export declare const articleThreadCommentSchema: z.ZodObject<{
|
|
|
4882
4891
|
count: number;
|
|
4883
4892
|
}[] | undefined;
|
|
4884
4893
|
}>>;
|
|
4885
|
-
achievements: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"speed_rater">, z.ZodLiteral<"take_this">, z.ZodLiteral<"front_runner">, z.ZodLiteral<"loyal_till_the_end">, z.ZodLiteral<"around_the_world">, z.ZodLiteral<"take_off">, z.ZodLiteral<"embrace_debate">, z.ZodLiteral<"fan_of_the_people">, z.ZodLiteral<"the_peoples_fan">, z.ZodLiteral<"take_titan">, z.ZodLiteral<"take_first">, z.ZodLiteral<"hall_of_takes">, z.ZodLiteral<"superfan">, z.ZodLiteral<"
|
|
4894
|
+
achievements: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"speed_rater">, z.ZodLiteral<"take_this">, z.ZodLiteral<"front_runner">, z.ZodLiteral<"loyal_till_the_end">, z.ZodLiteral<"around_the_world">, z.ZodLiteral<"take_off">, z.ZodLiteral<"embrace_debate">, z.ZodLiteral<"fan_of_the_people">, z.ZodLiteral<"the_peoples_fan">, z.ZodLiteral<"take_titan">, z.ZodLiteral<"take_first">, z.ZodLiteral<"hall_of_takes">, z.ZodLiteral<"superfan">, z.ZodLiteral<"ride_or_die">, z.ZodLiteral<"through_thick_n_thin">, z.ZodLiteral<"fan-tastic">, z.ZodLiteral<"marathon_fan">, z.ZodLiteral<"new_years_resolution">, z.ZodLiteral<"dog_days_of_summer">, z.ZodLiteral<"50_50_club">, z.ZodLiteral<"ball_knower">, z.ZodLiteral<"heating_up">, z.ZodLiteral<"full_court_press">, z.ZodLiteral<"grid_iron_guru">, z.ZodLiteral<"across_the_yard">, z.ZodLiteral<"pigskin_power">, z.ZodLiteral<"goal_getter">, z.ZodLiteral<"footie_fanatic">, z.ZodLiteral<"campaign_conqueror">, z.ZodLiteral<"diamond_hands">, z.ZodLiteral<"field_of_dreams">, z.ZodLiteral<"charlie_hustle">, z.ZodLiteral<"power_play">, z.ZodLiteral<"ice_king">, z.ZodLiteral<"marleau_master">, z.ZodLiteral<"the_admiral">, z.ZodLiteral<"the_kick_six">, z.ZodLiteral<"coin_toss">, z.ZodLiteral<"golden_jacket">, z.ZodLiteral<"pop_the_champagne">, z.ZodLiteral<"game_grower">, z.ZodLiteral<"fandon_donovan">, z.ZodLiteral<"soccer_stud">, z.ZodLiteral<"the_big_o">, z.ZodLiteral<"the_grateful_red">, z.ZodLiteral<"mad_march">, z.ZodLiteral<"the_logo">, z.ZodLiteral<"the_big_dipper">, z.ZodLiteral<"mid_table">, z.ZodLiteral<"fan_of_the_match">, z.ZodLiteral<"super_mario">, z.ZodLiteral<"dick_butkus">, z.ZodLiteral<"hit_the_heismann">, z.ZodLiteral<"lobos_legacy">, z.ZodLiteral<"tau3asi">, z.ZodLiteral<"queenb">, z.ZodLiteral<"rookie_rater">, z.ZodLiteral<"six_three">, z.ZodLiteral<"groupie">, z.ZodLiteral<"for_your_confederations">, z.ZodLiteral<"group_stage_glory">, z.ZodLiteral<"six_confederations">, z.ZodLiteral<"world_on_a_string">, z.ZodLiteral<"knockout_king">, z.ZodLiteral<"host_with_the_most">, z.ZodLiteral<"the_golden_globe">, z.ZodLiteral<"world_beater">, z.ZodLiteral<"group_theory">, z.ZodLiteral<"cold_reading">, z.ZodLiteral<"sixteenth_sense">, z.ZodLiteral<"quarter_oracle">, z.ZodLiteral<"penultimate_prophet">, z.ZodLiteral<"called_the_cup">, z.ZodLiteral<"a_list">, z.ZodLiteral<"fan_in_the_arena">, z.ZodLiteral<"stadium_pulse">, z.ZodLiteral<"ballot_box">, z.ZodLiteral<"pin_drop">, z.ZodLiteral<"card_complete">, z.ZodLiteral<"pride_of_a_nation">, z.ZodLiteral<"flow_state">, z.ZodLiteral<"crystal_ball">, z.ZodLiteral<"strive_for_greatness">, z.ZodLiteral<"like_mike">, z.ZodLiteral<"joltin_joe">]>, z.ZodObject<{
|
|
4886
4895
|
id: z.ZodString;
|
|
4896
|
+
/**
|
|
4897
|
+
* Schema for updating an existing article.
|
|
4898
|
+
*/
|
|
4887
4899
|
name: z.ZodString;
|
|
4888
4900
|
description: z.ZodString;
|
|
4889
4901
|
progress: z.ZodOptional<z.ZodNumber>;
|
|
@@ -6117,8 +6129,11 @@ export declare const articleThreadCommentLikeSchema: z.ZodObject<{
|
|
|
6117
6129
|
count: number;
|
|
6118
6130
|
}[] | undefined;
|
|
6119
6131
|
}>>;
|
|
6120
|
-
achievements: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"speed_rater">, z.ZodLiteral<"take_this">, z.ZodLiteral<"front_runner">, z.ZodLiteral<"loyal_till_the_end">, z.ZodLiteral<"around_the_world">, z.ZodLiteral<"take_off">, z.ZodLiteral<"embrace_debate">, z.ZodLiteral<"fan_of_the_people">, z.ZodLiteral<"the_peoples_fan">, z.ZodLiteral<"take_titan">, z.ZodLiteral<"take_first">, z.ZodLiteral<"hall_of_takes">, z.ZodLiteral<"superfan">, z.ZodLiteral<"
|
|
6132
|
+
achievements: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"speed_rater">, z.ZodLiteral<"take_this">, z.ZodLiteral<"front_runner">, z.ZodLiteral<"loyal_till_the_end">, z.ZodLiteral<"around_the_world">, z.ZodLiteral<"take_off">, z.ZodLiteral<"embrace_debate">, z.ZodLiteral<"fan_of_the_people">, z.ZodLiteral<"the_peoples_fan">, z.ZodLiteral<"take_titan">, z.ZodLiteral<"take_first">, z.ZodLiteral<"hall_of_takes">, z.ZodLiteral<"superfan">, z.ZodLiteral<"ride_or_die">, z.ZodLiteral<"through_thick_n_thin">, z.ZodLiteral<"fan-tastic">, z.ZodLiteral<"marathon_fan">, z.ZodLiteral<"new_years_resolution">, z.ZodLiteral<"dog_days_of_summer">, z.ZodLiteral<"50_50_club">, z.ZodLiteral<"ball_knower">, z.ZodLiteral<"heating_up">, z.ZodLiteral<"full_court_press">, z.ZodLiteral<"grid_iron_guru">, z.ZodLiteral<"across_the_yard">, z.ZodLiteral<"pigskin_power">, z.ZodLiteral<"goal_getter">, z.ZodLiteral<"footie_fanatic">, z.ZodLiteral<"campaign_conqueror">, z.ZodLiteral<"diamond_hands">, z.ZodLiteral<"field_of_dreams">, z.ZodLiteral<"charlie_hustle">, z.ZodLiteral<"power_play">, z.ZodLiteral<"ice_king">, z.ZodLiteral<"marleau_master">, z.ZodLiteral<"the_admiral">, z.ZodLiteral<"the_kick_six">, z.ZodLiteral<"coin_toss">, z.ZodLiteral<"golden_jacket">, z.ZodLiteral<"pop_the_champagne">, z.ZodLiteral<"game_grower">, z.ZodLiteral<"fandon_donovan">, z.ZodLiteral<"soccer_stud">, z.ZodLiteral<"the_big_o">, z.ZodLiteral<"the_grateful_red">, z.ZodLiteral<"mad_march">, z.ZodLiteral<"the_logo">, z.ZodLiteral<"the_big_dipper">, z.ZodLiteral<"mid_table">, z.ZodLiteral<"fan_of_the_match">, z.ZodLiteral<"super_mario">, z.ZodLiteral<"dick_butkus">, z.ZodLiteral<"hit_the_heismann">, z.ZodLiteral<"lobos_legacy">, z.ZodLiteral<"tau3asi">, z.ZodLiteral<"queenb">, z.ZodLiteral<"rookie_rater">, z.ZodLiteral<"six_three">, z.ZodLiteral<"groupie">, z.ZodLiteral<"for_your_confederations">, z.ZodLiteral<"group_stage_glory">, z.ZodLiteral<"six_confederations">, z.ZodLiteral<"world_on_a_string">, z.ZodLiteral<"knockout_king">, z.ZodLiteral<"host_with_the_most">, z.ZodLiteral<"the_golden_globe">, z.ZodLiteral<"world_beater">, z.ZodLiteral<"group_theory">, z.ZodLiteral<"cold_reading">, z.ZodLiteral<"sixteenth_sense">, z.ZodLiteral<"quarter_oracle">, z.ZodLiteral<"penultimate_prophet">, z.ZodLiteral<"called_the_cup">, z.ZodLiteral<"a_list">, z.ZodLiteral<"fan_in_the_arena">, z.ZodLiteral<"stadium_pulse">, z.ZodLiteral<"ballot_box">, z.ZodLiteral<"pin_drop">, z.ZodLiteral<"card_complete">, z.ZodLiteral<"pride_of_a_nation">, z.ZodLiteral<"flow_state">, z.ZodLiteral<"crystal_ball">, z.ZodLiteral<"strive_for_greatness">, z.ZodLiteral<"like_mike">, z.ZodLiteral<"joltin_joe">]>, z.ZodObject<{
|
|
6121
6133
|
id: z.ZodString;
|
|
6134
|
+
/**
|
|
6135
|
+
* Schema for updating an existing article.
|
|
6136
|
+
*/
|
|
6122
6137
|
name: z.ZodString;
|
|
6123
6138
|
description: z.ZodString;
|
|
6124
6139
|
progress: z.ZodOptional<z.ZodNumber>;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ATTENDANCE_RADIUS_METERS = 1000;
|
|
3
|
+
export declare const attendanceSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
userId: z.ZodString;
|
|
6
|
+
gameId: z.ZodString;
|
|
7
|
+
stadiumId: z.ZodString;
|
|
8
|
+
verifiedAt: z.ZodNumber;
|
|
9
|
+
userLat: z.ZodNumber;
|
|
10
|
+
userLng: z.ZodNumber;
|
|
11
|
+
stadiumLat: z.ZodNumber;
|
|
12
|
+
stadiumLng: z.ZodNumber;
|
|
13
|
+
distanceMeters: z.ZodNumber;
|
|
14
|
+
verified: z.ZodBoolean;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
id: string;
|
|
17
|
+
stadiumId: string;
|
|
18
|
+
userId: string;
|
|
19
|
+
gameId: string;
|
|
20
|
+
verified: boolean;
|
|
21
|
+
verifiedAt: number;
|
|
22
|
+
userLat: number;
|
|
23
|
+
userLng: number;
|
|
24
|
+
stadiumLat: number;
|
|
25
|
+
stadiumLng: number;
|
|
26
|
+
distanceMeters: number;
|
|
27
|
+
}, {
|
|
28
|
+
id: string;
|
|
29
|
+
stadiumId: string;
|
|
30
|
+
userId: string;
|
|
31
|
+
gameId: string;
|
|
32
|
+
verified: boolean;
|
|
33
|
+
verifiedAt: number;
|
|
34
|
+
userLat: number;
|
|
35
|
+
userLng: number;
|
|
36
|
+
stadiumLat: number;
|
|
37
|
+
stadiumLng: number;
|
|
38
|
+
distanceMeters: number;
|
|
39
|
+
}>;
|
|
40
|
+
export declare const createAttendanceSchema: z.ZodObject<{
|
|
41
|
+
gameId: z.ZodString;
|
|
42
|
+
userLat: z.ZodNumber;
|
|
43
|
+
userLng: z.ZodNumber;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
gameId: string;
|
|
46
|
+
userLat: number;
|
|
47
|
+
userLng: number;
|
|
48
|
+
}, {
|
|
49
|
+
gameId: string;
|
|
50
|
+
userLat: number;
|
|
51
|
+
userLng: number;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const attendanceResponseSchema: z.ZodObject<{
|
|
54
|
+
verified: z.ZodBoolean;
|
|
55
|
+
distanceMeters: z.ZodNumber;
|
|
56
|
+
attendance: z.ZodOptional<z.ZodObject<{
|
|
57
|
+
id: z.ZodString;
|
|
58
|
+
userId: z.ZodString;
|
|
59
|
+
gameId: z.ZodString;
|
|
60
|
+
stadiumId: z.ZodString;
|
|
61
|
+
verifiedAt: z.ZodNumber;
|
|
62
|
+
userLat: z.ZodNumber;
|
|
63
|
+
userLng: z.ZodNumber;
|
|
64
|
+
stadiumLat: z.ZodNumber;
|
|
65
|
+
stadiumLng: z.ZodNumber;
|
|
66
|
+
distanceMeters: z.ZodNumber;
|
|
67
|
+
verified: z.ZodBoolean;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
id: string;
|
|
70
|
+
stadiumId: string;
|
|
71
|
+
userId: string;
|
|
72
|
+
gameId: string;
|
|
73
|
+
verified: boolean;
|
|
74
|
+
verifiedAt: number;
|
|
75
|
+
userLat: number;
|
|
76
|
+
userLng: number;
|
|
77
|
+
stadiumLat: number;
|
|
78
|
+
stadiumLng: number;
|
|
79
|
+
distanceMeters: number;
|
|
80
|
+
}, {
|
|
81
|
+
id: string;
|
|
82
|
+
stadiumId: string;
|
|
83
|
+
userId: string;
|
|
84
|
+
gameId: string;
|
|
85
|
+
verified: boolean;
|
|
86
|
+
verifiedAt: number;
|
|
87
|
+
userLat: number;
|
|
88
|
+
userLng: number;
|
|
89
|
+
stadiumLat: number;
|
|
90
|
+
stadiumLng: number;
|
|
91
|
+
distanceMeters: number;
|
|
92
|
+
}>>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
verified: boolean;
|
|
95
|
+
distanceMeters: number;
|
|
96
|
+
attendance?: {
|
|
97
|
+
id: string;
|
|
98
|
+
stadiumId: string;
|
|
99
|
+
userId: string;
|
|
100
|
+
gameId: string;
|
|
101
|
+
verified: boolean;
|
|
102
|
+
verifiedAt: number;
|
|
103
|
+
userLat: number;
|
|
104
|
+
userLng: number;
|
|
105
|
+
stadiumLat: number;
|
|
106
|
+
stadiumLng: number;
|
|
107
|
+
distanceMeters: number;
|
|
108
|
+
} | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
verified: boolean;
|
|
111
|
+
distanceMeters: number;
|
|
112
|
+
attendance?: {
|
|
113
|
+
id: string;
|
|
114
|
+
stadiumId: string;
|
|
115
|
+
userId: string;
|
|
116
|
+
gameId: string;
|
|
117
|
+
verified: boolean;
|
|
118
|
+
verifiedAt: number;
|
|
119
|
+
userLat: number;
|
|
120
|
+
userLng: number;
|
|
121
|
+
stadiumLat: number;
|
|
122
|
+
stadiumLng: number;
|
|
123
|
+
distanceMeters: number;
|
|
124
|
+
} | undefined;
|
|
125
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.attendanceResponseSchema = exports.createAttendanceSchema = exports.attendanceSchema = exports.ATTENDANCE_RADIUS_METERS = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ATTENDANCE_RADIUS_METERS = 1000;
|
|
6
|
+
exports.attendanceSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string(),
|
|
8
|
+
userId: zod_1.z.string(),
|
|
9
|
+
gameId: zod_1.z.string(),
|
|
10
|
+
stadiumId: zod_1.z.string(),
|
|
11
|
+
verifiedAt: zod_1.z.number(),
|
|
12
|
+
userLat: zod_1.z.number(),
|
|
13
|
+
userLng: zod_1.z.number(),
|
|
14
|
+
stadiumLat: zod_1.z.number(),
|
|
15
|
+
stadiumLng: zod_1.z.number(),
|
|
16
|
+
distanceMeters: zod_1.z.number(),
|
|
17
|
+
verified: zod_1.z.boolean(),
|
|
18
|
+
});
|
|
19
|
+
exports.createAttendanceSchema = zod_1.z.object({
|
|
20
|
+
gameId: zod_1.z.string(),
|
|
21
|
+
userLat: zod_1.z.number(),
|
|
22
|
+
userLng: zod_1.z.number(),
|
|
23
|
+
});
|
|
24
|
+
exports.attendanceResponseSchema = zod_1.z.object({
|
|
25
|
+
verified: zod_1.z.boolean(),
|
|
26
|
+
distanceMeters: zod_1.z.number(),
|
|
27
|
+
attendance: exports.attendanceSchema.optional(),
|
|
28
|
+
});
|