@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,19 +1,11 @@
1
- // Callable contracts for the stats pipeline: finalize, reopen, the Fix stats actions — the rebuilds,
2
- // the game repairs, the historical baseline, the stats check, and deleting a check's report — and the
3
- // migration's placement of
4
- // an unplaceable stat line.
5
1
  import { z } from 'zod';
6
- import { MAX_GAME_STATS_CORRECTION_TARGETS } from '../constants/sports.js';
2
+ import { CURLING_ROUND_COUNT, MAX_CURLING_ROUND_POINTS, MAX_GAME_STATS_CORRECTION_TARGETS, } from '../constants/sports.js';
7
3
  import { countSchema, gameIdSchema, gameRosterPlayerIdSchema, leagueIdSchema, repairReasonSchema, sportKeySchema, statCounterKeySchema, statsOperationIdSchema, statsValidationReportIdSchema, teamIdSchema, userIdSchema, } from '../doc-schemas/atoms.js';
8
4
  import { StatsDestinationChangeSchema, StatsOperationCountsSchema, } from '../doc-schemas/stats-operation.js';
9
5
  import { StatsValidationReportSchema, StatsValidationScopeSchema, StatsValidationSummarySchema, } from '../doc-schemas/system.js';
10
6
  import { HistoricalStatsSchema } from '../doc-schemas/user-profile.js';
11
7
  import { GAME_FINALIZE_OUTCOME_KEYS, GAME_REOPEN_OUTCOME_KEYS, GAME_STATS_REPAIR_OUTCOME_KEYS, UNROSTERED_STAT_LINE_RESOLUTION_OUTCOME_KEYS, } from '../types/stats.js';
12
- // `finalizeGame` (a captain or co-captain of either team, a referee, or an admin): make a game's
13
- // numbers permanent. Everything it writes is derived server-side from the
14
- // game's events; nothing in the input is a number (RULE-QS-SPORT-922).
15
8
  export const FinalizeGameInputSchema = z.object({ gameId: gameIdSchema }).strict();
16
- // `alreadyFinalized` when the game was completed before the call: nothing was written (RULE-QS-SPORT-923).
17
9
  export const FinalizeGameResultSchema = z
18
10
  .object({
19
11
  gameId: gameIdSchema,
@@ -22,12 +14,9 @@ export const FinalizeGameResultSchema = z
22
14
  nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema),
23
15
  })
24
16
  .strict();
25
- // `reopenGame` (an admin): take a finalized game's numbers back out so it can be scored again. It
26
- // changes a completed record, so the admin says why (RULE-QS-SPORT-926, RULE-STD-BACKEND-212).
27
17
  export const ReopenGameInputSchema = z
28
18
  .object({ gameId: gameIdSchema, reason: repairReasonSchema })
29
19
  .strict();
30
- // `alreadyOpen` when the game was not completed: nothing was written.
31
20
  export const ReopenGameResultSchema = z
32
21
  .object({
33
22
  gameId: gameIdSchema,
@@ -35,10 +24,6 @@ export const ReopenGameResultSchema = z
35
24
  outcome: z.enum(GAME_REOPEN_OUTCOME_KEYS),
36
25
  })
37
26
  .strict();
38
- // `resolve.unrosteredStatLine` (an admin, at the cutover console, before the cutover): a recorded V1
39
- // stat line that no roster entry and no play of the game can place is placed on the team the admin
40
- // names, as the game's missing roster entry; the game's copy is then run again. The admin says why.
41
- // `dryRun` previews the placement — whether the game would then convert — and writes nothing.
42
27
  export const AdminResolveUnrosteredStatLineInputSchema = z
43
28
  .object({
44
29
  gameId: gameIdSchema,
@@ -48,7 +33,6 @@ export const AdminResolveUnrosteredStatLineInputSchema = z
48
33
  dryRun: z.boolean().optional(),
49
34
  })
50
35
  .strict();
51
- // `gameConverts` says whether the game's stats now convert, so the operator knows the copy can run.
52
36
  export const AdminResolveUnrosteredStatLineResultSchema = z
53
37
  .object({
54
38
  gameId: gameIdSchema,
@@ -58,11 +42,6 @@ export const AdminResolveUnrosteredStatLineResultSchema = z
58
42
  gameConverts: z.boolean(),
59
43
  })
60
44
  .strict();
61
- // Every rebuild and every game repair is a repair of a completed record: it takes a reason, runs
62
- // under an operation id the admin's browser mints when the admin starts it, and offers a dry run that
63
- // lists each document it would change, with before and after, and writes nothing (RULE-STD-BACKEND-212,
64
- // RULE-QS-SPORT-926). A real run resumes from its operation document, so a cursor is taken from the client
65
- // only to page a dry run, which keeps no operation.
66
45
  const statsRepairFields = {
67
46
  reason: repairReasonSchema,
68
47
  operationId: statsOperationIdSchema,
@@ -74,39 +53,26 @@ const CURSOR_ONLY_ON_DRY_RUN = {
74
53
  message: 'A real run resumes from its operation; only a dry run takes a cursor.',
75
54
  path: ['resumeAfter'],
76
55
  };
77
- // `recalculateLeagueStats`: every team of one league — its standings line and its per-membership rows.
78
56
  export const RecalculateLeagueStatsInputSchema = z
79
57
  .object({ leagueId: leagueIdSchema, ...statsRepairFields })
80
58
  .strict()
81
59
  .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);
82
- // `recalculateAllLeagueStats`: every league, closed ones included, a page of leagues per call.
83
60
  export const RecalculateAllLeagueStatsInputSchema = z
84
61
  .object({ ...statsRepairFields })
85
62
  .strict()
86
63
  .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);
87
- // `recalculateUserStats`: one person's career line in every sport.
88
64
  export const RecalculateUserStatsInputSchema = z
89
65
  .object({ userId: userIdSchema, ...statsRepairFields })
90
66
  .strict()
91
67
  .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);
92
- // `recalculateAllUserStats`: every profile's career lines, a page of profiles per call.
93
68
  export const RecalculateAllUserStatsInputSchema = z
94
69
  .object({ ...statsRepairFields })
95
70
  .strict()
96
71
  .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);
97
- // `recalculateHallOfFame`: one sport's hall of fame — one person's entry, or the whole sport a page
98
- // of profiles per call. Refused for a sport that keeps none.
99
72
  export const RecalculateHallOfFameInputSchema = z
100
73
  .object({ sportKey: sportKeySchema, userId: userIdSchema.optional(), ...statsRepairFields })
101
74
  .strict()
102
75
  .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);
103
- // What one call of a rebuild did. `complete` is false while a paged rebuild has pages left: the
104
- // admin calls again with the same operation id — or, for a dry run, with `resumeAfter` set to
105
- // `nextResumeAfter`. `changes` is every document this call changed or, on a dry run, would change,
106
- // up to MAX_STATS_REPAIR_LISTED_CHANGES (`changesTruncated` says more were left out). A game whose
107
- // stored numbers disagree with its record is named in `stoppedOnGameIds`, and what it feeds is left
108
- // untouched. `scopeChanged` says a game was finalized or reopened in the scope while it ran, so the
109
- // admin runs it again.
110
76
  export const StatsRebuildResultSchema = z
111
77
  .object({
112
78
  operationId: statsOperationIdSchema,
@@ -120,9 +86,6 @@ export const StatsRebuildResultSchema = z
120
86
  scopeChanged: z.boolean(),
121
87
  })
122
88
  .strict();
123
- // A line a correction sets, by its absolute value: the team line of `teamId`, or the player line
124
- // `{teamId}_{playerUserId}` when a player is named. Only a field the sport's adapter lists in
125
- // `correctableFields` may be set.
126
89
  export const GameStatsCorrectionTargetSchema = z
