@ttt-productions/q-core 0.1.12 → 0.1.13

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.
@@ -61,6 +61,8 @@ export declare const MAX_STAT_EVENTS_PER_GAME = 1000;
61
61
  export declare const GAME_STAT_LOG_FULL_MESSAGE: string;
62
62
  export declare const MAX_GAME_LOCATIONS = 30;
63
63
  export declare const GAME_LOCATIONS_FULL_MESSAGE: string;
64
+ export declare const MAX_OFFERED_WAIVER_TEMPLATES = 30;
65
+ export declare const WAIVER_TEMPLATES_FULL_MESSAGE: string;
64
66
  export declare const CAPACITY_LIMITS: readonly [{
65
67
  readonly key: "teamPlayers";
66
68
  readonly label: "Players on a team, ghost players included";
@@ -93,6 +95,10 @@ export declare const CAPACITY_LIMITS: readonly [{
93
95
  readonly key: "gameLocations";
94
96
  readonly label: "Game locations, each venue's courts or sheets counted as part of it";
95
97
  readonly limit: 30;
98
+ }, {
99
+ readonly key: "offeredWaiverTemplates";
100
+ readonly label: "Waiver templates offered to leagues, retired ones not counted";
101
+ readonly limit: 30;
96
102
  }];
97
103
  export type CapacityLimitKey = (typeof CAPACITY_LIMITS)[number]['key'];
98
104
  //# 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,M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G,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC"}
@@ -105,6 +105,11 @@ export const GAME_STAT_LOG_FULL_MESSAGE = countCapReachedMessage('This game', MA
105
105
  // count toward MAX_GAME_LOCATION_SUB_LOCATIONS, never toward this.
106
106
  export const MAX_GAME_LOCATIONS = 30;
107
107
  export const GAME_LOCATIONS_FULL_MESSAGE = countCapReachedMessage('Q-Sports', MAX_GAME_LOCATIONS, 'locations');
108
+ // The waiver templates a league can be given: every template not retired. The offered list and the
109
+ // league form's picker read the whole set, so creating a template is refused at this many; retiring one
110
+ // frees its place. A retired template is kept for what names it and never counts.
111
+ export const MAX_OFFERED_WAIVER_TEMPLATES = 30;
112
+ export const WAIVER_TEMPLATES_FULL_MESSAGE = countCapReachedMessage('Q-Sports', MAX_OFFERED_WAIVER_TEMPLATES, 'waiver templates offered to leagues');
108
113
  // Every capacity limit as an admin reads it, in the order the Limits card lists them. Each value is
109
114
  // the constant the server enforces, so the card and every refusal name the same number.
110
115
  export const CAPACITY_LIMITS = [
@@ -120,5 +125,6 @@ export const CAPACITY_LIMITS = [
120
125
  { key: 'gameStats', label: 'Stats recorded in one game', limit: MAX_STAT_EVENTS_PER_GAME },
121
126
  { key: 'playoffCutoff', label: "Teams reaching the playoffs, at most the league's team limit", limit: MAX_PLAYOFF_CUTOFF },
122
127
  { key: 'gameLocations', label: "Game locations, each venue's courts or sheets counted as part of it", limit: MAX_GAME_LOCATIONS },
128
+ { key: 'offeredWaiverTemplates', label: 'Waiver templates offered to leagues, retired ones not counted', limit: MAX_OFFERED_WAIVER_TEMPLATES },
123
129
  ];
124
130
  //# 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,MAA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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"]}
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,CAAC;AAEF,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B,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC/E,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,2CAA2C,EAAE,KAAK,EAAE,oBAAoB,EAAE;IACvG,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;IAC1H,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,qEAAqE,EAAE,KAAK,EAAE,kBAAkB,EAAE;IACjI,EAAE,GAAG,EAAE,wBAAwB,EAAE,KAAK,EAAE,+DAA+D,EAAE,KAAK,EAAE,4BAA4B,EAAE;CACnE,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// The waiver templates a league can be given: every template not retired. The offered list and the\n// league form's picker read the whole set, so creating a template is refused at this many; retiring one\n// frees its place. A retired template is kept for what names it and never counts.\nexport const MAX_OFFERED_WAIVER_TEMPLATES = 30;\nexport const WAIVER_TEMPLATES_FULL_MESSAGE = countCapReachedMessage(\n 'Q-Sports',\n MAX_OFFERED_WAIVER_TEMPLATES,\n 'waiver templates offered to leagues',\n);\n\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 { key: 'offeredWaiverTemplates', label: 'Waiver templates offered to leagues, retired ones not counted', limit: MAX_OFFERED_WAIVER_TEMPLATES },\n] as const satisfies readonly { key: string; label: string; limit: number }[];\nexport type CapacityLimitKey = (typeof CAPACITY_LIMITS)[number]['key'];\n"]}
@@ -2916,6 +2916,9 @@ export declare const COLLECTION_SCHEMAS: {
2916
2916
  readonly '_serverData/gameLocationRegistry': z.ZodObject<{
2917
2917
  locationRevision: z.ZodNumber;
2918
2918
  }, z.core.$strict>;
2919
+ readonly '_serverData/waiverTemplateRegistry': z.ZodObject<{
2920
+ templateRevision: z.ZodNumber;
2921
+ }, z.core.$strict>;
2919
2922
  readonly 'migrationActionRuns/{actionId}': z.ZodObject<{
2920
2923
  actionId: z.ZodEnum<{
2921
2924
  "copy.userProfiles": "copy.userProfiles";
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6C7B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDkB,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"}
@@ -31,7 +31,7 @@ import { AppConfigSchema, LandingPageConfigSchema, AdminListSchema, StatsBeaconS
31
31
  import { LeagueFreeAgentSchema, TeamJoinRequestSchema, TeamInvitationSchema, TeamMembershipSchema, } from './team-membership.js';
32
32
  import { HistoricalStatsSchema, UserPrivateDataSchema, UserProfileSchema } from './user-profile.js';
33
33
  import { HardwareLoanContractSchema, SignedWaiverSchema } from './waivers-and-hardware.js';
34
- import { WaiverTemplateSchema, WaiverTemplateVersionSchema } from './waiver-template.js';
34
+ import { WaiverTemplateRegistrySchema, WaiverTemplateSchema, WaiverTemplateVersionSchema } from './waiver-template.js';
35
35
  export const COLLECTION_SCHEMAS = {
36
36
  'userProfiles/{userId}': UserProfileSchema,
37
37
  'userProfiles/{userId}/privateData/{privateDataId}': UserPrivateDataSchema,
@@ -77,6 +77,7 @@ export const COLLECTION_SCHEMAS = {
77
77
  '_systemData/adminList': AdminListSchema,
78
78
  '_serverData/migrationConsole': MigrationConsoleSchema,
79
79
  '_serverData/gameLocationRegistry': GameLocationRegistrySchema,
80
+ '_serverData/waiverTemplateRegistry': WaiverTemplateRegistrySchema,
80
81
  'migrationActionRuns/{actionId}': MigrationActionRunSchema,
81
82
  'sweepState/{sweepName}': SweepStateSchema,
82
83
  };
@@ -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,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;A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IACxC,8BAA8B,EAAE,sBAAsB;IACtD,kCAAkC,EAAE,0BAA0B;IAC9D,gCAAgC,EAAE,wBAAwB;IAC1D,wBAAwB,EAAE,gBAAgB;CACK,CAAC;AAIlD,iGAAiG;AACjG,0FAA0F;AAC1F,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,sBAAsB,EAAE,KAAK;IAC7B,6BAA6B,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"]}
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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oB;IACnD,+BAA+B,EAAE,kBAAkB;IACnD,mCAAmC,EAAE,uBAAuB;IAE5D,4BAA4B,EAAE,gBAAgB;IAE9C,2CAA2C,EAAE,6BAA6B;IAC1E,sCAAsC,EAAE,8BAA8B;IACtE,qCAAqC,EAAE,0BAA0B;IACjE,oCAAoC,EAAE,+BAA+B;IAErE,wBAAwB,EAAE,uBAAuB;IACjD,gBAAgB,EAAE,eAAe;IACjC,wBAAwB,EAAE,iBAAiB;IAC3C,uBAAuB,EAAE,eAAe;IACxC,8BAA8B,EAAE,sBAAsB;IACtD,kCAAkC,EAAE,0BAA0B;IAC9D,oCAAoC,EAAE,4BAA4B;IAClE,gCAAgC,EAAE,wBAAwB;IAC1D,wBAAwB,EAAE,gBAAgB;CACK,CAAC;AAIlD,iGAAiG;AACjG,0FAA0F;AAC1F,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,sBAAsB,EAAE,KAAK;IAC7B,6BAA6B,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 { WaiverTemplateRegistrySchema, 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 '_serverData/waiverTemplateRegistry': WaiverTemplateRegistrySchema,\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"]}
@@ -12,6 +12,10 @@ export declare const WaiverTemplateSchema: z.ZodObject<{
12
12
  lastChosenAt: z.ZodOptional<z.ZodNumber>;
13
13
  }, z.core.$strip>;
14
14
  export type WaiverTemplate = z.infer<typeof WaiverTemplateSchema>;
15
+ export declare const WaiverTemplateRegistrySchema: z.ZodObject<{
16
+ templateRevision: z.ZodNumber;
17
+ }, z.core.$strict>;
18
+ export type WaiverTemplateRegistry = z.infer<typeof WaiverTemplateRegistrySchema>;
15
19
  export declare const WaiverTemplateVersionSchema: z.ZodObject<{
16
20
  version: z.ZodNumber;
17
21
  title: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"waiver-template.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,sBAAsB,aAA0B,CAAC;AAC9D,eAAO,MAAM,iCAAiC,aAA0B,CAAC;AAIzE,eAAO,MAAM,oBAAoB;;;;;;;;;iBAuB7B,CAAC;AACL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,eAAO,MAAM,2BAA2B;;;;;;iBAOtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
1
+ {"version":3,"file":"waiver-template.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,sBAAsB,aAA0B,CAAC;AAC9D,eAAO,MAAM,iCAAiC,aAA0B,CAAC;AAIzE,eAAO,MAAM,oBAAoB;;;;;;;;;iBAuB7B,CAAC;AACL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAOlE,eAAO,MAAM,4BAA4B;;kBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAIlF,eAAO,MAAM,2BAA2B;;;;;;iBAOtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -5,7 +5,7 @@
5
5
  // captured still exists however the template has changed since. A signature also keeps its own
6
6
  // copy of what the signer saw (`SignedWaiverSchema`).
7
7
  import { z } from 'zod';
8
- import { documentIdSegmentSchema, epochMsSchema, userIdSchema } from './atoms.js';
8
+ import { countSchema, documentIdSegmentSchema, epochMsSchema, userIdSchema } from './atoms.js';
9
9
  export const waiverTemplateIdSchema = documentIdSegmentSchema;
10
10
  export const waiverTemplateVersionNumberSchema = z.number().int().min(1);
11
11
  // `waiverTemplates/{waiverTemplateId}` — the template as it reads now: its latest published
@@ -34,6 +34,14 @@ export const WaiverTemplateSchema = z
34
34
  message: 'A template is retired exactly when it records when it was retired.',
35
35
  path: ['retired'],
36
36
  });
37
+ // `_serverData/waiverTemplateRegistry` — the fence of the offered-template cap. Template creation counts
38
+ // the templates not retired in its transaction against MAX_OFFERED_WAIVER_TEMPLATES, and a query does
39
+ // not lock against an insert, so each creation advances `templateRevision` here: two creations at the
40
+ // cap conflict instead of both passing (BACKEND-116). Only its changing matters; absent until the first
41
+ // creation.
42
+ export const WaiverTemplateRegistrySchema = z.strictObject({
43
+ templateRevision: countSchema,
44
+ });
37
45
  // `waiverTemplates/{waiverTemplateId}/waiverTemplateVersions/{versionId}` — one published version,
38
46
  // created once and never changed.
39
47
  export const WaiverTemplateVersionSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"waiver-template.js","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,EAAE;AACF,m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AAM,EAAE;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,uDAAuD;IACvD,iBAAiB,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAC","sourcesContent":["// Waiver templates: the wording an admin authors for a league's players to sign.\n//\n// The wording is versioned. Every save that changes it publishes a new version, and each published\n// version is its own immutable document — so the exact wording in force when any signature was\n// captured still exists however the template has changed since. A signature also keeps its own\n// copy of what the signer saw (`SignedWaiverSchema`).\n\nimport { z } from 'zod';\nimport { documentIdSegmentSchema, epochMsSchema, userIdSchema } from './atoms.js';\n\nexport const waiverTemplateIdSchema = documentIdSegmentSchema;\nexport const waiverTemplateVersionNumberSchema = z.number().int().min(1);\n\n// `waiverTemplates/{waiverTemplateId}` — the template as it reads now: its latest published\n// version's wording and number.\nexport const WaiverTemplateSchema = z\n .object({\n title: z.string(),\n waiverText: z.string(),\n version: waiverTemplateVersionNumberSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n // Whether the template is retired, so the templates offered to a league are one query filter\n // (`retired == false`) rather than a download of every template ever kept. True exactly when\n // `retiredAt` is set.\n retired: z.boolean(),\n // Set when an admin deletes a template a signature or a closed league still names, or one with\n // more versions than a delete removes: it is kept for them and offered to no league again. A\n // template nothing names is deleted outright instead.\n retiredAt: epochMsSchema.optional(),\n // When a league last came to require the template. The league save that chooses it writes this in\n // its own transaction so a delete's read of this document conflicts with that save; it is its own\n // field so `updatedAt` keeps meaning the template itself changed.\n lastChosenAt: epochMsSchema.optional(),\n })\n .refine((template) => template.retired === (template.retiredAt !== undefined), {\n message: 'A template is retired exactly when it records when it was retired.',\n path: ['retired'],\n });\nexport type WaiverTemplate = z.infer<typeof WaiverTemplateSchema>;\n\n// `waiverTemplates/{waiverTemplateId}/waiverTemplateVersions/{versionId}` — one published version,\n// created once and never changed.\nexport const WaiverTemplateVersionSchema = z.object({\n version: waiverTemplateVersionNumberSchema,\n title: z.string(),\n waiverText: z.string(),\n // Absent on a version whose author was never recorded.\n publishedByUserId: userIdSchema.optional(),\n publishedAt: epochMsSchema,\n});\nexport type WaiverTemplateVersion = z.infer<typeof WaiverTemplateVersionSchema>;\n"]}
1
+ {"version":3,"file":"waiver-template.js","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,EAAE;AACF,mGAAmG;AACnG,+FAA+F;AAC/F,+FAA+F;AAC/F,sDAAsD;AAEtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/F,MAAM,CAAC,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAC9D,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEzE,4FAA4F;AAC5F,gCAAgC;AAChC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,OAAO,EAAE,iCAAiC;IAC1C,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;IACxB,6FAA6F;IAC7F,6FAA6F;IAC7F,sBAAsB;IACtB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,+FAA+F;IAC/F,6FAA6F;IAC7F,sDAAsD;IACtD,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE;IACnC,kGAAkG;IAClG,kGAAkG;IAClG,kEAAkE;IAClE,YAAY,EAAE,aAAa,CAAC,QAAQ,EAAE;CACvC,CAAC;KACD,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,SAAS,KAAK,SAAS,CAAC,EAAE;IAC7E,OAAO,EAAE,oEAAoE;IAC7E,IAAI,EAAE,CAAC,SAAS,CAAC;CAClB,CAAC,CAAC;AAGL,yGAAyG;AACzG,sGAAsG;AACtG,sGAAsG;AACtG,wGAAwG;AACxG,YAAY;AACZ,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,YAAY,CAAC;IACzD,gBAAgB,EAAE,WAAW;CAC9B,CAAC,CAAC;AAGH,mGAAmG;AACnG,kCAAkC;AAClC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,OAAO,EAAE,iCAAiC;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,uDAAuD;IACvD,iBAAiB,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAC","sourcesContent":["// Waiver templates: the wording an admin authors for a league's players to sign.\n//\n// The wording is versioned. Every save that changes it publishes a new version, and each published\n// version is its own immutable document — so the exact wording in force when any signature was\n// captured still exists however the template has changed since. A signature also keeps its own\n// copy of what the signer saw (`SignedWaiverSchema`).\n\nimport { z } from 'zod';\nimport { countSchema, documentIdSegmentSchema, epochMsSchema, userIdSchema } from './atoms.js';\n\nexport const waiverTemplateIdSchema = documentIdSegmentSchema;\nexport const waiverTemplateVersionNumberSchema = z.number().int().min(1);\n\n// `waiverTemplates/{waiverTemplateId}` — the template as it reads now: its latest published\n// version's wording and number.\nexport const WaiverTemplateSchema = z\n .object({\n title: z.string(),\n waiverText: z.string(),\n version: waiverTemplateVersionNumberSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n // Whether the template is retired, so the templates offered to a league are one query filter\n // (`retired == false`) rather than a download of every template ever kept. True exactly when\n // `retiredAt` is set.\n retired: z.boolean(),\n // Set when an admin deletes a template a signature or a closed league still names, or one with\n // more versions than a delete removes: it is kept for them and offered to no league again. A\n // template nothing names is deleted outright instead.\n retiredAt: epochMsSchema.optional(),\n // When a league last came to require the template. The league save that chooses it writes this in\n // its own transaction so a delete's read of this document conflicts with that save; it is its own\n // field so `updatedAt` keeps meaning the template itself changed.\n lastChosenAt: epochMsSchema.optional(),\n })\n .refine((template) => template.retired === (template.retiredAt !== undefined), {\n message: 'A template is retired exactly when it records when it was retired.',\n path: ['retired'],\n });\nexport type WaiverTemplate = z.infer<typeof WaiverTemplateSchema>;\n\n// `_serverData/waiverTemplateRegistry` — the fence of the offered-template cap. Template creation counts\n// the templates not retired in its transaction against MAX_OFFERED_WAIVER_TEMPLATES, and a query does\n// not lock against an insert, so each creation advances `templateRevision` here: two creations at the\n// cap conflict instead of both passing (BACKEND-116). Only its changing matters; absent until the first\n// creation.\nexport const WaiverTemplateRegistrySchema = z.strictObject({\n templateRevision: countSchema,\n});\nexport type WaiverTemplateRegistry = z.infer<typeof WaiverTemplateRegistrySchema>;\n\n// `waiverTemplates/{waiverTemplateId}/waiverTemplateVersions/{versionId}` — one published version,\n// created once and never changed.\nexport const WaiverTemplateVersionSchema = z.object({\n version: waiverTemplateVersionNumberSchema,\n title: z.string(),\n waiverText: z.string(),\n // Absent on a version whose author was never recorded.\n publishedByUserId: userIdSchema.optional(),\n publishedAt: epochMsSchema,\n});\nexport type WaiverTemplateVersion = z.infer<typeof WaiverTemplateVersionSchema>;\n"]}
@@ -64,5 +64,6 @@ export declare const SPECIAL_DOCS: {
64
64
  readonly ADMIN_LIST: "adminList";
65
65
  readonly MIGRATION_CONSOLE: "migrationConsole";
66
66
  readonly GAME_LOCATION_REGISTRY: "gameLocationRegistry";
67
+ readonly WAIVER_TEMPLATE_REGISTRY: "waiverTemplateRegistry";
67
68
  };
68
69
  //# 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;;;;;;;CAkBf,CAAC"}
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;;;;;;;;CAqBf,CAAC"}
@@ -124,5 +124,8 @@ export const SPECIAL_DOCS = {
124
124
  MIGRATION_CONSOLE: 'migrationConsole',
125
125
  // The fence every venue creation writes, so two creations at MAX_GAME_LOCATIONS conflict.
126
126
  GAME_LOCATION_REGISTRY: 'gameLocationRegistry',
127
+ // The fence every waiver-template creation writes, so two creations at MAX_OFFERED_WAIVER_TEMPLATES
128
+ // conflict.
129
+ WAIVER_TEMPLATE_REGISTRY: 'waiverTemplateRegistry',
127
130
  };
128
131
  //# 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,6BAA6B;AAC7B,gCAAgC;AAChC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,SAAS;IACT,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,aAAa;IAC3B,2FAA2F;IAC3F,sBAAsB,EAAE,sBAAsB;IAC9C,2FAA2F;IAC3F,qEAAqE;IACrE,sBAAsB,EAAE,sBAAsB;IAC9C,iGAAiG;IACjG,2BAA2B;IAC3B,mBAAmB,EAAE,oBAAoB;IACzC,kGAAkG;IAClG,gBAAgB;IAChB,WAAW,EAAE,YAAY;IAEzB,6BAA6B;IAC7B,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,aAAa;IAC3B,gGAAgG;IAChG,mGAAmG;IACnG,+BAA+B;IAC/B,oBAAoB,EAAE,oBAAoB;IAC1C,gBAAgB,EAAE,iBAAiB;IACnC,gBAAgB,EAAE,iBAAiB;IACnC,kBAAkB,EAAE,kBAAkB;IACtC,kBAAkB,EAAE,kBAAkB;IACtC,8FAA8F;IAC9F,qEAAqE;IACrE,uBAAuB,EAAE,uBAAuB;IAEhD,QAAQ;IACR,WAAW,EAAE,YAAY;IACzB,cAAc,EAAE,eAAe;IAE/B,uBAAuB;IACvB,gBAAgB,EAAE,iBAAiB;IACnC,cAAc,EAAE,eAAe;IAC/B,uBAAuB,EAAE,uBAAuB;IAEhD,2BAA2B;IAC3B,iBAAiB,EAAE,kBAAkB;IACrC,gGAAgG;IAChG,uEAAuE;IACvE,kBAAkB,EAAE,kBAAkB;IACtC,kBAAkB,EAAE,iBAAiB;IACrC,wBAAwB,EAAE,wBAAwB;IAClD,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AAY,GAAG;IAC1B,2BAA2B;IAC3B,gGAAgG;IAChG,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"]}
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,6BAA6B;AAC7B,gCAAgC;AAChC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,SAAS;IACT,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,aAAa;IAC3B,2FAA2F;IAC3F,sBAAsB,EAAE,sBAAsB;IAC9C,2FAA2F;IAC3F,qEAAqE;IACrE,sBAAsB,EAAE,sBAAsB;IAC9C,iGAAiG;IACjG,2BAA2B;IAC3B,mBAAmB,EAAE,oBAAoB;IACzC,kGAAkG;IAClG,gBAAgB;IAChB,WAAW,EAAE,YAAY;IAEzB,6BAA6B;IAC7B,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,aAAa;IAC3B,gGAAgG;IAChG,mGAAmG;IACnG,+BAA+B;IAC/B,oBAAoB,EAAE,oBAAoB;IAC1C,gBAAgB,EAAE,iBAAiB;IACnC,gBAAgB,EAAE,iBAAiB;IACnC,kBAAkB,EAAE,kBAAkB;IACtC,kBAAkB,EAAE,kBAAkB;IACtC,8FAA8F;IAC9F,qEAAqE;IACrE,uBAAu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,gBAAgB,EAAE,gBAAgB;IAClC,8EAA8E;IAC9E,iBAAiB,EAAE,iBAAiB;CAC5B,CAAC;AAEX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,4FAA4F;IAC5F,wBAAwB,EAAE,wBAAwB;CAC1C,CAAC;AAEX,sDAAsD;AACtD,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,qGAAqG;IACrG,wBAAwB,EAAE,uBAAuB;CACzC,CAAC;AAEX,kDAAkD;AAClD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,2BAA2B;IAC3B,gGAAgG;IAChG,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;IAC9C,oGAAoG;IACpG,YAAY;IACZ,wBAAwB,EAAE,wBAAwB;CAC1C,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 // The fence every waiver-template creation writes, so two creations at MAX_OFFERED_WAIVER_TEMPLATES\n // conflict.\n WAIVER_TEMPLATE_REGISTRY: 'waiverTemplateRegistry',\n} as const;\n"]}
@@ -53,5 +53,6 @@ export declare const PATH_BUILDERS: {
53
53
  readonly adminList: () => [string, string];
54
54
  readonly migrationConsole: () => [string, string];
55
55
  readonly gameLocationRegistry: () => [string, string];
56
+ readonly waiverTemplateRegistry: () => [string, string];
56
57
  };
57
58
  //# 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,KA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MAAM,CAAC;yCACZ,CAAC,MAAM,EAAE,MAAM,CAAC;2CACd,CAAC,MAAM,EAAE,MAAM,CAAC;CACpC,CAAC"}
@@ -163,5 +163,6 @@ export const PATH_BUILDERS = {
163
163
  adminList: () => [COLLECTIONS.SYSTEM_DATA, SPECIAL_DOCS.ADMIN_LIST],
164
164
  migrationConsole: () => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.MIGRATION_CONSOLE],
165
165
  gameLocationRegistry: () => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.GAME_LOCATION_REGISTRY],
166
+ waiverTemplateRegistry: () => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.WAIVER_TEMPLATE_REGISTRY],
166
167
  };
167
168
  //# sourceMappingURL=path-builders.js.map
@@ -1 +1 @@
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,EAAE,CAAC;QACrE,WAAW,CAAC,aAAa;QACzB,MAAM;QACN,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AAE,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"]}
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,EAAE,CAAC;QACrE,WAAW,CAAC,aAAa;QACzB,MAAM;QACN,2BAA2B,CAAC,YAAY;QACxC,MAAM;KACP;IACD,cAAc,EAAE,CAAC,MAAc,EAAE,QAAkB,EAAoC,EAAE,CAAC;QACxF,WAAW,CAAC,aAAa;QACzB,MAAM;QACN,2BAA2B,CAAC,gBAAgB;QAC5C,QAAQ;KACT;IACD,eAAe,EAAE,CAAC,MAAc,EAA4B,EAAE,CAAC;QAC7D,WAAW,CAAC,aAAa;QACzB,MAAM;QACN,2BAA2B,CAAC,gBAAgB;KAC7C;IACD,UAAU,EAAE,CAAC,MAAc,EAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC;IACpF,yBAAyB,EAAE,CAAC,MAAc,EAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,sBAAsB,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;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;IAC5G,sBAAsB,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,wBAAwB,CAAC;CACxG,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 waiverTemplateRegistry: (): [string, string] => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.WAIVER_TEMPLATE_REGISTRY],\n} as const;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttt-productions/q-core",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Core types, Firestore path constants, zod schemas, and shared constants for Q-Sports",
5
5
  "repository": {
6
6
  "type": "git",