@ttt-productions/q-core 0.1.28 → 0.1.29
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.
- package/dist/constants/admin-views.d.ts.map +1 -1
- package/dist/constants/admin-views.js +0 -3
- package/dist/constants/admin-views.js.map +1 -1
- package/dist/constants/business.d.ts.map +1 -1
- package/dist/constants/business.js +0 -52
- package/dist/constants/business.js.map +1 -1
- package/dist/constants/deployment.d.ts +0 -2
- package/dist/constants/deployment.d.ts.map +1 -1
- package/dist/constants/deployment.js +0 -2
- package/dist/constants/deployment.js.map +1 -1
- package/dist/constants/media.d.ts.map +1 -1
- package/dist/constants/media.js +4 -30
- package/dist/constants/media.js.map +1 -1
- package/dist/constants/scheduled-jobs.d.ts +0 -25
- package/dist/constants/scheduled-jobs.d.ts.map +1 -1
- package/dist/constants/scheduled-jobs.js +0 -26
- package/dist/constants/scheduled-jobs.js.map +1 -1
- package/dist/constants/sports.d.ts.map +1 -1
- package/dist/constants/sports.js +2 -25
- package/dist/constants/sports.js.map +1 -1
- package/dist/constants/storage-keys.d.ts +0 -38
- package/dist/constants/storage-keys.d.ts.map +1 -1
- package/dist/constants/storage-keys.js +0 -41
- package/dist/constants/storage-keys.js.map +1 -1
- package/dist/constants/telemetry.d.ts +0 -3
- package/dist/constants/telemetry.d.ts.map +1 -1
- package/dist/constants/telemetry.js +2 -11
- package/dist/constants/telemetry.js.map +1 -1
- package/dist/doc-schemas/admin-notifications.d.ts +0 -1
- package/dist/doc-schemas/admin-notifications.d.ts.map +1 -1
- package/dist/doc-schemas/admin-notifications.js +0 -41
- package/dist/doc-schemas/admin-notifications.js.map +1 -1
- package/dist/doc-schemas/aggregate-stats.d.ts.map +1 -1
- package/dist/doc-schemas/aggregate-stats.js +0 -35
- package/dist/doc-schemas/aggregate-stats.js.map +1 -1
- package/dist/doc-schemas/atoms.d.ts +0 -17
- package/dist/doc-schemas/atoms.d.ts.map +1 -1
- package/dist/doc-schemas/atoms.js +0 -36
- package/dist/doc-schemas/atoms.js.map +1 -1
- package/dist/doc-schemas/audit-event.d.ts.map +1 -1
- package/dist/doc-schemas/audit-event.js +0 -8
- package/dist/doc-schemas/audit-event.js.map +1 -1
- package/dist/doc-schemas/award-group-grant.d.ts +0 -6
- package/dist/doc-schemas/award-group-grant.d.ts.map +1 -1
- package/dist/doc-schemas/award-group-grant.js +0 -25
- package/dist/doc-schemas/award-group-grant.js.map +1 -1
- package/dist/doc-schemas/catalogs.d.ts.map +1 -1
- package/dist/doc-schemas/catalogs.js +0 -12
- package/dist/doc-schemas/catalogs.js.map +1 -1
- package/dist/doc-schemas/firestore-primitives.d.ts.map +1 -1
- package/dist/doc-schemas/firestore-primitives.js +0 -5
- package/dist/doc-schemas/firestore-primitives.js.map +1 -1
- package/dist/doc-schemas/gallery.d.ts.map +1 -1
- package/dist/doc-schemas/gallery.js +0 -15
- package/dist/doc-schemas/gallery.js.map +1 -1
- package/dist/doc-schemas/game-location.d.ts.map +1 -1
- package/dist/doc-schemas/game-location.js +2 -11
- package/dist/doc-schemas/game-location.js.map +1 -1
- package/dist/doc-schemas/game-stat-history.d.ts.map +1 -1
- package/dist/doc-schemas/game-stat-history.js +0 -9
- package/dist/doc-schemas/game-stat-history.js.map +1 -1
- package/dist/doc-schemas/game-stats.d.ts.map +1 -1
- package/dist/doc-schemas/game-stats.js +0 -56
- package/dist/doc-schemas/game-stats.js.map +1 -1
- package/dist/doc-schemas/league-team.d.ts.map +1 -1
- package/dist/doc-schemas/league-team.js +6 -29
- package/dist/doc-schemas/league-team.js.map +1 -1
- package/dist/doc-schemas/membership-roster-sync.d.ts.map +1 -1
- package/dist/doc-schemas/membership-roster-sync.js +0 -17
- package/dist/doc-schemas/membership-roster-sync.js.map +1 -1
- package/dist/doc-schemas/migration-console.d.ts +0 -10
- package/dist/doc-schemas/migration-console.d.ts.map +1 -1
- package/dist/doc-schemas/migration-console.js +0 -32
- package/dist/doc-schemas/migration-console.js.map +1 -1
- package/dist/doc-schemas/pending-media.d.ts.map +1 -1
- package/dist/doc-schemas/pending-media.js +0 -17
- package/dist/doc-schemas/pending-media.js.map +1 -1
- package/dist/doc-schemas/picture-retirement.d.ts.map +1 -1
- package/dist/doc-schemas/picture-retirement.js +0 -10
- package/dist/doc-schemas/picture-retirement.js.map +1 -1
- package/dist/doc-schemas/publicUser.d.ts.map +1 -1
- package/dist/doc-schemas/publicUser.js +0 -5
- package/dist/doc-schemas/publicUser.js.map +1 -1
- package/dist/doc-schemas/registration-start.d.ts.map +1 -1
- package/dist/doc-schemas/registration-start.js +2 -5
- package/dist/doc-schemas/registration-start.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +0 -10
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/doc-schemas/reserved-display-name.d.ts.map +1 -1
- package/dist/doc-schemas/reserved-display-name.js +0 -5
- package/dist/doc-schemas/reserved-display-name.js.map +1 -1
- package/dist/doc-schemas/sport-game.d.ts.map +1 -1
- package/dist/doc-schemas/sport-game.js +1 -29
- package/dist/doc-schemas/sport-game.js.map +1 -1
- package/dist/doc-schemas/sport-league.d.ts +0 -9
- package/dist/doc-schemas/sport-league.d.ts.map +1 -1
- package/dist/doc-schemas/sport-league.js +4 -26
- package/dist/doc-schemas/sport-league.js.map +1 -1
- package/dist/doc-schemas/stats-operation.d.ts.map +1 -1
- package/dist/doc-schemas/stats-operation.js +2 -44
- package/dist/doc-schemas/stats-operation.js.map +1 -1
- package/dist/doc-schemas/status-reconcile-queue.d.ts +0 -6
- package/dist/doc-schemas/status-reconcile-queue.d.ts.map +1 -1
- package/dist/doc-schemas/status-reconcile-queue.js +0 -13
- package/dist/doc-schemas/status-reconcile-queue.js.map +1 -1
- package/dist/doc-schemas/sweep-state.d.ts.map +1 -1
- package/dist/doc-schemas/sweep-state.js +4 -20
- package/dist/doc-schemas/sweep-state.js.map +1 -1
- package/dist/doc-schemas/system.d.ts.map +1 -1
- package/dist/doc-schemas/system.js +1 -27
- package/dist/doc-schemas/system.js.map +1 -1
- package/dist/doc-schemas/team-membership.d.ts.map +1 -1
- package/dist/doc-schemas/team-membership.js +0 -10
- package/dist/doc-schemas/team-membership.js.map +1 -1
- package/dist/doc-schemas/user-profile.d.ts +0 -1
- package/dist/doc-schemas/user-profile.d.ts.map +1 -1
- package/dist/doc-schemas/user-profile.js +0 -28
- package/dist/doc-schemas/user-profile.js.map +1 -1
- package/dist/doc-schemas/waiver-template.d.ts.map +1 -1
- package/dist/doc-schemas/waiver-template.js +4 -25
- package/dist/doc-schemas/waiver-template.js.map +1 -1
- package/dist/doc-schemas/waivers-and-hardware.d.ts.map +1 -1
- package/dist/doc-schemas/waivers-and-hardware.js +0 -20
- package/dist/doc-schemas/waivers-and-hardware.js.map +1 -1
- package/dist/domain-events/domain-events.d.ts.map +1 -1
- package/dist/domain-events/domain-events.js +0 -67
- package/dist/domain-events/domain-events.js.map +1 -1
- package/dist/ids/award-grant-ids.d.ts.map +1 -1
- package/dist/ids/award-grant-ids.js +0 -7
- package/dist/ids/award-grant-ids.js.map +1 -1
- package/dist/ids/compound-ids.d.ts.map +1 -1
- package/dist/ids/compound-ids.js +0 -7
- package/dist/ids/compound-ids.js.map +1 -1
- package/dist/ids/minted-ids.d.ts.map +1 -1
- package/dist/ids/minted-ids.js +4 -14
- package/dist/ids/minted-ids.js.map +1 -1
- package/dist/ids/notification-ids.d.ts.map +1 -1
- package/dist/ids/notification-ids.js +0 -15
- package/dist/ids/notification-ids.js.map +1 -1
- package/dist/ids/picture-ids.d.ts +0 -5
- package/dist/ids/picture-ids.d.ts.map +1 -1
- package/dist/ids/picture-ids.js +0 -11
- package/dist/ids/picture-ids.js.map +1 -1
- package/dist/ids/stat-event-ids.d.ts +0 -6
- package/dist/ids/stat-event-ids.d.ts.map +1 -1
- package/dist/ids/stat-event-ids.js +0 -15
- package/dist/ids/stat-event-ids.js.map +1 -1
- package/dist/ids/stats-operation-ids.d.ts.map +1 -1
- package/dist/ids/stats-operation-ids.js +0 -7
- package/dist/ids/stats-operation-ids.js.map +1 -1
- package/dist/ids/waiver-template-ids.d.ts +0 -1
- package/dist/ids/waiver-template-ids.d.ts.map +1 -1
- package/dist/ids/waiver-template-ids.js +0 -2
- package/dist/ids/waiver-template-ids.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/input-formats/input-formats.d.ts +0 -80
- package/dist/input-formats/input-formats.d.ts.map +1 -1
- package/dist/input-formats/input-formats.js +0 -86
- package/dist/input-formats/input-formats.js.map +1 -1
- package/dist/media/file-origins.d.ts +0 -3
- package/dist/media/file-origins.d.ts.map +1 -1
- package/dist/media/file-origins.js +0 -26
- package/dist/media/file-origins.js.map +1 -1
- package/dist/media/picture-aspects.d.ts +0 -2
- package/dist/media/picture-aspects.d.ts.map +1 -1
- package/dist/media/picture-aspects.js +0 -5
- package/dist/media/picture-aspects.js.map +1 -1
- package/dist/media/picture-url.d.ts +0 -6
- package/dist/media/picture-url.d.ts.map +1 -1
- package/dist/media/picture-url.js +0 -9
- package/dist/media/picture-url.js.map +1 -1
- package/dist/media/upload-tray-display.d.ts +0 -3
- package/dist/media/upload-tray-display.d.ts.map +1 -1
- package/dist/media/upload-tray-display.js +0 -6
- package/dist/media/upload-tray-display.js.map +1 -1
- package/dist/migration-console/action-ids.d.ts +0 -1
- package/dist/migration-console/action-ids.d.ts.map +1 -1
- package/dist/migration-console/action-ids.js +2 -45
- package/dist/migration-console/action-ids.js.map +1 -1
- package/dist/migration-console/manifest.d.ts +0 -24
- package/dist/migration-console/manifest.d.ts.map +1 -1
- package/dist/migration-console/manifest.js +1 -56
- package/dist/migration-console/manifest.js.map +1 -1
- package/dist/migration-console/run-state.d.ts +0 -14
- package/dist/migration-console/run-state.d.ts.map +1 -1
- package/dist/migration-console/run-state.js +0 -16
- package/dist/migration-console/run-state.js.map +1 -1
- package/dist/notifications/admin-notification-config.d.ts +0 -11
- package/dist/notifications/admin-notification-config.d.ts.map +1 -1
- package/dist/notifications/admin-notification-config.js +2 -13
- package/dist/notifications/admin-notification-config.js.map +1 -1
- package/dist/notifications/archive-all.d.ts.map +1 -1
- package/dist/notifications/archive-all.js +0 -2
- package/dist/notifications/archive-all.js.map +1 -1
- package/dist/notifications/occurrences.d.ts +0 -3
- package/dist/notifications/occurrences.d.ts.map +1 -1
- package/dist/notifications/occurrences.js +0 -7
- package/dist/notifications/occurrences.js.map +1 -1
- package/dist/paths/app-routes.d.ts +0 -12
- package/dist/paths/app-routes.d.ts.map +1 -1
- package/dist/paths/app-routes.js +0 -18
- package/dist/paths/app-routes.js.map +1 -1
- package/dist/paths/collection-groups.d.ts.map +1 -1
- package/dist/paths/collection-groups.js +0 -5
- package/dist/paths/collection-groups.js.map +1 -1
- package/dist/paths/collection-refs.d.ts.map +1 -1
- package/dist/paths/collection-refs.js +0 -4
- package/dist/paths/collection-refs.js.map +1 -1
- package/dist/paths/collections.d.ts +0 -5
- package/dist/paths/collections.d.ts.map +1 -1
- package/dist/paths/collections.js +0 -68
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +0 -16
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/paths/picture-owner-paths.d.ts +0 -4
- package/dist/paths/picture-owner-paths.d.ts.map +1 -1
- package/dist/paths/picture-owner-paths.js +0 -10
- package/dist/paths/picture-owner-paths.js.map +1 -1
- package/dist/paths/storage-paths.d.ts +0 -18
- package/dist/paths/storage-paths.d.ts.map +1 -1
- package/dist/paths/storage-paths.js +0 -23
- package/dist/paths/storage-paths.js.map +1 -1
- package/dist/paths/utils.d.ts +0 -6
- package/dist/paths/utils.d.ts.map +1 -1
- package/dist/paths/utils.js +0 -9
- package/dist/paths/utils.js.map +1 -1
- package/dist/schemas/account-settings.d.ts.map +1 -1
- package/dist/schemas/account-settings.js +0 -7
- package/dist/schemas/account-settings.js.map +1 -1
- package/dist/schemas/admin-notifications.d.ts.map +1 -1
- package/dist/schemas/admin-notifications.js +0 -17
- package/dist/schemas/admin-notifications.js.map +1 -1
- package/dist/schemas/admin-stats.d.ts.map +1 -1
- package/dist/schemas/admin-stats.js +0 -9
- package/dist/schemas/admin-stats.js.map +1 -1
- package/dist/schemas/app-config.d.ts.map +1 -1
- package/dist/schemas/app-config.js +0 -10
- package/dist/schemas/app-config.js.map +1 -1
- package/dist/schemas/atoms.d.ts.map +1 -1
- package/dist/schemas/atoms.js +0 -10
- package/dist/schemas/atoms.js.map +1 -1
- package/dist/schemas/awards.d.ts.map +1 -1
- package/dist/schemas/awards.js +0 -29
- package/dist/schemas/awards.js.map +1 -1
- package/dist/schemas/dead-letters.d.ts +0 -3
- package/dist/schemas/dead-letters.d.ts.map +1 -1
- package/dist/schemas/dead-letters.js +0 -15
- package/dist/schemas/dead-letters.js.map +1 -1
- package/dist/schemas/game-locations.d.ts.map +1 -1
- package/dist/schemas/game-locations.js +0 -6
- package/dist/schemas/game-locations.js.map +1 -1
- package/dist/schemas/hardware-loan-contracts.d.ts.map +1 -1
- package/dist/schemas/hardware-loan-contracts.js +0 -13
- package/dist/schemas/hardware-loan-contracts.js.map +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +0 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/leagues.d.ts.map +1 -1
- package/dist/schemas/leagues.js +0 -24
- package/dist/schemas/leagues.js.map +1 -1
- package/dist/schemas/migration-console.d.ts +0 -7
- package/dist/schemas/migration-console.d.ts.map +1 -1
- package/dist/schemas/migration-console.js +0 -34
- package/dist/schemas/migration-console.js.map +1 -1
- package/dist/schemas/pictures.d.ts.map +1 -1
- package/dist/schemas/pictures.js +0 -10
- package/dist/schemas/pictures.js.map +1 -1
- package/dist/schemas/schedules.d.ts.map +1 -1
- package/dist/schemas/schedules.js +0 -26
- package/dist/schemas/schedules.js.map +1 -1
- package/dist/schemas/scoring.d.ts +0 -6
- package/dist/schemas/scoring.d.ts.map +1 -1
- package/dist/schemas/scoring.js +0 -33
- package/dist/schemas/scoring.js.map +1 -1
- package/dist/schemas/signed-waivers.d.ts.map +1 -1
- package/dist/schemas/signed-waivers.js +0 -22
- package/dist/schemas/signed-waivers.js.map +1 -1
- package/dist/schemas/stats.d.ts.map +1 -1
- package/dist/schemas/stats.js +0 -60
- package/dist/schemas/stats.js.map +1 -1
- package/dist/schemas/team-joining.d.ts.map +1 -1
- package/dist/schemas/team-joining.js +0 -30
- package/dist/schemas/team-joining.js.map +1 -1
- package/dist/schemas/teams.d.ts +0 -1
- package/dist/schemas/teams.d.ts.map +1 -1
- package/dist/schemas/teams.js +0 -83
- package/dist/schemas/teams.js.map +1 -1
- package/dist/schemas/uploads.d.ts +0 -8
- package/dist/schemas/uploads.d.ts.map +1 -1
- package/dist/schemas/uploads.js +0 -29
- package/dist/schemas/uploads.js.map +1 -1
- package/dist/schemas/users.d.ts +0 -1
- package/dist/schemas/users.d.ts.map +1 -1
- package/dist/schemas/users.js +0 -41
- package/dist/schemas/users.js.map +1 -1
- package/dist/schemas/waiver-templates.d.ts.map +1 -1
- package/dist/schemas/waiver-templates.js +0 -7
- package/dist/schemas/waiver-templates.js.map +1 -1
- package/dist/sports/basketball-scoring.d.ts +0 -4
- package/dist/sports/basketball-scoring.d.ts.map +1 -1
- package/dist/sports/basketball-scoring.js +0 -34
- package/dist/sports/basketball-scoring.js.map +1 -1
- package/dist/sports/basketball.d.ts.map +1 -1
- package/dist/sports/basketball.js +0 -5
- package/dist/sports/basketball.js.map +1 -1
- package/dist/sports/bulk-entry.d.ts +0 -22
- package/dist/sports/bulk-entry.d.ts.map +1 -1
- package/dist/sports/bulk-entry.js +0 -10
- package/dist/sports/bulk-entry.js.map +1 -1
- package/dist/sports/column-catalog.d.ts +0 -17
- package/dist/sports/column-catalog.d.ts.map +1 -1
- package/dist/sports/column-catalog.js +0 -10
- package/dist/sports/column-catalog.js.map +1 -1
- package/dist/sports/contribution.d.ts +2 -59
- package/dist/sports/contribution.d.ts.map +1 -1
- package/dist/sports/contribution.js +2 -45
- package/dist/sports/contribution.js.map +1 -1
- package/dist/sports/curling-scoring.d.ts +0 -1
- package/dist/sports/curling-scoring.d.ts.map +1 -1
- package/dist/sports/curling-scoring.js +0 -27
- package/dist/sports/curling-scoring.js.map +1 -1
- package/dist/sports/curling.d.ts.map +1 -1
- package/dist/sports/curling.js +0 -4
- package/dist/sports/curling.js.map +1 -1
- package/dist/sports/finalized-record.d.ts +0 -17
- package/dist/sports/finalized-record.d.ts.map +1 -1
- package/dist/sports/finalized-record.js +0 -20
- package/dist/sports/finalized-record.js.map +1 -1
- package/dist/sports/football-scoring.d.ts.map +1 -1
- package/dist/sports/football-scoring.js +0 -21
- package/dist/sports/football-scoring.js.map +1 -1
- package/dist/sports/football.d.ts.map +1 -1
- package/dist/sports/football.js +0 -4
- package/dist/sports/football.js.map +1 -1
- package/dist/sports/index.d.ts.map +1 -1
- package/dist/sports/index.js +0 -2
- package/dist/sports/index.js.map +1 -1
- package/dist/sports/ledger-continuity.d.ts +0 -2
- package/dist/sports/ledger-continuity.d.ts.map +1 -1
- package/dist/sports/ledger-continuity.js +0 -5
- package/dist/sports/ledger-continuity.js.map +1 -1
- package/dist/sports/lifetime-summary.d.ts +0 -6
- package/dist/sports/lifetime-summary.d.ts.map +1 -1
- package/dist/sports/lifetime-summary.js +0 -7
- package/dist/sports/lifetime-summary.js.map +1 -1
- package/dist/sports/rankings.d.ts +0 -12
- package/dist/sports/rankings.d.ts.map +1 -1
- package/dist/sports/rankings.js +0 -15
- package/dist/sports/rankings.js.map +1 -1
- package/dist/sports/registry.d.ts +0 -10
- package/dist/sports/registry.d.ts.map +1 -1
- package/dist/sports/registry.js +0 -9
- package/dist/sports/registry.js.map +1 -1
- package/dist/sports/replay.d.ts +0 -11
- package/dist/sports/replay.d.ts.map +1 -1
- package/dist/sports/replay.js +0 -16
- package/dist/sports/replay.js.map +1 -1
- package/dist/sports/rollup-check.d.ts +0 -7
- package/dist/sports/rollup-check.d.ts.map +1 -1
- package/dist/sports/rollup-check.js +0 -14
- package/dist/sports/rollup-check.js.map +1 -1
- package/dist/sports/score-mirror.d.ts +0 -1
- package/dist/sports/score-mirror.d.ts.map +1 -1
- package/dist/sports/score-mirror.js +0 -4
- package/dist/sports/score-mirror.js.map +1 -1
- package/dist/sports/scoring-display.d.ts +0 -30
- package/dist/sports/scoring-display.d.ts.map +1 -1
- package/dist/sports/scoring-display.js +0 -9
- package/dist/sports/scoring-display.js.map +1 -1
- package/dist/sports/scoring.d.ts +0 -36
- package/dist/sports/scoring.d.ts.map +1 -1
- package/dist/sports/scoring.js +0 -10
- package/dist/sports/scoring.js.map +1 -1
- package/dist/sports/shared-columns.d.ts +0 -1
- package/dist/sports/shared-columns.d.ts.map +1 -1
- package/dist/sports/shared-columns.js +0 -7
- package/dist/sports/shared-columns.js.map +1 -1
- package/dist/sports/sport-adapter.d.ts +0 -32
- package/dist/sports/sport-adapter.d.ts.map +1 -1
- package/dist/sports/sport-adapter.js +0 -7
- package/dist/sports/sport-adapter.js.map +1 -1
- package/dist/sports/store-driver.d.ts +0 -28
- package/dist/sports/store-driver.d.ts.map +1 -1
- package/dist/sports/store-driver.js +0 -38
- package/dist/sports/store-driver.js.map +1 -1
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js +0 -67
- package/dist/types/audit.js.map +1 -1
- package/dist/types/claims.d.ts +0 -10
- package/dist/types/claims.d.ts.map +1 -1
- package/dist/types/claims.js +0 -16
- package/dist/types/claims.js.map +1 -1
- package/dist/types/notifications.d.ts.map +1 -1
- package/dist/types/notifications.js +7 -25
- package/dist/types/notifications.js.map +1 -1
- package/dist/types/picture-owners.d.ts +0 -1
- package/dist/types/picture-owners.d.ts.map +1 -1
- package/dist/types/picture-owners.js +0 -6
- package/dist/types/picture-owners.js.map +1 -1
- package/dist/types/schedules.d.ts.map +1 -1
- package/dist/types/schedules.js +0 -9
- package/dist/types/schedules.js.map +1 -1
- package/dist/types/sports.d.ts.map +1 -1
- package/dist/types/sports.js +0 -24
- package/dist/types/sports.js.map +1 -1
- package/dist/types/stats.d.ts.map +1 -1
- package/dist/types/stats.js +0 -65
- package/dist/types/stats.js.map +1 -1
- package/dist/types/unions.d.ts +0 -2
- package/dist/types/unions.d.ts.map +1 -1
- package/dist/types/unions.js +3 -91
- package/dist/types/unions.js.map +1 -1
- package/dist/types/uploads.d.ts.map +1 -1
- package/dist/types/uploads.js +0 -7
- package/dist/types/uploads.js.map +1 -1
- package/dist/upload-variables/on-progress.d.ts.map +1 -1
- package/dist/upload-variables/on-progress.js +2 -5
- package/dist/upload-variables/on-progress.js.map +1 -1
- package/dist/upload-variables/picture-upload-variables.d.ts +0 -1
- package/dist/upload-variables/picture-upload-variables.d.ts.map +1 -1
- package/dist/upload-variables/picture-upload-variables.js +0 -4
- package/dist/upload-variables/picture-upload-variables.js.map +1 -1
- package/dist/upload-variables/sign-hardware-contract-variables.d.ts.map +1 -1
- package/dist/upload-variables/sign-hardware-contract-variables.js +0 -2
- package/dist/upload-variables/sign-hardware-contract-variables.js.map +1 -1
- package/dist/upload-variables/sign-waiver-variables.d.ts.map +1 -1
- package/dist/upload-variables/sign-waiver-variables.js +0 -4
- package/dist/upload-variables/sign-waiver-variables.js.map +1 -1
- package/dist/utils/account-status.d.ts.map +1 -1
- package/dist/utils/account-status.js +0 -4
- package/dist/utils/account-status.js.map +1 -1
- package/dist/utils/app-config.d.ts +0 -53
- package/dist/utils/app-config.d.ts.map +1 -1
- package/dist/utils/app-config.js +0 -62
- package/dist/utils/app-config.js.map +1 -1
- package/dist/utils/display-name.d.ts +0 -7
- package/dist/utils/display-name.d.ts.map +1 -1
- package/dist/utils/display-name.js +0 -8
- package/dist/utils/display-name.js.map +1 -1
- package/dist/utils/league-calendar.d.ts +0 -11
- package/dist/utils/league-calendar.d.ts.map +1 -1
- package/dist/utils/league-calendar.js +1 -18
- package/dist/utils/league-calendar.js.map +1 -1
- package/dist/utils/league-join-warning.d.ts +0 -11
- package/dist/utils/league-join-warning.d.ts.map +1 -1
- package/dist/utils/league-join-warning.js +0 -28
- package/dist/utils/league-join-warning.js.map +1 -1
- package/dist/utils/league-joining.d.ts +0 -1
- package/dist/utils/league-joining.d.ts.map +1 -1
- package/dist/utils/league-joining.js +0 -7
- package/dist/utils/league-joining.js.map +1 -1
- package/dist/utils/league-mode.d.ts +0 -1
- package/dist/utils/league-mode.d.ts.map +1 -1
- package/dist/utils/league-mode.js +0 -4
- package/dist/utils/league-mode.js.map +1 -1
- package/dist/utils/schedules.d.ts +0 -15
- package/dist/utils/schedules.d.ts.map +1 -1
- package/dist/utils/schedules.js +0 -19
- package/dist/utils/schedules.js.map +1 -1
- package/dist/utils/team-creation.d.ts +0 -2
- package/dist/utils/team-creation.d.ts.map +1 -1
- package/dist/utils/team-creation.js +0 -6
- package/dist/utils/team-creation.js.map +1 -1
- package/dist/utils/team-member-actions.d.ts +0 -6
- package/dist/utils/team-member-actions.d.ts.map +1 -1
- package/dist/utils/team-member-actions.js +0 -12
- package/dist/utils/team-member-actions.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-driver.js","sourceRoot":"","sources":["../../src/sports/store-driver.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,qGAAqG;AACrG,4GAA4G;AAC5G,kGAAkG;AAClG,0CAA0C;AAC1C,EAAE;AACF,4GAA4G;AAC5G,mGAAmG;AACnG,gGAAgG;AAChG,yEAAyE;AAIzE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,GAGX,MAAM,cAAc,CAAC;AAGtB,iDAAiD;AACjD,MAAM,UAAU,qBAAqB,CAAC,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,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QAC7C,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC7E,CAAC","sourcesContent":["// The store driver's decision half: what one scoring write does with the batch of events it was\n// sent, given what the game already holds. It owns ids, the sequence, void resolution, and the fold;\n// everything sport-shaped is the adapter's (RULE-QS-SPORT-903). The writing core reads the game, the stored\n// events the batch names, and the roster entries it names, hands them here, and writes what comes\n// back — one transaction, all or nothing.\n//\n// An event id is the idempotency key (RULE-QS-SPORT-912): an id already stored, or earlier in the batch, is\n// acknowledged when its content matches and never applied again, so re-sending a batch whose first\n// send timed out after committing changes nothing. A void's id is derived from its target, so a\n// second undo of one event is the same document and is acknowledged too.\n\nimport type { GameStatEvent } from '../doc-schemas/game-stats.js';\nimport type { GameStats } from '../doc-schemas/sport-game.js';\nimport { buildStatVoidId } from '../ids/stat-event-ids.js';\nimport type { StatEventSubmission } from '../schemas/scoring.js';\nimport { STAT_EVENT_RECORDER_FIELD_KEYS, STAT_EVENT_SNAPSHOT_FIELD_KEYS } from '../types/stats.js';\nimport type { RecordedStatEventOutcome, StatEventRefusalCode } from '../types/stats.js';\nimport { foldStatEvent, withGameTeamLines } from './replay.js';\nimport {\n isSportStatEventIn,\n isStatCorrection,\n isStatVoid,\n type StatEventBody,\n type StatEventRoster,\n} from './scoring.js';\nimport type { AnySportAdapter, GameTeamIds } from './sport-adapter.js';\n\n/** The document id a submission is stored at. */\nexport function statEventSubmissionId(submission: StatEventSubmission): string {\n return isStatVoid(submission) ? buildStatVoidId(submission.targetEventId) : submission.eventId;\n}\n\n/**\n * The ids a batch reads before it decides anything: every submission's own id, and every void's\n * target — the driver needs the stored document at each, or knows none is stored. A correction's is\n * never read: the driver refuses one before it looks at the store.\n */\nexport function statEventIdsToRead(submissions: readonly StatEventSubmission[]): string[] {\n const ids = new Set<string>();\n for (const submission of submissions) {\n if (isStatCorrection(submission)) continue;\n ids.add(statEventSubmissionId(submission));\n if (isStatVoid(submission)) ids.add(submission.targetEventId);\n }\n return [...ids];\n}\n\n/** An event the batch stores now: its id, its place in the replay, and every field its caller sent. */\nexport interface AcceptedStatEvent {\n readonly eventId: string;\n readonly sequence: number;\n /** The document's fields but the recorder facts, which the writing core stamps (RULE-STD-ARCH-106). */\n readonly fields: Readonly<Record<string, unknown>>;\n}\n\nexport interface RecordedStatEventResult {\n readonly eventId: string;\n readonly outcome: RecordedStatEventOutcome;\n readonly sequence: number;\n}\n\nexport type StatEventBatchDecision =\n | {\n readonly ok: true;\n /** The rollup after the batch — unchanged when every event was already recorded. */\n readonly stats: GameStats;\n readonly statEventSequence: number;\n /** Each submission's result, in the order sent. */\n readonly results: readonly RecordedStatEventResult[];\n /** The events to create, in sequence order; empty when every event was already recorded. */\n readonly accepted: readonly AcceptedStatEvent[];\n }\n | {\n readonly ok: false;\n readonly code: StatEventRefusalCode;\n /** The first submission refused; nothing of the batch is written. */\n readonly eventId: string;\n };\n\nexport interface StatEventBatch {\n readonly adapter: AnySportAdapter;\n readonly game: GameTeamIds & { readonly stats: GameStats; readonly statEventSequence: number };\n /** The game's teams and the roster entries the batch names that exist. */\n readonly roster: StatEventRoster;\n readonly submissions: readonly StatEventSubmission[];\n /** The stored event at an id `statEventIdsToRead` named, or `undefined` where none is stored. */\n readonly storedEvent: (eventId: string) => GameStatEvent | undefined;\n}\n\n// The fields of a stored event the writing core derives, which a caller's re-send never carries.\nconst DERIVED_FIELDS: ReadonlySet<string> = new Set([\n ...STAT_EVENT_RECORDER_FIELD_KEYS,\n ...STAT_EVENT_SNAPSHOT_FIELD_KEYS,\n]);\n\nfunction callerFields(event: Readonly<Record<string, unknown>>): Record<string, unknown> {\n return Object.fromEntries(\n Object.entries(event).filter(\n ([field, value]) => !DERIVED_FIELDS.has(field) && value !== undefined,\n ),\n );\n}\n\nfunction sameFields(\n left: Readonly<Record<string, unknown>>,\n right: Readonly<Record<string, unknown>>,\n): boolean {\n const leftFields = callerFields(left);\n const rightFields = callerFields(right);\n const keys = Object.keys(leftFields);\n return (\n keys.length === Object.keys(rightFields).length &&\n keys.every((key) => Object.is(leftFields[key], rightFields[key]))\n );\n}\n\n/**\n * Whether a submission is the event already held at its id. A void is the same void when it names\n * the same target; a sport event only when every field its caller supplies is the same.\n */\nfunction isSameEvent(\n submission: StatEventSubmission,\n held: Readonly<Record<string, unknown>>,\n): boolean {\n if (isStatVoid(submission))\n return isStatVoid(held as StatEventBody) && held.targetEventId === submission.targetEventId;\n return sameFields(submission as Readonly<Record<string, unknown>>, held);\n}\n\n/** Whether any counter, or any recorded round, of any line is below zero. */\nfunction holdsNegativeValue(stats: GameStats): boolean {\n const lines = [...Object.values(stats.teamStats), ...Object.values(stats.playerStats)] as Record<\n string,\n unknown\n >[];\n return lines.some((line) =>\n Object.values(line).some((value) =>\n Array.isArray(value)\n ? value.some((slot) => typeof slot === 'number' && slot < 0)\n : typeof value === 'number' && value < 0,\n ),\n );\n}\n\n/** The stored fields of a new event: the void's derived id, or the caller's own id and fields. */\nfunction acceptedFields(\n submission: StatEventSubmission,\n eventId: string,\n sequence: number,\n): Record<string, unknown> {\n return { ...callerFields(submission as Readonly<Record<string, unknown>>), eventId, sequence };\n}\n\n/**\n * Decide one scoring write. Every submission in order, against a running rollup that starts from\n * the stored one with a team line for each of the game's teams:\n *\n * - a correction → refused; only the game-reconcile core appends one;\n * - an id already stored, or earlier in the batch → acknowledged when it is the same event, and\n * refused (`eventIdConflict`) when it is not;\n * - a new sport event → the adapter validates it and applies it, and it takes the next sequence;\n * - a new void → its target, stored or earlier in the batch, must be one of the sport's events; the\n * adapter undoes it, and it takes the next sequence. A void that would leave a stat below zero —\n * the target's field moved down by a later edit — is refused (`undoBelowZero`).\n *\n * The first refusal refuses the whole batch.\n */\nexport function decideStatEventBatch(batch: StatEventBatch): StatEventBatchDecision {\n const { adapter, game, roster, submissions, storedEvent } = batch;\n let stats = withGameTeamLines(adapter, game.stats, game);\n let sequence = game.statEventSequence;\n const results: RecordedStatEventResult[] = [];\n const accepted: AcceptedStatEvent[] = [];\n // Every event the batch has placed so far — stored or new — by id, with the sequence it holds.\n const placed = new Map<\n string,\n { readonly event: Readonly<Record<string, unknown>>; readonly sequence: number }\n >();\n\n for (const submission of submissions) {\n const eventId = statEventSubmissionId(submission);\n const refuse = (code: StatEventRefusalCode): StatEventBatchDecision => ({\n ok: false,\n code,\n eventId,\n });\n\n if (isStatCorrection(submission)) return refuse('correctionNotAccepted');\n\n const held =\n placed.get(eventId) ??\n (() => {\n const stored = storedEvent(eventId);\n return stored === undefined\n ? undefined\n : { event: stored as Readonly<Record<string, unknown>>, sequence: stored.sequence };\n })();\n if (held !== undefined) {\n if (!isSameEvent(submission, held.event)) return refuse('eventIdConflict');\n placed.set(eventId, held);\n results.push({ eventId, outcome: 'alreadyRecorded', sequence: held.sequence });\n continue;\n }\n\n if (isStatVoid(submission)) {\n const target =\n placed.get(submission.targetEventId)?.event ?? storedEvent(submission.targetEventId);\n if (!isSportStatEventIn(adapter.eventTypes, target as StatEventBody | undefined)) {\n return refuse('voidTargetNotSportEvent');\n }\n const next = foldStatEvent(adapter, stats, submission, () => target as StatEventBody);\n if (holdsNegativeValue(next)) return refuse('undoBelowZero');\n stats = next;\n } else {\n const verdict = adapter.validate(stats, submission, roster);\n if (!verdict.ok) return refuse(verdict.code);\n stats = foldStatEvent(adapter, stats, submission, () => undefined);\n }\n\n sequence += 1;\n const fields = acceptedFields(submission, eventId, sequence);\n accepted.push({ eventId, sequence, fields });\n placed.set(eventId, { event: fields, sequence });\n results.push({ eventId, outcome: 'recorded', sequence });\n }\n\n return { ok: true, stats, statEventSequence: sequence, results, accepted };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"store-driver.js","sourceRoot":"","sources":["../../src/sports/store-driver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,GAGX,MAAM,cAAc,CAAC;AAGtB,MAAM,UAAU,qBAAqB,CAAC,UAA+B;IACnE,OAAO,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;AACjG,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,WAA2C;IAC5E,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,IAAI,gBAAgB,CAAC,UAAU,CAAC;YAAE,SAAS;QAC3C,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;QAC3C,IAAI,UAAU,CAAC,UAAU,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AAClB,CAAC;AAoCD,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;IAClD,GAAG,8BAA8B;IACjC,GAAG,8BAA8B;CAClC,CAAC,CAAC;AAEH,SAAS,YAAY,CAAC,KAAwC;IAC5D,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,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AAE,UAAU,EAAE,MAAM,CAAC,CAAC;YAC5D,IAAI,CAAC,OAAO,CAAC,EAAE;gBAAE,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC7C,KAAK,GAAG,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACrE,CAAC;QAED,QAAQ,IAAI,CAAC,CAAC;QACd,MAAM,MAAM,GAAG,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7D,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QAC7C,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC7E,CAAC","sourcesContent":["import type { GameStatEvent } from '../doc-schemas/game-stats.js';\nimport type { GameStats } from '../doc-schemas/sport-game.js';\nimport { buildStatVoidId } from '../ids/stat-event-ids.js';\nimport type { StatEventSubmission } from '../schemas/scoring.js';\nimport { STAT_EVENT_RECORDER_FIELD_KEYS, STAT_EVENT_SNAPSHOT_FIELD_KEYS } from '../types/stats.js';\nimport type { RecordedStatEventOutcome, StatEventRefusalCode } from '../types/stats.js';\nimport { foldStatEvent, withGameTeamLines } from './replay.js';\nimport {\n isSportStatEventIn,\n isStatCorrection,\n isStatVoid,\n type StatEventBody,\n type StatEventRoster,\n} from './scoring.js';\nimport type { AnySportAdapter, GameTeamIds } from './sport-adapter.js';\n\nexport function statEventSubmissionId(submission: StatEventSubmission): string {\n return isStatVoid(submission) ? buildStatVoidId(submission.targetEventId) : submission.eventId;\n}\n\nexport function statEventIdsToRead(submissions: readonly StatEventSubmission[]): string[] {\n const ids = new Set<string>();\n for (const submission of submissions) {\n if (isStatCorrection(submission)) continue;\n ids.add(statEventSubmissionId(submission));\n if (isStatVoid(submission)) ids.add(submission.targetEventId);\n }\n return [...ids];\n}\n\nexport interface AcceptedStatEvent {\n readonly eventId: string;\n readonly sequence: number;\n readonly fields: Readonly<Record<string, unknown>>;\n}\n\nexport interface RecordedStatEventResult {\n readonly eventId: string;\n readonly outcome: RecordedStatEventOutcome;\n readonly sequence: number;\n}\n\nexport type StatEventBatchDecision =\n | {\n readonly ok: true;\n readonly stats: GameStats;\n readonly statEventSequence: number;\n readonly results: readonly RecordedStatEventResult[];\n readonly accepted: readonly AcceptedStatEvent[];\n }\n | {\n readonly ok: false;\n readonly code: StatEventRefusalCode;\n readonly eventId: string;\n };\n\nexport interface StatEventBatch {\n readonly adapter: AnySportAdapter;\n readonly game: GameTeamIds & { readonly stats: GameStats; readonly statEventSequence: number };\n readonly roster: StatEventRoster;\n readonly submissions: readonly StatEventSubmission[];\n readonly storedEvent: (eventId: string) => GameStatEvent | undefined;\n}\n\nconst DERIVED_FIELDS: ReadonlySet<string> = new Set([\n ...STAT_EVENT_RECORDER_FIELD_KEYS,\n ...STAT_EVENT_SNAPSHOT_FIELD_KEYS,\n]);\n\nfunction callerFields(event: Readonly<Record<string, unknown>>): Record<string, unknown> {\n return Object.fromEntries(\n Object.entries(event).filter(\n ([field, value]) => !DERIVED_FIELDS.has(field) && value !== undefined,\n ),\n );\n}\n\nfunction sameFields(\n left: Readonly<Record<string, unknown>>,\n right: Readonly<Record<string, unknown>>,\n): boolean {\n const leftFields = callerFields(left);\n const rightFields = callerFields(right);\n const keys = Object.keys(leftFields);\n return (\n keys.length === Object.keys(rightFields).length &&\n keys.every((key) => Object.is(leftFields[key], rightFields[key]))\n );\n}\n\nfunction isSameEvent(\n submission: StatEventSubmission,\n held: Readonly<Record<string, unknown>>,\n): boolean {\n if (isStatVoid(submission))\n return isStatVoid(held as StatEventBody) && held.targetEventId === submission.targetEventId;\n return sameFields(submission as Readonly<Record<string, unknown>>, held);\n}\n\nfunction holdsNegativeValue(stats: GameStats): boolean {\n const lines = [...Object.values(stats.teamStats), ...Object.values(stats.playerStats)] as Record<\n string,\n unknown\n >[];\n return lines.some((line) =>\n Object.values(line).some((value) =>\n Array.isArray(value)\n ? value.some((slot) => typeof slot === 'number' && slot < 0)\n : typeof value === 'number' && value < 0,\n ),\n );\n}\n\nfunction acceptedFields(\n submission: StatEventSubmission,\n eventId: string,\n sequence: number,\n): Record<string, unknown> {\n return { ...callerFields(submission as Readonly<Record<string, unknown>>), eventId, sequence };\n}\n\nexport function decideStatEventBatch(batch: StatEventBatch): StatEventBatchDecision {\n const { adapter, game, roster, submissions, storedEvent } = batch;\n let stats = withGameTeamLines(adapter, game.stats, game);\n let sequence = game.statEventSequence;\n const results: RecordedStatEventResult[] = [];\n const accepted: AcceptedStatEvent[] = [];\n const placed = new Map<\n string,\n { readonly event: Readonly<Record<string, unknown>>; readonly sequence: number }\n >();\n\n for (const submission of submissions) {\n const eventId = statEventSubmissionId(submission);\n const refuse = (code: StatEventRefusalCode): StatEventBatchDecision => ({\n ok: false,\n code,\n eventId,\n });\n\n if (isStatCorrection(submission)) return refuse('correctionNotAccepted');\n\n const held =\n placed.get(eventId) ??\n (() => {\n const stored = storedEvent(eventId);\n return stored === undefined\n ? undefined\n : { event: stored as Readonly<Record<string, unknown>>, sequence: stored.sequence };\n })();\n if (held !== undefined) {\n if (!isSameEvent(submission, held.event)) return refuse('eventIdConflict');\n placed.set(eventId, held);\n results.push({ eventId, outcome: 'alreadyRecorded', sequence: held.sequence });\n continue;\n }\n\n if (isStatVoid(submission)) {\n const target =\n placed.get(submission.targetEventId)?.event ?? storedEvent(submission.targetEventId);\n if (!isSportStatEventIn(adapter.eventTypes, target as StatEventBody | undefined)) {\n return refuse('voidTargetNotSportEvent');\n }\n const next = foldStatEvent(adapter, stats, submission, () => target as StatEventBody);\n if (holdsNegativeValue(next)) return refuse('undoBelowZero');\n stats = next;\n } else {\n const verdict = adapter.validate(stats, submission, roster);\n if (!verdict.ok) return refuse(verdict.code);\n stats = foldStatEvent(adapter, stats, submission, () => undefined);\n }\n\n sequence += 1;\n const fields = acceptedFields(submission, eventId, sequence);\n accepted.push({ eventId, sequence, fields });\n placed.set(eventId, { event: fields, sequence });\n results.push({ eventId, outcome: 'recorded', sequence });\n }\n\n return { ok: true, stats, statEventSequence: sequence, results, accepted };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,qBAAqB,0xEAyFxB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,gCAAgC,mEAGC,CAAC;AAC/C,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAC;AAExF,eAAO,MAAM,qBAAqB,6EAMxB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,2BAA2B,2CAGM,CAAC;AAC/C,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E,eAAO,MAAM,+BAA+B,6CAIE,CAAC;AAC/C,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtF,eAAO,MAAM,wBAAwB,mDAAoD,CAAC;AAC1F,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,UAAU,GAClB;IAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,sBAAsB,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAC/F;IACE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEN,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,iCAAkC,CAAC;AACjE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/types/audit.js
CHANGED
|
@@ -1,86 +1,54 @@
|
|
|
1
|
-
// The audit vocabulary: the closed event-type union (RULE-STD-BACKEND-202) and how an actor was acting
|
|
2
|
-
// (RULE-STD-BACKEND-205). The document schema is in ../doc-schemas/audit-event.ts.
|
|
3
|
-
//
|
|
4
|
-
// The union is closed: a new sensitive action adds its event types here, in the same change
|
|
5
|
-
// (RULE-STD-BACKEND-202).
|
|
6
1
|
export const AUDIT_EVENT_TYPE_KEYS = [
|
|
7
|
-
// Accounts
|
|
8
2
|
'user.accountRegistered',
|
|
9
3
|
'user.displayNameChanged',
|
|
10
|
-
// The scheduled sweep deleted a sign-in account that never finished registering (no profile)
|
|
11
4
|
'user.abandonedRegistrationDeleted',
|
|
12
|
-
// A successful sign-up or sign-in, and a completed password reset, recorded after the fact from
|
|
13
|
-
// Identity Platform's user-activity log
|
|
14
5
|
'user.signedIn',
|
|
15
6
|
'user.passwordResetCompleted',
|
|
16
|
-
// Account status — an admin banned an account or lifted its ban
|
|
17
7
|
'user.accountBanned',
|
|
18
8
|
'user.accountUnbanned',
|
|
19
|
-
// Global roles — the policy decision (callable) and the claim propagation (trigger)
|
|
20
9
|
'admin.systemRoleGranted',
|
|
21
10
|
'admin.systemRoleRevoked',
|
|
22
11
|
'admin.systemRoleClaimSynced',
|
|
23
|
-
// App configuration — the operational levers on `_appConfig/app`, and the landing page copy
|
|
24
12
|
'appConfig.updated',
|
|
25
13
|
'landingPage.updated',
|
|
26
|
-
// Leagues — created, settings edited, status moved, mode switched
|
|
27
14
|
'league.created',
|
|
28
15
|
'league.updated',
|
|
29
16
|
'league.statusChanged',
|
|
30
17
|
'league.modeSwitched',
|
|
31
|
-
// Waiver templates — created, a new wording published, retired or deleted
|
|
32
18
|
'waiverTemplate.created',
|
|
33
19
|
'waiverTemplate.versionPublished',
|
|
34
20
|
'waiverTemplate.retired',
|
|
35
21
|
'waiverTemplate.deleted',
|
|
36
|
-
// Game locations
|
|
37
22
|
'gameLocation.created',
|
|
38
23
|
'gameLocation.updated',
|
|
39
24
|
'gameLocation.deleted',
|
|
40
|
-
// Pictures — published to a gallery or a slot by the picture processor (attributed to the admin
|
|
41
|
-
// who uploaded it), and ordered, featured, and removed by the admin picture callables
|
|
42
25
|
'picture.added',
|
|
43
26
|
'picture.replaced',
|
|
44
27
|
'picture.moved',
|
|
45
28
|
'picture.featuredChanged',
|
|
46
29
|
'picture.removed',
|
|
47
|
-
// Awards — an award created by its first badge's publication, its badge replaced, the award
|
|
48
|
-
// deleted once nobody holds it, and an award granted to or revoked from one account
|
|
49
30
|
'award.created',
|
|
50
31
|
'award.badgeReplaced',
|
|
51
32
|
'award.deleted',
|
|
52
33
|
'award.granted',
|
|
53
34
|
'award.revoked',
|
|
54
|
-
// Hardware contracts — a loan created for a referee, signed by them, its equipment returned, and a
|
|
55
|
-
// contract never signed deleted
|
|
56
35
|
'hardwareLoanContract.created',
|
|
57
36
|
'hardwareLoanContract.signed',
|
|
58
37
|
'hardwareLoanContract.returned',
|
|
59
38
|
'hardwareLoanContract.deleted',
|
|
60
|
-
// Teams — created with its captain, a ghost player added, a team's failed roster work retried
|
|
61
39
|
'leagueTeam.created',
|
|
62
40
|
'ghostPlayer.created',
|
|
63
41
|
'teamRoster.syncRetried',
|
|
64
|
-
// Team management — a member promoted to co-captain or demoted to player, the captain changed by
|
|
65
|
-
// an admin, the team's name or type edited by an admin, and its contact phone set by an admin
|
|
66
42
|
'teamMembership.roleChanged',
|
|
67
43
|
'leagueTeam.captainChanged',
|
|
68
44
|
'leagueTeam.updated',
|
|
69
45
|
'leagueTeamContact.updated',
|
|
70
|
-
// Exits — a membership removed, a never-played ghost removed, a ghost linked by either link, and a
|
|
71
|
-
// never-played team deleted; each targets what it deleted, which the migration's live
|
|
72
|
-
// verifications read as proof the product removed it
|
|
73
46
|
'teamMembership.removed',
|
|
74
47
|
'ghostPlayer.removed',
|
|
75
48
|
'ghostPlayer.linked',
|
|
76
49
|
'ghostPlayer.closedLeagueLinked',
|
|
77
50
|
'leagueTeam.deleted',
|
|
78
|
-
// A ghost's removal stopped part-way because the ghost came to have played: the games it held are
|
|
79
|
-
// released, and the finished-game entries it had already taken off are named
|
|
80
51
|
'ghostPlayer.removalStopped',
|
|
81
|
-
// Joining a team — an invitation sent, withdrawn, accepted, or declined; a join request sent,
|
|
82
|
-
// withdrawn, accepted, or rejected; a free-agent signup made, withdrawn, or answered by an admin
|
|
83
|
-
// placing the player on a team
|
|
84
52
|
'teamInvitation.created',
|
|
85
53
|
'teamInvitation.cancelled',
|
|
86
54
|
'teamInvitation.accepted',
|
|
@@ -92,73 +60,38 @@ export const AUDIT_EVENT_TYPE_KEYS = [
|
|
|
92
60
|
'leagueFreeAgent.created',
|
|
93
61
|
'leagueFreeAgent.deleted',
|
|
94
62
|
'leagueFreeAgent.assigned',
|
|
95
|
-
// Signed waivers — a legal record, signed by its subject or witnessed for a ghost
|
|
96
63
|
'signedWaiver.created',
|
|
97
|
-
// Schedules — a week created with its games or its shared fields edited; one game added, edited
|
|
98
|
-
// (moved, rescheduled, or its teams replaced), or deleted with its events and roster
|
|
99
64
|
'scheduleWeek.created',
|
|
100
65
|
'scheduleWeek.updated',
|
|
101
66
|
'sportGame.created',
|
|
102
67
|
'sportGame.updated',
|
|
103
68
|
'sportGame.deleted',
|
|
104
|
-
// Live scoring — a scoring write refused its caller's authority (a click writes no success event:
|
|
105
|
-
// the stat event document is its own record), a roster entry marked absent or present, a
|
|
106
|
-
// scorer's note on one person changed, and the jump-ball possession arrow moved
|
|
107
69
|
'sportGame.statEventsRejected',
|
|
108
70
|
'sportGame.absenceChanged',
|
|
109
71
|
'sportGame.memoUpdated',
|
|
110
72
|
'sportGame.jumpBallChanged',
|
|
111
|
-
// Finalizing — a game finalized, its numbers made permanent in every derived destination, and an
|
|
112
|
-
// admin's reopening of a finalized game, which takes them back out
|
|
113
73
|
'sportGame.finalized',
|
|
114
74
|
'sportGame.reopened',
|
|
115
|
-
// Fix stats — a game's numbers corrected (targets, or the stored numbers kept) or restored from
|
|
116
|
-
// its events; a derived aggregate rebuilt; and a person's pre-Q-Sports baseline written
|
|
117
75
|
'sportGame.statsCorrected',
|
|
118
76
|
'sportGame.statsRecalculated',
|
|
119
77
|
'stats.aggregateRecalculated',
|
|
120
78
|
'stats.historicalStatsUpdated',
|
|
121
|
-
// A stats check ran to its end: its scope, its summary, and its counts by kind.
|
|
122
79
|
'stats.validationRun',
|
|
123
|
-
// An admin deleted a stats check's report: its id, scope, summary, and counts by kind.
|
|
124
80
|
'stats.validationReportDeleted',
|
|
125
|
-
// The migration's placement of a recorded stat line no roster entry or play could place: the
|
|
126
|
-
// admin names the team, and the game's copy places the line there
|
|
127
81
|
'stats.unrosteredStatLineResolved',
|
|
128
|
-
// Admin notifications — a shared card archived, which takes it off every admin's list; and an
|
|
129
|
-
// admin's archive-all decision, recorded once when the job is written, with the request's origin
|
|
130
82
|
'adminNotification.archived',
|
|
131
83
|
'adminNotification.archiveAllRequested',
|
|
132
|
-
// An operator's manual intervention in a durable pipeline — a dead-lettered row put back to work,
|
|
133
|
-
// or a refused attempt at one — with the reason the operator gave
|
|
134
84
|
'system.manualIntervention',
|
|
135
|
-
// The migration console — one page of a cutover action run, with what it read, wrote, and found;
|
|
136
|
-
// the documents an action core wrote and removed, committed in the same batch or transaction as
|
|
137
|
-
// those writes (its action id, operation id, and document ids only — RULE-STD-BACKEND-203); a product
|
|
138
|
-
// control's run recorded once its evidence checked; an operator checkpoint recorded with its
|
|
139
|
-
// evidence; and the cutover, after which the product owns every destination
|
|
140
85
|
'migrationAction.pageRun',
|
|
141
86
|
'migrationAction.writesCommitted',
|
|
142
87
|
'migrationAction.controlRecorded',
|
|
143
88
|
'migrationAction.checkpointRecorded',
|
|
144
89
|
'migrationConsole.cutoverRecorded',
|
|
145
90
|
];
|
|
146
|
-
// The two ways a ghost is linked to an account — the normal link and the closed-league link — each
|
|
147
|
-
// committing its own event over the one artifact-moving core.
|
|
148
91
|
export const GHOST_LINK_AUDIT_EVENT_TYPE_KEYS = [
|
|
149
92
|
'ghostPlayer.linked',
|
|
150
93
|
'ghostPlayer.closedLeagueLinked',
|
|
151
94
|
];
|
|
152
|
-
// How the actor was acting for the write — never merely which authorities they happen to hold. It is
|
|
153
|
-
// orthogonal to the event type: one event type is produced under several modes, and the mode is what
|
|
154
|
-
// tells an ordinary action from an admin override.
|
|
155
|
-
// user a signed-in account acting on its own behalf
|
|
156
|
-
// teammateUser a member acting inside a team they belong to: a captain or co-captain acting
|
|
157
|
-
// through their membership, for the team or a player on it
|
|
158
|
-
// adminReview an admin or referee doing admin work that no team permission covers
|
|
159
|
-
// adminOverride an admin or referee acting through their role on a team-scoped action no
|
|
160
|
-
// membership of theirs admits
|
|
161
|
-
// system backend automation with no human caller
|
|
162
95
|
export const AUDIT_ACTOR_MODE_KEYS = [
|
|
163
96
|
'user',
|
|
164
97
|
'teammateUser',
|
package/dist/types/audit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,mFAAmF;AACnF,EAAE;AACF,4FAA4F;AAC5F,0BAA0B;AAK1B,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,WAAW;IACX,wBAAwB;IACxB,yBAAyB;IACzB,6FAA6F;IAC7F,mCAAmC;IACnC,gGAAgG;IAChG,wCAAwC;IACxC,eAAe;IACf,6BAA6B;IAC7B,gEAAgE;IAChE,oBAAoB;IACpB,sBAAsB;IACtB,oFAAoF;IACpF,yBAAyB;IACzB,yBAAyB;IACzB,6BAA6B;IAC7B,4FAA4F;IAC5F,mBAAmB;IACnB,qBAAqB;IACrB,kEAAkE;IAClE,gBAAgB;IAChB,gBAAgB;IAChB,sBAAsB;IACtB,qBAAqB;IACrB,0EAA0E;IAC1E,wBAAwB;IACxB,iCAAiC;IACjC,wBAAwB;IACxB,wBAAwB;IACxB,iBAAiB;IACjB,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,gGAAgG;IAChG,sFAAsF;IACtF,eAAe;IACf,kBAAkB;IAClB,eAAe;IACf,yBAAyB;IACzB,iBAAiB;IACjB,4FAA4F;IAC5F,oFAAoF;IACpF,eAAe;IACf,qBAAqB;IACrB,eAAe;IACf,eAAe;IACf,eAAe;IACf,mGAAmG;IACnG,gCAAgC;IAChC,8BAA8B;IAC9B,6BAA6B;IAC7B,+BAA+B;IAC/B,8BAA8B;IAC9B,8FAA8F;IAC9F,oBAAoB;IACpB,qBAAqB;IACrB,wBAAwB;IACxB,iGAAiG;IACjG,8FAA8F;IAC9F,4BAA4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gC,GAAG;IAC9C,oBAAoB;IACpB,gCAAgC;CACY,CAAC;AAG/C,qGAAqG;AACrG,qGAAqG;AACrG,mDAAmD;AACnD,+DAA+D;AAC/D,+FAA+F;AAC/F,2EAA2E;AAC3E,sFAAsF;AACtF,2FAA2F;AAC3F,8CAA8C;AAC9C,0DAA0D;AAC1D,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM;IACN,cAAc;IACd,aAAa;IACb,eAAe;IACf,QAAQ;CACA,CAAC;AAGX,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,aAAa;IACb,eAAe;CAC6B,CAAC;AAG/C,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,MAAM;IACN,cAAc;IACd,QAAQ;CACoC,CAAC;AAG/C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,WAAW,CAAU,CAAC;AAyB1F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,SAAS,CAAU,CAAC","sourcesContent":["// The audit vocabulary: the closed event-type union (RULE-STD-BACKEND-202) and how an actor was acting\n// (RULE-STD-BACKEND-205). The document schema is in ../doc-schemas/audit-event.ts.\n//\n// The union is closed: a new sensitive action adds its event types here, in the same change\n// (RULE-STD-BACKEND-202).\n\nimport type { SystemRole } from './unions.js';\nimport { CAPTAIN_TEAM_ROLES } from './unions.js';\n\nexport const AUDIT_EVENT_TYPE_KEYS = [\n // Accounts\n 'user.accountRegistered',\n 'user.displayNameChanged',\n // The scheduled sweep deleted a sign-in account that never finished registering (no profile)\n 'user.abandonedRegistrationDeleted',\n // A successful sign-up or sign-in, and a completed password reset, recorded after the fact from\n // Identity Platform's user-activity log\n 'user.signedIn',\n 'user.passwordResetCompleted',\n // Account status — an admin banned an account or lifted its ban\n 'user.accountBanned',\n 'user.accountUnbanned',\n // Global roles — the policy decision (callable) and the claim propagation (trigger)\n 'admin.systemRoleGranted',\n 'admin.systemRoleRevoked',\n 'admin.systemRoleClaimSynced',\n // App configuration — the operational levers on `_appConfig/app`, and the landing page copy\n 'appConfig.updated',\n 'landingPage.updated',\n // Leagues — created, settings edited, status moved, mode switched\n 'league.created',\n 'league.updated',\n 'league.statusChanged',\n 'league.modeSwitched',\n // Waiver templates — created, a new wording published, retired or deleted\n 'waiverTemplate.created',\n 'waiverTemplate.versionPublished',\n 'waiverTemplate.retired',\n 'waiverTemplate.deleted',\n // Game locations\n 'gameLocation.created',\n 'gameLocation.updated',\n 'gameLocation.deleted',\n // Pictures — published to a gallery or a slot by the picture processor (attributed to the admin\n // who uploaded it), and ordered, featured, and removed by the admin picture callables\n 'picture.added',\n 'picture.replaced',\n 'picture.moved',\n 'picture.featuredChanged',\n 'picture.removed',\n // Awards — an award created by its first badge's publication, its badge replaced, the award\n // deleted once nobody holds it, and an award granted to or revoked from one account\n 'award.created',\n 'award.badgeReplaced',\n 'award.deleted',\n 'award.granted',\n 'award.revoked',\n // Hardware contracts — a loan created for a referee, signed by them, its equipment returned, and a\n // contract never signed deleted\n 'hardwareLoanContract.created',\n 'hardwareLoanContract.signed',\n 'hardwareLoanContract.returned',\n 'hardwareLoanContract.deleted',\n // Teams — created with its captain, a ghost player added, a team's failed roster work retried\n 'leagueTeam.created',\n 'ghostPlayer.created',\n 'teamRoster.syncRetried',\n // Team management — a member promoted to co-captain or demoted to player, the captain changed by\n // an admin, the team's name or type edited by an admin, and its contact phone set by an admin\n 'teamMembership.roleChanged',\n 'leagueTeam.captainChanged',\n 'leagueTeam.updated',\n 'leagueTeamContact.updated',\n // Exits — a membership removed, a never-played ghost removed, a ghost linked by either link, and a\n // never-played team deleted; each targets what it deleted, which the migration's live\n // verifications read as proof the product removed it\n 'teamMembership.removed',\n 'ghostPlayer.removed',\n 'ghostPlayer.linked',\n 'ghostPlayer.closedLeagueLinked',\n 'leagueTeam.deleted',\n // A ghost's removal stopped part-way because the ghost came to have played: the games it held are\n // released, and the finished-game entries it had already taken off are named\n 'ghostPlayer.removalStopped',\n // Joining a team — an invitation sent, withdrawn, accepted, or declined; a join request sent,\n // withdrawn, accepted, or rejected; a free-agent signup made, withdrawn, or answered by an admin\n // placing the player on a team\n 'teamInvitation.created',\n 'teamInvitation.cancelled',\n 'teamInvitation.accepted',\n 'teamInvitation.rejected',\n 'teamJoinRequest.created',\n 'teamJoinRequest.cancelled',\n 'teamJoinRequest.accepted',\n 'teamJoinRequest.rejected',\n 'leagueFreeAgent.created',\n 'leagueFreeAgent.deleted',\n 'leagueFreeAgent.assigned',\n // Signed waivers — a legal record, signed by its subject or witnessed for a ghost\n 'signedWaiver.created',\n // Schedules — a week created with its games or its shared fields edited; one game added, edited\n // (moved, rescheduled, or its teams replaced), or deleted with its events and roster\n 'scheduleWeek.created',\n 'scheduleWeek.updated',\n 'sportGame.created',\n 'sportGame.updated',\n 'sportGame.deleted',\n // Live scoring — a scoring write refused its caller's authority (a click writes no success event:\n // the stat event document is its own record), a roster entry marked absent or present, a\n // scorer's note on one person changed, and the jump-ball possession arrow moved\n 'sportGame.statEventsRejected',\n 'sportGame.absenceChanged',\n 'sportGame.memoUpdated',\n 'sportGame.jumpBallChanged',\n // Finalizing — a game finalized, its numbers made permanent in every derived destination, and an\n // admin's reopening of a finalized game, which takes them back out\n 'sportGame.finalized',\n 'sportGame.reopened',\n // Fix stats — a game's numbers corrected (targets, or the stored numbers kept) or restored from\n // its events; a derived aggregate rebuilt; and a person's pre-Q-Sports baseline written\n 'sportGame.statsCorrected',\n 'sportGame.statsRecalculated',\n 'stats.aggregateRecalculated',\n 'stats.historicalStatsUpdated',\n // A stats check ran to its end: its scope, its summary, and its counts by kind.\n 'stats.validationRun',\n // An admin deleted a stats check's report: its id, scope, summary, and counts by kind.\n 'stats.validationReportDeleted',\n // The migration's placement of a recorded stat line no roster entry or play could place: the\n // admin names the team, and the game's copy places the line there\n 'stats.unrosteredStatLineResolved',\n // Admin notifications — a shared card archived, which takes it off every admin's list; and an\n // admin's archive-all decision, recorded once when the job is written, with the request's origin\n 'adminNotification.archived',\n 'adminNotification.archiveAllRequested',\n // An operator's manual intervention in a durable pipeline — a dead-lettered row put back to work,\n // or a refused attempt at one — with the reason the operator gave\n 'system.manualIntervention',\n // The migration console — one page of a cutover action run, with what it read, wrote, and found;\n // the documents an action core wrote and removed, committed in the same batch or transaction as\n // those writes (its action id, operation id, and document ids only — RULE-STD-BACKEND-203); a product\n // control's run recorded once its evidence checked; an operator checkpoint recorded with its\n // evidence; and the cutover, after which the product owns every destination\n 'migrationAction.pageRun',\n 'migrationAction.writesCommitted',\n 'migrationAction.controlRecorded',\n 'migrationAction.checkpointRecorded',\n 'migrationConsole.cutoverRecorded',\n] as const;\nexport type AuditEventType = (typeof AUDIT_EVENT_TYPE_KEYS)[number];\n\n// The two ways a ghost is linked to an account — the normal link and the closed-league link — each\n// committing its own event over the one artifact-moving core.\nexport const GHOST_LINK_AUDIT_EVENT_TYPE_KEYS = [\n 'ghostPlayer.linked',\n 'ghostPlayer.closedLeagueLinked',\n] as const satisfies readonly AuditEventType[];\nexport type GhostLinkAuditEventType = (typeof GHOST_LINK_AUDIT_EVENT_TYPE_KEYS)[number];\n\n// How the actor was acting for the write — never merely which authorities they happen to hold. It is\n// orthogonal to the event type: one event type is produced under several modes, and the mode is what\n// tells an ordinary action from an admin override.\n// user a signed-in account acting on its own behalf\n// teammateUser a member acting inside a team they belong to: a captain or co-captain acting\n// through their membership, for the team or a player on it\n// adminReview an admin or referee doing admin work that no team permission covers\n// adminOverride an admin or referee acting through their role on a team-scoped action no\n// membership of theirs admits\n// system backend automation with no human caller\nexport const AUDIT_ACTOR_MODE_KEYS = [\n 'user',\n 'teammateUser',\n 'adminReview',\n 'adminOverride',\n 'system',\n] as const;\nexport type AuditActorMode = (typeof AUDIT_ACTOR_MODE_KEYS)[number];\n\nexport const AUDIT_ADMIN_ACTOR_MODE_KEYS = [\n 'adminReview',\n 'adminOverride',\n] as const satisfies readonly AuditActorMode[];\nexport type AuditAdminActorMode = (typeof AUDIT_ADMIN_ACTOR_MODE_KEYS)[number];\n\nexport const AUDIT_NON_ADMIN_ACTOR_MODE_KEYS = [\n 'user',\n 'teammateUser',\n 'system',\n] as const satisfies readonly AuditActorMode[];\nexport type AuditNonAdminActorMode = (typeof AUDIT_NON_ADMIN_ACTOR_MODE_KEYS)[number];\n\nexport const AUDIT_SYSTEM_REASON_KEYS = ['trigger', 'scheduledJob', 'migration'] as const;\nexport type AuditSystemReason = (typeof AUDIT_SYSTEM_REASON_KEYS)[number];\n\nexport type CaptainTeamRole = (typeof CAPTAIN_TEAM_ROLES)[number];\n\n// `isAdmin` is metadata only: it records that the caller's token carried a global-role claim (admin\n// or referee) when they acted, and grants nothing. `systemRole` is required on the admin modes and\n// forbidden on the others, so an admin action is never recorded without the authority it used and a\n// non-admin action never carries one.\nexport type AuditActor =\n | { uid: string | null; isAdmin: boolean; actorMode: AuditNonAdminActorMode; systemRole?: never }\n | {\n uid: string | null;\n isAdmin: boolean;\n actorMode: AuditAdminActorMode;\n systemRole: SystemRole;\n };\n\nexport interface AuditTarget {\n // The user the action was performed on, when there is one.\n uid: string | null;\n // The slash path of the document the action changed, when there is one.\n ref: string | null;\n}\n\nexport const AUDIT_RESULT_KEYS = ['success', 'failure'] as const;\nexport type AuditResult = (typeof AUDIT_RESULT_KEYS)[number];\n"]}
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,wBAAwB;IACxB,yBAAyB;IACzB,mCAAmC;IACnC,eAAe;IACf,6BAA6B;IAC7B,oBAAoB;IACpB,sBAAsB;IACtB,yBAAyB;IACzB,yBAAyB;IACzB,6BAA6B;IAC7B,mBAAmB;IACnB,qBAAqB;IACrB,gBAAgB;IAChB,gBAAgB;IAChB,sBAAsB;IACtB,qBAAqB;IACrB,wBAAwB;IACxB,iCAAiC;IACjC,wBAAwB;IACxB,wBAAwB;IACxB,sBAAsB;IACtB,sBAAsB;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;AAG/C,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,MAAM;IACN,cAAc;IACd,QAAQ;CACoC,CAAC;AAG/C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,WAAW,CAAU,CAAC;AAmB1F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,SAAS,CAAU,CAAC","sourcesContent":["import type { SystemRole } from './unions.js';\nimport { CAPTAIN_TEAM_ROLES } from './unions.js';\n\nexport const AUDIT_EVENT_TYPE_KEYS = [\n 'user.accountRegistered',\n 'user.displayNameChanged',\n 'user.abandonedRegistrationDeleted',\n 'user.signedIn',\n 'user.passwordResetCompleted',\n 'user.accountBanned',\n 'user.accountUnbanned',\n 'admin.systemRoleGranted',\n 'admin.systemRoleRevoked',\n 'admin.systemRoleClaimSynced',\n 'appConfig.updated',\n 'landingPage.updated',\n 'league.created',\n 'league.updated',\n 'league.statusChanged',\n 'league.modeSwitched',\n 'waiverTemplate.created',\n 'waiverTemplate.versionPublished',\n 'waiverTemplate.retired',\n 'waiverTemplate.deleted',\n 'gameLocation.created',\n 'gameLocation.updated',\n 'gameLocation.deleted',\n 'picture.added',\n 'picture.replaced',\n 'picture.moved',\n 'picture.featuredChanged',\n 'picture.removed',\n 'award.created',\n 'award.badgeReplaced',\n 'award.deleted',\n 'award.granted',\n 'award.revoked',\n 'hardwareLoanContract.created',\n 'hardwareLoanContract.signed',\n 'hardwareLoanContract.returned',\n 'hardwareLoanContract.deleted',\n 'leagueTeam.created',\n 'ghostPlayer.created',\n 'teamRoster.syncRetried',\n 'teamMembership.roleChanged',\n 'leagueTeam.captainChanged',\n 'leagueTeam.updated',\n 'leagueTeamContact.updated',\n 'teamMembership.removed',\n 'ghostPlayer.removed',\n 'ghostPlayer.linked',\n 'ghostPlayer.closedLeagueLinked',\n 'leagueTeam.deleted',\n 'ghostPlayer.removalStopped',\n 'teamInvitation.created',\n 'teamInvitation.cancelled',\n 'teamInvitation.accepted',\n 'teamInvitation.rejected',\n 'teamJoinRequest.created',\n 'teamJoinRequest.cancelled',\n 'teamJoinRequest.accepted',\n 'teamJoinRequest.rejected',\n 'leagueFreeAgent.created',\n 'leagueFreeAgent.deleted',\n 'leagueFreeAgent.assigned',\n 'signedWaiver.created',\n 'scheduleWeek.created',\n 'scheduleWeek.updated',\n 'sportGame.created',\n 'sportGame.updated',\n 'sportGame.deleted',\n 'sportGame.statEventsRejected',\n 'sportGame.absenceChanged',\n 'sportGame.memoUpdated',\n 'sportGame.jumpBallChanged',\n 'sportGame.finalized',\n 'sportGame.reopened',\n 'sportGame.statsCorrected',\n 'sportGame.statsRecalculated',\n 'stats.aggregateRecalculated',\n 'stats.historicalStatsUpdated',\n 'stats.validationRun',\n 'stats.validationReportDeleted',\n 'stats.unrosteredStatLineResolved',\n 'adminNotification.archived',\n 'adminNotification.archiveAllRequested',\n 'system.manualIntervention',\n 'migrationAction.pageRun',\n 'migrationAction.writesCommitted',\n 'migrationAction.controlRecorded',\n 'migrationAction.checkpointRecorded',\n 'migrationConsole.cutoverRecorded',\n] as const;\nexport type AuditEventType = (typeof AUDIT_EVENT_TYPE_KEYS)[number];\n\nexport const GHOST_LINK_AUDIT_EVENT_TYPE_KEYS = [\n 'ghostPlayer.linked',\n 'ghostPlayer.closedLeagueLinked',\n] as const satisfies readonly AuditEventType[];\nexport type GhostLinkAuditEventType = (typeof GHOST_LINK_AUDIT_EVENT_TYPE_KEYS)[number];\n\nexport const AUDIT_ACTOR_MODE_KEYS = [\n 'user',\n 'teammateUser',\n 'adminReview',\n 'adminOverride',\n 'system',\n] as const;\nexport type AuditActorMode = (typeof AUDIT_ACTOR_MODE_KEYS)[number];\n\nexport const AUDIT_ADMIN_ACTOR_MODE_KEYS = [\n 'adminReview',\n 'adminOverride',\n] as const satisfies readonly AuditActorMode[];\nexport type AuditAdminActorMode = (typeof AUDIT_ADMIN_ACTOR_MODE_KEYS)[number];\n\nexport const AUDIT_NON_ADMIN_ACTOR_MODE_KEYS = [\n 'user',\n 'teammateUser',\n 'system',\n] as const satisfies readonly AuditActorMode[];\nexport type AuditNonAdminActorMode = (typeof AUDIT_NON_ADMIN_ACTOR_MODE_KEYS)[number];\n\nexport const AUDIT_SYSTEM_REASON_KEYS = ['trigger', 'scheduledJob', 'migration'] as const;\nexport type AuditSystemReason = (typeof AUDIT_SYSTEM_REASON_KEYS)[number];\n\nexport type CaptainTeamRole = (typeof CAPTAIN_TEAM_ROLES)[number];\n\nexport type AuditActor =\n | { uid: string | null; isAdmin: boolean; actorMode: AuditNonAdminActorMode; systemRole?: never }\n | {\n uid: string | null;\n isAdmin: boolean;\n actorMode: AuditAdminActorMode;\n systemRole: SystemRole;\n };\n\nexport interface AuditTarget {\n uid: string | null;\n ref: string | null;\n}\n\nexport const AUDIT_RESULT_KEYS = ['success', 'failure'] as const;\nexport type AuditResult = (typeof AUDIT_RESULT_KEYS)[number];\n"]}
|
package/dist/types/claims.d.ts
CHANGED
|
@@ -4,11 +4,6 @@ export declare const SYSTEM_ROLE_CLAIM_KEYS: {
|
|
|
4
4
|
readonly referee: "isReferee";
|
|
5
5
|
};
|
|
6
6
|
export declare const USER_STATUS_CLAIM_KEY = "status";
|
|
7
|
-
/**
|
|
8
|
-
* V1's role claim names. Nothing reads them: the roster's claim writer removes them whenever it
|
|
9
|
-
* stamps an account, so the cutover's roster copy re-stamps every live holder under
|
|
10
|
-
* `SYSTEM_ROLE_CLAIM_KEYS` (RULE-STD-ENG-011).
|
|
11
|
-
*/
|
|
12
7
|
export declare const RETIRED_SYSTEM_ROLE_CLAIM_KEYS: {
|
|
13
8
|
readonly admin: "admin";
|
|
14
9
|
readonly referee: "referee";
|
|
@@ -19,10 +14,5 @@ export interface QSportsClaims {
|
|
|
19
14
|
userStatus: UserStatus;
|
|
20
15
|
}
|
|
21
16
|
export declare const DEFAULT_Q_SPORTS_CLAIMS: QSportsClaims;
|
|
22
|
-
/**
|
|
23
|
-
* Parse a raw ID-token claims object into the typed contract. A role is held only on an exact
|
|
24
|
-
* `true`. An absent status claim reads as `active`: the claim only speeds up refusing a banned
|
|
25
|
-
* account, and the server's profile check — which fails closed — is the authority.
|
|
26
|
-
*/
|
|
27
17
|
export declare function parseQSportsClaims(raw: Record<string, unknown>): QSportsClaims;
|
|
28
18
|
//# sourceMappingURL=claims.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../src/types/claims.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../src/types/claims.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,aAAa,CAAC;AAE1D,eAAO,MAAM,sBAAsB;;;CAGY,CAAC;AAEhD,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C,eAAO,MAAM,8BAA8B;;;CAGI,CAAC;AAEhD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB,EAAE,aAIrC,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,aAAa,CAM9E"}
|
package/dist/types/claims.js
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
// The custom-claim contract — the one declaration both roots parse the ID token against.
|
|
2
|
-
//
|
|
3
|
-
// `isAdmin` and `isReferee` mirror the `_systemData/adminList` rosters; the `status` claim mirrors the
|
|
4
|
-
// profile's account status so rules and an open client can refuse a banned account that still
|
|
5
|
-
// holds a live token. A claim is a fast hint: a state-changing callable re-reads the roster
|
|
6
|
-
// (RULE-STD-BACKEND-004). Team roles are never claims — they resolve from `teamMemberships` per request.
|
|
7
1
|
export const SYSTEM_ROLE_CLAIM_KEYS = {
|
|
8
2
|
admin: 'isAdmin',
|
|
9
3
|
referee: 'isReferee',
|
|
10
4
|
};
|
|
11
5
|
export const USER_STATUS_CLAIM_KEY = 'status';
|
|
12
|
-
/**
|
|
13
|
-
* V1's role claim names. Nothing reads them: the roster's claim writer removes them whenever it
|
|
14
|
-
* stamps an account, so the cutover's roster copy re-stamps every live holder under
|
|
15
|
-
* `SYSTEM_ROLE_CLAIM_KEYS` (RULE-STD-ENG-011).
|
|
16
|
-
*/
|
|
17
6
|
export const RETIRED_SYSTEM_ROLE_CLAIM_KEYS = {
|
|
18
7
|
admin: 'admin',
|
|
19
8
|
referee: 'referee',
|
|
@@ -23,11 +12,6 @@ export const DEFAULT_Q_SPORTS_CLAIMS = {
|
|
|
23
12
|
isReferee: false,
|
|
24
13
|
userStatus: 'active',
|
|
25
14
|
};
|
|
26
|
-
/**
|
|
27
|
-
* Parse a raw ID-token claims object into the typed contract. A role is held only on an exact
|
|
28
|
-
* `true`. An absent status claim reads as `active`: the claim only speeds up refusing a banned
|
|
29
|
-
* account, and the server's profile check — which fails closed — is the authority.
|
|
30
|
-
*/
|
|
31
15
|
export function parseQSportsClaims(raw) {
|
|
32
16
|
return {
|
|
33
17
|
isAdmin: raw[SYSTEM_ROLE_CLAIM_KEYS.admin] === true,
|
package/dist/types/claims.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claims.js","sourceRoot":"","sources":["../../src/types/claims.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"claims.js","sourceRoot":"","sources":["../../src/types/claims.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,WAAW;CACyB,CAAC;AAEhD,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AAE9C,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;CAC2B,CAAC;AAQhD,MAAM,CAAC,MAAM,uBAAuB,GAAkB;IACpD,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,QAAQ;CACrB,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,GAA4B;IAC7D,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,sBAAsB,CAAC,KAAK,CAAC,KAAK,IAAI;QACnD,SAAS,EAAE,GAAG,CAAC,sBAAsB,CAAC,OAAO,CAAC,KAAK,IAAI;QACvD,UAAU,EAAE,GAAG,CAAC,qBAAqB,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;KAC1E,CAAC;AACJ,CAAC","sourcesContent":["import type { SystemRole, UserStatus } from './unions.js';\n\nexport const SYSTEM_ROLE_CLAIM_KEYS = {\n admin: 'isAdmin',\n referee: 'isReferee',\n} as const satisfies Record<SystemRole, string>;\n\nexport const USER_STATUS_CLAIM_KEY = 'status';\n\nexport const RETIRED_SYSTEM_ROLE_CLAIM_KEYS = {\n admin: 'admin',\n referee: 'referee',\n} as const satisfies Record<SystemRole, string>;\n\nexport interface QSportsClaims {\n isAdmin: boolean;\n isReferee: boolean;\n userStatus: UserStatus;\n}\n\nexport const DEFAULT_Q_SPORTS_CLAIMS: QSportsClaims = {\n isAdmin: false,\n isReferee: false,\n userStatus: 'active',\n};\n\nexport function parseQSportsClaims(raw: Record<string, unknown>): QSportsClaims {\n return {\n isAdmin: raw[SYSTEM_ROLE_CLAIM_KEYS.admin] === true,\n isReferee: raw[SYSTEM_ROLE_CLAIM_KEYS.referee] === true,\n userStatus: raw[USER_STATUS_CLAIM_KEY] === 'banned' ? 'banned' : 'active',\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/types/notifications.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/types/notifications.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,0BAA0B,oBAAqB,CAAC;AAC7D,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/E,eAAO,MAAM,2BAA2B,SAAkD,CAAC;AAE3F,eAAO,MAAM,kCAAkC,WAAW,CAAC;AAE3D,eAAO,MAAM,4BAA4B,2DAG/B,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AAIlF,eAAO,MAAM,gCAAgC,8DAK3C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1F,eAAO,MAAM,sCAAsC,kCAEjD,CAAC;AAIH,eAAO,MAAM,uCAAuC,wDAEF,CAAC;AACnD,MAAM,MAAM,gCAAgC,GAC1C,CAAC,OAAO,uCAAuC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,eAAO,MAAM,qCAAqC,IAAI,CAAC;AAEvD,eAAO,MAAM,uCAAuC,8DAEI,CAAC;AACzD,MAAM,MAAM,8BAA8B,GACxC,CAAC,OAAO,uCAAuC,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,48 +1,30 @@
|
|
|
1
|
-
// The
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
// declared here is Q-Sports' side of it — the category, the notification types, and the states the
|
|
5
|
-
// ledger and the archive-all jobs move through.
|
|
6
|
-
// The package exports these vocabularies as types only, so each is restated here as a tuple the doc
|
|
7
|
-
// schemas build their enums from. `everyMember<Union>()` accepts a tuple only when it names every
|
|
8
|
-
// member of `Union` and nothing else, so a vocabulary the package grows or renames fails to compile
|
|
9
|
-
// here instead of failing a row's parse in production.
|
|
1
|
+
// The package exports these vocabularies as types only, so each is restated here as a tuple;
|
|
2
|
+
// `everyMember<Union>()` makes a tuple that misses or adds a member fail to compile here instead of
|
|
3
|
+
// failing a row's parse in production.
|
|
10
4
|
function everyMember() {
|
|
11
5
|
return (keys) => keys;
|
|
12
6
|
}
|
|
13
|
-
// The one notification category. It is shared, so a card has no recipient.
|
|
14
7
|
export const NOTIFICATION_CATEGORY_KEYS = ['admin'];
|
|
15
8
|
export const ADMIN_NOTIFICATION_CATEGORY = 'admin';
|
|
16
|
-
// The audience scope notification-core records on an archived shared card, and hashes into a shared
|
|
17
|
-
// card's id in place of a recipient.
|
|
18
9
|
export const SHARED_NOTIFICATION_AUDIENCE_SCOPE = 'shared';
|
|
19
|
-
// What an admin is notified of: a team joining a league, and a player signing up as a free agent.
|
|
20
10
|
export const ADMIN_NOTIFICATION_TYPE_KEYS = [
|
|
21
11
|
'leagueTeamCreated',
|
|
22
12
|
'leagueFreeAgentSignedUp',
|
|
23
13
|
];
|
|
24
|
-
// A
|
|
25
|
-
//
|
|
26
|
-
// reaches it, but the state is the package's and a row is read against all of them.
|
|
14
|
+
// A Q-Sports row names no recipient, so it never reaches `skipped`, but the state is the package's
|
|
15
|
+
// and a row is read against all of them.
|
|
27
16
|
export const NOTIFICATION_DELIVERY_STATE_KEYS = everyMember()([
|
|
28
17
|
'queued',
|
|
29
18
|
'materialized',
|
|
30
19
|
'skipped',
|
|
31
20
|
'deadLetter',
|
|
32
21
|
]);
|
|
33
|
-
// Why notification-core turned a row `skipped`.
|
|
34
22
|
export const NOTIFICATION_DELIVERY_SKIP_REASON_KEYS = everyMember()([
|
|
35
23
|
'recipientIneligible',
|
|
36
24
|
]);
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
// `retry`, which notification-core moves a row into after a failed attempt. notification-core's
|
|
40
|
-
// fourth lane, `fanoutOrphan`, holds rows of an audience fanout, which Q-Sports does not run, so it is
|
|
41
|
-
// the one lane left out.
|
|
25
|
+
// notification-core's `fanoutOrphan` lane holds rows of an audience fanout, which Q-Sports does not
|
|
26
|
+
// run, so it is the one lane left out.
|
|
42
27
|
export const NOTIFICATION_MATERIALIZATION_CLASS_KEYS = everyMember()(['directQueued', 'realtimeFallback', 'retry']);
|
|
43
|
-
// The shape of the occurrence payload every delivery row carries. A change to it is a new version,
|
|
44
|
-
// so a row written under the old one is still read as what it is.
|
|
45
28
|
export const NOTIFICATION_DELIVERY_PAYLOAD_VERSION = 1;
|
|
46
|
-
// An archive-all job's state, which the status read hands the client's poller unchanged.
|
|
47
29
|
export const NOTIFICATION_ARCHIVE_ALL_JOB_STATE_KEYS = everyMember()(['in-progress', 'complete', 'incomplete', 'failed']);
|
|
48
30
|
//# sourceMappingURL=notifications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/types/notifications.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/types/notifications.ts"],"names":[],"mappings":"AAOA,6FAA6F;AAC7F,oGAAoG;AACpG,uCAAuC;AACvC,SAAS,WAAW;IAClB,OAAO,CACL,IAGgD,EAC1C,EAAE,CAAC,IAAI,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,OAAO,CAAU,CAAC;AAE7D,MAAM,CAAC,MAAM,2BAA2B,GAAG,OAA+C,CAAC;AAE3F,MAAM,CAAC,MAAM,kCAAkC,GAAG,QAAQ,CAAC;AAE3D,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,mBAAmB;IACnB,yBAAyB;CACjB,CAAC;AAGX,mGAAmG;AACnG,yCAAyC;AACzC,MAAM,CAAC,MAAM,gCAAgC,GAAG,WAAW,EAAiB,CAAC;IAC3E,QAAQ;IACR,cAAc;IACd,SAAS;IACT,YAAY;CACb,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,sCAAsC,GAAG,WAAW,EAAsB,CAAC;IACtF,qBAAqB;CACtB,CAAC,CAAC;AAEH,oGAAoG;AACpG,uCAAuC;AACvC,MAAM,CAAC,MAAM,uCAAuC,GAAG,WAAW,EAE/D,CAAC,CAAC,cAAc,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC,CAAC;AAInD,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,uCAAuC,GAAG,WAAW,EAE/D,CAAC,CAAC,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC","sourcesContent":["import type { ArchiveAllJobSnapshot } from '@ttt-productions/notification-core';\nimport type {\n DeliverySkipReason,\n DeliveryState,\n MaterializationClass,\n} from '@ttt-productions/notification-core/server';\n\n// The package exports these vocabularies as types only, so each is restated here as a tuple;\n// `everyMember<Union>()` makes a tuple that misses or adds a member fail to compile here instead of\n// failing a row's parse in production.\nfunction everyMember<Union extends string>() {\n return <const Keys extends readonly Union[]>(\n keys: Keys &\n ([Exclude<Union, Keys[number]>] extends [never]\n ? unknown\n : { missing: Exclude<Union, Keys[number]> }),\n ): Keys => keys;\n}\n\nexport const NOTIFICATION_CATEGORY_KEYS = ['admin'] as const;\nexport type NotificationCategory = (typeof NOTIFICATION_CATEGORY_KEYS)[number];\nexport const ADMIN_NOTIFICATION_CATEGORY = 'admin' as const satisfies NotificationCategory;\n\nexport const SHARED_NOTIFICATION_AUDIENCE_SCOPE = 'shared';\n\nexport const ADMIN_NOTIFICATION_TYPE_KEYS = [\n 'leagueTeamCreated',\n 'leagueFreeAgentSignedUp',\n] as const;\nexport type AdminNotificationType = (typeof ADMIN_NOTIFICATION_TYPE_KEYS)[number];\n\n// A Q-Sports row names no recipient, so it never reaches `skipped`, but the state is the package's\n// and a row is read against all of them.\nexport const NOTIFICATION_DELIVERY_STATE_KEYS = everyMember<DeliveryState>()([\n 'queued',\n 'materialized',\n 'skipped',\n 'deadLetter',\n]);\nexport type NotificationDeliveryState = (typeof NOTIFICATION_DELIVERY_STATE_KEYS)[number];\n\nexport const NOTIFICATION_DELIVERY_SKIP_REASON_KEYS = everyMember<DeliverySkipReason>()([\n 'recipientIneligible',\n]);\n\n// notification-core's `fanoutOrphan` lane holds rows of an audience fanout, which Q-Sports does not\n// run, so it is the one lane left out.\nexport const NOTIFICATION_MATERIALIZATION_CLASS_KEYS = everyMember<\n Exclude<MaterializationClass, 'fanoutOrphan'>\n>()(['directQueued', 'realtimeFallback', 'retry']);\nexport type NotificationMaterializationClass =\n (typeof NOTIFICATION_MATERIALIZATION_CLASS_KEYS)[number];\n\nexport const NOTIFICATION_DELIVERY_PAYLOAD_VERSION = 1;\n\nexport const NOTIFICATION_ARCHIVE_ALL_JOB_STATE_KEYS = everyMember<\n ArchiveAllJobSnapshot['state']\n>()(['in-progress', 'complete', 'incomplete', 'failed']);\nexport type NotificationArchiveAllJobState =\n (typeof NOTIFICATION_ARCHIVE_ALL_JOB_STATE_KEYS)[number];\n"]}
|
|
@@ -5,6 +5,5 @@ export type GalleryOwnerKind = (typeof GALLERY_OWNER_KIND_KEYS)[number];
|
|
|
5
5
|
export type PictureSlotOwnerKind = Exclude<PictureOwnerKind, GalleryOwnerKind>;
|
|
6
6
|
export declare const AWARD_DEFINITION_OWNER_KIND: "awardDefinition";
|
|
7
7
|
export declare const LEAGUE_TEAM_GALLERY_OWNER_KIND: "leagueTeam";
|
|
8
|
-
/** Whether an owner holds a gallery, as opposed to a single picture slot. */
|
|
9
8
|
export declare function isGalleryOwnerKind(kind: PictureOwnerKind): kind is GalleryOwnerKind;
|
|
10
9
|
//# sourceMappingURL=picture-owners.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture-owners.d.ts","sourceRoot":"","sources":["../../src/types/picture-owners.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"picture-owners.d.ts","sourceRoot":"","sources":["../../src/types/picture-owners.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,0FAM1B,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,eAAO,MAAM,uBAAuB,uDAIY,CAAC;AACjD,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AACxE,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;AAE/E,eAAO,MAAM,2BAA2B,mBAAwD,CAAC;AAEjG,eAAO,MAAM,8BAA8B,cAAmD,CAAC;AAE/F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,IAAI,gBAAgB,CAEnF"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// Which document owns a picture (RULE-STD-ARCH-102). An upload's target, its indexes, and a picture's
|
|
2
|
-
// removal take the full union; a gallery picture document takes the gallery subset, because only
|
|
3
|
-
// those three owners hold a gallery — a location and an award hold one picture in a single slot.
|
|
4
1
|
export const PICTURE_OWNER_KIND_KEYS = [
|
|
5
2
|
'sportLeague',
|
|
6
3
|
'leagueTeam',
|
|
@@ -13,11 +10,8 @@ export const GALLERY_OWNER_KIND_KEYS = [
|
|
|
13
10
|
'leagueTeam',
|
|
14
11
|
'landingPage',
|
|
15
12
|
];
|
|
16
|
-
// An award's badge slot, which the award catalog's own core fills.
|
|
17
13
|
export const AWARD_DEFINITION_OWNER_KIND = 'awardDefinition';
|
|
18
|
-
// A team's gallery, which the team's deletion retires whole.
|
|
19
14
|
export const LEAGUE_TEAM_GALLERY_OWNER_KIND = 'leagueTeam';
|
|
20
|
-
/** Whether an owner holds a gallery, as opposed to a single picture slot. */
|
|
21
15
|
export function isGalleryOwnerKind(kind) {
|
|
22
16
|
return GALLERY_OWNER_KIND_KEYS.includes(kind);
|
|
23
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture-owners.js","sourceRoot":"","sources":["../../src/types/picture-owners.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"picture-owners.js","sourceRoot":"","sources":["../../src/types/picture-owners.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,aAAa;IACb,YAAY;IACZ,aAAa;IACb,cAAc;IACd,iBAAiB;CACT,CAAC;AAGX,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,aAAa;IACb,YAAY;IACZ,aAAa;CACiC,CAAC;AAIjD,MAAM,CAAC,MAAM,2BAA2B,GAAG,iBAAqD,CAAC;AAEjG,MAAM,CAAC,MAAM,8BAA8B,GAAG,YAAgD,CAAC;AAE/F,MAAM,UAAU,kBAAkB,CAAC,IAAsB;IACvD,OAAQ,uBAAuD,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACjF,CAAC","sourcesContent":["export const PICTURE_OWNER_KIND_KEYS = [\n 'sportLeague',\n 'leagueTeam',\n 'landingPage',\n 'gameLocation',\n 'awardDefinition',\n] as const;\nexport type PictureOwnerKind = (typeof PICTURE_OWNER_KIND_KEYS)[number];\n\nexport const GALLERY_OWNER_KIND_KEYS = [\n 'sportLeague',\n 'leagueTeam',\n 'landingPage',\n] as const satisfies readonly PictureOwnerKind[];\nexport type GalleryOwnerKind = (typeof GALLERY_OWNER_KIND_KEYS)[number];\nexport type PictureSlotOwnerKind = Exclude<PictureOwnerKind, GalleryOwnerKind>;\n\nexport const AWARD_DEFINITION_OWNER_KIND = 'awardDefinition' as const satisfies PictureOwnerKind;\n\nexport const LEAGUE_TEAM_GALLERY_OWNER_KIND = 'leagueTeam' as const satisfies GalleryOwnerKind;\n\nexport function isGalleryOwnerKind(kind: PictureOwnerKind): kind is GalleryOwnerKind {\n return (GALLERY_OWNER_KIND_KEYS as readonly PictureOwnerKind[]).includes(kind);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedules.d.ts","sourceRoot":"","sources":["../../src/types/schedules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schedules.d.ts","sourceRoot":"","sources":["../../src/types/schedules.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,iDAAkD,CAAC;AAC3F,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAChF,eAAO,MAAM,wBAAwB,kBAA2D,CAAC;AACjG,eAAO,MAAM,2BAA2B,oBACoB,CAAC;AAE7D,eAAO,MAAM,8BAA8B,mCAAoC,CAAC;AAChF,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC;AAErF,eAAO,MAAM,8BAA8B,6FAOjC,CAAC;AACX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC;AAErF,eAAO,MAAM,wBAAwB,yDAA0D,CAAC;AAChG,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,eAAO,MAAM,4BAA4B,gHAM/B,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/types/schedules.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
// Canonical unions of a league's schedule: its weeks and the games in them (RULE-STD-ARCH-102).
|
|
2
|
-
// The two kinds of scheduling conflict the week form warns about, never blocks on: two games at one
|
|
3
|
-
// venue court at one start time, and one team booked into two games at one start time.
|
|
4
1
|
export const SCHEDULE_CONFLICT_KIND_KEYS = ['sharedLocation', 'teamDoubleBooked'];
|
|
5
2
|
export const SHARED_LOCATION_CONFLICT = 'sharedLocation';
|
|
6
3
|
export const TEAM_DOUBLE_BOOKED_CONFLICT = 'teamDoubleBooked';
|
|
7
|
-
// What a game's deletion was part of: the game alone, its whole week, or its team's deletion. The
|
|
8
|
-
// deletion's audit event records it.
|
|
9
4
|
export const SPORT_GAME_DELETION_SCOPE_KEYS = ['game', 'week', 'team'];
|
|
10
|
-
// A game's schedule fields an admin edits, in the order the edit's result and audit event list them.
|
|
11
5
|
export const SPORT_GAME_SCHEDULE_FIELD_KEYS = [
|
|
12
6
|
'weekId',
|
|
13
7
|
'teams',
|
|
@@ -16,10 +10,7 @@ export const SPORT_GAME_SCHEDULE_FIELD_KEYS = [
|
|
|
16
10
|
'subLocation',
|
|
17
11
|
'locationLabel',
|
|
18
12
|
];
|
|
19
|
-
// The fields a week carries on every one of its games, which the week edit rewrites together.
|
|
20
13
|
export const SCHEDULE_WEEK_FIELD_KEYS = ['weekTitle', 'weekStartDate', 'weekLocation'];
|
|
21
|
-
// Why the schedule callables refused, carried in the refusal's details so the admin screen can mark
|
|
22
|
-
// the games it names.
|
|
23
14
|
export const SCHEDULE_REFUSAL_REASON_KEYS = [
|
|
24
15
|
'gameCompleted',
|
|
25
16
|
'gameHeld',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedules.js","sourceRoot":"","sources":["../../src/types/schedules.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"schedules.js","sourceRoot":"","sources":["../../src/types/schedules.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,gBAAgB,EAAE,kBAAkB,CAAU,CAAC;AAE3F,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAwD,CAAC;AACjG,MAAM,CAAC,MAAM,2BAA2B,GACtC,kBAA0D,CAAC;AAE7D,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAGhF,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,QAAQ;IACR,OAAO;IACP,WAAW;IACX,gBAAgB;IAChB,aAAa;IACb,eAAe;CACP,CAAC;AAGX,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAW,EAAE,eAAe,EAAE,cAAc,CAAU,CAAC;AAGhG,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,eAAe;IACf,UAAU;IACV,uBAAuB;IACvB,sBAAsB;IACtB,qBAAqB;CACb,CAAC","sourcesContent":["export const SCHEDULE_CONFLICT_KIND_KEYS = ['sharedLocation', 'teamDoubleBooked'] as const;\nexport type ScheduleConflictKind = (typeof SCHEDULE_CONFLICT_KIND_KEYS)[number];\nexport const SHARED_LOCATION_CONFLICT = 'sharedLocation' as const satisfies ScheduleConflictKind;\nexport const TEAM_DOUBLE_BOOKED_CONFLICT =\n 'teamDoubleBooked' as const satisfies ScheduleConflictKind;\n\nexport const SPORT_GAME_DELETION_SCOPE_KEYS = ['game', 'week', 'team'] as const;\nexport type SportGameDeletionScope = (typeof SPORT_GAME_DELETION_SCOPE_KEYS)[number];\n\nexport const SPORT_GAME_SCHEDULE_FIELD_KEYS = [\n 'weekId',\n 'teams',\n 'startTime',\n 'gameLocationId',\n 'subLocation',\n 'locationLabel',\n] as const;\nexport type SportGameScheduleField = (typeof SPORT_GAME_SCHEDULE_FIELD_KEYS)[number];\n\nexport const SCHEDULE_WEEK_FIELD_KEYS = ['weekTitle', 'weekStartDate', 'weekLocation'] as const;\nexport type ScheduleWeekField = (typeof SCHEDULE_WEEK_FIELD_KEYS)[number];\n\nexport const SCHEDULE_REFUSAL_REASON_KEYS = [\n 'gameCompleted',\n 'gameHeld',\n 'weekHasCompletedGames',\n 'teamHasRecordedStats',\n 'gameHasRecordedPlay',\n] as const;\nexport type ScheduleRefusalReason = (typeof SCHEDULE_REFUSAL_REASON_KEYS)[number];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sports.d.ts","sourceRoot":"","sources":["../../src/types/sports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sports.d.ts","sourceRoot":"","sources":["../../src/types/sports.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,gDAAiD,CAAC;AAC/E,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,gBAAgB,CA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