127
90
  .object({
128
91
  teamId: teamIdSchema,
@@ -131,9 +94,6 @@ export const GameStatsCorrectionTargetSchema = z
131
94
  value: countSchema,
132
95
  })
133
96
  .strict();
134
- // `adminCorrectGameStats`: set named fields of a game's lines to the values given, or keep the
135
- // numbers the game stores now — a hand edit made outside the app — as corrections. Exactly one of the
136
- // two.
137
97
  export const AdminCorrectGameStatsInputSchema = z
138
98
  .object({
139
99
  gameId: gameIdSchema,
@@ -152,7 +112,6 @@ export const AdminCorrectGameStatsInputSchema = z
152
112
  message: 'Give the values to set, or keep the stored numbers — one of the two.',
153
113
  path: ['targets'],
154
114
  });
155
- // `recalculateGameStats`: restore a game's numbers from its events, discarding a hand edit.
156
115
  export const RecalculateGameStatsInputSchema = z
157
116
  .object({
158
117
  gameId: gameIdSchema,
@@ -161,20 +120,15 @@ export const RecalculateGameStatsInputSchema = z
161
120
  dryRun: z.boolean(),
162
121
  })
163
122
  .strict();
164
- // One correction a repair appended, or on a dry run would append.
165
123
  export const GameStatsCorrectionSchema = z
166
124
  .object({ lineKey: z.string().min(1), field: statCounterKeySchema, value: z.number().int() })
167
125
  .strict();
168
- // A list of roster entries a repair replaced, as the game stored it and as the repair rebuilds it.
126
+ const roundSlotValueSchema = z.number().int().min(0).max(MAX_CURLING_ROUND_POINTS).nullable();
127
+ // Two team lines of a game, each holding its sport's fixed round slots.
128
+ const MAX_ROUND_SLOT_CHANGES = 2 * CURLING_ROUND_COUNT;
169
129
  const replacedEntryListSchema = z
170
130
  .object({ stored: z.array(gameRosterPlayerIdSchema), rebuilt: z.array(gameRosterPlayerIdSchema) })
171
131
  .strict();
172
- // Every value of the game document a repair changed, each with the value the game stored and the
173
- // value the repair writes — never the whole document (RULE-STD-BACKEND-212). `lines` holds each changed field
174
- // of a team or player line (`lineKey` the team id or the roster entry id), `scores` each team whose
175
- // score mirror changed, and the lists, the event counter and `recordRewritten` appear only when the
176
- // repair changes them; `recordRewritten` names the finalized record's page counts before and after,
177
- // without copying the record.
178
132
  export const GameRepairChangesSchema = z
179
133
  .object({
180
134
  lines: z.array(z
@@ -186,6 +140,23 @@ export const GameRepairChangesSchema = z
186
140
  })
187
141
  .strict()),
188
142
  scores: z.array(z.object({ teamId: teamIdSchema, stored: z.number(), rebuilt: z.number() }).strict()),
143
+ // Present when a round slot changed: each changed slot of a line, a null slot unplayed.
144
+ roundSlots: z
145
+ .array(z
146
+ .object({
147
+ lineKey: z.string().min(1),
148
+ slotIndex: z
149
+ .number()
150
+ .int()
151
+ .min(0)
152
+ .max(CURLING_ROUND_COUNT - 1),
153
+ stored: roundSlotValueSchema,
154
+ rebuilt: roundSlotValueSchema,
155
+ })
156
+ .strict())
157
+ .min(1)
158
+ .max(MAX_ROUND_SLOT_CHANGES)
159
+ .optional(),
189
160
  absentRosterPlayerIds: replacedEntryListSchema.optional(),
190
161
  nonScoringRosterPlayerIds: replacedEntryListSchema.optional(),
191
162
  statEventSequence: z.object({ stored: countSchema, rebuilt: countSchema }).strict().optional(),
@@ -195,10 +166,6 @@ export const GameRepairChangesSchema = z
195
166
  .optional(),
196
167
  })
197
168
  .strict();
198
- // What a game repair did: `reconciled` it changed the game; `unchanged` there was nothing to change;
199
- // `alreadyApplied` the operation had already committed and this call is its acknowledged retry.
200
- // `gameChanges` is what it changed on the game document, or on a dry run would change; empty lists
201
- // for any other outcome.
202
169
  export const GameStatsRepairResultSchema = z
203
170
  .object({
204
171
  gameId: gameIdSchema,
@@ -212,8 +179,6 @@ export const GameStatsRepairResultSchema = z
212
179
  destinationChanges: z.array(StatsDestinationChangeSchema),
213
180
  })
214
181
  .strict();
215
- // `adminUpdateHistoricalStats`: a person's pre-Q-Sports career totals for a sport that takes them,
216
- // written whole, and their career line and hall-of-fame entry rebuilt with them.
217
182
  export const AdminUpdateHistoricalStatsInputSchema = z
218
183
  .object({
219
184
  userId: userIdSchema,
@@ -236,9 +201,6 @@ export const AdminUpdateHistoricalStatsResultSchema = z
236
201
  changes: z.array(StatsDestinationChangeSchema),
237
202
  })
238
203
  .strict();
239
- // `runStatsValidation`: check one game, one league, or — with neither — everything. A check that
240
- // reaches its time budget saves its place on its operation and answers `complete: false`; calling
241
- // again with the same operation id resumes it. It writes no stat, so it takes no reason.
242
204
  export const RunStatsValidationInputSchema = z
243
205
  .object({ operationId: statsOperationIdSchema, scope: StatsValidationScopeSchema })
244
206
  .strict();
@@ -250,8 +212,6 @@ export const RunStatsValidationResultSchema = z
250
212
  discrepancyCounts: StatsValidationReportSchema.shape.discrepancyCounts,
251
213
  })
252
214
  .strict();
253
- // `adminDeleteStatsValidationReport`: delete one stats check's report. It writes no stat, so it takes
254
- // no reason; a report that is not there is refused as not found.
255
215
  export const AdminDeleteStatsValidationReportInputSchema = z
256
216
  .object({ reportId: statsValidationReportIdSchema })
257
217
  .strict();
