@tryline/interface 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +229 -0
  2. package/dist/api/admin/admin.d.ts +4 -0
  3. package/dist/api/admin/admin.d.ts.map +1 -0
  4. package/dist/api/admin/admin.js +1 -0
  5. package/dist/api/admin/articles.d.ts +77 -0
  6. package/dist/api/admin/articles.d.ts.map +1 -0
  7. package/dist/api/admin/articles.js +6 -0
  8. package/dist/api/admin/index.d.ts +5 -0
  9. package/dist/api/admin/index.d.ts.map +1 -0
  10. package/dist/api/admin/index.js +4 -0
  11. package/dist/api/admin/matches.d.ts +33 -0
  12. package/dist/api/admin/matches.d.ts.map +1 -0
  13. package/dist/api/admin/matches.js +6 -0
  14. package/dist/api/admin/matchup/index.d.ts +4 -0
  15. package/dist/api/admin/matchup/index.d.ts.map +1 -0
  16. package/dist/api/admin/matchup/index.js +3 -0
  17. package/dist/api/admin/matchup/matches.d.ts +33 -0
  18. package/dist/api/admin/matchup/matches.d.ts.map +1 -0
  19. package/dist/api/admin/matchup/matches.js +6 -0
  20. package/dist/api/admin/matchup/players.d.ts +100 -0
  21. package/dist/api/admin/matchup/players.d.ts.map +1 -0
  22. package/dist/api/admin/matchup/players.js +6 -0
  23. package/dist/api/admin/matchup/teams.d.ts +207 -0
  24. package/dist/api/admin/matchup/teams.d.ts.map +1 -0
  25. package/dist/api/admin/matchup/teams.js +6 -0
  26. package/dist/api/admin/matchup-players.d.ts +100 -0
  27. package/dist/api/admin/matchup-players.d.ts.map +1 -0
  28. package/dist/api/admin/matchup-players.js +6 -0
  29. package/dist/api/admin/matchup-teams.d.ts +207 -0
  30. package/dist/api/admin/matchup-teams.d.ts.map +1 -0
  31. package/dist/api/admin/matchup-teams.js +6 -0
  32. package/dist/api/admin/nrl-matches.d.ts +146 -0
  33. package/dist/api/admin/nrl-matches.d.ts.map +1 -0
  34. package/dist/api/admin/nrl-matches.js +6 -0
  35. package/dist/api/articles.d.ts +50 -0
  36. package/dist/api/articles.d.ts.map +1 -0
  37. package/dist/api/articles.js +1 -0
  38. package/dist/api/auth.d.ts +75 -0
  39. package/dist/api/auth.d.ts.map +1 -0
  40. package/dist/api/auth.js +5 -0
  41. package/dist/api/competitions.d.ts +34 -0
  42. package/dist/api/competitions.d.ts.map +1 -0
  43. package/dist/api/competitions.js +1 -0
  44. package/dist/api/index.d.ts +10 -0
  45. package/dist/api/index.d.ts.map +1 -0
  46. package/dist/api/index.js +9 -0
  47. package/dist/api/matches.d.ts +77 -0
  48. package/dist/api/matches.d.ts.map +1 -0
  49. package/dist/api/matches.js +1 -0
  50. package/dist/api/news.d.ts +50 -0
  51. package/dist/api/news.d.ts.map +1 -0
  52. package/dist/api/news.js +1 -0
  53. package/dist/api/nrl/analytics.d.ts +129 -0
  54. package/dist/api/nrl/analytics.d.ts.map +1 -0
  55. package/dist/api/nrl/analytics.js +1 -0
  56. package/dist/api/nrl/index.d.ts +7 -0
  57. package/dist/api/nrl/index.d.ts.map +1 -0
  58. package/dist/api/nrl/index.js +6 -0
  59. package/dist/api/nrl/ladder.d.ts +67 -0
  60. package/dist/api/nrl/ladder.d.ts.map +1 -0
  61. package/dist/api/nrl/ladder.js +1 -0
  62. package/dist/api/nrl/matches.d.ts +297 -0
  63. package/dist/api/nrl/matches.d.ts.map +1 -0
  64. package/dist/api/nrl/matches.js +1 -0
  65. package/dist/api/nrl/stats.d.ts +280 -0
  66. package/dist/api/nrl/stats.d.ts.map +1 -0
  67. package/dist/api/nrl/stats.js +1 -0
  68. package/dist/api/nrl/team-player-stats.d.ts +195 -0
  69. package/dist/api/nrl/team-player-stats.d.ts.map +1 -0
  70. package/dist/api/nrl/team-player-stats.js +1 -0
  71. package/dist/api/nrl/teams.d.ts +66 -0
  72. package/dist/api/nrl/teams.d.ts.map +1 -0
  73. package/dist/api/nrl/teams.js +1 -0
  74. package/dist/api/players.d.ts +31 -0
  75. package/dist/api/players.d.ts.map +1 -0
  76. package/dist/api/players.js +1 -0
  77. package/dist/api/search.d.ts +68 -0
  78. package/dist/api/search.d.ts.map +1 -0
  79. package/dist/api/search.js +1 -0
  80. package/dist/api/shared.d.ts +30 -0
  81. package/dist/api/shared.d.ts.map +1 -0
  82. package/dist/api/shared.js +4 -0
  83. package/dist/api/teams.d.ts +48 -0
  84. package/dist/api/teams.d.ts.map +1 -0
  85. package/dist/api/teams.js +1 -0
  86. package/dist/api/test.d.ts +8 -0
  87. package/dist/api/test.d.ts.map +1 -0
  88. package/dist/api/test.js +4 -0
  89. package/dist/api/version.d.ts +8 -0
  90. package/dist/api/version.d.ts.map +1 -0
  91. package/dist/api/version.js +4 -0
  92. package/dist/api/votes.d.ts +26 -0
  93. package/dist/api/votes.d.ts.map +1 -0
  94. package/dist/api/votes.js +5 -0
  95. package/dist/common/index.d.ts +2 -0
  96. package/dist/common/index.d.ts.map +1 -0
  97. package/dist/common/index.js +1 -0
  98. package/dist/common/response.d.ts +31 -0
  99. package/dist/common/response.d.ts.map +1 -0
  100. package/dist/common/response.js +21 -0
  101. package/dist/index.d.ts +15 -0
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +16 -0
  104. package/package.json +65 -0
