@ttt-productions/q-core 0.1.28 → 0.1.30

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 (496) hide show
  1. package/dist/constants/admin-views.d.ts.map +1 -1
  2. package/dist/constants/admin-views.js +0 -3
  3. package/dist/constants/admin-views.js.map +1 -1
  4. package/dist/constants/business.d.ts.map +1 -1
  5. package/dist/constants/business.js +0 -52
  6. package/dist/constants/business.js.map +1 -1
  7. package/dist/constants/deployment.d.ts +0 -2
  8. package/dist/constants/deployment.d.ts.map +1 -1
  9. package/dist/constants/deployment.js +0 -2
  10. package/dist/constants/deployment.js.map +1 -1
  11. package/dist/constants/media.d.ts.map +1 -1
  12. package/dist/constants/media.js +4 -30
  13. package/dist/constants/media.js.map +1 -1
  14. package/dist/constants/scheduled-jobs.d.ts +0 -25
  15. package/dist/constants/scheduled-jobs.d.ts.map +1 -1
  16. package/dist/constants/scheduled-jobs.js +0 -26
  17. package/dist/constants/scheduled-jobs.js.map +1 -1
  18. package/dist/constants/sports.d.ts +1 -0
  19. package/dist/constants/sports.d.ts.map +1 -1
  20. package/dist/constants/sports.js +4 -25
  21. package/dist/constants/sports.js.map +1 -1
  22. package/dist/constants/storage-keys.d.ts +0 -38
  23. package/dist/constants/storage-keys.d.ts.map +1 -1
  24. package/dist/constants/storage-keys.js +0 -41
  25. package/dist/constants/storage-keys.js.map +1 -1
  26. package/dist/constants/telemetry.d.ts +0 -3
  27. package/dist/constants/telemetry.d.ts.map +1 -1
  28. package/dist/constants/telemetry.js +2 -11
  29. package/dist/constants/telemetry.js.map +1 -1
  30. package/dist/doc-schemas/admin-notifications.d.ts +1 -2
  31. package/dist/doc-schemas/admin-notifications.d.ts.map +1 -1
  32. package/dist/doc-schemas/admin-notifications.js +0 -41
  33. package/dist/doc-schemas/admin-notifications.js.map +1 -1
  34. package/dist/doc-schemas/aggregate-stats.d.ts.map +1 -1
  35. package/dist/doc-schemas/aggregate-stats.js +0 -35
  36. package/dist/doc-schemas/aggregate-stats.js.map +1 -1
  37. package/dist/doc-schemas/atoms.d.ts +0 -17
  38. package/dist/doc-schemas/atoms.d.ts.map +1 -1
  39. package/dist/doc-schemas/atoms.js +0 -36
  40. package/dist/doc-schemas/atoms.js.map +1 -1
  41. package/dist/doc-schemas/audit-event.d.ts +2 -0
  42. package/dist/doc-schemas/audit-event.d.ts.map +1 -1
  43. package/dist/doc-schemas/audit-event.js +0 -8
  44. package/dist/doc-schemas/audit-event.js.map +1 -1
  45. package/dist/doc-schemas/award-group-grant.d.ts +2 -8
  46. package/dist/doc-schemas/award-group-grant.d.ts.map +1 -1
  47. package/dist/doc-schemas/award-group-grant.js +0 -25
  48. package/dist/doc-schemas/award-group-grant.js.map +1 -1
  49. package/dist/doc-schemas/catalogs.d.ts.map +1 -1
  50. package/dist/doc-schemas/catalogs.js +0 -12
  51. package/dist/doc-schemas/catalogs.js.map +1 -1
  52. package/dist/doc-schemas/firestore-primitives.d.ts.map +1 -1
  53. package/dist/doc-schemas/firestore-primitives.js +0 -5
  54. package/dist/doc-schemas/firestore-primitives.js.map +1 -1
  55. package/dist/doc-schemas/gallery.d.ts.map +1 -1
  56. package/dist/doc-schemas/gallery.js +9 -18
  57. package/dist/doc-schemas/gallery.js.map +1 -1
  58. package/dist/doc-schemas/game-location.d.ts.map +1 -1
  59. package/dist/doc-schemas/game-location.js +2 -11
  60. package/dist/doc-schemas/game-location.js.map +1 -1
  61. package/dist/doc-schemas/game-stat-history.d.ts.map +1 -1
  62. package/dist/doc-schemas/game-stat-history.js +2 -11
  63. package/dist/doc-schemas/game-stat-history.js.map +1 -1
  64. package/dist/doc-schemas/game-stats.d.ts.map +1 -1
  65. package/dist/doc-schemas/game-stats.js +0 -56
  66. package/dist/doc-schemas/game-stats.js.map +1 -1
  67. package/dist/doc-schemas/league-team.d.ts.map +1 -1
  68. package/dist/doc-schemas/league-team.js +6 -29
  69. package/dist/doc-schemas/league-team.js.map +1 -1
  70. package/dist/doc-schemas/membership-roster-sync.d.ts.map +1 -1
  71. package/dist/doc-schemas/membership-roster-sync.js +0 -17
  72. package/dist/doc-schemas/membership-roster-sync.js.map +1 -1
  73. package/dist/doc-schemas/migration-console.d.ts +21 -15
  74. package/dist/doc-schemas/migration-console.d.ts.map +1 -1
  75. package/dist/doc-schemas/migration-console.js +0 -32
  76. package/dist/doc-schemas/migration-console.js.map +1 -1
  77. package/dist/doc-schemas/pending-media.d.ts.map +1 -1
  78. package/dist/doc-schemas/pending-media.js +8 -20
  79. package/dist/doc-schemas/pending-media.js.map +1 -1
  80. package/dist/doc-schemas/picture-retirement.d.ts.map +1 -1
  81. package/dist/doc-schemas/picture-retirement.js +8 -13
  82. package/dist/doc-schemas/picture-retirement.js.map +1 -1
  83. package/dist/doc-schemas/publicUser.d.ts.map +1 -1
  84. package/dist/doc-schemas/publicUser.js +0 -5
  85. package/dist/doc-schemas/publicUser.js.map +1 -1
  86. package/dist/doc-schemas/registration-start.d.ts.map +1 -1
  87. package/dist/doc-schemas/registration-start.js +2 -5
  88. package/dist/doc-schemas/registration-start.js.map +1 -1
  89. package/dist/doc-schemas/registry.d.ts +25 -14
  90. package/dist/doc-schemas/registry.d.ts.map +1 -1
  91. package/dist/doc-schemas/registry.js +0 -10
  92. package/dist/doc-schemas/registry.js.map +1 -1
  93. package/dist/doc-schemas/reserved-display-name.d.ts.map +1 -1
  94. package/dist/doc-schemas/reserved-display-name.js +0 -5
  95. package/dist/doc-schemas/reserved-display-name.js.map +1 -1
  96. package/dist/doc-schemas/sport-game.d.ts.map +1 -1
  97. package/dist/doc-schemas/sport-game.js +1 -29
  98. package/dist/doc-schemas/sport-game.js.map +1 -1
  99. package/dist/doc-schemas/sport-league.d.ts +0 -9
  100. package/dist/doc-schemas/sport-league.d.ts.map +1 -1
  101. package/dist/doc-schemas/sport-league.js +4 -26
  102. package/dist/doc-schemas/sport-league.js.map +1 -1
  103. package/dist/doc-schemas/stats-operation.d.ts +22 -18
  104. package/dist/doc-schemas/stats-operation.d.ts.map +1 -1
  105. package/dist/doc-schemas/stats-operation.js +7 -44
  106. package/dist/doc-schemas/stats-operation.js.map +1 -1
  107. package/dist/doc-schemas/status-reconcile-queue.d.ts +0 -6
  108. package/dist/doc-schemas/status-reconcile-queue.d.ts.map +1 -1
  109. package/dist/doc-schemas/status-reconcile-queue.js +0 -13
  110. package/dist/doc-schemas/status-reconcile-queue.js.map +1 -1
  111. package/dist/doc-schemas/sweep-state.d.ts.map +1 -1
  112. package/dist/doc-schemas/sweep-state.js +4 -20
  113. package/dist/doc-schemas/sweep-state.js.map +1 -1
  114. package/dist/doc-schemas/system.d.ts.map +1 -1
  115. package/dist/doc-schemas/system.js +1 -27
  116. package/dist/doc-schemas/system.js.map +1 -1
  117. package/dist/doc-schemas/team-membership.d.ts.map +1 -1
  118. package/dist/doc-schemas/team-membership.js +0 -10
  119. package/dist/doc-schemas/team-membership.js.map +1 -1
  120. package/dist/doc-schemas/user-profile.d.ts +0 -1
  121. package/dist/doc-schemas/user-profile.d.ts.map +1 -1
  122. package/dist/doc-schemas/user-profile.js +0 -28
  123. package/dist/doc-schemas/user-profile.js.map +1 -1
  124. package/dist/doc-schemas/waiver-template.d.ts.map +1 -1
  125. package/dist/doc-schemas/waiver-template.js +4 -25
  126. package/dist/doc-schemas/waiver-template.js.map +1 -1
  127. package/dist/doc-schemas/waivers-and-hardware.d.ts.map +1 -1
  128. package/dist/doc-schemas/waivers-and-hardware.js +0 -20
  129. package/dist/doc-schemas/waivers-and-hardware.js.map +1 -1
  130. package/dist/domain-events/domain-events.d.ts.map +1 -1
  131. package/dist/domain-events/domain-events.js +0 -67
  132. package/dist/domain-events/domain-events.js.map +1 -1
  133. package/dist/ids/award-grant-ids.d.ts.map +1 -1
  134. package/dist/ids/award-grant-ids.js +0 -7
  135. package/dist/ids/award-grant-ids.js.map +1 -1
  136. package/dist/ids/compound-ids.d.ts.map +1 -1
  137. package/dist/ids/compound-ids.js +0 -7
  138. package/dist/ids/compound-ids.js.map +1 -1
  139. package/dist/ids/minted-ids.d.ts.map +1 -1
  140. package/dist/ids/minted-ids.js +4 -14
  141. package/dist/ids/minted-ids.js.map +1 -1
  142. package/dist/ids/notification-ids.d.ts.map +1 -1
  143. package/dist/ids/notification-ids.js +0 -15
  144. package/dist/ids/notification-ids.js.map +1 -1
  145. package/dist/ids/picture-ids.d.ts +0 -5
  146. package/dist/ids/picture-ids.d.ts.map +1 -1
  147. package/dist/ids/picture-ids.js +0 -11
  148. package/dist/ids/picture-ids.js.map +1 -1
  149. package/dist/ids/stat-event-ids.d.ts +0 -6
  150. package/dist/ids/stat-event-ids.d.ts.map +1 -1
  151. package/dist/ids/stat-event-ids.js +0 -15
  152. package/dist/ids/stat-event-ids.js.map +1 -1
  153. package/dist/ids/stats-operation-ids.d.ts.map +1 -1
  154. package/dist/ids/stats-operation-ids.js +0 -7
  155. package/dist/ids/stats-operation-ids.js.map +1 -1
  156. package/dist/ids/waiver-template-ids.d.ts +0 -1
  157. package/dist/ids/waiver-template-ids.d.ts.map +1 -1
  158. package/dist/ids/waiver-template-ids.js +0 -2
  159. package/dist/ids/waiver-template-ids.js.map +1 -1
  160. package/dist/index.d.ts +2 -0
  161. package/dist/index.d.ts.map +1 -1
  162. package/dist/index.js +2 -2
  163. package/dist/index.js.map +1 -1
  164. package/dist/input-formats/input-formats.d.ts +0 -80
  165. package/dist/input-formats/input-formats.d.ts.map +1 -1
  166. package/dist/input-formats/input-formats.js +0 -86
  167. package/dist/input-formats/input-formats.js.map +1 -1
  168. package/dist/media/file-origins.d.ts +0 -3
  169. package/dist/media/file-origins.d.ts.map +1 -1
  170. package/dist/media/file-origins.js +0 -26
  171. package/dist/media/file-origins.js.map +1 -1
  172. package/dist/media/picture-aspects.d.ts +0 -2
  173. package/dist/media/picture-aspects.d.ts.map +1 -1
  174. package/dist/media/picture-aspects.js +0 -5
  175. package/dist/media/picture-aspects.js.map +1 -1
  176. package/dist/media/picture-url.d.ts +0 -6
  177. package/dist/media/picture-url.d.ts.map +1 -1
  178. package/dist/media/picture-url.js +0 -9
  179. package/dist/media/picture-url.js.map +1 -1
  180. package/dist/media/upload-tray-display.d.ts +0 -3
  181. package/dist/media/upload-tray-display.d.ts.map +1 -1
  182. package/dist/media/upload-tray-display.js +0 -6
  183. package/dist/media/upload-tray-display.js.map +1 -1
  184. package/dist/migration-console/action-ids.d.ts +4 -1
  185. package/dist/migration-console/action-ids.d.ts.map +1 -1
  186. package/dist/migration-console/action-ids.js +8 -45
  187. package/dist/migration-console/action-ids.js.map +1 -1
  188. package/dist/migration-console/console-lock.d.ts +10 -0
  189. package/dist/migration-console/console-lock.d.ts.map +1 -0
  190. package/dist/migration-console/console-lock.js +14 -0
  191. package/dist/migration-console/console-lock.js.map +1 -0
  192. package/dist/migration-console/consumed-source.d.ts +4 -0
  193. package/dist/migration-console/consumed-source.d.ts.map +1 -0
  194. package/dist/migration-console/consumed-source.js +10 -0
  195. package/dist/migration-console/consumed-source.js.map +1 -0
  196. package/dist/migration-console/manifest.d.ts +2 -24
  197. package/dist/migration-console/manifest.d.ts.map +1 -1
  198. package/dist/migration-console/manifest.js +174 -61
  199. package/dist/migration-console/manifest.js.map +1 -1
  200. package/dist/migration-console/run-state.d.ts +2 -14
  201. package/dist/migration-console/run-state.d.ts.map +1 -1
  202. package/dist/migration-console/run-state.js +3 -16
  203. package/dist/migration-console/run-state.js.map +1 -1
  204. package/dist/notifications/admin-notification-config.d.ts +0 -11
  205. package/dist/notifications/admin-notification-config.d.ts.map +1 -1
  206. package/dist/notifications/admin-notification-config.js +2 -13
  207. package/dist/notifications/admin-notification-config.js.map +1 -1
  208. package/dist/notifications/archive-all.d.ts.map +1 -1
  209. package/dist/notifications/archive-all.js +0 -2
  210. package/dist/notifications/archive-all.js.map +1 -1
  211. package/dist/notifications/occurrences.d.ts +0 -3
  212. package/dist/notifications/occurrences.d.ts.map +1 -1
  213. package/dist/notifications/occurrences.js +0 -7
  214. package/dist/notifications/occurrences.js.map +1 -1
  215. package/dist/paths/app-routes.d.ts +0 -12
  216. package/dist/paths/app-routes.d.ts.map +1 -1
  217. package/dist/paths/app-routes.js +0 -18
  218. package/dist/paths/app-routes.js.map +1 -1
  219. package/dist/paths/collection-groups.d.ts.map +1 -1
  220. package/dist/paths/collection-groups.js +0 -5
  221. package/dist/paths/collection-groups.js.map +1 -1
  222. package/dist/paths/collection-refs.d.ts.map +1 -1
  223. package/dist/paths/collection-refs.js +0 -4
  224. package/dist/paths/collection-refs.js.map +1 -1
  225. package/dist/paths/collections.d.ts +0 -5
  226. package/dist/paths/collections.d.ts.map +1 -1
  227. package/dist/paths/collections.js +0 -68
  228. package/dist/paths/collections.js.map +1 -1
  229. package/dist/paths/path-builders.d.ts.map +1 -1
  230. package/dist/paths/path-builders.js +0 -16
  231. package/dist/paths/path-builders.js.map +1 -1
  232. package/dist/paths/picture-owner-paths.d.ts +0 -4
  233. package/dist/paths/picture-owner-paths.d.ts.map +1 -1
  234. package/dist/paths/picture-owner-paths.js +2 -11
  235. package/dist/paths/picture-owner-paths.js.map +1 -1
  236. package/dist/paths/storage-paths.d.ts +0 -18
  237. package/dist/paths/storage-paths.d.ts.map +1 -1
  238. package/dist/paths/storage-paths.js +0 -23
  239. package/dist/paths/storage-paths.js.map +1 -1
  240. package/dist/paths/utils.d.ts +0 -6
  241. package/dist/paths/utils.d.ts.map +1 -1
  242. package/dist/paths/utils.js +0 -9
  243. package/dist/paths/utils.js.map +1 -1
  244. package/dist/schemas/account-settings.d.ts.map +1 -1
  245. package/dist/schemas/account-settings.js +0 -7
  246. package/dist/schemas/account-settings.js.map +1 -1
  247. package/dist/schemas/admin-notifications.d.ts.map +1 -1
  248. package/dist/schemas/admin-notifications.js +0 -17
  249. package/dist/schemas/admin-notifications.js.map +1 -1
  250. package/dist/schemas/admin-stats.d.ts.map +1 -1
  251. package/dist/schemas/admin-stats.js +0 -9
  252. package/dist/schemas/admin-stats.js.map +1 -1
  253. package/dist/schemas/app-config.d.ts.map +1 -1
  254. package/dist/schemas/app-config.js +0 -10
  255. package/dist/schemas/app-config.js.map +1 -1
  256. package/dist/schemas/atoms.d.ts.map +1 -1
  257. package/dist/schemas/atoms.js +0 -10
  258. package/dist/schemas/atoms.js.map +1 -1
  259. package/dist/schemas/awards.d.ts +3 -3
  260. package/dist/schemas/awards.d.ts.map +1 -1
  261. package/dist/schemas/awards.js +0 -29
  262. package/dist/schemas/awards.js.map +1 -1
  263. package/dist/schemas/dead-letters.d.ts +0 -3
  264. package/dist/schemas/dead-letters.d.ts.map +1 -1
  265. package/dist/schemas/dead-letters.js +0 -15
  266. package/dist/schemas/dead-letters.js.map +1 -1
  267. package/dist/schemas/game-locations.d.ts.map +1 -1
  268. package/dist/schemas/game-locations.js +0 -6
  269. package/dist/schemas/game-locations.js.map +1 -1
  270. package/dist/schemas/hardware-loan-contracts.d.ts.map +1 -1
  271. package/dist/schemas/hardware-loan-contracts.js +0 -13
  272. package/dist/schemas/hardware-loan-contracts.js.map +1 -1
  273. package/dist/schemas/index.d.ts.map +1 -1
  274. package/dist/schemas/index.js +0 -2
  275. package/dist/schemas/index.js.map +1 -1
  276. package/dist/schemas/leagues.d.ts.map +1 -1
  277. package/dist/schemas/leagues.js +0 -24
  278. package/dist/schemas/leagues.js.map +1 -1
  279. package/dist/schemas/migration-console.d.ts +58 -15
  280. package/dist/schemas/migration-console.d.ts.map +1 -1
  281. package/dist/schemas/migration-console.js +4 -34
  282. package/dist/schemas/migration-console.js.map +1 -1
  283. package/dist/schemas/pictures.d.ts.map +1 -1
  284. package/dist/schemas/pictures.js +0 -10
  285. package/dist/schemas/pictures.js.map +1 -1
  286. package/dist/schemas/schedules.d.ts.map +1 -1
  287. package/dist/schemas/schedules.js +0 -26
  288. package/dist/schemas/schedules.js.map +1 -1
  289. package/dist/schemas/scoring.d.ts +20 -26
  290. package/dist/schemas/scoring.d.ts.map +1 -1
  291. package/dist/schemas/scoring.js +0 -33
  292. package/dist/schemas/scoring.js.map +1 -1
  293. package/dist/schemas/signed-waivers.d.ts.map +1 -1
  294. package/dist/schemas/signed-waivers.js +0 -22
  295. package/dist/schemas/signed-waivers.js.map +1 -1
  296. package/dist/schemas/stats.d.ts +12 -0
  297. package/dist/schemas/stats.d.ts.map +1 -1
  298. package/dist/schemas/stats.js +21 -61
  299. package/dist/schemas/stats.js.map +1 -1
  300. package/dist/schemas/team-joining.d.ts.map +1 -1
  301. package/dist/schemas/team-joining.js +0 -30
  302. package/dist/schemas/team-joining.js.map +1 -1
  303. package/dist/schemas/teams.d.ts +0 -1
  304. package/dist/schemas/teams.d.ts.map +1 -1
  305. package/dist/schemas/teams.js +0 -83
  306. package/dist/schemas/teams.js.map +1 -1
  307. package/dist/schemas/uploads.d.ts +0 -8
  308. package/dist/schemas/uploads.d.ts.map +1 -1
  309. package/dist/schemas/uploads.js +0 -29
  310. package/dist/schemas/uploads.js.map +1 -1
  311. package/dist/schemas/users.d.ts +0 -1
  312. package/dist/schemas/users.d.ts.map +1 -1
  313. package/dist/schemas/users.js +0 -41
  314. package/dist/schemas/users.js.map +1 -1
  315. package/dist/schemas/waiver-templates.d.ts.map +1 -1
  316. package/dist/schemas/waiver-templates.js +0 -7
  317. package/dist/schemas/waiver-templates.js.map +1 -1
  318. package/dist/sports/basketball-scoring.d.ts +0 -4
  319. package/dist/sports/basketball-scoring.d.ts.map +1 -1
  320. package/dist/sports/basketball-scoring.js +0 -34
  321. package/dist/sports/basketball-scoring.js.map +1 -1
  322. package/dist/sports/basketball.d.ts.map +1 -1
  323. package/dist/sports/basketball.js +0 -5
  324. package/dist/sports/basketball.js.map +1 -1
  325. package/dist/sports/bulk-entry.d.ts +0 -22
  326. package/dist/sports/bulk-entry.d.ts.map +1 -1
  327. package/dist/sports/bulk-entry.js +0 -10
  328. package/dist/sports/bulk-entry.js.map +1 -1
  329. package/dist/sports/column-catalog.d.ts +0 -17
  330. package/dist/sports/column-catalog.d.ts.map +1 -1
  331. package/dist/sports/column-catalog.js +0 -10
  332. package/dist/sports/column-catalog.js.map +1 -1
  333. package/dist/sports/contribution.d.ts +2 -59
  334. package/dist/sports/contribution.d.ts.map +1 -1
  335. package/dist/sports/contribution.js +2 -45
  336. package/dist/sports/contribution.js.map +1 -1
  337. package/dist/sports/curling-scoring.d.ts +0 -1
  338. package/dist/sports/curling-scoring.d.ts.map +1 -1
  339. package/dist/sports/curling-scoring.js +0 -27
  340. package/dist/sports/curling-scoring.js.map +1 -1
  341. package/dist/sports/curling.d.ts.map +1 -1
  342. package/dist/sports/curling.js +0 -4
  343. package/dist/sports/curling.js.map +1 -1
  344. package/dist/sports/finalized-record.d.ts +2 -19
  345. package/dist/sports/finalized-record.d.ts.map +1 -1
  346. package/dist/sports/finalized-record.js +21 -22
  347. package/dist/sports/finalized-record.js.map +1 -1
  348. package/dist/sports/football-scoring.d.ts.map +1 -1
  349. package/dist/sports/football-scoring.js +0 -21
  350. package/dist/sports/football-scoring.js.map +1 -1
  351. package/dist/sports/football.d.ts.map +1 -1
  352. package/dist/sports/football.js +0 -4
  353. package/dist/sports/football.js.map +1 -1
  354. package/dist/sports/index.d.ts.map +1 -1
  355. package/dist/sports/index.js +0 -2
  356. package/dist/sports/index.js.map +1 -1
  357. package/dist/sports/ledger-continuity.d.ts +0 -2
  358. package/dist/sports/ledger-continuity.d.ts.map +1 -1
  359. package/dist/sports/ledger-continuity.js +0 -5
  360. package/dist/sports/ledger-continuity.js.map +1 -1
  361. package/dist/sports/lifetime-summary.d.ts +0 -6
  362. package/dist/sports/lifetime-summary.d.ts.map +1 -1
  363. package/dist/sports/lifetime-summary.js +0 -7
  364. package/dist/sports/lifetime-summary.js.map +1 -1
  365. package/dist/sports/rankings.d.ts +0 -12
  366. package/dist/sports/rankings.d.ts.map +1 -1
  367. package/dist/sports/rankings.js +0 -15
  368. package/dist/sports/rankings.js.map +1 -1
  369. package/dist/sports/registry.d.ts +0 -10
  370. package/dist/sports/registry.d.ts.map +1 -1
  371. package/dist/sports/registry.js +0 -9
  372. package/dist/sports/registry.js.map +1 -1
  373. package/dist/sports/replay.d.ts +0 -11
  374. package/dist/sports/replay.d.ts.map +1 -1
  375. package/dist/sports/replay.js +0 -16
  376. package/dist/sports/replay.js.map +1 -1
  377. package/dist/sports/rollup-check.d.ts +0 -7
  378. package/dist/sports/rollup-check.d.ts.map +1 -1
  379. package/dist/sports/rollup-check.js +0 -14
  380. package/dist/sports/rollup-check.js.map +1 -1
  381. package/dist/sports/score-mirror.d.ts +0 -1
  382. package/dist/sports/score-mirror.d.ts.map +1 -1
  383. package/dist/sports/score-mirror.js +0 -4
  384. package/dist/sports/score-mirror.js.map +1 -1
  385. package/dist/sports/scoring-display.d.ts +0 -30
  386. package/dist/sports/scoring-display.d.ts.map +1 -1
  387. package/dist/sports/scoring-display.js +0 -9
  388. package/dist/sports/scoring-display.js.map +1 -1
  389. package/dist/sports/scoring.d.ts +0 -36
  390. package/dist/sports/scoring.d.ts.map +1 -1
  391. package/dist/sports/scoring.js +0 -10
  392. package/dist/sports/scoring.js.map +1 -1
  393. package/dist/sports/shared-columns.d.ts +0 -1
  394. package/dist/sports/shared-columns.d.ts.map +1 -1
  395. package/dist/sports/shared-columns.js +0 -7
  396. package/dist/sports/shared-columns.js.map +1 -1
  397. package/dist/sports/sport-adapter.d.ts +0 -32
  398. package/dist/sports/sport-adapter.d.ts.map +1 -1
  399. package/dist/sports/sport-adapter.js +0 -7
  400. package/dist/sports/sport-adapter.js.map +1 -1
  401. package/dist/sports/store-driver.d.ts +0 -28
  402. package/dist/sports/store-driver.d.ts.map +1 -1
  403. package/dist/sports/store-driver.js +0 -38
  404. package/dist/sports/store-driver.js.map +1 -1
  405. package/dist/types/audit.d.ts +1 -1
  406. package/dist/types/audit.d.ts.map +1 -1
  407. package/dist/types/audit.js +1 -67
  408. package/dist/types/audit.js.map +1 -1
  409. package/dist/types/claims.d.ts +0 -10
  410. package/dist/types/claims.d.ts.map +1 -1
  411. package/dist/types/claims.js +0 -16
  412. package/dist/types/claims.js.map +1 -1
  413. package/dist/types/notifications.d.ts.map +1 -1
  414. package/dist/types/notifications.js +7 -25
  415. package/dist/types/notifications.js.map +1 -1
  416. package/dist/types/picture-owners.d.ts +0 -1
  417. package/dist/types/picture-owners.d.ts.map +1 -1
  418. package/dist/types/picture-owners.js +0 -6
  419. package/dist/types/picture-owners.js.map +1 -1
  420. package/dist/types/schedules.d.ts.map +1 -1
  421. package/dist/types/schedules.js +0 -9
  422. package/dist/types/schedules.js.map +1 -1
  423. package/dist/types/sports.d.ts.map +1 -1
  424. package/dist/types/sports.js +0 -24
  425. package/dist/types/sports.js.map +1 -1
  426. package/dist/types/stats.d.ts.map +1 -1
  427. package/dist/types/stats.js +0 -65
  428. package/dist/types/stats.js.map +1 -1
  429. package/dist/types/unions.d.ts +0 -2
  430. package/dist/types/unions.d.ts.map +1 -1
  431. package/dist/types/unions.js +3 -91
  432. package/dist/types/unions.js.map +1 -1
  433. package/dist/types/uploads.d.ts.map +1 -1
  434. package/dist/types/uploads.js +0 -7
  435. package/dist/types/uploads.js.map +1 -1
  436. package/dist/upload-variables/on-progress.d.ts.map +1 -1
  437. package/dist/upload-variables/on-progress.js +2 -5
  438. package/dist/upload-variables/on-progress.js.map +1 -1
  439. package/dist/upload-variables/picture-upload-variables.d.ts +0 -1
  440. package/dist/upload-variables/picture-upload-variables.d.ts.map +1 -1
  441. package/dist/upload-variables/picture-upload-variables.js +0 -4
  442. package/dist/upload-variables/picture-upload-variables.js.map +1 -1
  443. package/dist/upload-variables/sign-hardware-contract-variables.d.ts.map +1 -1
  444. package/dist/upload-variables/sign-hardware-contract-variables.js +0 -2
  445. package/dist/upload-variables/sign-hardware-contract-variables.js.map +1 -1
  446. package/dist/upload-variables/sign-waiver-variables.d.ts.map +1 -1
  447. package/dist/upload-variables/sign-waiver-variables.js +0 -4
  448. package/dist/upload-variables/sign-waiver-variables.js.map +1 -1
  449. package/dist/utils/account-status.d.ts.map +1 -1
  450. package/dist/utils/account-status.js +0 -4
  451. package/dist/utils/account-status.js.map +1 -1
  452. package/dist/utils/app-config.d.ts +0 -53
  453. package/dist/utils/app-config.d.ts.map +1 -1
  454. package/dist/utils/app-config.js +0 -62
  455. package/dist/utils/app-config.js.map +1 -1
  456. package/dist/utils/display-name.d.ts +0 -7
  457. package/dist/utils/display-name.d.ts.map +1 -1
  458. package/dist/utils/display-name.js +0 -8
  459. package/dist/utils/display-name.js.map +1 -1
  460. package/dist/utils/index.d.ts +1 -0
  461. package/dist/utils/index.d.ts.map +1 -1
  462. package/dist/utils/index.js +1 -0
  463. package/dist/utils/index.js.map +1 -1
  464. package/dist/utils/league-calendar.d.ts +0 -11
  465. package/dist/utils/league-calendar.d.ts.map +1 -1
  466. package/dist/utils/league-calendar.js +7 -19
  467. package/dist/utils/league-calendar.js.map +1 -1
  468. package/dist/utils/league-join-warning.d.ts +0 -11
  469. package/dist/utils/league-join-warning.d.ts.map +1 -1
  470. package/dist/utils/league-join-warning.js +0 -28
  471. package/dist/utils/league-join-warning.js.map +1 -1
  472. package/dist/utils/league-joining.d.ts +0 -1
  473. package/dist/utils/league-joining.d.ts.map +1 -1
  474. package/dist/utils/league-joining.js +0 -7
  475. package/dist/utils/league-joining.js.map +1 -1
  476. package/dist/utils/league-mode.d.ts +0 -1
  477. package/dist/utils/league-mode.d.ts.map +1 -1
  478. package/dist/utils/league-mode.js +0 -4
  479. package/dist/utils/league-mode.js.map +1 -1
  480. package/dist/utils/schedules.d.ts +0 -15
  481. package/dist/utils/schedules.d.ts.map +1 -1
  482. package/dist/utils/schedules.js +0 -19
  483. package/dist/utils/schedules.js.map +1 -1
  484. package/dist/utils/stats-operation-request.d.ts +20 -0
  485. package/dist/utils/stats-operation-request.d.ts.map +1 -0
  486. package/dist/utils/stats-operation-request.js +10 -0
  487. package/dist/utils/stats-operation-request.js.map +1 -0
  488. package/dist/utils/team-creation.d.ts +0 -2
  489. package/dist/utils/team-creation.d.ts.map +1 -1
  490. package/dist/utils/team-creation.js +0 -6
  491. package/dist/utils/team-creation.js.map +1 -1
  492. package/dist/utils/team-member-actions.d.ts +0 -6
  493. package/dist/utils/team-member-actions.d.ts.map +1 -1
  494. package/dist/utils/team-member-actions.js +0 -12
  495. package/dist/utils/team-member-actions.js.map +1 -1
  496. package/package.json +2 -1