@@ -1 +1 @@
1
- {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../src/schemas/stats.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,sGAAsG;AACtG,2BAA2B;AAC3B,4BAA4B;AAE5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EACL,WAAW,EACX,YAAY,EACZ,wBAAwB,EACxB,cAAc,E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ACjE,MAAM,CAAC,MAAM,2CAA2C,GAAG,CAAC;KACzD,MAAM,CAAC,EAAE,QAAQ,EAAE,6BAA6B,EAAE,CAAC;KACnD,MAAM,EAAE,CAAC;AAKZ,MAAM,CAAC,MAAM,4CAA4C,GAAG,CAAC;KAC1D,MAAM,CAAC,EAAE,QAAQ,EAAE,6BAA6B,EAAE,CAAC;KACnD,MAAM,EAAE,CAAC","sourcesContent":["// Callable contracts for the stats pipeline: finalize, reopen, the Fix stats actions — the rebuilds,\n// the game repairs, the historical baseline, the stats check, and deleting a check's report — and the\n// migration's placement of\n// an unplaceable stat line.\n\nimport { z } from 'zod';\nimport { MAX_GAME_STATS_CORRECTION_TARGETS } from '../constants/sports.js';\nimport {\n countSchema,\n gameIdSchema,\n gameRosterPlayerIdSchema,\n leagueIdSchema,\n repairReasonSchema,\n sportKeySchema,\n statCounterKeySchema,\n statsOperationIdSchema,\n statsValidationReportIdSchema,\n teamIdSchema,\n userIdSchema,\n} from '../doc-schemas/atoms.js';\nimport {\n StatsDestinationChangeSchema,\n StatsOperationCountsSchema,\n} from '../doc-schemas/stats-operation.js';\nimport {\n StatsValidationReportSchema,\n StatsValidationScopeSchema,\n StatsValidationSummarySchema,\n} from '../doc-schemas/system.js';\nimport { HistoricalStatsSchema } from '../doc-schemas/user-profile.js';\nimport {\n GAME_FINALIZE_OUTCOME_KEYS,\n GAME_REOPEN_OUTCOME_KEYS,\n GAME_STATS_REPAIR_OUTCOME_KEYS,\n UNROSTERED_STAT_LINE_RESOLUTION_OUTCOME_KEYS,\n} from '../types/stats.js';\n\n// `finalizeGame` (a captain or co-captain of either team, a referee, or an admin): make a game's\n// numbers permanent. Everything it writes is derived server-side from the\n// game's events; nothing in the input is a number (RULE-QS-SPORT-922).\nexport const FinalizeGameInputSchema = z.object({ gameId: gameIdSchema }).strict();\nexport type FinalizeGameInput = z.infer<typeof FinalizeGameInputSchema>;\n\n// `alreadyFinalized` when the game was completed before the call: nothing was written (RULE-QS-SPORT-923).\nexport const FinalizeGameResultSchema = z\n .object({\n gameId: gameIdSchema,\n leagueId: leagueIdSchema,\n outcome: z.enum(GAME_FINALIZE_OUTCOME_KEYS),\n nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema),\n })\n .strict();\nexport type FinalizeGameResult = z.infer<typeof FinalizeGameResultSchema>;\n\n// `reopenGame` (an admin): take a finalized game's numbers back out so it can be scored again. It\n// changes a completed record, so the admin says why (RULE-QS-SPORT-926, RULE-STD-BACKEND-212).\nexport const ReopenGameInputSchema = z\n .object({ gameId: gameIdSchema, reason: repairReasonSchema })\n .strict();\nexport type ReopenGameInput = z.infer<typeof ReopenGameInputSchema>;\n\n// `alreadyOpen` when the game was not completed: nothing was written.\nexport const ReopenGameResultSchema = z\n .object({\n gameId: gameIdSchema,\n leagueId: leagueIdSchema,\n outcome: z.enum(GAME_REOPEN_OUTCOME_KEYS),\n })\n .strict();\nexport type ReopenGameResult = z.infer<typeof ReopenGameResultSchema>;\n\n// `resolve.unrosteredStatLine` (an admin, at the cutover console, before the cutover): a recorded V1\n// stat line that no roster entry and no play of the game can place is placed on the team the admin\n// names, as the game's missing roster entry; the game's copy is then run again. The admin says why.\n// `dryRun` previews the placement — whether the game would then convert — and writes nothing.\nexport const AdminResolveUnrosteredStatLineInputSchema = z\n .object({\n gameId: gameIdSchema,\n userId: userIdSchema,\n teamId: teamIdSchema,\n reason: repairReasonSchema,\n dryRun: z.boolean().optional(),\n })\n .strict();\nexport type AdminResolveUnrosteredStatLineInput = z.infer<\n typeof AdminResolveUnrosteredStatLineInputSchema\n>;\n\n// `gameConverts` says whether the game's stats now convert, so the operator knows the copy can run.\nexport const AdminResolveUnrosteredStatLineResultSchema = z\n .object({\n gameId: gameIdSchema,\n userId: userIdSchema,\n teamId: teamIdSchema,\n outcome: z.enum(UNROSTERED_STAT_LINE_RESOLUTION_OUTCOME_KEYS),\n gameConverts: z.boolean(),\n })\n .strict();\nexport type AdminResolveUnrosteredStatLineResult = z.infer<\n typeof AdminResolveUnrosteredStatLineResultSchema\n>;\n\n// Every rebuild and every game repair is a repair of a completed record: it takes a reason, runs\n// under an operation id the admin's browser mints when the admin starts it, and offers a dry run that\n// lists each document it would change, with before and after, and writes nothing (RULE-STD-BACKEND-212,\n// RULE-QS-SPORT-926). A real run resumes from its operation document, so a cursor is taken from the client\n// only to page a dry run, which keeps no operation.\nconst statsRepairFields = {\n reason: repairReasonSchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n resumeAfter: z.string().min(1).optional(),\n};\n\nconst cursorOnlyOnDryRun = (input: { dryRun: boolean; resumeAfter?: string }): boolean =>\n input.dryRun || input.resumeAfter === undefined;\nconst CURSOR_ONLY_ON_DRY_RUN = {\n message: 'A real run resumes from its operation; only a dry run takes a cursor.',\n path: ['resumeAfter'],\n};\n\n// `recalculateLeagueStats`: every team of one league — its standings line and its per-membership rows.\nexport const RecalculateLeagueStatsInputSchema = z\n .object({ leagueId: leagueIdSchema, ...statsRepairFields })\n .strict()\n .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);\nexport type RecalculateLeagueStatsInput = z.infer<typeof RecalculateLeagueStatsInputSchema>;\n\n// `recalculateAllLeagueStats`: every league, closed ones included, a page of leagues per call.\nexport const RecalculateAllLeagueStatsInputSchema = z\n .object({ ...statsRepairFields })\n .strict()\n .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);\nexport type RecalculateAllLeagueStatsInput = z.infer<typeof RecalculateAllLeagueStatsInputSchema>;\n\n// `recalculateUserStats`: one person's career line in every sport.\nexport const RecalculateUserStatsInputSchema = z\n .object({ userId: userIdSchema, ...statsRepairFields })\n .strict()\n .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);\nexport type RecalculateUserStatsInput = z.infer<typeof RecalculateUserStatsInputSchema>;\n\n// `recalculateAllUserStats`: every profile's career lines, a page of profiles per call.\nexport const RecalculateAllUserStatsInputSchema = z\n .object({ ...statsRepairFields })\n .strict()\n .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);\nexport type RecalculateAllUserStatsInput = z.infer<typeof RecalculateAllUserStatsInputSchema>;\n\n// `recalculateHallOfFame`: one sport's hall of fame — one person's entry, or the whole sport a page\n// of profiles per call. Refused for a sport that keeps none.\nexport const RecalculateHallOfFameInputSchema = z\n .object({ sportKey: sportKeySchema, userId: userIdSchema.optional(), ...statsRepairFields })\n .strict()\n .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);\nexport type RecalculateHallOfFameInput = z.infer<typeof RecalculateHallOfFameInputSchema>;\n\n// What one call of a rebuild did. `complete` is false while a paged rebuild has pages left: the\n// admin calls again with the same operation id — or, for a dry run, with `resumeAfter` set to\n// `nextResumeAfter`. `changes` is every document this call changed or, on a dry run, would change,\n// up to MAX_STATS_REPAIR_LISTED_CHANGES (`changesTruncated` says more were left out). A game whose\n// stored numbers disagree with its record is named in `stoppedOnGameIds`, and what it feeds is left\n// untouched. `scopeChanged` says a game was finalized or reopened in the scope while it ran, so the\n// admin runs it again.\nexport const StatsRebuildResultSchema = z\n .object({\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n complete: z.boolean(),\n nextResumeAfter: z.string().min(1).nullable(),\n counts: StatsOperationCountsSchema,\n stoppedOnGameIds: z.array(gameIdSchema),\n changes: z.array(StatsDestinationChangeSchema),\n changesTruncated: z.boolean(),\n scopeChanged: z.boolean(),\n })\n .strict();\nexport type StatsRebuildResult = z.infer<typeof StatsRebuildResultSchema>;\n\n// A line a correction sets, by its absolute value: the team line of `teamId`, or the player line\n// `{teamId}_{playerUserId}` when a player is named. Only a field the sport's adapter lists in\n// `correctableFields` may be set.\nexport const GameStatsCorrectionTargetSchema = z\n .object({\n teamId: teamIdSchema,\n playerUserId: userIdSchema.optional(),\n stat: statCounterKeySchema,\n value: countSchema,\n })\n .strict();\nexport type GameStatsCorrectionTarget = z.infer<typeof GameStatsCorrectionTargetSchema>;\n\n// `adminCorrectGameStats`: set named fields of a game's lines to the values given, or keep the\n// numbers the game stores now — a hand edit made outside the app — as corrections. Exactly one of the\n// two.\nexport const AdminCorrectGameStatsInputSchema = z\n .object({\n gameId: gameIdSchema,\n targets: z\n .array(GameStatsCorrectionTargetSchema)\n .min(1)\n .max(MAX_GAME_STATS_CORRECTION_TARGETS)\n .optional(),\n keepStored: z.literal(true).optional(),\n reason: repairReasonSchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n })\n .strict()\n .refine((input) => (input.targets === undefined) !== (input.keepStored === undefined), {\n message: 'Give the values to set, or keep the stored numbers — one of the two.',\n path: ['targets'],\n });\nexport type AdminCorrectGameStatsInput = z.infer<typeof AdminCorrectGameStatsInputSchema>;\n\n// `recalculateGameStats`: restore a game's numbers from its events, discarding a hand edit.\nexport const RecalculateGameStatsInputSchema = z\n .object({\n gameId: gameIdSchema,\n reason: repairReasonSchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n })\n .strict();\nexport type RecalculateGameStatsInput = z.infer<typeof RecalculateGameStatsInputSchema>;\n\n// One correction a repair appended, or on a dry run would append.\nexport const GameStatsCorrectionSchema = z\n .object({ lineKey: z.string().min(1), field: statCounterKeySchema, value: z.number().int() })\n .strict();\nexport type GameStatsCorrection = z.infer<typeof GameStatsCorrectionSchema>;\n\n// A list of roster entries a repair replaced, as the game stored it and as the repair rebuilds it.\nconst replacedEntryListSchema = z\n .object({ stored: z.array(gameRosterPlayerIdSchema), rebuilt: z.array(gameRosterPlayerIdSchema) })\n .strict();\n\n// Every value of the game document a repair changed, each with the value the game stored and the\n// value the repair writes — never the whole document (RULE-STD-BACKEND-212). `lines` holds each changed field\n// of a team or player line (`lineKey` the team id or the roster entry id), `scores` each team whose\n// score mirror changed, and the lists, the event counter and `recordRewritten` appear only when the\n// repair changes them; `recordRewritten` names the finalized record's page counts before and after,\n// without copying the record.\nexport const GameRepairChangesSchema = z\n .object({\n lines: z.array(\n z\n .object({\n lineKey: z.string().min(1),\n field: z.string().min(1),\n stored: z.number(),\n rebuilt: z.number(),\n })\n .strict(),\n ),\n scores: z.array(\n z.object({ teamId: teamIdSchema, stored: z.number(), rebuilt: z.number() }).strict(),\n ),\n absentRosterPlayerIds: replacedEntryListSchema.optional(),\n nonScoringRosterPlayerIds: replacedEntryListSchema.optional(),\n statEventSequence: z.object({ stored: countSchema, rebuilt: countSchema }).strict().optional(),\n recordRewritten: z\n .object({ pagesBefore: countSchema, pagesAfter: countSchema })\n .strict()\n .optional(),\n })\n .strict();\nexport type GameRepairChanges = z.infer<typeof GameRepairChangesSchema>;\n\n// What a game repair did: `reconciled` it changed the game; `unchanged` there was nothing to change;\n// `alreadyApplied` the operation had already committed and this call is its acknowledged retry.\n// `gameChanges` is what it changed on the game document, or on a dry run would change; empty lists\n// for any other outcome.\nexport const GameStatsRepairResultSchema = z\n .object({\n gameId: gameIdSchema,\n leagueId: leagueIdSchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n outcome: z.enum(GAME_STATS_REPAIR_OUTCOME_KEYS),\n corrections: z.array(GameStatsCorrectionSchema),\n gameChanged: z.boolean(),\n gameChanges: GameRepairChangesSchema,\n destinationChanges: z.array(StatsDestinationChangeSchema),\n })\n .strict();\nexport type GameStatsRepairResult = z.infer<typeof GameStatsRepairResultSchema>;\n\n// `adminUpdateHistoricalStats`: a person's pre-Q-Sports career totals for a sport that takes them,\n// written whole, and their career line and hall-of-fame entry rebuilt with them.\nexport const AdminUpdateHistoricalStatsInputSchema = z\n .object({\n userId: userIdSchema,\n sportKey: sportKeySchema,\n stats: HistoricalStatsSchema,\n reason: repairReasonSchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n })\n .strict();\nexport type AdminUpdateHistoricalStatsInput = z.infer<typeof AdminUpdateHistoricalStatsInputSchema>;\n\nexport const AdminUpdateHistoricalStatsResultSchema = z\n .object({\n userId: userIdSchema,\n sportKey: sportKeySchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n outcome: z.enum(GAME_STATS_REPAIR_OUTCOME_KEYS),\n baselineBefore: HistoricalStatsSchema.nullable(),\n stoppedOnGameIds: z.array(gameIdSchema),\n changes: z.array(StatsDestinationChangeSchema),\n })\n .strict();\nexport type AdminUpdateHistoricalStatsResult = z.infer<\n typeof AdminUpdateHistoricalStatsResultSchema\n>;\n\n// `runStatsValidation`: check one game, one league, or — with neither — everything. A check that\n// reaches its time budget saves its place on its operation and answers `complete: false`; calling\n// again with the same operation id resumes it. It writes no stat, so it takes no reason.\nexport const RunStatsValidationInputSchema = z\n .object({ operationId: statsOperationIdSchema, scope: StatsValidationScopeSchema })\n .strict();\nexport type RunStatsValidationInput = z.infer<typeof RunStatsValidationInputSchema>;\n\nexport const RunStatsValidationResultSchema = z\n .object({\n reportId: z.string().min(1),\n complete: z.boolean(),\n summary: StatsValidationSummarySchema,\n discrepancyCounts: StatsValidationReportSchema.shape.discrepancyCounts,\n })\n .strict();\nexport type RunStatsValidationResult = z.infer<typeof RunStatsValidationResultSchema>;\n\n// `adminDeleteStatsValidationReport`: delete one stats check's report. It writes no stat, so it takes\n// no reason; a report that is not there is refused as not found.\nexport const AdminDeleteStatsValidationReportInputSchema = z\n .object({ reportId: statsValidationReportIdSchema })\n .strict();\nexport type AdminDeleteStatsValidationReportInput = z.infer<\n typeof AdminDeleteStatsValidationReportInputSchema\n>;\n\nexport const AdminDeleteStatsValidationReportResultSchema = z\n .object({ reportId: statsValidationReportIdSchema })\n .strict();\nexport type AdminDeleteStatsValidationReportResult = z.infer<\n typeof AdminDeleteStatsValidationReportResultSchema\n>;\n"]}
1
+ {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../src/schemas/stats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,WAAW,EACX,YAAY,EACZ,wBAAw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KZ,MAAM,CAAC,MAAM,4CAA4C,GAAG,CAAC;KAC1D,MAAM,CAAC,EAAE,QAAQ,EAAE,6BAA6B,EAAE,CAAC;KACnD,MAAM,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n CURLING_ROUND_COUNT,\n MAX_CURLING_ROUND_POINTS,\n MAX_GAME_STATS_CORRECTION_TARGETS,\n} from '../constants/sports.js';\nimport {\n countSchema,\n gameIdSchema,\n gameRosterPlayerIdSchema,\n leagueIdSchema,\n repairReasonSchema,\n sportKeySchema,\n statCounterKeySchema,\n statsOperationIdSchema,\n statsValidationReportIdSchema,\n teamIdSchema,\n userIdSchema,\n} from '../doc-schemas/atoms.js';\nimport {\n StatsDestinationChangeSchema,\n StatsOperationCountsSchema,\n} from '../doc-schemas/stats-operation.js';\nimport {\n StatsValidationReportSchema,\n StatsValidationScopeSchema,\n StatsValidationSummarySchema,\n} from '../doc-schemas/system.js';\nimport { HistoricalStatsSchema } from '../doc-schemas/user-profile.js';\nimport {\n GAME_FINALIZE_OUTCOME_KEYS,\n GAME_REOPEN_OUTCOME_KEYS,\n GAME_STATS_REPAIR_OUTCOME_KEYS,\n UNROSTERED_STAT_LINE_RESOLUTION_OUTCOME_KEYS,\n} from '../types/stats.js';\n\nexport const FinalizeGameInputSchema = z.object({ gameId: gameIdSchema }).strict();\nexport type FinalizeGameInput = z.infer<typeof FinalizeGameInputSchema>;\n\nexport const FinalizeGameResultSchema = z\n .object({\n gameId: gameIdSchema,\n leagueId: leagueIdSchema,\n outcome: z.enum(GAME_FINALIZE_OUTCOME_KEYS),\n nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema),\n })\n .strict();\nexport type FinalizeGameResult = z.infer<typeof FinalizeGameResultSchema>;\n\nexport const ReopenGameInputSchema = z\n .object({ gameId: gameIdSchema, reason: repairReasonSchema })\n .strict();\nexport type ReopenGameInput = z.infer<typeof ReopenGameInputSchema>;\n\nexport const ReopenGameResultSchema = z\n .object({\n gameId: gameIdSchema,\n leagueId: leagueIdSchema,\n outcome: z.enum(GAME_REOPEN_OUTCOME_KEYS),\n })\n .strict();\nexport type ReopenGameResult = z.infer<typeof ReopenGameResultSchema>;\n\nexport const AdminResolveUnrosteredStatLineInputSchema = z\n .object({\n gameId: gameIdSchema,\n userId: userIdSchema,\n teamId: teamIdSchema,\n reason: repairReasonSchema,\n dryRun: z.boolean().optional(),\n })\n .strict();\nexport type AdminResolveUnrosteredStatLineInput = z.infer<\n typeof AdminResolveUnrosteredStatLineInputSchema\n>;\n\nexport const AdminResolveUnrosteredStatLineResultSchema = z\n .object({\n gameId: gameIdSchema,\n userId: userIdSchema,\n teamId: teamIdSchema,\n outcome: z.enum(UNROSTERED_STAT_LINE_RESOLUTION_OUTCOME_KEYS),\n gameConverts: z.boolean(),\n })\n .strict();\nexport type AdminResolveUnrosteredStatLineResult = z.infer<\n typeof AdminResolveUnrosteredStatLineResultSchema\n>;\n\nconst statsRepairFields = {\n reason: repairReasonSchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n resumeAfter: z.string().min(1).optional(),\n};\n\nconst cursorOnlyOnDryRun = (input: { dryRun: boolean; resumeAfter?: string }): boolean =>\n input.dryRun || input.resumeAfter === undefined;\nconst CURSOR_ONLY_ON_DRY_RUN = {\n message: 'A real run resumes from its operation; only a dry run takes a cursor.',\n path: ['resumeAfter'],\n};\n\nexport const RecalculateLeagueStatsInputSchema = z\n .object({ leagueId: leagueIdSchema, ...statsRepairFields })\n .strict()\n .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);\nexport type RecalculateLeagueStatsInput = z.infer<typeof RecalculateLeagueStatsInputSchema>;\n\nexport const RecalculateAllLeagueStatsInputSchema = z\n .object({ ...statsRepairFields })\n .strict()\n .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);\nexport type RecalculateAllLeagueStatsInput = z.infer<typeof RecalculateAllLeagueStatsInputSchema>;\n\nexport const RecalculateUserStatsInputSchema = z\n .object({ userId: userIdSchema, ...statsRepairFields })\n .strict()\n .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);\nexport type RecalculateUserStatsInput = z.infer<typeof RecalculateUserStatsInputSchema>;\n\nexport const RecalculateAllUserStatsInputSchema = z\n .object({ ...statsRepairFields })\n .strict()\n .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);\nexport type RecalculateAllUserStatsInput = z.infer<typeof RecalculateAllUserStatsInputSchema>;\n\nexport const RecalculateHallOfFameInputSchema = z\n .object({ sportKey: sportKeySchema, userId: userIdSchema.optional(), ...statsRepairFields })\n .strict()\n .refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);\nexport type RecalculateHallOfFameInput = z.infer<typeof RecalculateHallOfFameInputSchema>;\n\nexport const StatsRebuildResultSchema = z\n .object({\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n complete: z.boolean(),\n nextResumeAfter: z.string().min(1).nullable(),\n counts: StatsOperationCountsSchema,\n stoppedOnGameIds: z.array(gameIdSchema),\n changes: z.array(StatsDestinationChangeSchema),\n changesTruncated: z.boolean(),\n scopeChanged: z.boolean(),\n })\n .strict();\nexport type StatsRebuildResult = z.infer<typeof StatsRebuildResultSchema>;\n\nexport const GameStatsCorrectionTargetSchema = z\n .object({\n teamId: teamIdSchema,\n playerUserId: userIdSchema.optional(),\n stat: statCounterKeySchema,\n value: countSchema,\n })\n .strict();\nexport type GameStatsCorrectionTarget = z.infer<typeof GameStatsCorrectionTargetSchema>;\n\nexport const AdminCorrectGameStatsInputSchema = z\n .object({\n gameId: gameIdSchema,\n targets: z\n .array(GameStatsCorrectionTargetSchema)\n .min(1)\n .max(MAX_GAME_STATS_CORRECTION_TARGETS)\n .optional(),\n keepStored: z.literal(true).optional(),\n reason: repairReasonSchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n })\n .strict()\n .refine((input) => (input.targets === undefined) !== (input.keepStored === undefined), {\n message: 'Give the values to set, or keep the stored numbers — one of the two.',\n path: ['targets'],\n });\nexport type AdminCorrectGameStatsInput = z.infer<typeof AdminCorrectGameStatsInputSchema>;\n\nexport const RecalculateGameStatsInputSchema = z\n .object({\n gameId: gameIdSchema,\n reason: repairReasonSchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n })\n .strict();\nexport type RecalculateGameStatsInput = z.infer<typeof RecalculateGameStatsInputSchema>;\n\nexport const GameStatsCorrectionSchema = z\n .object({ lineKey: z.string().min(1), field: statCounterKeySchema, value: z.number().int() })\n .strict();\nexport type GameStatsCorrection = z.infer<typeof GameStatsCorrectionSchema>;\n\nconst roundSlotValueSchema = z.number().int().min(0).max(MAX_CURLING_ROUND_POINTS).nullable();\n\n// Two team lines of a game, each holding its sport's fixed round slots.\nconst MAX_ROUND_SLOT_CHANGES = 2 * CURLING_ROUND_COUNT;\n\nconst replacedEntryListSchema = z\n .object({ stored: z.array(gameRosterPlayerIdSchema), rebuilt: z.array(gameRosterPlayerIdSchema) })\n .strict();\n\nexport const GameRepairChangesSchema = z\n .object({\n lines: z.array(\n z\n .object({\n lineKey: z.string().min(1),\n field: z.string().min(1),\n stored: z.number(),\n rebuilt: z.number(),\n })\n .strict(),\n ),\n scores: z.array(\n z.object({ teamId: teamIdSchema, stored: z.number(), rebuilt: z.number() }).strict(),\n ),\n // Present when a round slot changed: each changed slot of a line, a null slot unplayed.\n roundSlots: z\n .array(\n z\n .object({\n lineKey: z.string().min(1),\n slotIndex: z\n .number()\n .int()\n .min(0)\n .max(CURLING_ROUND_COUNT - 1),\n stored: roundSlotValueSchema,\n rebuilt: roundSlotValueSchema,\n })\n .strict(),\n )\n .min(1)\n .max(MAX_ROUND_SLOT_CHANGES)\n .optional(),\n absentRosterPlayerIds: replacedEntryListSchema.optional(),\n nonScoringRosterPlayerIds: replacedEntryListSchema.optional(),\n statEventSequence: z.object({ stored: countSchema, rebuilt: countSchema }).strict().optional(),\n recordRewritten: z\n .object({ pagesBefore: countSchema, pagesAfter: countSchema })\n .strict()\n .optional(),\n })\n .strict();\nexport type GameRepairChanges = z.infer<typeof GameRepairChangesSchema>;\n\nexport const GameStatsRepairResultSchema = z\n .object({\n gameId: gameIdSchema,\n leagueId: leagueIdSchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n outcome: z.enum(GAME_STATS_REPAIR_OUTCOME_KEYS),\n corrections: z.array(GameStatsCorrectionSchema),\n gameChanged: z.boolean(),\n gameChanges: GameRepairChangesSchema,\n destinationChanges: z.array(StatsDestinationChangeSchema),\n })\n .strict();\nexport type GameStatsRepairResult = z.infer<typeof GameStatsRepairResultSchema>;\n\nexport const AdminUpdateHistoricalStatsInputSchema = z\n .object({\n userId: userIdSchema,\n sportKey: sportKeySchema,\n stats: HistoricalStatsSchema,\n reason: repairReasonSchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n })\n .strict();\nexport type AdminUpdateHistoricalStatsInput = z.infer<typeof AdminUpdateHistoricalStatsInputSchema>;\n\nexport const AdminUpdateHistoricalStatsResultSchema = z\n .object({\n userId: userIdSchema,\n sportKey: sportKeySchema,\n operationId: statsOperationIdSchema,\n dryRun: z.boolean(),\n outcome: z.enum(GAME_STATS_REPAIR_OUTCOME_KEYS),\n baselineBefore: HistoricalStatsSchema.nullable(),\n stoppedOnGameIds: z.array(gameIdSchema),\n changes: z.array(StatsDestinationChangeSchema),\n })\n .strict();\nexport type AdminUpdateHistoricalStatsResult = z.infer<\n typeof AdminUpdateHistoricalStatsResultSchema\n>;\n\nexport const RunStatsValidationInputSchema = z\n .object({ operationId: statsOperationIdSchema, scope: StatsValidationScopeSchema })\n .strict();\nexport type RunStatsValidationInput = z.infer<typeof RunStatsValidationInputSchema>;\n\nexport const RunStatsValidationResultSchema = z\n .object({\n reportId: z.string().min(1),\n complete: z.boolean(),\n summary: StatsValidationSummarySchema,\n discrepancyCounts: StatsValidationReportSchema.shape.discrepancyCounts,\n })\n .strict();\nexport type RunStatsValidationResult = z.infer<typeof RunStatsValidationResultSchema>;\n\nexport const AdminDeleteStatsValidationReportInputSchema = z\n .object({ reportId: statsValidationReportIdSchema })\n .strict();\nexport type AdminDeleteStatsValidationReportInput = z.infer<\n typeof AdminDeleteStatsValidationReportInputSchema\n>;\n\nexport const AdminDeleteStatsValidationReportResultSchema = z\n .object({ reportId: statsValidationReportIdSchema })\n .strict();\nexport type AdminDeleteStatsValidationReportResult = z.infer<\n typeof AdminDeleteStatsValidationReportResultSchema\n>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"team-joining.d.ts","sourceRoot":"","sources":["../../src/schemas/team-joining.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,eAAO,MAAM,+BAA+B;;;;kBAMjC,CAAC;AACZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAGxF,eAAO,MAAM,+BAA+B;;kBAEjC,CAAC;AACZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAIxF,eAAO,MAAM,0BAA0B;;;;;kBAO5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAI9E,eAAO,MAAM,gCAAgC;;;;;;;;;;kBAElC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAQ1F,eAAO,MAAM,gCAAgC;;;kBAElC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAG1F,eAAO,MAAM,gCAAgC;;kBAElC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,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CAAqC;;;;kBAEvC,CAAC;AACZ,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG,eAAO,MAAM,sCAAsC;;;;;;;;;kBAOxC,CAAC;AACZ,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAC"}
@@ -1,17 +1,6 @@
1
- // Callable contracts for the ways onto a team: an invitation the team sends, a join request the
2
- // player sends, and a free-agent signup an admin answers by placing the player. Every door that
3
- // makes a membership ends in the membership core. The acting user is always `request.auth.uid` —
4
- // never an input field (RULE-STD-ARCH-106) — and the entry, never a field of the payload, decides the
5
- // authority (RULE-STD-BACKEND-004): each action is its own callable, never a choice made by a payload field
6
- // (RULE-STD-BACKEND-305).
7
1
  import { z } from 'zod';