@@ -0,0 +1,207 @@
1
+ /**
2
+ * Admin Matchup Teams Analysis Types
3
+ *
4
+ * Types for team analysis endpoints in matchup context
5
+ */
6
+ import { MatchTeam, MatchVenue } from "../../shared";
7
+ /**
8
+ * Match team info for H2H display (full MatchTeam with score)
9
+ */
10
+ export interface H2HMatchTeam extends MatchTeam {
11
+ score: number;
12
+ }
13
+ /**
14
+ * A single head-to-head match result
15
+ */
16
+ export interface HeadToHeadMatch {
17
+ match_id: number;
18
+ datetime: string;
19
+ round_text: string;
20
+ venue_name: string | null;
21
+ home_team: H2HMatchTeam;
22
+ away_team: H2HMatchTeam;
23
+ }
24
+ /**
25
+ * Summary of wins/draws for a set of head-to-head matches
26
+ * team_1 = home team of the upcoming match
27
+ * team_2 = away team of the upcoming match
28
+ */
29
+ export interface HeadToHeadSummary {
30
+ team_1_wins: number;
31
+ team_2_wins: number;
32
+ draws: number;
33
+ }
34
+ /**
35
+ * Head-to-Head section data (last 5 and last 10)
36
+ */
37
+ export interface HeadToHeadSection {
38
+ last_5_matches: HeadToHeadMatch[];
39
+ last_5_summary: HeadToHeadSummary;
40
+ last_10_matches: HeadToHeadMatch[];
41
+ last_10_summary: HeadToHeadSummary;
42
+ }
43
+ /**
44
+ * Summary of average total points across all head-to-head matches
45
+ */
46
+ export interface AveragePointsSummary {
47
+ average: number;
48
+ highest: number;
49
+ lowest: number;
50
+ total_matches: number;
51
+ }
52
+ /**
53
+ * Average Total Points section data
54
+ */
55
+ export interface AveragePointsSection {
56
+ summary: AveragePointsSummary;
57
+ }
58
+ /**
59
+ * Summary of winning margins across all head-to-head matches (excluding draws)
60
+ */
61
+ export interface WinningMarginSummary {
62
+ average: number;
63
+ highest: number;
64
+ lowest: number;
65
+ total_matches: number;
66
+ }
67
+ /**
68
+ * Average Winning Margin section data
69
+ */
70
+ export interface WinningMarginSection {
71
+ summary: WinningMarginSummary;
72
+ }
73
+ /**
74
+ * A team's win/loss/draw record at a specific venue (all opponents)
75
+ */
76
+ export interface TeamVenueRecord {
77
+ wins: number;
78
+ losses: number;
79
+ draws: number;
80
+ total_matches: number;
81
+ win_percentage: number;
82
+ }
83
+ /**
84
+ * Venue Win Percentage section data
85
+ */
86
+ export interface VenueWinPercentageSection {
87
+ venue_name: string | null;
88
+ home_team_record: TeamVenueRecord;
89
+ away_team_record: TeamVenueRecord;
90
+ }
91
+ /**
92
+ * Home win rate for h2h matches at the venue
93
+ */
94
+ export interface HomeWinRateAtVenueSection {
95
+ venue_name: string | null;
96
+ total_matches: number;
97
+ home_wins: number;
98
+ away_wins: number;
99
+ draws: number;
100
+ home_win_percentage: number;
101
+ }
102
+ /**
103
+ * Team comparison stat for a specific metric
104
+ * team_1 = home team of upcoming match, team_2 = away team
105
+ */
106
+ export interface TeamComparisonSection {
107
+ team_1_average: number;
108
+ team_2_average: number;
109
+ total_matches: number;
110
+ }
111
+ /**
112
+ * Which team scores first more often in h2h matches
113
+ */
114
+ export interface ScoresFirstSection {
115
+ team_1_count: number;
116
+ team_2_count: number;
117
+ total_matches: number;
118
+ team_1_percentage: number;
119
+ team_2_percentage: number;
120
+ }
121
+ /**
122
+ * Points scored after leading/trailing at halftime
123
+ */
124
+ export interface PointsAfterHalftimeSection {
125
+ team_1_average: number;
126
+ team_1_matches: number;
127
+ team_2_average: number;
128
+ team_2_matches: number;
129
+ }
130
+ /**
131
+ * Performance in a specific context vs season average
132
+ * Used for scoring/conceding comparisons against h2h or venue baselines
133
+ */
134
+ export interface PerformanceVsAverageSection {
135
+ team_1_context_average: number;
136
+ team_1_season_average: number;
137
+ team_1_difference: number;
138
+ team_1_context_matches: number;
139
+ team_1_season_matches: number;
140
+ team_2_context_average: number;
141
+ team_2_season_average: number;
142
+ team_2_difference: number;
143
+ team_2_context_matches: number;
144
+ team_2_season_matches: number;
145
+ }
146
+ /**
147
+ * Tries scored by each team broken down by field side (left/middle/right) in h2h matches
148
+ * Uses try_overall_location from nrl_scoring_data
149
+ */
150
+ export interface TriesByFieldSideSection {
151
+ team_1_left: number;
152
+ team_1_middle: number;
153
+ team_1_right: number;
154
+ team_1_total: number;
155
+ team_2_left: number;
156
+ team_2_middle: number;
157
+ team_2_right: number;
158
+ team_2_total: number;
159
+ total_matches: number;
160
+ }
161
+ /**
162
+ * Average tries per game for each team in night h2h matches (kickoff >= 6pm)
163
+ */
164
+ export interface NightMatchTriesSection {
165
+ team_1_tries_per_game: number;
166
+ team_1_total_tries: number;
167
+ team_2_tries_per_game: number;
168
+ team_2_total_tries: number;
169
+ total_night_matches: number;
170
+ }
171
+ /**
172
+ * Per-match total points for computing over/under at any adjustable line
173
+ * match_totals sorted most recent first
174
+ */
175
+ export interface TotalPointsLineSection {
176
+ match_totals: number[];
177
+ total_matches: number;
178
+ }
179
+ /**
180
+ * Response for GET /admin/nrl/matchups/:matchId/teams-analysis
181
+ */
182
+ export interface TeamsAnalysisResponse {
183
+ match_id: number;
184
+ home_team: MatchTeam;
185
+ away_team: MatchTeam;
186
+ venue: MatchVenue;
187
+ sections: {
188
+ head_to_head: HeadToHeadSection;
189
+ average_total_points: AveragePointsSection;
190
+ average_winning_margin: WinningMarginSection;
191
+ venue_win_percentage: VenueWinPercentageSection;
192
+ home_win_rate_at_venue: HomeWinRateAtVenueSection;
193
+ first_half_points: TeamComparisonSection;
194
+ scores_first: ScoresFirstSection;
195
+ second_half_conceded: TeamComparisonSection;
196
+ points_after_leading_at_ht: PointsAfterHalftimeSection;
197
+ points_after_trailing_at_ht: PointsAfterHalftimeSection;
198
+ scoring_vs_season_h2h: PerformanceVsAverageSection;
199
+ conceding_vs_season_h2h: PerformanceVsAverageSection;
200
+ scoring_vs_season_venue: PerformanceVsAverageSection;
201
+ conceding_vs_season_venue: PerformanceVsAverageSection;
202
+ tries_by_field_side: TriesByFieldSideSection;
203
+ night_match_tries: NightMatchTriesSection;
204
+ total_points_line: TotalPointsLineSection;
205
+ };
206
+ }
207
+ //# sourceMappingURL=teams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["../../../../src/api/admin/matchup/teams.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,YAAY,CAAC;IACxB,SAAS,EAAE,YAAY,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAA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chup Teams Analysis Types
3
+ *
4
+ * Types for team analysis endpoints in matchup context
5
+ */
6
+ export {};
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Admin Matchup Players Analysis Types
3
+ *
4
+ * Types for player analysis endpoints in matchup context
5
+ */
6
+ import { MatchTeam, MatchVenue } from "../shared";
7
+ /**
8
+ * Base player info included in all analysis results
9
+ */
10
+ export interface PlayerAnalysisBase {
11
+ player_id: number;
12
+ first_name: string;
13
+ last_name: string;
14
+ team_id: number;
15
+ }
16
+ /**
17
+ * Q1: Tries vs Opponent (Career + Last 5)
18
+ */
19
+ export interface TriesVsOpponentPlayer extends PlayerAnalysisBase {
20
+ career_tries: number;
21
+ career_games: number;
22
+ last_5_tries: number;
23
+ last_5_games: number;
24
+ }
25
+ /**
26
+ * Q2 & Q5: Consecutive Games (vs Opponent or at Venue)
27
+ */
28
+ export interface ConsecutiveGamesPlayer extends PlayerAnalysisBase {
29
+ current_streak: number;
30
+ max_streak: number;
31
+ }
32
+ /**
33
+ * Q3: Average Tries per Game vs Opponent
34
+ */
35
+ export interface AverageTriesPlayer extends PlayerAnalysisBase {
36
+ total_tries: number;
37
+ games_played: number;
38
+ tries_per_game: number;
39
+ }
40
+ /**
41
+ * Q4: Tries at Venue
42
+ */
43
+ export interface TriesAtVenuePlayer extends PlayerAnalysisBase {
44
+ tries_at_venue: number;
45
+ games_at_venue: number;
46
+ }
47
+ /**
48
+ * Q6: Back-to-Back This Season
49
+ */
50
+ export interface BackToBackPlayer extends PlayerAnalysisBase {
51
+ current_streak: number;
52
+ max_streak: number;
53
+ total_b2b_instances: number;
54
+ }
55
+ /**
56
+ * Q7: Multiple Tries in Matchup
57
+ */
58
+ export interface MultipleTriesPlayer extends PlayerAnalysisBase {
59
+ multi_try_games: number;
60
+ total_games_vs_opponent: number;
61
+ }
62
+ /**
63
+ * Q8: Tries in Wins vs Losses
64
+ */
65
+ export interface WinsVsLossesPlayer extends PlayerAnalysisBase {
66
+ tries_in_wins: number;
67
+ games_won: number;
68
+ tries_in_losses: number;
69
+ games_lost: number;
70
+ }
71
+ /**
72
+ * Generic section structure for player analysis
73
+ */
74
+ export interface PlayerAnalysisSection<T> {
75
+ id: string;
76
+ title: string;
77
+ description: string;
78
+ home_players: T[];
79
+ away_players: T[];
80
+ }
81
+ /**
82
+ * Response for GET /admin/nrl/matchups/:matchId/players-analysis
83
+ */
84
+ export interface AdminMatchupPlayersAnalysisResponse {
85
+ match_id: number;
86
+ home_team: MatchTeam;
87
+ away_team: MatchTeam;
88
+ venue: MatchVenue;
89
+ sections: {
90
+ tries_vs_opponent: PlayerAnalysisSection<TriesVsOpponentPlayer>;
91
+ consecutive_vs_opponent: PlayerAnalysisSection<ConsecutiveGamesPlayer>;
92
+ average_vs_opponent: PlayerAnalysisSection<AverageTriesPlayer>;
93
+ tries_at_venue: PlayerAnalysisSection<TriesAtVenuePlayer> | null;
94
+ consecutive_at_venue: PlayerAnalysisSection<ConsecutiveGamesPlayer> | null;
95
+ back_to_back_season: PlayerAnalysisSection<BackToBackPlayer>;
96
+ multiple_tries_matchup: PlayerAnalysisSection<MultipleTriesPlayer>;
97
+ wins_vs_losses: PlayerAnalysisSection<WinsVsLossesPlayer>;
98
+ };
99
+ }
100
+ //# sourceMappingURL=matchup-players.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchup-players.d.ts","sourceRoot":"","sources":["../../../src/api/admin/matchup-players.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,M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CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,iBAAiB,EAAE,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;QAChE,uBAAuB,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;QACvE,mBAAmB,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;QAC/D,cAAc,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;QACjE,oBAAoB,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC;QAC3E,mBAAmB,EAAE,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;QAC7D,sBAAsB,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;QACnE,cAAc,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;KAC3D,CAAC;CACH"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Admin Matchup Players Analysis Types
3
+ *
4
+ * Types for player analysis endpoints in matchup context
5
+ */
6
+ export {};
@@ -0,0 +1,207 @@
1
+ /**
2
+ * Admin Matchup Teams Analysis Types
3
+ *
4
+ * Types for team analysis endpoints in matchup context
5
+ */
6
+ import { MatchTeam, MatchVenue } from "../shared";
7
+ /**
8
+ * Match team info for H2H display (full MatchTeam with score)
9
+ */
10
+ export interface H2HMatchTeam extends MatchTeam {
11
+ score: number;
12
+ }
13
+ /**
14
+ * A single head-to-head match result
15
+ */
16
+ export interface HeadToHeadMatch {
17
+ match_id: number;
18
+ datetime: string;
19
+ round_text: string;
20
+ venue_name: string | null;
21
+ home_team: H2HMatchTeam;
22
+ away_team: H2HMatchTeam;
23
+ }
24
+ /**
25
+ * Summary of wins/draws for a set of head-to-head matches
26
+ * team_1 = home team of the upcoming match
27
+ * team_2 = away team of the upcoming match
28
+ */
29
+ export interface HeadToHeadSummary {
30
+ team_1_wins: number;
31
+ team_2_wins: number;
32
+ draws: number;
33
+ }
34
+ /**
35
+ * Head-to-Head section data (last 5 and last 10)
36
+ */
37
+ export interface HeadToHeadSection {
38
+ last_5_matches: HeadToHeadMatch[];
39
+ last_5_summary: HeadToHeadSummary;
40
+ last_10_matches: HeadToHeadMatch[];
41
+ last_10_summary: HeadToHeadSummary;
42
+ }
43
+ /**
44
+ * Summary of average total points across all head-to-head matches
45
+ */
46
+ export interface AveragePointsSummary {
47
+ average: number;
48
+ highest: number;
49
+ lowest: number;
50
+ total_matches: number;
51
+ }
52
+ /**
53
+ * Average Total Points section data
54
+ */
55
+ export interface AveragePointsSection {
56
+ summary: AveragePointsSummary;
57
+ }
58
+ /**
59
+ * Summary of winning margins across all head-to-head matches (excluding draws)
60
+ */
61
+ export interface WinningMarginSummary {
62
+ average: number;
63
+ highest: number;
64
+ lowest: number;
65
+ total_matches: number;
66
+ }
67
+ /**
68
+ * Average Winning Margin section data
69
+ */
70
+ export interface WinningMarginSection {
71
+ summary: WinningMarginSummary;
72
+ }
73
+ /**
74
+ * A team's win/loss/draw record at a specific venue (all opponents)
75
+ */
76
+ export interface TeamVenueRecord {
77
+ wins: number;
78
+ losses: number;
79
+ draws: number;
80
+ total_matches: number;
81
+ win_percentage: number;
82
+ }
83
+ /**
84
+ * Venue Win Percentage section data
85
+ */
86
+ export interface VenueWinPercentageSection {
87
+ venue_name: string | null;
88
+ home_team_record: TeamVenueRecord;
89
+ away_team_record: TeamVenueRecord;
90
+ }
91
+ /**
92
+ * Home win rate for h2h matches at the venue
93
+ */
94
+ export interface HomeWinRateAtVenueSection {
95
+ venue_name: string | null;
96
+ total_matches: number;
97
+ home_wins: number;
98
+ away_wins: number;
99
+ draws: number;
100
+ home_win_percentage: number;
101
+ }
102
+ /**
103
+ * Team comparison stat for a specific metric
104
+ * team_1 = home team of upcoming match, team_2 = away team
105
+ */
106
+ export interface TeamComparisonSection {
107
+ team_1_average: number;
108
+ team_2_average: number;
109
+ total_matches: number;
110
+ }
111
+ /**
112
+ * Which team scores first more often in h2h matches
113
+ */
114
+ export interface ScoresFirstSection {
115
+ team_1_count: number;
116
+ team_2_count: number;
117
+ total_matches: number;
118
+ team_1_percentage: number;
119
+ team_2_percentage: number;
120
+ }
121
+ /**
122
+ * Points scored after leading/trailing at halftime
123
+ */
124
+ export interface PointsAfterHalftimeSection {
125
+ team_1_average: number;
126
+ team_1_matches: number;
127
+ team_2_average: number;
128
+ team_2_matches: number;
129
+ }
130
+ /**
131
+ * Performance in a specific context vs season average
132
+ * Used for scoring/conceding comparisons against h2h or venue baselines
133
+ */
134
+ export interface PerformanceVsAverageSection {
135
+ team_1_context_average: number;
136
+ team_1_season_average: number;
137
+ team_1_difference: number;
138
+ team_1_context_matches: number;
139
+ team_1_season_matches: number;
140
+ team_2_context_average: number;
141
+ team_2_season_average: number;
142
+ team_2_difference: number;
143
+ team_2_context_matches: number;
144
+ team_2_season_matches: number;
145
+ }
146
+ /**
147
+ * Tries scored by each team broken down by field side (left/middle/right) in h2h matches
148
+ * Uses try_overall_location from nrl_scoring_data
149
+ */
150
+ export interface TriesByFieldSideSection {
151
+ team_1_left: number;
152
+ team_1_middle: number;
153
+ team_1_right: number;
154
+ team_1_total: number;
155
+ team_2_left: number;
156
+ team_2_middle: number;
157
+ team_2_right: number;
158
+ team_2_total: number;
159
+ total_matches: number;
160
+ }
161
+ /**
162
+ * Average tries per game for each team in night h2h matches (kickoff >= 6pm)
163
+ */
164
+ export interface NightMatchTriesSection {
165
+ team_1_tries_per_game: number;
166
+ team_1_total_tries: number;
167
+ team_2_tries_per_game: number;
168
+ team_2_total_tries: number;
169
+ total_night_matches: number;
170
+ }
171
+ /**
172
+ * Per-match total points for computing over/under at any adjustable line
173
+ * match_totals sorted most recent first
174
+ */
175
+ export interface TotalPointsLineSection {
176
+ match_totals: number[];
177
+ total_matches: number;
178
+ }
179
+ /**
180
+ * Response for GET /admin/nrl/matchups/:matchId/teams-analysis
181
+ */
182
+ export interface AdminMatchupTeamsAnalysisResponse {
183
+ match_id: number;
184
+ home_team: MatchTeam;
185
+ away_team: MatchTeam;
186
+ venue: MatchVenue;
187
+ sections: {
188
+ head_to_head: HeadToHeadSection;
189
+ average_total_points: AveragePointsSection;
190
+ average_winning_margin: WinningMarginSection;
191
+ venue_win_percentage: VenueWinPercentageSection;
192
+ home_win_rate_at_venue: HomeWinRateAtVenueSection;
193
+ first_half_points: TeamComparisonSection;
194
+ scores_first: ScoresFirstSection;
195
+ second_half_conceded: TeamComparisonSection;
196
+ points_after_leading_at_ht: PointsAfterHalftimeSection;
197
+ points_after_trailing_at_ht: PointsAfterHalftimeSection;
198
+ scoring_vs_season_h2h: PerformanceVsAverageSection;
199
+ conceding_vs_season_h2h: PerformanceVsAverageSection;
200
+ scoring_vs_season_venue: PerformanceVsAverageSection;
201
+ conceding_vs_season_venue: PerformanceVsAverageSection;
202
+ tries_by_field_side: TriesByFieldSideSection;
203
+ night_match_tries: NightMatchTriesSection;
204
+ total_points_line: TotalPointsLineSection;
205
+ };
206
+ }
207
+ //# sourceMappingURL=matchup-teams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchup-teams.d.ts","sourceRoot":"","sources":["../../../src/api/admin/matchup-teams.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,YAAY,CAAC;IACxB,SAAS,EAAE,YAAY,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM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