@@ -1,56 +1,18 @@
1
1
  import type { ColumnCatalogKey } from '../sports/column-catalog.js';
2
2
  import type { SportKey } from '../types/sports.js';
3
- /**
4
- * localStorage key holding the device's theme. It is `next-themes`' default key, the one viewers'
5
- * saved themes are stored under.
6
- */
7
3
  export declare const THEME_STORAGE_KEY = "theme";
8
- /** localStorage key: `'true'` when the viewer has turned motion down on this device. */
9
4
  export declare const REDUCED_MOTION_STORAGE_KEY = "q-sports-reduced-motion";
10
- /** Same-tab event dispatched when REDUCED_MOTION_STORAGE_KEY changes. */
11
5
  export declare const REDUCED_MOTION_CHANGE_EVENT = "q-sports-reduced-motion-change";
12
- /**
13
- * localStorage key holding the differences between this device's settings and the account's that
14
- * the viewer chose to keep, so the compare prompt does not ask about them again while they hold.
15
- */
16
6
  export declare const VIEWER_SETTINGS_DISMISSAL_STORAGE_KEY = "q-sports-viewer-settings-dismissed";
17
- /**
18
- * localStorage key holding the `_appConfig/app` version this device last loaded. Written only once
19
- * a load has confirmed it, so a release that never landed is retried next session.
20
- */
21
7
  export declare const LS_VERSION_KEY = "q-sports-app-version";
