@ttt-productions/q-core 0.1.40 → 0.1.41

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.
Files changed (59) hide show
  1. package/dist/constants/sports.d.ts +0 -6
  2. package/dist/constants/sports.d.ts.map +1 -1
  3. package/dist/constants/sports.js +0 -6
  4. package/dist/constants/sports.js.map +1 -1
  5. package/dist/doc-schemas/atoms.d.ts +0 -1
  6. package/dist/doc-schemas/atoms.d.ts.map +1 -1
  7. package/dist/doc-schemas/audit-event.d.ts +0 -2
  8. package/dist/doc-schemas/audit-event.d.ts.map +1 -1
  9. package/dist/doc-schemas/registry.d.ts +0 -75
  10. package/dist/doc-schemas/registry.d.ts.map +1 -1
  11. package/dist/doc-schemas/sport-game.d.ts +0 -6
  12. package/dist/doc-schemas/sport-game.d.ts.map +1 -1
  13. package/dist/doc-schemas/sport-game.js +1 -2
  14. package/dist/doc-schemas/sport-game.js.map +1 -1
  15. package/dist/doc-schemas/stats-operation.d.ts +0 -141
  16. package/dist/doc-schemas/stats-operation.d.ts.map +1 -1
  17. package/dist/doc-schemas/stats-operation.js +2 -41
  18. package/dist/doc-schemas/stats-operation.js.map +1 -1
  19. package/dist/doc-schemas/system.d.ts +0 -3
  20. package/dist/doc-schemas/system.d.ts.map +1 -1
  21. package/dist/ids/index.d.ts +0 -1
  22. package/dist/ids/index.d.ts.map +1 -1
  23. package/dist/ids/index.js +0 -1
  24. package/dist/ids/index.js.map +1 -1
  25. package/dist/schemas/schedules.d.ts +0 -4
  26. package/dist/schemas/schedules.d.ts.map +1 -1
  27. package/dist/schemas/schedules.js +2 -6
  28. package/dist/schemas/schedules.js.map +1 -1
  29. package/dist/schemas/stats.d.ts +0 -1
  30. package/dist/schemas/stats.d.ts.map +1 -1
  31. package/dist/schemas/teams.d.ts +4 -16
  32. package/dist/schemas/teams.d.ts.map +1 -1
  33. package/dist/schemas/teams.js +4 -16
  34. package/dist/schemas/teams.js.map +1 -1
  35. package/dist/sports/contribution.d.ts +3 -10
  36. package/dist/sports/contribution.d.ts.map +1 -1
  37. package/dist/sports/contribution.js +10 -9
  38. package/dist/sports/contribution.js.map +1 -1
  39. package/dist/types/audit.d.ts +1 -1
  40. package/dist/types/audit.d.ts.map +1 -1
  41. package/dist/types/audit.js +0 -1
  42. package/dist/types/audit.js.map +1 -1
  43. package/dist/types/schedules.d.ts +1 -1
  44. package/dist/types/schedules.d.ts.map +1 -1
  45. package/dist/types/schedules.js +1 -2
  46. package/dist/types/schedules.js.map +1 -1
  47. package/dist/types/stats.d.ts +3 -7
  48. package/dist/types/stats.d.ts.map +1 -1
  49. package/dist/types/stats.js +1 -16
  50. package/dist/types/stats.js.map +1 -1
  51. package/dist/types/unions.d.ts +2 -2
  52. package/dist/types/unions.d.ts.map +1 -1
  53. package/dist/types/unions.js +0 -1
  54. package/dist/types/unions.js.map +1 -1
  55. package/package.json +1 -1
  56. package/dist/ids/stats-operation-ids.d.ts +0 -3
  57. package/dist/ids/stats-operation-ids.d.ts.map +0 -1
  58. package/dist/ids/stats-operation-ids.js +0 -10
  59. package/dist/ids/stats-operation-ids.js.map +0 -1
@@ -55,12 +55,6 @@ export declare const GAME_REPAIR_REFUSAL_COPY: {
55
55
  readonly fieldNotCorrectable: "That number cannot be corrected for this sport. Restore the game from its recorded stats, or reopen it and score it again.";
56
56
  readonly lineNotRostered: "That player is not on this game's roster.";
57
57
  readonly teamNotInGame: "That team is not playing in this game.";
58
- readonly gameTooLarge: "This repair is too large to save at once.";
59
- };
60
- export declare const STATS_INTEGRITY_REFUSAL_COPY: {
61
- readonly statsOutOfBand: "This game's stored numbers no longer match the stats recorded for it. An admin must reconcile the game in Fix stats first.";
62
- readonly finalRecordMissing: "This finalized game's record of its stats is missing. An admin must repair the game in Fix stats first.";
63
- readonly aggregateBelowZero: "A league, career, or hall-of-fame total holds less than this game added to it. An admin must rebuild the totals in Fix stats first.";
64
58
  };