8
2
  import { epochMsSchema, leagueIdSchema, membershipRosterSyncStatusSchema, teamIdSchema, userIdSchema, } from '../doc-schemas/atoms.js';
9
3
  import { teamInvitationIdSchema, teamInvitationMessageSchema, teamJoinRequestIdSchema, teamJoinRequestMessageSchema, } from './atoms.js';
10
- // ---------------------------------------------------------------------------------------------
11
- // Invitations — sent and withdrawn by the team's captain or a co-captain, or an admin
12
- // (`createTeamInvitation`, `cancelTeamInvitation`); accepted or declined by the invitee alone
13
- // (`acceptTeamInvitation`, `rejectTeamInvitation`).
14
- // ---------------------------------------------------------------------------------------------
15
4
  export const CreateTeamInvitationInputSchema = z
16
5
  .object({
17
6
  teamId: teamIdSchema,
@@ -19,12 +8,9 @@ export const CreateTeamInvitationInputSchema = z
19
8
  message: teamInvitationMessageSchema,
20
9
  })
21
10
  .strict();
22
- // Names the invitation a cancel, an acceptance, or a decline acts on.
23
11
  export const TeamInvitationTargetInputSchema = z
24
12
  .object({ teamInvitationId: teamInvitationIdSchema })
25
13
  .strict();
