@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,16 +1,10 @@
1
- // `userProfiles/{userId}` — the account's profile, one per Firebase Auth uid. Ghosts have none.
2
- // It is publicly readable (a profile page renders signed out), so it holds nothing personal:
3
- // email and contact details live in its owner-only `privateData/{userId}` document (RULE-STD-BACKEND-105).
4
- // Plus its `historicalStats/{sportKey}` subcollection.
5
1
  import { z } from 'zod';
6
2
  import { THEME_NAMES } from '@ttt-productions/theme-core';
7
3
  import { CONTACT_PHONE_INPUT_FORMAT } from '../input-formats/input-formats.js';
8
4
  import { BasketballPlayerTotalsSchema, UserLifetimeStatsSchema } from './aggregate-stats.js';
9
5
  import { epochMsSchema, textFieldSchema, userStatusSchema } from './atoms.js';
10
6
  import { awardIdSchema } from './catalogs.js';
11
- // A saved theme, typed by theme-core's theme set — the one declaration its provider renders from.
12
7
  export const themeNameSchema = z.enum(THEME_NAMES);
13
- // An award granted to this user. Name and imagery resolve from `awardDefinitions/{awardId}`.
14
8
  export const GrantedAwardSchema = z.object({
15
9
  awardId: awardIdSchema,
16
10
  grantedAt: epochMsSchema,
@@ -18,51 +12,29 @@ export const GrantedAwardSchema = z.object({
18
12
  export const UserProfileSchema = z.object({
19
13
  displayName: z.string(),
20
14
  displayName_lowercase: z.string(),
21
- // Written `active` at registration and by the profile copy; nothing else writes it.
22
15
  userStatus: userStatusSchema,
23
- // Per sport, the career line; career games played is the sum of their games played, derived at
24
- // read and never stored.
25
16
  lifetimeStats: UserLifetimeStatsSchema.optional(),
26
17
  grantedAwards: z.array(GrantedAwardSchema).optional(),
27
- // The awards the account shows beside its name, each one it holds.
28
18
  primaryAwardId: awardIdSchema.optional(),
29
19
  secondaryAwardId: awardIdSchema.optional(),
30
20
  createdAt: epochMsSchema,
31
21
  updatedAt: epochMsSchema,
32
22
  });
33
- // `userProfiles/{userId}/privateData/{userId}` — readable by its owner and by admins; written only
34
- // by callables.
35
23
  export const UserPrivateDataSchema = z.object({
36
24
  email: z.string(),
37
- // When this login's registration started (`createRegistrationStart`); `registerUser` refuses
38
- // without it. Absent on an account copied from V1, which registered before the step existed.
39
25
  registrationStartedAt: epochMsSchema.optional(),
40
- // When the orphan-registration cleanup decided to delete this uid's login. Written in the
41
- // cleanup's eligibility transaction BEFORE the Auth delete, and both registration steps answer
42
- // `registrationExpired` in their own transactions while it is present, so no registration
43
- // completes into a login that is about to be deleted. Backend-only.
44
26
  orphanDeletionClaimedAt: epochMsSchema.optional(),
45
- // Pre-fills the contact phone when this user creates a team.
46
27
  defaultContactPhone: textFieldSchema(CONTACT_PHONE_INPUT_FORMAT).optional(),
47
- // The account's copy of the viewer's settings, synced with the device's. Absent means the
48
- // account has saved nothing and the device's own choice stands.
49
28
  theme: themeNameSchema.optional(),
50
29
  reducedMotion: z.boolean().optional(),
51
30
  updatedAt: epochMsSchema,
52
31
  });
53
- // `userProfiles/{userId}/historicalStats/{sportKey}` — pre-Q-Sports career totals an admin enters,
54
- // folded into lifetime and hall-of-fame recalculation. Absolute totals, not increments. Basketball is
55
- // the sport with a baseline, so it is the basketball totals line without FP, which the rebuild
56
- // derives when it folds the baseline in.
57
32
  export const HistoricalStatsSchema = BasketballPlayerTotalsSchema.omit({ fantasyPoints: true });
58
- // Every field of a baseline, keyed so the record cannot miss one or name one the schema lacks, in the
59
- // order an admin enters them.
60
33
  const HISTORICAL_STAT_ENTRY = {
61
34
  gamesPlayed: true,
62
35
  points: true,
63
36
  rebounds: true,
64
37
  assists: true,
65
38
  };
66
- /** A baseline's totals, in the order an admin enters them. */
67
39
  export const HISTORICAL_STAT_KEYS = Object.keys(HISTORICAL_STAT_ENTRY);
68
40
  //# sourceMappingURL=user-profile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-profile.js","sourceRoot":"","sources":["../../src/doc-schemas/user-profile.ts"],"names":[],"mappings":"AAAA,gGAAgG;AACh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C;IAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,6FAA6F;IAC7F,6FAA6F;IAC7F,qBAAqB,EAAE,aAAa,CAAC,QAAQ,EAAE;IAC/C,0FAA0F;IAC1F,+FAA+F;IAC/F,0FAA0F;IAC1F,oEAAoE;IACpE,uBAAuB,EAAE,aAAa,CAAC,QAAQ,EAAE;IACjD,6DAA6D;IAC7D,mBAAmB,EAAE,eAAe,CAAC,0BAA0B,CAAC,CAAC,QAAQ,EAAE;IAC3E,0FAA0F;IAC1F,gEAAgE;IAChE,KAAK,EAAE,eAAe,CAAC,QAAQ,EAAE;IACjC,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,mGAAmG;AACnG,sGAAsG;AACtG,+FAA+F;AAC/F,yCAAyC;AACzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;AAGhG,sGAAsG;AACtG,8BAA8B;AAC9B,MAAM,qBAAqB,GAAwC;IACjE,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,8DAA8D;AAC9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAC7C,qBAAqB,CACgB,CAAC","sourcesContent":["// `userProfiles/{userId}` — the account's profile, one per Firebase Auth uid. Ghosts have none.\n// It is publicly readable (a profile page renders signed out), so it holds nothing personal:\n// email and contact details live in its owner-only `privateData/{userId}` document (RULE-STD-BACKEND-105).\n// Plus its `historicalStats/{sportKey}` subcollection.\n\nimport { z } from 'zod';\nimport { THEME_NAMES } from '@ttt-productions/theme-core';\nimport { CONTACT_PHONE_INPUT_FORMAT } from '../input-formats/input-formats.js';\nimport { BasketballPlayerTotalsSchema, UserLifetimeStatsSchema } from './aggregate-stats.js';\nimport { epochMsSchema, textFieldSchema, userStatusSchema } from './atoms.js';\nimport { awardIdSchema } from './catalogs.js';\n\n// A saved theme, typed by theme-core's theme set — the one declaration its provider renders from.\nexport const themeNameSchema = z.enum(THEME_NAMES);\n\n// An award granted to this user. Name and imagery resolve from `awardDefinitions/{awardId}`.\nexport const GrantedAwardSchema = z.object({\n awardId: awardIdSchema,\n grantedAt: epochMsSchema,\n});\nexport type GrantedAward = z.infer<typeof GrantedAwardSchema>;\n\nexport const UserProfileSchema = z.object({\n displayName: z.string(),\n displayName_lowercase: z.string(),\n // Written `active` at registration and by the profile copy; nothing else writes it.\n userStatus: userStatusSchema,\n // Per sport, the career line; career games played is the sum of their games played, derived at\n // read and never stored.\n lifetimeStats: UserLifetimeStatsSchema.optional(),\n grantedAwards: z.array(GrantedAwardSchema).optional(),\n // The awards the account shows beside its name, each one it holds.\n primaryAwardId: awardIdSchema.optional(),\n secondaryAwardId: awardIdSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type UserProfile = z.infer<typeof UserProfileSchema>;\n\n// `userProfiles/{userId}/privateData/{userId}` — readable by its owner and by admins; written only\n// by callables.\nexport const UserPrivateDataSchema = z.object({\n email: z.string(),\n // When this login's registration started (`createRegistrationStart`); `registerUser` refuses\n // without it. Absent on an account copied from V1, which registered before the step existed.\n registrationStartedAt: epochMsSchema.optional(),\n // When the orphan-registration cleanup decided to delete this uid's login. Written in the\n // cleanup's eligibility transaction BEFORE the Auth delete, and both registration steps answer\n // `registrationExpired` in their own transactions while it is present, so no registration\n // completes into a login that is about to be deleted. Backend-only.\n orphanDeletionClaimedAt: epochMsSchema.optional(),\n // Pre-fills the contact phone when this user creates a team.\n defaultContactPhone: textFieldSchema(CONTACT_PHONE_INPUT_FORMAT).optional(),\n // The account's copy of the viewer's settings, synced with the device's. Absent means the\n // account has saved nothing and the device's own choice stands.\n theme: themeNameSchema.optional(),\n reducedMotion: z.boolean().optional(),\n updatedAt: epochMsSchema,\n});\nexport type UserPrivateData = z.infer<typeof UserPrivateDataSchema>;\n\n// `userProfiles/{userId}/historicalStats/{sportKey}` — pre-Q-Sports career totals an admin enters,\n// folded into lifetime and hall-of-fame recalculation. Absolute totals, not increments. Basketball is\n// the sport with a baseline, so it is the basketball totals line without FP, which the rebuild\n// derives when it folds the baseline in.\nexport const HistoricalStatsSchema = BasketballPlayerTotalsSchema.omit({ fantasyPoints: true });\nexport type HistoricalStats = z.infer<typeof HistoricalStatsSchema>;\n\n// Every field of a baseline, keyed so the record cannot miss one or name one the schema lacks, in the\n// order an admin enters them.\nconst HISTORICAL_STAT_ENTRY: Record<keyof HistoricalStats, true> = {\n gamesPlayed: true,\n points: true,\n rebounds: true,\n assists: true,\n};\n\n/** A baseline's totals, in the order an admin enters them. */\nexport const HISTORICAL_STAT_KEYS = Object.keys(\n HISTORICAL_STAT_ENTRY,\n) as readonly (keyof HistoricalStats)[];\n"]}
1
+ {"version":3,"file":"user-profile.js","sourceRoot":"","sources":["../../src/doc-schemas/user-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,aAAa;IACtB,SAAS,EAAE,aAAa;CACzB,CAAC,C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NAMES } from '@ttt-productions/theme-core';\nimport { CONTACT_PHONE_INPUT_FORMAT } from '../input-formats/input-formats.js';\nimport { BasketballPlayerTotalsSchema, UserLifetimeStatsSchema } from './aggregate-stats.js';\nimport { epochMsSchema, textFieldSchema, userStatusSchema } from './atoms.js';\nimport { awardIdSchema } from './catalogs.js';\n\nexport const themeNameSchema = z.enum(THEME_NAMES);\n\nexport const GrantedAwardSchema = z.object({\n awardId: awardIdSchema,\n grantedAt: epochMsSchema,\n});\nexport type GrantedAward = z.infer<typeof GrantedAwardSchema>;\n\nexport const UserProfileSchema = z.object({\n displayName: z.string(),\n displayName_lowercase: z.string(),\n userStatus: userStatusSchema,\n lifetimeStats: UserLifetimeStatsSchema.optional(),\n grantedAwards: z.array(GrantedAwardSchema).optional(),\n primaryAwardId: awardIdSchema.optional(),\n secondaryAwardId: awardIdSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type UserProfile = z.infer<typeof UserProfileSchema>;\n\nexport const UserPrivateDataSchema = z.object({\n email: z.string(),\n registrationStartedAt: epochMsSchema.optional(),\n orphanDeletionClaimedAt: epochMsSchema.optional(),\n defaultContactPhone: textFieldSchema(CONTACT_PHONE_INPUT_FORMAT).optional(),\n theme: themeNameSchema.optional(),\n reducedMotion: z.boolean().optional(),\n updatedAt: epochMsSchema,\n});\nexport type UserPrivateData = z.infer<typeof UserPrivateDataSchema>;\n\nexport const HistoricalStatsSchema = BasketballPlayerTotalsSchema.omit({ fantasyPoints: true });\nexport type HistoricalStats = z.infer<typeof HistoricalStatsSchema>;\n\nconst HISTORICAL_STAT_ENTRY: Record<keyof HistoricalStats, true> = {\n gamesPlayed: true,\n points: true,\n rebounds: true,\n assists: true,\n};\n\nexport const HISTORICAL_STAT_KEYS = Object.keys(\n HISTORICAL_STAT_ENTRY,\n) as readonly (keyof HistoricalStats)[];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"waiver-template.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,sBAAsB,aAA0B,CAAC;AAC9D,eAAO,MAAM,iCAAiC,aAA0B,CAAC;AAIzE,eAAO,MAAM,oBAAoB;;;;;;;;;iBAuB7B,CAAC;AACL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAOlE,eAAO,MAAM,4BAA4B;;kBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAIlF,eAAO,MAAM,2BAA2B;;;;;;iBAOtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
1
+ {"version":3,"file":"waiver-template.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,sBAAsB,aAA0B,CAAC;AAC9D,eAAO,MAAM,iCAAiC,aAA0B,CAAC;AAEzE,eAAO,MAAM,oBAAoB;;;;;;;;;iBAgB7B,CAAC;AACL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,eAAO,MAAM,4BAA4B;;kBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,2BAA2B;;;;;;iBAMtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -1,15 +1,7 @@
1
- // Waiver templates: the wording an admin authors for a league's players to sign.
2
- //
3
- // The wording is versioned. Every save that changes it publishes a new version, and each published
4
- // version is its own immutable document — so the exact wording in force when any signature was
5
- // captured still exists however the template has changed since. A signature also keeps its own
6
- // copy of what the signer saw (`SignedWaiverSchema`).
7
1
  import { z } from 'zod';
8
2
  import { countSchema, documentIdSegmentSchema, epochMsSchema, userIdSchema } from './atoms.js';
9
3
  export const waiverTemplateIdSchema = documentIdSegmentSchema;
10
4
  export const waiverTemplateVersionNumberSchema = z.number().int().min(1);
11
- // `waiverTemplates/{waiverTemplateId}` — the template as it reads now: its latest published
12
- // version's wording and number.
13
5
  export const WaiverTemplateSchema = z
14
6
  .object({
15
7
  title: z.string(),
@@ -17,38 +9,25 @@ export const WaiverTemplateSchema = z
17
9
  version: waiverTemplateVersionNumberSchema,
18
10
  createdAt: epochMsSchema,
19
11
  updatedAt: epochMsSchema,
20
- // Whether the template is retired, so the templates offered to a league are one query filter
21
- // (`retired == false`) rather than a download of every template ever kept. True exactly when
22
- // `retiredAt` is set.
23
12
  retired: z.boolean(),
24
- // Set when an admin deletes a template a signature or a closed league still names, or one with
25
- // more versions than a delete removes: it is kept for them and offered to no league again. A
26
- // template nothing names is deleted outright instead.
27
13
  retiredAt: epochMsSchema.optional(),
28
- // When a league last came to require the template. The league save that chooses it writes this in
29
- // its own transaction so a delete's read of this document conflicts with that save; it is its own
30
- // field so `updatedAt` keeps meaning the template itself changed.
14
+ // Its own field, so `updatedAt` keeps meaning the template itself changed; the league save
15
+ // writes it so a delete's read of this document conflicts with that save.
31
16
  lastChosenAt: epochMsSchema.optional(),
32
17
  })
33
18
  .refine((template) => template.retired === (template.retiredAt !== undefined), {
34
19
  message: 'A template is retired exactly when it records when it was retired.',
35
20
  path: ['retired'],
36
21
  });
37
- // `_serverData/waiverTemplateRegistry` — the fence of the offered-template cap. Template creation counts
38
- // the templates not retired in its transaction against MAX_OFFERED_WAIVER_TEMPLATES, and a query does
39
- // not lock against an insert, so each creation advances `templateRevision` here: two creations at the
40
- // cap conflict instead of both passing (RULE-STD-BACKEND-116). Only its changing matters; absent until the first
41
- // creation.
22
+ // `_serverData/waiverTemplateRegistry` — the write fence of the offered-template cap
23
+ // (RULE-STD-BACKEND-116): only its changing matters.
42
24
  export const WaiverTemplateRegistrySchema = z.strictObject({
43
25
  templateRevision: countSchema,
44
26
  });
45
- // `waiverTemplates/{waiverTemplateId}/waiverTemplateVersions/{versionId}` — one published version,
46
- // created once and never changed.
47
27
  export const WaiverTemplateVersionSchema = z.object({
48
28
  version: waiverTemplateVersionNumberSchema,
49
29
  title: z.string(),
50
30
  waiverText: z.string(),
51
- // Absent on a version whose author was never recorded.
52
31
  publishedByUserId: userIdSchema.optional(),
53
32
  publishedAt: epochMsSchema,
54
33
  });
@@ -1 +1 @@
1
- {"version":3,"file":"waiver-template.js","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,EAAE;AACF,mGAAmG;AACnG,+FAA+F;AAC/F,+FAA+F;AAC/F,sDAAsD;AAEtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/F,MAAM,CAAC,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAC9D,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEzE,4FAA4F;AAC5F,gCAAgC;AAChC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,OAAO,EAAE,iCAAiC;IAC1C,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;IACxB,6FAA6F;IAC7F,6FAA6F;IAC7F,sBAAsB;IACtB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,+FAA+F;IAC/F,6FAA6F;IAC7F,sDAAsD;IACtD,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE;IACnC,kGAAkG;IAClG,kGAAkG;IAClG,kEAAkE;IAClE,YAAY,EAAE,aAAa,CAAC,QAAQ,EAAE;CACvC,CAAC;KACD,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,SAAS,KAAK,SAAS,CAAC,EAAE;IAC7E,OAAO,EAAE,oEAAoE;IAC7E,IAAI,EAAE,CAAC,SAAS,CAAC;CAClB,CAAC,CAAC;AAGL,yGAAyG;AACzG,sGAAsG;AACtG,sGAAsG;AACtG,iHAAiH;AACjH,YAAY;AACZ,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,YAAY,CAAC;IACzD,gBAAgB,EAAE,WAAW;CAC9B,CAAC,CAAC;AAGH,mGAAmG;AACnG,kCAAkC;AAClC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,OAAO,EAAE,iCAAiC;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,uDAAuD;IACvD,iBAAiB,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAC","sourcesContent":["// Waiver templates: the wording an admin authors for a league's players to sign.\n//\n// The wording is versioned. Every save that changes it publishes a new version, and each published\n// version is its own immutable document — so the exact wording in force when any signature was\n// captured still exists however the template has changed since. A signature also keeps its own\n// copy of what the signer saw (`SignedWaiverSchema`).\n\nimport { z } from 'zod';\nimport { countSchema, documentIdSegmentSchema, epochMsSchema, userIdSchema } from './atoms.js';\n\nexport const waiverTemplateIdSchema = documentIdSegmentSchema;\nexport const waiverTemplateVersionNumberSchema = z.number().int().min(1);\n\n// `waiverTemplates/{waiverTemplateId}` — the template as it reads now: its latest published\n// version's wording and number.\nexport const WaiverTemplateSchema = z\n .object({\n title: z.string(),\n waiverText: z.string(),\n version: waiverTemplateVersionNumberSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n // Whether the template is retired, so the templates offered to a league are one query filter\n // (`retired == false`) rather than a download of every template ever kept. True exactly when\n // `retiredAt` is set.\n retired: z.boolean(),\n // Set when an admin deletes a template a signature or a closed league still names, or one with\n // more versions than a delete removes: it is kept for them and offered to no league again. A\n // template nothing names is deleted outright instead.\n retiredAt: epochMsSchema.optional(),\n // When a league last came to require the template. The league save that chooses it writes this in\n // its own transaction so a delete's read of this document conflicts with that save; it is its own\n // field so `updatedAt` keeps meaning the template itself changed.\n lastChosenAt: epochMsSchema.optional(),\n })\n .refine((template) => template.retired === (template.retiredAt !== undefined), {\n message: 'A template is retired exactly when it records when it was retired.',\n path: ['retired'],\n });\nexport type WaiverTemplate = z.infer<typeof WaiverTemplateSchema>;\n\n// `_serverData/waiverTemplateRegistry` — the fence of the offered-template cap. Template creation counts\n// the templates not retired in its transaction against MAX_OFFERED_WAIVER_TEMPLATES, and a query does\n// not lock against an insert, so each creation advances `templateRevision` here: two creations at the\n// cap conflict instead of both passing (RULE-STD-BACKEND-116). Only its changing matters; absent until the first\n// creation.\nexport const WaiverTemplateRegistrySchema = z.strictObject({\n templateRevision: countSchema,\n});\nexport type WaiverTemplateRegistry = z.infer<typeof WaiverTemplateRegistrySchema>;\n\n// `waiverTemplates/{waiverTemplateId}/waiverTemplateVersions/{versionId}` — one published version,\n// created once and never changed.\nexport const WaiverTemplateVersionSchema = z.object({\n version: waiverTemplateVersionNumberSchema,\n title: z.string(),\n waiverText: z.string(),\n // Absent on a version whose author was never recorded.\n publishedByUserId: userIdSchema.optional(),\n publishedAt: epochMsSchema,\n});\nexport type WaiverTemplateVersion = z.infer<typeof WaiverTemplateVersionSchema>;\n"]}
1
+ {"version":3,"file":"waiver-template.js","sourceRoot":"","sources":["../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CAAC,CAAC,MAAM,EAAE;IACtB,iBAAiB,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { countSchema, documentIdSegmentSchema, epochMsSchema, userIdSchema } from './atoms.js';\n\nexport const waiverTemplateIdSchema = documentIdSegmentSchema;\nexport const waiverTemplateVersionNumberSchema = z.number().int().min(1);\n\nexport const WaiverTemplateSchema = z\n .object({\n title: z.string(),\n waiverText: z.string(),\n version: waiverTemplateVersionNumberSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n retired: z.boolean(),\n retiredAt: epochMsSchema.optional(),\n // Its own field, so `updatedAt` keeps meaning the template itself changed; the league save\n // writes it so a delete's read of this document conflicts with that save.\n lastChosenAt: epochMsSchema.optional(),\n })\n .refine((template) => template.retired === (template.retiredAt !== undefined), {\n message: 'A template is retired exactly when it records when it was retired.',\n path: ['retired'],\n });\nexport type WaiverTemplate = z.infer<typeof WaiverTemplateSchema>;\n\n// `_serverData/waiverTemplateRegistry` — the write fence of the offered-template cap\n// (RULE-STD-BACKEND-116): only its changing matters.\nexport const WaiverTemplateRegistrySchema = z.strictObject({\n templateRevision: countSchema,\n});\nexport type WaiverTemplateRegistry = z.infer<typeof WaiverTemplateRegistrySchema>;\n\nexport const WaiverTemplateVersionSchema = z.object({\n version: waiverTemplateVersionNumberSchema,\n title: z.string(),\n waiverText: z.string(),\n publishedByUserId: userIdSchema.optional(),\n publishedAt: epochMsSchema,\n});\nexport type WaiverTemplateVersion = z.infer<typeof WaiverTemplateVersionSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"waivers-and-hardware.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/waivers-and-hardware.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;iBAgD5B,CAAC;AACJ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,eAAO,MAAM,kBAAkB;;;kBAG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAM9D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;kBA8BpC,CAAC;AACJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"waivers-and-hardware.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/waivers-and-hardware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;iBAwC5B,CAAC;AACJ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,kBAAkB;;;kBAG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;kBA6BpC,CAAC;AACJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -1,35 +1,22 @@
1
- // Signed waivers and referee hardware contracts. Signatures are legal artifacts: a signed waiver
2
- // carries the exact wording the signer saw, as named snapshots. The templates they are signed from
3
- // are ./waiver-template.ts.
4
1
  import { z } from 'zod';
5
2
  import { epochMsSchema, hardwareLoanContractStatusSchema, leagueIdSchema, teamIdSchema, userIdSchema, waiverWitnessAuthoritySchema, } from './atoms.js';
6
3
  import { PENDING_HARDWARE_LOAN_CONTRACT_STATUS, RETURNED_HARDWARE_LOAN_CONTRACT_STATUS, } from '../types/unions.js';
7
4
  import { StorageObjectRefSchema } from './pending-media.js';
8
5
  import { waiverTemplateIdSchema, waiverTemplateVersionNumberSchema } from './waiver-template.js';
9
- // `signedWaivers/{leagueId}_{userId}` — one signed waiver per player per league, never replaced,
10
- // moved, or deleted: a ghost's stays under the ghost's id after the ghost is removed or linked.
11
6
  export const SignedWaiverSchema = z
12
7
  .object({
13
8
  leagueId: leagueIdSchema,
14
9
  userId: userIdSchema,
15
10
  waiverTemplateId: waiverTemplateIdSchema,
16
- // The published version of the template the signature was captured under. A record that names
17
- // no version has its wording snapshot as its whole record.
18
11
  waiverTemplateVersion: waiverTemplateVersionNumberSchema.optional(),
19
12
  waiverTitleSnapshot: z.string(),
20
13
  waiverTextSnapshot: z.string(),
21
- // The kept signature image. Read only through the signature-read callable, never by URL.
22
14
  signatureFile: StorageObjectRefSchema,
23
15
  signedAt: epochMsSchema,
24
- // A ghost player's waiver is signed by a witness for the ghost's team: the witness's account,
25
- // the authority they signed under, and the ghost's name at signing — a named snapshot, so the
26
- // record still says whom it was for after the ghost's public identity is gone (RULE-STD-ARCH-103).
27
16
  teamId: teamIdSchema.optional(),
28
17
  witnessUserId: userIdSchema.optional(),
29
18
  witnessAuthority: waiverWitnessAuthoritySchema.optional(),
30
19
  subjectDisplayNameSnapshot: z.string().optional(),
31
- // A V1 witnessed waiver recorded the witness's name as it was at signing, and never the authority
32
- // or the ghost's name; the copy keeps that name as a named snapshot (RULE-STD-ARCH-103) and guesses neither.
33
20
  witnessDisplayNameSnapshot: z.string().optional(),
34
21
  })
35
22
  .refine((waiver) => {
@@ -52,23 +39,16 @@ export const SignedWaiverSchema = z
52
39
  message: "A ghost's waiver carries its team, witness, authority, and name together; or, copied from V1, its team, witness, and the witness's recorded name; or none of them.",
53
40
  path: ['witnessUserId'],
54
41
  });
55
- // One loaned item, as the contract was created with it: its catalog id and name. A contract keeps
56
- // what it loaned even if the catalog later changes.
57
42
  export const HardwareItemSchema = z.strictObject({
58
43
  id: z.string().min(1),
59
44
  name: z.string().min(1),
60
45
  });
61
- // `hardwareLoanContracts/{contractId}` — equipment loaned to a referee: who holds it, what they hold,
62
- // and their signature on the loan agreement, a legal artifact. Names resolve from `publicUsers` at
63
- // read time (RULE-STD-ARCH-103). `pending` until the referee signs; `loaned` from the signing, which keeps the
64
- // signature for good; `returned` once an admin records the equipment back, the signature retained.
65
46
  export const HardwareLoanContractSchema = z
66
47
  .strictObject({
67
48
  refereeUserId: userIdSchema,
68
49
  createdByUserId: userIdSchema,
69
50
  hardware: z.array(HardwareItemSchema).min(1),
70
51
  status: hardwareLoanContractStatusSchema,
71
- // The kept signature image. Read only through the signature-read callables, never by URL.
72
52
  signatureFile: StorageObjectRefSchema.optional(),
73
53
  createdAt: epochMsSchema,
74
54
  loanedAt: epochMsSchema.optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"waivers-and-hardware.js","sourceRoot":"","sources":["../../src/doc-schemas/waivers-and-hardware.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,mGAAmG;AACnG,4BAA4B;AAE5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,aAAa,EACb,gCAAgC,EAChC,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,4BAA4B,GAC7B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,qCAAqC,EACrC,sCAAsC,GACvC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC;AAEjG,iGAAiG;AACjG,gGAAgG;AAChG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,gBAAgB,EAAE,sBAAsB;IACxC,8FAA8F;IAC9F,2DAA2D;IAC3D,qBAAqB,EAAE,i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;IACpF,IAAI,EAAE,CAAC,eAAe,CAAC;CACxB,CACF;KACA,MAAM,CACL,CAAC,QAAQ,EAAE,EAAE,CACX,CAAC,QAAQ,CAAC,MAAM,KAAK,sCAAsC,CAAC;IAC5D,CAAC,QAAQ,CAAC,UAAU,KAAK,SAAS,CAAC,EACrC;IACE,OAAO,EAAE,kEAAkE;IAC3E,IAAI,EAAE,CAAC,YAAY,CAAC;CACrB,CACF,CAAC","sourcesContent":["// Signed waivers and referee hardware contracts. Signatures are legal artifacts: a signed waiver\n// carries the exact wording the signer saw, as named snapshots. The templates they are signed from\n// are ./waiver-template.ts.\n\nimport { z } from 'zod';\nimport {\n epochMsSchema,\n hardwareLoanContractStatusSchema,\n leagueIdSchema,\n teamIdSchema,\n userIdSchema,\n waiverWitnessAuthoritySchema,\n} from './atoms.js';\nimport {\n PENDING_HARDWARE_LOAN_CONTRACT_STATUS,\n RETURNED_HARDWARE_LOAN_CONTRACT_STATUS,\n} from '../types/unions.js';\nimport { StorageObjectRefSchema } from './pending-media.js';\nimport { waiverTemplateIdSchema, waiverTemplateVersionNumberSchema } from './waiver-template.js';\n\n// `signedWaivers/{leagueId}_{userId}` — one signed waiver per player per league, never replaced,\n// moved, or deleted: a ghost's stays under the ghost's id after the ghost is removed or linked.\nexport const SignedWaiverSchema = z\n .object({\n leagueId: leagueIdSchema,\n userId: userIdSchema,\n waiverTemplateId: waiverTemplateIdSchema,\n // The published version of the template the signature was captured under. A record that names\n // no version has its wording snapshot as its whole record.\n waiverTemplateVersion: waiverTemplateVersionNumberSchema.optional(),\n waiverTitleSnapshot: z.string(),\n waiverTextSnapshot: z.string(),\n // The kept signature image. Read only through the signature-read callable, never by URL.\n signatureFile: StorageObjectRefSchema,\n signedAt: epochMsSchema,\n // A ghost player's waiver is signed by a witness for the ghost's team: the witness's account,\n // the authority they signed under, and the ghost's name at signing — a named snapshot, so the\n // record still says whom it was for after the ghost's public identity is gone (RULE-STD-ARCH-103).\n teamId: teamIdSchema.optional(),\n witnessUserId: userIdSchema.optional(),\n witnessAuthority: waiverWitnessAuthoritySchema.optional(),\n subjectDisplayNameSnapshot: z.string().optional(),\n // A V1 witnessed waiver recorded the witness's name as it was at signing, and never the authority\n // or the ghost's name; the copy keeps that name as a named snapshot (RULE-STD-ARCH-103) and guesses neither.\n witnessDisplayNameSnapshot: z.string().optional(),\n })\n .refine(\n (waiver) => {\n const full = [\n waiver.teamId,\n waiver.witnessUserId,\n waiver.witnessAuthority,\n waiver.subjectDisplayNameSnapshot,\n ];\n const legacy = [waiver.teamId, waiver.witnessUserId, waiver.witnessDisplayNameSnapshot];\n const present = (fields: readonly unknown[]) =>\n fields.filter((field) => field !== undefined).length;\n if (present([...full, waiver.witnessDisplayNameSnapshot]) === 0) return true;\n if (present(full) === full.length) return waiver.witnessDisplayNameSnapshot === undefined;\n return (\n present(legacy) === legacy.length &&\n waiver.witnessAuthority === undefined &&\n waiver.subjectDisplayNameSnapshot === undefined\n );\n },\n {\n message:\n \"A ghost's waiver carries its team, witness, authority, and name together; or, copied from V1, its team, witness, and the witness's recorded name; or none of them.\",\n path: ['witnessUserId'],\n },\n );\nexport type SignedWaiver = z.infer<typeof SignedWaiverSchema>;\n\n// One loaned item, as the contract was created with it: its catalog id and name. A contract keeps\n// what it loaned even if the catalog later changes.\nexport const HardwareItemSchema = z.strictObject({\n id: z.string().min(1),\n name: z.string().min(1),\n});\nexport type HardwareItem = z.infer<typeof HardwareItemSchema>;\n\n// `hardwareLoanContracts/{contractId}` — equipment loaned to a referee: who holds it, what they hold,\n// and their signature on the loan agreement, a legal artifact. Names resolve from `publicUsers` at\n// read time (RULE-STD-ARCH-103). `pending` until the referee signs; `loaned` from the signing, which keeps the\n// signature for good; `returned` once an admin records the equipment back, the signature retained.\nexport const HardwareLoanContractSchema = z\n .strictObject({\n refereeUserId: userIdSchema,\n createdByUserId: userIdSchema,\n hardware: z.array(HardwareItemSchema).min(1),\n status: hardwareLoanContractStatusSchema,\n // The kept signature image. Read only through the signature-read callables, never by URL.\n signatureFile: StorageObjectRefSchema.optional(),\n createdAt: epochMsSchema,\n loanedAt: epochMsSchema.optional(),\n returnedAt: epochMsSchema.optional(),\n })\n .refine(\n (contract) =>\n contract.status === PENDING_HARDWARE_LOAN_CONTRACT_STATUS\n ? contract.signatureFile === undefined && contract.loanedAt === undefined\n : contract.signatureFile !== undefined && contract.loanedAt !== undefined,\n {\n message: 'A contract carries its signature and loan date exactly once it is signed.',\n path: ['signatureFile'],\n },\n )\n .refine(\n (contract) =>\n (contract.status === RETURNED_HARDWARE_LOAN_CONTRACT_STATUS) ===\n (contract.returnedAt !== undefined),\n {\n message: 'A contract carries its return date exactly while it is returned.',\n path: ['returnedAt'],\n },\n );\nexport type HardwareLoanContract = z.infer<typeof HardwareLoanContractSchema>;\n"]}
1
+ {"version":3,"file":"waivers-and-hardware.js","sourceRoot":"","sources":["../../src/doc-schemas/waivers-and-hardware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,aAAa,EACb,gCAAgC,EAChC,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,4BAA4B,GAC7B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,qCAAqC,EACrC,sCAAsC,GACvC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC;AAEjG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,gBAAgB,EAAE,sBAAsB;IACxC,qBAAqB,EAAE,iCAAiC,CAAC,QAAQ,EAAE;IACnE,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC/B,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,aAAa,EAAE,sBAA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ema,\n leagueIdSchema,\n teamIdSchema,\n userIdSchema,\n waiverWitnessAuthoritySchema,\n} from './atoms.js';\nimport {\n PENDING_HARDWARE_LOAN_CONTRACT_STATUS,\n RETURNED_HARDWARE_LOAN_CONTRACT_STATUS,\n} from '../types/unions.js';\nimport { StorageObjectRefSchema } from './pending-media.js';\nimport { waiverTemplateIdSchema, waiverTemplateVersionNumberSchema } from './waiver-template.js';\n\nexport const SignedWaiverSchema = z\n .object({\n leagueId: leagueIdSchema,\n userId: userIdSchema,\n waiverTemplateId: waiverTemplateIdSchema,\n waiverTemplateVersion: waiverTemplateVersionNumberSchema.optional(),\n waiverTitleSnapshot: z.string(),\n waiverTextSnapshot: z.string(),\n signatureFile: StorageObjectRefSchema,\n signedAt: epochMsSchema,\n teamId: teamIdSchema.optional(),\n witnessUserId: userIdSchema.optional(),\n witnessAuthority: waiverWitnessAuthoritySchema.optional(),\n subjectDisplayNameSnapshot: z.string().optional(),\n witnessDisplayNameSnapshot: z.string().optional(),\n })\n .refine(\n (waiver) => {\n const full = [\n waiver.teamId,\n waiver.witnessUserId,\n waiver.witnessAuthority,\n waiver.subjectDisplayNameSnapshot,\n ];\n const legacy = [waiver.teamId, waiver.witnessUserId, waiver.witnessDisplayNameSnapshot];\n const present = (fields: readonly unknown[]) =>\n fields.filter((field) => field !== undefined).length;\n if (present([...full, waiver.witnessDisplayNameSnapshot]) === 0) return true;\n if (present(full) === full.length) return waiver.witnessDisplayNameSnapshot === undefined;\n return (\n present(legacy) === legacy.length &&\n waiver.witnessAuthority === undefined &&\n waiver.subjectDisplayNameSnapshot === undefined\n );\n },\n {\n message:\n \"A ghost's waiver carries its team, witness, authority, and name together; or, copied from V1, its team, witness, and the witness's recorded name; or none of them.\",\n path: ['witnessUserId'],\n },\n );\nexport type SignedWaiver = z.infer<typeof SignedWaiverSchema>;\n\nexport const HardwareItemSchema = z.strictObject({\n id: z.string().min(1),\n name: z.string().min(1),\n});\nexport type HardwareItem = z.infer<typeof HardwareItemSchema>;\n\nexport const HardwareLoanContractSchema = z\n .strictObject({\n refereeUserId: userIdSchema,\n createdByUserId: userIdSchema,\n hardware: z.array(HardwareItemSchema).min(1),\n status: hardwareLoanContractStatusSchema,\n signatureFile: StorageObjectRefSchema.optional(),\n createdAt: epochMsSchema,\n loanedAt: epochMsSchema.optional(),\n returnedAt: epochMsSchema.optional(),\n })\n .refine(\n (contract) =>\n contract.status === PENDING_HARDWARE_LOAN_CONTRACT_STATUS\n ? contract.signatureFile === undefined && contract.loanedAt === undefined\n : contract.signatureFile !== undefined && contract.loanedAt !== undefined,\n {\n message: 'A contract carries its signature and loan date exactly once it is signed.',\n path: ['signatureFile'],\n },\n )\n .refine(\n (contract) =>\n (contract.status === RETURNED_HARDWARE_LOAN_CONTRACT_STATUS) ===\n (contract.returnedAt !== undefined),\n {\n message: 'A contract carries its return date exactly while it is returned.',\n path: ['returnedAt'],\n },\n );\nexport type HardwareLoanContract = z.infer<typeof HardwareLoanContractSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"domain-events.d.ts","sourceRoot":"","sources":["../../src/domain-events/domain-events.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,wBAAwB;;;;;kBAK1B,CAAC;AAEZ,eAAO,MAAM,wBAAwB;;;;;kBAK1B,CAAC;AAGZ,eAAO,MAAM,6BAA6B;;;;;kBAK/B,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;kBAK9B,CAAC;AAGZ,eAAO,MAAM,4BAA4B;;;;;;;kBAO9B,CAAC;AAGZ,eAAO,MAAM,8BAA8B;;;;;;kBAKhC,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;;;kBAY9B,CAAC;AAEZ,eAAO,MAAM,mCAAmC;;;;;;;kBAOrC,CAAC;AAGZ,eAAO,MAAM,mCAAmC;;;;;;;kBAOrC,CAAC;AAGZ,eAAO,MAAM,kCAAkC;;;;;;;kBAOpC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8B;;;;;kBAKhC,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;kBAK9B,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;kBAK9B,CAAC;AAEZ,eAAO,MAAM,qCAAqC;;;;;;kBAKvC,CAAC;AAEZ,eAAO,MAAM,4CAA4C;;;;;;;kBAO9C,CAAC;AAEZ,eAAO,MAAM,mCAAmC;;;;;;kBAKrC,CAAC;AAEZ,eAAO,MAAM,6BAA6B;;;kBAE/B,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;kBAahC,CAAC;AAEZ,eAAO,MAAM,6BAA6B;;;kBAE/B,CAAC;AAEZ,eAAO,MAAM,kCAAkC;;;kBAEpC,CAAC;AAEZ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAuD5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC"}
@@ -1,8 +1,3 @@
1
- // The DomainEvent union — the vocabulary of "what happened" that both sides of the boundary share.
2
- //
3
- // A callable or trigger names what it changed with one of these; the client alone maps an event to
4
- // the query-key families it makes stale (the invalidation registry is app-local, RULE-STD-FRONTEND-102). The two
5
- // sides share event names, never cache keys.
6
1
  import { z } from 'zod';
7
2
  import { epochMsSchema, gameIdSchema, hardwareLoanContractIdSchema, leagueIdSchema, sportKeySchema, statsValidationReportIdSchema, teamIdSchema, userIdSchema, } from '../doc-schemas/atoms.js';
8
3
  import { awardIdSchema } from '../doc-schemas/catalogs.js';
@@ -21,7 +16,6 @@ export const LeagueUpdatedEventSchema = z
21
16
  ids: z.object({ leagueId: leagueIdSchema }).strict(),
22
17
  })
23
18
  .strict();
24
- // The league changed mode, and with it the `teamType` of every one of its teams.
25
19
  export const LeagueModeSwitchedEventSchema = z
26
20
  .object({
27
21
  type: z.literal('league.modeSwitched'),
@@ -34,7 +28,6 @@ export const LeagueTeamCreatedEventSchema = z
34
28
  ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),
35
29
  })
36
30
  .strict();
37
- // A member was added, removed, or changed role on a team — by any path, ghosts included.
38
31
  export const TeamRosterChangedEventSchema = z
39
32
  .object({
40
33
  type: z.literal('teamRoster.changed'),
@@ -43,7 +36,6 @@ export const TeamRosterChangedEventSchema = z
43
36
  .strict(),
44
37
  })
45
38
  .strict();
46
- // A waiver was signed for a person in a league — by them, or for a ghost by a witness.
47
39
  export const SignedWaiverCreatedEventSchema = z
48
40
  .object({
49
41
  type: z.literal('signedWaiver.created'),
@@ -71,7 +63,6 @@ export const TeamJoinRequestSubmittedEventSchema = z
71
63
  .strict(),
72
64
  })
73
65
  .strict();
74
- // The requester withdrew their join request.
75
66
  export const TeamJoinRequestCancelledEventSchema = z
76
67
  .object({
77
68
  type: z.literal('teamJoinRequest.cancelled'),
@@ -80,7 +71,6 @@ export const TeamJoinRequestCancelledEventSchema = z
80
71
  .strict(),
81
72
  })
82
73
  .strict();
83
- // The team accepted or rejected a join request. An acceptance also changed the roster.
84
74
  export const TeamJoinRequestAnsweredEventSchema = z
85
75
  .object({
86
76
  type: z.literal('teamJoinRequest.answered'),
@@ -89,7 +79,6 @@ export const TeamJoinRequestAnsweredEventSchema = z
89
79
  .strict(),
90
80
  })
91
81
  .strict();
92
- // The team invited a person. `userId` is the invitee.
93
82
  export const TeamInvitationSentEventSchema = z
94
83
  .object({
95
84
  type: z.literal('teamInvitation.sent'),
@@ -98,7 +87,6 @@ export const TeamInvitationSentEventSchema = z
98
87
  .strict(),
99
88
  })
100
89
  .strict();
101
- // The team withdrew an invitation. `userId` is the invitee.
102
90
  export const TeamInvitationCancelledEventSchema = z
103
91
  .object({
104
92
  type: z.literal('teamInvitation.cancelled'),
@@ -107,7 +95,6 @@ export const TeamInvitationCancelledEventSchema = z
107
95
  .strict(),
108
96
  })
109
97
  .strict();
110
- // The invitee accepted or declined an invitation. An acceptance also changed the roster.
111
98
  export const TeamInvitationAnsweredEventSchema = z
112
99
  .object({
113
100
  type: z.literal('teamInvitation.answered'),
@@ -116,14 +103,12 @@ export const TeamInvitationAnsweredEventSchema = z
116
103
  .strict(),
117
104
  })
118
105
  .strict();
119
- // A player signed up as a free agent in a league.
120
106
  export const LeagueFreeAgentSignedUpEventSchema = z
121
107
  .object({
122
108
  type: z.literal('leagueFreeAgent.signedUp'),
123
109
  ids: z.object({ leagueId: leagueIdSchema, userId: userIdSchema }).strict(),
124
110
  })
125
111
  .strict();
126
- // A player's free-agent signup ended: they withdrew it, or an admin placed them on a team.
127
112
  export const LeagueFreeAgentRemovedEventSchema = z
128
113
  .object({
129
114
  type: z.literal('leagueFreeAgent.removed'),
@@ -142,60 +127,48 @@ export const SportGameReopenedEventSchema = z
142
127
  ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),
143
128
  })
144
129
  .strict();
145
- // A scoring write stored stat events on a live game: its rollup and score moved.
146
130
  export const SportGameStatEventsRecordedEventSchema = z
147
131
  .object({
148
132
  type: z.literal('sportGame.statEventsRecorded'),
149
133
  ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),
150
134
  })
151
135
  .strict();
152
- // A roster entry of a live game was marked absent or present.
153
136
  export const SportGameAbsenceChangedEventSchema = z
154
137
  .object({
155
138
  type: z.literal('sportGame.absenceChanged'),
156
139
  ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),
157
140
  })
158
141
  .strict();
159
- // A scorer's note on one person in a live game changed.
160
142
  export const SportGameMemoUpdatedEventSchema = z
161
143
  .object({
162
144
  type: z.literal('sportGame.memoUpdated'),
163
145
  ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),
164
146
  })
165
147
  .strict();
166
- // The jump-ball possession arrow of a live basketball game moved.
167
148
  export const SportGameJumpBallChangedEventSchema = z
168
149
  .object({
169
150
  type: z.literal('sportGame.jumpBallChanged'),
170
151
  ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),
171
152
  })
172
153
  .strict();
173
- // A league's schedule changed as a whole: a week was created, its shared fields edited, or it was
174
- // deleted, or a game was added to a week. Any of the league's games may have been added, changed, or
175
- // removed.
176
154
  export const LeagueScheduleChangedEventSchema = z
177
155
  .object({
178
156
  type: z.literal('leagueSchedule.changed'),
179
157
  ids: z.object({ leagueId: leagueIdSchema }).strict(),
180
158
  })
181
159
  .strict();
182
- // One game's schedule changed — its week, start time, or venue — or its teams were replaced, which
183
- // replaces their roster entries and stat lines too.
184
160
  export const SportGameUpdatedEventSchema = z
185
161
  .object({
186
162
  type: z.literal('sportGame.updated'),
187
163
  ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),
188
164
  })
189
165
  .strict();
190
- // One game was deleted with its events and roster.
191
166
  export const SportGameDeletedEventSchema = z
192
167
  .object({
193
168
  type: z.literal('sportGame.deleted'),
194
169
  ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),
195
170
  })
196
171
  .strict();
197
- // A rebuild ran. Every scope id is optional: a rebuild covers one league, every league, one user,
198
- // every user, or one sport's hall of fame (for one user or the whole sport).
199
172
  export const StatsRecalculatedEventSchema = z
200
173
  .object({
201
174
  type: z.literal('stats.recalculated'),
@@ -208,50 +181,42 @@ export const StatsRecalculatedEventSchema = z
208
181
  .strict(),
209
182
  })
210
183
  .strict();
211
- // A game's numbers were corrected or restored from its events in Fix stats; for a completed game,
212
- // every destination it feeds moved with them.
213
184
  export const SportGameStatsCorrectedEventSchema = z
214
185
  .object({
215
186
  type: z.literal('sportGame.statsCorrected'),
216
187
  ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),
217
188
  })
218
189
  .strict();
219
- // A stats check wrote or advanced its report.
220
190
  export const StatsValidationReportedEventSchema = z
221
191
  .object({
222
192
  type: z.literal('statsValidation.reported'),
223
193
  ids: z.object({ reportId: z.string().min(1) }).strict(),
224
194
  })
225
195
  .strict();
226
- // An admin deleted a stats check's report.
227
196
  export const StatsValidationReportDeletedEventSchema = z
228
197
  .object({
229
198
  type: z.literal('statsValidation.reportDeleted'),
230
199
  ids: z.object({ reportId: statsValidationReportIdSchema }).strict(),
231
200
  })
232
201
  .strict();
233
- // A person's pre-Q-Sports baseline was written, and their career line and hall-of-fame entry rebuilt.
234
202
  export const HistoricalStatsUpdatedEventSchema = z
235
203
  .object({
236
204
  type: z.literal('historicalStats.updated'),
237
205
  ids: z.object({ userId: userIdSchema }).strict(),
238
206
  })
239
207
  .strict();
240
- // An admin banned an account or lifted its ban.
241
208
  export const UserStatusChangedEventSchema = z
242
209
  .object({
243
210
  type: z.literal('user.statusChanged'),
244
211
  ids: z.object({ userId: userIdSchema }).strict(),
245
212
  })
246
213
  .strict();
247
- // An award joined the catalog — its first badge was published.
248
214
  export const AwardDefinitionCreatedEventSchema = z
249
215
  .object({
250
216
  type: z.literal('awardDefinition.created'),
251
217
  ids: z.object({ awardId: awardIdSchema }).strict(),
252
218
  })
253
219
  .strict();
254
- // An award's document changed: its badge was replaced, or its holder count moved.
255
220
  export const AwardDefinitionUpdatedEventSchema = z
256
221
  .object({
257
222
  type: z.literal('awardDefinition.updated'),
@@ -264,23 +229,18 @@ export const AwardDefinitionDeletedEventSchema = z
264
229
  ids: z.object({ awardId: awardIdSchema }).strict(),
265
230
  })
266
231
  .strict();
267
- // An award was granted to or revoked from some accounts, which may have cleared a featured badge.
268
- // The accounts are many, so the event names the award; a client holding any profile's awards
269
- // refreshes them.
270
232
  export const AwardGrantsChangedEventSchema = z
271
233
  .object({
272
234
  type: z.literal('awardGrants.changed'),
273
235
  ids: z.object({ awardId: awardIdSchema }).strict(),
274
236
  })
275
237
  .strict();
276
- // An account chose which of its awards to feature beside its name.
277
238
  export const FeaturedAwardsChangedEventSchema = z
278
239
  .object({
279
240
  type: z.literal('featuredAwards.changed'),
280
241
  ids: z.object({ userId: userIdSchema }).strict(),
281
242
  })
282
243
  .strict();
283
- // A hardware loan contract was created, signed, returned, or deleted.
284
244
  export const HardwareLoanContractChangedEventSchema = z
285
245
  .object({
286
246
  type: z.literal('hardwareLoanContract.changed'),
@@ -289,7 +249,6 @@ export const HardwareLoanContractChangedEventSchema = z
289
249
  .strict(),
290
250
  })
291
251
  .strict();
292
- // A new account finished registration: its profile and public identity now exist.
293
252
  export const UserRegisteredEventSchema = z
294
253
  .object({ type: z.literal('user.registered'), ids: z.object({ userId: userIdSchema }).strict() })
295
254
  .strict();
@@ -299,9 +258,6 @@ export const DisplayNameChangedEventSchema = z
299
258
  ids: z.object({ userId: userIdSchema }).strict(),
300
259
  })