22
- /**
23
- * sessionStorage key naming the version the version gate last reloaded for. It is what tells the
24
- * load after that reload apart from a mismatch still to act on, so a stuck release cannot hold a
25
- * tab in a reload loop; a new tab starts without it and tries again.
26
- */
27
8
  export declare const SS_RELOAD_ATTEMPTED_KEY = "q-sports-version-reload-attempted";
28
- /** localStorage key: `'true'` while the admin sidebar is collapsed to its icon rail on this device. */
29
9
  export declare const ADMIN_SIDEBAR_COLLAPSED_STORAGE_KEY = "q-sports-admin-sidebar-collapsed";
30
- /** Same-tab event dispatched when ADMIN_SIDEBAR_COLLAPSED_STORAGE_KEY changes. */
31
10
  export declare const ADMIN_SIDEBAR_COLLAPSED_CHANGE_EVENT = "q-sports-admin-sidebar-collapsed-change";
32
- /** The prefix every stats table View-state key starts with; `statsTableViewStorageKey` adds the rest. */
33
11
  export declare const STATS_TABLE_VIEW_STORAGE_KEY_PREFIX = "q-sports-stats-table-view";
34
- /**
35
- * localStorage key holding one stats table's View state on this device — its preset or Custom layout,
36
- * its sort, and its switches — for one table type of one sport: `{prefix}:{tableType}:{sportKey}`.
37
- */
38
12
  export declare function statsTableViewStorageKey(tableType: ColumnCatalogKey, sportKey: SportKey): string;
39
- /** Same-tab event dispatched when any stats table View-state key changes. */
40
13
  export declare const STATS_TABLE_VIEW_CHANGE_EVENT = "q-sports-stats-table-view-change";
41
- /** The prefix every scorer's stat-queue key starts with; `statQueueStorageKey` adds the rest. */
42
14
  export declare const STAT_QUEUE_STORAGE_KEY_PREFIX = "q-sports-stat-queue";
43
- /**
44
- * localStorage key holding one scorer's unsent and refused stat events for one game on this device —
45
- * `{prefix}:{uid}:{gameId}` — so a reload loses nothing, and another account signed in on the same
46
- * browser never sends or sees them.
47
- */
48
15
  export declare function statQueueStorageKey(uid: string, gameId: string): string;
49
- /**
50
- * localStorage key holding this browser's analytics consent: `'granted'` or `'denied'`; absent until
51
- * the visitor chooses.
52
- */
53
16
  export declare const COOKIE_CONSENT_STORAGE_KEY = "q-sports-cookie-consent";
54
- /** Same-tab event dispatched when COOKIE_CONSENT_STORAGE_KEY changes. */
55
17
  export declare const COOKIE_CONSENT_CHANGE_EVENT = "q-sports-cookie-consent-change";
56
18
  //# sourceMappingURL=storage-keys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage-keys.d.ts","sourceRoot":"","sources":["../../src/constants/storage-keys.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,UAAU,CAAC;AAEzC,wFAAwF;AACxF,eAAO,MAAM,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,cAAc,yBAAyB,CAAC;AAErD,eAAO,MAAM,uBAAuB,sCAAsC,CAAC;AAE3E,eAAO,MAAM,mCAAmC,qCAAqC,CAAC;AAEtF,eAAO,MAAM,oCAAoC,4CAA4C,CAAC;AAE9F,eAAO,MAAM,mCAAmC,8BAA8B,CAAC;AAE/E,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAEhG;AAED,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAEhF,eAAO,MAAM,6BAA6B,wBAAwB,CAAC;AAEnE,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AAEpE,eAAO,MAAM,2BAA2B,mCAAmC,CAAC"}
@@ -1,61 +1,20 @@
1
- // Browser-storage keys, each declared once with the same-tab event its writer dispatches: a
2
- // localStorage write fires the native `storage` event in every other tab but never in the tab that
3
- // wrote it. Every value is persisted on viewers' devices, so changing one forgets what they saved.
4
- /**
5
- * localStorage key holding the device's theme. It is `next-themes`' default key, the one viewers'
6
- * saved themes are stored under.
7
- */
8
1
  export const THEME_STORAGE_KEY = 'theme';
9
- /** localStorage key: `'true'` when the viewer has turned motion down on this device. */
10
2
  export const REDUCED_MOTION_STORAGE_KEY = 'q-sports-reduced-motion';
11
- /** Same-tab event dispatched when REDUCED_MOTION_STORAGE_KEY changes. */
12
3
  export const REDUCED_MOTION_CHANGE_EVENT = 'q-sports-reduced-motion-change';
13
- /**
14
- * localStorage key holding the differences between this device's settings and the account's that
15
- * the viewer chose to keep, so the compare prompt does not ask about them again while they hold.
16
- */
17
4
  export const VIEWER_SETTINGS_DISMISSAL_STORAGE_KEY = 'q-sports-viewer-settings-dismissed';
18
- /**
19
- * localStorage key holding the `_appConfig/app` version this device last loaded. Written only once
20
- * a load has confirmed it, so a release that never landed is retried next session.
21
- */
22
5
  export const LS_VERSION_KEY = 'q-sports-app-version';
23
- /**
24
- * sessionStorage key naming the version the version gate last reloaded for. It is what tells the
25
- * load after that reload apart from a mismatch still to act on, so a stuck release cannot hold a
26
- * tab in a reload loop; a new tab starts without it and tries again.
27
- */
28
6
  export const SS_RELOAD_ATTEMPTED_KEY = 'q-sports-version-reload-attempted';