26
- // What sending, cancelling, and declining answer with: the invitation and the ids a client names in
27
- // its domain event.
28
14
  export const TeamInvitationResultSchema = z
29
15
  .object({
30
16
  leagueId: leagueIdSchema,
@@ -33,20 +19,12 @@ export const TeamInvitationResultSchema = z
33
19
  invitedUserId: userIdSchema,
34
20
  })
35
21
  .strict();
36
- // `rosterSyncStatus` is where the new membership's roster work stood when the call returned: the
37
- // membership is committed either way, and `pending` finishes in the background.
38
22
  export const AcceptTeamInvitationResultSchema = TeamInvitationResultSchema.extend({
39
23
  rosterSyncStatus: membershipRosterSyncStatusSchema,
40
24
  }).strict();
41
- // ---------------------------------------------------------------------------------------------
42
- // Join requests — sent and withdrawn by the player (`createTeamJoinRequest`,
43
- // `cancelTeamJoinRequest`); accepted or rejected by the team's captain or a co-captain, or an admin
44
- // (`acceptTeamJoinRequest`, `rejectTeamJoinRequest`).
45
- // ---------------------------------------------------------------------------------------------
46
25
  export const CreateTeamJoinRequestInputSchema = z
47
26
  .object({ teamId: teamIdSchema, message: teamJoinRequestMessageSchema })