301
260
  .strict();
302
- // The shared stats beacon moved: stats changed somewhere. The beacon holds only its latest change,
303
- // not a log of them, so the event names no scope and a watching client refreshes every
304
- // stats-bearing read.
305
261
  export const StatsBeaconChangedEventSchema = z
306
262
  .object({ type: z.literal('statsBeacon.changed'), ids: z.object({}).strict() })
307
263
  .strict();
@@ -311,14 +267,12 @@ export const WaiverTemplateCreatedEventSchema = z
311
267
  ids: z.object({ waiverTemplateId: waiverTemplateIdSchema }).strict(),
312
268
  })
313
269
  .strict();
314
- // A template's wording changed: a new version was published.
315
270
  export const WaiverTemplateUpdatedEventSchema = z
316
271
  .object({
317
272
  type: z.literal('waiverTemplate.updated'),
318
273
  ids: z.object({ waiverTemplateId: waiverTemplateIdSchema }).strict(),
319
274
  })
320
275
  .strict();
321
- // A template left the admin's list — deleted, or retired because something still names it.
322
276
  export const WaiverTemplateDeletedEventSchema = z
323
277
  .object({
324
278
  type: z.literal('waiverTemplate.deleted'),
@@ -331,8 +285,6 @@ export const GameLocationCreatedEventSchema = z
331
285
  ids: z.object({ gameLocationId: gameLocationIdSchema }).strict(),
332
286
  })