29
- /** localStorage key: `'true'` while the admin sidebar is collapsed to its icon rail on this device. */
30
7
  export const ADMIN_SIDEBAR_COLLAPSED_STORAGE_KEY = 'q-sports-admin-sidebar-collapsed';
31
- /** Same-tab event dispatched when ADMIN_SIDEBAR_COLLAPSED_STORAGE_KEY changes. */
32
8
  export const ADMIN_SIDEBAR_COLLAPSED_CHANGE_EVENT = 'q-sports-admin-sidebar-collapsed-change';
33
- /** The prefix every stats table View-state key starts with; `statsTableViewStorageKey` adds the rest. */
34
9
  export const STATS_TABLE_VIEW_STORAGE_KEY_PREFIX = 'q-sports-stats-table-view';
35
- /**
36
- * localStorage key holding one stats table's View state on this device — its preset or Custom layout,
37
- * its sort, and its switches — for one table type of one sport: `{prefix}:{tableType}:{sportKey}`.
38
- */
39
10
  export function statsTableViewStorageKey(tableType, sportKey) {
40
11
  return `${STATS_TABLE_VIEW_STORAGE_KEY_PREFIX}:${tableType}:${sportKey}`;
41
12
  }
42
- /** Same-tab event dispatched when any stats table View-state key changes. */
43
13
  export const STATS_TABLE_VIEW_CHANGE_EVENT = 'q-sports-stats-table-view-change';
44
- /** The prefix every scorer's stat-queue key starts with; `statQueueStorageKey` adds the rest. */
45
14
  export const STAT_QUEUE_STORAGE_KEY_PREFIX = 'q-sports-stat-queue';
46
- /**
47
- * localStorage key holding one scorer's unsent and refused stat events for one game on this device —
48
- * `{prefix}:{uid}:{gameId}` — so a reload loses nothing, and another account signed in on the same
49
- * browser never sends or sees them.
50
- */
51
15
  export function statQueueStorageKey(uid, gameId) {
52
16
  return `${STAT_QUEUE_STORAGE_KEY_PREFIX}:${uid}:${gameId}`;
53
17
  }
54
- /**
55
- * localStorage key holding this browser's analytics consent: `'granted'` or `'denied'`; absent until
56
- * the visitor chooses.
57
- */
58
18
  export const COOKIE_CONSENT_STORAGE_KEY = 'q-sports-cookie-consent';
59
- /** Same-tab event dispatched when COOKIE_CONSENT_STORAGE_KEY changes. */
60
19
  export const COOKIE_CONSENT_CHANGE_EVENT = 'q-sports-cookie-consent-change';
61
20
  //# sourceMappingURL=storage-keys.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage-keys.js","sourceRoot":"","sources":["../../src/constants/storage-keys.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,mGAAmG;AACnG,mGAAmG;AAKnG;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC,wFAAwF;AACxF,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAC;AAEpE,yEAAyE;AACzE,MAAM,CAAC,MAAM,2BAA2B,GAAG,gCAAgC,CAAC;AAE5E;;;GAGG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,oCAAoC,CAAC;AAE1F;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAErD;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAE3E,uGAAuG;AACvG,MAAM,CAAC,MAAM,mCAAmC,GAAG,kCAAkC,CAAC;AAEtF,kFAAkF;AAClF,MAAM,CAAC,MAAM,oCAAoC,GAAG,yCAAyC,CAAC;AAE9F,yGAAyG;AACzG,MAAM,CAAC,MAAM,mCAAmC,GAAG,2BAA2B,CAAC;AAE/E;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,SAA2B,EAAE,QAAkB;IACtF,OAAO,GAAG,mCAAmC,IAAI,SAAS,IAAI,QAAQ,EAAE,CAAC;AAC3E,CAAC;AAED,6EAA6E;AAC7E,MAAM,CAAC,MAAM,6BAA6B,GAAG,kCAAkC,CAAC;AAEhF,iGAAiG;AACjG,MAAM,CAAC,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AAEnE;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAW,EAAE,MAAc;IAC7D,OAAO,GAAG,6BAA6B,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAC;AAEpE,yEAAyE;AACzE,MAAM,CAAC,MAAM,2BAA2B,GAAG,gCAAgC,CAAC","sourcesContent":["// Browser-storage keys, each declared once with the same-tab event its writer dispatches: a\n// localStorage write fires the native `storage` event in every other tab but never in the tab that\n// wrote it. Every value is persisted on viewers' devices, so changing one forgets what they saved.\n\nimport type { ColumnCatalogKey } from '../sports/column-catalog.js';\nimport type { SportKey } from '../types/sports.js';\n\n/**\n * localStorage key holding the device's theme. It is `next-themes`' default key, the one viewers'\n * saved themes are stored under.\n */\nexport const THEME_STORAGE_KEY = 'theme';\n\n/** localStorage key: `'true'` when the viewer has turned motion down on this device. */\nexport const REDUCED_MOTION_STORAGE_KEY = 'q-sports-reduced-motion';\n\n/** Same-tab event dispatched when REDUCED_MOTION_STORAGE_KEY changes. */\nexport const REDUCED_MOTION_CHANGE_EVENT = 'q-sports-reduced-motion-change';\n\n/**\n * localStorage key holding the differences between this device's settings and the account's that\n * the viewer chose to keep, so the compare prompt does not ask about them again while they hold.\n */\nexport const VIEWER_SETTINGS_DISMISSAL_STORAGE_KEY = 'q-sports-viewer-settings-dismissed';\n\n/**\n * localStorage key holding the `_appConfig/app` version this device last loaded. Written only once\n * a load has confirmed it, so a release that never landed is retried next session.\n */\nexport const LS_VERSION_KEY = 'q-sports-app-version';\n\n/**\n * sessionStorage key naming the version the version gate last reloaded for. It is what tells the\n * load after that reload apart from a mismatch still to act on, so a stuck release cannot hold a\n * tab in a reload loop; a new tab starts without it and tries again.\n */\nexport const SS_RELOAD_ATTEMPTED_KEY = 'q-sports-version-reload-attempted';\n\n/** localStorage key: `'true'` while the admin sidebar is collapsed to its icon rail on this device. */\nexport const ADMIN_SIDEBAR_COLLAPSED_STORAGE_KEY = 'q-sports-admin-sidebar-collapsed';\n\n/** Same-tab event dispatched when ADMIN_SIDEBAR_COLLAPSED_STORAGE_KEY changes. */\nexport const ADMIN_SIDEBAR_COLLAPSED_CHANGE_EVENT = 'q-sports-admin-sidebar-collapsed-change';\n\n/** The prefix every stats table View-state key starts with; `statsTableViewStorageKey` adds the rest. */\nexport const STATS_TABLE_VIEW_STORAGE_KEY_PREFIX = 'q-sports-stats-table-view';\n\n/**\n * localStorage key holding one stats table's View state on this device — its preset or Custom layout,\n * its sort, and its switches — for one table type of one sport: `{prefix}:{tableType}:{sportKey}`.\n */\nexport function statsTableViewStorageKey(tableType: ColumnCatalogKey, sportKey: SportKey): string {\n return `${STATS_TABLE_VIEW_STORAGE_KEY_PREFIX}:${tableType}:${sportKey}`;\n}\n\n/** Same-tab event dispatched when any stats table View-state key changes. */\nexport const STATS_TABLE_VIEW_CHANGE_EVENT = 'q-sports-stats-table-view-change';\n\n/** The prefix every scorer's stat-queue key starts with; `statQueueStorageKey` adds the rest. */\nexport const STAT_QUEUE_STORAGE_KEY_PREFIX = 'q-sports-stat-queue';\n\n/**\n * localStorage key holding one scorer's unsent and refused stat events for one game on this device —\n * `{prefix}:{uid}:{gameId}` — so a reload loses nothing, and another account signed in on the same\n * browser never sends or sees them.\n */\nexport function statQueueStorageKey(uid: string, gameId: string): string {\n return `${STAT_QUEUE_STORAGE_KEY_PREFIX}:${uid}:${gameId}`;\n}\n\n/**\n * localStorage key holding this browser's analytics consent: `'granted'` or `'denied'`; absent until\n * the visitor chooses.\n */\nexport const COOKIE_CONSENT_STORAGE_KEY = 'q-sports-cookie-consent';\n\n/** Same-tab event dispatched when COOKIE_CONSENT_STORAGE_KEY changes. */\nexport const COOKIE_CONSENT_CHANGE_EVENT = 'q-sports-cookie-consent-change';\n"]}