48
27
  .strict();
49
- // Names the join request a cancel, an acceptance, or a rejection acts on.
50
28
  export const TeamJoinRequestTargetInputSchema = z
51
29
  .object({ teamJoinRequestId: teamJoinRequestIdSchema })
52
30
  .strict();
@@ -61,18 +39,10 @@ export const TeamJoinRequestResultSchema = z
61
39
  export const AcceptTeamJoinRequestResultSchema = TeamJoinRequestResultSchema.extend({
62
40
  rosterSyncStatus: membershipRosterSyncStatusSchema,
63
41
  }).strict();
64
- // ---------------------------------------------------------------------------------------------
65
- // Free agents — a player signs up in a league (`createLeagueFreeAgent`) or withdraws
66
- // (`deleteLeagueFreeAgent`); an admin places a signed-up player on a team
67
- // (`adminAssignLeagueFreeAgent`).
68
- // ---------------------------------------------------------------------------------------------
69
- // The league a player signs up in, or withdraws from. The player is the caller.
70
42
  export const LeagueFreeAgentInputSchema = z.object({ leagueId: leagueIdSchema }).strict();
71
- // `createdAt` is the signup's own moment: a repeated signup answers the one already on record.
72
43
  export const CreateLeagueFreeAgentResultSchema = z
