@ttt-productions/q-core 0.1.10 → 0.1.12
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 +6 -0
- package/dist/constants/business.d.ts.map +1 -1
- package/dist/constants/business.js +6 -0
- package/dist/constants/business.js.map +1 -1
- package/dist/doc-schemas/game-location.d.ts +4 -0
- package/dist/doc-schemas/game-location.d.ts.map +1 -1
- package/dist/doc-schemas/game-location.js +8 -1
- package/dist/doc-schemas/game-location.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +3 -0
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +2 -1
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/paths/collections.d.ts +1 -0
- package/dist/paths/collections.d.ts.map +1 -1
- package/dist/paths/collections.js +2 -0
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/path-builders.d.ts +1 -0
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +1 -0
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/types/unions.d.ts +2 -0
- package/dist/types/unions.d.ts.map +1 -1
- package/dist/types/unions.js +4 -0
- package/dist/types/unions.js.map +1 -1
- package/package.json +1 -1
|
@@ -59,6 +59,8 @@ export declare const SCHEDULE_WEEK_FULL_MESSAGE: string;
|
|
|
59
59
|
export declare const MAX_PLAYOFF_CUTOFF = 40;
|
|
60
60
|
export declare const MAX_STAT_EVENTS_PER_GAME = 1000;
|
|
61
61
|
export declare const GAME_STAT_LOG_FULL_MESSAGE: string;
|
|
62
|
+
export declare const MAX_GAME_LOCATIONS = 30;
|
|
63
|
+
export declare const GAME_LOCATIONS_FULL_MESSAGE: string;
|
|
62
64
|
export declare const CAPACITY_LIMITS: readonly [{
|
|
63
65
|
readonly key: "teamPlayers";
|
|
64
66
|
readonly label: "Players on a team, ghost players included";
|
|
@@ -87,6 +89,10 @@ export declare const CAPACITY_LIMITS: readonly [{
|
|
|
87
89
|
readonly key: "playoffCutoff";
|
|
88
90
|
readonly label: "Teams reaching the playoffs, at most the league's team limit";
|
|
89
91
|
readonly limit: 40;
|
|
92
|
+
}, {
|
|
93
|
+
readonly key: "gameLocations";
|
|
94
|
+
readonly label: "Game locations, each venue's courts or sheets counted as part of it";
|
|
95
|
+
readonly limit: 30;
|
|
90
96
|
}];
|
|
91
97
|
export type CapacityLimitKey = (typeof CAPACITY_LIMITS)[number]['key'];
|
|
92
98
|
//# sourceMappingURL=business.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.d.ts","sourceRoot":"","sources":["../../src/constants/business.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,oCAAoC,KAAK,CAAC;AACvD,eAAO,MAAM,oCAAoC,MAAM,CAAC;AACxD,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAEtD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAGlD,eAAO,MAAM,gBAAgB;;;;;;EAGnB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAC5E,eAAO,MAAM,yBAAyB,EAA8C,CAClF,qBAAqB,EACrB,GAAG,qBAAqB,EAAE,CAC3B,CAAC;AAGF,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAGxC,eAAO,MAAM,u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M,CAAC;AACxC,eAAO,MAAM,yBAAyB,QAAuE,CAAC;AAC9G,eAAO,MAAM,yBAAyB,QAAuE,CAAC;AAI9G,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,0BAA0B,QAAwE,CAAC;AAIhH,eAAO,MAAM,kBAAkB,KAAuB,CAAC;AAIvD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,eAAO,MAAM,0BAA0B,QAAkF,CAAC;AAK1H,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,2BAA2B,QAAsE,CAAC;AAI/G,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaiD,CAAC;AAC9E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -100,6 +100,11 @@ export const MAX_PLAYOFF_CUTOFF = MAX_TEAMS_PER_LEAGUE;
|
|
|
100
100
|
// nothing written, which also bounds the game's live play-by-play.
|
|
101
101
|
export const MAX_STAT_EVENTS_PER_GAME = 1000;
|
|
102
102
|
export const GAME_STAT_LOG_FULL_MESSAGE = countCapReachedMessage('This game', MAX_STAT_EVENTS_PER_GAME, 'recorded stats');
|
|
103
|
+
// The venues games are played at. Every venue picker and the public locations page read the whole set,
|
|
104
|
+
// so creating a venue is refused at this many. A venue's courts, sheets, or rooms are part of it and
|
|
105
|
+
// count toward MAX_GAME_LOCATION_SUB_LOCATIONS, never toward this.
|
|
106
|
+
export const MAX_GAME_LOCATIONS = 30;
|
|
107
|
+
export const GAME_LOCATIONS_FULL_MESSAGE = countCapReachedMessage('Q-Sports', MAX_GAME_LOCATIONS, 'locations');
|
|
103
108
|
// Every capacity limit as an admin reads it, in the order the Limits card lists them. Each value is
|
|
104
109
|
// the constant the server enforces, so the card and every refusal name the same number.
|
|
105
110
|
export const CAPACITY_LIMITS = [
|
|
@@ -114,5 +119,6 @@ export const CAPACITY_LIMITS = [
|
|
|
114
119
|
{ key: 'weekGames', label: 'Games in one week of the schedule', limit: MAX_SCHEDULE_WEEK_GAMES },
|
|
115
120
|
{ key: 'gameStats', label: 'Stats recorded in one game', limit: MAX_STAT_EVENTS_PER_GAME },
|
|
116
121
|
{ key: 'playoffCutoff', label: "Teams reaching the playoffs, at most the league's team limit", limit: MAX_PLAYOFF_CUTOFF },
|
|
122
|
+
{ key: 'gameLocations', label: "Game locations, each venue's courts or sheets counted as part of it", limit: MAX_GAME_LOCATIONS },
|
|
117
123
|
];
|
|
118
124
|
//# sourceMappingURL=business.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.js","sourceRoot":"","sources":["../../src/constants/business.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,6FAA6F;AAE7F,6EAA6E;AAC7E,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;AACrC,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,gGAAgG;AAChG,2EAA2E;AAC3E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,EAA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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,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,8DAA8D,EAAE,KAAK,EAAE,kBAAkB,EAAE;CAC/C,CAAC","sourcesContent":["// Business limits and policy values both app roots enforce. A form reads these for its\n// `maxLength` / zod bound and the callable's input schema reads the same constant (ENG-005).\n\n// Display names, team names, and ghost player names share one length policy.\nexport 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;\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;\n// The equipment a referee can be loaned. The catalog is this constant: adding an item is a code\n// change, and a contract records each item's id and name as it was loaned.\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\n// An award's name in the catalog.\nexport const MIN_AWARD_NAME_LENGTH = 3;\nexport const MAX_AWARD_NAME_LENGTH = 60;\n\n// The most accounts one award grant call may name in each list.\nexport const MAX_AWARD_GRANT_TARGETS = 20;\n// The people one page of a team's or league's award grant reaches. A group grant has no limit on\n// people; each page commits on its own, and a person takes at most four writes in it — the profile,\n// its public mirror, the person's record on the grant, and the audit event — beside the grant record.\nexport const AWARD_GROUP_GRANT_PAGE_SIZE = 100;\n\n// The reason an admin gives for a repair action — a backfill, a recalculation, a reopen — recorded on\n// its audit event (BACKEND-212).\nexport const MIN_REPAIR_REASON_LENGTH = 3;\nexport const MAX_REPAIR_REASON_LENGTH = 500;\n\n// The most uids one `updateAdminList` call may grant or revoke per list.\nexport const MAX_ADMIN_LIST_CHANGES = 20;\n\n// A team may be created in a league until this many days after the league's start date.\nexport const TEAM_CREATION_CUTOFF_DAYS = 14;\n\n// Contact phone numbers are stored as typed, bounded only in length.\nexport const MAX_CONTACT_PHONE_LENGTH = 30;\n\n// The failure a roster obligation records when a reconciliation run fails, cut to this length.\nexport const MAX_ROSTER_SYNC_FAILURE_MESSAGE_LENGTH = 500;\n\n// `_appConfig/app` operator messages.\nexport const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;\nexport const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;\n// `_appConfig/app.appVersion` — the version a live client compares itself against.\nexport const MAX_APP_VERSION_LENGTH = 64;\n\n// `_appConfig/landingPage` copy.\nexport const MAX_LANDING_HERO_TITLE_LENGTH = 200;\nexport const MAX_LANDING_ABOUT_TEXT_LENGTH = 5000;\n\n// Waiver template wording. A signed waiver carries its own copy of the title and text, so the text\n// cap also bounds every signature document.\nexport const MAX_WAIVER_TEMPLATE_TITLE_LENGTH = 120;\nexport const MAX_WAIVER_TEMPLATE_TEXT_LENGTH = 20000;\n\n// Game locations: the venue, its address, the courts or sheets inside it, and the directions memo.\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\n// A week of the schedule's title.\nexport const MAX_SCHEDULE_WEEK_TITLE_LENGTH = 100;\n\n// The timezone a game's `dayKey` (its local calendar date) is computed in.\nexport const LEAGUE_TIME_ZONE = 'America/New_York';\n\n// A scorer's note on one person in a game (\"red shirt\", \"#9\").\nexport const MAX_GAME_MEMO_LENGTH = 30;\n\n\n// How a refusal at a count cap reads: the thing that is full, its limit, and what it holds.\nexport const countCapReachedMessage = (subject: string, limit: number, noun: string): string =>\n `${subject} already has the maximum of ${limit} ${noun}.`;\n\n// The capacity limits: how many players, teams, games and stats Q-Sports holds. Each is enforced\n// where the thing is created, inside that creation's transaction, so every read of a whole set fits\n// one bound and every internal bound sized from one derives from it here.\n\n// A team's size, ghost players included. Every way onto a team is refused at this many active\n// members, so a game's roster can always be seeded and checked in one read.\nexport const MAX_ACTIVE_TEAM_MEMBERS = 30;\nexport const TEAM_FULL_MESSAGE = countCapReachedMessage('This team', MAX_ACTIVE_TEAM_MEMBERS, 'players');\n// The memberships one game-roster seed reads for a team: every membership is active, so the cap.\nexport const MAX_ROSTER_SEED_MEMBERSHIPS_PER_TEAM = MAX_ACTIVE_TEAM_MEMBERS;\n// Departed players a team's side of an open game may keep beside its members: a player who recorded\n// stats in the game keeps their entry after leaving the team.\nexport const MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM = 10;\n// The entries one team's side of a game may hold, so a reconcile or finalize reads them in one page.\nexport const MAX_ROSTER_ENTRIES_PER_TEAM = MAX_ACTIVE_TEAM_MEMBERS + MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM;\n\n// A league's size. Standings, schedules, and rankings need a league's complete set of teams and\n// games, so creation is refused at these caps rather than any read being cut short. A team's games\n// are its league's, so the game cap bounds them too.\nexport const MAX_TEAMS_PER_LEAGUE = 40;\nexport const MAX_GAMES_PER_LEAGUE = 250;\nexport const LEAGUE_TEAMS_FULL_MESSAGE = countCapReachedMessage('This league', MAX_TEAMS_PER_LEAGUE, 'teams');\nexport const LEAGUE_GAMES_FULL_MESSAGE = countCapReachedMessage('This league', MAX_GAMES_PER_LEAGUE, 'games');\n\n// The most games one week of the schedule holds, counting the games it already has: creating a week\n// or adding a game to one is refused past it.\nexport const MAX_SCHEDULE_WEEK_GAMES = 20;\nexport const SCHEDULE_WEEK_FULL_MESSAGE = countCapReachedMessage('This week', MAX_SCHEDULE_WEEK_GAMES, 'games');\n\n// How many teams in a pool reach the playoffs: at most every team a league can hold. A cutoff above a\n// pool's team count simply admits every team.\nexport const MAX_PLAYOFF_CUTOFF = MAX_TEAMS_PER_LEAGUE;\n\n// A game's stat log. A write that would take a game's `statEventSequence` past it is refused with\n// nothing written, which also bounds the game's live play-by-play.\nexport const MAX_STAT_EVENTS_PER_GAME = 1000;\nexport const GAME_STAT_LOG_FULL_MESSAGE = countCapReachedMessage('This game', MAX_STAT_EVENTS_PER_GAME, 'recorded stats');\n\n// Every capacity limit as an admin reads it, in the order the Limits card lists them. Each value is\n// the constant the server enforces, so the card and every refusal name the same number.\nexport const CAPACITY_LIMITS = [\n { key: 'teamPlayers', label: 'Players on a team, ghost players included', limit: MAX_ACTIVE_TEAM_MEMBERS },\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 { key: 'leagueGames', label: \"Games in a league, so also a team's games\", limit: MAX_GAMES_PER_LEAGUE },\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 { key: 'playoffCutoff', label: \"Teams reaching the playoffs, at most the league's team limit\", limit: MAX_PLAYOFF_CUTOFF },\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,uFAAuF;AACvF,6FAA6F;AAE7F,6EAA6E;AAC7E,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;AACrC,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,gGAAgG;AAChG,2EAA2E;AAC3E,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,CAA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,KAAK,EAAE,uBAAuB,EAAE;IAChG,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,wBAAwB,EAAE;IAC1F,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,8DAA8D,EAAE,KAAK,EAAE,kBAAkB,EAAE;IAC1H,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,qEAAqE,EAAE,KAAK,EAAE,kBAAkB,EAAE;CACtD,CAAC","sourcesContent":["// Business limits and policy values both app roots enforce. A form reads these for its\n// `maxLength` / zod bound and the callable's input schema reads the same constant (ENG-005).\n\n// Display names, team names, and ghost player names share one length policy.\nexport 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;\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;\n// The equipment a referee can be loaned. The catalog is this constant: adding an item is a code\n// change, and a contract records each item's id and name as it was loaned.\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\n// An award's name in the catalog.\nexport const MIN_AWARD_NAME_LENGTH = 3;\nexport const MAX_AWARD_NAME_LENGTH = 60;\n\n// The most accounts one award grant call may name in each list.\nexport const MAX_AWARD_GRANT_TARGETS = 20;\n// The people one page of a team's or league's award grant reaches. A group grant has no limit on\n// people; each page commits on its own, and a person takes at most four writes in it — the profile,\n// its public mirror, the person's record on the grant, and the audit event — beside the grant record.\nexport const AWARD_GROUP_GRANT_PAGE_SIZE = 100;\n\n// The reason an admin gives for a repair action — a backfill, a recalculation, a reopen — recorded on\n// its audit event (BACKEND-212).\nexport const MIN_REPAIR_REASON_LENGTH = 3;\nexport const MAX_REPAIR_REASON_LENGTH = 500;\n\n// The most uids one `updateAdminList` call may grant or revoke per list.\nexport const MAX_ADMIN_LIST_CHANGES = 20;\n\n// A team may be created in a league until this many days after the league's start date.\nexport const TEAM_CREATION_CUTOFF_DAYS = 14;\n\n// Contact phone numbers are stored as typed, bounded only in length.\nexport const MAX_CONTACT_PHONE_LENGTH = 30;\n\n// The failure a roster obligation records when a reconciliation run fails, cut to this length.\nexport const MAX_ROSTER_SYNC_FAILURE_MESSAGE_LENGTH = 500;\n\n// `_appConfig/app` operator messages.\nexport const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;\nexport const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;\n// `_appConfig/app.appVersion` — the version a live client compares itself against.\nexport const MAX_APP_VERSION_LENGTH = 64;\n\n// `_appConfig/landingPage` copy.\nexport const MAX_LANDING_HERO_TITLE_LENGTH = 200;\nexport const MAX_LANDING_ABOUT_TEXT_LENGTH = 5000;\n\n// Waiver template wording. A signed waiver carries its own copy of the title and text, so the text\n// cap also bounds every signature document.\nexport const MAX_WAIVER_TEMPLATE_TITLE_LENGTH = 120;\nexport const MAX_WAIVER_TEMPLATE_TEXT_LENGTH = 20000;\n\n// Game locations: the venue, its address, the courts or sheets inside it, and the directions memo.\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\n// A week of the schedule's title.\nexport const MAX_SCHEDULE_WEEK_TITLE_LENGTH = 100;\n\n// The timezone a game's `dayKey` (its local calendar date) is computed in.\nexport const LEAGUE_TIME_ZONE = 'America/New_York';\n\n// A scorer's note on one person in a game (\"red shirt\", \"#9\").\nexport const MAX_GAME_MEMO_LENGTH = 30;\n\n\n// How a refusal at a count cap reads: the thing that is full, its limit, and what it holds.\nexport const countCapReachedMessage = (subject: string, limit: number, noun: string): string =>\n `${subject} already has the maximum of ${limit} ${noun}.`;\n\n// The capacity limits: how many players, teams, games and stats Q-Sports holds. Each is enforced\n// where the thing is created, inside that creation's transaction, so every read of a whole set fits\n// one bound and every internal bound sized from one derives from it here.\n\n// A team's size, ghost players included. Every way onto a team is refused at this many active\n// members, so a game's roster can always be seeded and checked in one read.\nexport const MAX_ACTIVE_TEAM_MEMBERS = 30;\nexport const TEAM_FULL_MESSAGE = countCapReachedMessage('This team', MAX_ACTIVE_TEAM_MEMBERS, 'players');\n// The memberships one game-roster seed reads for a team: every membership is active, so the cap.\nexport const MAX_ROSTER_SEED_MEMBERSHIPS_PER_TEAM = MAX_ACTIVE_TEAM_MEMBERS;\n// Departed players a team's side of an open game may keep beside its members: a player who recorded\n// stats in the game keeps their entry after leaving the team.\nexport const MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM = 10;\n// The entries one team's side of a game may hold, so a reconcile or finalize reads them in one page.\nexport const MAX_ROSTER_ENTRIES_PER_TEAM = MAX_ACTIVE_TEAM_MEMBERS + MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM;\n\n// A league's size. Standings, schedules, and rankings need a league's complete set of teams and\n// games, so creation is refused at these caps rather than any read being cut short. A team's games\n// are its league's, so the game cap bounds them too.\nexport const MAX_TEAMS_PER_LEAGUE = 40;\nexport const MAX_GAMES_PER_LEAGUE = 250;\nexport const LEAGUE_TEAMS_FULL_MESSAGE = countCapReachedMessage('This league', MAX_TEAMS_PER_LEAGUE, 'teams');\nexport const LEAGUE_GAMES_FULL_MESSAGE = countCapReachedMessage('This league', MAX_GAMES_PER_LEAGUE, 'games');\n\n// The most games one week of the schedule holds, counting the games it already has: creating a week\n// or adding a game to one is refused past it.\nexport const MAX_SCHEDULE_WEEK_GAMES = 20;\nexport const SCHEDULE_WEEK_FULL_MESSAGE = countCapReachedMessage('This week', MAX_SCHEDULE_WEEK_GAMES, 'games');\n\n// How many teams in a pool reach the playoffs: at most every team a league can hold. A cutoff above a\n// pool's team count simply admits every team.\nexport const MAX_PLAYOFF_CUTOFF = MAX_TEAMS_PER_LEAGUE;\n\n// A game's stat log. A write that would take a game's `statEventSequence` past it is refused with\n// nothing written, which also bounds the game's live play-by-play.\nexport const MAX_STAT_EVENTS_PER_GAME = 1000;\nexport const GAME_STAT_LOG_FULL_MESSAGE = countCapReachedMessage('This game', MAX_STAT_EVENTS_PER_GAME, 'recorded stats');\n\n// The venues games are played at. Every venue picker and the public locations page read the whole set,\n// so creating a venue is refused at this many. A venue's courts, sheets, or rooms are part of it and\n// count toward MAX_GAME_LOCATION_SUB_LOCATIONS, never toward this.\nexport const MAX_GAME_LOCATIONS = 30;\nexport const GAME_LOCATIONS_FULL_MESSAGE = countCapReachedMessage('Q-Sports', MAX_GAME_LOCATIONS, 'locations');\n\n// Every capacity limit as an admin reads it, in the order the Limits card lists them. Each value is\n// the constant the server enforces, so the card and every refusal name the same number.\nexport const CAPACITY_LIMITS = [\n { key: 'teamPlayers', label: 'Players on a team, ghost players included', limit: MAX_ACTIVE_TEAM_MEMBERS },\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 { key: 'leagueGames', label: \"Games in a league, so also a team's games\", limit: MAX_GAMES_PER_LEAGUE },\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 { key: 'playoffCutoff', label: \"Teams reaching the playoffs, at most the league's team limit\", limit: MAX_PLAYOFF_CUTOFF },\n { key: 'gameLocations', label: \"Game locations, each venue's courts or sheets counted as part of it\", limit: MAX_GAME_LOCATIONS },\n] as const satisfies readonly { key: string; label: string; limit: number }[];\nexport type CapacityLimitKey = (typeof CAPACITY_LIMITS)[number]['key'];\n"]}
|
|
@@ -10,4 +10,8 @@ export declare const GameLocationSchema: z.ZodObject<{
|
|
|
10
10
|
updatedAt: z.ZodNumber;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export type GameLocation = z.infer<typeof GameLocationSchema>;
|
|
13
|
+
export declare const GameLocationRegistrySchema: z.ZodObject<{
|
|
14
|
+
locationRevision: z.ZodNumber;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
export type GameLocationRegistry = z.infer<typeof GameLocationRegistrySchema>;
|
|
13
17
|
//# sourceMappingURL=game-location.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-location.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/game-location.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB,aAA0B,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;;;;;iBAY7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"game-location.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/game-location.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB,aAA0B,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;;;;;iBAY7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAM9D,eAAO,MAAM,0BAA0B;;kBAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// (`gameLocationId`) beside their own free-text label, so a game still reads correctly after its
|
|
3
3
|
// venue is deleted.
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { documentIdSegmentSchema, epochMsSchema } from './atoms.js';
|
|
5
|
+
import { countSchema, documentIdSegmentSchema, epochMsSchema } from './atoms.js';
|
|
6
6
|
import { pictureIdSchema } from './gallery.js';
|
|
7
7
|
export const gameLocationIdSchema = documentIdSegmentSchema;
|
|
8
8
|
export const GameLocationSchema = z.object({
|
|
@@ -18,4 +18,11 @@ export const GameLocationSchema = z.object({
|
|
|
18
18
|
createdAt: epochMsSchema,
|
|
19
19
|
updatedAt: epochMsSchema,
|
|
20
20
|
});
|
|
21
|
+
// `_serverData/gameLocationRegistry` — the fence of the venue cap. Venue creation counts the venues
|
|
22
|
+
// in its transaction against MAX_GAME_LOCATIONS, and a query does not lock against an insert, so each
|
|
23
|
+
// creation advances `locationRevision` here: two creations at the cap conflict instead of both
|
|
24
|
+
// passing (BACKEND-116). Only its changing matters; absent until the first creation.
|
|
25
|
+
export const GameLocationRegistrySchema = z.strictObject({
|
|
26
|
+
locationRevision: countSchema,
|
|
27
|
+
});
|
|
21
28
|
//# sourceMappingURL=game-location.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-location.js","sourceRoot":"","sources":["../../src/doc-schemas/game-location.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,iGAAiG;AACjG,oBAAoB;AAEpB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"game-location.js","sourceRoot":"","sources":["../../src/doc-schemas/game-location.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,iGAAiG;AACjG,oBAAoB;AAEpB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAE5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,6CAA6C;IAC7C,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,sDAAsD;IACtD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClC,8FAA8F;IAC9F,6CAA6C;IAC7C,SAAS,EAAE,eAAe,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,oGAAoG;AACpG,sGAAsG;AACtG,+FAA+F;AAC/F,qFAAqF;AACrF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,YAAY,CAAC;IACvD,gBAAgB,EAAE,WAAW;CAC9B,CAAC,CAAC","sourcesContent":["// `gameLocations/{gameLocationId}` — one venue games are played at. Games name it by id\n// (`gameLocationId`) beside their own free-text label, so a game still reads correctly after its\n// venue is deleted.\n\nimport { z } from 'zod';\nimport { countSchema, documentIdSegmentSchema, epochMsSchema } from './atoms.js';\nimport { pictureIdSchema } from './gallery.js';\n\nexport const gameLocationIdSchema = documentIdSegmentSchema;\n\nexport const GameLocationSchema = z.object({\n name: z.string().min(1),\n streetAddress: z.string(),\n // Courts, sheets, or rooms within the venue.\n subLocations: z.array(z.string()),\n // Directions for players; absent when there are none.\n memo: z.string().min(1).optional(),\n // The venue's picture. Only the picture pipeline writes it (ARCH-001); the location callables\n // write the fields above and never this one.\n pictureId: pictureIdSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type GameLocation = z.infer<typeof GameLocationSchema>;\n\n// `_serverData/gameLocationRegistry` — the fence of the venue cap. Venue creation counts the venues\n// in its transaction against MAX_GAME_LOCATIONS, and a query does not lock against an insert, so each\n// creation advances `locationRevision` here: two creations at the cap conflict instead of both\n// passing (BACKEND-116). Only its changing matters; absent until the first creation.\nexport const GameLocationRegistrySchema = z.strictObject({\n locationRevision: countSchema,\n});\nexport type GameLocationRegistry = z.infer<typeof GameLocationRegistrySchema>;\n"]}
|
|
@@ -2913,6 +2913,9 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
2913
2913
|
}, z.core.$strict>>;
|
|
2914
2914
|
updatedAt: z.ZodNumber;
|
|
2915
2915
|
}, z.core.$strict>;
|
|
2916
|
+
readonly '_serverData/gameLocationRegistry': z.ZodObject<{
|
|
2917
|
+
locationRevision: z.ZodNumber;
|
|
2918
|
+
}, z.core.$strict>;
|
|
2916
2919
|
readonly 'migrationActionRuns/{actionId}': z.ZodObject<{
|
|
2917
2920
|
actionId: z.ZodEnum<{
|
|
2918
2921
|
"copy.userProfiles": "copy.userProfiles";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDkB,CAAC;AAElD,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAIvE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;CAaiC,CAAC;AAGvE,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAO,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { StatusReconcileQueueEntrySchema } from './status-reconcile-queue.js';
|
|
|
9
9
|
import { ActiveAdminNotificationSchema, AdminNotificationHistorySchema, NotificationArchiveAllJobSchema, NotificationDeliverySchema, } from './admin-notifications.js';
|
|
10
10
|
import { AwardDefinitionSchema } from './catalogs.js';
|
|
11
11
|
import { AwardGroupGrantPersonSchema, AwardGroupGrantSchema } from './award-group-grant.js';
|
|
12
|
-
import { GameLocationSchema } from './game-location.js';
|
|
12
|
+
import { GameLocationRegistrySchema, GameLocationSchema } from './game-location.js';
|
|
13
13
|
import { GalleryPictureSchema } from './gallery.js';
|
|
14
14
|
import { PendingMediaSchema } from './pending-media.js';
|
|
15
15
|
import { PictureRetirementSchema } from './picture-retirement.js';
|
|
@@ -76,6 +76,7 @@ export const COLLECTION_SCHEMAS = {
|
|
|
76
76
|
'_appConfig/statsBeacon': StatsBeaconSchema,
|
|
77
77
|
'_systemData/adminList': AdminListSchema,
|
|
78
78
|
'_serverData/migrationConsole': MigrationConsoleSchema,
|
|
79
|
+
'_serverData/gameLocationRegistry': GameLocationRegistrySchema,
|
|
79
80
|
'migrationActionRuns/{actionId}': MigrationActionRunSchema,
|
|
80
81
|
'sweepState/{sweepName}': SweepStateSchema,
|
|
81
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,iGAAiG;AACjG,qBAAqB;AACrB,EAAE;AACF,kGAAkG;AAClG,qGAAqG;AACrG,0DAA0D;AAG1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC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rE,gCAAgC,EAAE,UAAU;CACwB,CAAC;AAEvE,mFAAmF;AACnF,MAAM,CAAC,MAAM,mBAAmB,GAAsB,EAAE,CAAC","sourcesContent":["// Collection → schema registry: every Firestore path template bound to the zod schema its\n// documents must satisfy. Every document a migration copy action writes is validated against the\n// schema bound here.\n//\n// A key is the literal path template — `{placeholder}` for an id, the literal segment for a fixed\n// document id. __tests__/doc-schemas-registry.test.ts fails when a collection constant has neither a\n// binding here nor an explicit PENDING_COLLECTIONS entry.\n\nimport type { z } from 'zod';\nimport { StatusReconcileQueueEntrySchema } from './status-reconcile-queue.js';\nimport {\n ActiveAdminNotificationSchema,\n AdminNotificationHistorySchema,\n NotificationArchiveAllJobSchema,\n NotificationDeliverySchema,\n} from './admin-notifications.js';\nimport { AwardDefinitionSchema } from './catalogs.js';\nimport { AwardGroupGrantPersonSchema, AwardGroupGrantSchema } from './award-group-grant.js';\nimport { GameLocationSchema } from './game-location.js';\nimport { GalleryPictureSchema } from './gallery.js';\nimport { PendingMediaSchema } from './pending-media.js';\nimport { PictureRetirementSchema } from './picture-retirement.js';\nimport { GameRosterPlayerSchema, SportGameSchema } from './sport-game.js';\nimport { SportHallOfFameSchema } from './aggregate-stats.js';\nimport { GameStatHistoryPageSchema } from './game-stat-history.js';\nimport { GameStatEventSchema } from './game-stats.js';\nimport { StatsOperationSchema } from './stats-operation.js';\nimport { LeagueTeamContactSchema, LeagueTeamSchema } from './league-team.js';\nimport { MembershipRosterSyncSchema } from './membership-roster-sync.js';\nimport { MigrationActionRunSchema, MigrationConsoleSchema } from './migration-console.js';\nimport { AuditEventSchema } from './audit-event.js';\nimport { PublicUserSchema } from './publicUser.js';\nimport { RegistrationStartSchema } from './registration-start.js';\nimport { ReservedDisplayNameSchema } from './reserved-display-name.js';\nimport { SportLeagueSchema } from './sport-league.js';\nimport { SweepStateSchema } from './sweep-state.js';\nimport {\n AppConfigSchema,\n LandingPageConfigSchema,\n AdminListSchema,\n StatsBeaconSchema,\n StatsValidationReportSchema,\n} from './system.js';\nimport {\n LeagueFreeAgentSchema,\n TeamJoinRequestSchema,\n TeamInvitationSchema,\n TeamMembershipSchema,\n} from './team-membership.js';\nimport { HistoricalStatsSchema, UserPrivateDataSchema, UserProfileSchema } from './user-profile.js';\nimport { HardwareLoanContractSchema, SignedWaiverSchema } from './waivers-and-hardware.js';\nimport { WaiverTemplateSchema, WaiverTemplateVersionSchema } from './waiver-template.js';\n\nexport const COLLECTION_SCHEMAS = {\n 'userProfiles/{userId}': UserProfileSchema,\n 'userProfiles/{userId}/privateData/{privateDataId}': UserPrivateDataSchema,\n 'userProfiles/{userId}/historicalStats/{sportKey}': HistoricalStatsSchema,\n 'publicUsers/{userId}': PublicUserSchema,\n 'reservedDisplayNames/{reservedDisplayNameKey}': ReservedDisplayNameSchema,\n 'statusReconcileQueue/{userId}': StatusReconcileQueueEntrySchema,\n 'registrationStarts/{userId}': RegistrationStartSchema,\n\n 'sportLeagues/{leagueId}': SportLeagueSchema,\n 'leagueTeams/{teamId}': LeagueTeamSchema,\n 'leagueTeamContacts/{teamId}': LeagueTeamContactSchema,\n 'teamMemberships/{teamMembershipId}': TeamMembershipSchema,\n 'membershipRosterSyncs/{teamMembershipId}': MembershipRosterSyncSchema,\n 'teamInvitations/{inviteId}': TeamInvitationSchema,\n 'teamJoinRequests/{requestId}': TeamJoinRequestSchema,\n 'leagueFreeAgents/{leagueFreeAgentId}': LeagueFreeAgentSchema,\n\n 'sportGames/{gameId}': SportGameSchema,\n 'sportGames/{gameId}/gameRosterPlayers/{gameRosterPlayerId}': GameRosterPlayerSchema,\n 'sportGames/{gameId}/gameStatEvents/{eventId}': GameStatEventSchema,\n 'sportGames/{gameId}/gameStatHistory/{pageId}': GameStatHistoryPageSchema,\n 'gameLocations/{gameLocationId}': GameLocationSchema,\n\n 'waiverTemplates/{waiverTemplateId}': WaiverTemplateSchema,\n 'waiverTemplates/{waiverTemplateId}/waiverTemplateVersions/{versionId}': WaiverTemplateVersionSchema,\n 'signedWaivers/{signedWaiverId}': SignedWaiverSchema,\n 'hardwareLoanContracts/{contractId}': HardwareLoanContractSchema,\n\n 'awardDefinitions/{awardId}': AwardDefinitionSchema,\n 'awardGroupGrants/{grantId}': AwardGroupGrantSchema,\n 'awardGroupGrants/{grantId}/awardGroupGrantPeople/{userId}': AwardGroupGrantPersonSchema,\n 'sportHallOfFame/{sportKey}': SportHallOfFameSchema,\n 'statsValidationReports/{reportId}': StatsValidationReportSchema,\n 'statsOperations/{operationId}': StatsOperationSchema,\n\n 'galleryPictures/{pictureId}': GalleryPictureSchema,\n 'pendingMedia/{pendingMediaId}': PendingMediaSchema,\n 'pictureRetirements/{retirementId}': PictureRetirementSchema,\n\n 'auditEvents/{auditEventId}': AuditEventSchema,\n\n 'activeAdminNotifications/{notificationId}': ActiveAdminNotificationSchema,\n 'adminNotificationHistory/{historyId}': AdminNotificationHistorySchema,\n 'notificationDeliveries/{deliveryId}': NotificationDeliverySchema,\n 'notificationArchiveAllJobs/{jobId}': NotificationArchiveAllJobSchema,\n\n '_appConfig/landingPage': LandingPageConfigSchema,\n '_appConfig/app': AppConfigSchema,\n '_appConfig/statsBeacon': StatsBeaconSchema,\n '_systemData/adminList': AdminListSchema,\n '_serverData/migrationConsole': MigrationConsoleSchema,\n 'migrationActionRuns/{actionId}': MigrationActionRunSchema,\n 'sweepState/{sweepName}': SweepStateSchema,\n} as const satisfies Record<string, z.ZodTypeAny>;\n\nexport type RegisteredCollectionPath = keyof typeof COLLECTION_SCHEMAS;\n\n// The body field that equals the document id, where a schema declares one. A drift check injects\n// `doc.id` under this key before validating, so a doc-id field is never a false mismatch.\nexport const COLLECTION_DOC_ID_FIELDS = {\n 'publicUsers/{userId}': 'uid',\n 'registrationStarts/{userId}': 'userId',\n 'sportGames/{gameId}/gameStatEvents/{eventId}': 'eventId',\n 'statsValidationReports/{reportId}': 'reportId',\n 'auditEvents/{auditEventId}': 'id',\n 'pendingMedia/{pendingMediaId}': 'id',\n 'adminNotificationHistory/{historyId}': 'archiveOccurrenceId',\n 'notificationDeliveries/{deliveryId}': 'deliveryId',\n 'notificationArchiveAllJobs/{jobId}': 'jobId',\n 'awardGroupGrants/{grantId}': 'grantId',\n 'awardGroupGrants/{grantId}/awardGroupGrantPeople/{userId}': 'userId',\n 'migrationActionRuns/{actionId}': 'actionId',\n} as const satisfies Partial<Record<RegisteredCollectionPath, string>>;\n\n// Collections declared in ../paths with no bound schema yet, each with the reason.\nexport const PENDING_COLLECTIONS: readonly string[] = [];\n"]}
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,iGAAiG;AACjG,qBAAqB;AACrB,EAAE;AACF,kGAAkG;AAClG,qGAAqG;AACrG,0DAA0D;AAG1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC5F,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAA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EAAE,QAAQ;IACvC,8CAA8C,EAAE,SAAS;IACzD,mCAAmC,EAAE,UAAU;IAC/C,4BAA4B,EAAE,IAAI;IAClC,+BAA+B,EAAE,IAAI;IACrC,sCAAsC,EAAE,qBAAqB;IAC7D,qCAAqC,EAAE,YAAY;IACnD,oCAAoC,EAAE,OAAO;IAC7C,4BAA4B,EAAE,SAAS;IACvC,2DAA2D,EAAE,QAAQ;IACrE,gCAAgC,EAAE,UAAU;CACwB,CAAC;AAEvE,mFAAmF;AACnF,MAAM,CAAC,MAAM,mBAAmB,GAAsB,EAAE,CAAC","sourcesContent":["// Collection → schema registry: every Firestore path template bound to the zod schema its\n// documents must satisfy. Every document a migration copy action writes is validated against the\n// schema bound here.\n//\n// A key is the literal path template — `{placeholder}` for an id, the literal segment for a fixed\n// document id. __tests__/doc-schemas-registry.test.ts fails when a collection constant has neither a\n// binding here nor an explicit PENDING_COLLECTIONS entry.\n\nimport type { z } from 'zod';\nimport { StatusReconcileQueueEntrySchema } from './status-reconcile-queue.js';\nimport {\n ActiveAdminNotificationSchema,\n AdminNotificationHistorySchema,\n NotificationArchiveAllJobSchema,\n NotificationDeliverySchema,\n} from './admin-notifications.js';\nimport { AwardDefinitionSchema } from './catalogs.js';\nimport { AwardGroupGrantPersonSchema, AwardGroupGrantSchema } from './award-group-grant.js';\nimport { GameLocationRegistrySchema, GameLocationSchema } from './game-location.js';\nimport { GalleryPictureSchema } from './gallery.js';\nimport { PendingMediaSchema } from './pending-media.js';\nimport { PictureRetirementSchema } from './picture-retirement.js';\nimport { GameRosterPlayerSchema, SportGameSchema } from './sport-game.js';\nimport { SportHallOfFameSchema } from './aggregate-stats.js';\nimport { GameStatHistoryPageSchema } from './game-stat-history.js';\nimport { GameStatEventSchema } from './game-stats.js';\nimport { StatsOperationSchema } from './stats-operation.js';\nimport { LeagueTeamContactSchema, LeagueTeamSchema } from './league-team.js';\nimport { MembershipRosterSyncSchema } from './membership-roster-sync.js';\nimport { MigrationActionRunSchema, MigrationConsoleSchema } from './migration-console.js';\nimport { AuditEventSchema } from './audit-event.js';\nimport { PublicUserSchema } from './publicUser.js';\nimport { RegistrationStartSchema } from './registration-start.js';\nimport { ReservedDisplayNameSchema } from './reserved-display-name.js';\nimport { SportLeagueSchema } from './sport-league.js';\nimport { SweepStateSchema } from './sweep-state.js';\nimport {\n AppConfigSchema,\n LandingPageConfigSchema,\n AdminListSchema,\n StatsBeaconSchema,\n StatsValidationReportSchema,\n} from './system.js';\nimport {\n LeagueFreeAgentSchema,\n TeamJoinRequestSchema,\n TeamInvitationSchema,\n TeamMembershipSchema,\n} from './team-membership.js';\nimport { HistoricalStatsSchema, UserPrivateDataSchema, UserProfileSchema } from './user-profile.js';\nimport { HardwareLoanContractSchema, SignedWaiverSchema } from './waivers-and-hardware.js';\nimport { WaiverTemplateSchema, WaiverTemplateVersionSchema } from './waiver-template.js';\n\nexport const COLLECTION_SCHEMAS = {\n 'userProfiles/{userId}': UserProfileSchema,\n 'userProfiles/{userId}/privateData/{privateDataId}': UserPrivateDataSchema,\n 'userProfiles/{userId}/historicalStats/{sportKey}': HistoricalStatsSchema,\n 'publicUsers/{userId}': PublicUserSchema,\n 'reservedDisplayNames/{reservedDisplayNameKey}': ReservedDisplayNameSchema,\n 'statusReconcileQueue/{userId}': StatusReconcileQueueEntrySchema,\n 'registrationStarts/{userId}': RegistrationStartSchema,\n\n 'sportLeagues/{leagueId}': SportLeagueSchema,\n 'leagueTeams/{teamId}': LeagueTeamSchema,\n 'leagueTeamContacts/{teamId}': LeagueTeamContactSchema,\n 'teamMemberships/{teamMembershipId}': TeamMembershipSchema,\n 'membershipRosterSyncs/{teamMembershipId}': MembershipRosterSyncSchema,\n 'teamInvitations/{inviteId}': TeamInvitationSchema,\n 'teamJoinRequests/{requestId}': TeamJoinRequestSchema,\n 'leagueFreeAgents/{leagueFreeAgentId}': LeagueFreeAgentSchema,\n\n 'sportGames/{gameId}': SportGameSchema,\n 'sportGames/{gameId}/gameRosterPlayers/{gameRosterPlayerId}': GameRosterPlayerSchema,\n 'sportGames/{gameId}/gameStatEvents/{eventId}': GameStatEventSchema,\n 'sportGames/{gameId}/gameStatHistory/{pageId}': GameStatHistoryPageSchema,\n 'gameLocations/{gameLocationId}': GameLocationSchema,\n\n 'waiverTemplates/{waiverTemplateId}': WaiverTemplateSchema,\n 'waiverTemplates/{waiverTemplateId}/waiverTemplateVersions/{versionId}': WaiverTemplateVersionSchema,\n 'signedWaivers/{signedWaiverId}': SignedWaiverSchema,\n 'hardwareLoanContracts/{contractId}': HardwareLoanContractSchema,\n\n 'awardDefinitions/{awardId}': AwardDefinitionSchema,\n 'awardGroupGrants/{grantId}': AwardGroupGrantSchema,\n 'awardGroupGrants/{grantId}/awardGroupGrantPeople/{userId}': AwardGroupGrantPersonSchema,\n 'sportHallOfFame/{sportKey}': SportHallOfFameSchema,\n 'statsValidationReports/{reportId}': StatsValidationReportSchema,\n 'statsOperations/{operationId}': StatsOperationSchema,\n\n 'galleryPictures/{pictureId}': GalleryPictureSchema,\n 'pendingMedia/{pendingMediaId}': PendingMediaSchema,\n 'pictureRetirements/{retirementId}': PictureRetirementSchema,\n\n 'auditEvents/{auditEventId}': AuditEventSchema,\n\n 'activeAdminNotifications/{notificationId}': ActiveAdminNotificationSchema,\n 'adminNotificationHistory/{historyId}': AdminNotificationHistorySchema,\n 'notificationDeliveries/{deliveryId}': NotificationDeliverySchema,\n 'notificationArchiveAllJobs/{jobId}': NotificationArchiveAllJobSchema,\n\n '_appConfig/landingPage': LandingPageConfigSchema,\n '_appConfig/app': AppConfigSchema,\n '_appConfig/statsBeacon': StatsBeaconSchema,\n '_systemData/adminList': AdminListSchema,\n '_serverData/migrationConsole': MigrationConsoleSchema,\n '_serverData/gameLocationRegistry': GameLocationRegistrySchema,\n 'migrationActionRuns/{actionId}': MigrationActionRunSchema,\n 'sweepState/{sweepName}': SweepStateSchema,\n} as const satisfies Record<string, z.ZodTypeAny>;\n\nexport type RegisteredCollectionPath = keyof typeof COLLECTION_SCHEMAS;\n\n// The body field that equals the document id, where a schema declares one. A drift check injects\n// `doc.id` under this key before validating, so a doc-id field is never a false mismatch.\nexport const COLLECTION_DOC_ID_FIELDS = {\n 'publicUsers/{userId}': 'uid',\n 'registrationStarts/{userId}': 'userId',\n 'sportGames/{gameId}/gameStatEvents/{eventId}': 'eventId',\n 'statsValidationReports/{reportId}': 'reportId',\n 'auditEvents/{auditEventId}': 'id',\n 'pendingMedia/{pendingMediaId}': 'id',\n 'adminNotificationHistory/{historyId}': 'archiveOccurrenceId',\n 'notificationDeliveries/{deliveryId}': 'deliveryId',\n 'notificationArchiveAllJobs/{jobId}': 'jobId',\n 'awardGroupGrants/{grantId}': 'grantId',\n 'awardGroupGrants/{grantId}/awardGroupGrantPeople/{userId}': 'userId',\n 'migrationActionRuns/{actionId}': 'actionId',\n} as const satisfies Partial<Record<RegisteredCollectionPath, string>>;\n\n// Collections declared in ../paths with no bound schema yet, each with the reason.\nexport const PENDING_COLLECTIONS: readonly string[] = [];\n"]}
|
|
@@ -63,5 +63,6 @@ export declare const SPECIAL_DOCS: {
|
|
|
63
63
|
readonly STATS_BEACON: "statsBeacon";
|
|
64
64
|
readonly ADMIN_LIST: "adminList";
|
|
65
65
|
readonly MIGRATION_CONSOLE: "migrationConsole";
|
|
66
|
+
readonly GAME_LOCATION_REGISTRY: "gameLocationRegistry";
|
|
66
67
|
};
|
|
67
68
|
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/paths/collections.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFd,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAE5E,iDAAiD;AACjD,eAAO,MAAM,2BAA2B;;;CAM9B,CAAC;AAEX,+CAA+C;AAC/C,eAAO,MAAM,yBAAyB;;;;CAO5B,CAAC;AAEX,8DAA8D;AAC9D,eAAO,MAAM,8BAA8B;;CAGjC,CAAC;AAEX,sDAAsD;AACtD,eAAO,MAAM,gCAAgC;;CAGnC,CAAC;AAEX,kDAAkD;AAClD,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/paths/collections.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFd,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAE5E,iDAAiD;AACjD,eAAO,MAAM,2BAA2B;;;CAM9B,CAAC;AAEX,+CAA+C;AAC/C,eAAO,MAAM,yBAAyB;;;;CAO5B,CAAC;AAEX,8DAA8D;AAC9D,eAAO,MAAM,8BAA8B;;CAGjC,CAAC;AAEX,sDAAsD;AACtD,eAAO,MAAM,gCAAgC;;CAGnC,CAAC;AAEX,kDAAkD;AAClD,eAAO,MAAM,YAAY;;;;;;;CAkBf,CAAC"}
|
|
@@ -122,5 +122,7 @@ export const SPECIAL_DOCS = {
|
|
|
122
122
|
// The migration console: the cutover marker and the lock that keeps two actions from running at
|
|
123
123
|
// once.
|
|
124
124
|
MIGRATION_CONSOLE: 'migrationConsole',
|
|
125
|
+
// The fence every venue creation writes, so two creations at MAX_GAME_LOCATIONS conflict.
|
|
126
|
+
GAME_LOCATION_REGISTRY: 'gameLocationRegistry',
|
|
125
127
|
};
|
|
126
128
|
//# sourceMappingURL=collections.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/paths/collections.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,EAAE;AACF,gGAAgG;AAChG,mGAAmG;AACnG,mGAAmG;AACnG,6FAA6F;AAC7F,6BA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UAAU,EAAE,KAAK;IACjB,YAAY,EAAE,aAAa;IAC3B,mEAAmE;IACnE,YAAY,EAAE,aAAa;IAE3B,+BAA+B;IAC/B,6FAA6F;IAC7F,UAAU,EAAE,WAAW;IAEvB,iCAAiC;IACjC,gGAAgG;IAChG,QAAQ;IACR,iBAAiB,EAAE,kBAAkB;IACrC,0FAA0F;IAC1F,sBAAsB,EAAE,sBAAsB;CACtC,CAAC","sourcesContent":["// Firestore collection, subcollection, and fixed-document name constants for Q-Sports.\n//\n// Every collection value is compound camelCase — it says what the documents are, never a single\n// bare word (guarded by __tests__/collections.test.ts). The three underscore buckets hold fixed-ID\n// system documents and are placed by who reads them; every one of them is callable-only for writes\n// (BACKEND-108). An admin-only document is server-only, read by an admin through a callable:\n// _appConfig public read\n// _systemData signed-in read\n// _serverData no client access\n\nexport const COLLECTIONS = {\n // People\n USER_PROFILES: 'userProfiles',\n PUBLIC_USERS: 'publicUsers',\n // One document per taken display name, keyed by its normalized form — the uniqueness lock.\n RESERVED_DISPLAY_NAMES: 'reservedDisplayNames',\n // One entry per account owed a post-commit Firebase Auth effect, id = the userId: a status\n // change's sign-in half, or a failed role-claim write. Backend-only.\n STATUS_RECONCILE_QUEUE: 'statusReconcileQueue',\n // One document per login whose registration started, id = the userId: the orphan-login cleanup's\n // work list. Backend-only.\n REGISTRATION_STARTS: 'registrationStarts',\n // One document per scheduled pass that keeps a rolling cursor, id = its `SWEEP_STATE_NAMES` name.\n // Backend-only.\n SWEEP_STATE: 'sweepState',\n\n // Leagues, teams, membership\n SPORT_LEAGUES: 'sportLeagues',\n LEAGUE_TEAMS: 'leagueTeams',\n // One admin-only document per team, id = the team id: how the league reaches the team. The team\n // itself is publicly readable, so no contact detail lives on it (BACKEND-105); a league's contacts\n // are one query on `leagueId`.\n LEAGUE_TEAM_CONTACTS: 'leagueTeamContacts',\n TEAM_MEMBERSHIPS: 'teamMemberships',\n TEAM_INVITATIONS: 'teamInvitations',\n TEAM_JOIN_REQUESTS: 'teamJoinRequests',\n LEAGUE_FREE_AGENTS: 'leagueFreeAgents',\n // One document per team membership, id = the membership's id: the durable obligation to bring\n // that membership's open game rosters in line with it. Backend-only.\n MEMBERSHIP_ROSTER_SYNCS: 'membershipRosterSyncs',\n\n // Games\n SPORT_GAMES: 'sportGames',\n GAME_LOCATIONS: 'gameLocations',\n\n // Waivers and hardware\n WAIVER_TEMPLATES: 'waiverTemplates',\n SIGNED_WAIVERS: 'signedWaivers',\n HARDWARE_LOAN_CONTRACTS: 'hardwareLoanContracts',\n\n // Awards and derived stats\n AWARD_DEFINITIONS: 'awardDefinitions',\n // One decision on one award for one group — a team, or a whole league — granted or taken back a\n // page of people at a time, id `buildAwardGroupGrantId`. Backend-only.\n AWARD_GROUP_GRANTS: 'awardGroupGrants',\n SPORT_HALL_OF_FAME: 'sportHallOfFame',\n STATS_VALIDATION_REPORTS: 'statsValidationReports',\n // One logical run of a stats action: its status, its resume position, and the hold it places on\n // a game. Admin read; written only by the stats cores.\n STATS_OPERATIONS: 'statsOperations',\n\n // One document per cutover action, id = the action id: where its latest real run stands, its\n // last preview, and what it reported. Admin read; written only by the migration console.\n MIGRATION_ACTION_RUNS: 'migrationActionRuns',\n\n // One document per picture in a league, team, or landing page gallery. Public read; written only\n // by the picture core.\n GALLERY_PICTURES: 'galleryPictures',\n // One accepted picture upload, id = its staging id = the picture id. Read by its uploader and\n // admins; written only by the accept core (the upload callable and the picture carry), the\n // processing trigger, and the maintenance sweep's stale-upload pass; never deleted.\n PENDING_MEDIA: 'pendingMedia',\n // The durable obligation to delete a picture's files, or a deleted owner's whole gallery. No\n // client access; carried out by the media maintenance sweep.\n PICTURE_RETIREMENTS: 'pictureRetirements',\n\n // Append-only record of sensitive actions. No client access; written only by Cloud Functions.\n AUDIT_EVENTS: 'auditEvents',\n\n // Admin notifications, all written only by Cloud Functions. The shared cards every admin reads and\n // their archived history are admin read; the delivery ledger the owning callables write each\n // occurrence into, and each admin's archive-all job, have no client access.\n ACTIVE_ADMIN_NOTIFICATIONS: 'activeAdminNotifications',\n ADMIN_NOTIFICATION_HISTORY: 'adminNotificationHistory',\n NOTIFICATION_DELIVERIES: 'notificationDeliveries',\n NOTIFICATION_ARCHIVE_ALL_JOBS: 'notificationArchiveAllJobs',\n\n // Fixed-ID system document buckets\n APP_CONFIG: '_appConfig',\n SYSTEM_DATA: '_systemData',\n SERVER_DATA: '_serverData',\n} as const;\n\nexport type CollectionName = (typeof COLLECTIONS)[keyof typeof COLLECTIONS];\n\n/** Subcollections of `userProfiles/{userId}`. */\nexport const USER_PROFILE_SUBCOLLECTIONS = {\n // One document per sport key: pre-Q-Sports career totals folded into lifetime recalculation.\n HISTORICAL_STATS: 'historicalStats',\n // One owner-only document, id = the userId: email and contact details. The profile itself is\n // publicly readable, so nothing personal lives on it (BACKEND-105).\n PRIVATE_DATA: 'privateData',\n} as const;\n\n/** Subcollections of `sportGames/{gameId}`. */\nexport const SPORT_GAME_SUBCOLLECTIONS = {\n // Who participated in the game: one entry per team per person, id `buildGameRosterPlayerId`.\n GAME_ROSTER_PLAYERS: 'gameRosterPlayers',\n // One stat event per document, keyed by the event id minted at the tap.\n GAME_STAT_EVENTS: 'gameStatEvents',\n // A completed game's finalized record, in pages, id `buildStatHistoryPageId`.\n GAME_STAT_HISTORY: 'gameStatHistory',\n} as const;\n\n/** Subcollections of `waiverTemplates/{waiverTemplateId}`. */\nexport const WAIVER_TEMPLATE_SUBCOLLECTIONS = {\n // One immutable document per published wording, id `buildWaiverTemplateVersionId(version)`.\n WAIVER_TEMPLATE_VERSIONS: 'waiverTemplateVersions',\n} as const;\n\n/** Subcollections of `awardGroupGrants/{grantId}`. */\nexport const AWARD_GROUP_GRANT_SUBCOLLECTIONS = {\n // One document per person the grant reached, id = the userId, recorded before their profile changed.\n AWARD_GROUP_GRANT_PEOPLE: 'awardGroupGrantPeople',\n} as const;\n\n/** Static document IDs for fixed-ID documents. */\nexport const SPECIAL_DOCS = {\n // _appConfig — public read\n // The app-wide operational levers: version gate, maintenance mode, registration switch, banner.\n APP_CONFIG: 'app',\n LANDING_PAGE: 'landingPage',\n // Public because signed-out spectators follow it for live updates.\n STATS_BEACON: 'statsBeacon',\n\n // _systemData — signed-in read\n // The admin and referee rosters — source of truth for the `admin` / `referee` custom claims.\n ADMIN_LIST: 'adminList',\n\n // _serverData — no client access\n // The migration console: the cutover marker and the lock that keeps two actions from running at\n // once.\n MIGRATION_CONSOLE: 'migrationConsole',\n // The fence every venue creation writes, so two creations at MAX_GAME_LOCATIONS conflict.\n GAME_LOCATION_REGISTRY: 'gameLocationRegistry',\n} as const;\n"]}
|
|
@@ -52,5 +52,6 @@ export declare const PATH_BUILDERS: {
|
|
|
52
52
|
readonly statsBeacon: () => [string, string];
|
|
53
53
|
readonly adminList: () => [string, string];
|
|
54
54
|
readonly migrationConsole: () => [string, string];
|
|
55
|
+
readonly gameLocationRegistry: () => [string, string];
|
|
55
56
|
};
|
|
56
57
|
//# sourceMappingURL=path-builders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-builders.d.ts","sourceRoot":"","sources":["../../src/paths/path-builders.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAQrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGnD,eAAO,MAAM,aAAa;mCAEF,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;uCACrB,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;sCAM1C,MAAM,YAAY,QAAQ,KAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;uCAM5D,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;kCAKtC,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;iDACV,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;yCACj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MAAM,CAAC;2CAI7B,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;4CACxB,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;yCAE5B,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;4CACtB,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;+CAEtB,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;wCAKhC,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;uDAGV,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;wDAIxB,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;gDAIjC,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;gDACzB,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAC;sCAGrC,CAAC,MAAM,EAAE,MAAM,CAAC;8BACxB,CAAC,MAAM,EAAE,MAAM,CAAC;gCACd,CAAC,MAAM,EAAE,MAAM,CAAC;8BAClB,CAAC,MAAM,EAAE,MAAM,CAAC;qCACT,CAAC,MAAM,EAAE,MAAM,CAAC;yCACZ,CAAC,MAAM,EAAE,MAAM,CAAC;CAClC,CAAC"}
|
|
@@ -162,5 +162,6 @@ export const PATH_BUILDERS = {
|
|
|
162
162
|
statsBeacon: () => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.STATS_BEACON],
|
|
163
163
|
adminList: () => [COLLECTIONS.SYSTEM_DATA, SPECIAL_DOCS.ADMIN_LIST],
|
|
164
164
|
migrationConsole: () => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.MIGRATION_CONSOLE],
|
|
165
|
+
gameLocationRegistry: () => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.GAME_LOCATION_REGISTRY],
|
|
165
166
|
};
|
|
166
167
|
//# sourceMappingURL=path-builders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-builders.js","sourceRoot":"","sources":["../../src/paths/path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Y,CAAC,UAAU,CAAC;IACrF,gBAAgB,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,iBAAiB,CAAC;CAC3F,CAAC","sourcesContent":["// Document path builders — segment tuples, the one path family.\n//\n// Frontend: doc(db, ...PATH_BUILDERS.userProfile(userId))\n// Backend: db.doc(toPath(PATH_BUILDERS.userProfile(userId)))\n//\n// A singular name builds a document path; its plural builds the parent collection path where the\n// parent is a subcollection (top-level collections are in COLLECTION_REFS). A compound document ID\n// is assembled here through its one builder in ../ids — never at a call site.\n\nimport {\n AWARD_GROUP_GRANT_SUBCOLLECTIONS,\n COLLECTIONS,\n SPORT_GAME_SUBCOLLECTIONS,\n SPECIAL_DOCS,\n USER_PROFILE_SUBCOLLECTIONS,\n WAIVER_TEMPLATE_SUBCOLLECTIONS,\n} from './collections.js';\nimport type { SweepStateName } from '../constants/scheduled-jobs.js';\nimport {\n buildGameRosterPlayerId,\n buildLeagueFreeAgentId,\n buildTeamMembershipId,\n buildSignedWaiverId,\n} from '../ids/compound-ids.js';\nimport { buildWaiverTemplateVersionId } from '../ids/waiver-template-ids.js';\nimport type { SportKey } from '../types/sports.js';\nimport { toReservedDisplayNameKey } from '../utils/display-name.js';\n\nexport const PATH_BUILDERS = {\n // People\n userProfile: (userId: string): [string, string] => [COLLECTIONS.USER_PROFILES, userId],\n userPrivateData: (userId: string): [string, string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.PRIVATE_DATA,\n userId,\n ],\n historicalStat: (userId: string, sportKey: SportKey): [string, string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.HISTORICAL_STATS,\n sportKey,\n ],\n historicalStats: (userId: string): [string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.HISTORICAL_STATS,\n ],\n publicUser: (userId: string): [string, string] => [COLLECTIONS.PUBLIC_USERS, userId],\n statusReconcileQueueEntry: (userId: string): [string, string] => [COLLECTIONS.STATUS_RECONCILE_QUEUE, userId],\n registrationStart: (userId: string): [string, string] => [COLLECTIONS.REGISTRATION_STARTS, userId],\n sweepState: (name: SweepStateName): [string, string] => [COLLECTIONS.SWEEP_STATE, name],\n reservedDisplayName: (displayName: string): [string, string] => [\n COLLECTIONS.RESERVED_DISPLAY_NAMES,\n toReservedDisplayNameKey(displayName),\n ],\n\n // Leagues, teams, membership\n sportLeague: (leagueId: string): [string, string] => [COLLECTIONS.SPORT_LEAGUES, leagueId],\n leagueTeam: (teamId: string): [string, string] => [COLLECTIONS.LEAGUE_TEAMS, teamId],\n leagueTeamContact: (teamId: string): [string, string] => [COLLECTIONS.LEAGUE_TEAM_CONTACTS, teamId],\n teamMembership: (leagueId: string, teamId: string, userId: string): [string, string] => [\n COLLECTIONS.TEAM_MEMBERSHIPS,\n buildTeamMembershipId(leagueId, teamId, userId),\n ],\n membershipRosterSync: (leagueId: string, teamId: string, userId: string): [string, string] => [\n COLLECTIONS.MEMBERSHIP_ROSTER_SYNCS,\n buildTeamMembershipId(leagueId, teamId, userId),\n ],\n teamInvitation: (inviteId: string): [string, string] => [COLLECTIONS.TEAM_INVITATIONS, inviteId],\n teamJoinRequest: (requestId: string): [string, string] => [COLLECTIONS.TEAM_JOIN_REQUESTS, requestId],\n leagueFreeAgent: (leagueId: string, userId: string): [string, string] => [\n COLLECTIONS.LEAGUE_FREE_AGENTS,\n buildLeagueFreeAgentId(leagueId, userId),\n ],\n\n // Games\n sportGame: (gameId: string): [string, string] => [COLLECTIONS.SPORT_GAMES, gameId],\n gameRosterPlayer: (gameId: string, teamId: string, userId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_ROSTER_PLAYERS,\n buildGameRosterPlayerId(teamId, userId),\n ],\n gameRosterPlayers: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_ROSTER_PLAYERS,\n ],\n gameStatEvent: (gameId: string, eventId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_EVENTS,\n eventId,\n ],\n gameStatEvents: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_EVENTS,\n ],\n gameStatHistoryPage: (gameId: string, pageId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_HISTORY,\n pageId,\n ],\n gameStatHistory: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_HISTORY,\n ],\n gameLocation: (gameLocationId: string): [string, string] => [COLLECTIONS.GAME_LOCATIONS, gameLocationId],\n\n // Waivers and hardware\n waiverTemplate: (waiverTemplateId: string): [string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n ],\n waiverTemplateVersion: (waiverTemplateId: string, version: number): [string, string, string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n WAIVER_TEMPLATE_SUBCOLLECTIONS.WAIVER_TEMPLATE_VERSIONS,\n buildWaiverTemplateVersionId(version),\n ],\n waiverTemplateVersions: (waiverTemplateId: string): [string, string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n WAIVER_TEMPLATE_SUBCOLLECTIONS.WAIVER_TEMPLATE_VERSIONS,\n ],\n signedWaiver: (leagueId: string, userId: string): [string, string] => [\n COLLECTIONS.SIGNED_WAIVERS,\n buildSignedWaiverId(leagueId, userId),\n ],\n hardwareLoanContract: (contractId: string): [string, string] => [\n COLLECTIONS.HARDWARE_LOAN_CONTRACTS,\n contractId,\n ],\n\n // Awards and derived stats\n awardDefinition: (awardId: string): [string, string] => [COLLECTIONS.AWARD_DEFINITIONS, awardId],\n awardGroupGrant: (grantId: string): [string, string] => [COLLECTIONS.AWARD_GROUP_GRANTS, grantId],\n awardGroupGrantPerson: (grantId: string, userId: string): [string, string, string, string] => [\n COLLECTIONS.AWARD_GROUP_GRANTS,\n grantId,\n AWARD_GROUP_GRANT_SUBCOLLECTIONS.AWARD_GROUP_GRANT_PEOPLE,\n userId,\n ],\n awardGroupGrantPeople: (grantId: string): [string, string, string] => [\n COLLECTIONS.AWARD_GROUP_GRANTS,\n grantId,\n AWARD_GROUP_GRANT_SUBCOLLECTIONS.AWARD_GROUP_GRANT_PEOPLE,\n ],\n sportHallOfFame: (sportKey: SportKey): [string, string] => [COLLECTIONS.SPORT_HALL_OF_FAME, sportKey],\n statsValidationReport: (reportId: string): [string, string] => [\n COLLECTIONS.STATS_VALIDATION_REPORTS,\n reportId,\n ],\n statsOperation: (operationId: string): [string, string] => [COLLECTIONS.STATS_OPERATIONS, operationId],\n migrationActionRun: (actionId: string): [string, string] => [COLLECTIONS.MIGRATION_ACTION_RUNS, actionId],\n\n galleryPicture: (pictureId: string): [string, string] => [COLLECTIONS.GALLERY_PICTURES, pictureId],\n pendingMedia: (pendingMediaId: string): [string, string] => [COLLECTIONS.PENDING_MEDIA, pendingMediaId],\n // A picture's retirement is keyed by the picture id; a whole gallery's by `buildGalleryRetirementId`.\n pictureRetirement: (retirementId: string): [string, string] => [\n COLLECTIONS.PICTURE_RETIREMENTS,\n retirementId,\n ],\n\n auditEvent: (auditEventId: string): [string, string] => [COLLECTIONS.AUDIT_EVENTS, auditEventId],\n\n // Admin notifications. A card's id is notification-core's; the others come from ../ids.\n activeAdminNotification: (notificationId: string): [string, string] => [\n COLLECTIONS.ACTIVE_ADMIN_NOTIFICATIONS,\n notificationId,\n ],\n adminNotificationHistoryEntry: (historyId: string): [string, string] => [\n COLLECTIONS.ADMIN_NOTIFICATION_HISTORY,\n historyId,\n ],\n notificationDelivery: (deliveryId: string): [string, string] => [COLLECTIONS.NOTIFICATION_DELIVERIES, deliveryId],\n notificationArchiveAllJob: (jobId: string): [string, string] => [COLLECTIONS.NOTIFICATION_ARCHIVE_ALL_JOBS, jobId],\n\n // Fixed-ID system documents\n landingPageConfig: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.LANDING_PAGE],\n appConfig: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.APP_CONFIG],\n statsBeacon: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.STATS_BEACON],\n adminList: (): [string, string] => [COLLECTIONS.SYSTEM_DATA, SPECIAL_DOCS.ADMIN_LIST],\n migrationConsole: (): [string, string] => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.MIGRATION_CONSOLE],\n} as const;\n"]}
|
|
1
|
+
{"version":3,"file":"path-builders.js","sourceRoot":"","sources":["../../src/paths/path-builders.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,EAAE;AACF,0DAA0D;AAC1D,8DAA8D;AAC9D,EAAE;AACF,iGAAiG;AACjG,mGAAmG;AACnG,8EAA8E;AAE9E,OAAO,EACL,gCAAgC,EAChC,WAAW,EACX,yBAAyB,EACzB,YAAY,EACZ,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAE7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS;IACT,WAAW,EAAE,CAAC,MAAc,EAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC;IACtF,eAAe,EAAE,CAAC,MAAc,EAAoC,EAA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AW,CAAC,0BAA0B;QACtC,SAAS;KACV;IACD,oBAAoB,EAAE,CAAC,UAAkB,EAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,uBAAuB,EAAE,UAAU,CAAC;IACjH,yBAAyB,EAAE,CAAC,KAAa,EAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,6BAA6B,EAAE,KAAK,CAAC;IAElH,4BAA4B;IAC5B,iBAAiB,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC;IAC9F,SAAS,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,UAAU,CAAC;IACpF,WAAW,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC;IACxF,SAAS,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,UAAU,CAAC;IACrF,gBAAgB,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,iBAAiB,CAAC;IACnG,oBAAoB,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,sBAAsB,CAAC;CACpG,CAAC","sourcesContent":["// Document path builders — segment tuples, the one path family.\n//\n// Frontend: doc(db, ...PATH_BUILDERS.userProfile(userId))\n// Backend: db.doc(toPath(PATH_BUILDERS.userProfile(userId)))\n//\n// A singular name builds a document path; its plural builds the parent collection path where the\n// parent is a subcollection (top-level collections are in COLLECTION_REFS). A compound document ID\n// is assembled here through its one builder in ../ids — never at a call site.\n\nimport {\n AWARD_GROUP_GRANT_SUBCOLLECTIONS,\n COLLECTIONS,\n SPORT_GAME_SUBCOLLECTIONS,\n SPECIAL_DOCS,\n USER_PROFILE_SUBCOLLECTIONS,\n WAIVER_TEMPLATE_SUBCOLLECTIONS,\n} from './collections.js';\nimport type { SweepStateName } from '../constants/scheduled-jobs.js';\nimport {\n buildGameRosterPlayerId,\n buildLeagueFreeAgentId,\n buildTeamMembershipId,\n buildSignedWaiverId,\n} from '../ids/compound-ids.js';\nimport { buildWaiverTemplateVersionId } from '../ids/waiver-template-ids.js';\nimport type { SportKey } from '../types/sports.js';\nimport { toReservedDisplayNameKey } from '../utils/display-name.js';\n\nexport const PATH_BUILDERS = {\n // People\n userProfile: (userId: string): [string, string] => [COLLECTIONS.USER_PROFILES, userId],\n userPrivateData: (userId: string): [string, string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.PRIVATE_DATA,\n userId,\n ],\n historicalStat: (userId: string, sportKey: SportKey): [string, string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.HISTORICAL_STATS,\n sportKey,\n ],\n historicalStats: (userId: string): [string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.HISTORICAL_STATS,\n ],\n publicUser: (userId: string): [string, string] => [COLLECTIONS.PUBLIC_USERS, userId],\n statusReconcileQueueEntry: (userId: string): [string, string] => [COLLECTIONS.STATUS_RECONCILE_QUEUE, userId],\n registrationStart: (userId: string): [string, string] => [COLLECTIONS.REGISTRATION_STARTS, userId],\n sweepState: (name: SweepStateName): [string, string] => [COLLECTIONS.SWEEP_STATE, name],\n reservedDisplayName: (displayName: string): [string, string] => [\n COLLECTIONS.RESERVED_DISPLAY_NAMES,\n toReservedDisplayNameKey(displayName),\n ],\n\n // Leagues, teams, membership\n sportLeague: (leagueId: string): [string, string] => [COLLECTIONS.SPORT_LEAGUES, leagueId],\n leagueTeam: (teamId: string): [string, string] => [COLLECTIONS.LEAGUE_TEAMS, teamId],\n leagueTeamContact: (teamId: string): [string, string] => [COLLECTIONS.LEAGUE_TEAM_CONTACTS, teamId],\n teamMembership: (leagueId: string, teamId: string, userId: string): [string, string] => [\n COLLECTIONS.TEAM_MEMBERSHIPS,\n buildTeamMembershipId(leagueId, teamId, userId),\n ],\n membershipRosterSync: (leagueId: string, teamId: string, userId: string): [string, string] => [\n COLLECTIONS.MEMBERSHIP_ROSTER_SYNCS,\n buildTeamMembershipId(leagueId, teamId, userId),\n ],\n teamInvitation: (inviteId: string): [string, string] => [COLLECTIONS.TEAM_INVITATIONS, inviteId],\n teamJoinRequest: (requestId: string): [string, string] => [COLLECTIONS.TEAM_JOIN_REQUESTS, requestId],\n leagueFreeAgent: (leagueId: string, userId: string): [string, string] => [\n COLLECTIONS.LEAGUE_FREE_AGENTS,\n buildLeagueFreeAgentId(leagueId, userId),\n ],\n\n // Games\n sportGame: (gameId: string): [string, string] => [COLLECTIONS.SPORT_GAMES, gameId],\n gameRosterPlayer: (gameId: string, teamId: string, userId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_ROSTER_PLAYERS,\n buildGameRosterPlayerId(teamId, userId),\n ],\n gameRosterPlayers: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_ROSTER_PLAYERS,\n ],\n gameStatEvent: (gameId: string, eventId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_EVENTS,\n eventId,\n ],\n gameStatEvents: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_EVENTS,\n ],\n gameStatHistoryPage: (gameId: string, pageId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_HISTORY,\n pageId,\n ],\n gameStatHistory: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_HISTORY,\n ],\n gameLocation: (gameLocationId: string): [string, string] => [COLLECTIONS.GAME_LOCATIONS, gameLocationId],\n\n // Waivers and hardware\n waiverTemplate: (waiverTemplateId: string): [string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n ],\n waiverTemplateVersion: (waiverTemplateId: string, version: number): [string, string, string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n WAIVER_TEMPLATE_SUBCOLLECTIONS.WAIVER_TEMPLATE_VERSIONS,\n buildWaiverTemplateVersionId(version),\n ],\n waiverTemplateVersions: (waiverTemplateId: string): [string, string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n WAIVER_TEMPLATE_SUBCOLLECTIONS.WAIVER_TEMPLATE_VERSIONS,\n ],\n signedWaiver: (leagueId: string, userId: string): [string, string] => [\n COLLECTIONS.SIGNED_WAIVERS,\n buildSignedWaiverId(leagueId, userId),\n ],\n hardwareLoanContract: (contractId: string): [string, string] => [\n COLLECTIONS.HARDWARE_LOAN_CONTRACTS,\n contractId,\n ],\n\n // Awards and derived stats\n awardDefinition: (awardId: string): [string, string] => [COLLECTIONS.AWARD_DEFINITIONS, awardId],\n awardGroupGrant: (grantId: string): [string, string] => [COLLECTIONS.AWARD_GROUP_GRANTS, grantId],\n awardGroupGrantPerson: (grantId: string, userId: string): [string, string, string, string] => [\n COLLECTIONS.AWARD_GROUP_GRANTS,\n grantId,\n AWARD_GROUP_GRANT_SUBCOLLECTIONS.AWARD_GROUP_GRANT_PEOPLE,\n userId,\n ],\n awardGroupGrantPeople: (grantId: string): [string, string, string] => [\n COLLECTIONS.AWARD_GROUP_GRANTS,\n grantId,\n AWARD_GROUP_GRANT_SUBCOLLECTIONS.AWARD_GROUP_GRANT_PEOPLE,\n ],\n sportHallOfFame: (sportKey: SportKey): [string, string] => [COLLECTIONS.SPORT_HALL_OF_FAME, sportKey],\n statsValidationReport: (reportId: string): [string, string] => [\n COLLECTIONS.STATS_VALIDATION_REPORTS,\n reportId,\n ],\n statsOperation: (operationId: string): [string, string] => [COLLECTIONS.STATS_OPERATIONS, operationId],\n migrationActionRun: (actionId: string): [string, string] => [COLLECTIONS.MIGRATION_ACTION_RUNS, actionId],\n\n galleryPicture: (pictureId: string): [string, string] => [COLLECTIONS.GALLERY_PICTURES, pictureId],\n pendingMedia: (pendingMediaId: string): [string, string] => [COLLECTIONS.PENDING_MEDIA, pendingMediaId],\n // A picture's retirement is keyed by the picture id; a whole gallery's by `buildGalleryRetirementId`.\n pictureRetirement: (retirementId: string): [string, string] => [\n COLLECTIONS.PICTURE_RETIREMENTS,\n retirementId,\n ],\n\n auditEvent: (auditEventId: string): [string, string] => [COLLECTIONS.AUDIT_EVENTS, auditEventId],\n\n // Admin notifications. A card's id is notification-core's; the others come from ../ids.\n activeAdminNotification: (notificationId: string): [string, string] => [\n COLLECTIONS.ACTIVE_ADMIN_NOTIFICATIONS,\n notificationId,\n ],\n adminNotificationHistoryEntry: (historyId: string): [string, string] => [\n COLLECTIONS.ADMIN_NOTIFICATION_HISTORY,\n historyId,\n ],\n notificationDelivery: (deliveryId: string): [string, string] => [COLLECTIONS.NOTIFICATION_DELIVERIES, deliveryId],\n notificationArchiveAllJob: (jobId: string): [string, string] => [COLLECTIONS.NOTIFICATION_ARCHIVE_ALL_JOBS, jobId],\n\n // Fixed-ID system documents\n landingPageConfig: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.LANDING_PAGE],\n appConfig: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.APP_CONFIG],\n statsBeacon: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.STATS_BEACON],\n adminList: (): [string, string] => [COLLECTIONS.SYSTEM_DATA, SPECIAL_DOCS.ADMIN_LIST],\n migrationConsole: (): [string, string] => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.MIGRATION_CONSOLE],\n gameLocationRegistry: (): [string, string] => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.GAME_LOCATION_REGISTRY],\n} as const;\n"]}
|
package/dist/types/unions.d.ts
CHANGED
|
@@ -91,6 +91,8 @@ export declare const WAIVER_WITNESS_AUTHORITY_KEYS: readonly ["captain", "coCapt
|
|
|
91
91
|
export type WaiverWitnessAuthority = (typeof WAIVER_WITNESS_AUTHORITY_KEYS)[number];
|
|
92
92
|
export declare const WAIVER_SIGNING_REFUSAL_KEYS: readonly ["waiverChanged"];
|
|
93
93
|
export type WaiverSigningRefusal = (typeof WAIVER_SIGNING_REFUSAL_KEYS)[number];
|
|
94
|
+
export declare const WAIVER_TEMPLATE_EDIT_REFUSAL_KEYS: readonly ["templateVersionChanged"];
|
|
95
|
+
export type WaiverTemplateEditRefusal = (typeof WAIVER_TEMPLATE_EDIT_REFUSAL_KEYS)[number];
|
|
94
96
|
export declare const TEAM_ICON_KEYS: readonly ["Shield", "Swords", "Skull", "Ghost", "Cat", "Dog", "Bird", "Fish", "Rabbit", "Snail", "Turtle", "Cherry", "Apple", "Grape", "Rocket", "Plane", "Ship", "Train", "Car", "Bike", "Bolt", "Star", "Sun", "Moon", "Cloud", "Crown", "Diamond", "Gem", "Anchor", "TreePine", "Trees", "TreeDeciduous", "TreePalm", "Snowflake", "MountainSnow", "Gift", "PartyPopper", "CandyCane", "Candy", "Lollipop", "Cake", "Egg", "Clover", "Heart", "Flower", "Flower2", "Rose", "Leaf", "Sprout", "Wheat", "Sunrise", "Rainbow", "Bell", "Trophy", "Medal", "Award", "Ribbon", "Flag", "Target", "Crosshair", "Goal", "Dumbbell", "Footprints", "Zap", "Flame", "FlameKindling", "Bomb", "Atom", "Orbit", "Sparkles", "WandSparkles", "Mountain", "Tornado", "Wind", "Droplet", "CloudLightning", "MoonStar", "Sword", "Axe", "Hammer", "Pickaxe", "ShieldHalf", "Castle", "Squirrel", "Rat", "Panda", "Shrimp", "Worm", "Bug", "Shell", "PawPrint", "Feather", "Bone", "Origami", "Citrus", "Banana", "Carrot", "Pizza", "Cookie", "Donut", "Coffee", "Dices", "Puzzle", "Gamepad2", "Spade", "Club", "Music", "Guitar", "Hexagon", "Triangle", "Sailboat", "Tractor", "Truck"];
|
|
95
97
|
export type TeamIcon = (typeof TEAM_ICON_KEYS)[number];
|
|
96
98
|
export declare const PICTURE_VARIANT_KEYS: readonly ["sm", "md", "lg"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unions.d.ts","sourceRoot":"","sources":["../../src/types/unions.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,+BAAgC,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAG3D,eAAO,MAAM,gBAAgB,+BAAgC,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3D,+CAA+C;AAC/C,eAAO,MAAM,kBAAkB,WAAgC,CAAC;AAChE,qFAAqF;AACrF,eAAO,MAAM,kBAAkB,WAAgC,CAAC;AAMhE,eAAO,MAAM,mCAAmC,0CAA2C,CAAC;AAC5F,MAAM,MAAM,8BAA8B,GAAG,CAAC,OAAO,mCAAmC,CAAC,CAAC,MAAM,CAAC,CAAC;AAClG,eAAO,MAAM,0BAA0B,iBAAoE,CAAC;AAC5G,eAAO,MAAM,kBAAkB,cAAiE,CAAC;AAEjG,eAAO,MAAM,cAAc,6CAA8C,CAAC;AAC1E,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAIvD,eAAO,MAAM,kBAAkB,mCAAkE,CAAC;AAIlG,eAAO,MAAM,iBAAiB,WAAwC,CAAC;AAIvE,eAAO,MAAM,oBAAoB,aAA0C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,UAAuC,CAAC;AAKrE,eAAO,MAAM,4BAA4B,kCAAkF,CAAC;AAC5H,MA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AA2B,4WAG9B,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/types/unions.js
CHANGED
|
@@ -155,6 +155,10 @@ export const WAIVER_WITNESS_AUTHORITY_KEYS = ['captain', 'coCaptain', 'admin', '
|
|
|
155
155
|
// when the wording the signer saw — the template id and version the dialog sent — is no longer the
|
|
156
156
|
// league's, so the dialog loads the current wording to read again.
|
|
157
157
|
export const WAIVER_SIGNING_REFUSAL_KEYS = ['waiverChanged'];
|
|
158
|
+
// Why a waiver-template publication was refused, named in its details so the editor answers it:
|
|
159
|
+
// `templateVersionChanged` when the version the editor loaded is no longer the template's current
|
|
160
|
+
// one, so the editor keeps the admin's draft and shows the newer wording before publishing again.
|
|
161
|
+
export const WAIVER_TEMPLATE_EDIT_REFUSAL_KEYS = ['templateVersionChanged'];
|
|
158
162
|
// The icon a team picks at creation; the persisted value is the icon component's name.
|
|
159
163
|
export const TEAM_ICON_KEYS = [
|
|
160
164
|
'Shield',
|
package/dist/types/unions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unions.js","sourceRoot":"","sources":["../../src/types/unions.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,gGAAgG;AAChG,UAAU;AAEV,kGAAkG;AAClG,qEAAqE;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC;AAG9D,kGAAkG;AAClG,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAE9D,+CAA+C;AAC/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAA6B,CAAC;AAChE,qFAAqF;AACrF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAA6B,CAAC;AAEhE,sFAAsF;AACtF,mGAAmG;AACnG,qGAAqG;AACrG,eAAe;AACf,MAAM,CAAC,MAAM,mCAAm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ARCH-102): an `as const` key array with the type derived from it. Zod enums,\n// type positions, query filters, and option lists all derive from these arrays — never a quoted\n// member.\n\n// The two global roles. Each is a roster on `_systemData/adminList` and a boolean custom claim of\n// the same name; the roster is the authority, the claim a fast hint.\nexport const SYSTEM_ROLE_KEYS = ['admin', 'referee'] as const;\nexport type SystemRole = (typeof SYSTEM_ROLE_KEYS)[number];\n\n// Account status on the private profile. Only an exact `active` passes the server auth assertion.\nexport const USER_STATUS_KEYS = ['active', 'banned'] as const;\nexport type UserStatus = (typeof USER_STATUS_KEYS)[number];\n/** The one status that lets an account act. */\nexport const ACTIVE_USER_STATUS = 'active' satisfies UserStatus;\n/** The status an admin's ban sets: the account keeps its data and cannot sign in. */\nexport const BANNED_USER_STATUS = 'banned' satisfies UserStatus;\n\n// Which post-commit Auth effect queued an account on `statusReconcileQueue/{userId}`:\n// `accountStatus` — a status change's disabled flag, status claim, and token revocation, queued in\n// the status transaction itself; `roleClaims` — the `admin` / `referee` claims after a failed roster\n// claim write.\nexport const STATUS_RECONCILE_QUEUE_AUTH_EFFECTS = ['accountStatus', 'roleClaims'] as const;\nexport type StatusReconcileQueueAuthEffect = (typeof STATUS_RECONCILE_QUEUE_AUTH_EFFECTS)[number];\nexport const ACCOUNT_STATUS_AUTH_EFFECT = 'accountStatus' as const satisfies StatusReconcileQueueAuthEffect;\nexport const ROLE_CLAIMS_EFFECT = 'roleClaims' as const satisfies StatusReconcileQueueAuthEffect;\n\nexport const TEAM_ROLE_KEYS = ['captain', 'coCaptain', 'player'] as const;\nexport type TeamRole = (typeof TEAM_ROLE_KEYS)[number];\n\n// The roles that carry captain authority. `firestore.rules` restates this list, because a rules file\n// cannot import it.\nexport const CAPTAIN_TEAM_ROLES = ['captain', 'coCaptain'] as const satisfies readonly TeamRole[];\n\n// The one role a team holds at most one of: team creation, the admin captain change, and ghost\n// linking write it, and nothing else does.\nexport const TEAM_CAPTAIN_ROLE = 'captain' as const satisfies TeamRole;\n\n// The two roles below the captain. A co-captain holds every captain power except managing\n// co-captains; a player holds none.\nexport const TEAM_CO_CAPTAIN_ROLE = 'coCaptain' as const satisfies TeamRole;\nexport const TEAM_PLAYER_ROLE = 'player' as const satisfies TeamRole;\n\n// The roles a member's role change moves a membership between — promoting a player to co-captain,\n// or demoting a co-captain to player. The captain's role moves only through the admin's captain\n// change, so it is never one of them.\nexport const MEMBER_ASSIGNABLE_TEAM_ROLES = [TEAM_CO_CAPTAIN_ROLE, TEAM_PLAYER_ROLE] as const satisfies readonly TeamRole[];\nexport type MemberAssignableTeamRole = (typeof MEMBER_ASSIGNABLE_TEAM_ROLES)[number];\n\n// A ghost link that merges a ghost's membership into the account's keeps one membership with the\n// higher of the two roles: `TEAM_ROLE_KEYS` runs from the highest role down.\nexport function higherTeamRole(left: TeamRole, right: TeamRole): TeamRole {\n return TEAM_ROLE_KEYS.indexOf(left) <= TEAM_ROLE_KEYS.indexOf(right) ? left : right;\n}\n\nexport const TEAM_MEMBERSHIP_STATUS_KEYS = ['active'] as const;\nexport type TeamMembershipStatus = (typeof TEAM_MEMBERSHIP_STATUS_KEYS)[number];\n\n// The status a membership grants authority in. Every membership-based check reads it with the role\n// (BACKEND-006), so a status added later grants nothing until a check names it.\nexport const ACTIVE_TEAM_MEMBERSHIP_STATUS = 'active' as const satisfies TeamMembershipStatus;\n\n// How a membership came to exist; absent on a membership whose provenance was never recorded.\nexport const TEAM_JOIN_METHOD_KEYS = [\n 'teamCreation',\n 'invite',\n 'joinRequest',\n 'freeAgent',\n 'ghostAdd',\n] as const;\nexport type TeamJoinMethod = (typeof TEAM_JOIN_METHOD_KEYS)[number];\n\nexport const LEAGUE_STATUS_KEYS = ['pending', 'upcoming', 'active', 'closed'] as const;\nexport type LeagueStatus = (typeof LEAGUE_STATUS_KEYS)[number];\n\n// Every league is created unpublished; the admin moves it forward from here.\nexport const LEAGUE_STATUS_ON_CREATE = 'pending' as const satisfies LeagueStatus;\n\n// A finished season. Its settings stay editable; its status and mode never change again.\nexport const CLOSED_LEAGUE_STATUS = 'closed' as const satisfies LeagueStatus;\n\n// The two published statuses before a league closes: its teams are forming, then it is in play.\nexport const UPCOMING_LEAGUE_STATUS = 'upcoming' as const satisfies LeagueStatus;\nexport const ACTIVE_LEAGUE_STATUS = 'active' as const satisfies LeagueStatus;\n\n// The statuses a league may move to from each status. Movement is forward only, and `closed` is\n// final; the status callable refuses any other move.\nexport const LEAGUE_STATUS_TRANSITIONS: Readonly<Record<LeagueStatus, readonly LeagueStatus[]>> = {\n pending: ['upcoming', 'closed'],\n upcoming: ['active', 'closed'],\n active: ['closed'],\n closed: [],\n};\n\n// Every status but closed: a league still being set up, published, or played. Whatever such a\n// league is configured with — its waiver template among them — is still in use.\nexport const OPEN_LEAGUE_STATUS_KEYS: readonly Exclude<LeagueStatus, typeof CLOSED_LEAGUE_STATUS>[] =\n LEAGUE_STATUS_KEYS.filter(\n (status): status is Exclude<LeagueStatus, typeof CLOSED_LEAGUE_STATUS> => status !== CLOSED_LEAGUE_STATUS,\n );\n\n// A league players are part of now or next: published and not yet closed. The admin dashboard's\n// active free-agent count covers only these leagues.\nexport const CURRENT_LEAGUE_STATUS_KEYS = [\n UPCOMING_LEAGUE_STATUS,\n ACTIVE_LEAGUE_STATUS,\n] as const satisfies readonly LeagueStatus[];\n\nexport const LEAGUE_MODE_KEYS = ['Regular', 'Competitive/Recreational'] as const;\nexport type LeagueMode = (typeof LEAGUE_MODE_KEYS)[number];\n\n// Present only on teams in a Competitive/Recreational league. In any other mode a team has no type:\n// the field is absent, never null.\nexport const TEAM_TYPE_KEYS = ['Competitive', 'Recreational'] as const;\nexport type TeamType = (typeof TEAM_TYPE_KEYS)[number];\n\n// The one mode whose teams each carry a `teamType`.\nexport const TEAM_TYPED_LEAGUE_MODE = 'Competitive/Recreational' as const satisfies LeagueMode;\n\n// The type every team takes when its league switches into `TEAM_TYPED_LEAGUE_MODE`.\nexport const TEAM_TYPE_ON_MODE_SWITCH = 'Recreational' as const satisfies TeamType;\n\nexport const GAME_STATUS_KEYS = ['scheduled', 'inprogress', 'completed'] as const;\nexport type GameStatus = (typeof GAME_STATUS_KEYS)[number];\n\n// The one status a finished game holds: it was played, and its stats count. Every reader asking\n// whether a game was played compares against this rather than naming a status of its own.\nexport const COMPLETED_GAME_STATUS = 'completed' as const satisfies GameStatus;\n\n// The status a newly scheduled game is created in.\nexport const GAME_STATUS_ON_CREATE = 'scheduled' as const satisfies GameStatus;\n\n// The status reopen returns a finalized game to: open for scoring again, its record of who played\n// kept.\nexport const GAME_STATUS_ON_REOPEN = 'inprogress' as const satisfies GameStatus;\n\n// An invitation is pending until the invitee accepts (`approved`) or declines (`rejected`) it, or the\n// team withdraws it (`cancelled`). A membership on its team made any other way closes it `approved`.\nexport const TEAM_INVITATION_STATUS_KEYS = ['pending', 'approved', 'rejected', 'cancelled'] as const;\nexport type TeamInvitationStatus = (typeof TEAM_INVITATION_STATUS_KEYS)[number];\n\nexport const PENDING_TEAM_INVITATION_STATUS = 'pending' as const satisfies TeamInvitationStatus;\nexport const APPROVED_TEAM_INVITATION_STATUS = 'approved' as const satisfies TeamInvitationStatus;\nexport const REJECTED_TEAM_INVITATION_STATUS = 'rejected' as const satisfies TeamInvitationStatus;\nexport const CANCELLED_TEAM_INVITATION_STATUS = 'cancelled' as const satisfies TeamInvitationStatus;\n\n// A join request is pending until the team's leaders accept (`approved`) or reject (`rejected`) it,\n// or the requester withdraws it (`cancelled`). A membership on its team made any other way closes it\n// `approved`.\nexport const TEAM_JOIN_REQUEST_STATUS_KEYS = ['pending', 'approved', 'rejected', 'cancelled'] as const;\nexport type TeamJoinRequestStatus = (typeof TEAM_JOIN_REQUEST_STATUS_KEYS)[number];\n\nexport const PENDING_TEAM_JOIN_REQUEST_STATUS = 'pending' as const satisfies TeamJoinRequestStatus;\nexport const APPROVED_TEAM_JOIN_REQUEST_STATUS = 'approved' as const satisfies TeamJoinRequestStatus;\nexport const REJECTED_TEAM_JOIN_REQUEST_STATUS = 'rejected' as const satisfies TeamJoinRequestStatus;\nexport const CANCELLED_TEAM_JOIN_REQUEST_STATUS = 'cancelled' as const satisfies TeamJoinRequestStatus;\n\nexport const HARDWARE_LOAN_CONTRACT_STATUS_KEYS = ['pending', 'loaned', 'returned'] as const;\nexport type HardwareLoanContractStatus = (typeof HARDWARE_LOAN_CONTRACT_STATUS_KEYS)[number];\n// Why an award grant passed over an account it named: it has no profile, or it is a ghost, which\n// holds no account.\nexport const AWARD_GRANT_SKIP_REASON_KEYS = ['noProfile', 'ghost'] as const;\nexport type AwardGrantSkipReason = (typeof AWARD_GRANT_SKIP_REASON_KEYS)[number];\n\n// The two badges an account shows beside its name.\nexport const FEATURED_AWARD_SLOT_KEYS = ['primary', 'secondary'] as const;\nexport type FeaturedAwardSlot = (typeof FEATURED_AWARD_SLOT_KEYS)[number];\n\n// The groups an award is granted to all at once: every active member of a team, or of a league.\nexport const AWARD_GROUP_TYPE_KEYS = ['team', 'league'] as const;\nexport type AwardGroupType = (typeof AWARD_GROUP_TYPE_KEYS)[number];\n\n// A decision on one award for one group: grant it to the group's people, or take back what the\n// group's grants gave.\nexport const AWARD_GROUP_GRANT_ACTION_KEYS = ['grant', 'revoke'] as const;\nexport type AwardGroupGrantAction = (typeof AWARD_GROUP_GRANT_ACTION_KEYS)[number];\n\n// A decision is `pending` until every page of it is done, then `complete`.\nexport const AWARD_GROUP_GRANT_STATUS_KEYS = ['pending', 'complete'] as const;\nexport type AwardGroupGrantStatus = (typeof AWARD_GROUP_GRANT_STATUS_KEYS)[number];\n\n// Why taking a group's award back left one person holding it: they held it before the grant reached\n// them, or another group's grant still holds it for them.\nexport const AWARD_GROUP_REVOKE_SKIP_KEYS = ['heldBefore', 'heldByAnotherGrant'] as const;\nexport type AwardGroupRevokeSkip = (typeof AWARD_GROUP_REVOKE_SKIP_KEYS)[number];\n\nexport const PENDING_HARDWARE_LOAN_CONTRACT_STATUS = 'pending' as const satisfies HardwareLoanContractStatus;\nexport const LOANED_HARDWARE_LOAN_CONTRACT_STATUS = 'loaned' as const satisfies HardwareLoanContractStatus;\nexport const RETURNED_HARDWARE_LOAN_CONTRACT_STATUS = 'returned' as const satisfies HardwareLoanContractStatus;\n\n// What deleting a waiver template did. A template nothing names is deleted with its versions; one a\n// signature or a closed league still names is retired — kept for them, offered to no new league.\nexport const WAIVER_TEMPLATE_DELETE_OUTCOME_KEYS = ['deleted', 'retired'] as const;\nexport type WaiverTemplateDeleteOutcome = (typeof WAIVER_TEMPLATE_DELETE_OUTCOME_KEYS)[number];\n\n// What last changed the stats, as announced on the stats beacon; `link` is a ghost link moving a\n// game's lines onto an account.\nexport const STATS_BEACON_ACTION_KEYS = ['finalize', 'reopen', 'recalculate', 'correct', 'historical-update', 'link'] as const;\nexport type StatsBeaconAction = (typeof STATS_BEACON_ACTION_KEYS)[number];\n\n// The actions that describe one game, so a beacon announcing one names the game, its league, and its\n// teams; every other action names no game, and a game id left beside it would point at a stale one.\nexport const GAME_SCOPED_STATS_BEACON_ACTION_KEYS = ['finalize', 'reopen'] as const satisfies readonly StatsBeaconAction[];\nexport type GameScopedStatsBeaconAction = (typeof GAME_SCOPED_STATS_BEACON_ACTION_KEYS)[number];\n\n// The statuses a game's roster still follows its teams' memberships in: listed explicitly, so a\n// status added later is closed until it is named here, never open by default.\nexport const OPEN_GAME_STATUS_KEYS = ['scheduled', 'inprogress'] as const satisfies readonly GameStatus[];\nexport type OpenGameStatus = (typeof OPEN_GAME_STATUS_KEYS)[number];\n\n// Whether a game is still open — not yet finalized — so a scorer may still change it. Both app roots\n// ask this one predicate.\nexport function isOpenGameStatus(status: GameStatus): status is OpenGameStatus {\n return (OPEN_GAME_STATUS_KEYS as readonly GameStatus[]).includes(status);\n}\n\n// Where one membership's roster obligation stands. `pending` waits for the reconciliation worker;\n// `failed` has spent its retries and waits for an admin's retry; `reconciled` owes nothing.\nexport const MEMBERSHIP_ROSTER_SYNC_STATUS_KEYS = ['pending', 'reconciled', 'failed'] as const;\nexport type MembershipRosterSyncStatus = (typeof MEMBERSHIP_ROSTER_SYNC_STATUS_KEYS)[number];\nexport const PENDING_ROSTER_SYNC_STATUS = 'pending' as const satisfies MembershipRosterSyncStatus;\nexport const RECONCILED_ROSTER_SYNC_STATUS = 'reconciled' as const satisfies MembershipRosterSyncStatus;\nexport const FAILED_ROSTER_SYNC_STATUS = 'failed' as const satisfies MembershipRosterSyncStatus;\n\n// The authority a ghost's waiver was signed under: the witness's captaincy on the ghost's team, or\n// the global role the admin entry confirmed.\nexport const WAIVER_WITNESS_AUTHORITY_KEYS = ['captain', 'coCaptain', 'admin', 'referee'] as const;\nexport type WaiverWitnessAuthority = (typeof WAIVER_WITNESS_AUTHORITY_KEYS)[number];\n\n// Why a signing was refused, named in its details so the signing dialog answers it: `waiverChanged`\n// when the wording the signer saw — the template id and version the dialog sent — is no longer the\n// league's, so the dialog loads the current wording to read again.\nexport const WAIVER_SIGNING_REFUSAL_KEYS = ['waiverChanged'] as const;\nexport type WaiverSigningRefusal = (typeof WAIVER_SIGNING_REFUSAL_KEYS)[number];\n\n// The icon a team picks at creation; the persisted value is the icon component's name.\nexport const TEAM_ICON_KEYS = [\n 'Shield',\n 'Swords',\n 'Skull',\n 'Ghost',\n 'Cat',\n 'Dog',\n 'Bird',\n 'Fish',\n 'Rabbit',\n 'Snail',\n 'Turtle',\n 'Cherry',\n 'Apple',\n 'Grape',\n 'Rocket',\n 'Plane',\n 'Ship',\n 'Train',\n 'Car',\n 'Bike',\n 'Bolt',\n 'Star',\n 'Sun',\n 'Moon',\n 'Cloud',\n 'Crown',\n 'Diamond',\n 'Gem',\n 'Anchor',\n // Appended — the set only grows, and no stored key is ever renamed or removed. Seasonal and events.\n 'TreePine',\n 'Trees',\n 'TreeDeciduous',\n 'TreePalm',\n 'Snowflake',\n 'MountainSnow',\n 'Gift',\n 'PartyPopper',\n 'CandyCane',\n 'Candy',\n 'Lollipop',\n 'Cake',\n 'Egg',\n 'Clover',\n 'Heart',\n 'Flower',\n 'Flower2',\n 'Rose',\n 'Leaf',\n 'Sprout',\n 'Wheat',\n 'Sunrise',\n 'Rainbow',\n 'Bell',\n // Awards and sport.\n 'Trophy',\n 'Medal',\n 'Award',\n 'Ribbon',\n 'Flag',\n 'Target',\n 'Crosshair',\n 'Goal',\n 'Dumbbell',\n 'Footprints',\n // Power and the elements.\n 'Zap',\n 'Flame',\n 'FlameKindling',\n 'Bomb',\n 'Atom',\n 'Orbit',\n 'Sparkles',\n 'WandSparkles',\n 'Mountain',\n 'Tornado',\n 'Wind',\n 'Droplet',\n 'CloudLightning',\n 'MoonStar',\n // Arms and strongholds.\n 'Sword',\n 'Axe',\n 'Hammer',\n 'Pickaxe',\n 'ShieldHalf',\n 'Castle',\n // Animals.\n 'Squirrel',\n 'Rat',\n 'Panda',\n 'Shrimp',\n 'Worm',\n 'Bug',\n 'Shell',\n 'PawPrint',\n 'Feather',\n 'Bone',\n 'Origami',\n // Food.\n 'Citrus',\n 'Banana',\n 'Carrot',\n 'Pizza',\n 'Cookie',\n 'Donut',\n 'Coffee',\n // Games and music.\n 'Dices',\n 'Puzzle',\n 'Gamepad2',\n 'Spade',\n 'Club',\n 'Music',\n 'Guitar',\n 'Hexagon',\n 'Triangle',\n // Travel.\n 'Sailboat',\n 'Tractor',\n 'Truck',\n] as const;\nexport type TeamIcon = (typeof TEAM_ICON_KEYS)[number];\n\n// A picture's processed sizes, smallest first: every picture kind declares all three, and a display\n// asks for the smallest one that covers its slot.\nexport const PICTURE_VARIANT_KEYS = ['sm', 'md', 'lg'] as const;\nexport type PictureVariantKey = (typeof PICTURE_VARIANT_KEYS)[number];\n\n// What a stats check found, game tier first — a game's own numbers are the cause of the aggregate\n// findings, so Fix stats repairs games before it rebuilds what they feed.\nexport const GAME_TIER_DISCREPANCY_KIND_KEYS = [\n // A game whose document the check could not read: nothing else about it could be checked.\n 'gameUnreadable',\n 'invalidEvent',\n 'eventSequenceMismatch',\n // A game whose events do not hold exactly the sequences 1..n: a gap or a duplicate.\n 'eventSequenceGap',\n 'rollupMismatch',\n 'scoreMirrorMismatch',\n 'unrosteredStatLine',\n 'fantasyPointsStale',\n 'finalRecordMissing',\n 'finalRecordMismatch',\n 'participationSnapshotMismatch',\n 'gameHeld',\n] as const;\nexport const AGGREGATE_TIER_DISCREPANCY_KIND_KEYS = [\n 'aggregateMismatch',\n 'aggregateEntryStale',\n 'aggregateEntryMissing',\n 'hallOfFameLifetimeMismatch',\n] as const;\nexport const STATS_DISCREPANCY_KIND_KEYS = [\n ...GAME_TIER_DISCREPANCY_KIND_KEYS,\n ...AGGREGATE_TIER_DISCREPANCY_KIND_KEYS,\n] as const;\nexport type StatsDiscrepancyKind = (typeof STATS_DISCREPANCY_KIND_KEYS)[number];\n"]}
|
|
1
|
+
{"version":3,"file":"unions.js","sourceRoot":"","sources":["../../src/types/unions.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,gGAAgG;AAChG,UAAU;AAEV,kGAAkG;AAClG,qEAAqE;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC;AAG9D,kGAAkG;AAClG,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAE9D,+CAA+C;AAC/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAA6B,CAAC;AAChE,qFAAqF;AACrF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAA6B,CAAC;AAEhE,sFAAsF;AACtF,mGAAmG;AACnG,qGAAqG;AACrG,eAAe;AACf,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,eAAe,EAAE,YAAY,CAAU,CAAC;AAE5F,MAAM,CAAC,MAAM,0BAA0B,GAAG,eAAiE,CAAC;AAC5G,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAA8D,CAAC;AAEjG,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAG1E,qGAAqG;AACrG,oBAAoB;AACpB,MAAM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ACP,KAAK;IACL,QAAQ;IACR,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,WAAW;IACX,UAAU;IACV,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,KAAK;IACL,OAAO;IACP,UAAU;IACV,SAAS;IACT,MAAM;IACN,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,mBAAmB;IACnB,OAAO;IACP,QAAQ;IACR,UAAU;IACV,OAAO;IACP,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,UAAU;IACV,UAAU;IACV,SAAS;IACT,OAAO;CACC,CAAC;AAGX,oGAAoG;AACpG,kDAAkD;AAClD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAGhE,kGAAkG;AAClG,0EAA0E;AAC1E,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,0FAA0F;IAC1F,gBAAgB;IAChB,cAAc;IACd,uBAAuB;IACvB,oFAAoF;IACpF,kBAAkB;IAClB,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,qBAAqB;IACrB,+BAA+B;IAC/B,UAAU;CACF,CAAC;AACX,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,mBAAmB;IACnB,qBAAqB;IACrB,uBAAuB;IACvB,4BAA4B;CACpB,CAAC;AACX,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,GAAG,+BAA+B;IAClC,GAAG,oCAAoC;CAC/B,CAAC","sourcesContent":["// Canonical unions (ARCH-102): an `as const` key array with the type derived from it. Zod enums,\n// type positions, query filters, and option lists all derive from these arrays — never a quoted\n// member.\n\n// The two global roles. Each is a roster on `_systemData/adminList` and a boolean custom claim of\n// the same name; the roster is the authority, the claim a fast hint.\nexport const SYSTEM_ROLE_KEYS = ['admin', 'referee'] as const;\nexport type SystemRole = (typeof SYSTEM_ROLE_KEYS)[number];\n\n// Account status on the private profile. Only an exact `active` passes the server auth assertion.\nexport const USER_STATUS_KEYS = ['active', 'banned'] as const;\nexport type UserStatus = (typeof USER_STATUS_KEYS)[number];\n/** The one status that lets an account act. */\nexport const ACTIVE_USER_STATUS = 'active' satisfies UserStatus;\n/** The status an admin's ban sets: the account keeps its data and cannot sign in. */\nexport const BANNED_USER_STATUS = 'banned' satisfies UserStatus;\n\n// Which post-commit Auth effect queued an account on `statusReconcileQueue/{userId}`:\n// `accountStatus` — a status change's disabled flag, status claim, and token revocation, queued in\n// the status transaction itself; `roleClaims` — the `admin` / `referee` claims after a failed roster\n// claim write.\nexport const STATUS_RECONCILE_QUEUE_AUTH_EFFECTS = ['accountStatus', 'roleClaims'] as const;\nexport type StatusReconcileQueueAuthEffect = (typeof STATUS_RECONCILE_QUEUE_AUTH_EFFECTS)[number];\nexport const ACCOUNT_STATUS_AUTH_EFFECT = 'accountStatus' as const satisfies StatusReconcileQueueAuthEffect;\nexport const ROLE_CLAIMS_EFFECT = 'roleClaims' as const satisfies StatusReconcileQueueAuthEffect;\n\nexport const TEAM_ROLE_KEYS = ['captain', 'coCaptain', 'player'] as const;\nexport type TeamRole = (typeof TEAM_ROLE_KEYS)[number];\n\n// The roles that carry captain authority. `firestore.rules` restates this list, because a rules file\n// cannot import it.\nexport const CAPTAIN_TEAM_ROLES = ['captain', 'coCaptain'] as const satisfies readonly TeamRole[];\n\n// The one role a team holds at most one of: team creation, the admin captain change, and ghost\n// linking write it, and nothing else does.\nexport const TEAM_CAPTAIN_ROLE = 'captain' as const satisfies TeamRole;\n\n// The two roles below the captain. A co-captain holds every captain power except managing\n// co-captains; a player holds none.\nexport const TEAM_CO_CAPTAIN_ROLE = 'coCaptain' as const satisfies TeamRole;\nexport const TEAM_PLAYER_ROLE = 'player' as const satisfies TeamRole;\n\n// The roles a member's role change moves a membership between — promoting a player to co-captain,\n// or demoting a co-captain to player. The captain's role moves only through the admin's captain\n// change, so it is never one of them.\nexport const MEMBER_ASSIGNABLE_TEAM_ROLES = [TEAM_CO_CAPTAIN_ROLE, TEAM_PLAYER_ROLE] as const satisfies readonly TeamRole[];\nexport type MemberAssignableTeamRole = (typeof MEMBER_ASSIGNABLE_TEAM_ROLES)[number];\n\n// A ghost link that merges a ghost's membership into the account's keeps one membership with the\n// higher of the two roles: `TEAM_ROLE_KEYS` runs from the highest role down.\nexport function higherTeamRole(left: TeamRole, right: TeamRole): TeamRole {\n return TEAM_ROLE_KEYS.indexOf(left) <= TEAM_ROLE_KEYS.indexOf(right) ? left : right;\n}\n\nexport const TEAM_MEMBERSHIP_STATUS_KEYS = ['active'] as const;\nexport type TeamMembershipStatus = (typeof TEAM_MEMBERSHIP_STATUS_KEYS)[number];\n\n// The status a membership grants authority in. Every membership-based check reads it with the role\n// (BACKEND-006), so a status added later grants nothing until a check names it.\nexport const ACTIVE_TEAM_MEMBERSHIP_STATUS = 'active' as const satisfies TeamMembershipStatus;\n\n// How a membership came to exist; absent on a membership whose provenance was never recorded.\nexport const TEAM_JOIN_METHOD_KEYS = [\n 'teamCreation',\n 'invite',\n 'joinRequest',\n 'freeAgent',\n 'ghostAdd',\n] as const;\nexport type TeamJoinMethod = (typeof TEAM_JOIN_METHOD_KEYS)[number];\n\nexport const LEAGUE_STATUS_KEYS = ['pending', 'upcoming', 'active', 'closed'] as const;\nexport type LeagueStatus = (typeof LEAGUE_STATUS_KEYS)[number];\n\n// Every league is created unpublished; the admin moves it forward from here.\nexport const LEAGUE_STATUS_ON_CREATE = 'pending' as const satisfies LeagueStatus;\n\n// A finished season. Its settings stay editable; its status and mode never change again.\nexport const CLOSED_LEAGUE_STATUS = 'closed' as const satisfies LeagueStatus;\n\n// The two published statuses before a league closes: its teams are forming, then it is in play.\nexport const UPCOMING_LEAGUE_STATUS = 'upcoming' as const satisfies LeagueStatus;\nexport const ACTIVE_LEAGUE_STATUS = 'active' as const satisfies LeagueStatus;\n\n// The statuses a league may move to from each status. Movement is forward only, and `closed` is\n// final; the status callable refuses any other move.\nexport const LEAGUE_STATUS_TRANSITIONS: Readonly<Record<LeagueStatus, readonly LeagueStatus[]>> = {\n pending: ['upcoming', 'closed'],\n upcoming: ['active', 'closed'],\n active: ['closed'],\n closed: [],\n};\n\n// Every status but closed: a league still being set up, published, or played. Whatever such a\n// league is configured with — its waiver template among them — is still in use.\nexport const OPEN_LEAGUE_STATUS_KEYS: readonly Exclude<LeagueStatus, typeof CLOSED_LEAGUE_STATUS>[] =\n LEAGUE_STATUS_KEYS.filter(\n (status): status is Exclude<LeagueStatus, typeof CLOSED_LEAGUE_STATUS> => status !== CLOSED_LEAGUE_STATUS,\n );\n\n// A league players are part of now or next: published and not yet closed. The admin dashboard's\n// active free-agent count covers only these leagues.\nexport const CURRENT_LEAGUE_STATUS_KEYS = [\n UPCOMING_LEAGUE_STATUS,\n ACTIVE_LEAGUE_STATUS,\n] as const satisfies readonly LeagueStatus[];\n\nexport const LEAGUE_MODE_KEYS = ['Regular', 'Competitive/Recreational'] as const;\nexport type LeagueMode = (typeof LEAGUE_MODE_KEYS)[number];\n\n// Present only on teams in a Competitive/Recreational league. In any other mode a team has no type:\n// the field is absent, never null.\nexport const TEAM_TYPE_KEYS = ['Competitive', 'Recreational'] as const;\nexport type TeamType = (typeof TEAM_TYPE_KEYS)[number];\n\n// The one mode whose teams each carry a `teamType`.\nexport const TEAM_TYPED_LEAGUE_MODE = 'Competitive/Recreational' as const satisfies LeagueMode;\n\n// The type every team takes when its league switches into `TEAM_TYPED_LEAGUE_MODE`.\nexport const TEAM_TYPE_ON_MODE_SWITCH = 'Recreational' as const satisfies TeamType;\n\nexport const GAME_STATUS_KEYS = ['scheduled', 'inprogress', 'completed'] as const;\nexport type GameStatus = (typeof GAME_STATUS_KEYS)[number];\n\n// The one status a finished game holds: it was played, and its stats count. Every reader asking\n// whether a game was played compares against this rather than naming a status of its own.\nexport const COMPLETED_GAME_STATUS = 'completed' as const satisfies GameStatus;\n\n// The status a newly scheduled game is created in.\nexport const GAME_STATUS_ON_CREATE = 'scheduled' as const satisfies GameStatus;\n\n// The status reopen returns a finalized game to: open for scoring again, its record of who played\n// kept.\nexport const GAME_STATUS_ON_REOPEN = 'inprogress' as const satisfies GameStatus;\n\n// An invitation is pending until the invitee accepts (`approved`) or declines (`rejected`) it, or the\n// team withdraws it (`cancelled`). A membership on its team made any other way closes it `approved`.\nexport const TEAM_INVITATION_STATUS_KEYS = ['pending', 'approved', 'rejected', 'cancelled'] as const;\nexport type TeamInvitationStatus = (typeof TEAM_INVITATION_STATUS_KEYS)[number];\n\nexport const PENDING_TEAM_INVITATION_STATUS = 'pending' as const satisfies TeamInvitationStatus;\nexport const APPROVED_TEAM_INVITATION_STATUS = 'approved' as const satisfies TeamInvitationStatus;\nexport const REJECTED_TEAM_INVITATION_STATUS = 'rejected' as const satisfies TeamInvitationStatus;\nexport const CANCELLED_TEAM_INVITATION_STATUS = 'cancelled' as const satisfies TeamInvitationStatus;\n\n// A join request is pending until the team's leaders accept (`approved`) or reject (`rejected`) it,\n// or the requester withdraws it (`cancelled`). A membership on its team made any other way closes it\n// `approved`.\nexport const TEAM_JOIN_REQUEST_STATUS_KEYS = ['pending', 'approved', 'rejected', 'cancelled'] as const;\nexport type TeamJoinRequestStatus = (typeof TEAM_JOIN_REQUEST_STATUS_KEYS)[number];\n\nexport const PENDING_TEAM_JOIN_REQUEST_STATUS = 'pending' as const satisfies TeamJoinRequestStatus;\nexport const APPROVED_TEAM_JOIN_REQUEST_STATUS = 'approved' as const satisfies TeamJoinRequestStatus;\nexport const REJECTED_TEAM_JOIN_REQUEST_STATUS = 'rejected' as const satisfies TeamJoinRequestStatus;\nexport const CANCELLED_TEAM_JOIN_REQUEST_STATUS = 'cancelled' as const satisfies TeamJoinRequestStatus;\n\nexport const HARDWARE_LOAN_CONTRACT_STATUS_KEYS = ['pending', 'loaned', 'returned'] as const;\nexport type HardwareLoanContractStatus = (typeof HARDWARE_LOAN_CONTRACT_STATUS_KEYS)[number];\n// Why an award grant passed over an account it named: it has no profile, or it is a ghost, which\n// holds no account.\nexport const AWARD_GRANT_SKIP_REASON_KEYS = ['noProfile', 'ghost'] as const;\nexport type AwardGrantSkipReason = (typeof AWARD_GRANT_SKIP_REASON_KEYS)[number];\n\n// The two badges an account shows beside its name.\nexport const FEATURED_AWARD_SLOT_KEYS = ['primary', 'secondary'] as const;\nexport type FeaturedAwardSlot = (typeof FEATURED_AWARD_SLOT_KEYS)[number];\n\n// The groups an award is granted to all at once: every active member of a team, or of a league.\nexport const AWARD_GROUP_TYPE_KEYS = ['team', 'league'] as const;\nexport type AwardGroupType = (typeof AWARD_GROUP_TYPE_KEYS)[number];\n\n// A decision on one award for one group: grant it to the group's people, or take back what the\n// group's grants gave.\nexport const AWARD_GROUP_GRANT_ACTION_KEYS = ['grant', 'revoke'] as const;\nexport type AwardGroupGrantAction = (typeof AWARD_GROUP_GRANT_ACTION_KEYS)[number];\n\n// A decision is `pending` until every page of it is done, then `complete`.\nexport const AWARD_GROUP_GRANT_STATUS_KEYS = ['pending', 'complete'] as const;\nexport type AwardGroupGrantStatus = (typeof AWARD_GROUP_GRANT_STATUS_KEYS)[number];\n\n// Why taking a group's award back left one person holding it: they held it before the grant reached\n// them, or another group's grant still holds it for them.\nexport const AWARD_GROUP_REVOKE_SKIP_KEYS = ['heldBefore', 'heldByAnotherGrant'] as const;\nexport type AwardGroupRevokeSkip = (typeof AWARD_GROUP_REVOKE_SKIP_KEYS)[number];\n\nexport const PENDING_HARDWARE_LOAN_CONTRACT_STATUS = 'pending' as const satisfies HardwareLoanContractStatus;\nexport const LOANED_HARDWARE_LOAN_CONTRACT_STATUS = 'loaned' as const satisfies HardwareLoanContractStatus;\nexport const RETURNED_HARDWARE_LOAN_CONTRACT_STATUS = 'returned' as const satisfies HardwareLoanContractStatus;\n\n// What deleting a waiver template did. A template nothing names is deleted with its versions; one a\n// signature or a closed league still names is retired — kept for them, offered to no new league.\nexport const WAIVER_TEMPLATE_DELETE_OUTCOME_KEYS = ['deleted', 'retired'] as const;\nexport type WaiverTemplateDeleteOutcome = (typeof WAIVER_TEMPLATE_DELETE_OUTCOME_KEYS)[number];\n\n// What last changed the stats, as announced on the stats beacon; `link` is a ghost link moving a\n// game's lines onto an account.\nexport const STATS_BEACON_ACTION_KEYS = ['finalize', 'reopen', 'recalculate', 'correct', 'historical-update', 'link'] as const;\nexport type StatsBeaconAction = (typeof STATS_BEACON_ACTION_KEYS)[number];\n\n// The actions that describe one game, so a beacon announcing one names the game, its league, and its\n// teams; every other action names no game, and a game id left beside it would point at a stale one.\nexport const GAME_SCOPED_STATS_BEACON_ACTION_KEYS = ['finalize', 'reopen'] as const satisfies readonly StatsBeaconAction[];\nexport type GameScopedStatsBeaconAction = (typeof GAME_SCOPED_STATS_BEACON_ACTION_KEYS)[number];\n\n// The statuses a game's roster still follows its teams' memberships in: listed explicitly, so a\n// status added later is closed until it is named here, never open by default.\nexport const OPEN_GAME_STATUS_KEYS = ['scheduled', 'inprogress'] as const satisfies readonly GameStatus[];\nexport type OpenGameStatus = (typeof OPEN_GAME_STATUS_KEYS)[number];\n\n// Whether a game is still open — not yet finalized — so a scorer may still change it. Both app roots\n// ask this one predicate.\nexport function isOpenGameStatus(status: GameStatus): status is OpenGameStatus {\n return (OPEN_GAME_STATUS_KEYS as readonly GameStatus[]).includes(status);\n}\n\n// Where one membership's roster obligation stands. `pending` waits for the reconciliation worker;\n// `failed` has spent its retries and waits for an admin's retry; `reconciled` owes nothing.\nexport const MEMBERSHIP_ROSTER_SYNC_STATUS_KEYS = ['pending', 'reconciled', 'failed'] as const;\nexport type MembershipRosterSyncStatus = (typeof MEMBERSHIP_ROSTER_SYNC_STATUS_KEYS)[number];\nexport const PENDING_ROSTER_SYNC_STATUS = 'pending' as const satisfies MembershipRosterSyncStatus;\nexport const RECONCILED_ROSTER_SYNC_STATUS = 'reconciled' as const satisfies MembershipRosterSyncStatus;\nexport const FAILED_ROSTER_SYNC_STATUS = 'failed' as const satisfies MembershipRosterSyncStatus;\n\n// The authority a ghost's waiver was signed under: the witness's captaincy on the ghost's team, or\n// the global role the admin entry confirmed.\nexport const WAIVER_WITNESS_AUTHORITY_KEYS = ['captain', 'coCaptain', 'admin', 'referee'] as const;\nexport type WaiverWitnessAuthority = (typeof WAIVER_WITNESS_AUTHORITY_KEYS)[number];\n\n// Why a signing was refused, named in its details so the signing dialog answers it: `waiverChanged`\n// when the wording the signer saw — the template id and version the dialog sent — is no longer the\n// league's, so the dialog loads the current wording to read again.\nexport const WAIVER_SIGNING_REFUSAL_KEYS = ['waiverChanged'] as const;\nexport type WaiverSigningRefusal = (typeof WAIVER_SIGNING_REFUSAL_KEYS)[number];\n\n// Why a waiver-template publication was refused, named in its details so the editor answers it:\n// `templateVersionChanged` when the version the editor loaded is no longer the template's current\n// one, so the editor keeps the admin's draft and shows the newer wording before publishing again.\nexport const WAIVER_TEMPLATE_EDIT_REFUSAL_KEYS = ['templateVersionChanged'] as const;\nexport type WaiverTemplateEditRefusal = (typeof WAIVER_TEMPLATE_EDIT_REFUSAL_KEYS)[number];\n\n// The icon a team picks at creation; the persisted value is the icon component's name.\nexport const TEAM_ICON_KEYS = [\n 'Shield',\n 'Swords',\n 'Skull',\n 'Ghost',\n 'Cat',\n 'Dog',\n 'Bird',\n 'Fish',\n 'Rabbit',\n 'Snail',\n 'Turtle',\n 'Cherry',\n 'Apple',\n 'Grape',\n 'Rocket',\n 'Plane',\n 'Ship',\n 'Train',\n 'Car',\n 'Bike',\n 'Bolt',\n 'Star',\n 'Sun',\n 'Moon',\n 'Cloud',\n 'Crown',\n 'Diamond',\n 'Gem',\n 'Anchor',\n // Appended — the set only grows, and no stored key is ever renamed or removed. Seasonal and events.\n 'TreePine',\n 'Trees',\n 'TreeDeciduous',\n 'TreePalm',\n 'Snowflake',\n 'MountainSnow',\n 'Gift',\n 'PartyPopper',\n 'CandyCane',\n 'Candy',\n 'Lollipop',\n 'Cake',\n 'Egg',\n 'Clover',\n 'Heart',\n 'Flower',\n 'Flower2',\n 'Rose',\n 'Leaf',\n 'Sprout',\n 'Wheat',\n 'Sunrise',\n 'Rainbow',\n 'Bell',\n // Awards and sport.\n 'Trophy',\n 'Medal',\n 'Award',\n 'Ribbon',\n 'Flag',\n 'Target',\n 'Crosshair',\n 'Goal',\n 'Dumbbell',\n 'Footprints',\n // Power and the elements.\n 'Zap',\n 'Flame',\n 'FlameKindling',\n 'Bomb',\n 'Atom',\n 'Orbit',\n 'Sparkles',\n 'WandSparkles',\n 'Mountain',\n 'Tornado',\n 'Wind',\n 'Droplet',\n 'CloudLightning',\n 'MoonStar',\n // Arms and strongholds.\n 'Sword',\n 'Axe',\n 'Hammer',\n 'Pickaxe',\n 'ShieldHalf',\n 'Castle',\n // Animals.\n 'Squirrel',\n 'Rat',\n 'Panda',\n 'Shrimp',\n 'Worm',\n 'Bug',\n 'Shell',\n 'PawPrint',\n 'Feather',\n 'Bone',\n 'Origami',\n // Food.\n 'Citrus',\n 'Banana',\n 'Carrot',\n 'Pizza',\n 'Cookie',\n 'Donut',\n 'Coffee',\n // Games and music.\n 'Dices',\n 'Puzzle',\n 'Gamepad2',\n 'Spade',\n 'Club',\n 'Music',\n 'Guitar',\n 'Hexagon',\n 'Triangle',\n // Travel.\n 'Sailboat',\n 'Tractor',\n 'Truck',\n] as const;\nexport type TeamIcon = (typeof TEAM_ICON_KEYS)[number];\n\n// A picture's processed sizes, smallest first: every picture kind declares all three, and a display\n// asks for the smallest one that covers its slot.\nexport const PICTURE_VARIANT_KEYS = ['sm', 'md', 'lg'] as const;\nexport type PictureVariantKey = (typeof PICTURE_VARIANT_KEYS)[number];\n\n// What a stats check found, game tier first — a game's own numbers are the cause of the aggregate\n// findings, so Fix stats repairs games before it rebuilds what they feed.\nexport const GAME_TIER_DISCREPANCY_KIND_KEYS = [\n // A game whose document the check could not read: nothing else about it could be checked.\n 'gameUnreadable',\n 'invalidEvent',\n 'eventSequenceMismatch',\n // A game whose events do not hold exactly the sequences 1..n: a gap or a duplicate.\n 'eventSequenceGap',\n 'rollupMismatch',\n 'scoreMirrorMismatch',\n 'unrosteredStatLine',\n 'fantasyPointsStale',\n 'finalRecordMissing',\n 'finalRecordMismatch',\n 'participationSnapshotMismatch',\n 'gameHeld',\n] as const;\nexport const AGGREGATE_TIER_DISCREPANCY_KIND_KEYS = [\n 'aggregateMismatch',\n 'aggregateEntryStale',\n 'aggregateEntryMissing',\n 'hallOfFameLifetimeMismatch',\n] as const;\nexport const STATS_DISCREPANCY_KIND_KEYS = [\n ...GAME_TIER_DISCREPANCY_KIND_KEYS,\n ...AGGREGATE_TIER_DISCREPANCY_KIND_KEYS,\n] as const;\nexport type StatsDiscrepancyKind = (typeof STATS_DISCREPANCY_KIND_KEYS)[number];\n"]}
|