1
+ {"version":3,"file":"storage-keys.js","sourceRoot":"","sources":["../../src/constants/storage-keys.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAC;AAEpE,MAAM,CAAC,MAAM,2BAA2B,GAAG,gCAAgC,CAAC;AAE5E,MAAM,CAAC,MAAM,qCAAqC,GAAG,oCAAoC,CAAC;AAE1F,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAErD,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAE3E,MAAM,CAAC,MAAM,mCAAmC,GAAG,kCAAkC,CAAC;AAEtF,MAAM,CAAC,MAAM,oCAAoC,GAAG,yCAAyC,CAAC;AAE9F,MAAM,CAAC,MAAM,mCAAmC,GAAG,2BAA2B,CAAC;AAE/E,MAAM,UAAU,wBAAwB,CAAC,SAA2B,EAAE,QAAkB;IACtF,OAAO,GAAG,mCAAmC,IAAI,SAAS,IAAI,QAAQ,EAAE,CAAC;AAC3E,CAAC;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,kCAAkC,CAAC;AAEhF,MAAM,CAAC,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AAEnE,MAAM,UAAU,mBAAmB,CAAC,GAAW,EAAE,MAAc;IAC7D,OAAO,GAAG,6BAA6B,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC;AAC7D,CAAC;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAC;AAEpE,MAAM,CAAC,MAAM,2BAA2B,GAAG,gCAAgC,CAAC","sourcesContent":["import type { ColumnCatalogKey } from '../sports/column-catalog.js';\nimport type { SportKey } from '../types/sports.js';\n\nexport const THEME_STORAGE_KEY = 'theme';\n\nexport const REDUCED_MOTION_STORAGE_KEY = 'q-sports-reduced-motion';\n\nexport const REDUCED_MOTION_CHANGE_EVENT = 'q-sports-reduced-motion-change';\n\nexport const VIEWER_SETTINGS_DISMISSAL_STORAGE_KEY = 'q-sports-viewer-settings-dismissed';\n\nexport const LS_VERSION_KEY = 'q-sports-app-version';\n\nexport const SS_RELOAD_ATTEMPTED_KEY = 'q-sports-version-reload-attempted';\n\nexport const ADMIN_SIDEBAR_COLLAPSED_STORAGE_KEY = 'q-sports-admin-sidebar-collapsed';\n\nexport const ADMIN_SIDEBAR_COLLAPSED_CHANGE_EVENT = 'q-sports-admin-sidebar-collapsed-change';\n\nexport const STATS_TABLE_VIEW_STORAGE_KEY_PREFIX = 'q-sports-stats-table-view';\n\nexport function statsTableViewStorageKey(tableType: ColumnCatalogKey, sportKey: SportKey): string {\n return `${STATS_TABLE_VIEW_STORAGE_KEY_PREFIX}:${tableType}:${sportKey}`;\n}\n\nexport const STATS_TABLE_VIEW_CHANGE_EVENT = 'q-sports-stats-table-view-change';\n\nexport const STAT_QUEUE_STORAGE_KEY_PREFIX = 'q-sports-stat-queue';\n\nexport function statQueueStorageKey(uid: string, gameId: string): string {\n return `${STAT_QUEUE_STORAGE_KEY_PREFIX}:${uid}:${gameId}`;\n}\n\nexport const COOKIE_CONSENT_STORAGE_KEY = 'q-sports-cookie-consent';\n\nexport const COOKIE_CONSENT_CHANGE_EVENT = 'q-sports-cookie-consent-change';\n"]}
@@ -1,9 +1,6 @@
1
1
  export declare const TELEMETRY_CONTENT_POLICY: {
2
- /** Keys whose text value is diagnostic: the descriptors the capture sites set. */
3
2
  readonly diagnosticKeys: readonly ["fn", "kind", "operation", "step", "pass", "area", "action", "phase", "stage", "code", "reason", "extra"];
4
- /** An identifier, code, or enum value named by its suffix (`pendingMediaId`, `auditEventType`). */
5
3
  readonly diagnosticKeySuffixes: readonly ["Id", "Ids", "Type", "Kind", "Status", "Code", "Outcome", "Origin"];
6
- /** The context the capture sites name the running function in (`scope.setContext('function', { name })`). */
7
4
  readonly codeNameContexts: readonly ["function"];
8
5
  };
9
6
  //# sourceMappingURL=telemetry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/constants/telemetry.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,wBAAwB;IACnC,kFAAkF;;IAiBlF,mGAAmG;;IAEnG,6GAA6G;;CAErG,CAAC"}
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/constants/telemetry.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB;;;;CAmB3B,CAAC"}
@@ -1,13 +1,6 @@
1
- // The Q-Sports telemetry content policy (RULE-STD-QUALITY-106): which keys of a monitoring event may carry
2
- // text. monitoring-core's `createTelemetryContentPolicy` applies it, so the Functions backend and the
3
- // Next server and edge runtimes cut every event to the same allowlist. Plain data with no
4
- // monitoring-core import, so `q-core` binds no monitoring at all (RULE-STD-QUALITY-102); the shape matches
5
- // that factory's options.
6
- //
7
- // Widening either list to a key that can hold prose, a stored document, a file name, or a storage or
8
- // document path breaks RULE-STD-QUALITY-106: only identifiers, codes, and enum values may ride as text.
1
+ // Plain data with no monitoring-core import, so `q-core` binds no monitoring at all
2
+ // (RULE-STD-QUALITY-102).
9
3
  export const TELEMETRY_CONTENT_POLICY = {
10
- /** Keys whose text value is diagnostic: the descriptors the capture sites set. */
11
4
  diagnosticKeys: [
12
5
  'fn',
13
6
  'kind',
@@ -24,9 +17,7 @@ export const TELEMETRY_CONTENT_POLICY = {
24
17
  // capture context): the container passes and its own keys are checked.
25
18
  'extra',
26
19
  ],
27
- /** An identifier, code, or enum value named by its suffix (`pendingMediaId`, `auditEventType`). */
28
20
  diagnosticKeySuffixes: ['Id', 'Ids', 'Type', 'Kind', 'Status', 'Code', 'Outcome', 'Origin'],
29
- /** The context the capture sites name the running function in (`scope.setContext('function', { name })`). */
30
21
  codeNameContexts: ['function'],
31
22
  };
32
23
  //# sourceMappingURL=telemetry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/constants/telemetry.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,sGAAsG;AACtG,0FAA0F;AAC1F,2GAA2G;AAC3G,0BAA0B;AAC1B,EAAE;AACF,qGAAqG;AACrG,wGAAwG;AAExG,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,kFAAkF;IAClF,cAAc,EAAE;QACd,IAAI;QACJ,MAAM;QACN,WAAW;QACX,MAAM;QACN,MAAM;QACN,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,MAAM;QACN,QAAQ;QACR,+FAA+F;QAC/F,uEAAuE;QACvE,OAAO;KACR;IACD,mGAAmG;IACnG,qBAAqB,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;IAC3F,6GAA6G;IAC7G,gBAAgB,EAAE,CAAC,UAAU,CAAC;CACtB,CAAC","sourcesContent":["// The Q-Sports telemetry content policy (RULE-STD-QUALITY-106): which keys of a monitoring event may carry\n// text. monitoring-core's `createTelemetryContentPolicy` applies it, so the Functions backend and the\n// Next server and edge runtimes cut every event to the same allowlist. Plain data with no\n// monitoring-core import, so `q-core` binds no monitoring at all (RULE-STD-QUALITY-102); the shape matches\n// that factory's options.\n//\n// Widening either list to a key that can hold prose, a stored document, a file name, or a storage or\n// document path breaks RULE-STD-QUALITY-106: only identifiers, codes, and enum values may ride as text.\n\nexport const TELEMETRY_CONTENT_POLICY = {\n /** Keys whose text value is diagnostic: the descriptors the capture sites set. */\n diagnosticKeys: [\n 'fn',\n 'kind',\n 'operation',\n 'step',\n 'pass',\n 'area',\n 'action',\n 'phase',\n 'stage',\n 'code',\n 'reason',\n // `captureException(error, { extra: {…} })` lands as an extra named `extra` (monitoring-core's\n // capture context): the container passes and its own keys are checked.\n 'extra',\n ],\n /** An identifier, code, or enum value named by its suffix (`pendingMediaId`, `auditEventType`). */\n diagnosticKeySuffixes: ['Id', 'Ids', 'Type', 'Kind', 'Status', 'Code', 'Outcome', 'Origin'],\n /** The context the capture sites name the running function in (`scope.setContext('function', { name })`). */\n codeNameContexts: ['function'],\n} as const;\n"]}
1
+ {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/constants/telemetry.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,0BAA0B;AAE1B,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,cAAc,EAAE;QACd,IAAI;QACJ,MAAM;QACN,WAAW;QACX,MAAM;QACN,MAAM;QACN,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,MAAM;QACN,QAAQ;QACR,+FAA+F;QAC/F,uEAAuE;QACvE,OAAO;KACR;IACD,qBAAqB,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;IAC3F,gBAAgB,EAAE,CAAC,UAAU,CAAC;CACtB,CAAC","sourcesContent":["// Plain data with no monitoring-core import, so `q-core` binds no monitoring at all\n// (RULE-STD-QUALITY-102).\n\nexport const TELEMETRY_CONTENT_POLICY = {\n diagnosticKeys: [\n 'fn',\n 'kind',\n 'operation',\n 'step',\n 'pass',\n 'area',\n 'action',\n 'phase',\n 'stage',\n 'code',\n 'reason',\n // `captureException(error, { extra: {…} })` lands as an extra named `extra` (monitoring-core's\n // capture context): the container passes and its own keys are checked.\n 'extra',\n ],\n diagnosticKeySuffixes: ['Id', 'Ids', 'Type', 'Kind', 'Status', 'Code', 'Outcome', 'Origin'],\n codeNameContexts: ['function'],\n} as const;\n"]}
@@ -27,7 +27,6 @@ export declare const ADMIN_NOTIFICATION_METADATA_SCHEMAS: {
27
27
  export type AdminNotificationMetadataByType = {
28
28
  [T in AdminNotificationType]: z.infer<(typeof ADMIN_NOTIFICATION_METADATA_SCHEMAS)[T]>;
29
29
  };
30
- /** Whether `metadata` is the metadata `type` declares. */
31
30
  export declare function isAdminNotificationMetadata(type: AdminNotificationType, metadata: unknown): boolean;
32
31
  export declare const ActiveAdminNotificationSchema: z.ZodObject<{
33
32
  message: z.ZodString;
@@ -92,9 +91,9 @@ export type NotificationDeliveryPayload = z.infer<typeof NotificationDeliveryPay
92
91
  export declare const NotificationDeliverySchema: z.ZodObject<{
93
92
  deliveryId: z.ZodString;
94
93
  state: z.ZodEnum<{
94
+ skipped: "skipped";
95
95
  queued: "queued";
96
96
  materialized: "materialized";
97
- skipped: "skipped";
98
97
  deadLetter: "deadLetter";
99
98
  }>;
100
99
  notificationType: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"admin-notifications.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/admin-notifications.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAIvE,eAAO,MAAM,2BAA2B;;;EAAuC,CAAC;AAIhF,eAAO,MAAM,2CAA2C;;;kBAE7C,CAAC;AACZ,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACzD,OAAO,2CAA2C,CACnD,CAAC;AAEF,eAAO,MAAM,iDAAiD;;;kBAEnD,CAAC;AACZ,MAAM,MAAM,2CAA2C,GAAG,CAAC,CAAC,KAAK,CAC/D,OAAO,iDAAiD,CACzD,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;CAGgB,CAAC;AAEjE,MAAM,MAAM,+BAA+B,GAAG;KAC3C,CAAC,IAAI,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,mCAAmC,CAAC,CAAC,CAAC,CAAC,CAAC;CACvF,CAAC;AAEF,0DAA0D;AAC1D,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,qBAAqB,EAC3B,QAAQ,EAAE,OAAO,GAChB,OAAO,CAET;AAWD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;iBAWmD,CAAC;AAC9F,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC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CAAC,IAAI,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,mCAAmC,CAAC,CAAC,CAAC,CAAC,CAAC;CACvF,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,qBAAqB,EAC3B,QAAQ,EAAE,OAAO,GAChB,OAAO,CAET;AAOD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;iBAWmD,CAAC;AAC9F,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,eAAO,MAAM,iCAAiC;;;;iBAI5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBnC,CAAC;AACL,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;iBAiB1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
@@ -1,23 +1,9 @@
1
- // The admin notification documents: the shared cards, their archived history, the delivery ledger
2
- // the owning callables write occurrences into, and the archive-all jobs. Every one is written only by
3
- // Cloud Functions.
4
- //
5
- // notification-core owns the generic card shape, so the card schema is composed from its
6
- // `NotificationDocSchema` and narrowed to Q-Sports' one shared category and its notification types.
7
- // The history, ledger, and job documents are written by notification-core's server helpers and by
8
- // the functions around them; their schemas are declared here because the package exports no schema
9
- // for them. A card, a history entry, and a ledger row each hold ids only, never a name (RULE-STD-ARCH-103).
10
- //
11
- // `expireAt` is the one Firestore `Timestamp` any of them holds: a native-TTL policy honours only a
12
- // real Timestamp, and nothing reads the field for display or order (RULE-STD-ARCH-105).
13
1
  import { z } from 'zod';
14
2
  import { NotificationDocSchema } from '@ttt-productions/notification-core';
15
3
  import { ADMIN_NOTIFICATION_CATEGORY, ADMIN_NOTIFICATION_TYPE_KEYS, NOTIFICATION_ARCHIVE_ALL_JOB_STATE_KEYS, NOTIFICATION_DELIVERY_PAYLOAD_VERSION, NOTIFICATION_DELIVERY_SKIP_REASON_KEYS, NOTIFICATION_DELIVERY_STATE_KEYS, NOTIFICATION_MATERIALIZATION_CLASS_KEYS, SHARED_NOTIFICATION_AUDIENCE_SCOPE, } from '../types/notifications.js';
16
4
  import { countSchema, epochMsSchema, leagueIdSchema, teamIdSchema, userIdSchema } from './atoms.js';
17
5
  import { FirestoreTimestampSchema } from './firestore-primitives.js';
18
6
  export const adminNotificationTypeSchema = z.enum(ADMIN_NOTIFICATION_TYPE_KEYS);
19
- // What each type's card and ledger row name, by id. The card's title, link, and every name it shows
20
- // are derived from these at read time.
21
7
  export const LeagueTeamCreatedNotificationMetadataSchema = z
22
8
  .object({ leagueId: leagueIdSchema, teamId: teamIdSchema })
23
9
  .strict();
@@ -28,7 +14,6 @@ export const ADMIN_NOTIFICATION_METADATA_SCHEMAS = {
28
14
  leagueTeamCreated: LeagueTeamCreatedNotificationMetadataSchema,
29
15
  leagueFreeAgentSignedUp: LeagueFreeAgentSignedUpNotificationMetadataSchema,
30
16
  };
31
- /** Whether `metadata` is the metadata `type` declares. */
32
17
  export function isAdminNotificationMetadata(type, metadata) {
33
18
  return ADMIN_NOTIFICATION_METADATA_SCHEMAS[type].safeParse(metadata).success;
34
19
  }
@@ -36,10 +21,6 @@ const METADATA_MISMATCH = {
36
21
  message: "The metadata is not the notification type's.",
37
22
  path: ['metadata'],
38
23
  };
39
- // activeAdminNotifications/{notificationId} — one shared card, as notification-core stores it. The id
40
- // is notification-core's, hashed from the type and the aggregation key, and is not a field: a reader
41
- // is handed it beside the document. `seenAt` is the package's field: a shared card has no seen state,
42
- // so no admin marks it and it stays 0.
43
24
  export const ActiveAdminNotificationSchema = NotificationDocSchema.omit({ id: true })
44
25
  .extend({
45
26
  type: adminNotificationTypeSchema,
@@ -52,12 +33,9 @@ export const ActiveAdminNotificationSchema = NotificationDocSchema.omit({ id: tr
52
33
  updatedAt: epochMsSchema,
53
34
  })
54
35
  .refine((card) => isAdminNotificationMetadata(card.type, card.metadata), METADATA_MISMATCH);
55
- // adminNotificationHistory/{historyId} — an archived card: the card as it stood when archived, kept
56
- // whole under `archivedSnapshot`, with who archived it and the archive's replay facts.
57
36
  export const AdminNotificationHistorySchema = z.object({
58
37
  archiveOccurrenceId: z.string().min(1),
59
38
  requestId: z.string().min(1),
60
- // The archive's replay key: the card and the generation the archiving admin saw.
61
39
  payloadHash: z.string().min(1),
62
40
  activeId: z.string().min(1),
63
41
  observedActivityGeneration: z.string().min(1),
@@ -69,25 +47,16 @@ export const AdminNotificationHistorySchema = z.object({
69
47
  handledBy: userIdSchema,
70
48
  });
71
49
  export const NotificationDeliveryPayloadSchema = z.object({
72
- // Who did what the occurrence records; null for an occurrence with no acting account.
73
50
  actorId: userIdSchema.nullable(),
74
51
  metadata: z.record(z.string(), z.unknown()),
75
52
  occurrenceAt: epochMsSchema,
76
53
  });
77
- // notificationDeliveries/{deliveryId} — one occurrence: the queue row the worker materializes and the
78
- // record that it happened, in one document, so the occurrence and its delivery cannot come apart.
79
- // Written in the owning callable's own transaction. A queued or dead-lettered row never expires:
80
- // notification-core sets `expireAt` only when the row materializes or is skipped, and an admin's
81
- // replay of a dead-lettered row sets it back to null. A row is skipped only when it names a recipient
82
- // who may no longer receive, which no Q-Sports row does; the skip's fields are declared because the
83
- // package writes them.
84
54
  export const NotificationDeliverySchema = z
85
55
  .object({
86
56
  deliveryId: z.string().min(1),
87
57
  state: z.enum(NOTIFICATION_DELIVERY_STATE_KEYS),
88
58
  notificationType: adminNotificationTypeSchema,
89
59
  eventId: z.string().min(1),
90
- // Every Q-Sports notification is shared, so no row names a recipient.
91
60
  recipientUid: z.null(),
92
61
  aggregationKey: z.string().min(1),
93
62
  strategy: z.literal('increment'),
@@ -108,23 +77,13 @@ export const NotificationDeliverySchema = z
108
77
  message: METADATA_MISMATCH.message,
109
78
  path: ['payload', 'metadata'],
110
79
  });
111
- // notificationArchiveAllJobs/{jobId} — one admin's "archive all": the server drains every active card
112
- // in pages until none is left, whether or not that admin's browser is still open. Backend-only: the
113
- // admin learns its state through the status callable. A completed job expires; one that is still
114
- // running, stopped short, or failed never does.
115
80
  export const NotificationArchiveAllJobSchema = z.object({
116
81
  jobId: z.string().min(1),
117
- // The admin who asked. Each card the job archives is recorded as archived by them; the event the
118
- // request wrote when the job was created carries the request's origin (RULE-STD-BACKEND-211).
119
82
  userId: userIdSchema,
120
83
  category: z.literal(ADMIN_NOTIFICATION_CATEGORY),
121
84
  state: z.enum(NOTIFICATION_ARCHIVE_ALL_JOB_STATE_KEYS),
122
- // Moves on every claim, so an overlapping run that claimed an older revision cannot settle the job.
123
85
  revision: countSchema,
124
86
  archived: countSchema,
125
- // The cards the COMPLETING drain could not archive — each failed on its own and is still in the
126
- // list. Set (never summed) when the job completes, because that drain walked the whole active set
127
- // once. Optional, never defaulted: absent until a job completes with cards left behind, read as 0.
128
87
  notArchived: countSchema.optional(),
129
88
  error: z.string().nullable(),
130
89
  attemptCount: countSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"admin-notifications.js","sourceRoot":"","sources":["../../src/doc-schemas/admin-notifications.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,sGAAsG;AACtG,mBAAmB;AACnB,EAAE;AACF,yFAAyF;AACzF,oGAAoG;AACpG,kGAAkG;AAClG,mGAAmG;AACnG,4GAA4G;AAC5G,EAAE;AACF,oGAAoG;AACpG,wFAAwF;AAExF,OAAO,EAAE,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AE,aAAa,CAAC,QAAQ,EAAE;IACxC,QAAQ,EAAE,wBAAwB,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC","sourcesContent":["// The admin notification documents: the shared cards, their archived history, the delivery ledger\n// the owning callables write occurrences into, and the archive-all jobs. Every one is written only by\n// Cloud Functions.\n//\n// notification-core owns the generic card shape, so the card schema is composed from its\n// `NotificationDocSchema` and narrowed to Q-Sports' one shared category and its notification types.\n// The history, ledger, and job documents are written by notification-core's server helpers and by\n// the functions around them; their schemas are declared here because the package exports no schema\n// for them. A card, a history entry, and a ledger row each hold ids only, never a name (RULE-STD-ARCH-103).\n//\n// `expireAt` is the one Firestore `Timestamp` any of them holds: a native-TTL policy honours only a\n// real Timestamp, and nothing reads the field for display or order (RULE-STD-ARCH-105).\n\nimport { z } from 'zod';\nimport { NotificationDocSchema } from '@ttt-productions/notification-core';\nimport {\n ADMIN_NOTIFICATION_CATEGORY,\n ADMIN_NOTIFICATION_TYPE_KEYS,\n NOTIFICATION_ARCHIVE_ALL_JOB_STATE_KEYS,\n NOTIFICATION_DELIVERY_PAYLOAD_VERSION,\n NOTIFICATION_DELIVERY_SKIP_REASON_KEYS,\n NOTIFICATION_DELIVERY_STATE_KEYS,\n NOTIFICATION_MATERIALIZATION_CLASS_KEYS,\n SHARED_NOTIFICATION_AUDIENCE_SCOPE,\n} from '../types/notifications.js';\nimport type { AdminNotificationType } from '../types/notifications.js';\nimport { countSchema, epochMsSchema, leagueIdSchema, teamIdSchema, userIdSchema } from './atoms.js';\nimport { FirestoreTimestampSchema } from './firestore-primitives.js';\n\nexport const adminNotificationTypeSchema = z.enum(ADMIN_NOTIFICATION_TYPE_KEYS);\n\n// What each type's card and ledger row name, by id. The card's title, link, and every name it shows\n// are derived from these at read time.\nexport const LeagueTeamCreatedNotificationMetadataSchema = z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema })\n .strict();\nexport type LeagueTeamCreatedNotificationMetadata = z.infer<\n typeof LeagueTeamCreatedNotificationMetadataSchema\n>;\n\nexport const LeagueFreeAgentSignedUpNotificationMetadataSchema = z\n .object({ leagueId: leagueIdSchema, userId: userIdSchema })\n .strict();\nexport type LeagueFreeAgentSignedUpNotificationMetadata = z.infer<\n typeof LeagueFreeAgentSignedUpNotificationMetadataSchema\n>;\n\nexport const ADMIN_NOTIFICATION_METADATA_SCHEMAS = {\n leagueTeamCreated: LeagueTeamCreatedNotificationMetadataSchema,\n leagueFreeAgentSignedUp: LeagueFreeAgentSignedUpNotificationMetadataSchema,\n} as const satisfies Record<AdminNotificationType, z.ZodTypeAny>;\n\nexport type AdminNotificationMetadataByType = {\n [T in AdminNotificationType]: z.infer<(typeof ADMIN_NOTIFICATION_METADATA_SCHEMAS)[T]>;\n};\n\n/** Whether `metadata` is the metadata `type` declares. */\nexport function isAdminNotificationMetadata(\n type: AdminNotificationType,\n metadata: unknown,\n): boolean {\n return ADMIN_NOTIFICATION_METADATA_SCHEMAS[type].safeParse(metadata).success;\n}\n\nconst METADATA_MISMATCH = {\n message: \"The metadata is not the notification type's.\",\n path: ['metadata'],\n};\n\n// activeAdminNotifications/{notificationId} — one shared card, as notification-core stores it. The id\n// is notification-core's, hashed from the type and the aggregation key, and is not a field: a reader\n// is handed it beside the document. `seenAt` is the package's field: a shared card has no seen state,\n// so no admin marks it and it stays 0.\nexport const ActiveAdminNotificationSchema = NotificationDocSchema.omit({ id: true })\n .extend({\n type: adminNotificationTypeSchema,\n category: z.literal(ADMIN_NOTIFICATION_CATEGORY),\n targetUserId: z.null(),\n count: countSchema,\n latestActorIds: z.array(userIdSchema),\n seenAt: epochMsSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n })\n .refine((card) => isAdminNotificationMetadata(card.type, card.metadata), METADATA_MISMATCH);\nexport type ActiveAdminNotification = z.infer<typeof ActiveAdminNotificationSchema>;\n\n// adminNotificationHistory/{historyId} — an archived card: the card as it stood when archived, kept\n// whole under `archivedSnapshot`, with who archived it and the archive's replay facts.\nexport const AdminNotificationHistorySchema = z.object({\n archiveOccurrenceId: z.string().min(1),\n requestId: z.string().min(1),\n // The archive's replay key: the card and the generation the archiving admin saw.\n payloadHash: z.string().min(1),\n activeId: z.string().min(1),\n observedActivityGeneration: z.string().min(1),\n category: z.literal(ADMIN_NOTIFICATION_CATEGORY),\n audienceScope: z.literal(SHARED_NOTIFICATION_AUDIENCE_SCOPE),\n archivedSnapshot: ActiveAdminNotificationSchema,\n archivedAt: epochMsSchema,\n expireAt: FirestoreTimestampSchema,\n handledBy: userIdSchema,\n});\nexport type AdminNotificationHistory = z.infer<typeof AdminNotificationHistorySchema>;\n\nexport const NotificationDeliveryPayloadSchema = z.object({\n // Who did what the occurrence records; null for an occurrence with no acting account.\n actorId: userIdSchema.nullable(),\n metadata: z.record(z.string(), z.unknown()),\n occurrenceAt: epochMsSchema,\n});\nexport type NotificationDeliveryPayload = z.infer<typeof NotificationDeliveryPayloadSchema>;\n\n// notificationDeliveries/{deliveryId} — one occurrence: the queue row the worker materializes and the\n// record that it happened, in one document, so the occurrence and its delivery cannot come apart.\n// Written in the owning callable's own transaction. A queued or dead-lettered row never expires:\n// notification-core sets `expireAt` only when the row materializes or is skipped, and an admin's\n// replay of a dead-lettered row sets it back to null. A row is skipped only when it names a recipient\n// who may no longer receive, which no Q-Sports row does; the skip's fields are declared because the\n// package writes them.\nexport const NotificationDeliverySchema = z\n .object({\n deliveryId: z.string().min(1),\n state: z.enum(NOTIFICATION_DELIVERY_STATE_KEYS),\n notificationType: adminNotificationTypeSchema,\n eventId: z.string().min(1),\n // Every Q-Sports notification is shared, so no row names a recipient.\n recipientUid: z.null(),\n aggregationKey: z.string().min(1),\n strategy: z.literal('increment'),\n payload: NotificationDeliveryPayloadSchema,\n payloadVersion: z.literal(NOTIFICATION_DELIVERY_PAYLOAD_VERSION),\n materializationClass: z.enum(NOTIFICATION_MATERIALIZATION_CLASS_KEYS),\n createdAt: epochMsSchema,\n attemptCount: countSchema,\n nextAttemptAt: epochMsSchema,\n lastError: z.string().nullable(),\n materializedAt: epochMsSchema.nullable(),\n deadLetteredAt: epochMsSchema.nullable(),\n skipReason: z.enum(NOTIFICATION_DELIVERY_SKIP_REASON_KEYS).optional(),\n skippedAt: epochMsSchema.optional(),\n expireAt: FirestoreTimestampSchema.nullable().optional(),\n })\n .refine((row) => isAdminNotificationMetadata(row.notificationType, row.payload.metadata), {\n message: METADATA_MISMATCH.message,\n path: ['payload', 'metadata'],\n });\nexport type NotificationDelivery = z.infer<typeof NotificationDeliverySchema>;\n\n// notificationArchiveAllJobs/{jobId} — one admin's \"archive all\": the server drains every active card\n// in pages until none is left, whether or not that admin's browser is still open. Backend-only: the\n// admin learns its state through the status callable. A completed job expires; one that is still\n// running, stopped short, or failed never does.\nexport const NotificationArchiveAllJobSchema = z.object({\n jobId: z.string().min(1),\n // The admin who asked. Each card the job archives is recorded as archived by them; the event the\n // request wrote when the job was created carries the request's origin (RULE-STD-BACKEND-211).\n userId: userIdSchema,\n category: z.literal(ADMIN_NOTIFICATION_CATEGORY),\n state: z.enum(NOTIFICATION_ARCHIVE_ALL_JOB_STATE_KEYS),\n // Moves on every claim, so an overlapping run that claimed an older revision cannot settle the job.\n revision: countSchema,\n archived: countSchema,\n // The cards the COMPLETING drain could not archive — each failed on its own and is still in the\n // list. Set (never summed) when the job completes, because that drain walked the whole active set\n // once. Optional, never defaulted: absent until a job completes with cards left behind, read as 0.\n notArchived: countSchema.optional(),\n error: z.string().nullable(),\n attemptCount: countSchema,\n nextAttemptAt: epochMsSchema,\n deadLettered: z.boolean(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n completedAt: epochMsSchema.nullable(),\n deadLetteredAt: epochMsSchema.nullable(),\n expireAt: FirestoreTimestampSchema.optional(),\n});\nexport type NotificationArchiveAllJob = z.infer<typeof NotificationArchiveAllJobSchema>;\n"]}
1
+ {"version":3,"file":"admin-notifications.js","sourceRoot":"","sources":["../../src/doc-schemas/admin-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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2B,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;IACxF,OAAO,EAAE,iBAAiB,CAAC,OAAO;IAClC,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;CAC9B,CAAC,CAAC;AAGL,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,MAAM,EAAE,YAAY;IACpB,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,uCAAuC,CAAC;IACtD,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,WAAW,CAAC,QAAQ,EAAE;IACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,YAAY,EAAE,WAAW;IACzB,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE;IACzB,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;IACxB,WAAW,EAAE,aAAa,CAAC,QAAQ,EAAE;IACrC,cAAc,EAAE,aAAa,CAAC,QAAQ,EAAE;IACxC,QAAQ,EAAE,wBAAwB,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { NotificationDocSchema } from '@ttt-productions/notification-core';\nimport {\n ADMIN_NOTIFICATION_CATEGORY,\n ADMIN_NOTIFICATION_TYPE_KEYS,\n NOTIFICATION_ARCHIVE_ALL_JOB_STATE_KEYS,\n NOTIFICATION_DELIVERY_PAYLOAD_VERSION,\n NOTIFICATION_DELIVERY_SKIP_REASON_KEYS,\n NOTIFICATION_DELIVERY_STATE_KEYS,\n NOTIFICATION_MATERIALIZATION_CLASS_KEYS,\n SHARED_NOTIFICATION_AUDIENCE_SCOPE,\n} from '../types/notifications.js';\nimport type { AdminNotificationType } from '../types/notifications.js';\nimport { countSchema, epochMsSchema, leagueIdSchema, teamIdSchema, userIdSchema } from './atoms.js';\nimport { FirestoreTimestampSchema } from './firestore-primitives.js';\n\nexport const adminNotificationTypeSchema = z.enum(ADMIN_NOTIFICATION_TYPE_KEYS);\n\nexport const LeagueTeamCreatedNotificationMetadataSchema = z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema })\n .strict();\nexport type LeagueTeamCreatedNotificationMetadata = z.infer<\n typeof LeagueTeamCreatedNotificationMetadataSchema\n>;\n\nexport const LeagueFreeAgentSignedUpNotificationMetadataSchema = z\n .object({ leagueId: leagueIdSchema, userId: userIdSchema })\n .strict();\nexport type LeagueFreeAgentSignedUpNotificationMetadata = z.infer<\n typeof LeagueFreeAgentSignedUpNotificationMetadataSchema\n>;\n\nexport const ADMIN_NOTIFICATION_METADATA_SCHEMAS = {\n leagueTeamCreated: LeagueTeamCreatedNotificationMetadataSchema,\n leagueFreeAgentSignedUp: LeagueFreeAgentSignedUpNotificationMetadataSchema,\n} as const satisfies Record<AdminNotificationType, z.ZodTypeAny>;\n\nexport type AdminNotificationMetadataByType = {\n [T in AdminNotificationType]: z.infer<(typeof ADMIN_NOTIFICATION_METADATA_SCHEMAS)[T]>;\n};\n\nexport function isAdminNotificationMetadata(\n type: AdminNotificationType,\n metadata: unknown,\n): boolean {\n return ADMIN_NOTIFICATION_METADATA_SCHEMAS[type].safeParse(metadata).success;\n}\n\nconst METADATA_MISMATCH = {\n message: \"The metadata is not the notification type's.\",\n path: ['metadata'],\n};\n\nexport const ActiveAdminNotificationSchema = NotificationDocSchema.omit({ id: true })\n .extend({\n type: adminNotificationTypeSchema,\n category: z.literal(ADMIN_NOTIFICATION_CATEGORY),\n targetUserId: z.null(),\n count: countSchema,\n latestActorIds: z.array(userIdSchema),\n seenAt: epochMsSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n })\n .refine((card) => isAdminNotificationMetadata(card.type, card.metadata), METADATA_MISMATCH);\nexport type ActiveAdminNotification = z.infer<typeof ActiveAdminNotificationSchema>;\n\nexport const AdminNotificationHistorySchema = z.object({\n archiveOccurrenceId: z.string().min(1),\n requestId: z.string().min(1),\n payloadHash: z.string().min(1),\n activeId: z.string().min(1),\n observedActivityGeneration: z.string().min(1),\n category: z.literal(ADMIN_NOTIFICATION_CATEGORY),\n audienceScope: z.literal(SHARED_NOTIFICATION_AUDIENCE_SCOPE),\n archivedSnapshot: ActiveAdminNotificationSchema,\n archivedAt: epochMsSchema,\n expireAt: FirestoreTimestampSchema,\n handledBy: userIdSchema,\n});\nexport type AdminNotificationHistory = z.infer<typeof AdminNotificationHistorySchema>;\n\nexport const NotificationDeliveryPayloadSchema = z.object({\n actorId: userIdSchema.nullable(),\n metadata: z.record(z.string(), z.unknown()),\n occurrenceAt: epochMsSchema,\n});\nexport type NotificationDeliveryPayload = z.infer<typeof NotificationDeliveryPayloadSchema>;\n\nexport const NotificationDeliverySchema = z\n .object({\n deliveryId: z.string().min(1),\n state: z.enum(NOTIFICATION_DELIVERY_STATE_KEYS),\n notificationType: adminNotificationTypeSchema,\n eventId: z.string().min(1),\n recipientUid: z.null(),\n aggregationKey: z.string().min(1),\n strategy: z.literal('increment'),\n payload: NotificationDeliveryPayloadSchema,\n payloadVersion: z.literal(NOTIFICATION_DELIVERY_PAYLOAD_VERSION),\n materializationClass: z.enum(NOTIFICATION_MATERIALIZATION_CLASS_KEYS),\n createdAt: epochMsSchema,\n attemptCount: countSchema,\n nextAttemptAt: epochMsSchema,\n lastError: z.string().nullable(),\n materializedAt: epochMsSchema.nullable(),\n deadLetteredAt: epochMsSchema.nullable(),\n skipReason: z.enum(NOTIFICATION_DELIVERY_SKIP_REASON_KEYS).optional(),\n skippedAt: epochMsSchema.optional(),\n expireAt: FirestoreTimestampSchema.nullable().optional(),\n })\n .refine((row) => isAdminNotificationMetadata(row.notificationType, row.payload.metadata), {\n message: METADATA_MISMATCH.message,\n path: ['payload', 'metadata'],\n });\nexport type NotificationDelivery = z.infer<typeof NotificationDeliverySchema>;\n\nexport const NotificationArchiveAllJobSchema = z.object({\n jobId: z.string().min(1),\n userId: userIdSchema,\n category: z.literal(ADMIN_NOTIFICATION_CATEGORY),\n state: z.enum(NOTIFICATION_ARCHIVE_ALL_JOB_STATE_KEYS),\n revision: countSchema,\n archived: countSchema,\n notArchived: countSchema.optional(),\n error: z.string().nullable(),\n attemptCount: countSchema,\n nextAttemptAt: epochMsSchema,\n deadLettered: z.boolean(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n completedAt: epochMsSchema.nullable(),\n deadLetteredAt: epochMsSchema.nullable(),\n expireAt: FirestoreTimestampSchema.optional(),\n});\nexport type NotificationArchiveAllJob = z.infer<typeof NotificationArchiveAllJobSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"aggregate-stats.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/aggregate-stats.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB,eAAO,MAAM,yBAAyB;;;;;;;kBAAsC,CAAC;AAC7E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAG5E,eAAO,MAAM,+BAA+B;;;;;;;;;kBAI1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAOxF,eAAO,MAAM,sBAAsB;;kBAEjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,eAAO,MAAM,4BAA4B;;;;;;kBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAQlF,eAAO,MAAM,kB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;kBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyByC,CAAC;AAMzE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;sBAA+B,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,uBAAuB;;;;;;;;sBAAkC,CAAC;AACvE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAQxE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;kBAUnC,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,qBAAqB;;;;;;;;;iBAGhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -1,27 +1,7 @@
1
- // The aggregate tier of the stats model: every league-wide and career number, each a derived cache
2
- // of the completed games' finalized records (RULE-QS-SPORT-921). None is ever written by a client.
3
- //
4
- // leagueTeams/{teamId}.seasonStats the team's standings line
5
- // leagueTeams/{teamId}.playerSeasonStats.{userId} one membership's row — the team's league and
6
- // the key name the membership it belongs to
7
- // userProfiles/{userId}.lifetimeStats.{sportKey} a real player's career line per sport
8
- // sportHallOfFame/{sportKey} a sport's all-time leaderboard
9
- //
10
- // Which schema each sport's line of each kind uses — game lines included — is declared once, in
11
- // `SPORT_LINE_SCHEMAS`: the sport's adapter reads its lines through it, and every document field
12
- // holding lines of those kinds is built from it — the game's `stats` (`SPORT_GAME_STATS_SCHEMAS`),
13
- // the season lines, the membership rows, the lifetime lines, and the hall-of-fame entries. A
14
- // document on its own does not say which sport it counts, so a stored line is read as one sport's
15
- // line only through that sport's adapter, never by its shape (RULE-QS-SPORT-902). The lines are strict, so a
16
- // line from one sport is never mistaken for another's with fields silently dropped.
17
1
  import { z } from 'zod';
18
2
  import { LEAGUE_TYPE_KEYS, SPORT_KEY_BY_LEAGUE_TYPE } from '../types/sports.js';
19
3
  import { countSchema, epochMsSchema, userIdSchema } from './atoms.js';
20
4
  import { BasketballPlayerStatsSchema, BasketballTeamStatsSchema, CurlingTeamStatsSchema, FootballTeamStatsSchema, } from './game-stats.js';
21
- // ---------------------------------------------------------------------------------------------
22
- // Team season lines
23
- // ---------------------------------------------------------------------------------------------
24
- // The standings base every sport's season line carries. The point differential derives at read.
25
5
  const teamSeasonBaseShape = {
26
6
  gamesPlayed: countSchema,
27
7
  wins: countSchema,
@@ -31,28 +11,17 @@ const teamSeasonBaseShape = {
31
11
  pointsAgainst: countSchema,
32
12
  };
33
13
  export const TeamSeasonBaseStatsSchema = z.strictObject(teamSeasonBaseShape);
34
- // Rebounds and assists are summed from the team's players' game lines; no team line carries FP.
35
14
  export const BasketballTeamSeasonStatsSchema = z.strictObject({
36
15
  ...teamSeasonBaseShape,
37
16
  rebounds: countSchema,
38
17
  assists: countSchema,
39
18
  });
40
- // ---------------------------------------------------------------------------------------------
41
- // Player lines that carry games played: membership rows, lifetime lines, hall-of-fame entries
42
- // ---------------------------------------------------------------------------------------------
43
- // A sport with no individual stats counts games played only.
44
19
  export const GamesPlayedStatsSchema = z.strictObject({
45
20
  gamesPlayed: countSchema,
46
21
  });
47
- // The basketball game line — its counters and FP — plus games played.
48
22
  export const BasketballPlayerTotalsSchema = BasketballPlayerStatsSchema.extend({
49
23
  gamesPlayed: countSchema,
50
24
  });
51
- // ---------------------------------------------------------------------------------------------
52
- // Every sport's lines, by kind
53
- // ---------------------------------------------------------------------------------------------
54
- // A kind a sport keeps no line of is `z.never()`: curling and football keep no player game line and
55
- // no hall of fame.
56
25
  export const SPORT_LINE_SCHEMAS = {
57
26
  Basketball: {
58
27
  gamePlayer: BasketballPlayerStatsSchema,
@@ -79,19 +48,15 @@ export const SPORT_LINE_SCHEMAS = {
79
48
  teamSeason: TeamSeasonBaseStatsSchema,
80
49
  },
81
50
  };
82
- // A stored line of one kind, whichever sport it counts.
83
51
  function lineOfAnySport(kind) {
84
52
  return z.union(LEAGUE_TYPE_KEYS.map((leagueType) => SPORT_LINE_SCHEMAS[leagueType][kind]));
85
53
  }
86
54
  export const TeamSeasonStatsSchema = lineOfAnySport('teamSeason');
87
- // A row exists because a game roster named the player, and outlives the membership.
88
55
  export const PlayerSeasonStatsSchema = lineOfAnySport('membershipRow');
89
56
  export const UserLifetimeStatsSchema = z.strictObject(Object.fromEntries(LEAGUE_TYPE_KEYS.map((leagueType) => [
90
57
  SPORT_KEY_BY_LEAGUE_TYPE[leagueType],
91
58
  SPORT_LINE_SCHEMAS[leagueType].lifetime.optional(),
92
59
  ])));
93
- // `sportHallOfFame/{sportKey}` — kept only for a sport whose adapter keeps a hall of fame. Real users
94
- // only (RULE-QS-SPORT-928); an entry equals that user's lifetime line for the sport.
95
60
  export const SportHallOfFameSchema = z.object({
96
61
  playerStats: z.record(userIdSchema, lineOfAnySport('hallOfFame')),
97
62
  updatedAt: epochMsSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"aggregate-stats.js","sourceRoot":"","sources":["../../src/doc-schemas/aggregate-stats.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,mGAAmG;AACnG,EAAE;AACF,kFAAkF;AAClF,qGAAqG;AACrG,kGAAkG;AAClG,8FAA8F;AAC9F,uFAAuF;AACvF,EAAE;AACF,gGAAgG;AAChG,iGAAiG;AACjG,mGAAmG;AACnG,6FAA6F;AAC7F,kGAAkG;AAClG,6GAA6G;AAC7G,oFAAoF;AAEpF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,E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,MAAM,CAAC;IAC5C,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IACjE,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC","sourcesContent":["// The aggregate tier of the stats model: every league-wide and career number, each a derived cache\n// of the completed games' finalized records (RULE-QS-SPORT-921). None is ever written by a client.\n//\n// leagueTeams/{teamId}.seasonStats the team's standings line\n// leagueTeams/{teamId}.playerSeasonStats.{userId} one membership's row — the team's league and\n// the key name the membership it belongs to\n// userProfiles/{userId}.lifetimeStats.{sportKey} a real player's career line per sport\n// sportHallOfFame/{sportKey} a sport's all-time leaderboard\n//\n// Which schema each sport's line of each kind uses — game lines included — is declared once, in\n// `SPORT_LINE_SCHEMAS`: the sport's adapter reads its lines through it, and every document field\n// holding lines of those kinds is built from it — the game's `stats` (`SPORT_GAME_STATS_SCHEMAS`),\n// the season lines, the membership rows, the lifetime lines, and the hall-of-fame entries. A\n// document on its own does not say which sport it counts, so a stored line is read as one sport's\n// line only through that sport's adapter, never by its shape (RULE-QS-SPORT-902). The lines are strict, so a\n// line from one sport is never mistaken for another's with fields silently dropped.\n\nimport { z } from 'zod';\nimport { LEAGUE_TYPE_KEYS, SPORT_KEY_BY_LEAGUE_TYPE } from '../types/sports.js';\nimport type { LeagueType } from '../types/sports.js';\nimport type { StatLineKind } from '../types/stats.js';\nimport { countSchema, epochMsSchema, userIdSchema } from './atoms.js';\nimport {\n BasketballPlayerStatsSchema,\n BasketballTeamStatsSchema,\n CurlingTeamStatsSchema,\n FootballTeamStatsSchema,\n} from './game-stats.js';\n\n// ---------------------------------------------------------------------------------------------\n// Team season lines\n// ---------------------------------------------------------------------------------------------\n\n// The standings base every sport's season line carries. The point differential derives at read.\nconst teamSeasonBaseShape = {\n gamesPlayed: countSchema,\n wins: countSchema,\n losses: countSchema,\n ties: countSchema,\n pointsFor: countSchema,\n pointsAgainst: countSchema,\n};\n\nexport const TeamSeasonBaseStatsSchema = z.strictObject(teamSeasonBaseShape);\nexport type TeamSeasonBaseStats = z.infer<typeof TeamSeasonBaseStatsSchema>;\n\n// Rebounds and assists are summed from the team's players' game lines; no team line carries FP.\nexport const BasketballTeamSeasonStatsSchema = z.strictObject({\n ...teamSeasonBaseShape,\n rebounds: countSchema,\n assists: countSchema,\n});\nexport type BasketballTeamSeasonStats = z.infer<typeof BasketballTeamSeasonStatsSchema>;\n\n// ---------------------------------------------------------------------------------------------\n// Player lines that carry games played: membership rows, lifetime lines, hall-of-fame entries\n// ---------------------------------------------------------------------------------------------\n\n// A sport with no individual stats counts games played only.\nexport const GamesPlayedStatsSchema = z.strictObject({\n gamesPlayed: countSchema,\n});\nexport type GamesPlayedStats = z.infer<typeof GamesPlayedStatsSchema>;\n\n// The basketball game line — its counters and FP — plus games played.\nexport const BasketballPlayerTotalsSchema = BasketballPlayerStatsSchema.extend({\n gamesPlayed: countSchema,\n});\nexport type BasketballPlayerTotals = z.infer<typeof BasketballPlayerTotalsSchema>;\n\n// ---------------------------------------------------------------------------------------------\n// Every sport's lines, by kind\n// ---------------------------------------------------------------------------------------------\n\n// A kind a sport keeps no line of is `z.never()`: curling and football keep no player game line and\n// no hall of fame.\nexport const SPORT_LINE_SCHEMAS = {\n Basketball: {\n gamePlayer: BasketballPlayerStatsSchema,\n membershipRow: BasketballPlayerTotalsSchema,\n lifetime: BasketballPlayerTotalsSchema,\n hallOfFame: BasketballPlayerTotalsSchema,\n gameTeam: BasketballTeamStatsSchema,\n teamSeason: BasketballTeamSeasonStatsSchema,\n },\n Curling: {\n gamePlayer: z.never(),\n membershipRow: GamesPlayedStatsSchema,\n lifetime: GamesPlayedStatsSchema,\n hallOfFame: z.never(),\n gameTeam: CurlingTeamStatsSchema,\n teamSeason: TeamSeasonBaseStatsSchema,\n },\n Football: {\n gamePlayer: z.never(),\n membershipRow: GamesPlayedStatsSchema,\n lifetime: GamesPlayedStatsSchema,\n hallOfFame: z.never(),\n gameTeam: FootballTeamStatsSchema,\n teamSeason: TeamSeasonBaseStatsSchema,\n },\n} as const satisfies Record<LeagueType, Record<StatLineKind, z.ZodType>>;\n\n// A stored line of one kind, whichever sport it counts.\nfunction lineOfAnySport<K extends StatLineKind>(kind: K) {\n return z.union(LEAGUE_TYPE_KEYS.map((leagueType) => SPORT_LINE_SCHEMAS[leagueType][kind]));\n}\n\nexport const TeamSeasonStatsSchema = lineOfAnySport('teamSeason');\nexport type TeamSeasonStats = z.infer<typeof TeamSeasonStatsSchema>;\n\n// A row exists because a game roster named the player, and outlives the membership.\nexport const PlayerSeasonStatsSchema = lineOfAnySport('membershipRow');\nexport type PlayerSeasonStats = z.infer<typeof PlayerSeasonStatsSchema>;\n\n// Keyed by sport key, each sport's lifetime line. A sport the user never played is absent, not\n// zeroed. Ghosts never hold one (RULE-QS-SPORT-928).\ntype LifetimeLinesShape = {\n [L in LeagueType as (typeof SPORT_KEY_BY_LEAGUE_TYPE)[L]]: z.ZodOptional<\n (typeof SPORT_LINE_SCHEMAS)[L]['lifetime']\n >;\n};\n\nexport const UserLifetimeStatsSchema = z.strictObject(\n Object.fromEntries(\n LEAGUE_TYPE_KEYS.map(\n (leagueType) =>\n [\n SPORT_KEY_BY_LEAGUE_TYPE[leagueType],\n SPORT_LINE_SCHEMAS[leagueType].lifetime.optional(),\n ] as const,\n ),\n ) as LifetimeLinesShape,\n);\nexport type UserLifetimeStats = z.infer<typeof UserLifetimeStatsSchema>;\n\n// `sportHallOfFame/{sportKey}` — kept only for a sport whose adapter keeps a hall of fame. Real users\n// only (RULE-QS-SPORT-928); an entry equals that user's lifetime line for the sport.\nexport const SportHallOfFameSchema = z.object({\n playerStats: z.record(userIdSchema, lineOfAnySport('hallOfFame')),\n updatedAt: epochMsSchema,\n});\nexport type SportHallOfFame = z.infer<typeof SportHallOfFameSchema>;\n"]}
1
+ {"version":3,"file":"aggregate-stats.js","sourceRoot":"","sources":["../../src/doc-schemas/aggregate-stats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EA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types/sports.js';\nimport type { StatLineKind } from '../types/stats.js';\nimport { countSchema, epochMsSchema, userIdSchema } from './atoms.js';\nimport {\n BasketballPlayerStatsSchema,\n BasketballTeamStatsSchema,\n CurlingTeamStatsSchema,\n FootballTeamStatsSchema,\n} from './game-stats.js';\n\nconst teamSeasonBaseShape = {\n gamesPlayed: countSchema,\n wins: countSchema,\n losses: countSchema,\n ties: countSchema,\n pointsFor: countSchema,\n pointsAgainst: countSchema,\n};\n\nexport const TeamSeasonBaseStatsSchema = z.strictObject(teamSeasonBaseShape);\nexport type TeamSeasonBaseStats = z.infer<typeof TeamSeasonBaseStatsSchema>;\n\nexport const BasketballTeamSeasonStatsSchema = z.strictObject({\n ...teamSeasonBaseShape,\n rebounds: countSchema,\n assists: countSchema,\n});\nexport type BasketballTeamSeasonStats = z.infer<typeof BasketballTeamSeasonStatsSchema>;\n\nexport const GamesPlayedStatsSchema = z.strictObject({\n gamesPlayed: countSchema,\n});\nexport type GamesPlayedStats = z.infer<typeof GamesPlayedStatsSchema>;\n\nexport const BasketballPlayerTotalsSchema = BasketballPlayerStatsSchema.extend({\n gamesPlayed: countSchema,\n});\nexport type BasketballPlayerTotals = z.infer<typeof BasketballPlayerTotalsSchema>;\n\nexport const SPORT_LINE_SCHEMAS = {\n Basketball: {\n gamePlayer: BasketballPlayerStatsSchema,\n membershipRow: BasketballPlayerTotalsSchema,\n lifetime: BasketballPlayerTotalsSchema,\n hallOfFame: BasketballPlayerTotalsSchema,\n gameTeam: BasketballTeamStatsSchema,\n teamSeason: BasketballTeamSeasonStatsSchema,\n },\n Curling: {\n gamePlayer: z.never(),\n membershipRow: GamesPlayedStatsSchema,\n lifetime: GamesPlayedStatsSchema,\n hallOfFame: z.never(),\n gameTeam: CurlingTeamStatsSchema,\n teamSeason: TeamSeasonBaseStatsSchema,\n },\n Football: {\n gamePlayer: z.never(),\n membershipRow: GamesPlayedStatsSchema,\n lifetime: GamesPlayedStatsSchema,\n hallOfFame: z.never(),\n gameTeam: FootballTeamStatsSchema,\n teamSeason: TeamSeasonBaseStatsSchema,\n },\n} as const satisfies Record<LeagueType, Record<StatLineKind, z.ZodType>>;\n\nfunction lineOfAnySport<K extends StatLineKind>(kind: K) {\n return z.union(LEAGUE_TYPE_KEYS.map((leagueType) => SPORT_LINE_SCHEMAS[leagueType][kind]));\n}\n\nexport const TeamSeasonStatsSchema = lineOfAnySport('teamSeason');\nexport type TeamSeasonStats = z.infer<typeof TeamSeasonStatsSchema>;\n\nexport const PlayerSeasonStatsSchema = lineOfAnySport('membershipRow');\nexport type PlayerSeasonStats = z.infer<typeof PlayerSeasonStatsSchema>;\n\ntype LifetimeLinesShape = {\n [L in LeagueType as (typeof SPORT_KEY_BY_LEAGUE_TYPE)[L]]: z.ZodOptional<\n (typeof SPORT_LINE_SCHEMAS)[L]['lifetime']\n >;\n};\n\nexport const UserLifetimeStatsSchema = z.strictObject(\n Object.fromEntries(\n LEAGUE_TYPE_KEYS.map(\n (leagueType) =>\n [\n SPORT_KEY_BY_LEAGUE_TYPE[leagueType],\n SPORT_LINE_SCHEMAS[leagueType].lifetime.optional(),\n ] as const,\n ),\n ) as LifetimeLinesShape,\n);\nexport type UserLifetimeStats = z.infer<typeof UserLifetimeStatsSchema>;\n\nexport const SportHallOfFameSchema = z.object({\n playerStats: z.record(userIdSchema, lineOfAnySport('hallOfFame')),\n updatedAt: epochMsSchema,\n});\nexport type SportHallOfFame = z.infer<typeof SportHallOfFameSchema>;\n"]}
@@ -4,19 +4,7 @@ export declare const epochMsSchema: z.ZodNumber;
4
4
  export declare const countSchema: z.ZodNumber;
5
5
  export declare const revisionSchema: z.ZodNumber;
6
6
  export declare const appliedRevisionSchema: z.ZodNumber;
7
- /**
8
- * Why `checkInputFormat` refused a text, as a field's wire schema words it, with the declaration's
9
- * bounds: a required field left blank is "Required.", a short one names its minimum, a long one its
10
- * maximum.
11
- */
12
7
  export declare const TEXT_FIELD_ISSUE_MESSAGES: Readonly<Record<InputFormatIssue, (declaration: DeclaredInputFormat) => string>>;
13
- /**
14
- * A text field's wire schema, built from the field's one declaration: it runs input-format-core's
15
- * check — trim, then min, max, and the format's characters — and parses to the text the check keeps.
16
- * The form's input reads the same declaration, so the two accept exactly the same text (RULE-STD-ARCH-102). A
17
- * refusal carries the issue and the declaration's bounds, so a form can say which bound was missed.
18
- */
19
- /** A text field's declaration, as a form and its wire schema both read it. */
20
8
  export type TextFieldDeclaration = DeclaredInputFormat;
21
9
  export type TextFieldResult = {
22
10
  readonly ok: true;
@@ -25,14 +13,9 @@ export type TextFieldResult = {
25
13
  readonly ok: false;
26
14
  readonly reason: string;
27
15
  };
28
- /**
29
- * Checks `text` against its field's declaration: the value the field keeps, or the sentence that
30
- * refuses it — the same words `textFieldSchema` gives the wire.
31
- */
32
16
  export declare function checkTextField(declaration: TextFieldDeclaration, text: string): TextFieldResult;
33
17
  export declare function textFieldSchema(declaration: DeclaredInputFormat): z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
34
18
  export declare const repairReasonSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
35
- /** The shape of a calendar date, `YYYY-MM-DD`; a form names the issue it raises by this pattern. */
36
19
  export declare const CALENDAR_DATE_PATTERN: RegExp;
37
20
  export declare const calendarDateSchema: z.ZodString;
38
21
  export declare const documentIdSegmentSchema: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"atoms.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/atoms.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACtB,MAAM,oCAAoC,CAAC;AAgC5C,eAAO,MAAM,aAAa,aAAiC,CAAC;AAG5D,eAAO,MAAM,WAAW,aAAiC,CAAC;AAG1D,eAAO,MAAM,cAAc,aAA8B,CAAC;AAG1D,eAAO,MAAM,qBAAqB,aAAiC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,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