73
44
  .object({ leagueId: leagueIdSchema, userId: userIdSchema, createdAt: epochMsSchema })
74
45
  .strict();
75
- // `deleted` is false when no signup was on record — a repeated withdrawal changes nothing.
76
46
  export const DeleteLeagueFreeAgentResultSchema = z
77
47
  .object({ leagueId: leagueIdSchema, userId: userIdSchema, deleted: z.boolean() })
78
48
  .strict();
@@ -1 +1 @@
1
- {"version":3,"file":"team-joining.js","sourceRoot":"","sources":["../../src/schemas/team-joining.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,gGAAgG;AAChG,iGAAiG;AACjG,sGAAsG;AACtG,4GAA4G;AAC5G,0BAA0B;AAE1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,aAAa,EACb,cAAc,EACd,gCAAgC,EAChC,YAAY,EACZ,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,YAAY,CAAC;AAEpB,gGAAgG;AAChG,sFAAsF;AACtF,8FAA8F;AAC9F,oDAAoD;AACpD,gGAAgG;AAEhG,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC;KAC7C,MAAM,CAAC;IACN,MAAM,EAAE,YAAY;IACpB,aAAa,EAAE,YAAY;IAC3B,OAAO,EAAE,2BAA2B;CACrC,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,sEAAsE;AACtE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC;KAC7C,MAAM,CAAC,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,CAAC;KACpD,MAAM,EAAE,CAAC;AAGZ,oGAAoG;AACpG,oBAAoB;AACpB,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,MAAM,CAAC;IACN,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,gBAAgB,EAAE,sBAAsB;IACxC,aAAa,EAAE,YAAY;CAC5B,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,iGAAiG;AACjG,gFAAgF;AAChF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;AAGZ,2FAA2F;AAC3F,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC;KAC/C,MAAM,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;KAChF,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC;KACnD,MAAM,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;KAChF,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC;KACpD,MAAM,CAAC;IACN,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,gBAAgB,EAAE,gCAAgC;CACnD,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["// Callable contracts for the ways onto a team: an invitation the team sends, a join request the\n// player sends, and a free-agent signup an admin answers by placing the player. Every door that\n// makes a membership ends in the membership core. The acting user is always `request.auth.uid` —\n// never an input field (RULE-STD-ARCH-106) — and the entry, never a field of the payload, decides the\n// authority (RULE-STD-BACKEND-004): each action is its own callable, never a choice made by a payload field\n// (RULE-STD-BACKEND-305).\n\nimport { z } from 'zod';\nimport {\n epochMsSchema,\n leagueIdSchema,\n membershipRosterSyncStatusSchema,\n teamIdSchema,\n userIdSchema,\n} from '../doc-schemas/atoms.js';\nimport {\n teamInvitationIdSchema,\n teamInvitationMessageSchema,\n teamJoinRequestIdSchema,\n teamJoinRequestMessageSchema,\n} from './atoms.js';\n\n// ---------------------------------------------------------------------------------------------\n// Invitations — sent and withdrawn by the team's captain or a co-captain, or an admin\n// (`createTeamInvitation`, `cancelTeamInvitation`); accepted or declined by the invitee alone\n// (`acceptTeamInvitation`, `rejectTeamInvitation`).\n// ---------------------------------------------------------------------------------------------\n\nexport const CreateTeamInvitationInputSchema = z\n .object({\n teamId: teamIdSchema,\n invitedUserId: userIdSchema,\n message: teamInvitationMessageSchema,\n })\n .strict();\nexport type CreateTeamInvitationInput = z.infer<typeof CreateTeamInvitationInputSchema>;\n\n// Names the invitation a cancel, an acceptance, or a decline acts on.\nexport const TeamInvitationTargetInputSchema = z\n .object({ teamInvitationId: teamInvitationIdSchema })\n .strict();\nexport type TeamInvitationTargetInput = z.infer<typeof TeamInvitationTargetInputSchema>;\n\n// What sending, cancelling, and declining answer with: the invitation and the ids a client names in\n// its domain event.\nexport const TeamInvitationResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n teamInvitationId: teamInvitationIdSchema,\n invitedUserId: userIdSchema,\n })\n .strict();\nexport type TeamInvitationResult = z.infer<typeof TeamInvitationResultSchema>;\n\n// `rosterSyncStatus` is where the new membership's roster work stood when the call returned: the\n// membership is committed either way, and `pending` finishes in the background.\nexport const AcceptTeamInvitationResultSchema = TeamInvitationResultSchema.extend({\n rosterSyncStatus: membershipRosterSyncStatusSchema,\n}).strict();\nexport type AcceptTeamInvitationResult = z.infer<typeof AcceptTeamInvitationResultSchema>;\n\n// ---------------------------------------------------------------------------------------------\n// Join requests — sent and withdrawn by the player (`createTeamJoinRequest`,\n// `cancelTeamJoinRequest`); accepted or rejected by the team's captain or a co-captain, or an admin\n// (`acceptTeamJoinRequest`, `rejectTeamJoinRequest`).\n// ---------------------------------------------------------------------------------------------\n\nexport const CreateTeamJoinRequestInputSchema = z\n .object({ teamId: teamIdSchema, message: teamJoinRequestMessageSchema })\n .strict();\nexport type CreateTeamJoinRequestInput = z.infer<typeof CreateTeamJoinRequestInputSchema>;\n\n// Names the join request a cancel, an acceptance, or a rejection acts on.\nexport const TeamJoinRequestTargetInputSchema = z\n .object({ teamJoinRequestId: teamJoinRequestIdSchema })\n .strict();\nexport type TeamJoinRequestTargetInput = z.infer<typeof TeamJoinRequestTargetInputSchema>;\n\nexport const TeamJoinRequestResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n teamJoinRequestId: teamJoinRequestIdSchema,\n userId: userIdSchema,\n })\n .strict();\nexport type TeamJoinRequestResult = z.infer<typeof TeamJoinRequestResultSchema>;\n\nexport const AcceptTeamJoinRequestResultSchema = TeamJoinRequestResultSchema.extend({\n rosterSyncStatus: membershipRosterSyncStatusSchema,\n}).strict();\nexport type AcceptTeamJoinRequestResult = z.infer<typeof AcceptTeamJoinRequestResultSchema>;\n\n// ---------------------------------------------------------------------------------------------\n// Free agents — a player signs up in a league (`createLeagueFreeAgent`) or withdraws\n// (`deleteLeagueFreeAgent`); an admin places a signed-up player on a team\n// (`adminAssignLeagueFreeAgent`).\n// ---------------------------------------------------------------------------------------------\n\n// The league a player signs up in, or withdraws from. The player is the caller.\nexport const LeagueFreeAgentInputSchema = z.object({ leagueId: leagueIdSchema }).strict();\nexport type LeagueFreeAgentInput = z.infer<typeof LeagueFreeAgentInputSchema>;\n\n// `createdAt` is the signup's own moment: a repeated signup answers the one already on record.\nexport const CreateLeagueFreeAgentResultSchema = z\n .object({ leagueId: leagueIdSchema, userId: userIdSchema, createdAt: epochMsSchema })\n .strict();\nexport type CreateLeagueFreeAgentResult = z.infer<typeof CreateLeagueFreeAgentResultSchema>;\n\n// `deleted` is false when no signup was on record — a repeated withdrawal changes nothing.\nexport const DeleteLeagueFreeAgentResultSchema = z\n .object({ leagueId: leagueIdSchema, userId: userIdSchema, deleted: z.boolean() })\n .strict();\nexport type DeleteLeagueFreeAgentResult = z.infer<typeof DeleteLeagueFreeAgentResultSchema>;\n\nexport const AdminAssignLeagueFreeAgentInputSchema = z\n .object({ leagueId: leagueIdSchema, userId: userIdSchema, teamId: teamIdSchema })\n .strict();\nexport type AdminAssignLeagueFreeAgentInput = z.infer<typeof AdminAssignLeagueFreeAgentInputSchema>;\n\nexport const AdminAssignLeagueFreeAgentResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n userId: userIdSchema,\n rosterSyncStatus: membershipRosterSyncStatusSchema,\n })\n .strict();\nexport type AdminAssignLeagueFreeAgentResult = z.infer<\n typeof AdminAssignLeagueFreeAgentResultSchema\n>;\n"]}
1
+ {"version":3,"file":"team-joining.js","sourceRoot":"","sources":["../../src/schemas/team-joining.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,aAAa,EACb,cAAc,EACd,gCAAgC,EAChC,YAAY,EACZ,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC;KAC7C,MAAM,CAAC;IACN,MAAM,EAAE,YAAY;IACpB,aAAa,EAAE,YAAY;IAC3B,OAAO,EAAE,2BAA2B;CACrC,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC;KAC7C,MAAM,CAAC,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,CAAC;KACpD,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,MAAM,CAAC;IACN,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,gBAAgB,EAAE,sBAAsB;IACxC,aAAa,EAAE,YAAY;CAC5B,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,gCAAgC,GAAG,0BAA0B,CAAC,MAAM,CAAC;IAChF,gBAAgB,EAAE,gCAAgC;CACnD,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC;KAC9C,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;KACvE,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,M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AAE,YAAY;IACpB,gBAAgB,EAAE,gCAAgC;CACnD,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n epochMsSchema,\n leagueIdSchema,\n membershipRosterSyncStatusSchema,\n teamIdSchema,\n userIdSchema,\n} from '../doc-schemas/atoms.js';\nimport {\n teamInvitationIdSchema,\n teamInvitationMessageSchema,\n teamJoinRequestIdSchema,\n teamJoinRequestMessageSchema,\n} from './atoms.js';\n\nexport const CreateTeamInvitationInputSchema = z\n .object({\n teamId: teamIdSchema,\n invitedUserId: userIdSchema,\n message: teamInvitationMessageSchema,\n })\n .strict();\nexport type CreateTeamInvitationInput = z.infer<typeof CreateTeamInvitationInputSchema>;\n\nexport const TeamInvitationTargetInputSchema = z\n .object({ teamInvitationId: teamInvitationIdSchema })\n .strict();\nexport type TeamInvitationTargetInput = z.infer<typeof TeamInvitationTargetInputSchema>;\n\nexport const TeamInvitationResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n teamInvitationId: teamInvitationIdSchema,\n invitedUserId: userIdSchema,\n })\n .strict();\nexport type TeamInvitationResult = z.infer<typeof TeamInvitationResultSchema>;\n\nexport const AcceptTeamInvitationResultSchema = TeamInvitationResultSchema.extend({\n rosterSyncStatus: membershipRosterSyncStatusSchema,\n}).strict();\nexport type AcceptTeamInvitationResult = z.infer<typeof AcceptTeamInvitationResultSchema>;\n\nexport const CreateTeamJoinRequestInputSchema = z\n .object({ teamId: teamIdSchema, message: teamJoinRequestMessageSchema })\n .strict();\nexport type CreateTeamJoinRequestInput = z.infer<typeof CreateTeamJoinRequestInputSchema>;\n\nexport const TeamJoinRequestTargetInputSchema = z\n .object({ teamJoinRequestId: teamJoinRequestIdSchema })\n .strict();\nexport type TeamJoinRequestTargetInput = z.infer<typeof TeamJoinRequestTargetInputSchema>;\n\nexport const TeamJoinRequestResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n teamJoinRequestId: teamJoinRequestIdSchema,\n userId: userIdSchema,\n })\n .strict();\nexport type TeamJoinRequestResult = z.infer<typeof TeamJoinRequestResultSchema>;\n\nexport const AcceptTeamJoinRequestResultSchema = TeamJoinRequestResultSchema.extend({\n rosterSyncStatus: membershipRosterSyncStatusSchema,\n}).strict();\nexport type AcceptTeamJoinRequestResult = z.infer<typeof AcceptTeamJoinRequestResultSchema>;\n\nexport const LeagueFreeAgentInputSchema = z.object({ leagueId: leagueIdSchema }).strict();\nexport type LeagueFreeAgentInput = z.infer<typeof LeagueFreeAgentInputSchema>;\n\nexport const CreateLeagueFreeAgentResultSchema = z\n .object({ leagueId: leagueIdSchema, userId: userIdSchema, createdAt: epochMsSchema })\n .strict();\nexport type CreateLeagueFreeAgentResult = z.infer<typeof CreateLeagueFreeAgentResultSchema>;\n\nexport const DeleteLeagueFreeAgentResultSchema = z\n .object({ leagueId: leagueIdSchema, userId: userIdSchema, deleted: z.boolean() })\n .strict();\nexport type DeleteLeagueFreeAgentResult = z.infer<typeof DeleteLeagueFreeAgentResultSchema>;\n\nexport const AdminAssignLeagueFreeAgentInputSchema = z\n .object({ leagueId: leagueIdSchema, userId: userIdSchema, teamId: teamIdSchema })\n .strict();\nexport type AdminAssignLeagueFreeAgentInput = z.infer<typeof AdminAssignLeagueFreeAgentInputSchema>;\n\nexport const AdminAssignLeagueFreeAgentResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n userId: userIdSchema,\n rosterSyncStatus: membershipRosterSyncStatusSchema,\n })\n .strict();\nexport type AdminAssignLeagueFreeAgentResult = z.infer<\n typeof AdminAssignLeagueFreeAgentResultSchema\n>;\n"]}
@@ -365,7 +365,6 @@ export declare const AdminLinkClosedLeagueGhostPlayerResultSchema: z.ZodObject<{
365
365
  publicUserDeleted: z.ZodBoolean;
366
366
  }, z.core.$strict>;
367
367
  export type AdminLinkClosedLeagueGhostPlayerResult = LinkGhostPlayerResult;
368
- /** A ghost id, refused for any other id, so a removal input cannot name a real account. */
369
368
  export declare const ghostUserIdSchema: z.ZodString;
370
369
  export declare const UpdateTeamMembershipRoleInputSchema: z.ZodObject<{
371
370
  teamId: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["../../src/schemas/teams.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqCxB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAwC,CAAC;AACjF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAElC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,4BAA4B;;;;kBAE9B,CAAC;AACZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAWlF,eAAO,MAAM,0BAA0B,aAGtC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;kBAMlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,gCAAgC;;;;;kBAOlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAI1F,eAAO,MAAM,6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