65
59
  export declare const FINALIZATION_NOT_READY_COPY: {
66
60
  readonly roundsIncomplete: "Every round must be recorded before the game can be finalized.";
@@ -1 +1 @@
1
- {"version":3,"file":"sports.d.ts","sourceRoot":"","sources":["../../src/constants/sports.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,+BAA+B;;;;;;;;CAQgB,CAAC;AAI7D,eAAO,MAAM,gCAAgC;;;;CAIe,CAAC;AAE7D,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,eAAO,MAAM,cAAc,SAAU,CAAC;AAItC,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,eAAO,MAAM,iCAAiC,MAAM,CAAC;AAErD,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAEtD,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,eAAO,MAAM,sBAAsB,QAA+D,CAAC;AAEnG,eAAO,MAAM,6BAA6B;;;;;CAKgB,CAAC;AAE3D,eAAO,MAAM,wBAAwB,2CAA2C,CAAC;AAEjF,eAAO,MAAM,0BAA0B,8CAA8C,CAAC;AAEtF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;CAmBqB,CAAC;AAE1D,eAAO,MAAM,4BAA4B,cAAc,CAAC;AACxD,eAAO,MAAM,iCAAiC,mHACoE,CAAC;AAEnH,eAAO,MAAM,wBAAwB;;;;;;;;;CAciB,CAAC;AAEvD,eAAO,MAAM,4BAA4B;;;;CAOiB,CAAC;AAE3D,eAAO,MAAM,2BAA2B;;CAEuB,CAAC;AAEhE,eAAO,MAAM,kCAAkC,wBAAyB,CAAC;AACzE,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"sports.d.ts","sourceRoot":"","sources":["../../src/constants/sports.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,+BAA+B;;;;;;;;CAQgB,CAAC;AAI7D,eAAO,MAAM,gCAAgC;;;;CAIe,CAAC;AAE7D,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,eAAO,MAAM,cAAc,SAAU,CAAC;AAItC,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,eAAO,MAAM,iCAAiC,MAAM,CAAC;AAErD,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAEtD,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,eAAO,MAAM,sBAAsB,QAA+D,CAAC;AAEnG,eAAO,MAAM,6BAA6B;;;;;CAKgB,CAAC;AAE3D,eAAO,MAAM,wBAAwB,2CAA2C,CAAC;AAEjF,eAAO,MAAM,0BAA0B,8CAA8C,CAAC;AAEtF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;CAmBqB,CAAC;AAE1D,eAAO,MAAM,4BAA4B,cAAc,CAAC;AACxD,eAAO,MAAM,iCAAiC,mHACoE,CAAC;AAEnH,eAAO,MAAM,wBAAwB;;;;;;;;CAaiB,CAAC;AAEvD,eAAO,MAAM,2BAA2B;;CAEuB,CAAC;AAEhE,eAAO,MAAM,kCAAkC,wBAAyB,CAAC;AACzE,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -61,12 +61,6 @@ export const GAME_REPAIR_REFUSAL_COPY = {
61
61
  fieldNotCorrectable: 'That number cannot be corrected for this sport. Restore the game from its recorded stats, or reopen it and score it again.',
62
62
  lineNotRostered: "That player is not on this game's roster.",
63
63
  teamNotInGame: 'That team is not playing in this game.',
64
- gameTooLarge: 'This repair is too large to save at once.',
65
- };
66
- export const STATS_INTEGRITY_REFUSAL_COPY = {
67
- statsOutOfBand: "This game's stored numbers no longer match the stats recorded for it. An admin must reconcile the game in Fix stats first.",
68
- finalRecordMissing: "This finalized game's record of its stats is missing. An admin must repair the game in Fix stats first.",
69
- aggregateBelowZero: 'A league, career, or hall-of-fame total holds less than this game added to it. An admin must rebuild the totals in Fix stats first.',
70
64
  };
71
65
  export const FINALIZATION_NOT_READY_COPY = {
72
66
  roundsIncomplete: 'Every round must be recorded before the game can be finalized.',
@@ -1 +1 @@
1
- {"version":3,"file":"sports.js","sourceRoot":"","sources":["../../src/constants/sports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EACjC,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAazD,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,CAAC,+BAA+B,CAAC,EAAE,CAAC;IACpC,CAAC,+BAA+B,CAAC,EAAE,CAAC;IACpC,CAAC,iCAAiC,CAAC,EAAE,CAAC;IACtC,CAAC,6BAA6B,CAAC,EAAE,CAAC;IAClC,CAAC,4BAA4B,CAAC,EAAE,CAAC;IACjC,CAAC,6BAA6B,CAAC,EAAE,CAAC;IAClC,CAAC,+BAA+B,CAAC,EAAE,CAAC;CACsB,CAAC;AAE7D,4FAA4F;AAC5F,oBAAoB;AACpB,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,CAAC;CACgD,CAAC;AAE7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAE1C,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC,mGAAmG;AACnG,uEAAuE;AACvE,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAE7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BAAgB,EACd,gIAAgI;IAClI,eAAe,EACb,mJAAmJ;IACrJ,cAAc,EACZ,kHAAkH;IACpH,mBAAmB,EACjB,4HAA4H;IAC9H,eAAe,EAAE,2CAA2C;IAC5D,aAAa,EAAE,wCAAwC;IACvD,YAAY,EAAE,2CAA2C;CACL,CAAC;AAEvD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,cAAc,EACZ,4HAA4H;IAC9H,kBAAkB,EAChB,yGAAyG;IAC3G,kBAAkB,EAChB,qIAAqI;CAC/E,CAAC;AAE3D,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,gBAAgB,EAAE,gEAAgE;CACrB,CAAC;AAEhE,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAU,CAAC","sourcesContent":["import {\n BASKETBALL_ASSIST_EVENT_TYPE,\n BASKETBALL_BULK_EDIT_EVENT_TYPE,\n BASKETBALL_ONE_POINT_EVENT_TYPE,\n BASKETBALL_REBOUND_EVENT_TYPE,\n BASKETBALL_THREE_POINT_EVENT_TYPE,\n BASKETBALL_TIMEOUT_EVENT_TYPE,\n BASKETBALL_TWO_POINT_EVENT_TYPE,\n FOOTBALL_BULK_EDIT_EVENT_TYPE,\n FOOTBALL_ONE_POINT_EVENT_TYPE,\n FOOTBALL_SIX_POINT_EVENT_TYPE,\n FOOTBALL_TWO_POINT_EVENT_TYPE,\n} from '../types/sports.js';\nimport { MAX_STAT_EVENTS_PER_GAME } from './business.js';\nimport type {\n BasketballPlayerStatKey,\n BasketballStatEventType,\n FootballStatEventType,\n} from '../types/sports.js';\nimport type {\n FinalizationNotReadyReason,\n GameRepairRefusal,\n StatEventRefusalCode,\n StatsIntegrityRefusal,\n} from '../types/stats.js';\n\nexport const BASKETBALL_POINTS_BY_EVENT_TYPE = {\n [BASKETBALL_ONE_POINT_EVENT_TYPE]: 1,\n [BASKETBALL_TWO_POINT_EVENT_TYPE]: 2,\n [BASKETBALL_THREE_POINT_EVENT_TYPE]: 3,\n [BASKETBALL_REBOUND_EVENT_TYPE]: 0,\n [BASKETBALL_ASSIST_EVENT_TYPE]: 0,\n [BASKETBALL_TIMEOUT_EVENT_TYPE]: 0,\n [BASKETBALL_BULK_EDIT_EVENT_TYPE]: 0,\n} as const satisfies Record<BasketballStatEventType, number>;\n\n// Every weight is a multiple of one half, so FP summed across games equals FP of the summed\n// counters exactly.\nexport const BASKETBALL_FANTASY_POINT_WEIGHTS = {\n points: 1,\n rebounds: 1.5,\n assists: 2,\n} as const satisfies Record<BasketballPlayerStatKey, number>;\n\nexport const CURLING_ROUND_COUNT = 14;\n\nexport const MAX_CURLING_ROUND_POINTS = 4;\n\nexport const MAX_STAT_COUNT = 999_999;\n\n// The most events one scoring write may carry: each event is a document created in the write's one\n// transaction, and a Firestore transaction commits at most 500 writes.\nexport const MAX_STAT_EVENTS_PER_WRITE = 200;\n\nexport const MAX_GAME_STATS_CORRECTION_TARGETS = 200;\n\nexport const MAX_STATS_REPAIR_LISTED_CHANGES = 500;\n\nexport const MAX_STATS_VALIDATION_DISCREPANCIES = 500;\n\nexport const STAT_HISTORY_PAGE_SIZE = 1000;\n\nexport const MAX_STAT_HISTORY_PAGES = Math.ceil(MAX_STAT_EVENTS_PER_GAME / STAT_HISTORY_PAGE_SIZE);\n\nexport const FOOTBALL_POINTS_BY_EVENT_TYPE = {\n [FOOTBALL_SIX_POINT_EVENT_TYPE]: 6,\n [FOOTBALL_TWO_POINT_EVENT_TYPE]: 2,\n [FOOTBALL_ONE_POINT_EVENT_TYPE]: 1,\n [FOOTBALL_BULK_EDIT_EVENT_TYPE]: 0,\n} as const satisfies Record<FootballStatEventType, number>;\n\nexport const TEAM_NOT_IN_GAME_MESSAGE = 'That team is not playing in this game.';\n\nexport const NOT_ON_GAME_ROSTER_MESSAGE = \"That player is not on this game's roster.\";\n\nexport const STAT_EVENT_REFUSAL_COPY = {\n eventTypeNotInSport: \"That stat does not belong to this game's sport.\",\n teamNotInGame: TEAM_NOT_IN_GAME_MESSAGE,\n playerNotRostered: \"That player is not on this game's roster for that team.\",\n assisterNotRostered: \"The assisting player is not on this game's roster for that team.\",\n assistNotAllowed:\n 'Only a 2- or 3-point basket can be assisted, and never by the player who scored it.',\n playerNotAllowed: \"That stat is the team's; it cannot name a player.\",\n roundNotNext: 'That round is not the next one to record.',\n roundsComplete: 'Every round is already recorded.',\n bulkValueInvalid:\n 'That entry is not a real result: stats are whole numbers and never go below zero.',\n bulkStale: 'The numbers changed while you were editing. Check the flagged values and save again.',\n eventIdConflict:\n 'A different stat was already saved under this one. Discard it and enter it again.',\n voidTargetNotSportEvent: 'There is no recorded stat there to undo.',\n correctionNotAccepted: 'Corrections are made from Fix stats, not from the scoring screen.',\n undoBelowZero:\n 'Undoing that play would leave a stat below zero, because a later entry already lowered it.',\n} as const satisfies Record<StatEventRefusalCode, string>;\n\nexport const STATS_MIGRATION_OPERATION_ID = 'migration';\nexport const STATS_MIGRATION_CORRECTION_REASON =\n 'The recorded result differs from what its recorded plays add up to; this correction keeps the recorded result.';\n\nexport const GAME_REPAIR_REFUSAL_COPY = {\n eventUnreadable:\n \"One of this game's recorded stats can no longer be read. Fix the event in the console, then repair the game.\",\n eventSequenceGap:\n \"This game's recorded stats are numbered with a gap or a repeat. Fix the event documents in the console, then restore the game.\",\n sourcesDisagree:\n \"This game's record, its stored numbers, and its recorded stats all disagree, so nothing says what was applied. Fix the game in the console first.\",\n scoreAmbiguous:\n \"The team's score was edited in two places to different values. Enter the score you want as a correction instead.\",\n fieldNotCorrectable:\n 'That number cannot be corrected for this sport. Restore the game from its recorded stats, or reopen it and score it again.',\n lineNotRostered: \"That player is not on this game's roster.\",\n teamNotInGame: 'That team is not playing in this game.',\n gameTooLarge: 'This repair is too large to save at once.',\n} as const satisfies Record<GameRepairRefusal, string>;\n\nexport const STATS_INTEGRITY_REFUSAL_COPY = {\n statsOutOfBand:\n \"This game's stored numbers no longer match the stats recorded for it. An admin must reconcile the game in Fix stats first.\",\n finalRecordMissing:\n \"This finalized game's record of its stats is missing. An admin must repair the game in Fix stats first.\",\n aggregateBelowZero:\n 'A league, career, or hall-of-fame total holds less than this game added to it. An admin must rebuild the totals in Fix stats first.',\n} as const satisfies Record<StatsIntegrityRefusal, string>;\n\nexport const FINALIZATION_NOT_READY_COPY = {\n roundsIncomplete: 'Every round must be recorded before the game can be finalized.',\n} as const satisfies Record<FinalizationNotReadyReason, string>;\n\nexport const HALL_OF_FAME_MINIMUM_GAMES_CHOICES = [25, 50, 100] as const;\nexport type HallOfFameMinimumGames = (typeof HALL_OF_FAME_MINIMUM_GAMES_CHOICES)[number];\n"]}
1
+ {"version":3,"file":"sports.js","sourceRoot":"","sources":["../../src/constants/sports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EACjC,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAYzD,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,CAAC,+BAA+B,CAAC,EAAE,CAAC;IACpC,CAAC,+BAA+B,CAAC,EAAE,CAAC;IACpC,CAAC,iCAAiC,CAAC,EAAE,CAAC;IACtC,CAAC,6BAA6B,CAAC,EAAE,CAAC;IAClC,CAAC,4BAA4B,CAAC,EAAE,CAAC;IACjC,CAAC,6BAA6B,CAAC,EAAE,CAAC;IAClC,CAAC,+BAA+B,CAAC,EAAE,CAAC;CACsB,CAAC;AAE7D,4FAA4F;AAC5F,oBAAoB;AACpB,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,CAAC;CACgD,CAAC;AAE7D,MAAM,CAAC,MAAM,mB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,aAAa,EACX,4FAA4F;CACvC,CAAC;AAE1D,MAAM,CAAC,MAAM,4BAA4B,GAAG,WAAW,CAAC;AACxD,MAAM,CAAC,MAAM,iCAAiC,GAC5C,gHAAgH,CAAC;AAEnH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,eAAe,EACb,8GAA8G;IAChH,gBAAgB,EACd,gIAAgI;IAClI,eAAe,EACb,mJAAmJ;IACrJ,cAAc,EACZ,kHAAkH;IACpH,mBAAmB,EACjB,4HAA4H;IAC9H,eAAe,EAAE,2CAA2C;IAC5D,aAAa,EAAE,wCAAwC;CACH,CAAC;AAEvD,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,gBAAgB,EAAE,gEAAgE;CACrB,CAAC;AAEhE,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAU,CAAC","sourcesContent":["import {\n BASKETBALL_ASSIST_EVENT_TYPE,\n BASKETBALL_BULK_EDIT_EVENT_TYPE,\n BASKETBALL_ONE_POINT_EVENT_TYPE,\n BASKETBALL_REBOUND_EVENT_TYPE,\n BASKETBALL_THREE_POINT_EVENT_TYPE,\n BASKETBALL_TIMEOUT_EVENT_TYPE,\n BASKETBALL_TWO_POINT_EVENT_TYPE,\n FOOTBALL_BULK_EDIT_EVENT_TYPE,\n FOOTBALL_ONE_POINT_EVENT_TYPE,\n FOOTBALL_SIX_POINT_EVENT_TYPE,\n FOOTBALL_TWO_POINT_EVENT_TYPE,\n} from '../types/sports.js';\nimport { MAX_STAT_EVENTS_PER_GAME } from './business.js';\nimport type {\n BasketballPlayerStatKey,\n BasketballStatEventType,\n FootballStatEventType,\n} from '../types/sports.js';\nimport type {\n FinalizationNotReadyReason,\n GameRepairRefusal,\n StatEventRefusalCode,\n} from '../types/stats.js';\n\nexport const BASKETBALL_POINTS_BY_EVENT_TYPE = {\n [BASKETBALL_ONE_POINT_EVENT_TYPE]: 1,\n [BASKETBALL_TWO_POINT_EVENT_TYPE]: 2,\n [BASKETBALL_THREE_POINT_EVENT_TYPE]: 3,\n [BASKETBALL_REBOUND_EVENT_TYPE]: 0,\n [BASKETBALL_ASSIST_EVENT_TYPE]: 0,\n [BASKETBALL_TIMEOUT_EVENT_TYPE]: 0,\n [BASKETBALL_BULK_EDIT_EVENT_TYPE]: 0,\n} as const satisfies Record<BasketballStatEventType, number>;\n\n// Every weight is a multiple of one half, so FP summed across games equals FP of the summed\n// counters exactly.\nexport const BASKETBALL_FANTASY_POINT_WEIGHTS = {\n points: 1,\n rebounds: 1.5,\n assists: 2,\n} as const satisfies Record<BasketballPlayerStatKey, number>;\n\nexport const CURLING_ROUND_COUNT = 14;\n\nexport const MAX_CURLING_ROUND_POINTS = 4;\n\nexport const MAX_STAT_COUNT = 999_999;\n\n// The most events one scoring write may carry: each event is a document created in the write's one\n// transaction, and a Firestore transaction commits at most 500 writes.\nexport const MAX_STAT_EVENTS_PER_WRITE = 200;\n\nexport const MAX_GAME_STATS_CORRECTION_TARGETS = 200;\n\nexport const MAX_STATS_REPAIR_LISTED_CHANGES = 500;\n\nexport const MAX_STATS_VALIDATION_DISCREPANCIES = 500;\n\nexport const STAT_HISTORY_PAGE_SIZE = 1000;\n\nexport const MAX_STAT_HISTORY_PAGES = Math.ceil(MAX_STAT_EVENTS_PER_GAME / STAT_HISTORY_PAGE_SIZE);\n\nexport const FOOTBALL_POINTS_BY_EVENT_TYPE = {\n [FOOTBALL_SIX_POINT_EVENT_TYPE]: 6,\n [FOOTBALL_TWO_POINT_EVENT_TYPE]: 2,\n [FOOTBALL_ONE_POINT_EVENT_TYPE]: 1,\n [FOOTBALL_BULK_EDIT_EVENT_TYPE]: 0,\n} as const satisfies Record<FootballStatEventType, number>;\n\nexport const TEAM_NOT_IN_GAME_MESSAGE = 'That team is not playing in this game.';\n\nexport const NOT_ON_GAME_ROSTER_MESSAGE = \"That player is not on this game's roster.\";\n\nexport const STAT_EVENT_REFUSAL_COPY = {\n eventTypeNotInSport: \"That stat does not belong to this game's sport.\",\n teamNotInGame: TEAM_NOT_IN_GAME_MESSAGE,\n playerNotRostered: \"That player is not on this game's roster for that team.\",\n assisterNotRostered: \"The assisting player is not on this game's roster for that team.\",\n assistNotAllowed:\n 'Only a 2- or 3-point basket can be assisted, and never by the player who scored it.',\n playerNotAllowed: \"That stat is the team's; it cannot name a player.\",\n roundNotNext: 'That round is not the next one to record.',\n roundsComplete: 'Every round is already recorded.',\n bulkValueInvalid:\n 'That entry is not a real result: stats are whole numbers and never go below zero.',\n bulkStale: 'The numbers changed while you were editing. Check the flagged values and save again.',\n eventIdConflict:\n 'A different stat was already saved under this one. Discard it and enter it again.',\n voidTargetNotSportEvent: 'There is no recorded stat there to undo.',\n correctionNotAccepted: 'Corrections are made from Fix stats, not from the scoring screen.',\n undoBelowZero:\n 'Undoing that play would leave a stat below zero, because a later entry already lowered it.',\n} as const satisfies Record<StatEventRefusalCode, string>;\n\nexport const STATS_MIGRATION_OPERATION_ID = 'migration';\nexport const STATS_MIGRATION_CORRECTION_REASON =\n 'The recorded result differs from what its recorded plays add up to; this correction keeps the recorded result.';\n\nexport const GAME_REPAIR_REFUSAL_COPY = {\n eventUnreadable:\n \"One of this game's recorded stats can no longer be read. Fix the event in the console, then repair the game.\",\n eventSequenceGap:\n \"This game's recorded stats are numbered with a gap or a repeat. Fix the event documents in the console, then restore the game.\",\n sourcesDisagree:\n \"This game's record, its stored numbers, and its recorded stats all disagree, so nothing says what was applied. Fix the game in the console first.\",\n scoreAmbiguous:\n \"The team's score was edited in two places to different values. Enter the score you want as a correction instead.\",\n fieldNotCorrectable:\n 'That number cannot be corrected for this sport. Restore the game from its recorded stats, or reopen it and score it again.',\n lineNotRostered: \"That player is not on this game's roster.\",\n teamNotInGame: 'That team is not playing in this game.',\n} as const satisfies Record<GameRepairRefusal, string>;\n\nexport const FINALIZATION_NOT_READY_COPY = {\n roundsIncomplete: 'Every round must be recorded before the game can be finalized.',\n} as const satisfies Record<FinalizationNotReadyReason, string>;\n\nexport const HALL_OF_FAME_MINIMUM_GAMES_CHOICES = [25, 50, 100] as const;\nexport type HallOfFameMinimumGames = (typeof HALL_OF_FAME_MINIMUM_GAMES_CHOICES)[number];\n"]}
@@ -234,7 +234,6 @@ export declare const statsDiscrepancyKindSchema: z.ZodEnum<{
234
234
  finalRecordMissing: "finalRecordMissing";
235
235
  finalRecordMismatch: "finalRecordMismatch";
236
236
  participationSnapshotMismatch: "participationSnapshotMismatch";
237
- gameHeld: "gameHeld";
238
237
  aggregateMismatch: "aggregateMismatch";
239
238
  aggregateEntryStale: "aggregateEntryStale";
240
239
  aggregateEntryMissing: "aggregateEntryMissing";
@@ -1 +1 @@
1
- {"version":3,"file":"atoms.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/atoms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiCxB,eAAO,MAAM,aAAa,aAAiC,CAAC;AAE5D,eAAO,MAAM,WAAW,aAAiC,CAAC;AAE1D,eAAO,MAAM,sBAAsB,aAAkC,CAAC;AAEtE,eAAO,MAAM,cAAc,aAA8B,CAAC;AAE1D,eAAO,MAAM,qBAAqB,aAAiC,CAAC;AAEpE,eAAO,MAAM,kBAAkB,wDAAuC,CAAC;AAEvE,eAAO,MAAM,qBAAqB,QAAwB,CAAC;AAE3D,eAAO,MAAM,kBAAkB,aAME,CAAC;AAElC,eAAO,MAAM,uBAAuB,aAGgB,CAAC;AAErD,eAAO,MAAM,YAAY,aAA0B,CAAC;AACpD,eAAO,MAAM,cAAc,aAA0B,CAAC;AACtD,eAAO,MAAM,YAAY,aAA0B,CAAC;AACpD,eAAO,MAAM,YAAY,aAA0B,CAAC;AACpD,eAAO,MAAM,oBAAoB,aAA0B,CAAC;AAC5D,eAAO,MAAM,wBAAwB,aAGpC,CAAC;AACF,eAAO,MAAM,iBAAiB,aAA0B,CAAC;AACzD,eAAO,MAAM,sBAAsB,aAA0B,CAAC;AAC9D,eAAO,MAAM,6BA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D,eAAO,MAAM,cAAc;;;;EAAyB,CAAC;AACrD,eAAO,MAAM,gBAAgB;;;EAA2B,CAAC;AACzD,eAAO,MAAM,gBAAgB;;;EAA2B,CAAC;AACzD,eAAO,MAAM,0BAA0B;;EAAsC,CAAC;AAC9E,eAAO,MAAM,oBAAoB;;;;;;EAAgC,CAAC;AAClE,eAAO,MAAM,gBAAgB;;;;EAA2B,CAAC;AACzD,eAAO,MAAM,0BAA0B;;;;;EAAsC,CAAC;AAC9E,eAAO,MAAM,2BAA2B;;;;;EAAwC,CAAC;AACjF,eAAO,MAAM,gCAAgC;;;;EAA6C,CAAC;AAC3F,eAAO,MAAM,gCAAgC;;;;EAA6C,CAAC;AAC3F,eAAO,MAAM,4BAA4B;;;;;EAAwC,CAAC;AAClF,eAAO,MAAM,uBAAuB;;;;;;;EAAmC,CAAC;AACxE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;EAAsC,CAAC;AAC9E,eAAO,MAAM,2BAA2B;;;;EAAoC,CAAC;AAC7E,eAAO,MAAM,oBAAoB;;;;;;EAA4B,CAAC"}
@@ -61,7 +61,6 @@ export declare const auditEventTypeSchema: z.ZodEnum<{
61
61
  "teamMembership.removed": "teamMembership.removed";
62
62
  "ghostPlayer.removed": "ghostPlayer.removed";
63
63
  "ghostPlayer.closedLeagueLinked": "ghostPlayer.closedLeagueLinked";
64
- "ghostPlayer.removalStopped": "ghostPlayer.removalStopped";
65
64
  "teamInvitation.created": "teamInvitation.created";
66
65
  "teamInvitation.accepted": "teamInvitation.accepted";
67
66
  "teamInvitation.rejected": "teamInvitation.rejected";
@@ -178,7 +177,6 @@ export declare const AuditEventSchema: z.ZodObject<{
178
177
  "teamMembership.removed": "teamMembership.removed";
179
178
  "ghostPlayer.removed": "ghostPlayer.removed";
180
179
  "ghostPlayer.closedLeagueLinked": "ghostPlayer.closedLeagueLinked";
181
- "ghostPlayer.removalStopped": "ghostPlayer.removalStopped";
182
180
  "teamInvitation.created": "teamInvitation.created";
183
181
  "teamInvitation.accepted": "teamInvitation.accepted";
184
182
  "teamInvitation.rejected": "teamInvitation.rejected";
@@ -1 +1 @@
1
- {"version":3,"file":"audit-event.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/audit-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;iCAgB3B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAc3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"audit-event.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/audit-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;iCAgB3B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAc3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -410,7 +410,6 @@ export declare const COLLECTION_SCHEMAS: {
410
410
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
411
411
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
412
412
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
413
- statsOperationId: z.ZodOptional<z.ZodString>;
414
413
  finalizedAt: z.ZodOptional<z.ZodNumber>;
415
414
  reopenedAt: z.ZodOptional<z.ZodNumber>;
416
415
  createdAt: z.ZodNumber;
@@ -450,7 +449,6 @@ export declare const COLLECTION_SCHEMAS: {
450
449
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
451
450
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
452
451
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
453
- statsOperationId: z.ZodOptional<z.ZodString>;
454
452
  finalizedAt: z.ZodOptional<z.ZodNumber>;
455
453
  reopenedAt: z.ZodOptional<z.ZodNumber>;
456
454
  createdAt: z.ZodNumber;
@@ -489,7 +487,6 @@ export declare const COLLECTION_SCHEMAS: {
489
487
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
490
488
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
491
489
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
492
- statsOperationId: z.ZodOptional<z.ZodString>;
493
490
  finalizedAt: z.ZodOptional<z.ZodNumber>;
494
491
  reopenedAt: z.ZodOptional<z.ZodNumber>;
495
492
  createdAt: z.ZodNumber;
@@ -1320,7 +1317,6 @@ export declare const COLLECTION_SCHEMAS: {
1320
1317
  finalRecordMissing: "finalRecordMissing";
1321
1318
  finalRecordMismatch: "finalRecordMismatch";
1322
1319
  participationSnapshotMismatch: "participationSnapshotMismatch";
1323
- gameHeld: "gameHeld";
1324
1320
  aggregateMismatch: "aggregateMismatch";
1325
1321
  aggregateEntryStale: "aggregateEntryStale";
1326
1322
  aggregateEntryMissing: "aggregateEntryMissing";
@@ -1345,7 +1341,6 @@ export declare const COLLECTION_SCHEMAS: {
1345
1341
  finalRecordMissing: "finalRecordMissing";
1346
1342
  finalRecordMismatch: "finalRecordMismatch";
1347
1343
  participationSnapshotMismatch: "participationSnapshotMismatch";
1348
- gameHeld: "gameHeld";
1349
1344
  aggregateMismatch: "aggregateMismatch";
1350
1345
  aggregateEntryStale: "aggregateEntryStale";
1351
1346
  aggregateEntryMissing: "aggregateEntryMissing";
@@ -1518,75 +1513,6 @@ export declare const COLLECTION_SCHEMAS: {
1518
1513
  changed: z.ZodNumber;
1519
1514
  skipped: z.ZodNumber;
1520
1515
  }, z.core.$strict>;
1521
- }, z.core.$strict>, z.ZodObject<{
1522
- kind: z.ZodLiteral<"ghostPlayerStats">;
1523
- scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
1524
- action: z.ZodLiteral<"link">;
1525
- teamId: z.ZodString;
1526
- ghostUserId: z.ZodString;
1527
- userId: z.ZodString;
1528
- }, z.core.$strict>, z.ZodObject<{
1529
- action: z.ZodLiteral<"removal">;
1530
- teamId: z.ZodString;
1531
- ghostUserId: z.ZodString;
1532
- }, z.core.$strict>], "action">;
1533
- reason: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1534
- removedFinishedGameEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
1535
- gameId: z.ZodString;
1536
- wasAbsent: z.ZodBoolean;
1537
- wasNonScoring: z.ZodBoolean;
1538
- }, z.core.$strict>>>;
1539
- removedOpenGameIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1540
- linkedGames: z.ZodOptional<z.ZodArray<z.ZodObject<{
1541
- gameId: z.ZodString;
1542
- completed: z.ZodBoolean;
1543
- merged: z.ZodBoolean;
1544
- }, z.core.$strict>>>;
1545
- destinationChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
1546
- ref: z.ZodString;
1547
- field: z.ZodString;
1548
- before: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1549
- after: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1550
- }, z.core.$strict>>>;
1551
- membershipOutcome: z.ZodOptional<z.ZodEnum<{
1552
- handedOver: "handedOver";
1553
- created: "created";
1554
- merged: "merged";
1555
- kept: "kept";
1556
- }>>;
1557
- startedByUserId: z.ZodString;
1558
- startedAt: z.ZodNumber;
1559
- updatedAt: z.ZodNumber;
1560
- status: z.ZodEnum<{
1561
- running: "running";
1562
- complete: "complete";
1563
- stopped: "stopped";
1564
- }>;
1565
- resumeAfter: z.ZodOptional<z.ZodString>;
1566
- counts: z.ZodObject<{
1567
- read: z.ZodNumber;
1568
- changed: z.ZodNumber;
1569
- skipped: z.ZodNumber;
1570
- }, z.core.$strict>;
1571
- }, z.core.$strict>, z.ZodObject<{
1572
- kind: z.ZodLiteral<"gameDeletion">;
1573
- scope: z.ZodObject<{
1574
- gameId: z.ZodString;
1575
- }, z.core.$strict>;
1576
- startedByUserId: z.ZodString;
1577
- startedAt: z.ZodNumber;
1578
- updatedAt: z.ZodNumber;
1579
- status: z.ZodEnum<{
1580
- running: "running";
1581
- complete: "complete";
1582
- stopped: "stopped";
1583
- }>;
1584
- resumeAfter: z.ZodOptional<z.ZodString>;
1585
- counts: z.ZodObject<{
1586
- read: z.ZodNumber;
1587
- changed: z.ZodNumber;
1588
- skipped: z.ZodNumber;
1589
- }, z.core.$strict>;
1590
1516
  }, z.core.$strict>], "kind">;
1591
1517
  readonly 'galleryPictures/{pictureId}': z.ZodObject<{
1592
1518
  ownerKind: z.ZodEnum<{
@@ -2614,7 +2540,6 @@ export declare const COLLECTION_SCHEMAS: {
2614
2540
  "teamMembership.removed": "teamMembership.removed";
2615
2541
  "ghostPlayer.removed": "ghostPlayer.removed";
2616
2542
  "ghostPlayer.closedLeagueLinked": "ghostPlayer.closedLeagueLinked";
2617
- "ghostPlayer.removalStopped": "ghostPlayer.removalStopped";
2618
2543
  "teamInvitation.created": "teamInvitation.created";
2619
2544
  "teamInvitation.accepted": "teamInvitation.accepted";
2620
2545
  "teamInvitation.rejected": "teamInvitation.rejected";
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkD7B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;
77
77
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
78
78
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
79
- statsOperationId: z.ZodOptional<z.ZodString>;
80
79
  finalizedAt: z.ZodOptional<z.ZodNumber>;
81
80
  reopenedAt: z.ZodOptional<z.ZodNumber>;
82
81
  createdAt: z.ZodNumber;
@@ -118,7 +117,6 @@ export declare const CurlingGameSchema: z.ZodObject<{
118
117
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
119
118
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
120
119
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
121
- statsOperationId: z.ZodOptional<z.ZodString>;
122
120
  finalizedAt: z.ZodOptional<z.ZodNumber>;
123
121
  reopenedAt: z.ZodOptional<z.ZodNumber>;
124
122
  createdAt: z.ZodNumber;
@@ -159,7 +157,6 @@ export declare const FootballGameSchema: z.ZodObject<{
159
157
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
160
158
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
161
159
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
162
- statsOperationId: z.ZodOptional<z.ZodString>;
163
160
  finalizedAt: z.ZodOptional<z.ZodNumber>;
164
161
  reopenedAt: z.ZodOptional<z.ZodNumber>;
165
162
  createdAt: z.ZodNumber;
@@ -207,7 +204,6 @@ export declare const SportGameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
207
204
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
208
205
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
209
206
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
210
- statsOperationId: z.ZodOptional<z.ZodString>;
211
207
  finalizedAt: z.ZodOptional<z.ZodNumber>;
212
208
  reopenedAt: z.ZodOptional<z.ZodNumber>;
213
209
  createdAt: z.ZodNumber;
@@ -247,7 +243,6 @@ export declare const SportGameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
247
243
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
248
244
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
249
245
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
250
- statsOperationId: z.ZodOptional<z.ZodString>;
251
246
  finalizedAt: z.ZodOptional<z.ZodNumber>;
252
247
  reopenedAt: z.ZodOptional<z.ZodNumber>;
253
248
  createdAt: z.ZodNumber;
@@ -286,7 +281,6 @@ export declare const SportGameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
286
281
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
287
282
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
288
283
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
289
- statsOperationId: z.ZodOptional<z.ZodString>;
290
284
  finalizedAt: z.ZodOptional<z.ZodNumber>;
291
285
  reopenedAt: z.ZodOptional<z.ZodNumber>;
292
286
  createdAt: z.ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"sport-game.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/sport-game.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAmBrD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;CAaa,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,UAAU,CAAC,CAAC;AACt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MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMe,CAAC;AAC/C,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAI1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -3,7 +3,7 @@ import { parseGameRosterPlayerId } from '../ids/compound-ids.js';
3
3
  import { GAME_MEMO_INPUT, SCHEDULE_WEEK_TITLE_INPUT } from '../constants/text-fields.js';
4
4
  import { SPORT_LINE_SCHEMAS } from './aggregate-stats.js';
5
5
  import { gameStatsSchema } from './game-stats.js';
6
- import { calendarDateSchema, countSchema, epochMsSchema, gameRosterPlayerIdSchema, gameStatusSchema, leagueIdSchema, scheduleWeekIdSchema, statsOperationIdSchema, teamIdSchema, userIdSchema, } from './atoms.js';
6
+ import { calendarDateSchema, countSchema, epochMsSchema, gameRosterPlayerIdSchema, gameStatusSchema, leagueIdSchema, scheduleWeekIdSchema, teamIdSchema, userIdSchema, } from './atoms.js';
7
7
  import { textFieldSchema } from '../schemas/text-field.js';
8
8
  import { gameLocationIdSchema, gameLocationSubLocationSchema } from './game-location.js';
9
9
  // Spelled per sport so each payload keeps its exact type.
@@ -34,7 +34,6 @@ const sportGameBase = {
34
34
  memos: z.record(z.string(), textFieldSchema(GAME_MEMO_INPUT)).optional(),
35
35
  absentRosterPlayerIds: z.array(gameRosterPlayerIdSchema),
36
36
  nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema).optional(),
37
- statsOperationId: statsOperationIdSchema.optional(),
38
37
  finalizedAt: epochMsSchema.optional(),
39
38
  reopenedAt: epochMsSchema.optional(),
40
39
  createdAt: epochMsSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"sport-game.js","sourceRoot":"","sources":["../../src/doc-schemas/sport-game.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAEzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,YAAY,EACZ,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEzF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,eAAe,CACzB,kBAAkB,CAAC,UAAU,CAAC,QAAQ,EACtC,kBAAkB,CAAC,UAAU,CAAC,UAAU,CACzC;IACD,OAAO,EAAE,eAAe,CACtB,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EACnC,kBAAkB,CAAC,OAAO,CAAC,UAAU,CACtC;IACD,QAAQ,EAAE,eAAe,CACvB,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,EACpC,kBAAkB,CAAC,QAAQ,CAAC,UAAU,CACvC;CAC+C,CAAC;AAQnD,MAAM,C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EAAE,eAAe,CAAC,CAAC;AAG/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,GAAG,aAAa;IAChB,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,UAA+B,CAAC;IACtD,KAAK,EAAE,wBAAwB,CAAC,QAAQ;CACzC,CAAC;KACD,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAG/C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,kBAAkB,CAAC,YAAY,EAAE;IAChE,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;CACnB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,QAAQ,EAAE,aAAa;CACxB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { parseGameRosterPlayerId } from '../ids/compound-ids.js';\nimport { GAME_MEMO_INPUT, SCHEDULE_WEEK_TITLE_INPUT } from '../constants/text-fields.js';\nimport type { LeagueType } from '../types/sports.js';\nimport { SPORT_LINE_SCHEMAS } from './aggregate-stats.js';\nimport { gameStatsSchema } from './game-stats.js';\nimport {\n calendarDateSchema,\n countSchema,\n epochMsSchema,\n gameRosterPlayerIdSchema,\n gameStatusSchema,\n leagueIdSchema,\n scheduleWeekIdSchema,\n statsOperationIdSchema,\n teamIdSchema,\n userIdSchema,\n} from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\nimport { gameLocationIdSchema, gameLocationSubLocationSchema } from './game-location.js';\n\n// Spelled per sport so each payload keeps its exact type.\nexport const SPORT_GAME_STATS_SCHEMAS = {\n Basketball: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Basketball.gameTeam,\n SPORT_LINE_SCHEMAS.Basketball.gamePlayer,\n ),\n Curling: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Curling.gameTeam,\n SPORT_LINE_SCHEMAS.Curling.gamePlayer,\n ),\n Football: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Football.gameTeam,\n SPORT_LINE_SCHEMAS.Football.gamePlayer,\n ),\n} as const satisfies Record<LeagueType, z.ZodType>;\n\nexport type BasketballGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Basketball>;\nexport type CurlingGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Curling>;\nexport type FootballGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Football>;\n\nexport type GameStats = z.infer<(typeof SPORT_GAME_STATS_SCHEMAS)[LeagueType]>;\n\nexport const GameTeamSchema = z.object({\n teamId: teamIdSchema,\n});\nexport type GameTeam = z.infer<typeof GameTeamSchema>;\n\nconst sportGameBase = {\n leagueId: leagueIdSchema,\n weekId: scheduleWeekIdSchema,\n weekTitle: textFieldSchema(SCHEDULE_WEEK_TITLE_INPUT),\n weekLocation: z.string(),\n weekStartDate: epochMsSchema,\n startTime: epochMsSchema,\n dayKey: calendarDateSchema,\n locationLabel: z.string(),\n gameLocationId: gameLocationIdSchema.optional(),\n subLocation: gameLocationSubLocationSchema.optional(),\n status: gameStatusSchema,\n teams: z.tuple([GameTeamSchema, GameTeamSchema]),\n teamIds: z.array(teamIdSchema).min(1).max(2),\n score: z.record(teamIdSchema, countSchema),\n statEventSequence: countSchema,\n memos: z.record(z.string(), textFieldSchema(GAME_MEMO_INPUT)).optional(),\n absentRosterPlayerIds: z.array(gameRosterPlayerIdSchema),\n nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema).optional(),\n statsOperationId: statsOperationIdSchema.optional(),\n finalizedAt: epochMsSchema.optional(),\n reopenedAt: epochMsSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n};\n\nfunction rollupMatchesTeams(game: {\n teamIds: string[];\n score: Record<string, number>;\n stats: { teamStats: Record<string, unknown>; playerStats: Record<string, unknown> };\n}): boolean {\n const teams = new Set(game.teamIds);\n const namesEveryTeam = (keys: string[]) =>\n keys.length === teams.size && keys.every((key) => teams.has(key));\n return (\n namesEveryTeam(Object.keys(game.stats.teamStats)) &&\n namesEveryTeam(Object.keys(game.score)) &&\n Object.keys(game.stats.playerStats).every((key) =>\n teams.has(parseGameRosterPlayerId(key)?.teamId ?? ''),\n )\n );\n}\nconst ROLLUP_MISMATCH = \"The stats rollup and score mirror hold exactly the game's teams.\";\n\nexport const BasketballGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Basketball' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Basketball,\n jumpBallTeamId: teamIdSchema.optional(),\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type BasketballGame = z.infer<typeof BasketballGameSchema>;\n\nexport const CurlingGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Curling' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Curling,\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type CurlingGame = z.infer<typeof CurlingGameSchema>;\n\nexport const FootballGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Football' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Football,\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type FootballGame = z.infer<typeof FootballGameSchema>;\n\nexport const SportGameSchema = z.discriminatedUnion('leagueType', [\n BasketballGameSchema,\n CurlingGameSchema,\n FootballGameSchema,\n]);\nexport type SportGame = z.infer<typeof SportGameSchema>;\n\nexport const GameRosterPlayerSchema = z.object({\n userId: userIdSchema,\n teamId: teamIdSchema,\n isGhost: z.boolean(),\n syncedAt: epochMsSchema,\n});\nexport type GameRosterPlayer = z.infer<typeof GameRosterPlayerSchema>;\n"]}
1
+ {"version":3,"file":"sport-game.js","sourceRoot":"","sources":["../../src/doc-schemas/sport-game.ts"],"names":[],"mappings":"A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AE;IAChE,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;CACnB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,QAAQ,EAAE,aAAa;CACxB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { parseGameRosterPlayerId } from '../ids/compound-ids.js';\nimport { GAME_MEMO_INPUT, SCHEDULE_WEEK_TITLE_INPUT } from '../constants/text-fields.js';\nimport type { LeagueType } from '../types/sports.js';\nimport { SPORT_LINE_SCHEMAS } from './aggregate-stats.js';\nimport { gameStatsSchema } from './game-stats.js';\nimport {\n calendarDateSchema,\n countSchema,\n epochMsSchema,\n gameRosterPlayerIdSchema,\n gameStatusSchema,\n leagueIdSchema,\n scheduleWeekIdSchema,\n teamIdSchema,\n userIdSchema,\n} from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\nimport { gameLocationIdSchema, gameLocationSubLocationSchema } from './game-location.js';\n\n// Spelled per sport so each payload keeps its exact type.\nexport const SPORT_GAME_STATS_SCHEMAS = {\n Basketball: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Basketball.gameTeam,\n SPORT_LINE_SCHEMAS.Basketball.gamePlayer,\n ),\n Curling: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Curling.gameTeam,\n SPORT_LINE_SCHEMAS.Curling.gamePlayer,\n ),\n Football: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Football.gameTeam,\n SPORT_LINE_SCHEMAS.Football.gamePlayer,\n ),\n} as const satisfies Record<LeagueType, z.ZodType>;\n\nexport type BasketballGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Basketball>;\nexport type CurlingGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Curling>;\nexport type FootballGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Football>;\n\nexport type GameStats = z.infer<(typeof SPORT_GAME_STATS_SCHEMAS)[LeagueType]>;\n\nexport const GameTeamSchema = z.object({\n teamId: teamIdSchema,\n});\nexport type GameTeam = z.infer<typeof GameTeamSchema>;\n\nconst sportGameBase = {\n leagueId: leagueIdSchema,\n weekId: scheduleWeekIdSchema,\n weekTitle: textFieldSchema(SCHEDULE_WEEK_TITLE_INPUT),\n weekLocation: z.string(),\n weekStartDate: epochMsSchema,\n startTime: epochMsSchema,\n dayKey: calendarDateSchema,\n locationLabel: z.string(),\n gameLocationId: gameLocationIdSchema.optional(),\n subLocation: gameLocationSubLocationSchema.optional(),\n status: gameStatusSchema,\n teams: z.tuple([GameTeamSchema, GameTeamSchema]),\n teamIds: z.array(teamIdSchema).min(1).max(2),\n score: z.record(teamIdSchema, countSchema),\n statEventSequence: countSchema,\n memos: z.record(z.string(), textFieldSchema(GAME_MEMO_INPUT)).optional(),\n absentRosterPlayerIds: z.array(gameRosterPlayerIdSchema),\n nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema).optional(),\n finalizedAt: epochMsSchema.optional(),\n reopenedAt: epochMsSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n};\n\nfunction rollupMatchesTeams(game: {\n teamIds: string[];\n score: Record<string, number>;\n stats: { teamStats: Record<string, unknown>; playerStats: Record<string, unknown> };\n}): boolean {\n const teams = new Set(game.teamIds);\n const namesEveryTeam = (keys: string[]) =>\n keys.length === teams.size && keys.every((key) => teams.has(key));\n return (\n namesEveryTeam(Object.keys(game.stats.teamStats)) &&\n namesEveryTeam(Object.keys(game.score)) &&\n Object.keys(game.stats.playerStats).every((key) =>\n teams.has(parseGameRosterPlayerId(key)?.teamId ?? ''),\n )\n );\n}\nconst ROLLUP_MISMATCH = \"The stats rollup and score mirror hold exactly the game's teams.\";\n\nexport const BasketballGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Basketball' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Basketball,\n jumpBallTeamId: teamIdSchema.optional(),\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type BasketballGame = z.infer<typeof BasketballGameSchema>;\n\nexport const CurlingGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Curling' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Curling,\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type CurlingGame = z.infer<typeof CurlingGameSchema>;\n\nexport const FootballGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Football' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Football,\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type FootballGame = z.infer<typeof FootballGameSchema>;\n\nexport const SportGameSchema = z.discriminatedUnion('leagueType', [\n BasketballGameSchema,\n CurlingGameSchema,\n FootballGameSchema,\n]);\nexport type SportGame = z.infer<typeof SportGameSchema>;\n\nexport const GameRosterPlayerSchema = z.object({\n userId: userIdSchema,\n teamId: teamIdSchema,\n isGhost: z.boolean(),\n syncedAt: epochMsSchema,\n});\nexport type GameRosterPlayer = z.infer<typeof GameRosterPlayerSchema>;\n"]}
@@ -190,78 +190,6 @@ export declare const StatsDestinationChangeSchema: z.ZodObject<{
190
190
  after: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
191
191
  }, z.core.$strict>;
192
192
  export type StatsDestinationChange = z.infer<typeof StatsDestinationChangeSchema>;
193
- export declare const GhostPlayerStatsOperationSchema: z.ZodObject<{
194
- kind: z.ZodLiteral<"ghostPlayerStats">;
195
- scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
196
- action: z.ZodLiteral<"link">;
197
- teamId: z.ZodString;
198
- ghostUserId: z.ZodString;
199
- userId: z.ZodString;
200
- }, z.core.$strict>, z.ZodObject<{
201
- action: z.ZodLiteral<"removal">;
202
- teamId: z.ZodString;
203
- ghostUserId: z.ZodString;
204
- }, z.core.$strict>], "action">;
205
- reason: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
206
- removedFinishedGameEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
207
- gameId: z.ZodString;
208
- wasAbsent: z.ZodBoolean;
209
- wasNonScoring: z.ZodBoolean;
210
- }, z.core.$strict>>>;
211
- removedOpenGameIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
212
- linkedGames: z.ZodOptional<z.ZodArray<z.ZodObject<{
213
- gameId: z.ZodString;
214
- completed: z.ZodBoolean;
215
- merged: z.ZodBoolean;
216
- }, z.core.$strict>>>;
217
- destinationChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
218
- ref: z.ZodString;
219
- field: z.ZodString;
220
- before: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
221
- after: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
222
- }, z.core.$strict>>>;
223
- membershipOutcome: z.ZodOptional<z.ZodEnum<{
224
- handedOver: "handedOver";
225
- created: "created";
226
- merged: "merged";
227
- kept: "kept";
228
- }>>;
229
- startedByUserId: z.ZodString;
230
- startedAt: z.ZodNumber;
231
- updatedAt: z.ZodNumber;
232
- status: z.ZodEnum<{
233
- running: "running";
234
- complete: "complete";
235
- stopped: "stopped";
236
- }>;
237
- resumeAfter: z.ZodOptional<z.ZodString>;
238
- counts: z.ZodObject<{
239
- read: z.ZodNumber;
240
- changed: z.ZodNumber;
241
- skipped: z.ZodNumber;
242
- }, z.core.$strict>;
243
- }, z.core.$strict>;
244
- export type GhostPlayerStatsOperation = z.infer<typeof GhostPlayerStatsOperationSchema>;
245
- export declare const GameDeletionOperationSchema: z.ZodObject<{
246
- kind: z.ZodLiteral<"gameDeletion">;
247
- scope: z.ZodObject<{
248
- gameId: z.ZodString;
249
- }, z.core.$strict>;
250
- startedByUserId: z.ZodString;
251
- startedAt: z.ZodNumber;
252
- updatedAt: z.ZodNumber;
253
- status: z.ZodEnum<{
254
- running: "running";
255
- complete: "complete";
256
- stopped: "stopped";
257
- }>;
258
- resumeAfter: z.ZodOptional<z.ZodString>;
259
- counts: z.ZodObject<{
260
- read: z.ZodNumber;
261
- changed: z.ZodNumber;
262
- skipped: z.ZodNumber;
263
- }, z.core.$strict>;
264
- }, z.core.$strict>;
265
193
  export declare const StatsOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
266
194
  kind: z.ZodLiteral<"leagueStatsRebuild">;
267
195
  scope: z.ZodObject<{
@@ -421,75 +349,6 @@ export declare const StatsOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
421
349
  changed: z.ZodNumber;
422
350
  skipped: z.ZodNumber;
423
351
  }, z.core.$strict>;
424
- }, z.core.$strict>, z.ZodObject<{
425
- kind: z.ZodLiteral<"ghostPlayerStats">;
426
- scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
427
- action: z.ZodLiteral<"link">;
428
- teamId: z.ZodString;
429
- ghostUserId: z.ZodString;
430
- userId: z.ZodString;
431
- }, z.core.$strict>, z.ZodObject<{
432
- action: z.ZodLiteral<"removal">;
433
- teamId: z.ZodString;
434
- ghostUserId: z.ZodString;
435
- }, z.core.$strict>], "action">;
436
- reason: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
437
- removedFinishedGameEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
438
- gameId: z.ZodString;
439
- wasAbsent: z.ZodBoolean;
440
- wasNonScoring: z.ZodBoolean;
441
- }, z.core.$strict>>>;
442
- removedOpenGameIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
443
- linkedGames: z.ZodOptional<z.ZodArray<z.ZodObject<{
444
- gameId: z.ZodString;
445
- completed: z.ZodBoolean;
446
- merged: z.ZodBoolean;
447
- }, z.core.$strict>>>;
448
- destinationChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
449
- ref: z.ZodString;
450
- field: z.ZodString;
451
- before: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
452
- after: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
453
- }, z.core.$strict>>>;
454
- membershipOutcome: z.ZodOptional<z.ZodEnum<{
455
- handedOver: "handedOver";
456
- created: "created";
457
- merged: "merged";
458
- kept: "kept";
459
- }>>;
460
- startedByUserId: z.ZodString;
461
- startedAt: z.ZodNumber;
462
- updatedAt: z.ZodNumber;
463
- status: z.ZodEnum<{
464
- running: "running";
465
- complete: "complete";
466
- stopped: "stopped";
467
- }>;
468
- resumeAfter: z.ZodOptional<z.ZodString>;
469
- counts: z.ZodObject<{
470
- read: z.ZodNumber;
471
- changed: z.ZodNumber;
472
- skipped: z.ZodNumber;
473
- }, z.core.$strict>;
474
- }, z.core.$strict>, z.ZodObject<{
475
- kind: z.ZodLiteral<"gameDeletion">;
476
- scope: z.ZodObject<{
477
- gameId: z.ZodString;
478
- }, z.core.$strict>;
479
- startedByUserId: z.ZodString;
480
- startedAt: z.ZodNumber;
481
- updatedAt: z.ZodNumber;
482
- status: z.ZodEnum<{
483
- running: "running";
484
- complete: "complete";
485
- stopped: "stopped";
486
- }>;
487
- resumeAfter: z.ZodOptional<z.ZodString>;
488
- counts: z.ZodObject<{
489
- read: z.ZodNumber;
490
- changed: z.ZodNumber;
491
- skipped: z.ZodNumber;
492
- }, z.core.$strict>;
493
352
  }, z.core.$strict>], "kind">;
494
353
  export type StatsOperation = z.infer<typeof StatsOperationSchema>;
495
354
  //# sourceMappingURL=stats-operation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stats-operation.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/stats-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,0BAA0B;;;;kBAIrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAuB9E,eAAO,MAAM,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,MAAM,4BAA4B;;;;;kBAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAQ/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { GHOST_LINK_MEMBERSHIP_OUTCOME_KEYS, STATS_OPERATION_STATUS_KEYS, STATS_VALIDATION_PHASE_KEYS, } from '../types/stats.js';
3
- import { countSchema, epochMsSchema, gameIdSchema, leagueIdSchema, repairReasonSchema, sportKeySchema, teamIdSchema, userIdSchema, } from './atoms.js';
2
+ import { STATS_OPERATION_STATUS_KEYS, STATS_VALIDATION_PHASE_KEYS } from '../types/stats.js';
3
+ import { countSchema, epochMsSchema, gameIdSchema, leagueIdSchema, repairReasonSchema, sportKeySchema, userIdSchema, } from './atoms.js';
4
4
  import { StatsValidationScopeSchema } from './system.js';
5
5
  export const StatsOperationCountsSchema = z.strictObject({
6
6
  read: countSchema,
@@ -81,43 +81,6 @@ export const StatsDestinationChangeSchema = z.strictObject({
81
81
  before: z.record(z.string(), z.number()).nullable(),
82
82
  after: z.record(z.string(), z.number()).nullable(),
83
83
  });
84
- export const GhostPlayerStatsOperationSchema = z
85
- .strictObject({
86
- ...operationBase,
87
- kind: z.literal('ghostPlayerStats'),
88
- scope: z.discriminatedUnion('action', [
89
- z.strictObject({
90
- action: z.literal('link'),
91
- teamId: teamIdSchema,
92
- ghostUserId: userIdSchema,
93
- userId: userIdSchema,
94
- }),
95
- z.strictObject({
96
- action: z.literal('removal'),
97
- teamId: teamIdSchema,
98
- ghostUserId: userIdSchema,
99
- }),
100
- ]),
101
- // Present only on an operation stored with a reason. A removal's is dropped on read; a link's
102
- // is kept, so its stored operation still resumes.
103
- reason: repairReasonSchema.optional(),
104
- removedFinishedGameEntries: z.array(GhostRemovedFinishedEntrySchema).optional(),
105
- removedOpenGameIds: z.array(gameIdSchema).optional(),
106
- linkedGames: z.array(GhostLinkedGameSchema).optional(),
107
- destinationChanges: z.array(StatsDestinationChangeSchema).optional(),
108
- membershipOutcome: z.enum(GHOST_LINK_MEMBERSHIP_OUTCOME_KEYS).optional(),
109
- })
110
- .overwrite((operation) => {
111
- if (operation.scope.action !== 'removal' || operation.reason === undefined)
112
- return operation;
113
- const { reason: _reason, ...withoutReason } = operation;
114
- return withoutReason;
115
- });
116
- export const GameDeletionOperationSchema = z.strictObject({
117
- ...operationBase,
118
- kind: z.literal('gameDeletion'),
119
- scope: gameScope,
120
- });
121
84
  export const StatsOperationSchema = z.discriminatedUnion('kind', [
122
85
  LeagueStatsRebuildOperationSchema,
123
86
  LifetimeStatsRebuildOperationSchema,
@@ -126,7 +89,5 @@ export const StatsOperationSchema = z.discriminatedUnion('kind', [
126
89
  GameStatsCorrectionOperationSchema,
127
90
  GameStatsRecalculationOperationSchema,
128
91
  HistoricalStatsUpdateOperationSchema,
129
- GhostPlayerStatsOperationSchema,
130
- GameDeletionOperationSchema,
131
92
  ]);
132
93
  //# sourceMappingURL=stats-operation.js.map