@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.
- package/README.md +229 -0
- package/dist/api/admin/admin.d.ts +4 -0
- package/dist/api/admin/admin.d.ts.map +1 -0
- package/dist/api/admin/admin.js +1 -0
- package/dist/api/admin/articles.d.ts +77 -0
- package/dist/api/admin/articles.d.ts.map +1 -0
- package/dist/api/admin/articles.js +6 -0
- package/dist/api/admin/index.d.ts +5 -0
- package/dist/api/admin/index.d.ts.map +1 -0
- package/dist/api/admin/index.js +4 -0
- package/dist/api/admin/matches.d.ts +33 -0
- package/dist/api/admin/matches.d.ts.map +1 -0
- package/dist/api/admin/matches.js +6 -0
- package/dist/api/admin/matchup/index.d.ts +4 -0
- package/dist/api/admin/matchup/index.d.ts.map +1 -0
- package/dist/api/admin/matchup/index.js +3 -0
- package/dist/api/admin/matchup/matches.d.ts +33 -0
- package/dist/api/admin/matchup/matches.d.ts.map +1 -0
- package/dist/api/admin/matchup/matches.js +6 -0
- package/dist/api/admin/matchup/players.d.ts +100 -0
- package/dist/api/admin/matchup/players.d.ts.map +1 -0
- package/dist/api/admin/matchup/players.js +6 -0
- package/dist/api/admin/matchup/teams.d.ts +207 -0
- package/dist/api/admin/matchup/teams.d.ts.map +1 -0
- package/dist/api/admin/matchup/teams.js +6 -0
- package/dist/api/admin/matchup-players.d.ts +100 -0
- package/dist/api/admin/matchup-players.d.ts.map +1 -0
- package/dist/api/admin/matchup-players.js +6 -0
- package/dist/api/admin/matchup-teams.d.ts +207 -0
- package/dist/api/admin/matchup-teams.d.ts.map +1 -0
- package/dist/api/admin/matchup-teams.js +6 -0
- package/dist/api/admin/nrl-matches.d.ts +146 -0
- package/dist/api/admin/nrl-matches.d.ts.map +1 -0
- package/dist/api/admin/nrl-matches.js +6 -0
- package/dist/api/articles.d.ts +50 -0
- package/dist/api/articles.d.ts.map +1 -0
- package/dist/api/articles.js +1 -0
- package/dist/api/auth.d.ts +75 -0
- package/dist/api/auth.d.ts.map +1 -0
- package/dist/api/auth.js +5 -0
- package/dist/api/competitions.d.ts +34 -0
- package/dist/api/competitions.d.ts.map +1 -0
- package/dist/api/competitions.js +1 -0
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +9 -0
- package/dist/api/matches.d.ts +77 -0
- package/dist/api/matches.d.ts.map +1 -0
- package/dist/api/matches.js +1 -0
- package/dist/api/news.d.ts +50 -0
- package/dist/api/news.d.ts.map +1 -0
- package/dist/api/news.js +1 -0
- package/dist/api/nrl/analytics.d.ts +129 -0
- package/dist/api/nrl/analytics.d.ts.map +1 -0
- package/dist/api/nrl/analytics.js +1 -0
- package/dist/api/nrl/index.d.ts +7 -0
- package/dist/api/nrl/index.d.ts.map +1 -0
- package/dist/api/nrl/index.js +6 -0
- package/dist/api/nrl/ladder.d.ts +67 -0
- package/dist/api/nrl/ladder.d.ts.map +1 -0
- package/dist/api/nrl/ladder.js +1 -0
- package/dist/api/nrl/matches.d.ts +297 -0
- package/dist/api/nrl/matches.d.ts.map +1 -0
- package/dist/api/nrl/matches.js +1 -0
- package/dist/api/nrl/stats.d.ts +280 -0
- package/dist/api/nrl/stats.d.ts.map +1 -0
- package/dist/api/nrl/stats.js +1 -0
- package/dist/api/nrl/team-player-stats.d.ts +195 -0
- package/dist/api/nrl/team-player-stats.d.ts.map +1 -0
- package/dist/api/nrl/team-player-stats.js +1 -0
- package/dist/api/nrl/teams.d.ts +66 -0
- package/dist/api/nrl/teams.d.ts.map +1 -0
- package/dist/api/nrl/teams.js +1 -0
- package/dist/api/players.d.ts +31 -0
- package/dist/api/players.d.ts.map +1 -0
- package/dist/api/players.js +1 -0
- package/dist/api/search.d.ts +68 -0
- package/dist/api/search.d.ts.map +1 -0
- package/dist/api/search.js +1 -0
- package/dist/api/shared.d.ts +30 -0
- package/dist/api/shared.d.ts.map +1 -0
- package/dist/api/shared.js +4 -0
- package/dist/api/teams.d.ts +48 -0
- package/dist/api/teams.d.ts.map +1 -0
- package/dist/api/teams.js +1 -0
- package/dist/api/test.d.ts +8 -0
- package/dist/api/test.d.ts.map +1 -0
- package/dist/api/test.js +4 -0
- package/dist/api/version.d.ts +8 -0
- package/dist/api/version.d.ts.map +1 -0
- package/dist/api/version.js +4 -0
- package/dist/api/votes.d.ts +26 -0
- package/dist/api/votes.d.ts.map +1 -0
- package/dist/api/votes.js +5 -0
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +1 -0
- package/dist/common/response.d.ts +31 -0
- package/dist/common/response.d.ts.map +1 -0
- package/dist/common/response.js +21 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/package.json +65 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { MatchTeam } from "../shared";
|
|
2
|
+
/**
|
|
3
|
+
* Possession values for a team in a match
|
|
4
|
+
* Sourced from nrl_matches_team_summary (latest sample_offset_s)
|
|
5
|
+
*
|
|
6
|
+
* Formatted values:
|
|
7
|
+
* - possession_perc: rounded percentage string (e.g. "58%")
|
|
8
|
+
* - time_in_poss: formatted as "m:ss" (e.g. "27:30")
|
|
9
|
+
* - completion_rate_perc: rounded percentage string (e.g. "78%")
|
|
10
|
+
*/
|
|
11
|
+
export interface TeamPossessionValues {
|
|
12
|
+
possession_perc: string;
|
|
13
|
+
time_in_poss: string;
|
|
14
|
+
sets_completed: number;
|
|
15
|
+
sets_attempted: number;
|
|
16
|
+
completion_rate_perc: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Attack values for a team in a match
|
|
20
|
+
* avg_set_distance sourced from nrl_matches_team_summary
|
|
21
|
+
* All other fields aggregated (SUM/AVG) from nrl_matches_player_summary
|
|
22
|
+
*
|
|
23
|
+
* Formatted values:
|
|
24
|
+
* - all_run_metres, post_contact_metres, kick_return_metres, avg_set_distance: string with "m" suffix (e.g. "1568m")
|
|
25
|
+
*/
|
|
26
|
+
export interface TeamAttackValues {
|
|
27
|
+
all_runs: number;
|
|
28
|
+
all_run_metres: string;
|
|
29
|
+
post_contact_metres: string;
|
|
30
|
+
line_breaks: number;
|
|
31
|
+
tackle_breaks: number;
|
|
32
|
+
avg_set_distance: string;
|
|
33
|
+
kick_return_metres: string;
|
|
34
|
+
avg_play_the_ball_speed: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Defence values for a team in a match
|
|
38
|
+
* Aggregated from nrl_matches_player_summary
|
|
39
|
+
*
|
|
40
|
+
* Formatted values:
|
|
41
|
+
* - tackle_efficiency_perc: rounded percentage string (e.g. "89%")
|
|
42
|
+
*/
|
|
43
|
+
export interface TeamDefenceValues {
|
|
44
|
+
tackle_efficiency_perc: string;
|
|
45
|
+
tackles_made: number;
|
|
46
|
+
intercepts: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Passing values for a team in a match
|
|
50
|
+
* Aggregated (SUM) from nrl_matches_player_summary
|
|
51
|
+
*/
|
|
52
|
+
export interface TeamPassingValues {
|
|
53
|
+
offloads: number;
|
|
54
|
+
receipts: number;
|
|
55
|
+
passes: number;
|
|
56
|
+
dummy_passes: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Interchange values for a team in a match
|
|
60
|
+
* Sourced from nrl_matches_team_summary
|
|
61
|
+
*/
|
|
62
|
+
export interface TeamInterchangeValues {
|
|
63
|
+
interchanges_used: number;
|
|
64
|
+
interchanges_hia: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Kicking values for a team in a match
|
|
68
|
+
* kick_defusal_perc sourced from nrl_matches_team_summary
|
|
69
|
+
* All other fields aggregated (SUM) from nrl_matches_player_summary
|
|
70
|
+
*
|
|
71
|
+
* Formatted values:
|
|
72
|
+
* - kicking_metres: string with "m" suffix (e.g. "680m")
|
|
73
|
+
* - kick_defusal_perc: rounded percentage string (e.g. "90%")
|
|
74
|
+
*/
|
|
75
|
+
export interface TeamKickingValues {
|
|
76
|
+
kicks: number;
|
|
77
|
+
kicking_metres: string;
|
|
78
|
+
forced_drop_outs: number;
|
|
79
|
+
kick_defusal_perc: string;
|
|
80
|
+
bomb_kicks: number;
|
|
81
|
+
grubbers: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Discipline values for a team in a match
|
|
85
|
+
* Aggregated (SUM) from nrl_matches_player_summary
|
|
86
|
+
*/
|
|
87
|
+
export interface TeamDisciplineValues {
|
|
88
|
+
missed_tackles: number;
|
|
89
|
+
ineffective_tackles: number;
|
|
90
|
+
errors: number;
|
|
91
|
+
penalties: number;
|
|
92
|
+
ruck_infringements: number;
|
|
93
|
+
on_report: number;
|
|
94
|
+
sin_bins: number;
|
|
95
|
+
send_offs: number;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Complete team match stats extending MatchTeam with categorised stat values
|
|
99
|
+
*
|
|
100
|
+
* Each category contains only key: value pairs.
|
|
101
|
+
* Display labels for each key are provided once in the response's
|
|
102
|
+
* team_stats_labels object to avoid duplication across teams.
|
|
103
|
+
*
|
|
104
|
+
* Formatted fields:
|
|
105
|
+
* - Percentages: rounded to nearest whole number with "%" suffix (e.g. "58%")
|
|
106
|
+
* - Metres: appended with "m" suffix (e.g. "1568m")
|
|
107
|
+
* - Time: formatted as "m:ss" (e.g. "27:30")
|
|
108
|
+
*
|
|
109
|
+
* When no stats data exists (e.g. match not yet played), numeric values default to 0,
|
|
110
|
+
* percentages default to "0%", metres default to "0m", time defaults to "0:00"
|
|
111
|
+
*/
|
|
112
|
+
export interface TeamMatchStats extends MatchTeam {
|
|
113
|
+
possession: TeamPossessionValues;
|
|
114
|
+
attack: TeamAttackValues;
|
|
115
|
+
defence: TeamDefenceValues;
|
|
116
|
+
passing: TeamPassingValues;
|
|
117
|
+
interchanges: TeamInterchangeValues;
|
|
118
|
+
kicking: TeamKickingValues;
|
|
119
|
+
discipline: TeamDisciplineValues;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Labels for team stats, grouped by category
|
|
123
|
+
* Maps each stat key to its display label (e.g. { possession_perc: "Possession" })
|
|
124
|
+
* Defined once in the response and shared across both teams
|
|
125
|
+
*/
|
|
126
|
+
export interface TeamStatsLabels {
|
|
127
|
+
possession: Record<string, string>;
|
|
128
|
+
attack: Record<string, string>;
|
|
129
|
+
defence: Record<string, string>;
|
|
130
|
+
passing: Record<string, string>;
|
|
131
|
+
interchanges: Record<string, string>;
|
|
132
|
+
kicking: Record<string, string>;
|
|
133
|
+
discipline: Record<string, string>;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Individual player match stats
|
|
137
|
+
* Contains player identification, lineup info, images, and a flat stats object
|
|
138
|
+
* All null stat values are coalesced to 0
|
|
139
|
+
*
|
|
140
|
+
* Formatted fields:
|
|
141
|
+
* - _perc fields: rounded percentage string (e.g. "89%")
|
|
142
|
+
* - _metres fields: string with "m" suffix (e.g. "120m")
|
|
143
|
+
*
|
|
144
|
+
* Stats keys map to labels provided in the parent response's player_stats.labels object
|
|
145
|
+
*/
|
|
146
|
+
export interface PlayerMatchStats {
|
|
147
|
+
team_id: number;
|
|
148
|
+
player_id: number;
|
|
149
|
+
first_name: string;
|
|
150
|
+
last_name: string;
|
|
151
|
+
jersey_number: number;
|
|
152
|
+
captain: boolean;
|
|
153
|
+
original_position_id: number;
|
|
154
|
+
updated_position_id: number | null;
|
|
155
|
+
image_default: string | null;
|
|
156
|
+
image_headshot: string | null;
|
|
157
|
+
competition_image_default: string | null;
|
|
158
|
+
competition_image_headshot: string | null;
|
|
159
|
+
/** Flat object of stat key to value. Percentages and metres are formatted strings, others are numbers. */
|
|
160
|
+
stats: Record<string, number | string>;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Player stats section with a shared labels map and players grouped by team
|
|
164
|
+
* The labels object maps stat keys (e.g. "tries") to display names (e.g. "Tries")
|
|
165
|
+
* to avoid repeating labels for every player
|
|
166
|
+
*/
|
|
167
|
+
export interface PlayerStatsSection {
|
|
168
|
+
/** Mapping of stat key to display label (e.g. { tries: "Tries", tackles_made: "Tackles Made" }) */
|
|
169
|
+
labels: Record<string, string>;
|
|
170
|
+
home_team: PlayerMatchStats[];
|
|
171
|
+
away_team: PlayerMatchStats[];
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Response type for GET /nrl/team-player-stats/:match_id
|
|
175
|
+
* Returns the latest team and player stats for a given match
|
|
176
|
+
*
|
|
177
|
+
* Team stats combine data from:
|
|
178
|
+
* - nrl_matches_team_summary (possession, interchanges, avg set distance, kick defusal)
|
|
179
|
+
* - Aggregated nrl_matches_player_summary (attack, defence, passing, kicking, discipline)
|
|
180
|
+
*
|
|
181
|
+
* Labels are defined once:
|
|
182
|
+
* - team_stats_labels: grouped by category, maps stat keys to display labels for team stats
|
|
183
|
+
* - player_stats.labels: maps stat keys to display labels for player stats
|
|
184
|
+
*
|
|
185
|
+
* Takes the latest sample_offset_s snapshot for final match results.
|
|
186
|
+
* Returns all zeros when no stats data exists (e.g. match not yet played).
|
|
187
|
+
*/
|
|
188
|
+
export interface GetTeamPlayerStatsResponse {
|
|
189
|
+
match_id: number;
|
|
190
|
+
team_stats_labels: TeamStatsLabels;
|
|
191
|
+
home_team_stats: TeamMatchStats;
|
|
192
|
+
away_team_stats: TeamMatchStats;
|
|
193
|
+
player_stats: PlayerStatsSection;
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=team-player-stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-player-stats.d.ts","sourceRoot":"","sources":["../../../src/api/nrl/team-player-stats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAMtC;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,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7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,0GAA0G;IAC1G,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CACxC;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,mGAAmG;IACnG,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,SAAS,EAAE,gBAAgB,EAAE,CAAC;CAC/B;AAMD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,eAAe,CAAC;IACnC,eAAe,EAAE,cAAc,CAAC;IAChC,eAAe,EAAE,cAAc,CAAC;IAChC,YAAY,EAAE,kBAAkB,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { TeamRecentFormMatch, ScoringType, TryOverallLocation } from "./matches";
|
|
2
|
+
import { SearchMatchResult } from "../search";
|
|
3
|
+
import { TeamScoringMap } from "./stats";
|
|
4
|
+
/**
|
|
5
|
+
* Ladder position for a single season
|
|
6
|
+
* Uses the latest round available in the nrl_ladder table for that season
|
|
7
|
+
*/
|
|
8
|
+
export interface SeasonLadderPosition {
|
|
9
|
+
season_id: number;
|
|
10
|
+
season_value: string;
|
|
11
|
+
position: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Scoring event for team page
|
|
15
|
+
* Same fields as ScoringEvent but with simplified player info (name only, no images/jersey/captain)
|
|
16
|
+
*/
|
|
17
|
+
export interface TeamScoringEvent {
|
|
18
|
+
first_name: string;
|
|
19
|
+
last_name: string;
|
|
20
|
+
sample_offset_s: number;
|
|
21
|
+
scoring_type: ScoringType;
|
|
22
|
+
try_score_x: number | null;
|
|
23
|
+
try_score_y: number | null;
|
|
24
|
+
break_x: number | null;
|
|
25
|
+
break_y: number | null;
|
|
26
|
+
kicking_x: number | null;
|
|
27
|
+
kicking_y: number | null;
|
|
28
|
+
kick_successful: boolean | null;
|
|
29
|
+
try_associated: number | null;
|
|
30
|
+
try_comments: string | null;
|
|
31
|
+
try_overall_location: TryOverallLocation | null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Player in the team's squad for a season
|
|
35
|
+
* Aggregated from nrl_matches_player_summary via nrl_player_lineups
|
|
36
|
+
*/
|
|
37
|
+
export interface TeamSquadPlayer {
|
|
38
|
+
player_id: number;
|
|
39
|
+
first_name: string;
|
|
40
|
+
last_name: string;
|
|
41
|
+
slug: string;
|
|
42
|
+
image_default: string | null;
|
|
43
|
+
image_headshot: string | null;
|
|
44
|
+
competition_image_default: string | null;
|
|
45
|
+
competition_image_headshot: string | null;
|
|
46
|
+
games_played: number;
|
|
47
|
+
tries: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* NRL-specific team detail
|
|
51
|
+
* Contains only NRL-specific data (recent performance, ranking history)
|
|
52
|
+
* Used inside the `detail` field of GetTeamDetailResponse
|
|
53
|
+
*/
|
|
54
|
+
export interface TeamDetail {
|
|
55
|
+
recent_performance: TeamRecentFormMatch[];
|
|
56
|
+
ranking: SeasonLadderPosition[];
|
|
57
|
+
scoring_events: TeamScoringEvent[];
|
|
58
|
+
past_matches: SearchMatchResult[];
|
|
59
|
+
upcoming_matches: SearchMatchResult[];
|
|
60
|
+
next_match: SearchMatchResult | null;
|
|
61
|
+
squad: TeamSquadPlayer[];
|
|
62
|
+
squad_season_value: string | null;
|
|
63
|
+
scoring_map: TeamScoringMap | null;
|
|
64
|
+
scoring_map_season_value: string | null;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=teams.d.ts.map
|
|
@@ -0,0 +1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IAAI,CAAC;IAC9B,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;IAC1C,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;IACtC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACrC,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,WAAW,EAAE,cAAc,GAAG,IAAI,CAAC;IACnC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SearchCompetition } from "./search";
|
|
2
|
+
/**
|
|
3
|
+
* A single competition registration for a player,
|
|
4
|
+
* including competition info, registration images, and colour
|
|
5
|
+
*/
|
|
6
|
+
export interface PlayerCompetitionRegistration {
|
|
7
|
+
registration_id: number;
|
|
8
|
+
competition: SearchCompetition;
|
|
9
|
+
image_default: string | null;
|
|
10
|
+
image_headshot: string | null;
|
|
11
|
+
colour: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Response type for GET /players/{player_id}/detail
|
|
15
|
+
* All player fields (excluding created_at) plus competition registrations
|
|
16
|
+
*/
|
|
17
|
+
export interface GetPlayerDetailResponse {
|
|
18
|
+
player_id: number;
|
|
19
|
+
first_name: string;
|
|
20
|
+
last_name: string;
|
|
21
|
+
birth_date: string | null;
|
|
22
|
+
height: string | null;
|
|
23
|
+
weight: string | null;
|
|
24
|
+
birthplace: string | null;
|
|
25
|
+
nickname: string | null;
|
|
26
|
+
slug: string;
|
|
27
|
+
image_default: string | null;
|
|
28
|
+
image_headshot: string | null;
|
|
29
|
+
competition_registrations: PlayerCompetitionRegistration[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=players.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/api/players.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,yBAAyB,EAAE,6BAA6B,EAAE,CAAC;CAC5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { MatchTeam, MatchVenue } from "./shared";
|
|
2
|
+
import { Season } from "./competitions";
|
|
3
|
+
/**
|
|
4
|
+
* Search type filter - controls which entity types to search
|
|
5
|
+
*/
|
|
6
|
+
export type SearchType = "teams" | "players" | "matches" | "all";
|
|
7
|
+
/**
|
|
8
|
+
* Competition info included in search results
|
|
9
|
+
* Subset of CompetitionBasicInfo relevant for search display
|
|
10
|
+
*/
|
|
11
|
+
export interface SearchCompetition {
|
|
12
|
+
competition_id: number;
|
|
13
|
+
code_name: string;
|
|
14
|
+
display_name: string;
|
|
15
|
+
display_name_short: string | null;
|
|
16
|
+
display_name_code: string | null;
|
|
17
|
+
logo: string | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Team search result
|
|
21
|
+
*/
|
|
22
|
+
export interface SearchTeamResult {
|
|
23
|
+
team_id: number;
|
|
24
|
+
display_name: string;
|
|
25
|
+
display_name_short: string | null;
|
|
26
|
+
display_name_code: string | null;
|
|
27
|
+
logo: string | null;
|
|
28
|
+
colour: string;
|
|
29
|
+
slug: string;
|
|
30
|
+
competition: SearchCompetition;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Player search result
|
|
34
|
+
*/
|
|
35
|
+
export interface SearchPlayerResult {
|
|
36
|
+
player_id: number;
|
|
37
|
+
first_name: string;
|
|
38
|
+
last_name: string;
|
|
39
|
+
slug: string;
|
|
40
|
+
image_default: string | null;
|
|
41
|
+
image_headshot: string | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Match search result
|
|
45
|
+
*/
|
|
46
|
+
export interface SearchMatchResult {
|
|
47
|
+
match_id: number;
|
|
48
|
+
slug: string;
|
|
49
|
+
competition: SearchCompetition;
|
|
50
|
+
season: Season;
|
|
51
|
+
datetime: string;
|
|
52
|
+
home_team: MatchTeam;
|
|
53
|
+
away_team: MatchTeam;
|
|
54
|
+
home_team_score: number | null;
|
|
55
|
+
away_team_score: number | null;
|
|
56
|
+
status: "scheduled" | "live" | "completed" | "postponed" | "cancelled";
|
|
57
|
+
venue: MatchVenue | null;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Response type for the search endpoint
|
|
61
|
+
* All three arrays are always present; non-requested categories return as empty arrays
|
|
62
|
+
*/
|
|
63
|
+
export interface SearchResponse {
|
|
64
|
+
teams: SearchTeamResult[];
|
|
65
|
+
players: SearchPlayerResult[];
|
|
66
|
+
matches: SearchMatchResult[];
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/api/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,iBAAiB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,iBAAiB,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;IACvE,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared API types used across multiple endpoints
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Team information for a match
|
|
6
|
+
* Includes all display name variants and team colour
|
|
7
|
+
* Shared across multiple API responses
|
|
8
|
+
*/
|
|
9
|
+
export interface MatchTeam {
|
|
10
|
+
team_id: number;
|
|
11
|
+
slug: string;
|
|
12
|
+
display_name: string;
|
|
13
|
+
display_name_short: string | null;
|
|
14
|
+
display_name_code: string | null;
|
|
15
|
+
logo: string | null;
|
|
16
|
+
colour: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Venue information for a match
|
|
20
|
+
* All fields nullable because venue may not be assigned
|
|
21
|
+
* Shared across multiple API responses (including admin)
|
|
22
|
+
*/
|
|
23
|
+
export interface MatchVenue {
|
|
24
|
+
venue_id: number | null;
|
|
25
|
+
name: string | null;
|
|
26
|
+
location_x: number | null;
|
|
27
|
+
location_y: number | null;
|
|
28
|
+
capacity: number | null;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/api/shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CompetitionBasicInfo } from "./matches";
|
|
2
|
+
/**
|
|
3
|
+
* Team home venue information
|
|
4
|
+
*/
|
|
5
|
+
export interface TeamHomeVenue {
|
|
6
|
+
venue_id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
name_short: string | null;
|
|
9
|
+
location_x: number;
|
|
10
|
+
location_y: number;
|
|
11
|
+
capacity: number | null;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Coach information
|
|
15
|
+
* Contains basic coach details for display
|
|
16
|
+
*/
|
|
17
|
+
export interface CoachInfo {
|
|
18
|
+
coach_id: number | null;
|
|
19
|
+
full_name: string | null;
|
|
20
|
+
image: string | null;
|
|
21
|
+
slug: string | null;
|
|
22
|
+
birth_date: string | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Response type for GET /teams/:team_id/detail
|
|
26
|
+
* Contains common team fields at top level, sport-specific data in detail
|
|
27
|
+
*/
|
|
28
|
+
export interface GetTeamDetailResponse {
|
|
29
|
+
team_id: number;
|
|
30
|
+
competition: CompetitionBasicInfo;
|
|
31
|
+
display_name: string;
|
|
32
|
+
display_name_short: string | null;
|
|
33
|
+
display_name_code: string | null;
|
|
34
|
+
official_page_url: string | null;
|
|
35
|
+
premierships: number;
|
|
36
|
+
runners_up: number;
|
|
37
|
+
minor_premierships: number | null;
|
|
38
|
+
head_coach: CoachInfo;
|
|
39
|
+
assistant_coach: CoachInfo;
|
|
40
|
+
founded: string | null;
|
|
41
|
+
slug: string;
|
|
42
|
+
logo: string | null;
|
|
43
|
+
colour: string;
|
|
44
|
+
venues: TeamHomeVenue[];
|
|
45
|
+
code_name: string;
|
|
46
|
+
detail: unknown;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=teams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["../../src/api/teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,UAA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E,MAAM,CAAC;CAClB"}
|
package/dist/api/test.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/api/version.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Match Voting API Types
|
|
3
|
+
* Shared type definitions for match win voting endpoints
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Vote option for match win prediction
|
|
7
|
+
*/
|
|
8
|
+
export type MatchWinVote = "home" | "away";
|
|
9
|
+
/**
|
|
10
|
+
* Response for GET /matches/:match_id/vote
|
|
11
|
+
* Returns user's vote status and current totals
|
|
12
|
+
*/
|
|
13
|
+
export interface GetMatchVoteStatusResponse {
|
|
14
|
+
has_voted: boolean;
|
|
15
|
+
voted_for: MatchWinVote | null;
|
|
16
|
+
home_votes: number;
|
|
17
|
+
away_votes: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Response for POST /matches/:match_id/vote
|
|
21
|
+
* Returns whether the vote was newly recorded
|
|
22
|
+
*/
|
|
23
|
+
export interface SubmitMatchVoteResponse {
|
|
24
|
+
recorded: boolean;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=votes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"votes.d.ts","sourceRoot":"","sources":["../../src/api/votes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,YAAY,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./response";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common HTTP Status Codes
|
|
3
|
+
*
|
|
4
|
+
* Success (2xx):
|
|
5
|
+
* - 200: OK - Request succeeded
|
|
6
|
+
* - 201: Created - Resource created successfully
|
|
7
|
+
* - 202: Accepted - Request accepted for processing
|
|
8
|
+
*
|
|
9
|
+
* Client Errors (4xx):
|
|
10
|
+
* - 400: Bad Request - Invalid request syntax or parameters
|
|
11
|
+
* - 401: Unauthorized - Authentication required or failed
|
|
12
|
+
* - 403: Forbidden - Authenticated but lacks permissions
|
|
13
|
+
* - 404: Not Found - Resource does not exist
|
|
14
|
+
* - 409: Conflict - Request conflicts with current state
|
|
15
|
+
*
|
|
16
|
+
* Server Errors (5xx):
|
|
17
|
+
* - 500: Internal Server Error - Unexpected server error
|
|
18
|
+
* - 502: Bad Gateway - Invalid upstream server response
|
|
19
|
+
* - 503: Service Unavailable - Server temporarily unavailable
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Standardized API Response Structure
|
|
23
|
+
* Generic type T represents the data payload
|
|
24
|
+
*/
|
|
25
|
+
export interface ApiResponse<T = any> {
|
|
26
|
+
success: boolean;
|
|
27
|
+
statusCode: number;
|
|
28
|
+
message: string;
|
|
29
|
+
data: T | null;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/common/response.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;CAChB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common HTTP Status Codes
|
|
3
|
+
*
|
|
4
|
+
* Success (2xx):
|
|
5
|
+
* - 200: OK - Request succeeded
|
|
6
|
+
* - 201: Created - Resource created successfully
|
|
7
|
+
* - 202: Accepted - Request accepted for processing
|
|
8
|
+
*
|
|
9
|
+
* Client Errors (4xx):
|
|
10
|
+
* - 400: Bad Request - Invalid request syntax or parameters
|
|
11
|
+
* - 401: Unauthorized - Authentication required or failed
|
|
12
|
+
* - 403: Forbidden - Authenticated but lacks permissions
|
|
13
|
+
* - 404: Not Found - Resource does not exist
|
|
14
|
+
* - 409: Conflict - Request conflicts with current state
|
|
15
|
+
*
|
|
16
|
+
* Server Errors (5xx):
|
|
17
|
+
* - 500: Internal Server Error - Unexpected server error
|
|
18
|
+
* - 502: Bad Gateway - Invalid upstream server response
|
|
19
|
+
* - 503: Service Unavailable - Server temporarily unavailable
|
|
20
|
+
*/
|
|
21
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * as NRL from "./api/nrl";
|
|
2
|
+
export * as Admin from "./api/admin";
|
|
3
|
+
export * as Shared from "./api/shared";
|
|
4
|
+
export * from "./api/shared";
|
|
5
|
+
export * from "./api/matches";
|
|
6
|
+
export * from "./api/teams";
|
|
7
|
+
export * from "./api/competitions";
|
|
8
|
+
export * from "./api/auth";
|
|
9
|
+
export * from "./api/votes";
|
|
10
|
+
export * from "./api/search";
|
|
11
|
+
export * from "./api/players";
|
|
12
|
+
export * from "./api/version";
|
|
13
|
+
export * from "./api/test";
|
|
14
|
+
export * from "./api/articles";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAGvC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
|