333
287
  .strict();
334
- // A venue's document changed — its own fields through the location callables, or its picture
335
- // through the upload pipeline.
336
288
  export const GameLocationUpdatedEventSchema = z
337
289
  .object({
338
290
  type: z.literal('gameLocation.updated'),
@@ -345,33 +297,24 @@ export const GameLocationDeletedEventSchema = z
345
297
  ids: z.object({ gameLocationId: gameLocationIdSchema }).strict(),
346
298
  })
347
299
  .strict();
348
- // A team's document changed: an admin renamed it or changed its type, or the picture core changed its
349
- // gallery summary.
350
300
  export const LeagueTeamUpdatedEventSchema = z
351
301
  .object({
352
302
  type: z.literal('leagueTeam.updated'),
353
303
  ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),
354
304
  })
355
305
  .strict();
356
- // An admin deleted a team that never played, with its memberships, ghosts, invitations, join
357
- // requests, contact phone, gallery, and unplayed games.
358
306
  export const LeagueTeamDeletedEventSchema = z
359
307
  .object({
360
308
  type: z.literal('leagueTeam.deleted'),
361
309
  ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),
362
310
  })
363
311
  .strict();
364
- // An admin's deletion of a team stopped short: some of the team's games, ghost players, invitations,
365
- // join requests, or memberships are gone, and the team, with its contact phone, still stands.
366
312
  export const LeagueTeamDeletionAdvancedEventSchema = z
