@ttt-productions/q-core 0.1.40 → 0.1.42
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/constants/business.d.ts +3 -0
- package/dist/constants/business.d.ts.map +1 -1
- package/dist/constants/business.js +3 -0
- package/dist/constants/business.js.map +1 -1
- package/dist/constants/sports.d.ts +0 -6
- package/dist/constants/sports.d.ts.map +1 -1
- package/dist/constants/sports.js +0 -6
- package/dist/constants/sports.js.map +1 -1
- package/dist/doc-schemas/atoms.d.ts +0 -1
- package/dist/doc-schemas/atoms.d.ts.map +1 -1
- package/dist/doc-schemas/audit-event.d.ts +0 -2
- package/dist/doc-schemas/audit-event.d.ts.map +1 -1
- package/dist/doc-schemas/registry.d.ts +0 -78
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/sport-game.d.ts +0 -6
- package/dist/doc-schemas/sport-game.d.ts.map +1 -1
- package/dist/doc-schemas/sport-game.js +1 -2
- package/dist/doc-schemas/sport-game.js.map +1 -1
- package/dist/doc-schemas/stats-operation.d.ts +0 -147
- package/dist/doc-schemas/stats-operation.d.ts.map +1 -1
- package/dist/doc-schemas/stats-operation.js +2 -42
- package/dist/doc-schemas/stats-operation.js.map +1 -1
- package/dist/doc-schemas/system.d.ts +0 -3
- package/dist/doc-schemas/system.d.ts.map +1 -1
- package/dist/ids/index.d.ts +0 -1
- package/dist/ids/index.d.ts.map +1 -1
- package/dist/ids/index.js +0 -1
- package/dist/ids/index.js.map +1 -1
- package/dist/schemas/schedules.d.ts +0 -4
- package/dist/schemas/schedules.d.ts.map +1 -1
- package/dist/schemas/schedules.js +2 -6
- package/dist/schemas/schedules.js.map +1 -1
- package/dist/schemas/stats.d.ts +0 -3
- package/dist/schemas/stats.d.ts.map +1 -1
- package/dist/schemas/stats.js +0 -2
- package/dist/schemas/stats.js.map +1 -1
- package/dist/schemas/teams.d.ts +4 -16
- package/dist/schemas/teams.d.ts.map +1 -1
- package/dist/schemas/teams.js +4 -16
- package/dist/schemas/teams.js.map +1 -1
- package/dist/sports/contribution.d.ts +3 -10
- package/dist/sports/contribution.d.ts.map +1 -1
- package/dist/sports/contribution.js +10 -9
- package/dist/sports/contribution.js.map +1 -1
- package/dist/types/audit.d.ts +1 -1
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js +0 -1
- package/dist/types/audit.js.map +1 -1
- package/dist/types/schedules.d.ts +1 -1
- package/dist/types/schedules.d.ts.map +1 -1
- package/dist/types/schedules.js +1 -2
- package/dist/types/schedules.js.map +1 -1
- package/dist/types/stats.d.ts +3 -7
- package/dist/types/stats.d.ts.map +1 -1
- package/dist/types/stats.js +1 -16
- package/dist/types/stats.js.map +1 -1
- package/dist/types/unions.d.ts +2 -2
- package/dist/types/unions.d.ts.map +1 -1
- package/dist/types/unions.js +0 -1
- package/dist/types/unions.js.map +1 -1
- package/package.json +1 -1
- package/dist/ids/stats-operation-ids.d.ts +0 -3
- package/dist/ids/stats-operation-ids.d.ts.map +0 -1
- package/dist/ids/stats-operation-ids.js +0 -10
- package/dist/ids/stats-operation-ids.js.map +0 -1
|
@@ -56,6 +56,9 @@ export declare const gameRosterBound: (teamIds: readonly string[]) => number;
|
|
|
56
56
|
export declare const scheduledGameLabel: (weekTitle: string, dayKey: string) => string;
|
|
57
57
|
export declare const gameSideFullMessage: (gameLabel: string) => string;
|
|
58
58
|
export declare const gameSideDepartedFullMessage: (gameLabel: string) => string;
|
|
59
|
+
export declare const GAME_HAS_RECORDED_STATS_DELETE_MESSAGE = "This game has recorded stats, so it cannot be deleted.";
|
|
60
|
+
export declare const WEEK_HAS_RECORDED_STATS_DELETE_LEAD = "This week has games with recorded stats, which cannot be deleted:";
|
|
61
|
+
export declare const weekHasRecordedStatsDeleteMessage: (games: readonly string[]) => string;
|
|
59
62
|
export declare const MAX_TEAMS_PER_LEAGUE = 40;
|
|
60
63
|
export declare const MAX_GAMES_PER_LEAGUE = 250;
|
|
61
64
|
export declare const LE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AC;AAC3D,eAAO,MAAM,mCAAmC,sEACqB,CAAC;AACtE,eAAO,MAAM,iCAAiC,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,MACd,CAAC;AAEhE,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,yBAAyB,QAIrC,CAAC;AACF,eAAO,MAAM,yBAAyB,QAIrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,0BAA0B,QAItC,CAAC;AAEF,eAAO,MAAM,kBAAkB,KAAuB,CAAC;AAEvD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,eAAO,MAAM,0BAA0B,QAItC,CAAC;AAEF,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,2BAA2B,QAIvC,CAAC;AAEF,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAC/C,eAAO,MAAM,6BAA6B,QAIzC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCiD,CAAC;AAC9E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -54,6 +54,9 @@ export const gameRosterBound = (teamIds) => MAX_ROSTER_ENTRIES_PER_TEAM * teamId
|
|
|
54
54
|
export const scheduledGameLabel = (weekTitle, dayKey) => `The ${weekTitle} game on ${dayKey}`;
|
|
55
55
|
export const gameSideFullMessage = (gameLabel) => countCapReachedMessage(gameLabel, MAX_ROSTER_ENTRIES_PER_TEAM, "people on this team's side");
|
|
56
56
|
export const gameSideDepartedFullMessage = (gameLabel) => `${gameLabel} already keeps the ${MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM} players a side may hold after they leave the team with stats in it. Finalize that game, or take this player's stats off it, first.`;
|
|
57
|
+
export const GAME_HAS_RECORDED_STATS_DELETE_MESSAGE = 'This game has recorded stats, so it cannot be deleted.';
|
|
58
|
+
export const WEEK_HAS_RECORDED_STATS_DELETE_LEAD = 'This week has games with recorded stats, which cannot be deleted:';
|
|
59
|
+
export const weekHasRecordedStatsDeleteMessage = (games) => `${WEEK_HAS_RECORDED_STATS_DELETE_LEAD} ${games.join('; ')}.`;
|
|
57
60
|
export const MAX_TEAMS_PER_LEAGUE = 40;
|
|
58
61
|
export const MAX_GAMES_PER_LEAGUE = 250;
|
|
59
62
|
export const LEAGUE_TEAMS_FULL_MESSAGE = countCapReachedMessage('This league', MAX_TEAMS_PER_LEAGUE, 'teams');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.js","sourceRoot":"","sources":["../../src/constants/business.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEpC,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAC3C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,oCAAoC,GAAG,EAAE,CAAC;AACvD,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAG,CAAC;AACxD,MAAM,CAAC,MAAM,kCAAkC,GAAG,GAAG,CAAC;AAEtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAC3C,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAChD,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAA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AAK,EAAE,2BAA2B;KACnC;IACD,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC/E;QACE,GAAG,EAAE,aAAa;QAClB,KAAK,EAAE,2CAA2C;QAClD,KAAK,EAAE,oBAAoB;KAC5B;IACD,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,mCAAmC,EAAE,KAAK,EAAE,uBAAuB,EAAE;IAChG,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,wBAAwB,EAAE;IAC1F;QACE,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,8DAA8D;QACrE,KAAK,EAAE,kBAAkB;KAC1B;IACD;QACE,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,qEAAqE;QAC5E,KAAK,EAAE,kBAAkB;KAC1B;IACD;QACE,GAAG,EAAE,wBAAwB;QAC7B,KAAK,EAAE,+DAA+D;QACtE,KAAK,EAAE,4BAA4B;KACpC;CAC0E,CAAC","sourcesContent":["export const MIN_DISPLAY_NAME_LENGTH = 3;\nexport const MAX_DISPLAY_NAME_LENGTH = 50;\n// The shortest password an account takes: Firebase Auth's own floor.\nexport const PASSWORD_MIN_LENGTH = 6;\n\n// The RFC 5321 ceiling on an email address.\nexport const EMAIL_MAX_LENGTH = 320;\n\nexport const MAX_SEARCH_QUERY_LENGTH = 100;\nexport const MIN_TEAM_NAME_LENGTH = 3;\nexport const MAX_TEAM_NAME_LENGTH = 50;\n\nexport const MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH = 10;\nexport const MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH = 500;\nexport const MAX_TEAM_INVITATION_MESSAGE_LENGTH = 500;\n\nexport const MIN_LEAGUE_TITLE_LENGTH = 3;\nexport const MAX_LEAGUE_TITLE_LENGTH = 100;\nexport const MIN_LEAGUE_DESCRIPTION_LENGTH = 10;\nexport const MAX_LEAGUE_DESCRIPTION_LENGTH = 5000;\nexport const HARDWARE_CATALOG = [\n { id: 'ipad', name: 'iPad' },\n { id: 'ipad-charger', name: 'iPad Charger' },\n] as const;\nexport type HardwareCatalogItemId = (typeof HARDWARE_CATALOG)[number]['id'];\nexport const HARDWARE_CATALOG_ITEM_IDS = HARDWARE_CATALOG.map((item) => item.id) as [\n HardwareCatalogItemId,\n ...HardwareCatalogItemId[],\n];\n\nexport const MIN_AWARD_NAME_LENGTH = 3;\nexport const MAX_AWARD_NAME_LENGTH = 60;\n\nexport const MAX_AWARD_GRANT_TARGETS = 20;\nexport const AWARD_GROUP_GRANT_PAGE_SIZE = 100;\n\nexport const MIN_REPAIR_REASON_LENGTH = 3;\nexport const MAX_REPAIR_REASON_LENGTH = 500;\n\nexport const MAX_ADMIN_LIST_CHANGES = 20;\n\nexport const TEAM_CREATION_CUTOFF_DAYS = 14;\n\nexport const MAX_CONTACT_PHONE_LENGTH = 30;\n\nexport const MAX_ROSTER_SYNC_FAILURE_MESSAGE_LENGTH = 500;\n\nexport const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;\nexport const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;\nexport const MAX_APP_VERSION_LENGTH = 64;\n\nexport const MAX_LANDING_HERO_TITLE_LENGTH = 200;\nexport const MAX_LANDING_ABOUT_TEXT_LENGTH = 5000;\n\nexport const MAX_WAIVER_TEMPLATE_TITLE_LENGTH = 120;\nexport const MAX_WAIVER_TEMPLATE_TEXT_LENGTH = 20000;\n\nexport const MAX_GAME_LOCATION_NAME_LENGTH = 100;\nexport const MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH = 200;\nexport const MAX_GAME_LOCATION_SUB_LOCATIONS = 50;\nexport const MAX_GAME_LOCATION_SUB_LOCATION_LENGTH = 60;\nexport const MAX_GAME_LOCATION_MEMO_LENGTH = 500;\n\nexport const MAX_SCHEDULE_WEEK_TITLE_LENGTH = 100;\n\nexport const LEAGUE_TIME_ZONE = 'America/New_York';\n\nexport const MAX_GAME_MEMO_LENGTH = 30;\n\nexport const countCapReachedMessage = (subject: string, limit: number, noun: string): string =>\n `${subject} already has the maximum of ${limit} ${noun}.`;\n\nexport const MAX_ACTIVE_TEAM_MEMBERS = 30;\nexport const TEAM_FULL_MESSAGE = countCapReachedMessage(\n 'This team',\n MAX_ACTIVE_TEAM_MEMBERS,\n 'players',\n);\nexport const MAX_ROSTER_SEED_MEMBERSHIPS_PER_TEAM = MAX_ACTIVE_TEAM_MEMBERS;\nexport const MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM = 10;\nexport const MAX_ROSTER_ENTRIES_PER_TEAM =\n MAX_ACTIVE_TEAM_MEMBERS + MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM;\nexport const gameRosterBound = (teamIds: readonly string[]): number =>\n MAX_ROSTER_ENTRIES_PER_TEAM * teamIds.length;\nexport const scheduledGameLabel = (weekTitle: string, dayKey: string): string =>\n `The ${weekTitle} game on ${dayKey}`;\nexport const gameSideFullMessage = (gameLabel: string): string =>\n countCapReachedMessage(gameLabel, MAX_ROSTER_ENTRIES_PER_TEAM, \"people on this team's side\");\nexport const gameSideDepartedFullMessage = (gameLabel: string): string =>\n `${gameLabel} already keeps the ${MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM} players a side may hold after they leave the team with stats in it. Finalize that game, or take this player's stats off it, first.`;\n\nexport const MAX_TEAMS_PER_LEAGUE = 40;\nexport const MAX_GAMES_PER_LEAGUE = 250;\nexport const LEAGUE_TEAMS_FULL_MESSAGE = countCapReachedMessage(\n 'This league',\n MAX_TEAMS_PER_LEAGUE,\n 'teams',\n);\nexport const LEAGUE_GAMES_FULL_MESSAGE = countCapReachedMessage(\n 'This league',\n MAX_GAMES_PER_LEAGUE,\n 'games',\n);\n\nexport const MAX_SCHEDULE_WEEK_GAMES = 20;\nexport const SCHEDULE_WEEK_FULL_MESSAGE = countCapReachedMessage(\n 'This week',\n MAX_SCHEDULE_WEEK_GAMES,\n 'games',\n);\n\nexport const MAX_PLAYOFF_CUTOFF = MAX_TEAMS_PER_LEAGUE;\n\nexport const MAX_STAT_EVENTS_PER_GAME = 1000;\nexport const GAME_STAT_LOG_FULL_MESSAGE = countCapReachedMessage(\n 'This game',\n MAX_STAT_EVENTS_PER_GAME,\n 'recorded stats',\n);\n\nexport const MAX_GAME_LOCATIONS = 30;\nexport const GAME_LOCATIONS_FULL_MESSAGE = countCapReachedMessage(\n 'Q-Sports',\n MAX_GAME_LOCATIONS,\n 'locations',\n);\n\nexport const MAX_OFFERED_WAIVER_TEMPLATES = 30;\nexport const WAIVER_TEMPLATES_FULL_MESSAGE = countCapReachedMessage(\n 'Q-Sports',\n MAX_OFFERED_WAIVER_TEMPLATES,\n 'waiver templates offered to leagues',\n);\n\nexport const CAPACITY_LIMITS = [\n {\n key: 'teamPlayers',\n label: 'Players on a team, ghost players included',\n limit: MAX_ACTIVE_TEAM_MEMBERS,\n },\n {\n key: 'gameSidePeople',\n label: `People on one side of one game: ${MAX_ACTIVE_TEAM_MEMBERS} players plus ${MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM} who left the team after recording stats in it`,\n limit: MAX_ROSTER_ENTRIES_PER_TEAM,\n },\n { key: 'leagueTeams', label: 'Teams in a league', limit: MAX_TEAMS_PER_LEAGUE },\n {\n key: 'leagueGames',\n label: \"Games in a league, so also a team's games\",\n limit: MAX_GAMES_PER_LEAGUE,\n },\n { key: 'weekGames', label: 'Games in one week of the schedule', limit: MAX_SCHEDULE_WEEK_GAMES },\n { key: 'gameStats', label: 'Stats recorded in one game', limit: MAX_STAT_EVENTS_PER_GAME },\n {\n key: 'playoffCutoff',\n label: \"Teams reaching the playoffs, at most the league's team limit\",\n limit: MAX_PLAYOFF_CUTOFF,\n },\n {\n key: 'gameLocations',\n label: \"Game locations, each venue's courts or sheets counted as part of it\",\n limit: MAX_GAME_LOCATIONS,\n },\n {\n key: 'offeredWaiverTemplates',\n label: 'Waiver templates offered to leagues, retired ones not counted',\n limit: MAX_OFFERED_WAIVER_TEMPLATES,\n },\n] as const satisfies readonly { key: string; label: string; limit: number }[];\nexport type CapacityLimitKey = (typeof CAPACITY_LIMITS)[number]['key'];\n"]}
|
|
1
|
+
{"version":3,"file":"business.js","sourceRoot":"","sources":["../../src/constants/business.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEpC,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAC3C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,oCAAoC,GAAG,EAAE,CAAC;AACvD,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAG,CAAC;AACxD,MAAM,CAAC,MAAM,kCAAkC,GAAG,GAAG,CAAC;AAEtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAC3C,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAChD,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC;AAClD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE;CACpC,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAG9E,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EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC/E;QACE,GAAG,EAAE,aAAa;QAClB,KAAK,EAAE,2CAA2C;QAClD,KAAK,EAAE,oBAAoB;KAC5B;IACD,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,mCAAmC,EAAE,KAAK,EAAE,uBAAuB,EAAE;IAChG,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,wBAAwB,EAAE;IAC1F;QACE,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,8DAA8D;QACrE,KAAK,EAAE,kBAAkB;KAC1B;IACD;QACE,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,qEAAqE;QAC5E,KAAK,EAAE,kBAAkB;KAC1B;IACD;QACE,GAAG,EAAE,wBAAwB;QAC7B,KAAK,EAAE,+DAA+D;QACtE,KAAK,EAAE,4BAA4B;KACpC;CAC0E,CAAC","sourcesContent":["export const MIN_DISPLAY_NAME_LENGTH = 3;\nexport const MAX_DISPLAY_NAME_LENGTH = 50;\n// The shortest password an account takes: Firebase Auth's own floor.\nexport const PASSWORD_MIN_LENGTH = 6;\n\n// The RFC 5321 ceiling on an email address.\nexport const EMAIL_MAX_LENGTH = 320;\n\nexport const MAX_SEARCH_QUERY_LENGTH = 100;\nexport const MIN_TEAM_NAME_LENGTH = 3;\nexport const MAX_TEAM_NAME_LENGTH = 50;\n\nexport const MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH = 10;\nexport const MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH = 500;\nexport const MAX_TEAM_INVITATION_MESSAGE_LENGTH = 500;\n\nexport const MIN_LEAGUE_TITLE_LENGTH = 3;\nexport const MAX_LEAGUE_TITLE_LENGTH = 100;\nexport const MIN_LEAGUE_DESCRIPTION_LENGTH = 10;\nexport const MAX_LEAGUE_DESCRIPTION_LENGTH = 5000;\nexport const HARDWARE_CATALOG = [\n { id: 'ipad', name: 'iPad' },\n { id: 'ipad-charger', name: 'iPad Charger' },\n] as const;\nexport type HardwareCatalogItemId = (typeof HARDWARE_CATALOG)[number]['id'];\nexport const HARDWARE_CATALOG_ITEM_IDS = HARDWARE_CATALOG.map((item) => item.id) as [\n HardwareCatalogItemId,\n ...HardwareCatalogItemId[],\n];\n\nexport const MIN_AWARD_NAME_LENGTH = 3;\nexport const MAX_AWARD_NAME_LENGTH = 60;\n\nexport const MAX_AWARD_GRANT_TARGETS = 20;\nexport const AWARD_GROUP_GRANT_PAGE_SIZE = 100;\n\nexport const MIN_REPAIR_REASON_LENGTH = 3;\nexport const MAX_REPAIR_REASON_LENGTH = 500;\n\nexport const MAX_ADMIN_LIST_CHANGES = 20;\n\nexport const TEAM_CREATION_CUTOFF_DAYS = 14;\n\nexport const MAX_CONTACT_PHONE_LENGTH = 30;\n\nexport const MAX_ROSTER_SYNC_FAILURE_MESSAGE_LENGTH = 500;\n\nexport const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;\nexport const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;\nexport const MAX_APP_VERSION_LENGTH = 64;\n\nexport const MAX_LANDING_HERO_TITLE_LENGTH = 200;\nexport const MAX_LANDING_ABOUT_TEXT_LENGTH = 5000;\n\nexport const MAX_WAIVER_TEMPLATE_TITLE_LENGTH = 120;\nexport const MAX_WAIVER_TEMPLATE_TEXT_LENGTH = 20000;\n\nexport const MAX_GAME_LOCATION_NAME_LENGTH = 100;\nexport const MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH = 200;\nexport const MAX_GAME_LOCATION_SUB_LOCATIONS = 50;\nexport const MAX_GAME_LOCATION_SUB_LOCATION_LENGTH = 60;\nexport const MAX_GAME_LOCATION_MEMO_LENGTH = 500;\n\nexport const MAX_SCHEDULE_WEEK_TITLE_LENGTH = 100;\n\nexport const LEAGUE_TIME_ZONE = 'America/New_York';\n\nexport const MAX_GAME_MEMO_LENGTH = 30;\n\nexport const countCapReachedMessage = (subject: string, limit: number, noun: string): string =>\n `${subject} already has the maximum of ${limit} ${noun}.`;\n\nexport const MAX_ACTIVE_TEAM_MEMBERS = 30;\nexport const TEAM_FULL_MESSAGE = countCapReachedMessage(\n 'This team',\n MAX_ACTIVE_TEAM_MEMBERS,\n 'players',\n);\nexport const MAX_ROSTER_SEED_MEMBERSHIPS_PER_TEAM = MAX_ACTIVE_TEAM_MEMBERS;\nexport const MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM = 10;\nexport const MAX_ROSTER_ENTRIES_PER_TEAM =\n MAX_ACTIVE_TEAM_MEMBERS + MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM;\nexport const gameRosterBound = (teamIds: readonly string[]): number =>\n MAX_ROSTER_ENTRIES_PER_TEAM * teamIds.length;\nexport const scheduledGameLabel = (weekTitle: string, dayKey: string): string =>\n `The ${weekTitle} game on ${dayKey}`;\nexport const gameSideFullMessage = (gameLabel: string): string =>\n countCapReachedMessage(gameLabel, MAX_ROSTER_ENTRIES_PER_TEAM, \"people on this team's side\");\nexport const gameSideDepartedFullMessage = (gameLabel: string): string =>\n `${gameLabel} already keeps the ${MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM} players a side may hold after they leave the team with stats in it. Finalize that game, or take this player's stats off it, first.`;\nexport const GAME_HAS_RECORDED_STATS_DELETE_MESSAGE =\n 'This game has recorded stats, so it cannot be deleted.';\nexport const WEEK_HAS_RECORDED_STATS_DELETE_LEAD =\n 'This week has games with recorded stats, which cannot be deleted:';\nexport const weekHasRecordedStatsDeleteMessage = (games: readonly string[]): string =>\n `${WEEK_HAS_RECORDED_STATS_DELETE_LEAD} ${games.join('; ')}.`;\n\nexport const MAX_TEAMS_PER_LEAGUE = 40;\nexport const MAX_GAMES_PER_LEAGUE = 250;\nexport const LEAGUE_TEAMS_FULL_MESSAGE = countCapReachedMessage(\n 'This league',\n MAX_TEAMS_PER_LEAGUE,\n 'teams',\n);\nexport const LEAGUE_GAMES_FULL_MESSAGE = countCapReachedMessage(\n 'This league',\n MAX_GAMES_PER_LEAGUE,\n 'games',\n);\n\nexport const MAX_SCHEDULE_WEEK_GAMES = 20;\nexport const SCHEDULE_WEEK_FULL_MESSAGE = countCapReachedMessage(\n 'This week',\n MAX_SCHEDULE_WEEK_GAMES,\n 'games',\n);\n\nexport const MAX_PLAYOFF_CUTOFF = MAX_TEAMS_PER_LEAGUE;\n\nexport const MAX_STAT_EVENTS_PER_GAME = 1000;\nexport const GAME_STAT_LOG_FULL_MESSAGE = countCapReachedMessage(\n 'This game',\n MAX_STAT_EVENTS_PER_GAME,\n 'recorded stats',\n);\n\nexport const MAX_GAME_LOCATIONS = 30;\nexport const GAME_LOCATIONS_FULL_MESSAGE = countCapReachedMessage(\n 'Q-Sports',\n MAX_GAME_LOCATIONS,\n 'locations',\n);\n\nexport const MAX_OFFERED_WAIVER_TEMPLATES = 30;\nexport const WAIVER_TEMPLATES_FULL_MESSAGE = countCapReachedMessage(\n 'Q-Sports',\n MAX_OFFERED_WAIVER_TEMPLATES,\n 'waiver templates offered to leagues',\n);\n\nexport const CAPACITY_LIMITS = [\n {\n key: 'teamPlayers',\n label: 'Players on a team, ghost players included',\n limit: MAX_ACTIVE_TEAM_MEMBERS,\n },\n {\n key: 'gameSidePeople',\n label: `People on one side of one game: ${MAX_ACTIVE_TEAM_MEMBERS} players plus ${MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM} who left the team after recording stats in it`,\n limit: MAX_ROSTER_ENTRIES_PER_TEAM,\n },\n { key: 'leagueTeams', label: 'Teams in a league', limit: MAX_TEAMS_PER_LEAGUE },\n {\n key: 'leagueGames',\n label: \"Games in a league, so also a team's games\",\n limit: MAX_GAMES_PER_LEAGUE,\n },\n { key: 'weekGames', label: 'Games in one week of the schedule', limit: MAX_SCHEDULE_WEEK_GAMES },\n { key: 'gameStats', label: 'Stats recorded in one game', limit: MAX_STAT_EVENTS_PER_GAME },\n {\n key: 'playoffCutoff',\n label: \"Teams reaching the playoffs, at most the league's team limit\",\n limit: MAX_PLAYOFF_CUTOFF,\n },\n {\n key: 'gameLocations',\n label: \"Game locations, each venue's courts or sheets counted as part of it\",\n limit: MAX_GAME_LOCATIONS,\n },\n {\n key: 'offeredWaiverTemplates',\n label: 'Waiver templates offered to leagues, retired ones not counted',\n limit: MAX_OFFERED_WAIVER_TEMPLATES,\n },\n] as const satisfies readonly { key: string; label: string; limit: number }[];\nexport type CapacityLimitKey = (typeof CAPACITY_LIMITS)[number]['key'];\n"]}
|
|
@@ -55,12 +55,6 @@ export declare const GAME_REPAIR_REFUSAL_COPY: {
|
|
|
55
55
|
readonly fieldNotCorrectable: "That number cannot be corrected for this sport. Restore the game from its recorded stats, or reopen it and score it again.";
|
|
56
56
|
readonly lineNotRostered: "That player is not on this game's roster.";
|
|
57
57
|
readonly teamNotInGame: "That team is not playing in this game.";
|
|
58
|
-
readonly gameTooLarge: "This repair is too large to save at once.";
|
|
59
|
-
};
|
|
60
|
-
export declare const STATS_INTEGRITY_REFUSAL_COPY: {
|
|
61
|
-
readonly statsOutOfBand: "This game's stored numbers no longer match the stats recorded for it. An admin must reconcile the game in Fix stats first.";
|
|
62
|
-
readonly finalRecordMissing: "This finalized game's record of its stats is missing. An admin must repair the game in Fix stats first.";
|
|
63
|
-
readonly aggregateBelowZero: "A league, career, or hall-of-fame total holds less than this game added to it. An admin must rebuild the totals in Fix stats first.";
|
|
64
58
|
};
|
|
65
59
|
export declare const FINALIZATION_NOT_READY_COPY: {
|
|
66
60
|
readonly roundsIncomplete: "Every round must be recorded before the game can be finalized.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sports.d.ts","sourceRoot":"","sources":["../../src/constants/sports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sports.d.ts","sourceRoot":"","sources":["../../src/constants/sports.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,+BAA+B;;;;;;;;CAQgB,CAAC;AAI7D,eAAO,MAAM,gCAAgC;;;;CAIe,CAAC;AAE7D,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,eAAO,MAAM,cAAc,SAAU,CAAC;AAItC,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,eAAO,MAAM,iCAAiC,MAAM,CAAC;AAErD,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAEtD,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,eAAO,MAAM,sBAAsB,QAA+D,CAAC;AAEnG,eAAO,MAAM,6BAA6B;;;;;CAKgB,CAAC;AAE3D,eAAO,MAAM,wBAAwB,2CAA2C,CAAC;AAEjF,eAAO,MAAM,0BAA0B,8CAA8C,CAAC;AAEtF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;CAmBqB,CAAC;AAE1D,eAAO,MAAM,4BAA4B,cAAc,CAAC;AACxD,eAAO,MAAM,iCAAiC,mHACoE,CAAC;AAEnH,eAAO,MAAM,wBAAwB;;;;;;;;CAaiB,CAAC;AAEvD,eAAO,MAAM,2BAA2B;;CAEuB,CAAC;AAEhE,eAAO,MAAM,kCAAkC,wBAAyB,CAAC;AACzE,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/constants/sports.js
CHANGED
|
@@ -61,12 +61,6 @@ export const GAME_REPAIR_REFUSAL_COPY = {
|
|
|
61
61
|
fieldNotCorrectable: 'That number cannot be corrected for this sport. Restore the game from its recorded stats, or reopen it and score it again.',
|
|
62
62
|
lineNotRostered: "That player is not on this game's roster.",
|
|
63
63
|
teamNotInGame: 'That team is not playing in this game.',
|
|
64
|
-
gameTooLarge: 'This repair is too large to save at once.',
|
|
65
|
-
};
|
|
66
|
-
export const STATS_INTEGRITY_REFUSAL_COPY = {
|
|
67
|
-
statsOutOfBand: "This game's stored numbers no longer match the stats recorded for it. An admin must reconcile the game in Fix stats first.",
|
|
68
|
-
finalRecordMissing: "This finalized game's record of its stats is missing. An admin must repair the game in Fix stats first.",
|
|
69
|
-
aggregateBelowZero: 'A league, career, or hall-of-fame total holds less than this game added to it. An admin must rebuild the totals in Fix stats first.',
|
|
70
64
|
};
|
|
71
65
|
export const FINALIZATION_NOT_READY_COPY = {
|
|
72
66
|
roundsIncomplete: 'Every round must be recorded before the game can be finalized.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sports.js","sourceRoot":"","sources":["../../src/constants/sports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EACjC,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"sports.js","sourceRoot":"","sources":["../../src/constants/sports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EACjC,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAYzD,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,CAAC,+BAA+B,CAAC,EAAE,CAAC;IACpC,CAAC,+BAA+B,CAAC,EAAE,CAAC;IACpC,CAAC,iCAAiC,CAAC,EAAE,CAAC;IACtC,CAAC,6BAA6B,CAAC,EAAE,CAAC;IAClC,CAAC,4BAA4B,CAAC,EAAE,CAAC;IACjC,CAAC,6BAA6B,CAAC,EAAE,CAAC;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FAAqF;IACvF,gBAAgB,EAAE,mDAAmD;IACrE,YAAY,EAAE,2CAA2C;IACzD,cAAc,EAAE,kCAAkC;IAClD,gBAAgB,EACd,mFAAmF;IACrF,SAAS,EAAE,sFAAsF;IACjG,eAAe,EACb,mFAAmF;IACrF,uBAAuB,EAAE,0CAA0C;IACnE,qBAAqB,EAAE,mEAAmE;IAC1F,aAAa,EACX,4FAA4F;CACvC,CAAC;AAE1D,MAAM,CAAC,MAAM,4BAA4B,GAAG,WAAW,CAAC;AACxD,MAAM,CAAC,MAAM,iCAAiC,GAC5C,gHAAgH,CAAC;AAEnH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,eAAe,EACb,8GAA8G;IAChH,gBAAgB,EACd,gIAAgI;IAClI,eAAe,EACb,mJAAmJ;IACrJ,cAAc,EACZ,kHAAkH;IACpH,mBAAmB,EACjB,4HAA4H;IAC9H,eAAe,EAAE,2CAA2C;IAC5D,aAAa,EAAE,wCAAwC;CACH,CAAC;AAEvD,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,gBAAgB,EAAE,gEAAgE;CACrB,CAAC;AAEhE,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAU,CAAC","sourcesContent":["import {\n BASKETBALL_ASSIST_EVENT_TYPE,\n BASKETBALL_BULK_EDIT_EVENT_TYPE,\n BASKETBALL_ONE_POINT_EVENT_TYPE,\n BASKETBALL_REBOUND_EVENT_TYPE,\n BASKETBALL_THREE_POINT_EVENT_TYPE,\n BASKETBALL_TIMEOUT_EVENT_TYPE,\n BASKETBALL_TWO_POINT_EVENT_TYPE,\n FOOTBALL_BULK_EDIT_EVENT_TYPE,\n FOOTBALL_ONE_POINT_EVENT_TYPE,\n FOOTBALL_SIX_POINT_EVENT_TYPE,\n FOOTBALL_TWO_POINT_EVENT_TYPE,\n} from '../types/sports.js';\nimport { MAX_STAT_EVENTS_PER_GAME } from './business.js';\nimport type {\n BasketballPlayerStatKey,\n BasketballStatEventType,\n FootballStatEventType,\n} from '../types/sports.js';\nimport type {\n FinalizationNotReadyReason,\n GameRepairRefusal,\n StatEventRefusalCode,\n} from '../types/stats.js';\n\nexport const BASKETBALL_POINTS_BY_EVENT_TYPE = {\n [BASKETBALL_ONE_POINT_EVENT_TYPE]: 1,\n [BASKETBALL_TWO_POINT_EVENT_TYPE]: 2,\n [BASKETBALL_THREE_POINT_EVENT_TYPE]: 3,\n [BASKETBALL_REBOUND_EVENT_TYPE]: 0,\n [BASKETBALL_ASSIST_EVENT_TYPE]: 0,\n [BASKETBALL_TIMEOUT_EVENT_TYPE]: 0,\n [BASKETBALL_BULK_EDIT_EVENT_TYPE]: 0,\n} as const satisfies Record<BasketballStatEventType, number>;\n\n// Every weight is a multiple of one half, so FP summed across games equals FP of the summed\n// counters exactly.\nexport const BASKETBALL_FANTASY_POINT_WEIGHTS = {\n points: 1,\n rebounds: 1.5,\n assists: 2,\n} as const satisfies Record<BasketballPlayerStatKey, number>;\n\nexport const CURLING_ROUND_COUNT = 14;\n\nexport const MAX_CURLING_ROUND_POINTS = 4;\n\nexport const MAX_STAT_COUNT = 999_999;\n\n// The most events one scoring write may carry: each event is a document created in the write's one\n// transaction, and a Firestore transaction commits at most 500 writes.\nexport const MAX_STAT_EVENTS_PER_WRITE = 200;\n\nexport const MAX_GAME_STATS_CORRECTION_TARGETS = 200;\n\nexport const MAX_STATS_REPAIR_LISTED_CHANGES = 500;\n\nexport const MAX_STATS_VALIDATION_DISCREPANCIES = 500;\n\nexport const STAT_HISTORY_PAGE_SIZE = 1000;\n\nexport const MAX_STAT_HISTORY_PAGES = Math.ceil(MAX_STAT_EVENTS_PER_GAME / STAT_HISTORY_PAGE_SIZE);\n\nexport const FOOTBALL_POINTS_BY_EVENT_TYPE = {\n [FOOTBALL_SIX_POINT_EVENT_TYPE]: 6,\n [FOOTBALL_TWO_POINT_EVENT_TYPE]: 2,\n [FOOTBALL_ONE_POINT_EVENT_TYPE]: 1,\n [FOOTBALL_BULK_EDIT_EVENT_TYPE]: 0,\n} as const satisfies Record<FootballStatEventType, number>;\n\nexport const TEAM_NOT_IN_GAME_MESSAGE = 'That team is not playing in this game.';\n\nexport const NOT_ON_GAME_ROSTER_MESSAGE = \"That player is not on this game's roster.\";\n\nexport const STAT_EVENT_REFUSAL_COPY = {\n eventTypeNotInSport: \"That stat does not belong to this game's sport.\",\n teamNotInGame: TEAM_NOT_IN_GAME_MESSAGE,\n playerNotRostered: \"That player is not on this game's roster for that team.\",\n assisterNotRostered: \"The assisting player is not on this game's roster for that team.\",\n assistNotAllowed:\n 'Only a 2- or 3-point basket can be assisted, and never by the player who scored it.',\n playerNotAllowed: \"That stat is the team's; it cannot name a player.\",\n roundNotNext: 'That round is not the next one to record.',\n roundsComplete: 'Every round is already recorded.',\n bulkValueInvalid:\n 'That entry is not a real result: stats are whole numbers and never go below zero.',\n bulkStale: 'The numbers changed while you were editing. Check the flagged values and save again.',\n eventIdConflict:\n 'A different stat was already saved under this one. Discard it and enter it again.',\n voidTargetNotSportEvent: 'There is no recorded stat there to undo.',\n correctionNotAccepted: 'Corrections are made from Fix stats, not from the scoring screen.',\n undoBelowZero:\n 'Undoing that play would leave a stat below zero, because a later entry already lowered it.',\n} as const satisfies Record<StatEventRefusalCode, string>;\n\nexport const STATS_MIGRATION_OPERATION_ID = 'migration';\nexport const STATS_MIGRATION_CORRECTION_REASON =\n 'The recorded result differs from what its recorded plays add up to; this correction keeps the recorded result.';\n\nexport const GAME_REPAIR_REFUSAL_COPY = {\n eventUnreadable:\n \"One of this game's recorded stats can no longer be read. Fix the event in the console, then repair the game.\",\n eventSequenceGap:\n \"This game's recorded stats are numbered with a gap or a repeat. Fix the event documents in the console, then restore the game.\",\n sourcesDisagree:\n \"This game's record, its stored numbers, and its recorded stats all disagree, so nothing says what was applied. Fix the game in the console first.\",\n scoreAmbiguous:\n \"The team's score was edited in two places to different values. Enter the score you want as a correction instead.\",\n fieldNotCorrectable:\n 'That number cannot be corrected for this sport. Restore the game from its recorded stats, or reopen it and score it again.',\n lineNotRostered: \"That player is not on this game's roster.\",\n teamNotInGame: 'That team is not playing in this game.',\n} as const satisfies Record<GameRepairRefusal, string>;\n\nexport const FINALIZATION_NOT_READY_COPY = {\n roundsIncomplete: 'Every round must be recorded before the game can be finalized.',\n} as const satisfies Record<FinalizationNotReadyReason, string>;\n\nexport const HALL_OF_FAME_MINIMUM_GAMES_CHOICES = [25, 50, 100] as const;\nexport type HallOfFameMinimumGames = (typeof HALL_OF_FAME_MINIMUM_GAMES_CHOICES)[number];\n"]}
|
|
@@ -234,7 +234,6 @@ export declare const statsDiscrepancyKindSchema: z.ZodEnum<{
|
|
|
234
234
|
finalRecordMissing: "finalRecordMissing";
|
|
235
235
|
finalRecordMismatch: "finalRecordMismatch";
|
|
236
236
|
participationSnapshotMismatch: "participationSnapshotMismatch";
|
|
237
|
-
gameHeld: "gameHeld";
|
|
238
237
|
aggregateMismatch: "aggregateMismatch";
|
|
239
238
|
aggregateEntryStale: "aggregateEntryStale";
|
|
240
239
|
aggregateEntryMissing: "aggregateEntryMissing";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atoms.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/atoms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiCxB,eAAO,MAAM,aAAa,aAAiC,CAAC;AAE5D,eAAO,MAAM,WAAW,aAAiC,CAAC;AAE1D,eAAO,MAAM,sBAAsB,aAAkC,CAAC;AAEtE,eAAO,MAAM,cAAc,aAA8B,CAAC;AAE1D,eAAO,MAAM,qBAAqB,aAAiC,CAAC;AAEpE,eAAO,MAAM,kBAAkB,wDAAuC,CAAC;AAEvE,eAAO,MAAM,qBAAqB,QAAwB,CAAC;AAE3D,eAAO,MAAM,kBAAkB,aAME,CAAC;AAElC,eAAO,MAAM,uBAAuB,aAGgB,CAAC;AAErD,eAAO,MAAM,YAAY,aAA0B,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AC;AACrD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAyB,CAAC;AACrD,eAAO,MAAM,cAAc;;;;EAAyB,CAAC;AACrD,eAAO,MAAM,gBAAgB;;;EAA2B,CAAC;AACzD,eAAO,MAAM,gBAAgB;;;EAA2B,CAAC;AACzD,eAAO,MAAM,0BAA0B;;EAAsC,CAAC;AAC9E,eAAO,MAAM,oBAAoB;;;;;;EAAgC,CAAC;AAClE,eAAO,MAAM,gBAAgB;;;;EAA2B,CAAC;AACzD,eAAO,MAAM,0BAA0B;;;;;EAAsC,CAAC;AAC9E,eAAO,MAAM,2BAA2B;;;;;EAAwC,CAAC;AACjF,eAAO,MAAM,gCAAgC;;;;EAA6C,CAAC;AAC3F,eAAO,MAAM,gCAAgC;;;;EAA6C,CAAC;AAC3F,eAAO,MAAM,4BAA4B;;;;;EAAwC,CAAC;AAClF,eAAO,MAAM,uBAAuB;;;;;;;EAAmC,CAAC;AACxE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;EAAsC,CAAC;AAC9E,eAAO,MAAM,2BAA2B;;;;EAAoC,CAAC;AAC7E,eAAO,MAAM,oBAAoB;;;;;;EAA4B,CAAC"}
|
|
@@ -61,7 +61,6 @@ export declare const auditEventTypeSchema: z.ZodEnum<{
|
|
|
61
61
|
"teamMembership.removed": "teamMembership.removed";
|
|
62
62
|
"ghostPlayer.removed": "ghostPlayer.removed";
|
|
63
63
|
"ghostPlayer.closedLeagueLinked": "ghostPlayer.closedLeagueLinked";
|
|
64
|
-
"ghostPlayer.removalStopped": "ghostPlayer.removalStopped";
|
|
65
64
|
"teamInvitation.created": "teamInvitation.created";
|
|
66
65
|
"teamInvitation.accepted": "teamInvitation.accepted";
|
|
67
66
|
"teamInvitation.rejected": "teamInvitation.rejected";
|
|
@@ -178,7 +177,6 @@ export declare const AuditEventSchema: z.ZodObject<{
|
|
|
178
177
|
"teamMembership.removed": "teamMembership.removed";
|
|
179
178
|
"ghostPlayer.removed": "ghostPlayer.removed";
|
|
180
179
|
"ghostPlayer.closedLeagueLinked": "ghostPlayer.closedLeagueLinked";
|
|
181
|
-
"ghostPlayer.removalStopped": "ghostPlayer.removalStopped";
|
|
182
180
|
"teamInvitation.created": "teamInvitation.created";
|
|
183
181
|
"teamInvitation.accepted": "teamInvitation.accepted";
|
|
184
182
|
"teamInvitation.rejected": "teamInvitation.rejected";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-event.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/audit-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"audit-event.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/audit-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;iCAgB3B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAc3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -410,7 +410,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
410
410
|
memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
411
411
|
absentRosterPlayerIds: z.ZodArray<z.ZodString>;
|
|
412
412
|
nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
413
|
-
statsOperationId: z.ZodOptional<z.ZodString>;
|
|
414
413
|
finalizedAt: z.ZodOptional<z.ZodNumber>;
|
|
415
414
|
reopenedAt: z.ZodOptional<z.ZodNumber>;
|
|
416
415
|
createdAt: z.ZodNumber;
|
|
@@ -450,7 +449,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
450
449
|
memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
451
450
|
absentRosterPlayerIds: z.ZodArray<z.ZodString>;
|
|
452
451
|
nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
453
|
-
statsOperationId: z.ZodOptional<z.ZodString>;
|
|
454
452
|
finalizedAt: z.ZodOptional<z.ZodNumber>;
|
|
455
453
|
reopenedAt: z.ZodOptional<z.ZodNumber>;
|
|
456
454
|
createdAt: z.ZodNumber;
|
|
@@ -489,7 +487,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
489
487
|
memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
490
488
|
absentRosterPlayerIds: z.ZodArray<z.ZodString>;
|
|
491
489
|
nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
492
|
-
statsOperationId: z.ZodOptional<z.ZodString>;
|
|
493
490
|
finalizedAt: z.ZodOptional<z.ZodNumber>;
|
|
494
491
|
reopenedAt: z.ZodOptional<z.ZodNumber>;
|
|
495
492
|
createdAt: z.ZodNumber;
|
|
@@ -1320,7 +1317,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
1320
1317
|
finalRecordMissing: "finalRecordMissing";
|
|
1321
1318
|
finalRecordMismatch: "finalRecordMismatch";
|
|
1322
1319
|
participationSnapshotMismatch: "participationSnapshotMismatch";
|
|
1323
|
-
gameHeld: "gameHeld";
|
|
1324
1320
|
aggregateMismatch: "aggregateMismatch";
|
|
1325
1321
|
aggregateEntryStale: "aggregateEntryStale";
|
|
1326
1322
|
aggregateEntryMissing: "aggregateEntryMissing";
|
|
@@ -1345,7 +1341,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
1345
1341
|
finalRecordMissing: "finalRecordMissing";
|
|
1346
1342
|
finalRecordMismatch: "finalRecordMismatch";
|
|
1347
1343
|
participationSnapshotMismatch: "participationSnapshotMismatch";
|
|
1348
|
-
gameHeld: "gameHeld";
|
|
1349
1344
|
aggregateMismatch: "aggregateMismatch";
|
|
1350
1345
|
aggregateEntryStale: "aggregateEntryStale";
|
|
1351
1346
|
aggregateEntryMissing: "aggregateEntryMissing";
|
|
@@ -1365,7 +1360,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
1365
1360
|
leagueId: z.ZodOptional<z.ZodString>;
|
|
1366
1361
|
}, z.core.$strict>;
|
|
1367
1362
|
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1368
|
-
stoppedOnGameIds: z.ZodArray<z.ZodString>;
|
|
1369
1363
|
startedByUserId: z.ZodString;
|
|
1370
1364
|
startedAt: z.ZodNumber;
|
|
1371
1365
|
updatedAt: z.ZodNumber;
|
|
@@ -1386,7 +1380,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
1386
1380
|
userId: z.ZodOptional<z.ZodString>;
|
|
1387
1381
|
}, z.core.$strict>;
|
|
1388
1382
|
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1389
|
-
stoppedOnGameIds: z.ZodArray<z.ZodString>;
|
|
1390
1383
|
startedByUserId: z.ZodString;
|
|
1391
1384
|
startedAt: z.ZodNumber;
|
|
1392
1385
|
updatedAt: z.ZodNumber;
|
|
@@ -1412,7 +1405,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
1412
1405
|
userId: z.ZodOptional<z.ZodString>;
|
|
1413
1406
|
}, z.core.$strict>;
|
|
1414
1407
|
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1415
|
-
stoppedOnGameIds: z.ZodArray<z.ZodString>;
|
|
1416
1408
|
startedByUserId: z.ZodString;
|
|
1417
1409
|
startedAt: z.ZodNumber;
|
|
1418
1410
|
updatedAt: z.ZodNumber;
|
|
@@ -1518,75 +1510,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
1518
1510
|
changed: z.ZodNumber;
|
|
1519
1511
|
skipped: z.ZodNumber;
|
|
1520
1512
|
}, z.core.$strict>;
|
|
1521
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1522
|
-
kind: z.ZodLiteral<"ghostPlayerStats">;
|
|
1523
|
-
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1524
|
-
action: z.ZodLiteral<"link">;
|
|
1525
|
-
teamId: z.ZodString;
|
|
1526
|
-
ghostUserId: z.ZodString;
|
|
1527
|
-
userId: z.ZodString;
|
|
1528
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1529
|
-
action: z.ZodLiteral<"removal">;
|
|
1530
|
-
teamId: z.ZodString;
|
|
1531
|
-
ghostUserId: z.ZodString;
|
|
1532
|
-
}, z.core.$strict>], "action">;
|
|
1533
|
-
reason: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1534
|
-
removedFinishedGameEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1535
|
-
gameId: z.ZodString;
|
|
1536
|
-
wasAbsent: z.ZodBoolean;
|
|
1537
|
-
wasNonScoring: z.ZodBoolean;
|
|
1538
|
-
}, z.core.$strict>>>;
|
|
1539
|
-
removedOpenGameIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1540
|
-
linkedGames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1541
|
-
gameId: z.ZodString;
|
|
1542
|
-
completed: z.ZodBoolean;
|
|
1543
|
-
merged: z.ZodBoolean;
|
|
1544
|
-
}, z.core.$strict>>>;
|
|
1545
|
-
destinationChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1546
|
-
ref: z.ZodString;
|
|
1547
|
-
field: z.ZodString;
|
|
1548
|
-
before: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1549
|
-
after: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1550
|
-
}, z.core.$strict>>>;
|
|
1551
|
-
membershipOutcome: z.ZodOptional<z.ZodEnum<{
|
|
1552
|
-
handedOver: "handedOver";
|
|
1553
|
-
created: "created";
|
|
1554
|
-
merged: "merged";
|
|
1555
|
-
kept: "kept";
|
|
1556
|
-
}>>;
|
|
1557
|
-
startedByUserId: z.ZodString;
|
|
1558
|
-
startedAt: z.ZodNumber;
|
|
1559
|
-
updatedAt: z.ZodNumber;
|
|
1560
|
-
status: z.ZodEnum<{
|
|
1561
|
-
running: "running";
|
|
1562
|
-
complete: "complete";
|
|
1563
|
-
stopped: "stopped";
|
|
1564
|
-
}>;
|
|
1565
|
-
resumeAfter: z.ZodOptional<z.ZodString>;
|
|
1566
|
-
counts: z.ZodObject<{
|
|
1567
|
-
read: z.ZodNumber;
|
|
1568
|
-
changed: z.ZodNumber;
|
|
1569
|
-
skipped: z.ZodNumber;
|
|
1570
|
-
}, z.core.$strict>;
|
|
1571
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1572
|
-
kind: z.ZodLiteral<"gameDeletion">;
|
|
1573
|
-
scope: z.ZodObject<{
|
|
1574
|
-
gameId: z.ZodString;
|
|
1575
|
-
}, z.core.$strict>;
|
|
1576
|
-
startedByUserId: z.ZodString;
|
|
1577
|
-
startedAt: z.ZodNumber;
|
|
1578
|
-
updatedAt: z.ZodNumber;
|
|
1579
|
-
status: z.ZodEnum<{
|
|
1580
|
-
running: "running";
|
|
1581
|
-
complete: "complete";
|
|
1582
|
-
stopped: "stopped";
|
|
1583
|
-
}>;
|
|
1584
|
-
resumeAfter: z.ZodOptional<z.ZodString>;
|
|
1585
|
-
counts: z.ZodObject<{
|
|
1586
|
-
read: z.ZodNumber;
|
|
1587
|
-
changed: z.ZodNumber;
|
|
1588
|
-
skipped: z.ZodNumber;
|
|
1589
|
-
}, z.core.$strict>;
|
|
1590
1513
|
}, z.core.$strict>], "kind">;
|
|
1591
1514
|
readonly 'galleryPictures/{pictureId}': z.ZodObject<{
|
|
1592
1515
|
ownerKind: z.ZodEnum<{
|
|
@@ -2614,7 +2537,6 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
2614
2537
|
"teamMembership.removed": "teamMembership.removed";
|
|
2615
2538
|
"ghostPlayer.removed": "ghostPlayer.removed";
|
|
2616
2539
|
"ghostPlayer.closedLeagueLinked": "ghostPlayer.closedLeagueLinked";
|
|
2617
|
-
"ghostPlayer.removalStopped": "ghostPlayer.removalStopped";
|
|
2618
2540
|
"teamInvitation.created": "teamInvitation.created";
|
|
2619
2541
|
"teamInvitation.accepted": "teamInvitation.accepted";
|
|
2620
2542
|
"teamInvitation.rejected": "teamInvitation.rejected";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkD7B,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkD7B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C;AAEvE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;CAciC,CAAC;AAEvE,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAO,CAAC"}
|
|
@@ -76,7 +76,6 @@ export declare const BasketballGameSchema: z.ZodObject<{
|
|
|
76
76
|
memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
77
77
|
absentRosterPlayerIds: z.ZodArray<z.ZodString>;
|
|
78
78
|
nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
79
|
-
statsOperationId: z.ZodOptional<z.ZodString>;
|
|
80
79
|
finalizedAt: z.ZodOptional<z.ZodNumber>;
|
|
81
80
|
reopenedAt: z.ZodOptional<z.ZodNumber>;
|
|
82
81
|
createdAt: z.ZodNumber;
|
|
@@ -118,7 +117,6 @@ export declare const CurlingGameSchema: z.ZodObject<{
|
|
|
118
117
|
memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
119
118
|
absentRosterPlayerIds: z.ZodArray<z.ZodString>;
|
|
120
119
|
nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
121
|
-
statsOperationId: z.ZodOptional<z.ZodString>;
|
|
122
120
|
finalizedAt: z.ZodOptional<z.ZodNumber>;
|
|
123
121
|
reopenedAt: z.ZodOptional<z.ZodNumber>;
|
|
124
122
|
createdAt: z.ZodNumber;
|
|
@@ -159,7 +157,6 @@ export declare const FootballGameSchema: z.ZodObject<{
|
|
|
159
157
|
memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
160
158
|
absentRosterPlayerIds: z.ZodArray<z.ZodString>;
|
|
161
159
|
nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
162
|
-
statsOperationId: z.ZodOptional<z.ZodString>;
|
|
163
160
|
finalizedAt: z.ZodOptional<z.ZodNumber>;
|
|
164
161
|
reopenedAt: z.ZodOptional<z.ZodNumber>;
|
|
165
162
|
createdAt: z.ZodNumber;
|
|
@@ -207,7 +204,6 @@ export declare const SportGameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
207
204
|
memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
208
205
|
absentRosterPlayerIds: z.ZodArray<z.ZodString>;
|
|
209
206
|
nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
210
|
-
statsOperationId: z.ZodOptional<z.ZodString>;
|
|
211
207
|
finalizedAt: z.ZodOptional<z.ZodNumber>;
|
|
212
208
|
reopenedAt: z.ZodOptional<z.ZodNumber>;
|
|
213
209
|
createdAt: z.ZodNumber;
|
|
@@ -247,7 +243,6 @@ export declare const SportGameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
247
243
|
memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
248
244
|
absentRosterPlayerIds: z.ZodArray<z.ZodString>;
|
|
249
245
|
nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
250
|
-
statsOperationId: z.ZodOptional<z.ZodString>;
|
|
251
246
|
finalizedAt: z.ZodOptional<z.ZodNumber>;
|
|
252
247
|
reopenedAt: z.ZodOptional<z.ZodNumber>;
|
|
253
248
|
createdAt: z.ZodNumber;
|
|
@@ -286,7 +281,6 @@ export declare const SportGameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
286
281
|
memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
287
282
|
absentRosterPlayerIds: z.ZodArray<z.ZodString>;
|
|
288
283
|
nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
289
|
-
statsOperationId: z.ZodOptional<z.ZodString>;
|
|
290
284
|
finalizedAt: z.ZodOptional<z.ZodNumber>;
|
|
291
285
|
reopenedAt: z.ZodOptional<z.ZodNumber>;
|
|
292
286
|
createdAt: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sport-game.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/sport-game.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"sport-game.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/sport-game.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAkBrD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;CAaa,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,UAAU,CAAC,CAAC;AACtF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,OAAO,CAAC,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,QAAQ,CAAC,CAAC;AAElF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,wBAAwB,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AAE/E,eAAO,MAAM,cAAc;;iBAEzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AA6CtD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOa,CAAC;AAC/C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMgB,CAAC;AAC/C,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMe,CAAC;AAC/C,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAI1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { parseGameRosterPlayerId } from '../ids/compound-ids.js';
|
|
|
3
3
|
import { GAME_MEMO_INPUT, SCHEDULE_WEEK_TITLE_INPUT } from '../constants/text-fields.js';
|
|
4
4
|
import { SPORT_LINE_SCHEMAS } from './aggregate-stats.js';
|
|
5
5
|
import { gameStatsSchema } from './game-stats.js';
|
|
6
|
-
import { calendarDateSchema, countSchema, epochMsSchema, gameRosterPlayerIdSchema, gameStatusSchema, leagueIdSchema, scheduleWeekIdSchema,
|
|
6
|
+
import { calendarDateSchema, countSchema, epochMsSchema, gameRosterPlayerIdSchema, gameStatusSchema, leagueIdSchema, scheduleWeekIdSchema, teamIdSchema, userIdSchema, } from './atoms.js';
|
|
7
7
|
import { textFieldSchema } from '../schemas/text-field.js';
|
|
8
8
|
import { gameLocationIdSchema, gameLocationSubLocationSchema } from './game-location.js';
|
|
9
9
|
// Spelled per sport so each payload keeps its exact type.
|
|
@@ -34,7 +34,6 @@ const sportGameBase = {
|
|
|
34
34
|
memos: z.record(z.string(), textFieldSchema(GAME_MEMO_INPUT)).optional(),
|
|
35
35
|
absentRosterPlayerIds: z.array(gameRosterPlayerIdSchema),
|
|
36
36
|
nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema).optional(),
|
|
37
|
-
statsOperationId: statsOperationIdSchema.optional(),
|
|
38
37
|
finalizedAt: epochMsSchema.optional(),
|
|
39
38
|
reopenedAt: epochMsSchema.optional(),
|
|
40
39
|
createdAt: epochMsSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sport-game.js","sourceRoot":"","sources":["../../src/doc-schemas/sport-game.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAEzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"sport-game.js","sourceRoot":"","sources":["../../src/doc-schemas/sport-game.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;A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G,CAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,QAAQ,EAAE,aAAa;CACxB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { parseGameRosterPlayerId } from '../ids/compound-ids.js';\nimport { GAME_MEMO_INPUT, SCHEDULE_WEEK_TITLE_INPUT } from '../constants/text-fields.js';\nimport type { LeagueType } from '../types/sports.js';\nimport { SPORT_LINE_SCHEMAS } from './aggregate-stats.js';\nimport { gameStatsSchema } from './game-stats.js';\nimport {\n calendarDateSchema,\n countSchema,\n epochMsSchema,\n gameRosterPlayerIdSchema,\n gameStatusSchema,\n leagueIdSchema,\n scheduleWeekIdSchema,\n teamIdSchema,\n userIdSchema,\n} from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\nimport { gameLocationIdSchema, gameLocationSubLocationSchema } from './game-location.js';\n\n// Spelled per sport so each payload keeps its exact type.\nexport const SPORT_GAME_STATS_SCHEMAS = {\n Basketball: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Basketball.gameTeam,\n SPORT_LINE_SCHEMAS.Basketball.gamePlayer,\n ),\n Curling: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Curling.gameTeam,\n SPORT_LINE_SCHEMAS.Curling.gamePlayer,\n ),\n Football: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Football.gameTeam,\n SPORT_LINE_SCHEMAS.Football.gamePlayer,\n ),\n} as const satisfies Record<LeagueType, z.ZodType>;\n\nexport type BasketballGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Basketball>;\nexport type CurlingGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Curling>;\nexport type FootballGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Football>;\n\nexport type GameStats = z.infer<(typeof SPORT_GAME_STATS_SCHEMAS)[LeagueType]>;\n\nexport const GameTeamSchema = z.object({\n teamId: teamIdSchema,\n});\nexport type GameTeam = z.infer<typeof GameTeamSchema>;\n\nconst sportGameBase = {\n leagueId: leagueIdSchema,\n weekId: scheduleWeekIdSchema,\n weekTitle: textFieldSchema(SCHEDULE_WEEK_TITLE_INPUT),\n weekLocation: z.string(),\n weekStartDate: epochMsSchema,\n startTime: epochMsSchema,\n dayKey: calendarDateSchema,\n locationLabel: z.string(),\n gameLocationId: gameLocationIdSchema.optional(),\n subLocation: gameLocationSubLocationSchema.optional(),\n status: gameStatusSchema,\n teams: z.tuple([GameTeamSchema, GameTeamSchema]),\n teamIds: z.array(teamIdSchema).min(1).max(2),\n score: z.record(teamIdSchema, countSchema),\n statEventSequence: countSchema,\n memos: z.record(z.string(), textFieldSchema(GAME_MEMO_INPUT)).optional(),\n absentRosterPlayerIds: z.array(gameRosterPlayerIdSchema),\n nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema).optional(),\n finalizedAt: epochMsSchema.optional(),\n reopenedAt: epochMsSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n};\n\nfunction rollupMatchesTeams(game: {\n teamIds: string[];\n score: Record<string, number>;\n stats: { teamStats: Record<string, unknown>; playerStats: Record<string, unknown> };\n}): boolean {\n const teams = new Set(game.teamIds);\n const namesEveryTeam = (keys: string[]) =>\n keys.length === teams.size && keys.every((key) => teams.has(key));\n return (\n namesEveryTeam(Object.keys(game.stats.teamStats)) &&\n namesEveryTeam(Object.keys(game.score)) &&\n Object.keys(game.stats.playerStats).every((key) =>\n teams.has(parseGameRosterPlayerId(key)?.teamId ?? ''),\n )\n );\n}\nconst ROLLUP_MISMATCH = \"The stats rollup and score mirror hold exactly the game's teams.\";\n\nexport const BasketballGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Basketball' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Basketball,\n jumpBallTeamId: teamIdSchema.optional(),\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type BasketballGame = z.infer<typeof BasketballGameSchema>;\n\nexport const CurlingGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Curling' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Curling,\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type CurlingGame = z.infer<typeof CurlingGameSchema>;\n\nexport const FootballGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Football' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Football,\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type FootballGame = z.infer<typeof FootballGameSchema>;\n\nexport const SportGameSchema = z.discriminatedUnion('leagueType', [\n BasketballGameSchema,\n CurlingGameSchema,\n FootballGameSchema,\n]);\nexport type SportGame = z.infer<typeof SportGameSchema>;\n\nexport const GameRosterPlayerSchema = z.object({\n userId: userIdSchema,\n teamId: teamIdSchema,\n isGhost: z.boolean(),\n syncedAt: epochMsSchema,\n});\nexport type GameRosterPlayer = z.infer<typeof GameRosterPlayerSchema>;\n"]}
|