@ttt-productions/q-core 0.1.48 → 0.1.50
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/sports.d.ts +0 -13
- package/dist/constants/sports.d.ts.map +1 -1
- package/dist/constants/sports.js +0 -13
- package/dist/constants/sports.js.map +1 -1
- package/dist/constants/text-fields.d.ts +0 -6
- package/dist/constants/text-fields.d.ts.map +1 -1
- package/dist/constants/text-fields.js +0 -6
- package/dist/constants/text-fields.js.map +1 -1
- package/dist/doc-schemas/admin-notifications.d.ts +1 -1
- package/dist/doc-schemas/atoms.d.ts.map +1 -1
- package/dist/doc-schemas/atoms.js +1 -1
- package/dist/doc-schemas/atoms.js.map +1 -1
- package/dist/doc-schemas/audit-event.d.ts +124 -122
- package/dist/doc-schemas/audit-event.d.ts.map +1 -1
- package/dist/doc-schemas/game-stat-history.d.ts +0 -1
- package/dist/doc-schemas/game-stat-history.d.ts.map +1 -1
- package/dist/doc-schemas/game-stats.d.ts +0 -2
- package/dist/doc-schemas/game-stats.d.ts.map +1 -1
- package/dist/doc-schemas/game-stats.js +1 -2
- package/dist/doc-schemas/game-stats.js.map +1 -1
- package/dist/doc-schemas/index.d.ts +2 -1
- package/dist/doc-schemas/index.d.ts.map +1 -1
- package/dist/doc-schemas/index.js +2 -1
- package/dist/doc-schemas/index.js.map +1 -1
- package/dist/doc-schemas/migration-console.d.ts +6 -20
- package/dist/doc-schemas/migration-console.d.ts.map +1 -1
- package/dist/doc-schemas/migration-console.js +2 -7
- package/dist/doc-schemas/migration-console.js.map +1 -1
- package/dist/doc-schemas/pending-media.d.ts +725 -165
- package/dist/doc-schemas/pending-media.d.ts.map +1 -1
- package/dist/doc-schemas/registry.d.ts +385 -292
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +3 -2
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/doc-schemas/stats-changes.d.ts +21 -0
- package/dist/doc-schemas/stats-changes.d.ts.map +1 -0
- package/dist/doc-schemas/stats-changes.js +19 -0
- package/dist/doc-schemas/stats-changes.js.map +1 -0
- package/dist/doc-schemas/stats-job.d.ts +36 -0
- package/dist/doc-schemas/stats-job.d.ts.map +1 -0
- package/dist/doc-schemas/stats-job.js +26 -0
- package/dist/doc-schemas/stats-job.js.map +1 -0
- package/dist/doc-schemas/system.d.ts +1 -1
- package/dist/doc-schemas/system.d.ts.map +1 -1
- package/dist/doc-schemas/system.js +2 -2
- package/dist/doc-schemas/system.js.map +1 -1
- package/dist/domain-events/domain-events.d.ts +337 -91
- package/dist/domain-events/domain-events.d.ts.map +1 -1
- package/dist/domain-events/domain-events.js +189 -83
- package/dist/domain-events/domain-events.js.map +1 -1
- package/dist/ids/index.d.ts +2 -0
- package/dist/ids/index.d.ts.map +1 -1
- package/dist/ids/index.js +2 -0
- package/dist/ids/index.js.map +1 -1
- package/dist/ids/notification-ids.d.ts +2 -4
- package/dist/ids/notification-ids.d.ts.map +1 -1
- package/dist/ids/notification-ids.js +3 -12
- package/dist/ids/notification-ids.js.map +1 -1
- package/dist/ids/request-job-ids.d.ts +7 -0
- package/dist/ids/request-job-ids.d.ts.map +1 -0
- package/dist/ids/request-job-ids.js +18 -0
- package/dist/ids/request-job-ids.js.map +1 -0
- package/dist/ids/stats-ids.d.ts +7 -0
- package/dist/ids/stats-ids.d.ts.map +1 -0
- package/dist/ids/stats-ids.js +17 -0
- package/dist/ids/stats-ids.js.map +1 -0
- package/dist/migration-console/action-ids.d.ts +1 -3
- package/dist/migration-console/action-ids.d.ts.map +1 -1
- package/dist/migration-console/action-ids.js +1 -3
- package/dist/migration-console/action-ids.js.map +1 -1
- package/dist/migration-console/manifest.d.ts +5 -5
- package/dist/migration-console/manifest.d.ts.map +1 -1
- package/dist/migration-console/manifest.js +19 -49
- package/dist/migration-console/manifest.js.map +1 -1
- package/dist/paths/collection-refs.d.ts +1 -1
- package/dist/paths/collection-refs.d.ts.map +1 -1
- package/dist/paths/collection-refs.js +1 -1
- package/dist/paths/collection-refs.js.map +1 -1
- package/dist/paths/collections.d.ts +15 -1
- package/dist/paths/collections.d.ts.map +1 -1
- package/dist/paths/collections.js +29 -1
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/path-builders.d.ts +1 -1
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +1 -4
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/schemas/account-settings.d.ts +4 -4
- package/dist/schemas/account-settings.d.ts.map +1 -1
- package/dist/schemas/account-settings.js +2 -2
- package/dist/schemas/account-settings.js.map +1 -1
- package/dist/schemas/admin-notifications.d.ts +13 -13
- package/dist/schemas/admin-notifications.d.ts.map +1 -1
- package/dist/schemas/admin-notifications.js +8 -6
- package/dist/schemas/admin-notifications.js.map +1 -1
- package/dist/schemas/admin-stats.d.ts +6 -6
- package/dist/schemas/admin-stats.d.ts.map +1 -1
- package/dist/schemas/admin-stats.js +3 -3
- package/dist/schemas/admin-stats.js.map +1 -1
- package/dist/schemas/app-config.d.ts +4 -4
- package/dist/schemas/app-config.d.ts.map +1 -1
- package/dist/schemas/app-config.js +2 -2
- package/dist/schemas/app-config.js.map +1 -1
- package/dist/schemas/awards.d.ts +8 -8
- package/dist/schemas/awards.d.ts.map +1 -1
- package/dist/schemas/awards.js +4 -4
- package/dist/schemas/awards.js.map +1 -1
- package/dist/schemas/dead-letters.d.ts +15 -9
- package/dist/schemas/dead-letters.d.ts.map +1 -1
- package/dist/schemas/dead-letters.js +6 -5
- package/dist/schemas/dead-letters.js.map +1 -1
- package/dist/schemas/hardware-loan-contracts.d.ts +8 -8
- package/dist/schemas/hardware-loan-contracts.d.ts.map +1 -1
- package/dist/schemas/hardware-loan-contracts.js +4 -4
- package/dist/schemas/hardware-loan-contracts.js.map +1 -1
- package/dist/schemas/leagues.d.ts +4 -4
- package/dist/schemas/leagues.d.ts.map +1 -1
- package/dist/schemas/leagues.js +2 -2
- package/dist/schemas/leagues.js.map +1 -1
- package/dist/schemas/migration-console.d.ts +21 -62
- package/dist/schemas/migration-console.d.ts.map +1 -1
- package/dist/schemas/migration-console.js +5 -10
- package/dist/schemas/migration-console.js.map +1 -1
- package/dist/schemas/pictures.d.ts +447 -111
- package/dist/schemas/pictures.d.ts.map +1 -1
- package/dist/schemas/pictures.js +6 -6
- package/dist/schemas/pictures.js.map +1 -1
- package/dist/schemas/scoring.d.ts +22 -28
- package/dist/schemas/scoring.d.ts.map +1 -1
- package/dist/schemas/scoring.js +17 -13
- package/dist/schemas/scoring.js.map +1 -1
- package/dist/schemas/stats.d.ts +92 -127
- package/dist/schemas/stats.d.ts.map +1 -1
- package/dist/schemas/stats.js +50 -83
- package/dist/schemas/stats.js.map +1 -1
- package/dist/schemas/team-joining.d.ts +4 -4
- package/dist/schemas/team-joining.d.ts.map +1 -1
- package/dist/schemas/team-joining.js +2 -2
- package/dist/schemas/team-joining.js.map +1 -1
- package/dist/schemas/teams.d.ts +16 -16
- package/dist/schemas/teams.d.ts.map +1 -1
- package/dist/schemas/teams.js +8 -8
- package/dist/schemas/teams.js.map +1 -1
- package/dist/schemas/uploads.d.ts +12 -12
- package/dist/schemas/uploads.d.ts.map +1 -1
- package/dist/schemas/uploads.js +8 -6
- package/dist/schemas/uploads.js.map +1 -1
- package/dist/schemas/users.d.ts +28 -28
- package/dist/schemas/users.d.ts.map +1 -1
- package/dist/schemas/users.js +14 -14
- package/dist/schemas/users.js.map +1 -1
- package/dist/sports/basketball-scoring.d.ts.map +1 -1
- package/dist/sports/basketball-scoring.js +16 -7
- package/dist/sports/basketball-scoring.js.map +1 -1
- package/dist/sports/bulk-entry.d.ts +7 -2
- package/dist/sports/bulk-entry.d.ts.map +1 -1
- package/dist/sports/bulk-entry.js.map +1 -1
- package/dist/sports/football-scoring.d.ts.map +1 -1
- package/dist/sports/football-scoring.js +13 -10
- package/dist/sports/football-scoring.js.map +1 -1
- package/dist/sports/replay.d.ts.map +1 -1
- package/dist/sports/replay.js +16 -1
- package/dist/sports/replay.js.map +1 -1
- package/dist/sports/scoring.d.ts +18 -2
- package/dist/sports/scoring.d.ts.map +1 -1
- package/dist/sports/scoring.js.map +1 -1
- package/dist/sports/store-driver.d.ts +2 -1
- package/dist/sports/store-driver.d.ts.map +1 -1
- package/dist/sports/store-driver.js +30 -15
- package/dist/sports/store-driver.js.map +1 -1
- package/dist/types/audit.d.ts +1 -1
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js +37 -36
- package/dist/types/audit.js.map +1 -1
- package/dist/types/stats.d.ts +13 -13
- package/dist/types/stats.d.ts.map +1 -1
- package/dist/types/stats.js +13 -33
- package/dist/types/stats.js.map +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/doc-schemas/stats-operation.d.ts +0 -348
- package/dist/doc-schemas/stats-operation.d.ts.map +0 -1
- package/dist/doc-schemas/stats-operation.js +0 -92
- package/dist/doc-schemas/stats-operation.js.map +0 -1
- package/dist/utils/stats-operation-request.d.ts +0 -20
- package/dist/utils/stats-operation-request.d.ts.map +0 -1
- package/dist/utils/stats-operation-request.js +0 -10
- package/dist/utils/stats-operation-request.js.map +0 -1
package/dist/schemas/stats.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const UpdateSportGameFinalizeInputSchema: z.ZodObject<{
|
|
3
3
|
gameId: z.ZodString;
|
|
4
4
|
}, z.core.$strict>;
|
|
5
|
-
export type
|
|
6
|
-
export declare const
|
|
5
|
+
export type UpdateSportGameFinalizeInput = z.infer<typeof UpdateSportGameFinalizeInputSchema>;
|
|
6
|
+
export declare const UpdateSportGameFinalizeResultSchema: z.ZodObject<{
|
|
7
7
|
gameId: z.ZodString;
|
|
8
8
|
leagueId: z.ZodString;
|
|
9
9
|
outcome: z.ZodEnum<{
|
|
@@ -12,13 +12,12 @@ export declare const FinalizeGameResultSchema: z.ZodObject<{
|
|
|
12
12
|
}>;
|
|
13
13
|
nonScoringRosterPlayerIds: z.ZodArray<z.ZodString>;
|
|
14
14
|
}, z.core.$strict>;
|
|
15
|
-
export type
|
|
16
|
-
export declare const
|
|
15
|
+
export type UpdateSportGameFinalizeResult = z.infer<typeof UpdateSportGameFinalizeResultSchema>;
|
|
16
|
+
export declare const AdminUpdateSportGameReopenInputSchema: z.ZodObject<{
|
|
17
17
|
gameId: z.ZodString;
|
|
18
|
-
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
19
18
|
}, z.core.$strict>;
|
|
20
|
-
export type
|
|
21
|
-
export declare const
|
|
19
|
+
export type AdminUpdateSportGameReopenInput = z.infer<typeof AdminUpdateSportGameReopenInputSchema>;
|
|
20
|
+
export declare const AdminUpdateSportGameReopenResultSchema: z.ZodObject<{
|
|
22
21
|
gameId: z.ZodString;
|
|
23
22
|
leagueId: z.ZodString;
|
|
24
23
|
outcome: z.ZodEnum<{
|
|
@@ -26,16 +25,15 @@ export declare const ReopenGameResultSchema: z.ZodObject<{
|
|
|
26
25
|
alreadyOpen: "alreadyOpen";
|
|
27
26
|
}>;
|
|
28
27
|
}, z.core.$strict>;
|
|
29
|
-
export type
|
|
30
|
-
export declare const
|
|
28
|
+
export type AdminUpdateSportGameReopenResult = z.infer<typeof AdminUpdateSportGameReopenResultSchema>;
|
|
29
|
+
export declare const AdminCreateGameRosterPlayerInputSchema: z.ZodObject<{
|
|
31
30
|
gameId: z.ZodString;
|
|
32
31
|
userId: z.ZodString;
|
|
33
32
|
teamId: z.ZodString;
|
|
34
|
-
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
35
33
|
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
36
34
|
}, z.core.$strict>;
|
|
37
|
-
export type
|
|
38
|
-
export declare const
|
|
35
|
+
export type AdminCreateGameRosterPlayerInput = z.infer<typeof AdminCreateGameRosterPlayerInputSchema>;
|
|
36
|
+
export declare const AdminCreateGameRosterPlayerResultSchema: z.ZodObject<{
|
|
39
37
|
gameId: z.ZodString;
|
|
40
38
|
userId: z.ZodString;
|
|
41
39
|
teamId: z.ZodString;
|
|
@@ -45,60 +43,22 @@ export declare const AdminResolveUnrosteredStatLineResultSchema: z.ZodObject<{
|
|
|
45
43
|
}>;
|
|
46
44
|
gameConverts: z.ZodBoolean;
|
|
47
45
|
}, z.core.$strict>;
|
|
48
|
-
export type
|
|
49
|
-
export declare const
|
|
50
|
-
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
46
|
+
export type AdminCreateGameRosterPlayerResult = z.infer<typeof AdminCreateGameRosterPlayerResultSchema>;
|
|
47
|
+
export declare const AdminUpdateSportLeagueStatsRecalculateInputSchema: z.ZodObject<{
|
|
51
48
|
operationId: z.ZodString;
|
|
52
49
|
dryRun: z.ZodBoolean;
|
|
53
|
-
resumeAfter: z.ZodOptional<z.ZodString>;
|
|
54
50
|
leagueId: z.ZodString;
|
|
55
51
|
}, z.core.$strict>;
|
|
56
|
-
export type
|
|
57
|
-
export declare const
|
|
58
|
-
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
52
|
+
export type AdminUpdateSportLeagueStatsRecalculateInput = z.infer<typeof AdminUpdateSportLeagueStatsRecalculateInputSchema>;
|
|
53
|
+
export declare const AdminUpdateUserProfileStatsRecalculateInputSchema: z.ZodObject<{
|
|
59
54
|
operationId: z.ZodString;
|
|
60
55
|
dryRun: z.ZodBoolean;
|
|
61
|
-
resumeAfter: z.ZodOptional<z.ZodString>;
|
|
62
|
-
}, z.core.$strict>;
|
|
63
|
-
export type RecalculateAllLeagueStatsInput = z.infer<typeof RecalculateAllLeagueStatsInputSchema>;
|
|
64
|
-
export declare const RecalculateUserStatsInputSchema: z.ZodObject<{
|
|
65
|
-
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
66
|
-
operationId: z.ZodString;
|
|
67
|
-
dryRun: z.ZodBoolean;
|
|
68
|
-
resumeAfter: z.ZodOptional<z.ZodString>;
|
|
69
56
|
userId: z.ZodString;
|
|
70
57
|
}, z.core.$strict>;
|
|
71
|
-
export type
|
|
72
|
-
export declare const RecalculateAllUserStatsInputSchema: z.ZodObject<{
|
|
73
|
-
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
74
|
-
operationId: z.ZodString;
|
|
75
|
-
dryRun: z.ZodBoolean;
|
|
76
|
-
resumeAfter: z.ZodOptional<z.ZodString>;
|
|
77
|
-
}, z.core.$strict>;
|
|
78
|
-
export type RecalculateAllUserStatsInput = z.infer<typeof RecalculateAllUserStatsInputSchema>;
|
|
79
|
-
export declare const RecalculateHallOfFameInputSchema: z.ZodObject<{
|
|
80
|
-
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
81
|
-
operationId: z.ZodString;
|
|
82
|
-
dryRun: z.ZodBoolean;
|
|
83
|
-
resumeAfter: z.ZodOptional<z.ZodString>;
|
|
84
|
-
sportKey: z.ZodEnum<{
|
|
85
|
-
basketball: "basketball";
|
|
86
|
-
curling: "curling";
|
|
87
|
-
football: "football";
|
|
88
|
-
}>;
|
|
89
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
90
|
-
}, z.core.$strict>;
|
|
91
|
-
export type RecalculateHallOfFameInput = z.infer<typeof RecalculateHallOfFameInputSchema>;
|
|
58
|
+
export type AdminUpdateUserProfileStatsRecalculateInput = z.infer<typeof AdminUpdateUserProfileStatsRecalculateInputSchema>;
|
|
92
59
|
export declare const StatsRebuildResultSchema: z.ZodObject<{
|
|
93
60
|
operationId: z.ZodString;
|
|
94
61
|
dryRun: z.ZodBoolean;
|
|
95
|
-
complete: z.ZodBoolean;
|
|
96
|
-
nextResumeAfter: z.ZodNullable<z.ZodString>;
|
|
97
|
-
counts: z.ZodObject<{
|
|
98
|
-
read: z.ZodNumber;
|
|
99
|
-
changed: z.ZodNumber;
|
|
100
|
-
skipped: z.ZodNumber;
|
|
101
|
-
}, z.core.$strip>;
|
|
102
62
|
changes: z.ZodArray<z.ZodObject<{
|
|
103
63
|
ref: z.ZodString;
|
|
104
64
|
field: z.ZodString;
|
|
@@ -106,61 +66,79 @@ export declare const StatsRebuildResultSchema: z.ZodObject<{
|
|
|
106
66
|
after: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
107
67
|
}, z.core.$strip>>;
|
|
108
68
|
changesTruncated: z.ZodBoolean;
|
|
109
|
-
scopeChanged: z.ZodBoolean;
|
|
110
69
|
}, z.core.$strict>;
|
|
111
70
|
export type StatsRebuildResult = z.infer<typeof StatsRebuildResultSchema>;
|
|
112
|
-
export declare const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
71
|
+
export declare const statsJobRequestIdSchema: z.ZodUUID;
|
|
72
|
+
export declare const statsJobIdSchema: z.ZodString;
|
|
73
|
+
export declare const AdminCreateStatsJobInputSchema: z.ZodObject<{
|
|
74
|
+
requestId: z.ZodUUID;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
export type AdminCreateStatsJobInput = z.infer<typeof AdminCreateStatsJobInputSchema>;
|
|
77
|
+
export declare const AdminCreateStatsJobResultSchema: z.ZodObject<{
|
|
78
|
+
jobId: z.ZodString;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
export type AdminCreateStatsJobResult = z.infer<typeof AdminCreateStatsJobResultSchema>;
|
|
81
|
+
export declare const AdminGetStatsJobInputSchema: z.ZodObject<{
|
|
82
|
+
kind: z.ZodEnum<{
|
|
83
|
+
rebuild: "rebuild";
|
|
84
|
+
check: "check";
|
|
121
85
|
}>;
|
|
122
|
-
value: z.ZodNumber;
|
|
123
86
|
}, z.core.$strict>;
|
|
124
|
-
export type
|
|
125
|
-
export declare const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
87
|
+
export type AdminGetStatsJobInput = z.infer<typeof AdminGetStatsJobInputSchema>;
|
|
88
|
+
export declare const StatsJobProgressSchema: z.ZodObject<{
|
|
89
|
+
jobId: z.ZodString;
|
|
90
|
+
kind: z.ZodEnum<{
|
|
91
|
+
rebuild: "rebuild";
|
|
92
|
+
check: "check";
|
|
93
|
+
}>;
|
|
94
|
+
state: z.ZodEnum<{
|
|
95
|
+
complete: "complete";
|
|
96
|
+
"in-progress": "in-progress";
|
|
97
|
+
failed: "failed";
|
|
98
|
+
}>;
|
|
99
|
+
stage: z.ZodEnum<{
|
|
100
|
+
hallOfFame: "hallOfFame";
|
|
101
|
+
games: "games";
|
|
102
|
+
leagues: "leagues";
|
|
103
|
+
people: "people";
|
|
104
|
+
}>;
|
|
105
|
+
stageDone: z.ZodNumber;
|
|
106
|
+
changed: z.ZodNumber;
|
|
107
|
+
deadLettered: z.ZodBoolean;
|
|
108
|
+
completedAt: z.ZodNullable<z.ZodNumber>;
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
export type StatsJobProgress = z.infer<typeof StatsJobProgressSchema>;
|
|
111
|
+
export declare const AdminGetStatsJobResultSchema: z.ZodObject<{
|
|
112
|
+
job: z.ZodNullable<z.ZodObject<{
|
|
113
|
+
jobId: z.ZodString;
|
|
114
|
+
kind: z.ZodEnum<{
|
|
115
|
+
rebuild: "rebuild";
|
|
116
|
+
check: "check";
|
|
136
117
|
}>;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
118
|
+
state: z.ZodEnum<{
|
|
119
|
+
complete: "complete";
|
|
120
|
+
"in-progress": "in-progress";
|
|
121
|
+
failed: "failed";
|
|
122
|
+
}>;
|
|
123
|
+
stage: z.ZodEnum<{
|
|
124
|
+
hallOfFame: "hallOfFame";
|
|
125
|
+
games: "games";
|
|
126
|
+
leagues: "leagues";
|
|
127
|
+
people: "people";
|
|
128
|
+
}>;
|
|
129
|
+
stageDone: z.ZodNumber;
|
|
130
|
+
changed: z.ZodNumber;
|
|
131
|
+
deadLettered: z.ZodBoolean;
|
|
132
|
+
completedAt: z.ZodNullable<z.ZodNumber>;
|
|
133
|
+
}, z.core.$strict>>;
|
|
143
134
|
}, z.core.$strict>;
|
|
144
|
-
export type
|
|
145
|
-
export declare const
|
|
146
|
-
gameId: z.ZodString;
|
|
147
|
-
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
135
|
+
export type AdminGetStatsJobResult = z.infer<typeof AdminGetStatsJobResultSchema>;
|
|
136
|
+
export declare const AdminUpdateSportGameStatsRecalculateInputSchema: z.ZodObject<{
|
|
148
137
|
operationId: z.ZodString;
|
|
149
138
|
dryRun: z.ZodBoolean;
|
|
139
|
+
gameId: z.ZodString;
|
|
150
140
|
}, z.core.$strict>;
|
|
151
|
-
export type
|
|
152
|
-
export declare const GameStatsCorrectionSchema: z.ZodObject<{
|
|
153
|
-
lineKey: z.ZodString;
|
|
154
|
-
field: z.ZodEnum<{
|
|
155
|
-
score: "score";
|
|
156
|
-
timeouts: "timeouts";
|
|
157
|
-
points: "points";
|
|
158
|
-
rebounds: "rebounds";
|
|
159
|
-
assists: "assists";
|
|
160
|
-
}>;
|
|
161
|
-
value: z.ZodNumber;
|
|
162
|
-
}, z.core.$strict>;
|
|
163
|
-
export type GameStatsCorrection = z.infer<typeof GameStatsCorrectionSchema>;
|
|
141
|
+
export type AdminUpdateSportGameStatsRecalculateInput = z.infer<typeof AdminUpdateSportGameStatsRecalculateInputSchema>;
|
|
164
142
|
export declare const GameRepairChangesSchema: z.ZodObject<{
|
|
165
143
|
lines: z.ZodArray<z.ZodObject<{
|
|
166
144
|
lineKey: z.ZodString;
|
|
@@ -200,21 +178,9 @@ export declare const GameStatsRepairResultSchema: z.ZodObject<{
|
|
|
200
178
|
operationId: z.ZodString;
|
|
201
179
|
dryRun: z.ZodBoolean;
|
|
202
180
|
outcome: z.ZodEnum<{
|
|
203
|
-
reconciled: "reconciled";
|
|
204
181
|
unchanged: "unchanged";
|
|
205
|
-
|
|
182
|
+
reconciled: "reconciled";
|
|
206
183
|
}>;
|
|
207
|
-
corrections: z.ZodArray<z.ZodObject<{
|
|
208
|
-
lineKey: z.ZodString;
|
|
209
|
-
field: z.ZodEnum<{
|
|
210
|
-
score: "score";
|
|
211
|
-
timeouts: "timeouts";
|
|
212
|
-
points: "points";
|
|
213
|
-
rebounds: "rebounds";
|
|
214
|
-
assists: "assists";
|
|
215
|
-
}>;
|
|
216
|
-
value: z.ZodNumber;
|
|
217
|
-
}, z.core.$strict>>;
|
|
218
184
|
gameChanged: z.ZodBoolean;
|
|
219
185
|
gameChanges: z.ZodObject<{
|
|
220
186
|
lines: z.ZodArray<z.ZodObject<{
|
|
@@ -256,7 +222,7 @@ export declare const GameStatsRepairResultSchema: z.ZodObject<{
|
|
|
256
222
|
}, z.core.$strip>>;
|
|
257
223
|
}, z.core.$strict>;
|
|
258
224
|
export type GameStatsRepairResult = z.infer<typeof GameStatsRepairResultSchema>;
|
|
259
|
-
export declare const
|
|
225
|
+
export declare const AdminUpdateHistoricalStatInputSchema: z.ZodObject<{
|
|
260
226
|
userId: z.ZodString;
|
|
261
227
|
sportKey: z.ZodEnum<{
|
|
262
228
|
basketball: "basketball";
|
|
@@ -269,12 +235,11 @@ export declare const AdminUpdateHistoricalStatsInputSchema: z.ZodObject<{
|
|
|
269
235
|
assists: z.ZodNumber;
|
|
270
236
|
gamesPlayed: z.ZodNumber;
|
|
271
237
|
}, z.core.$strict>;
|
|
272
|
-
reason: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
273
238
|
operationId: z.ZodString;
|
|
274
239
|
dryRun: z.ZodBoolean;
|
|
275
240
|
}, z.core.$strict>;
|
|
276
|
-
export type
|
|
277
|
-
export declare const
|
|
241
|
+
export type AdminUpdateHistoricalStatInput = z.infer<typeof AdminUpdateHistoricalStatInputSchema>;
|
|
242
|
+
export declare const AdminUpdateHistoricalStatResultSchema: z.ZodObject<{
|
|
278
243
|
userId: z.ZodString;
|
|
279
244
|
sportKey: z.ZodEnum<{
|
|
280
245
|
basketball: "basketball";
|
|
@@ -284,9 +249,8 @@ export declare const AdminUpdateHistoricalStatsResultSchema: z.ZodObject<{
|
|
|
284
249
|
operationId: z.ZodString;
|
|
285
250
|
dryRun: z.ZodBoolean;
|
|
286
251
|
outcome: z.ZodEnum<{
|
|
287
|
-
reconciled: "reconciled";
|
|
288
252
|
unchanged: "unchanged";
|
|
289
|
-
|
|
253
|
+
reconciled: "reconciled";
|
|
290
254
|
}>;
|
|
291
255
|
baselineBefore: z.ZodNullable<z.ZodObject<{
|
|
292
256
|
points: z.ZodNumber;
|
|
@@ -301,17 +265,18 @@ export declare const AdminUpdateHistoricalStatsResultSchema: z.ZodObject<{
|
|
|
301
265
|
after: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
302
266
|
}, z.core.$strip>>;
|
|
303
267
|
}, z.core.$strict>;
|
|
304
|
-
export type
|
|
305
|
-
export declare const
|
|
306
|
-
operationId: z.ZodString;
|
|
268
|
+
export type AdminUpdateHistoricalStatResult = z.infer<typeof AdminUpdateHistoricalStatResultSchema>;
|
|
269
|
+
export declare const AdminCreateStatsValidationReportInputSchema: z.ZodObject<{
|
|
307
270
|
scope: z.ZodObject<{
|
|
308
271
|
gameId: z.ZodOptional<z.ZodString>;
|
|
309
272
|
leagueId: z.ZodOptional<z.ZodString>;
|
|
310
273
|
}, z.core.$strict>;
|
|
274
|
+
requestId: z.ZodOptional<z.ZodUUID>;
|
|
311
275
|
}, z.core.$strict>;
|
|
312
|
-
export type
|
|
313
|
-
export declare const
|
|
276
|
+
export type AdminCreateStatsValidationReportInput = z.infer<typeof AdminCreateStatsValidationReportInputSchema>;
|
|
277
|
+
export declare const AdminCreateStatsValidationReportResultSchema: z.ZodObject<{
|
|
314
278
|
reportId: z.ZodString;
|
|
279
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
315
280
|
complete: z.ZodBoolean;
|
|
316
281
|
summary: z.ZodObject<{
|
|
317
282
|
totalGamesChecked: z.ZodNumber;
|
|
@@ -338,7 +303,7 @@ export declare const RunStatsValidationResultSchema: z.ZodObject<{
|
|
|
338
303
|
hallOfFameLifetimeMismatch: "hallOfFameLifetimeMismatch";
|
|
339
304
|
}> & z.core.$partial, z.ZodNumber>;
|
|
340
305
|
}, z.core.$strict>;
|
|
341
|
-
export type
|
|
306
|
+
export type AdminCreateStatsValidationReportResult = z.infer<typeof AdminCreateStatsValidationReportResultSchema>;
|
|
342
307
|
export declare const AdminDeleteStatsValidationReportInputSchema: z.ZodObject<{
|
|
343
308
|
reportId: z.ZodString;
|
|
344
309
|
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/schemas/stats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/schemas/stats.ts"],"names":[],"mappings":"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"}
|
package/dist/schemas/stats.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CURLING_ROUND_COUNT, MAX_CURLING_ROUND_POINTS
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { CURLING_ROUND_COUNT, MAX_CURLING_ROUND_POINTS } from '../constants/sports.js';
|
|
3
|
+
import { parseStatsJobId } from '../ids/stats-ids.js';
|
|
4
|
+
import { countSchema, enteredStatCountSchema, epochMsSchema, gameIdSchema, gameRosterPlayerIdSchema, leagueIdSchema, sportKeySchema, statsOperationIdSchema, statsValidationReportIdSchema, teamIdSchema, userIdSchema, } from '../doc-schemas/atoms.js';
|
|
5
|
+
import { StatsDestinationChangeSchema } from '../doc-schemas/stats-changes.js';
|
|
5
6
|
import { StatsValidationReportSchema, StatsValidationScopeSchema, StatsValidationSummarySchema, } from '../doc-schemas/system.js';
|
|
6
7
|
import { HISTORICAL_STAT_KEYS, HistoricalStatsSchema, } from '../doc-schemas/user-profile.js';
|
|
7
|
-
import { GAME_FINALIZE_OUTCOME_KEYS, GAME_REOPEN_OUTCOME_KEYS, GAME_STATS_REPAIR_OUTCOME_KEYS, UNROSTERED_STAT_LINE_RESOLUTION_OUTCOME_KEYS, } from '../types/stats.js';
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
8
|
+
import { GAME_FINALIZE_OUTCOME_KEYS, GAME_REOPEN_OUTCOME_KEYS, GAME_STATS_REPAIR_OUTCOME_KEYS, STATS_JOB_KIND_KEYS, STATS_JOB_STAGE_KEYS, STATS_JOB_STATE_KEYS, UNROSTERED_STAT_LINE_RESOLUTION_OUTCOME_KEYS, } from '../types/stats.js';
|
|
9
|
+
export const UpdateSportGameFinalizeInputSchema = z.object({ gameId: gameIdSchema }).strict();
|
|
10
|
+
export const UpdateSportGameFinalizeResultSchema = z
|
|
10
11
|
.object({
|
|
11
12
|
gameId: gameIdSchema,
|
|
12
13
|
leagueId: leagueIdSchema,
|
|
@@ -14,26 +15,23 @@ export const FinalizeGameResultSchema = z
|
|
|
14
15
|
nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema),
|
|
15
16
|
})
|
|
16
17
|
.strict();
|
|
17
|
-
export const
|
|
18
|
-
|
|
19
|
-
.strict();
|
|
20
|
-
export const ReopenGameResultSchema = z
|
|
18
|
+
export const AdminUpdateSportGameReopenInputSchema = z.object({ gameId: gameIdSchema }).strict();
|
|
19
|
+
export const AdminUpdateSportGameReopenResultSchema = z
|
|
21
20
|
.object({
|
|
22
21
|
gameId: gameIdSchema,
|
|
23
22
|
leagueId: leagueIdSchema,
|
|
24
23
|
outcome: z.enum(GAME_REOPEN_OUTCOME_KEYS),
|
|
25
24
|
})
|
|
26
25
|
.strict();
|
|
27
|
-
export const
|
|
26
|
+
export const AdminCreateGameRosterPlayerInputSchema = z
|
|
28
27
|
.object({
|
|
29
28
|
gameId: gameIdSchema,
|
|
30
29
|
userId: userIdSchema,
|
|
31
30
|
teamId: teamIdSchema,
|
|
32
|
-
reason: repairReasonSchema,
|
|
33
31
|
dryRun: z.boolean().optional(),
|
|
34
32
|
})
|
|
35
33
|
.strict();
|
|
36
|
-
export const
|
|
34
|
+
export const AdminCreateGameRosterPlayerResultSchema = z
|
|
37
35
|
.object({
|
|
38
36
|
gameId: gameIdSchema,
|
|
39
37
|
userId: userIdSchema,
|
|
@@ -43,84 +41,49 @@ export const AdminResolveUnrosteredStatLineResultSchema = z
|
|
|
43
41
|
})
|
|
44
42
|
.strict();
|
|
45
43
|
const statsRepairFields = {
|
|
46
|
-
reason: repairReasonSchema,
|
|
47
44
|
operationId: statsOperationIdSchema,
|
|
48
45
|
dryRun: z.boolean(),
|
|
49
|
-
resumeAfter: z.string().min(1).optional(),
|
|
50
|
-
};
|
|
51
|
-
const cursorOnlyOnDryRun = (input) => input.dryRun || input.resumeAfter === undefined;
|
|
52
|
-
const CURSOR_ONLY_ON_DRY_RUN = {
|
|
53
|
-
message: 'A real run resumes from its operation; only a dry run takes a cursor.',
|
|
54
|
-
path: ['resumeAfter'],
|
|
55
46
|
};
|
|
56
|
-
export const
|
|
47
|
+
export const AdminUpdateSportLeagueStatsRecalculateInputSchema = z
|
|
57
48
|
.object({ leagueId: leagueIdSchema, ...statsRepairFields })
|
|
58
|
-
.strict()
|
|
59
|
-
|
|
60
|
-
export const RecalculateAllLeagueStatsInputSchema = z
|
|
61
|
-
.object({ ...statsRepairFields })
|
|
62
|
-
.strict()
|
|
63
|
-
.refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);
|
|
64
|
-
export const RecalculateUserStatsInputSchema = z
|
|
49
|
+
.strict();
|
|
50
|
+
export const AdminUpdateUserProfileStatsRecalculateInputSchema = z
|
|
65
51
|
.object({ userId: userIdSchema, ...statsRepairFields })
|
|
66
|
-
.strict()
|
|
67
|
-
.refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);
|
|
68
|
-
export const RecalculateAllUserStatsInputSchema = z
|
|
69
|
-
.object({ ...statsRepairFields })
|
|
70
|
-
.strict()
|
|
71
|
-
.refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);
|
|
72
|
-
export const RecalculateHallOfFameInputSchema = z
|
|
73
|
-
.object({ sportKey: sportKeySchema, userId: userIdSchema.optional(), ...statsRepairFields })
|
|
74
|
-
.strict()
|
|
75
|
-
.refine(cursorOnlyOnDryRun, CURSOR_ONLY_ON_DRY_RUN);
|
|
52
|
+
.strict();
|
|
76
53
|
export const StatsRebuildResultSchema = z
|
|
77
54
|
.object({
|
|
78
55
|
operationId: statsOperationIdSchema,
|
|
79
56
|
dryRun: z.boolean(),
|
|
80
|
-
complete: z.boolean(),
|
|
81
|
-
nextResumeAfter: z.string().min(1).nullable(),
|
|
82
|
-
counts: StatsOperationCountsSchema,
|
|
83
57
|
changes: z.array(StatsDestinationChangeSchema),
|
|
84
58
|
changesTruncated: z.boolean(),
|
|
85
|
-
scopeChanged: z.boolean(),
|
|
86
59
|
})
|
|
87
60
|
.strict();
|
|
88
|
-
export const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
})
|
|
61
|
+
export const statsJobRequestIdSchema = z.uuid();
|
|
62
|
+
export const statsJobIdSchema = z
|
|
63
|
+
.string()
|
|
64
|
+
.refine((id) => parseStatsJobId(id) !== null, 'Not a stats job id.');
|
|
65
|
+
export const AdminCreateStatsJobInputSchema = z
|
|
66
|
+
.object({ requestId: statsJobRequestIdSchema })
|
|
95
67
|
.strict();
|
|
96
|
-
export const
|
|
68
|
+
export const AdminCreateStatsJobResultSchema = z.object({ jobId: statsJobIdSchema }).strict();
|
|
69
|
+
export const AdminGetStatsJobInputSchema = z.object({ kind: z.enum(STATS_JOB_KIND_KEYS) }).strict();
|
|
70
|
+
export const StatsJobProgressSchema = z
|
|
97
71
|
.object({
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
operationId: statsOperationIdSchema,
|
|
107
|
-
dryRun: z.boolean(),
|
|
108
|
-
})
|
|
109
|
-
.strict()
|
|
110
|
-
.refine((input) => (input.targets === undefined) !== (input.keepStored === undefined), {
|
|
111
|
-
message: 'Give the values to set, or keep the stored numbers — one of the two.',
|
|
112
|
-
path: ['targets'],
|
|
113
|
-
});
|
|
114
|
-
export const RecalculateGameStatsInputSchema = z
|
|
115
|
-
.object({
|
|
116
|
-
gameId: gameIdSchema,
|
|
117
|
-
reason: repairReasonSchema,
|
|
118
|
-
operationId: statsOperationIdSchema,
|
|
119
|
-
dryRun: z.boolean(),
|
|
72
|
+
jobId: statsJobIdSchema,
|
|
73
|
+
kind: z.enum(STATS_JOB_KIND_KEYS),
|
|
74
|
+
state: z.enum(STATS_JOB_STATE_KEYS),
|
|
75
|
+
stage: z.enum(STATS_JOB_STAGE_KEYS),
|
|
76
|
+
stageDone: countSchema,
|
|
77
|
+
changed: countSchema,
|
|
78
|
+
deadLettered: z.boolean(),
|
|
79
|
+
completedAt: epochMsSchema.nullable(),
|
|
120
80
|
})
|
|
121
81
|
.strict();
|
|
122
|
-
export const
|
|
123
|
-
.object({
|
|
82
|
+
export const AdminGetStatsJobResultSchema = z
|
|
83
|
+
.object({ job: StatsJobProgressSchema.nullable() })
|
|
84
|
+
.strict();
|
|
85
|
+
export const AdminUpdateSportGameStatsRecalculateInputSchema = z
|
|
86
|
+
.object({ gameId: gameIdSchema, ...statsRepairFields })
|
|
124
87
|
.strict();
|
|
125
88
|
const roundSlotValueSchema = z.number().int().min(0).max(MAX_CURLING_ROUND_POINTS).nullable();
|
|
126
89
|
// Two team lines of a game, each holding its sport's fixed round slots.
|
|
@@ -169,7 +132,6 @@ export const GameStatsRepairResultSchema = z
|
|
|
169
132
|
operationId: statsOperationIdSchema,
|
|
170
133
|
dryRun: z.boolean(),
|
|
171
134
|
outcome: z.enum(GAME_STATS_REPAIR_OUTCOME_KEYS),
|
|
172
|
-
corrections: z.array(GameStatsCorrectionSchema),
|
|
173
135
|
gameChanged: z.boolean(),
|
|
174
136
|
gameChanges: GameRepairChangesSchema,
|
|
175
137
|
destinationChanges: z.array(StatsDestinationChangeSchema),
|
|
@@ -178,17 +140,16 @@ export const GameStatsRepairResultSchema = z
|
|
|
178
140
|
const EnteredHistoricalStatsSchema = z
|
|
179
141
|
.object(Object.fromEntries(HISTORICAL_STAT_KEYS.map((key) => [key, enteredStatCountSchema])))
|
|
180
142
|
.strict();
|
|
181
|
-
export const
|
|
143
|
+
export const AdminUpdateHistoricalStatInputSchema = z
|
|
182
144
|
.object({
|
|
183
145
|
userId: userIdSchema,
|
|
184
146
|
sportKey: sportKeySchema,
|
|
185
147
|
stats: EnteredHistoricalStatsSchema,
|
|
186
|
-
reason: repairReasonSchema,
|
|
187
148
|
operationId: statsOperationIdSchema,
|
|
188
149
|
dryRun: z.boolean(),
|
|
189
150
|
})
|
|
190
151
|
.strict();
|
|
191
|
-
export const
|
|
152
|
+
export const AdminUpdateHistoricalStatResultSchema = z
|
|
192
153
|
.object({
|
|
193
154
|
userId: userIdSchema,
|
|
194
155
|
sportKey: sportKeySchema,
|
|
@@ -199,12 +160,18 @@ export const AdminUpdateHistoricalStatsResultSchema = z
|
|
|
199
160
|
changes: z.array(StatsDestinationChangeSchema),
|
|
200
161
|
})
|
|
201
162
|
.strict();
|
|
202
|
-
export const
|
|
203
|
-
.object({
|
|
204
|
-
.strict()
|
|
205
|
-
|
|
163
|
+
export const AdminCreateStatsValidationReportInputSchema = z
|
|
164
|
+
.object({
|
|
165
|
+
scope: StatsValidationScopeSchema.strict(),
|
|
166
|
+
requestId: statsJobRequestIdSchema.optional(),
|
|
167
|
+
})
|
|
168
|
+
.strict()
|
|
169
|
+
.refine((input) => (input.requestId !== undefined) ===
|
|
170
|
+
(input.scope.gameId === undefined && input.scope.leagueId === undefined), { message: 'A check of everything, and only that, carries a request id.', path: ['requestId'] });
|
|
171
|
+
export const AdminCreateStatsValidationReportResultSchema = z
|
|
206
172
|
.object({
|
|
207
|
-
reportId:
|
|
173
|
+
reportId: statsValidationReportIdSchema,
|
|
174
|
+
jobId: statsJobIdSchema.optional(),
|
|
208
175
|
complete: z.boolean(),
|
|
209
176
|
summary: StatsValidationSummarySchema,
|
|
210
177
|
discrepancyCounts: StatsValidationReportSchema.shape.discrepancyCounts,
|