367
313
  .object({
368
314
  type: z.literal('leagueTeam.deletionAdvanced'),
369
315
  ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),
370
316
  })
371
317
  .strict();
372
- // A ghost player's removal took the ghost's entries off finished games of its team — each one it sat
373
- // out without a stat, so no result or total changed, but the games' finalized records no longer name
374
- // it. The event names no game.
375
318
  export const GhostPlayerFinishedEntriesRemovedEventSchema = z
376
319
  .object({
377
320
  type: z.literal('ghostPlayer.finishedEntriesRemoved'),
@@ -380,21 +323,15 @@ export const GhostPlayerFinishedEntriesRemovedEventSchema = z
380
323
  .strict(),
381
324
  })
382
325
  .strict();
383
- // An admin set a team's contact phone, which only admins read.
384
326
  export const LeagueTeamContactUpdatedEventSchema = z
385
327
  .object({
386
328
  type: z.literal('leagueTeamContact.updated'),
387
329
  ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),
388
330
  })
389
331
  .strict();
390
- // The landing page's document changed — its copy, or its gallery summary. There is one landing page,
391
- // so the event names none.
392
332
  export const LandingPageUpdatedEventSchema = z
393
333
  .object({ type: z.literal('landingPage.updated'), ids: z.object({}).strict() })
