@ttt-productions/q-core 0.1.16 → 0.1.18
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/business.d.ts.map +1 -1
- package/dist/constants/business.js +25 -5
- package/dist/constants/business.js.map +1 -1
- package/dist/constants/sports.d.ts.map +1 -1
- package/dist/constants/sports.js +2 -2
- package/dist/constants/sports.js.map +1 -1
- package/dist/doc-schemas/admin-notifications.d.ts +1 -1
- package/dist/doc-schemas/admin-notifications.d.ts.map +1 -1
- package/dist/doc-schemas/admin-notifications.js +4 -1
- 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 +4 -1
- package/dist/doc-schemas/aggregate-stats.js.map +1 -1
- package/dist/doc-schemas/atoms.d.ts.map +1 -1
- package/dist/doc-schemas/atoms.js +2 -2
- 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 +8 -4
- package/dist/doc-schemas/audit-event.js.map +1 -1
- package/dist/doc-schemas/award-group-grant.d.ts.map +1 -1
- package/dist/doc-schemas/award-group-grant.js +11 -3
- package/dist/doc-schemas/award-group-grant.js.map +1 -1
- package/dist/doc-schemas/catalogs.js +1 -1
- package/dist/doc-schemas/catalogs.js.map +1 -1
- package/dist/doc-schemas/gallery.js +1 -1
- package/dist/doc-schemas/gallery.js.map +1 -1
- package/dist/doc-schemas/game-stat-history.d.ts.map +1 -1
- 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 +10 -2
- package/dist/doc-schemas/game-stats.js.map +1 -1
- package/dist/doc-schemas/league-team.js +1 -1
- 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 +2 -1
- package/dist/doc-schemas/membership-roster-sync.js.map +1 -1
- package/dist/doc-schemas/migration-console.js +1 -1
- 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.map +1 -1
- package/dist/doc-schemas/picture-retirement.d.ts.map +1 -1
- package/dist/doc-schemas/picture-retirement.js +5 -1
- package/dist/doc-schemas/picture-retirement.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +1 -1
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +1 -1
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/doc-schemas/sport-game.d.ts.map +1 -1
- package/dist/doc-schemas/sport-game.js.map +1 -1
- package/dist/doc-schemas/sport-league.d.ts.map +1 -1
- package/dist/doc-schemas/sport-league.js +10 -2
- package/dist/doc-schemas/sport-league.js.map +1 -1
- package/dist/doc-schemas/status-reconcile-queue.d.ts.map +1 -1
- 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 +10 -2
- 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.map +1 -1
- package/dist/doc-schemas/user-profile.d.ts.map +1 -1
- package/dist/doc-schemas/user-profile.js +1 -1
- package/dist/doc-schemas/user-profile.js.map +1 -1
- package/dist/doc-schemas/waivers-and-hardware.d.ts.map +1 -1
- package/dist/doc-schemas/waivers-and-hardware.js +15 -3
- 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 +88 -24
- package/dist/domain-events/domain-events.js.map +1 -1
- package/dist/ids/notification-ids.d.ts.map +1 -1
- package/dist/ids/notification-ids.js.map +1 -1
- package/dist/ids/picture-ids.d.ts.map +1 -1
- package/dist/ids/picture-ids.js.map +1 -1
- package/dist/ids/stat-event-ids.d.ts.map +1 -1
- package/dist/ids/stat-event-ids.js.map +1 -1
- package/dist/ids/waiver-template-ids.d.ts.map +1 -1
- package/dist/ids/waiver-template-ids.js.map +1 -1
- package/dist/index.d.ts +4 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -9
- package/dist/index.js.map +1 -1
- package/dist/input-formats/{index.d.ts → input-formats.d.ts} +1 -1
- package/dist/input-formats/input-formats.d.ts.map +1 -0
- package/dist/input-formats/{index.js → input-formats.js} +1 -1
- package/dist/input-formats/input-formats.js.map +1 -0
- package/dist/media/file-origins.d.ts.map +1 -1
- package/dist/media/file-origins.js +30 -6
- package/dist/media/file-origins.js.map +1 -1
- package/dist/migration-console/action-ids.d.ts.map +1 -1
- package/dist/migration-console/action-ids.js.map +1 -1
- package/dist/migration-console/manifest.d.ts.map +1 -1
- package/dist/migration-console/manifest.js +42 -7
- package/dist/migration-console/manifest.js.map +1 -1
- package/dist/migration-console/run-state.d.ts.map +1 -1
- package/dist/migration-console/run-state.js.map +1 -1
- package/dist/notifications/admin-notification-config.d.ts.map +1 -1
- package/dist/notifications/admin-notification-config.js +5 -3
- package/dist/notifications/admin-notification-config.js.map +1 -1
- package/dist/notifications/occurrences.d.ts.map +1 -1
- package/dist/notifications/occurrences.js.map +1 -1
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +60 -15
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/paths/picture-owner-paths.d.ts.map +1 -1
- package/dist/paths/picture-owner-paths.js.map +1 -1
- package/dist/paths/storage-paths.d.ts.map +1 -1
- package/dist/paths/storage-paths.js.map +1 -1
- package/dist/schemas/admin-notifications.d.ts.map +1 -1
- package/dist/schemas/admin-notifications.js +8 -4
- package/dist/schemas/admin-notifications.js.map +1 -1
- package/dist/schemas/app-config.js +1 -1
- package/dist/schemas/app-config.js.map +1 -1
- package/dist/schemas/atoms.d.ts +0 -1
- package/dist/schemas/atoms.d.ts.map +1 -1
- package/dist/schemas/atoms.js +3 -5
- package/dist/schemas/atoms.js.map +1 -1
- package/dist/schemas/awards.d.ts.map +1 -1
- package/dist/schemas/awards.js +13 -5
- package/dist/schemas/awards.js.map +1 -1
- package/dist/schemas/dead-letters.d.ts.map +1 -1
- package/dist/schemas/dead-letters.js +6 -3
- 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 +1 -1
- 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 +11 -4
- package/dist/schemas/hardware-loan-contracts.js.map +1 -1
- package/dist/schemas/leagues.d.ts +2 -2
- package/dist/schemas/leagues.d.ts.map +1 -1
- package/dist/schemas/leagues.js +12 -3
- package/dist/schemas/leagues.js.map +1 -1
- package/dist/schemas/migration-console.d.ts.map +1 -1
- package/dist/schemas/migration-console.js +3 -6
- package/dist/schemas/migration-console.js.map +1 -1
- package/dist/schemas/pictures.d.ts.map +1 -1
- package/dist/schemas/pictures.js +6 -2
- package/dist/schemas/pictures.js.map +1 -1
- package/dist/schemas/schedules.d.ts +8 -8
- package/dist/schemas/schedules.d.ts.map +1 -1
- package/dist/schemas/schedules.js +9 -3
- package/dist/schemas/schedules.js.map +1 -1
- package/dist/schemas/scoring.d.ts +12 -12
- package/dist/schemas/scoring.d.ts.map +1 -1
- package/dist/schemas/scoring.js +11 -4
- package/dist/schemas/scoring.js.map +1 -1
- package/dist/schemas/signed-waivers.d.ts.map +1 -1
- package/dist/schemas/signed-waivers.js +5 -3
- package/dist/schemas/signed-waivers.js.map +1 -1
- package/dist/schemas/stats.d.ts.map +1 -1
- package/dist/schemas/stats.js +27 -8
- package/dist/schemas/stats.js.map +1 -1
- package/dist/schemas/team-joining.d.ts.map +1 -1
- package/dist/schemas/team-joining.js +13 -5
- package/dist/schemas/team-joining.js.map +1 -1
- package/dist/schemas/teams.d.ts.map +1 -1
- package/dist/schemas/teams.js +19 -6
- package/dist/schemas/teams.js.map +1 -1
- package/dist/schemas/uploads.d.ts.map +1 -1
- package/dist/schemas/uploads.js +12 -5
- package/dist/schemas/uploads.js.map +1 -1
- package/dist/schemas/users.d.ts.map +1 -1
- package/dist/schemas/users.js +22 -8
- package/dist/schemas/users.js.map +1 -1
- package/dist/schemas/waiver-templates.js +1 -1
- package/dist/schemas/waiver-templates.js.map +1 -1
- package/dist/sports/basketball-scoring.d.ts.map +1 -1
- package/dist/sports/basketball-scoring.js +67 -16
- package/dist/sports/basketball-scoring.js.map +1 -1
- package/dist/sports/basketball.d.ts.map +1 -1
- package/dist/sports/basketball.js +34 -7
- package/dist/sports/basketball.js.map +1 -1
- package/dist/sports/column-catalog.d.ts.map +1 -1
- package/dist/sports/column-catalog.js +4 -1
- package/dist/sports/column-catalog.js.map +1 -1
- package/dist/sports/contribution.d.ts.map +1 -1
- package/dist/sports/contribution.js +10 -3
- package/dist/sports/contribution.js.map +1 -1
- package/dist/sports/curling-scoring.d.ts.map +1 -1
- package/dist/sports/curling-scoring.js +30 -8
- package/dist/sports/curling-scoring.js.map +1 -1
- package/dist/sports/curling.d.ts.map +1 -1
- package/dist/sports/curling.js +1 -1
- package/dist/sports/curling.js.map +1 -1
- package/dist/sports/finalized-record.d.ts.map +1 -1
- 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 +28 -8
- package/dist/sports/football-scoring.js.map +1 -1
- package/dist/sports/football.d.ts.map +1 -1
- package/dist/sports/football.js +1 -1
- package/dist/sports/football.js.map +1 -1
- package/dist/sports/index.d.ts +2 -2
- package/dist/sports/index.d.ts.map +1 -1
- package/dist/sports/index.js +1 -1
- package/dist/sports/index.js.map +1 -1
- package/dist/sports/ledger-continuity.d.ts.map +1 -1
- package/dist/sports/ledger-continuity.js.map +1 -1
- package/dist/sports/rankings.d.ts.map +1 -1
- package/dist/sports/rankings.js +5 -1
- package/dist/sports/rankings.js.map +1 -1
- package/dist/sports/replay.d.ts.map +1 -1
- package/dist/sports/replay.js +4 -1
- package/dist/sports/replay.js.map +1 -1
- package/dist/sports/rollup-check.d.ts.map +1 -1
- package/dist/sports/rollup-check.js +15 -3
- package/dist/sports/rollup-check.js.map +1 -1
- package/dist/sports/score-mirror.d.ts.map +1 -1
- package/dist/sports/score-mirror.js.map +1 -1
- package/dist/sports/scoring-display.d.ts.map +1 -1
- package/dist/sports/scoring-display.js.map +1 -1
- package/dist/sports/scoring.d.ts.map +1 -1
- package/dist/sports/scoring.js.map +1 -1
- package/dist/sports/sport-adapter.d.ts.map +1 -1
- package/dist/sports/sport-adapter.js.map +1 -1
- package/dist/sports/store-driver.d.ts.map +1 -1
- package/dist/sports/store-driver.js +18 -7
- package/dist/sports/store-driver.js.map +1 -1
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js +16 -3
- package/dist/types/audit.js.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/notifications.d.ts.map +1 -1
- package/dist/types/notifications.js +9 -13
- package/dist/types/notifications.js.map +1 -1
- package/dist/types/schedules.d.ts.map +1 -1
- package/dist/types/schedules.js.map +1 -1
- package/dist/types/sports.d.ts.map +1 -1
- package/dist/types/sports.js +9 -2
- package/dist/types/sports.js.map +1 -1
- package/dist/types/stats.d.ts.map +1 -1
- package/dist/types/stats.js +45 -9
- package/dist/types/stats.js.map +1 -1
- package/dist/types/unions.d.ts.map +1 -1
- package/dist/types/unions.js +32 -6
- package/dist/types/unions.js.map +1 -1
- package/dist/upload-variables/picture-upload-variables.d.ts.map +1 -1
- package/dist/upload-variables/picture-upload-variables.js +4 -2
- 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 +4 -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 +5 -3
- package/dist/upload-variables/sign-waiver-variables.js.map +1 -1
- package/dist/utils/app-config.d.ts.map +1 -1
- package/dist/utils/app-config.js +5 -1
- package/dist/utils/app-config.js.map +1 -1
- package/dist/utils/app-routes.d.ts.map +1 -1
- package/dist/utils/app-routes.js +6 -1
- package/dist/utils/app-routes.js.map +1 -1
- package/dist/utils/league-calendar.d.ts.map +1 -1
- package/dist/utils/league-calendar.js +4 -1
- package/dist/utils/league-calendar.js.map +1 -1
- package/dist/utils/league-join-warning.d.ts.map +1 -1
- package/dist/utils/league-join-warning.js +15 -5
- package/dist/utils/league-join-warning.js.map +1 -1
- package/dist/utils/schedules.d.ts.map +1 -1
- package/dist/utils/schedules.js +6 -2
- package/dist/utils/schedules.js.map +1 -1
- package/dist/utils/team-member-actions.d.ts.map +1 -1
- package/dist/utils/team-member-actions.js.map +1 -1
- package/package.json +5 -17
- package/dist/input-formats/index.d.ts.map +0 -1
- package/dist/input-formats/index.js.map +0 -1
- package/dist/migration-console/index.d.ts +0 -4
- package/dist/migration-console/index.d.ts.map +0 -1
- package/dist/migration-console/index.js +0 -5
- package/dist/migration-console/index.js.map +0 -1
- package/dist/types/documents.d.ts +0 -24
- package/dist/types/documents.d.ts.map +0 -1
- package/dist/types/documents.js +0 -5
- package/dist/types/documents.js.map +0 -1
|
@@ -10,14 +10,23 @@ import { gameLocationIdSchema } from '../doc-schemas/game-location.js';
|
|
|
10
10
|
import { galleryOwnerKindSchema, pictureIdSchema } from '../doc-schemas/gallery.js';
|
|
11
11
|
import { waiverTemplateIdSchema } from '../doc-schemas/waiver-template.js';
|
|
12
12
|
export const LeagueCreatedEventSchema = z
|
|
13
|
-
.object({
|
|
13
|
+
.object({
|
|
14
|
+
type: z.literal('league.created'),
|
|
15
|
+
ids: z.object({ leagueId: leagueIdSchema }).strict(),
|
|
16
|
+
})
|
|
14
17
|
.strict();
|
|
15
18
|
export const LeagueUpdatedEventSchema = z
|
|
16
|
-
.object({
|
|
19
|
+
.object({
|
|
20
|
+
type: z.literal('league.updated'),
|
|
21
|
+
ids: z.object({ leagueId: leagueIdSchema }).strict(),
|
|
22
|
+
})
|
|
17
23
|
.strict();
|
|
18
24
|
// The league changed mode, and with it the `teamType` of every one of its teams.
|
|
19
25
|
export const LeagueModeSwitchedEventSchema = z
|
|
20
|
-
.object({
|
|
26
|
+
.object({
|
|
27
|
+
type: z.literal('league.modeSwitched'),
|
|
28
|
+
ids: z.object({ leagueId: leagueIdSchema }).strict(),
|
|
29
|
+
})
|
|
21
30
|
.strict();
|
|
22
31
|
export const LeagueTeamCreatedEventSchema = z
|
|
23
32
|
.object({
|
|
@@ -29,7 +38,9 @@ export const LeagueTeamCreatedEventSchema = z
|
|
|
29
38
|
export const TeamRosterChangedEventSchema = z
|
|
30
39
|
.object({
|
|
31
40
|
type: z.literal('teamRoster.changed'),
|
|
32
|
-
ids: z
|
|
41
|
+
ids: z
|
|
42
|
+
.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })
|
|
43
|
+
.strict(),
|
|
33
44
|
})
|
|
34
45
|
.strict();
|
|
35
46
|
// A waiver was signed for a person in a league — by them, or for a ghost by a witness.
|
|
@@ -55,42 +66,54 @@ export const GhostPlayerLinkedEventSchema = z
|
|
|
55
66
|
export const TeamJoinRequestSubmittedEventSchema = z
|
|
56
67
|
.object({
|
|
57
68
|
type: z.literal('teamJoinRequest.submitted'),
|
|
58
|
-
ids: z
|
|
69
|
+
ids: z
|
|
70
|
+
.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })
|
|
71
|
+
.strict(),
|
|
59
72
|
})
|
|
60
73
|
.strict();
|
|
61
74
|
// The requester withdrew their join request.
|
|
62
75
|
export const TeamJoinRequestCancelledEventSchema = z
|
|
63
76
|
.object({
|
|
64
77
|
type: z.literal('teamJoinRequest.cancelled'),
|
|
65
|
-
ids: z
|
|
78
|
+
ids: z
|
|
79
|
+
.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })
|
|
80
|
+
.strict(),
|
|
66
81
|
})
|
|
67
82
|
.strict();
|
|
68
83
|
// The team accepted or rejected a join request. An acceptance also changed the roster.
|
|
69
84
|
export const TeamJoinRequestAnsweredEventSchema = z
|
|
70
85
|
.object({
|
|
71
86
|
type: z.literal('teamJoinRequest.answered'),
|
|
72
|
-
ids: z
|
|
87
|
+
ids: z
|
|
88
|
+
.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })
|
|
89
|
+
.strict(),
|
|
73
90
|
})
|
|
74
91
|
.strict();
|
|
75
92
|
// The team invited a person. `userId` is the invitee.
|
|
76
93
|
export const TeamInvitationSentEventSchema = z
|
|
77
94
|
.object({
|
|
78
95
|
type: z.literal('teamInvitation.sent'),
|
|
79
|
-
ids: z
|
|
96
|
+
ids: z
|
|
97
|
+
.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })
|
|
98
|
+
.strict(),
|
|
80
99
|
})
|
|
81
100
|
.strict();
|
|
82
101
|
// The team withdrew an invitation. `userId` is the invitee.
|
|
83
102
|
export const TeamInvitationCancelledEventSchema = z
|
|
84
103
|
.object({
|
|
85
104
|
type: z.literal('teamInvitation.cancelled'),
|
|
86
|
-
ids: z
|
|
105
|
+
ids: z
|
|
106
|
+
.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })
|
|
107
|
+
.strict(),
|
|
87
108
|
})
|
|
88
109
|
.strict();
|
|
89
110
|
// The invitee accepted or declined an invitation. An acceptance also changed the roster.
|
|
90
111
|
export const TeamInvitationAnsweredEventSchema = z
|
|
91
112
|
.object({
|
|
92
113
|
type: z.literal('teamInvitation.answered'),
|
|
93
|
-
ids: z
|
|
114
|
+
ids: z
|
|
115
|
+
.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })
|
|
116
|
+
.strict(),
|
|
94
117
|
})
|
|
95
118
|
.strict();
|
|
96
119
|
// A player signed up as a free agent in a league.
|
|
@@ -151,7 +174,10 @@ export const SportGameJumpBallChangedEventSchema = z
|
|
|
151
174
|
// deleted, or a game was added to a week. Any of the league's games may have been added, changed, or
|
|
152
175
|
// removed.
|
|
153
176
|
export const LeagueScheduleChangedEventSchema = z
|
|
154
|
-
.object({
|
|
177
|
+
.object({
|
|
178
|
+
type: z.literal('leagueSchedule.changed'),
|
|
179
|
+
ids: z.object({ leagueId: leagueIdSchema }).strict(),
|
|
180
|
+
})
|
|
155
181
|
.strict();
|
|
156
182
|
// One game's schedule changed — its week, start time, or venue — or its teams were replaced, which
|
|
157
183
|
// replaces their roster entries and stat lines too.
|
|
@@ -192,7 +218,10 @@ export const SportGameStatsCorrectedEventSchema = z
|
|
|
192
218
|
.strict();
|
|
193
219
|
// A stats check wrote or advanced its report.
|
|
194
220
|
export const StatsValidationReportedEventSchema = z
|
|
195
|
-
.object({
|
|
221
|
+
.object({
|
|
222
|
+
type: z.literal('statsValidation.reported'),
|
|
223
|
+
ids: z.object({ reportId: z.string().min(1) }).strict(),
|
|
224
|
+
})
|
|
196
225
|
.strict();
|
|
197
226
|
// An admin deleted a stats check's report.
|
|
198
227
|
export const StatsValidationReportDeletedEventSchema = z
|
|
@@ -203,49 +232,78 @@ export const StatsValidationReportDeletedEventSchema = z
|
|
|
203
232
|
.strict();
|
|
204
233
|
// A person's pre-Q-Sports baseline was written, and their career line and hall-of-fame entry rebuilt.
|
|
205
234
|
export const HistoricalStatsUpdatedEventSchema = z
|
|
206
|
-
.object({
|
|
235
|
+
.object({
|
|
236
|
+
type: z.literal('historicalStats.updated'),
|
|
237
|
+
ids: z.object({ userId: userIdSchema }).strict(),
|
|
238
|
+
})
|
|
207
239
|
.strict();
|
|
208
240
|
// An admin banned an account or lifted its ban.
|
|
209
241
|
export const UserStatusChangedEventSchema = z
|
|
210
|
-
.object({
|
|
242
|
+
.object({
|
|
243
|
+
type: z.literal('user.statusChanged'),
|
|
244
|
+
ids: z.object({ userId: userIdSchema }).strict(),
|
|
245
|
+
})
|
|
211
246
|
.strict();
|
|
212
247
|
// An award joined the catalog — its first badge was published.
|
|
213
248
|
export const AwardDefinitionCreatedEventSchema = z
|
|
214
|
-
.object({
|
|
249
|
+
.object({
|
|
250
|
+
type: z.literal('awardDefinition.created'),
|
|
251
|
+
ids: z.object({ awardId: awardIdSchema }).strict(),
|
|
252
|
+
})
|
|
215
253
|
.strict();
|
|
216
254
|
// An award's document changed: its badge was replaced, or its holder count moved.
|
|
217
255
|
export const AwardDefinitionUpdatedEventSchema = z
|
|
218
|
-
.object({
|
|
256
|
+
.object({
|
|
257
|
+
type: z.literal('awardDefinition.updated'),
|
|
258
|
+
ids: z.object({ awardId: awardIdSchema }).strict(),
|
|
259
|
+
})
|
|
219
260
|
.strict();
|
|
220
261
|
export const AwardDefinitionDeletedEventSchema = z
|
|
221
|
-
.object({
|
|
262
|
+
.object({
|
|
263
|
+
type: z.literal('awardDefinition.deleted'),
|
|
264
|
+
ids: z.object({ awardId: awardIdSchema }).strict(),
|
|
265
|
+
})
|
|
222
266
|
.strict();
|
|
223
267
|
// An award was granted to or revoked from some accounts, which may have cleared a featured badge.
|
|
224
268
|
// The accounts are many, so the event names the award; a client holding any profile's awards
|
|
225
269
|
// refreshes them.
|
|
226
270
|
export const AwardGrantsChangedEventSchema = z
|
|
227
|
-
.object({
|
|
271
|
+
.object({
|
|
272
|
+
type: z.literal('awardGrants.changed'),
|
|
273
|
+
ids: z.object({ awardId: awardIdSchema }).strict(),
|
|
274
|
+
})
|
|
228
275
|
.strict();
|
|
229
276
|
// An account chose which of its awards to feature beside its name.
|
|
230
277
|
export const FeaturedAwardsChangedEventSchema = z
|
|
231
|
-
.object({
|
|
278
|
+
.object({
|
|
279
|
+
type: z.literal('featuredAwards.changed'),
|
|
280
|
+
ids: z.object({ userId: userIdSchema }).strict(),
|
|
281
|
+
})
|
|
232
282
|
.strict();
|
|
233
283
|
// A hardware loan contract was created, signed, returned, or deleted.
|
|
234
284
|
export const HardwareLoanContractChangedEventSchema = z
|
|
235
285
|
.object({
|
|
236
286
|
type: z.literal('hardwareLoanContract.changed'),
|
|
237
|
-
ids: z
|
|
287
|
+
ids: z
|
|
288
|
+
.object({ contractId: hardwareLoanContractIdSchema, refereeUserId: userIdSchema })
|
|
289
|
+
.strict(),
|
|
238
290
|
})
|
|
239
291
|
.strict();
|
|
240
292
|
export const AdminListChangedEventSchema = z
|
|
241
|
-
.object({
|
|
293
|
+
.object({
|
|
294
|
+
type: z.literal('adminList.changed'),
|
|
295
|
+
ids: z.object({ userId: userIdSchema }).strict(),
|
|
296
|
+
})
|
|
242
297
|
.strict();
|
|
243
298
|
// A new account finished registration: its profile and public identity now exist.
|
|
244
299
|
export const UserRegisteredEventSchema = z
|
|
245
300
|
.object({ type: z.literal('user.registered'), ids: z.object({ userId: userIdSchema }).strict() })
|
|
246
301
|
.strict();
|
|
247
302
|
export const DisplayNameChangedEventSchema = z
|
|
248
|
-
.object({
|
|
303
|
+
.object({
|
|
304
|
+
type: z.literal('displayName.changed'),
|
|
305
|
+
ids: z.object({ userId: userIdSchema }).strict(),
|
|
306
|
+
})
|
|
249
307
|
.strict();
|
|
250
308
|
// The shared stats beacon moved: stats changed somewhere. The beacon holds only its latest change,
|
|
251
309
|
// not a log of them, so the event names no scope and a watching client refreshes every
|
|
@@ -323,7 +381,9 @@ export const LeagueTeamDeletionAdvancedEventSchema = z
|
|
|
323
381
|
export const GhostPlayerFinishedEntriesRemovedEventSchema = z
|
|
324
382
|
.object({
|
|
325
383
|
type: z.literal('ghostPlayer.finishedEntriesRemoved'),
|
|
326
|
-
ids: z
|
|
384
|
+
ids: z
|
|
385
|
+
.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, ghostUserId: userIdSchema })
|
|
386
|
+
.strict(),
|
|
327
387
|
})
|
|
328
388
|
.strict();
|
|
329
389
|
// An admin set a team's contact phone, which only admins read.
|
|
@@ -345,7 +405,11 @@ export const GalleryPictureAddedEventSchema = z
|
|
|
345
405
|
.object({
|
|
346
406
|
type: z.literal('galleryPicture.added'),
|
|
347
407
|
ids: z
|
|
348
|
-
.object({
|
|
408
|
+
.object({
|
|
409
|
+
ownerKind: galleryOwnerKindSchema,
|
|
410
|
+
ownerId: z.string().min(1),
|
|
411
|
+
pictureId: pictureIdSchema,
|
|
412
|
+
})
|
|
349
413
|
.strict(),
|
|
350
414
|
position: z.string().min(1),
|
|
351
415
|
createdAt: epochMsSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-events.js","sourceRoot":"","sources":["../../src/domain-events/domain-events.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,EAAE;AACF,mGAAmG;AACnG,wGAAwG;AACxG,6CAA6C;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,cAAc,EACd,cAAc,EACd,6BAA6B,EAC7B,YAAY,EACZ,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;KACnG,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,wBAAwB,GAAG,C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iCAAiC;IACjC,6BAA6B;IAC7B,4BAA4B;IAC5B,sCAAsC;IACtC,kCAAkC;IAClC,+BAA+B;IAC/B,mCAAmC;IACnC,gCAAgC;IAChC,2BAA2B;IAC3B,2BAA2B;IAC3B,4BAA4B;IAC5B,kCAAkC;IAClC,kCAAkC;IAClC,uCAAuC;IACvC,iCAAiC;IACjC,4BAA4B;IAC5B,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,6BAA6B;IAC7B,gCAAgC;IAChC,sCAAsC;IACtC,2BAA2B;IAC3B,yBAAyB;IACzB,6BAA6B;IAC7B,6BAA6B;IAC7B,gCAAgC;IAChC,gCAAgC;IAChC,gCAAgC;IAChC,8BAA8B;IAC9B,8BAA8B;IAC9B,8BAA8B;IAC9B,4BAA4B;IAC5B,4BAA4B;IAC5B,qCAAqC;IACrC,4CAA4C;IAC5C,mCAAmC;IACnC,6BAA6B;IAC7B,8BAA8B;IAC9B,6BAA6B;IAC7B,kCAAkC;CACnC,CAAC,CAAC","sourcesContent":["// The DomainEvent union — the vocabulary of \"what happened\" that both sides of the boundary share.\n//\n// A callable or trigger names what it changed with one of these; the client alone maps an event to\n// the query-key families it makes stale (the invalidation registry is app-local, FRONTEND-102). The two\n// sides share event names, never cache keys.\n\nimport { z } from 'zod';\nimport {\n epochMsSchema,\n gameIdSchema,\n hardwareLoanContractIdSchema,\n leagueIdSchema,\n sportKeySchema,\n statsValidationReportIdSchema,\n teamIdSchema,\n userIdSchema,\n} from '../doc-schemas/atoms.js';\nimport { awardIdSchema } from '../doc-schemas/catalogs.js';\nimport { gameLocationIdSchema } from '../doc-schemas/game-location.js';\nimport { galleryOwnerKindSchema, pictureIdSchema } from '../doc-schemas/gallery.js';\nimport { waiverTemplateIdSchema } from '../doc-schemas/waiver-template.js';\n\nexport const LeagueCreatedEventSchema = z\n .object({ type: z.literal('league.created'), ids: z.object({ leagueId: leagueIdSchema }).strict() })\n .strict();\n\nexport const LeagueUpdatedEventSchema = z\n .object({ type: z.literal('league.updated'), ids: z.object({ leagueId: leagueIdSchema }).strict() })\n .strict();\n\n// The league changed mode, and with it the `teamType` of every one of its teams.\nexport const LeagueModeSwitchedEventSchema = z\n .object({ type: z.literal('league.modeSwitched'), ids: z.object({ leagueId: leagueIdSchema }).strict() })\n .strict();\n\nexport const LeagueTeamCreatedEventSchema = z\n .object({\n type: z.literal('leagueTeam.created'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),\n })\n .strict();\n\n// A member was added, removed, or changed role on a team — by any path, ghosts included.\nexport const TeamRosterChangedEventSchema = z\n .object({\n type: z.literal('teamRoster.changed'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\n// A waiver was signed for a person in a league — by them, or for a ghost by a witness.\nexport const SignedWaiverCreatedEventSchema = z\n .object({\n type: z.literal('signedWaiver.created'),\n ids: z.object({ leagueId: leagueIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\nexport const GhostPlayerLinkedEventSchema = z\n .object({\n type: z.literal('ghostPlayer.linked'),\n ids: z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n ghostUserId: userIdSchema,\n realUserId: userIdSchema,\n })\n .strict(),\n })\n .strict();\n\nexport const TeamJoinRequestSubmittedEventSchema = z\n .object({\n type: z.literal('teamJoinRequest.submitted'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\n// The requester withdrew their join request.\nexport const TeamJoinRequestCancelledEventSchema = z\n .object({\n type: z.literal('teamJoinRequest.cancelled'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\n// The team accepted or rejected a join request. An acceptance also changed the roster.\nexport const TeamJoinRequestAnsweredEventSchema = z\n .object({\n type: z.literal('teamJoinRequest.answered'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\n// The team invited a person. `userId` is the invitee.\nexport const TeamInvitationSentEventSchema = z\n .object({\n type: z.literal('teamInvitation.sent'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\n// The team withdrew an invitation. `userId` is the invitee.\nexport const TeamInvitationCancelledEventSchema = z\n .object({\n type: z.literal('teamInvitation.cancelled'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\n// The invitee accepted or declined an invitation. An acceptance also changed the roster.\nexport const TeamInvitationAnsweredEventSchema = z\n .object({\n type: z.literal('teamInvitation.answered'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\n// A player signed up as a free agent in a league.\nexport const LeagueFreeAgentSignedUpEventSchema = z\n .object({\n type: z.literal('leagueFreeAgent.signedUp'),\n ids: z.object({ leagueId: leagueIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\n// A player's free-agent signup ended: they withdrew it, or an admin placed them on a team.\nexport const LeagueFreeAgentRemovedEventSchema = z\n .object({\n type: z.literal('leagueFreeAgent.removed'),\n ids: z.object({ leagueId: leagueIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\nexport const SportGameFinalizedEventSchema = z\n .object({\n type: z.literal('sportGame.finalized'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\nexport const SportGameReopenedEventSchema = z\n .object({\n type: z.literal('sportGame.reopened'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A scoring write stored stat events on a live game: its rollup and score moved.\nexport const SportGameStatEventsRecordedEventSchema = z\n .object({\n type: z.literal('sportGame.statEventsRecorded'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A roster entry of a live game was marked absent or present.\nexport const SportGameAbsenceChangedEventSchema = z\n .object({\n type: z.literal('sportGame.absenceChanged'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A scorer's note on one person in a live game changed.\nexport const SportGameMemoUpdatedEventSchema = z\n .object({\n type: z.literal('sportGame.memoUpdated'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// The jump-ball possession arrow of a live basketball game moved.\nexport const SportGameJumpBallChangedEventSchema = z\n .object({\n type: z.literal('sportGame.jumpBallChanged'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A league's schedule changed as a whole: a week was created, its shared fields edited, or it was\n// deleted, or a game was added to a week. Any of the league's games may have been added, changed, or\n// removed.\nexport const LeagueScheduleChangedEventSchema = z\n .object({ type: z.literal('leagueSchedule.changed'), ids: z.object({ leagueId: leagueIdSchema }).strict() })\n .strict();\n\n// One game's schedule changed — its week, start time, or venue — or its teams were replaced, which\n// replaces their roster entries and stat lines too.\nexport const SportGameUpdatedEventSchema = z\n .object({\n type: z.literal('sportGame.updated'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// One game was deleted with its events and roster.\nexport const SportGameDeletedEventSchema = z\n .object({\n type: z.literal('sportGame.deleted'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A rebuild ran. Every scope id is optional: a rebuild covers one league, every league, one user,\n// every user, or one sport's hall of fame (for one user or the whole sport).\nexport const StatsRecalculatedEventSchema = z\n .object({\n type: z.literal('stats.recalculated'),\n ids: z\n .object({\n userId: userIdSchema.optional(),\n leagueId: leagueIdSchema.optional(),\n sportKey: sportKeySchema.optional(),\n })\n .strict(),\n })\n .strict();\n\n// A game's numbers were corrected or restored from its events in Fix stats; for a completed game,\n// every destination it feeds moved with them.\nexport const SportGameStatsCorrectedEventSchema = z\n .object({\n type: z.literal('sportGame.statsCorrected'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A stats check wrote or advanced its report.\nexport const StatsValidationReportedEventSchema = z\n .object({ type: z.literal('statsValidation.reported'), ids: z.object({ reportId: z.string().min(1) }).strict() })\n .strict();\n\n// An admin deleted a stats check's report.\nexport const StatsValidationReportDeletedEventSchema = z\n .object({\n type: z.literal('statsValidation.reportDeleted'),\n ids: z.object({ reportId: statsValidationReportIdSchema }).strict(),\n })\n .strict();\n\n// A person's pre-Q-Sports baseline was written, and their career line and hall-of-fame entry rebuilt.\nexport const HistoricalStatsUpdatedEventSchema = z\n .object({ type: z.literal('historicalStats.updated'), ids: z.object({ userId: userIdSchema }).strict() })\n .strict();\n\n// An admin banned an account or lifted its ban.\nexport const UserStatusChangedEventSchema = z\n .object({ type: z.literal('user.statusChanged'), ids: z.object({ userId: userIdSchema }).strict() })\n .strict();\n\n// An award joined the catalog — its first badge was published.\nexport const AwardDefinitionCreatedEventSchema = z\n .object({ type: z.literal('awardDefinition.created'), ids: z.object({ awardId: awardIdSchema }).strict() })\n .strict();\n\n// An award's document changed: its badge was replaced, or its holder count moved.\nexport const AwardDefinitionUpdatedEventSchema = z\n .object({ type: z.literal('awardDefinition.updated'), ids: z.object({ awardId: awardIdSchema }).strict() })\n .strict();\n\nexport const AwardDefinitionDeletedEventSchema = z\n .object({ type: z.literal('awardDefinition.deleted'), ids: z.object({ awardId: awardIdSchema }).strict() })\n .strict();\n\n// An award was granted to or revoked from some accounts, which may have cleared a featured badge.\n// The accounts are many, so the event names the award; a client holding any profile's awards\n// refreshes them.\nexport const AwardGrantsChangedEventSchema = z\n .object({ type: z.literal('awardGrants.changed'), ids: z.object({ awardId: awardIdSchema }).strict() })\n .strict();\n\n// An account chose which of its awards to feature beside its name.\nexport const FeaturedAwardsChangedEventSchema = z\n .object({ type: z.literal('featuredAwards.changed'), ids: z.object({ userId: userIdSchema }).strict() })\n .strict();\n\n// A hardware loan contract was created, signed, returned, or deleted.\nexport const HardwareLoanContractChangedEventSchema = z\n .object({\n type: z.literal('hardwareLoanContract.changed'),\n ids: z.object({ contractId: hardwareLoanContractIdSchema, refereeUserId: userIdSchema }).strict(),\n })\n .strict();\n\nexport const AdminListChangedEventSchema = z\n .object({ type: z.literal('adminList.changed'), ids: z.object({ userId: userIdSchema }).strict() })\n .strict();\n\n// A new account finished registration: its profile and public identity now exist.\nexport const UserRegisteredEventSchema = z\n .object({ type: z.literal('user.registered'), ids: z.object({ userId: userIdSchema }).strict() })\n .strict();\n\nexport const DisplayNameChangedEventSchema = z\n .object({ type: z.literal('displayName.changed'), ids: z.object({ userId: userIdSchema }).strict() })\n .strict();\n\n// The shared stats beacon moved: stats changed somewhere. The beacon holds only its latest change,\n// not a log of them, so the event names no scope and a watching client refreshes every\n// stats-bearing read.\nexport const StatsBeaconChangedEventSchema = z\n .object({ type: z.literal('statsBeacon.changed'), ids: z.object({}).strict() })\n .strict();\n\nexport const WaiverTemplateCreatedEventSchema = z\n .object({\n type: z.literal('waiverTemplate.created'),\n ids: z.object({ waiverTemplateId: waiverTemplateIdSchema }).strict(),\n })\n .strict();\n\n// A template's wording changed: a new version was published.\nexport const WaiverTemplateUpdatedEventSchema = z\n .object({\n type: z.literal('waiverTemplate.updated'),\n ids: z.object({ waiverTemplateId: waiverTemplateIdSchema }).strict(),\n })\n .strict();\n\n// A template left the admin's list — deleted, or retired because something still names it.\nexport const WaiverTemplateDeletedEventSchema = z\n .object({\n type: z.literal('waiverTemplate.deleted'),\n ids: z.object({ waiverTemplateId: waiverTemplateIdSchema }).strict(),\n })\n .strict();\n\nexport const GameLocationCreatedEventSchema = z\n .object({\n type: z.literal('gameLocation.created'),\n ids: z.object({ gameLocationId: gameLocationIdSchema }).strict(),\n })\n .strict();\n\n// A venue's document changed — its own fields through the location callables, or its picture\n// through the upload pipeline.\nexport const GameLocationUpdatedEventSchema = z\n .object({\n type: z.literal('gameLocation.updated'),\n ids: z.object({ gameLocationId: gameLocationIdSchema }).strict(),\n })\n .strict();\n\nexport const GameLocationDeletedEventSchema = z\n .object({\n type: z.literal('gameLocation.deleted'),\n ids: z.object({ gameLocationId: gameLocationIdSchema }).strict(),\n })\n .strict();\n\n// A team's document changed: an admin renamed it or changed its type, or the picture core changed its\n// gallery summary.\nexport const LeagueTeamUpdatedEventSchema = z\n .object({\n type: z.literal('leagueTeam.updated'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),\n })\n .strict();\n\n// An admin deleted a team that never played, with its memberships, ghosts, invitations, join\n// requests, contact phone, gallery, and unplayed games.\nexport const LeagueTeamDeletedEventSchema = z\n .object({\n type: z.literal('leagueTeam.deleted'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),\n })\n .strict();\n\n// An admin's deletion of a team stopped short: some of the team's games, ghost players, invitations,\n// join requests, or memberships are gone, and the team, with its contact phone, still stands.\nexport const LeagueTeamDeletionAdvancedEventSchema = z\n .object({\n type: z.literal('leagueTeam.deletionAdvanced'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),\n })\n .strict();\n\n// A ghost player's removal took the ghost's entries off finished games of its team — each one it sat\n// out without a stat, so no result or total changed, but the games' finalized records no longer name\n// it. The event names no game.\nexport const GhostPlayerFinishedEntriesRemovedEventSchema = z\n .object({\n type: z.literal('ghostPlayer.finishedEntriesRemoved'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema, ghostUserId: userIdSchema }).strict(),\n })\n .strict();\n\n// An admin set a team's contact phone, which only admins read.\nexport const LeagueTeamContactUpdatedEventSchema = z\n .object({\n type: z.literal('leagueTeamContact.updated'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),\n })\n .strict();\n\n// The landing page's document changed — its copy, or its gallery summary. There is one landing page,\n// so the event names none.\nexport const LandingPageUpdatedEventSchema = z\n .object({ type: z.literal('landingPage.updated'), ids: z.object({}).strict() })\n .strict();\n\n// A picture joined a gallery. It carries the whole new entry, so a client holding that gallery's\n// pages patches the entry in where its position sorts, and no gallery page is ever refetched for it\n// (FRONTEND-103). The owner's summary changed too, and the owner's own update event says so.\nexport const GalleryPictureAddedEventSchema = z\n .object({\n type: z.literal('galleryPicture.added'),\n ids: z\n .object({ ownerKind: galleryOwnerKindSchema, ownerId: z.string().min(1), pictureId: pictureIdSchema })\n .strict(),\n position: z.string().min(1),\n createdAt: epochMsSchema,\n })\n .strict();\n\n// A dead-lettered row was replayed back onto its pipeline's queue, so the operator's dead-letter list\n// loses it. The list spans every lane, so the event names none.\nexport const DeadLetterReplayedEventSchema = z\n .object({ type: z.literal('deadLetter.replayed'), ids: z.object({}).strict() })\n .strict();\n\n// The migration console's state moved: an action ran a page, a step was recorded, or the cutover\n// was. There is one console, so the event names none.\nexport const MigrationConsoleChangedEventSchema = z\n .object({ type: z.literal('migrationConsole.changed'), ids: z.object({}).strict() })\n .strict();\n\nexport const DomainEventSchema = z.discriminatedUnion('type', [\n LeagueCreatedEventSchema,\n LeagueUpdatedEventSchema,\n LeagueModeSwitchedEventSchema,\n LeagueTeamCreatedEventSchema,\n TeamRosterChangedEventSchema,\n SignedWaiverCreatedEventSchema,\n GhostPlayerLinkedEventSchema,\n TeamJoinRequestSubmittedEventSchema,\n TeamJoinRequestCancelledEventSchema,\n TeamJoinRequestAnsweredEventSchema,\n TeamInvitationSentEventSchema,\n TeamInvitationCancelledEventSchema,\n TeamInvitationAnsweredEventSchema,\n LeagueFreeAgentSignedUpEventSchema,\n LeagueFreeAgentRemovedEventSchema,\n SportGameFinalizedEventSchema,\n SportGameReopenedEventSchema,\n SportGameStatEventsRecordedEventSchema,\n SportGameAbsenceChangedEventSchema,\n SportGameMemoUpdatedEventSchema,\n SportGameJumpBallChangedEventSchema,\n LeagueScheduleChangedEventSchema,\n SportGameUpdatedEventSchema,\n SportGameDeletedEventSchema,\n StatsRecalculatedEventSchema,\n SportGameStatsCorrectedEventSchema,\n StatsValidationReportedEventSchema,\n StatsValidationReportDeletedEventSchema,\n HistoricalStatsUpdatedEventSchema,\n UserStatusChangedEventSchema,\n AwardDefinitionCreatedEventSchema,\n AwardDefinitionUpdatedEventSchema,\n AwardDefinitionDeletedEventSchema,\n AwardGrantsChangedEventSchema,\n FeaturedAwardsChangedEventSchema,\n HardwareLoanContractChangedEventSchema,\n AdminListChangedEventSchema,\n UserRegisteredEventSchema,\n DisplayNameChangedEventSchema,\n StatsBeaconChangedEventSchema,\n WaiverTemplateCreatedEventSchema,\n WaiverTemplateUpdatedEventSchema,\n WaiverTemplateDeletedEventSchema,\n GameLocationCreatedEventSchema,\n GameLocationUpdatedEventSchema,\n GameLocationDeletedEventSchema,\n LeagueTeamUpdatedEventSchema,\n LeagueTeamDeletedEventSchema,\n LeagueTeamDeletionAdvancedEventSchema,\n GhostPlayerFinishedEntriesRemovedEventSchema,\n LeagueTeamContactUpdatedEventSchema,\n LandingPageUpdatedEventSchema,\n GalleryPictureAddedEventSchema,\n DeadLetterReplayedEventSchema,\n MigrationConsoleChangedEventSchema,\n]);\nexport type DomainEvent = z.infer<typeof DomainEventSchema>;\nexport type DomainEventType = DomainEvent['type'];\n"]}
|
|
1
|
+
{"version":3,"file":"domain-events.js","sourceRoot":"","sources":["../../src/domain-events/domain-events.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,EAAE;AACF,mGAAmG;AACnG,wGAAwG;AACxG,6CAA6C;AAE7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,cAAc,EACd,cAAc,EACd,6BAA6B,EAC7B,YAAY,EACZ,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,sBAA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AC,MAAM,EAAE,EAAE,CAAC;KACnF,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC5D,wBAAwB;IACxB,wBAAwB;IACxB,6BAA6B;IAC7B,4BAA4B;IAC5B,4BAA4B;IAC5B,8BAA8B;IAC9B,4BAA4B;IAC5B,mCAAmC;IACnC,mCAAmC;IACnC,kCAAkC;IAClC,6BAA6B;IAC7B,kCAAkC;IAClC,iCAAiC;IACjC,kCAAkC;IAClC,iCAAiC;IACjC,6BAA6B;IAC7B,4BAA4B;IAC5B,sCAAsC;IACtC,kCAAkC;IAClC,+BAA+B;IAC/B,mCAAmC;IACnC,gCAAgC;IAChC,2BAA2B;IAC3B,2BAA2B;IAC3B,4BAA4B;IAC5B,kCAAkC;IAClC,kCAAkC;IAClC,uCAAuC;IACvC,iCAAiC;IACjC,4BAA4B;IAC5B,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,6BAA6B;IAC7B,gCAAgC;IAChC,sCAAsC;IACtC,2BAA2B;IAC3B,yBAAyB;IACzB,6BAA6B;IAC7B,6BAA6B;IAC7B,gCAAgC;IAChC,gCAAgC;IAChC,gCAAgC;IAChC,8BAA8B;IAC9B,8BAA8B;IAC9B,8BAA8B;IAC9B,4BAA4B;IAC5B,4BAA4B;IAC5B,qCAAqC;IACrC,4CAA4C;IAC5C,mCAAmC;IACnC,6BAA6B;IAC7B,8BAA8B;IAC9B,6BAA6B;IAC7B,kCAAkC;CACnC,CAAC,CAAC","sourcesContent":["// The DomainEvent union — the vocabulary of \"what happened\" that both sides of the boundary share.\n//\n// A callable or trigger names what it changed with one of these; the client alone maps an event to\n// the query-key families it makes stale (the invalidation registry is app-local, FRONTEND-102). The two\n// sides share event names, never cache keys.\n\nimport { z } from 'zod';\nimport {\n epochMsSchema,\n gameIdSchema,\n hardwareLoanContractIdSchema,\n leagueIdSchema,\n sportKeySchema,\n statsValidationReportIdSchema,\n teamIdSchema,\n userIdSchema,\n} from '../doc-schemas/atoms.js';\nimport { awardIdSchema } from '../doc-schemas/catalogs.js';\nimport { gameLocationIdSchema } from '../doc-schemas/game-location.js';\nimport { galleryOwnerKindSchema, pictureIdSchema } from '../doc-schemas/gallery.js';\nimport { waiverTemplateIdSchema } from '../doc-schemas/waiver-template.js';\n\nexport const LeagueCreatedEventSchema = z\n .object({\n type: z.literal('league.created'),\n ids: z.object({ leagueId: leagueIdSchema }).strict(),\n })\n .strict();\n\nexport const LeagueUpdatedEventSchema = z\n .object({\n type: z.literal('league.updated'),\n ids: z.object({ leagueId: leagueIdSchema }).strict(),\n })\n .strict();\n\n// The league changed mode, and with it the `teamType` of every one of its teams.\nexport const LeagueModeSwitchedEventSchema = z\n .object({\n type: z.literal('league.modeSwitched'),\n ids: z.object({ leagueId: leagueIdSchema }).strict(),\n })\n .strict();\n\nexport const LeagueTeamCreatedEventSchema = z\n .object({\n type: z.literal('leagueTeam.created'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),\n })\n .strict();\n\n// A member was added, removed, or changed role on a team — by any path, ghosts included.\nexport const TeamRosterChangedEventSchema = z\n .object({\n type: z.literal('teamRoster.changed'),\n ids: z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })\n .strict(),\n })\n .strict();\n\n// A waiver was signed for a person in a league — by them, or for a ghost by a witness.\nexport const SignedWaiverCreatedEventSchema = z\n .object({\n type: z.literal('signedWaiver.created'),\n ids: z.object({ leagueId: leagueIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\nexport const GhostPlayerLinkedEventSchema = z\n .object({\n type: z.literal('ghostPlayer.linked'),\n ids: z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n ghostUserId: userIdSchema,\n realUserId: userIdSchema,\n })\n .strict(),\n })\n .strict();\n\nexport const TeamJoinRequestSubmittedEventSchema = z\n .object({\n type: z.literal('teamJoinRequest.submitted'),\n ids: z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })\n .strict(),\n })\n .strict();\n\n// The requester withdrew their join request.\nexport const TeamJoinRequestCancelledEventSchema = z\n .object({\n type: z.literal('teamJoinRequest.cancelled'),\n ids: z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })\n .strict(),\n })\n .strict();\n\n// The team accepted or rejected a join request. An acceptance also changed the roster.\nexport const TeamJoinRequestAnsweredEventSchema = z\n .object({\n type: z.literal('teamJoinRequest.answered'),\n ids: z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })\n .strict(),\n })\n .strict();\n\n// The team invited a person. `userId` is the invitee.\nexport const TeamInvitationSentEventSchema = z\n .object({\n type: z.literal('teamInvitation.sent'),\n ids: z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })\n .strict(),\n })\n .strict();\n\n// The team withdrew an invitation. `userId` is the invitee.\nexport const TeamInvitationCancelledEventSchema = z\n .object({\n type: z.literal('teamInvitation.cancelled'),\n ids: z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })\n .strict(),\n })\n .strict();\n\n// The invitee accepted or declined an invitation. An acceptance also changed the roster.\nexport const TeamInvitationAnsweredEventSchema = z\n .object({\n type: z.literal('teamInvitation.answered'),\n ids: z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, userId: userIdSchema })\n .strict(),\n })\n .strict();\n\n// A player signed up as a free agent in a league.\nexport const LeagueFreeAgentSignedUpEventSchema = z\n .object({\n type: z.literal('leagueFreeAgent.signedUp'),\n ids: z.object({ leagueId: leagueIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\n// A player's free-agent signup ended: they withdrew it, or an admin placed them on a team.\nexport const LeagueFreeAgentRemovedEventSchema = z\n .object({\n type: z.literal('leagueFreeAgent.removed'),\n ids: z.object({ leagueId: leagueIdSchema, userId: userIdSchema }).strict(),\n })\n .strict();\n\nexport const SportGameFinalizedEventSchema = z\n .object({\n type: z.literal('sportGame.finalized'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\nexport const SportGameReopenedEventSchema = z\n .object({\n type: z.literal('sportGame.reopened'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A scoring write stored stat events on a live game: its rollup and score moved.\nexport const SportGameStatEventsRecordedEventSchema = z\n .object({\n type: z.literal('sportGame.statEventsRecorded'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A roster entry of a live game was marked absent or present.\nexport const SportGameAbsenceChangedEventSchema = z\n .object({\n type: z.literal('sportGame.absenceChanged'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A scorer's note on one person in a live game changed.\nexport const SportGameMemoUpdatedEventSchema = z\n .object({\n type: z.literal('sportGame.memoUpdated'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// The jump-ball possession arrow of a live basketball game moved.\nexport const SportGameJumpBallChangedEventSchema = z\n .object({\n type: z.literal('sportGame.jumpBallChanged'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A league's schedule changed as a whole: a week was created, its shared fields edited, or it was\n// deleted, or a game was added to a week. Any of the league's games may have been added, changed, or\n// removed.\nexport const LeagueScheduleChangedEventSchema = z\n .object({\n type: z.literal('leagueSchedule.changed'),\n ids: z.object({ leagueId: leagueIdSchema }).strict(),\n })\n .strict();\n\n// One game's schedule changed — its week, start time, or venue — or its teams were replaced, which\n// replaces their roster entries and stat lines too.\nexport const SportGameUpdatedEventSchema = z\n .object({\n type: z.literal('sportGame.updated'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// One game was deleted with its events and roster.\nexport const SportGameDeletedEventSchema = z\n .object({\n type: z.literal('sportGame.deleted'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A rebuild ran. Every scope id is optional: a rebuild covers one league, every league, one user,\n// every user, or one sport's hall of fame (for one user or the whole sport).\nexport const StatsRecalculatedEventSchema = z\n .object({\n type: z.literal('stats.recalculated'),\n ids: z\n .object({\n userId: userIdSchema.optional(),\n leagueId: leagueIdSchema.optional(),\n sportKey: sportKeySchema.optional(),\n })\n .strict(),\n })\n .strict();\n\n// A game's numbers were corrected or restored from its events in Fix stats; for a completed game,\n// every destination it feeds moved with them.\nexport const SportGameStatsCorrectedEventSchema = z\n .object({\n type: z.literal('sportGame.statsCorrected'),\n ids: z.object({ leagueId: leagueIdSchema, gameId: gameIdSchema }).strict(),\n })\n .strict();\n\n// A stats check wrote or advanced its report.\nexport const StatsValidationReportedEventSchema = z\n .object({\n type: z.literal('statsValidation.reported'),\n ids: z.object({ reportId: z.string().min(1) }).strict(),\n })\n .strict();\n\n// An admin deleted a stats check's report.\nexport const StatsValidationReportDeletedEventSchema = z\n .object({\n type: z.literal('statsValidation.reportDeleted'),\n ids: z.object({ reportId: statsValidationReportIdSchema }).strict(),\n })\n .strict();\n\n// A person's pre-Q-Sports baseline was written, and their career line and hall-of-fame entry rebuilt.\nexport const HistoricalStatsUpdatedEventSchema = z\n .object({\n type: z.literal('historicalStats.updated'),\n ids: z.object({ userId: userIdSchema }).strict(),\n })\n .strict();\n\n// An admin banned an account or lifted its ban.\nexport const UserStatusChangedEventSchema = z\n .object({\n type: z.literal('user.statusChanged'),\n ids: z.object({ userId: userIdSchema }).strict(),\n })\n .strict();\n\n// An award joined the catalog — its first badge was published.\nexport const AwardDefinitionCreatedEventSchema = z\n .object({\n type: z.literal('awardDefinition.created'),\n ids: z.object({ awardId: awardIdSchema }).strict(),\n })\n .strict();\n\n// An award's document changed: its badge was replaced, or its holder count moved.\nexport const AwardDefinitionUpdatedEventSchema = z\n .object({\n type: z.literal('awardDefinition.updated'),\n ids: z.object({ awardId: awardIdSchema }).strict(),\n })\n .strict();\n\nexport const AwardDefinitionDeletedEventSchema = z\n .object({\n type: z.literal('awardDefinition.deleted'),\n ids: z.object({ awardId: awardIdSchema }).strict(),\n })\n .strict();\n\n// An award was granted to or revoked from some accounts, which may have cleared a featured badge.\n// The accounts are many, so the event names the award; a client holding any profile's awards\n// refreshes them.\nexport const AwardGrantsChangedEventSchema = z\n .object({\n type: z.literal('awardGrants.changed'),\n ids: z.object({ awardId: awardIdSchema }).strict(),\n })\n .strict();\n\n// An account chose which of its awards to feature beside its name.\nexport const FeaturedAwardsChangedEventSchema = z\n .object({\n type: z.literal('featuredAwards.changed'),\n ids: z.object({ userId: userIdSchema }).strict(),\n })\n .strict();\n\n// A hardware loan contract was created, signed, returned, or deleted.\nexport const HardwareLoanContractChangedEventSchema = z\n .object({\n type: z.literal('hardwareLoanContract.changed'),\n ids: z\n .object({ contractId: hardwareLoanContractIdSchema, refereeUserId: userIdSchema })\n .strict(),\n })\n .strict();\n\nexport const AdminListChangedEventSchema = z\n .object({\n type: z.literal('adminList.changed'),\n ids: z.object({ userId: userIdSchema }).strict(),\n })\n .strict();\n\n// A new account finished registration: its profile and public identity now exist.\nexport const UserRegisteredEventSchema = z\n .object({ type: z.literal('user.registered'), ids: z.object({ userId: userIdSchema }).strict() })\n .strict();\n\nexport const DisplayNameChangedEventSchema = z\n .object({\n type: z.literal('displayName.changed'),\n ids: z.object({ userId: userIdSchema }).strict(),\n })\n .strict();\n\n// The shared stats beacon moved: stats changed somewhere. The beacon holds only its latest change,\n// not a log of them, so the event names no scope and a watching client refreshes every\n// stats-bearing read.\nexport const StatsBeaconChangedEventSchema = z\n .object({ type: z.literal('statsBeacon.changed'), ids: z.object({}).strict() })\n .strict();\n\nexport const WaiverTemplateCreatedEventSchema = z\n .object({\n type: z.literal('waiverTemplate.created'),\n ids: z.object({ waiverTemplateId: waiverTemplateIdSchema }).strict(),\n })\n .strict();\n\n// A template's wording changed: a new version was published.\nexport const WaiverTemplateUpdatedEventSchema = z\n .object({\n type: z.literal('waiverTemplate.updated'),\n ids: z.object({ waiverTemplateId: waiverTemplateIdSchema }).strict(),\n })\n .strict();\n\n// A template left the admin's list — deleted, or retired because something still names it.\nexport const WaiverTemplateDeletedEventSchema = z\n .object({\n type: z.literal('waiverTemplate.deleted'),\n ids: z.object({ waiverTemplateId: waiverTemplateIdSchema }).strict(),\n })\n .strict();\n\nexport const GameLocationCreatedEventSchema = z\n .object({\n type: z.literal('gameLocation.created'),\n ids: z.object({ gameLocationId: gameLocationIdSchema }).strict(),\n })\n .strict();\n\n// A venue's document changed — its own fields through the location callables, or its picture\n// through the upload pipeline.\nexport const GameLocationUpdatedEventSchema = z\n .object({\n type: z.literal('gameLocation.updated'),\n ids: z.object({ gameLocationId: gameLocationIdSchema }).strict(),\n })\n .strict();\n\nexport const GameLocationDeletedEventSchema = z\n .object({\n type: z.literal('gameLocation.deleted'),\n ids: z.object({ gameLocationId: gameLocationIdSchema }).strict(),\n })\n .strict();\n\n// A team's document changed: an admin renamed it or changed its type, or the picture core changed its\n// gallery summary.\nexport const LeagueTeamUpdatedEventSchema = z\n .object({\n type: z.literal('leagueTeam.updated'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),\n })\n .strict();\n\n// An admin deleted a team that never played, with its memberships, ghosts, invitations, join\n// requests, contact phone, gallery, and unplayed games.\nexport const LeagueTeamDeletedEventSchema = z\n .object({\n type: z.literal('leagueTeam.deleted'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),\n })\n .strict();\n\n// An admin's deletion of a team stopped short: some of the team's games, ghost players, invitations,\n// join requests, or memberships are gone, and the team, with its contact phone, still stands.\nexport const LeagueTeamDeletionAdvancedEventSchema = z\n .object({\n type: z.literal('leagueTeam.deletionAdvanced'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),\n })\n .strict();\n\n// A ghost player's removal took the ghost's entries off finished games of its team — each one it sat\n// out without a stat, so no result or total changed, but the games' finalized records no longer name\n// it. The event names no game.\nexport const GhostPlayerFinishedEntriesRemovedEventSchema = z\n .object({\n type: z.literal('ghostPlayer.finishedEntriesRemoved'),\n ids: z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, ghostUserId: userIdSchema })\n .strict(),\n })\n .strict();\n\n// An admin set a team's contact phone, which only admins read.\nexport const LeagueTeamContactUpdatedEventSchema = z\n .object({\n type: z.literal('leagueTeamContact.updated'),\n ids: z.object({ leagueId: leagueIdSchema, teamId: teamIdSchema }).strict(),\n })\n .strict();\n\n// The landing page's document changed — its copy, or its gallery summary. There is one landing page,\n// so the event names none.\nexport const LandingPageUpdatedEventSchema = z\n .object({ type: z.literal('landingPage.updated'), ids: z.object({}).strict() })\n .strict();\n\n// A picture joined a gallery. It carries the whole new entry, so a client holding that gallery's\n// pages patches the entry in where its position sorts, and no gallery page is ever refetched for it\n// (FRONTEND-103). The owner's summary changed too, and the owner's own update event says so.\nexport const GalleryPictureAddedEventSchema = z\n .object({\n type: z.literal('galleryPicture.added'),\n ids: z\n .object({\n ownerKind: galleryOwnerKindSchema,\n ownerId: z.string().min(1),\n pictureId: pictureIdSchema,\n })\n .strict(),\n position: z.string().min(1),\n createdAt: epochMsSchema,\n })\n .strict();\n\n// A dead-lettered row was replayed back onto its pipeline's queue, so the operator's dead-letter list\n// loses it. The list spans every lane, so the event names none.\nexport const DeadLetterReplayedEventSchema = z\n .object({ type: z.literal('deadLetter.replayed'), ids: z.object({}).strict() })\n .strict();\n\n// The migration console's state moved: an action ran a page, a step was recorded, or the cutover\n// was. There is one console, so the event names none.\nexport const MigrationConsoleChangedEventSchema = z\n .object({ type: z.literal('migrationConsole.changed'), ids: z.object({}).strict() })\n .strict();\n\nexport const DomainEventSchema = z.discriminatedUnion('type', [\n LeagueCreatedEventSchema,\n LeagueUpdatedEventSchema,\n LeagueModeSwitchedEventSchema,\n LeagueTeamCreatedEventSchema,\n TeamRosterChangedEventSchema,\n SignedWaiverCreatedEventSchema,\n GhostPlayerLinkedEventSchema,\n TeamJoinRequestSubmittedEventSchema,\n TeamJoinRequestCancelledEventSchema,\n TeamJoinRequestAnsweredEventSchema,\n TeamInvitationSentEventSchema,\n TeamInvitationCancelledEventSchema,\n TeamInvitationAnsweredEventSchema,\n LeagueFreeAgentSignedUpEventSchema,\n LeagueFreeAgentRemovedEventSchema,\n SportGameFinalizedEventSchema,\n SportGameReopenedEventSchema,\n SportGameStatEventsRecordedEventSchema,\n SportGameAbsenceChangedEventSchema,\n SportGameMemoUpdatedEventSchema,\n SportGameJumpBallChangedEventSchema,\n LeagueScheduleChangedEventSchema,\n SportGameUpdatedEventSchema,\n SportGameDeletedEventSchema,\n StatsRecalculatedEventSchema,\n SportGameStatsCorrectedEventSchema,\n StatsValidationReportedEventSchema,\n StatsValidationReportDeletedEventSchema,\n HistoricalStatsUpdatedEventSchema,\n UserStatusChangedEventSchema,\n AwardDefinitionCreatedEventSchema,\n AwardDefinitionUpdatedEventSchema,\n AwardDefinitionDeletedEventSchema,\n AwardGrantsChangedEventSchema,\n FeaturedAwardsChangedEventSchema,\n HardwareLoanContractChangedEventSchema,\n AdminListChangedEventSchema,\n UserRegisteredEventSchema,\n DisplayNameChangedEventSchema,\n StatsBeaconChangedEventSchema,\n WaiverTemplateCreatedEventSchema,\n WaiverTemplateUpdatedEventSchema,\n WaiverTemplateDeletedEventSchema,\n GameLocationCreatedEventSchema,\n GameLocationUpdatedEventSchema,\n GameLocationDeletedEventSchema,\n LeagueTeamUpdatedEventSchema,\n LeagueTeamDeletedEventSchema,\n LeagueTeamDeletionAdvancedEventSchema,\n GhostPlayerFinishedEntriesRemovedEventSchema,\n LeagueTeamContactUpdatedEventSchema,\n LandingPageUpdatedEventSchema,\n GalleryPictureAddedEventSchema,\n DeadLetterReplayedEventSchema,\n MigrationConsoleChangedEventSchema,\n]);\nexport type DomainEvent = z.infer<typeof DomainEventSchema>;\nexport type DomainEventType = DomainEvent['type'];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-ids.d.ts","sourceRoot":"","sources":["../../src/ids/notification-ids.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAOvE,wBAAgB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"notification-ids.d.ts","sourceRoot":"","sources":["../../src/ids/notification-ids.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAOvE,wBAAgB,2BAA2B,CACzC,gBAAgB,EAAE,qBAAqB,EACvC,OAAO,EAAE,MAAM,GACd,MAAM,CAER;AAKD,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,MAAM,CAER;AAID,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAEjG;AAKD,wBAAgB,gCAAgC,CAC9C,cAAc,EAAE,MAAM,EACtB,0BAA0B,EAAE,MAAM,GACjC,MAAM,CAER;AAKD,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE1F;AAED,wBAAgB,gCAAgC,CAC9C,EAAE,EAAE,MAAM,GACT,gCAAgC,GAAG,IAAI,CAOzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-ids.js","sourceRoot":"","sources":["../../src/ids/notification-ids.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,mFAAmF;AACnF,EAAE;AACF,kGAAkG;AAClG,uBAAuB;AAEvB,OAAO,EAAE,CAAC,EAAE,MAAM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AqB,CAAC,CAAC;AAClF,CAAC;AAUD,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,MAAM,UAAU,gCAAgC,CAAC,MAAc,EAAE,SAAiB;IAChF,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,EAAU;IAEV,MAAM,WAAW,GAAG,EAAE,CAAC,MAAM,GAAG,iBAAiB,GAAG,qBAAqB,CAAC,MAAM,CAAC;IACjF,IAAI,WAAW,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,qBAAqB,EAAE,WAAW,CAAC;QAAE,OAAO,IAAI,CAAC;IACvF,MAAM,MAAM,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACvE,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["// Admin notification ids. Each is deterministic from what it names, so a retried write lands on the\n// document the first attempt wrote and never beside it (BACKEND-304, BACKEND-306).\n//\n// A shared card's own id is not here: notification-core derives it from the notification type and\n// the aggregation key.\n\nimport { z } from 'zod';\nimport type { AdminNotificationType } from '../types/notifications.js';\nimport { COMPOUND_ID_SEPARATOR } from './compound-ids.js';\n\nconst requestIdSchema = z.uuid();\n\n// notificationDeliveries/{notificationType}_{eventId} — one occurrence of one notification type. The\n// type leads, so two types recording the same action never share a row.\nexport function buildNotificationDeliveryId(\n notificationType: AdminNotificationType,\n eventId: string,\n): string {\n return [notificationType, eventId].join(COMPOUND_ID_SEPARATOR);\n}\n\n// A player's free-agent signup in a league. A player can sign up, be placed on a team, and sign up\n// again later, so the signup's time is part of the id: a later signup is a new occurrence, while a\n// retry of the same signup is the same one.\nexport function buildLeagueFreeAgentSignedUpEventId(\n leagueId: string,\n userId: string,\n signedUpAt: number,\n): string {\n return [leagueId, String(signedUpAt), userId].join(COMPOUND_ID_SEPARATOR);\n}\n\n// adminNotificationHistory/{requestId}_{notificationId} — one archive of one card. The archive's\n// request id alone would let one \"archive all\" run's cards collide on one entry.\nexport function buildAdminNotificationHistoryId(requestId: string, notificationId: string): string {\n return [requestId, notificationId].join(COMPOUND_ID_SEPARATOR);\n}\n\n// The replay key an archive stores on its history entry: the card, and the generation of it the\n// admin saw. An archive replayed with the same request finds its entry and the same key, and changes\n// nothing.\nexport function buildAdminNotificationArchiveKey(\n notificationId: string,\n observedActivityGeneration: string,\n): string {\n return [notificationId, observedActivityGeneration].join(COMPOUND_ID_SEPARATOR);\n}\n\n// notificationArchiveAllJobs/{userId}_{requestId} — one admin's one \"archive all\" request. A retry of\n// the request finds the job its first attempt created. The request id is a UUID, so it is the part\n// read from the end.\nexport interface NotificationArchiveAllJobIdParts {\n userId: string;\n requestId: string;\n}\n\nconst REQUEST_ID_LENGTH = 36;\n\nexport function buildNotificationArchiveAllJobId(userId: string, requestId: string): string {\n return [userId, requestId].join(COMPOUND_ID_SEPARATOR);\n}\n\nexport function parseNotificationArchiveAllJobId(\n id: string,\n): NotificationArchiveAllJobIdParts | null {\n const separatorAt = id.length - REQUEST_ID_LENGTH - COMPOUND_ID_SEPARATOR.length;\n if (separatorAt < 1 || !id.startsWith(COMPOUND_ID_SEPARATOR, separatorAt)) return null;\n const userId = id.slice(0, separatorAt);\n const requestId = id.slice(separatorAt + COMPOUND_ID_SEPARATOR.length);\n if (userId.includes('/') || !requestIdSchema.safeParse(requestId).success) return null;\n return { userId, requestId };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture-ids.d.ts","sourceRoot":"","sources":["../../src/ids/picture-ids.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"picture-ids.d.ts","sourceRoot":"","sources":["../../src/ids/picture-ids.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAKnE,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAElD;AAID;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture-ids.js","sourceRoot":"","sources":["../../src/ids/picture-ids.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,EAAE;AACF,kGAAkG;AAClG,oGAAoG;AACpG,qGAAqG;AACrG,6EAA6E;AAI7E,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"picture-ids.js","sourceRoot":"","sources":["../../src/ids/picture-ids.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,EAAE;AACF,kGAAkG;AAClG,oGAAoG;AACpG,qGAAqG;AACrG,6EAA6E;AAI7E,MAAM,kBAAkB,GACtB,2EAA2E,CAAC;AAE9E,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,4BAA4B,GAAG,SAAS,CAAC;AAE/C;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,SAA2B,EAAE,OAAe;IACnF,OAAO,GAAG,4BAA4B,IAAI,SAAS,IAAI,OAAO,EAAE,CAAC;AACnE,CAAC","sourcesContent":["// Upload and picture ids.\n//\n// A staging id is minted by the uploading client as a UUID (the migration console's picture carry\n// mints name-based ones). It names the staged object, and for a picture it is also the upload row's\n// id and the picture's id for as long as the picture exists. Only the lowercase form is accepted, so\n// a path the server rebuilds from the id can be compared for exact equality.\n\nimport type { GalleryOwnerKind } from '../types/picture-owners.js';\n\nconst STAGING_ID_PATTERN =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;\n\nexport function isStagingId(value: string): boolean {\n return STAGING_ID_PATTERN.test(value);\n}\n\nconst GALLERY_RETIREMENT_ID_PREFIX = 'gallery';\n\n/**\n * The `pictureRetirements` id of a whole gallery, written when its owner is deleted. A single\n * picture's retirement is keyed by the picture id, which is a UUID and never starts with this\n * prefix, so the two families cannot collide.\n */\nexport function buildGalleryRetirementId(ownerKind: GalleryOwnerKind, ownerId: string): string {\n return `${GALLERY_RETIREMENT_ID_PREFIX}_${ownerKind}_${ownerId}`;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat-event-ids.d.ts","sourceRoot":"","sources":["../../src/ids/stat-event-ids.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtE;AAGD,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEtD;AAOD,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAE7D;AAGD,wBAAgB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"stat-event-ids.d.ts","sourceRoot":"","sources":["../../src/ids/stat-event-ids.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GA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,UAAU,sBAAsB,CAAC,KAAa;IAClD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,UAAU,CAAC,+DAA+D,KAAK,GAAG,CAAC,CAAC;IAChG,CAAC;IACD,OAAO,OAAO,qBAAqB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,6BAA6B,EAAE,GAAG,CAAC,EAAE,CAAC;AACrG,CAAC","sourcesContent":["// Ids of the stat event store: `sportGames/{gameId}/gameStatEvents/{eventId}` and the pages of a\n// completed game's finalized record, `sportGames/{gameId}/gameStatHistory/{pageId}`.\n//\n// A sport event's id is minted once, at the tap, and every retry of that event reuses it — the id is\n// what makes a re-send an acknowledgement rather than a second application (SPORT-102). The two\n// store-level events take ids derived from what they act on, so a target has at most one void and a\n// correction operation writes at most one correction per line and field.\n\nimport { COMPOUND_ID_SEPARATOR } from './compound-ids.js';\nimport type { StatCounterKey } from '../types/sports.js';\n\nexport function buildStatEventId(nowMs: number, suffix: string): string {\n return `${nowMs}${COMPOUND_ID_SEPARATOR}${suffix}`;\n}\n\n// The longest sport event id a scoring write accepts — far past a minted id or a copied one.\nexport const MAX_SPORT_STAT_EVENT_ID_LENGTH = 200;\n\n/**\n * Whether `id` can be a sport event's id — minted at the tap, or kept by a copied event: it begins\n * with a digit and holds no path separator, so it names one document of the game's event\n * subcollection and never a void's or a correction's id. A scoring write accepts no other id from\n * its caller, because the id becomes a document path (ARCH-106).\n */\nexport function isSportStatEventId(id: string): boolean {\n return id.length <= MAX_SPORT_STAT_EVENT_ID_LENGTH && /^[0-9]/.test(id) && !id.includes('/');\n}\n\n// Minted event ids — and the ids copied events keep — begin with a digit, so these prefixes never\n// meet one.\nconst STAT_VOID_ID_PREFIX = 'void';\nconst STAT_CORRECTION_ID_PREFIX = 'correction';\n\nexport function buildStatVoidId(targetEventId: string): string {\n return [STAT_VOID_ID_PREFIX, targetEventId].join(COMPOUND_ID_SEPARATOR);\n}\n\n// `lineKey` is the roster-entry id of a player line, or the team id of a team line.\nexport function buildStatCorrectionId(\n operationId: string,\n lineKey: string,\n field: StatCounterKey,\n): string {\n return [STAT_CORRECTION_ID_PREFIX, operationId, lineKey, field].join(COMPOUND_ID_SEPARATOR);\n}\n\n// Zero-padded so the pages of one record sort in page order by id.\nconst STAT_HISTORY_PAGE_INDEX_WIDTH = 4;\n\nexport function buildStatHistoryPageId(index: number): string {\n if (!Number.isSafeInteger(index) || index < 0) {\n throw new RangeError(`A finalized-record page index is a whole number from 0, not ${index}.`);\n }\n return `page${COMPOUND_ID_SEPARATOR}${String(index).padStart(STAT_HISTORY_PAGE_INDEX_WIDTH, '0')}`;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waiver-template-ids.d.ts","sourceRoot":"","sources":["../../src/ids/waiver-template-ids.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"waiver-template-ids.d.ts","sourceRoot":"","sources":["../../src/ids/waiver-template-ids.ts"],"names":[],"mappings":"AAOA,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKpE;AAED,6EAA6E;AAC7E,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waiver-template-ids.js","sourceRoot":"","sources":["../../src/ids/waiver-template-ids.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,iCAAiC,GAAG,GAAG,CAAC;AAC9C,MAAM,kCAAkC,GAAG,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"waiver-template-ids.js","sourceRoot":"","sources":["../../src/ids/waiver-template-ids.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,iCAAiC,GAAG,GAAG,CAAC;AAC9C,MAAM,kCAAkC,GAAG,IAAI,MAAM,CACnD,IAAI,iCAAiC,cAAc,CACpD,CAAC;AAEF,MAAM,UAAU,4BAA4B,CAAC,OAAe;IAC1D,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,2DAA2D,OAAO,GAAG,CAAC,CAAC;IACzF,CAAC;IACD,OAAO,GAAG,iCAAiC,GAAG,OAAO,EAAE,CAAC;AAC1D,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,4BAA4B,CAAC,SAAiB;IAC5D,MAAM,KAAK,GAAG,kCAAkC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACjE,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACzC,CAAC","sourcesContent":["// The id of one published version of a waiver template: `v{version}`, version counting from 1.\n\nconst WAIVER_TEMPLATE_VERSION_ID_PREFIX = 'v';\nconst WAIVER_TEMPLATE_VERSION_ID_PATTERN = new RegExp(\n `^${WAIVER_TEMPLATE_VERSION_ID_PREFIX}([1-9]\\\\d*)$`,\n);\n\nexport function buildWaiverTemplateVersionId(version: number): string {\n if (!Number.isInteger(version) || version < 1) {\n throw new Error(`A waiver template version is a whole number from 1; got ${version}.`);\n }\n return `${WAIVER_TEMPLATE_VERSION_ID_PREFIX}${version}`;\n}\n\n/** The version a `v{version}` id names, or `null` when the id is not one. */\nexport function parseWaiverTemplateVersionId(versionId: string): number | null {\n const match = WAIVER_TEMPLATE_VERSION_ID_PATTERN.exec(versionId);\n return match ? Number(match[1]) : null;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './media/index.js';
|
|
6
|
-
export * from './ids/index.js';
|
|
7
|
-
export * from './domain-events/index.js';
|
|
8
|
-
export * from './input-formats/index.js';
|
|
9
|
-
export * from './migration-console/index.js';
|
|
1
|
+
export * from './input-formats/input-formats.js';
|
|
2
|
+
export * from './migration-console/action-ids.js';
|
|
3
|
+
export * from './migration-console/manifest.js';
|
|
4
|
+
export * from './migration-console/run-state.js';
|
|
10
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './domain-events/index.js';
|
|
8
|
-
export * from './input-formats/index.js';
|
|
9
|
-
export * from './migration-console/index.js';
|
|
1
|
+
// The package root carries only the modules no folder entry owns; every other definition is exported
|
|
2
|
+
// by its own folder's entry alone (ARCH-203).
|
|
3
|
+
export * from './input-formats/input-formats.js';
|
|
4
|
+
export * from './migration-console/action-ids.js';
|
|
5
|
+
export * from './migration-console/manifest.js';
|
|
6
|
+
export * from './migration-console/run-state.js';
|
|
10
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,8CAA8C;AAE9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC","sourcesContent":["// The package root carries only the modules no folder entry owns; every other definition is exported\n// by its own folder's entry alone (ARCH-203).\n\nexport * from './input-formats/input-formats.js';\nexport * from './migration-console/action-ids.js';\nexport * from './migration-console/manifest.js';\nexport * from './migration-console/run-state.js';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-formats.d.ts","sourceRoot":"","sources":["../../src/input-formats/input-formats.ts"],"names":[],"mappings":"AAwCA;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;EAIrC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,+BAA+B;;;;EAI1C,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,sCAAsC;;;;EAIjD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oCAAoC;;;;EAI/C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;EAIjC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;EAIpC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;EAIjC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;EAIrC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC;;;;EAI9C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;EAIlC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;EAIpC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;EAI1C,CAAC;AAEH,yGAAyG;AACzG,eAAO,MAAM,+BAA+B;;;;EAI1C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,yCAAyC;;;;EAIpD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,uCAAuC;;;;EAIlD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;EAI1C,CAAC;AAEH,kGAAkG;AAClG,eAAO,MAAM,gCAAgC;;;;EAI3C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,kCAAkC;;;;;EAK7C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iCAAiC;;;;;EAK5C,CAAC;AAEH,yFAAyF;AACzF,eAAO,MAAM,+BAA+B;;;;EAI1C,CAAC;AAEH,kFAAkF;AAClF,eAAO,MAAM,+BAA+B;;;;EAI1C,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,gCAAgC;;;;EAI3C,CAAC;AAEH,qDAAqD;AACrD,eAAO,MAAM,iCAAiC;;;;EAI5C,CAAC;AAEH,gFAAgF;AAChF,eAAO,MAAM,wBAAwB;;;;EAInC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-formats.js","sourceRoot":"","sources":["../../src/input-formats/input-formats.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,gGAAgG;AAChG,gGAAgG;AAChG,oGAAoG;AACpG,mGAAmG;AACnG,6CAA6C;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,uCAAuC,EACvC,qCAAqC,EACrC,oBAAoB,EACpB,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,oCAAoC,EACpC,oBAAoB,EACpB,+BAA+B,EAC/B,gCAAgC,EAChC,qBAAqB,EACrB,uBAAuB,EACvB,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB,oCAAoC,EACpC,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;A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AAG,EAAE,+BAA+B;CACrC,CAAC,CAAC;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACxD,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,sBAAsB;CAC5B,CAAC,CAAC","sourcesContent":["// The declared formats of the free-text fields a form takes, each built from the limits the field\n// enforces (ARCH-102). ui-core's text inputs and `ConsequenceDialog`'s reason field take only a\n// declaration, never a bare bound, and a field's wire schema is built from the same declaration\n// through `textFieldSchema`, so the form and the wire run the one check and accept exactly the same\n// text. `input-format-core` is server-safe and has no dependencies, so the declarations sit in the\n// package root, which both app roots import.\n\nimport { defineInputFormat } from '@ttt-productions/input-format-core';\nimport {\n MAX_ANNOUNCEMENT_MESSAGE_LENGTH,\n MAX_APP_VERSION_LENGTH,\n MAX_AWARD_NAME_LENGTH,\n MAX_CONTACT_PHONE_LENGTH,\n MAX_DISPLAY_NAME_LENGTH,\n MAX_GAME_LOCATION_MEMO_LENGTH,\n MAX_GAME_LOCATION_NAME_LENGTH,\n MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH,\n MAX_GAME_LOCATION_SUB_LOCATION_LENGTH,\n MAX_GAME_MEMO_LENGTH,\n MAX_LANDING_ABOUT_TEXT_LENGTH,\n MAX_LANDING_HERO_TITLE_LENGTH,\n MAX_LEAGUE_DESCRIPTION_LENGTH,\n MAX_LEAGUE_TITLE_LENGTH,\n MAX_MAINTENANCE_MESSAGE_LENGTH,\n MAX_REPAIR_REASON_LENGTH,\n MAX_SCHEDULE_WEEK_TITLE_LENGTH,\n MAX_TEAM_INVITATION_MESSAGE_LENGTH,\n MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n MAX_TEAM_NAME_LENGTH,\n MAX_WAIVER_TEMPLATE_TEXT_LENGTH,\n MAX_WAIVER_TEMPLATE_TITLE_LENGTH,\n MIN_AWARD_NAME_LENGTH,\n MIN_DISPLAY_NAME_LENGTH,\n MIN_LEAGUE_DESCRIPTION_LENGTH,\n MIN_LEAGUE_TITLE_LENGTH,\n MIN_REPAIR_REASON_LENGTH,\n MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n MIN_TEAM_NAME_LENGTH,\n} from '../constants/business.js';\n\n/**\n * The reason an admin gives for a repair action, as `repairReasonSchema` reads it: trimmed, then\n * bounded by the repair-reason limits, with any character and line breaks allowed.\n */\nexport const REPAIR_REASON_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_REPAIR_REASON_LENGTH,\n max: MAX_REPAIR_REASON_LENGTH,\n});\n\n/**\n * The evidence an operator records for a cutover step the console cannot see done — an export's\n * operation name, a revocation's console record: trimmed, then bounded by the repair-reason limits,\n * line breaks allowed.\n */\nexport const MIGRATION_EVIDENCE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_REPAIR_REASON_LENGTH,\n max: MAX_REPAIR_REASON_LENGTH,\n});\n\n/**\n * A player's message to the team they ask to join, as `teamJoinRequestMessageSchema` reads it:\n * trimmed, then bounded by the join-request message limits, with any character and line breaks\n * allowed.\n */\nexport const TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n max: MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH,\n});\n\n/**\n * The optional note a team sends with an invitation, as `teamInvitationMessageSchema` reads it:\n * trimmed, empty allowed, then bounded by the invitation note limit, line breaks allowed.\n */\nexport const TEAM_INVITATION_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_TEAM_INVITATION_MESSAGE_LENGTH,\n});\n\n/**\n * A scorer's note on one person in a live game (\"red shirt\", \"#9\"), as `gameMemoSchema` reads it:\n * trimmed, one line, empty allowed — an empty memo clears the note — then bounded by the memo cap.\n */\nexport const GAME_MEMO_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 0,\n max: MAX_GAME_MEMO_LENGTH,\n});\n\n/**\n * A person's display name — an account's, or a ghost player's, as both ghost doors and the admin's\n * ghost captain ask for it — as `displayNameSchema` reads it: trimmed, one line, then bounded by the\n * display-name limits.\n */\nexport const DISPLAY_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_DISPLAY_NAME_LENGTH,\n max: MAX_DISPLAY_NAME_LENGTH,\n});\n\n/**\n * A team's name, as `teamNameSchema` reads it at creation and at an admin's rename: trimmed, one\n * line, then bounded by the team-name limits.\n */\nexport const TEAM_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_TEAM_NAME_LENGTH,\n max: MAX_TEAM_NAME_LENGTH,\n});\n\n/**\n * The number the league reaches a team on, as `contactPhoneSchema` reads it: trimmed, one line,\n * required, and bounded by the contact-phone cap. It is kept as typed — no format is imposed.\n */\nexport const CONTACT_PHONE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_CONTACT_PHONE_LENGTH,\n});\n\n/**\n * The account's optional default contact phone on the settings page: the contact-phone format with\n * empty allowed. Empty means remove the saved number — the form sends it as\n * `UpdateAccountSettingsInput.defaultContactPhone: null` — and any other value is held to\n * `CONTACT_PHONE_INPUT_FORMAT`'s trim, one line, and cap.\n */\nexport const OPTIONAL_CONTACT_PHONE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 0,\n max: MAX_CONTACT_PHONE_LENGTH,\n});\n\n/**\n * An award's name in the catalog, as `awardNameSchema` reads it — at creation, sent with the award's\n * first badge: trimmed, one line, then bounded by the award-name limits.\n */\nexport const AWARD_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_AWARD_NAME_LENGTH,\n max: MAX_AWARD_NAME_LENGTH,\n});\n\n/**\n * A league's title, as `leagueTitleSchema` reads it at creation and at the settings edit: trimmed,\n * one line, then bounded by the league-title limits.\n */\nexport const LEAGUE_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: MIN_LEAGUE_TITLE_LENGTH,\n max: MAX_LEAGUE_TITLE_LENGTH,\n});\n\n/**\n * A league's description, as `leagueDescriptionSchema` reads it at creation and at the settings\n * edit: trimmed, then bounded by the league-description limits, line breaks allowed.\n */\nexport const LEAGUE_DESCRIPTION_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: MIN_LEAGUE_DESCRIPTION_LENGTH,\n max: MAX_LEAGUE_DESCRIPTION_LENGTH,\n});\n\n/** A venue's name, as `gameLocationNameSchema` reads it: trimmed, one line, required, within its cap. */\nexport const GAME_LOCATION_NAME_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_GAME_LOCATION_NAME_LENGTH,\n});\n\n/**\n * A venue's street address, as `gameLocationStreetAddressSchema` reads it: trimmed, one line,\n * required, within its cap.\n */\nexport const GAME_LOCATION_STREET_ADDRESS_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH,\n});\n\n/**\n * One court, sheet, or room of a venue, as `gameLocationSubLocationSchema` reads it: trimmed, one\n * line, required, within its cap.\n */\nexport const GAME_LOCATION_SUB_LOCATION_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_GAME_LOCATION_SUB_LOCATION_LENGTH,\n});\n\n/**\n * A venue's memo, as `gameLocationMemoSchema` reads it: trimmed, line breaks allowed, empty allowed —\n * an empty memo means the venue has none — within its cap.\n */\nexport const GAME_LOCATION_MEMO_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_GAME_LOCATION_MEMO_LENGTH,\n});\n\n/** A schedule week's name, as `scheduleWeekTitleSchema` reads it: trimmed, one line, required. */\nexport const SCHEDULE_WEEK_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_SCHEDULE_WEEK_TITLE_LENGTH,\n});\n\n/**\n * A waiver template's title, as `waiverTemplateTitleSchema` reads it. A waiver is a legal artifact a\n * player signs, so its words are kept exactly as typed; it still cannot be blank.\n */\nexport const WAIVER_TEMPLATE_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 1,\n max: MAX_WAIVER_TEMPLATE_TITLE_LENGTH,\n keepAsTyped: true,\n});\n\n/**\n * A waiver template's wording, as `waiverTemplateTextSchema` reads it: the legal text a player signs,\n * kept exactly as typed, line breaks allowed, never blank.\n */\nexport const WAIVER_TEMPLATE_TEXT_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 1,\n max: MAX_WAIVER_TEMPLATE_TEXT_LENGTH,\n keepAsTyped: true,\n});\n\n/** The landing page's hero title: trimmed, one line; blank shows the default heading. */\nexport const LANDING_HERO_TITLE_INPUT_FORMAT = defineInputFormat({\n format: 'singleLine',\n min: 0,\n max: MAX_LANDING_HERO_TITLE_LENGTH,\n});\n\n/** The landing page's about text: trimmed, line breaks allowed, empty allowed. */\nexport const LANDING_ABOUT_TEXT_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_LANDING_ABOUT_TEXT_LENGTH,\n});\n\n/** The message shown while the app is in maintenance; empty shows none. */\nexport const MAINTENANCE_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_MAINTENANCE_MESSAGE_LENGTH,\n});\n\n/** The site announcement banner; empty clears it. */\nexport const ANNOUNCEMENT_MESSAGE_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 0,\n max: MAX_ANNOUNCEMENT_MESSAGE_LENGTH,\n});\n\n/** The published app version the version gate compares against; never blank. */\nexport const APP_VERSION_INPUT_FORMAT = defineInputFormat({\n format: 'none',\n min: 1,\n max: MAX_APP_VERSION_LENGTH,\n});\n"]}
|