394
334
  .strict();
395
- // A picture joined a gallery. It carries the whole new entry, so a client holding that gallery's
396
- // pages patches the entry in where its position sorts, and no gallery page is ever refetched for it
397
- // (RULE-STD-FRONTEND-103). The owner's summary changed too, and the owner's own update event says so.
398
335
  export const GalleryPictureAddedEventSchema = z
399
336
  .object({
400
337
  type: z.literal('galleryPicture.added'),
@@ -409,13 +346,9 @@ export const GalleryPictureAddedEventSchema = z
409
346
  createdAt: epochMsSchema,
410
347
  })
411
348
  .strict();
412
- // A dead-lettered row was replayed back onto its pipeline's queue, so the operator's dead-letter list
413
- // loses it. The list spans every lane, so the event names none.
414
349
  export const DeadLetterReplayedEventSchema = z
415
350
  .object({ type: z.literal('deadLetter.replayed'), ids: z.object({}).strict() })
416
351
  .strict();
417
- // The migration console's state moved: an action ran a page, a step was recorded, or the cutover
418
- // was. There is one console, so the event names none.
419
352
  export const MigrationConsoleChangedEventSchema = z
420
353
  .object({ type: z.literal('migrationConsole.changed'), ids: z.object({}).strict() })
421
354
  .strict();