@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,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admin NRL Matches Types
|
|
3
|
+
*
|
|
4
|
+
* Shared types for admin NRL match management API endpoints
|
|
5
|
+
*/
|
|
6
|
+
import { MatchTeam, MatchVenue } from "../shared";
|
|
7
|
+
import { Season } from "../competitions";
|
|
8
|
+
import { ScoringEventPlayer, ScoringType, TryOverallLocation } from "../nrl/matches";
|
|
9
|
+
/**
|
|
10
|
+
* Season item for dropdown selection
|
|
11
|
+
*/
|
|
12
|
+
export interface SeasonItem extends Season {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Match list item with essential display info
|
|
16
|
+
*/
|
|
17
|
+
export interface MatchListItem {
|
|
18
|
+
match_id: number;
|
|
19
|
+
datetime: string;
|
|
20
|
+
status: "scheduled" | "live" | "completed" | "postponed" | "cancelled";
|
|
21
|
+
round: number;
|
|
22
|
+
round_text: string;
|
|
23
|
+
slug: string;
|
|
24
|
+
home_team_score: number | null;
|
|
25
|
+
away_team_score: number | null;
|
|
26
|
+
extra_time: boolean | null;
|
|
27
|
+
home_team: MatchTeam;
|
|
28
|
+
away_team: MatchTeam;
|
|
29
|
+
venue: MatchVenue;
|
|
30
|
+
ground_condition: string | null;
|
|
31
|
+
weather: string | null;
|
|
32
|
+
home_team_final_score_f: number | null;
|
|
33
|
+
home_team_final_score_h: number | null;
|
|
34
|
+
away_team_final_score_f: number | null;
|
|
35
|
+
away_team_final_score_h: number | null;
|
|
36
|
+
official_highlights_url: string | null;
|
|
37
|
+
home_team_interview_url: string | null;
|
|
38
|
+
away_team_interview_url: string | null;
|
|
39
|
+
analysis: string | null;
|
|
40
|
+
referee: string | null;
|
|
41
|
+
update_24h: string | null;
|
|
42
|
+
update_1h: string | null;
|
|
43
|
+
home_team_dotpoints: string[] | null;
|
|
44
|
+
away_team_dotpoints: string[] | null;
|
|
45
|
+
golden_point: boolean | null;
|
|
46
|
+
public_broadcast: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Response for GET /admin/nrl/matches
|
|
50
|
+
*/
|
|
51
|
+
export interface GetMatchesResponse {
|
|
52
|
+
seasons: SeasonItem[];
|
|
53
|
+
selected_season_id: number;
|
|
54
|
+
matches: MatchListItem[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Request body for PUT /admin/nrl/matches/:matchId
|
|
58
|
+
* All fields optional - only provided fields will be updated
|
|
59
|
+
*/
|
|
60
|
+
export interface UpdateMatchRequest {
|
|
61
|
+
status?: "scheduled" | "live" | "completed" | "postponed" | "cancelled";
|
|
62
|
+
home_team_score?: number | null;
|
|
63
|
+
away_team_score?: number | null;
|
|
64
|
+
extra_time?: boolean | null;
|
|
65
|
+
ground_condition?: string | null;
|
|
66
|
+
weather?: string | null;
|
|
67
|
+
home_team_final_score_f?: number | null;
|
|
68
|
+
home_team_final_score_h?: number | null;
|
|
69
|
+
away_team_final_score_f?: number | null;
|
|
70
|
+
away_team_final_score_h?: number | null;
|
|
71
|
+
official_highlights_url?: string | null;
|
|
72
|
+
home_team_interview_url?: string | null;
|
|
73
|
+
away_team_interview_url?: string | null;
|
|
74
|
+
analysis?: string | null;
|
|
75
|
+
referee?: string | null;
|
|
76
|
+
update_24h?: string | null;
|
|
77
|
+
update_1h?: string | null;
|
|
78
|
+
home_team_dotpoints?: string[] | null;
|
|
79
|
+
away_team_dotpoints?: string[] | null;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Response for PUT /admin/nrl/matches/:matchId
|
|
83
|
+
*/
|
|
84
|
+
export interface UpdateMatchResponse {
|
|
85
|
+
match_id: number;
|
|
86
|
+
updated: boolean;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Admin scoring event item with PK fields exposed for editing
|
|
90
|
+
*/
|
|
91
|
+
export interface ScoringEventItem {
|
|
92
|
+
player_id: number;
|
|
93
|
+
sample_offset_s: number;
|
|
94
|
+
side: "home" | "away";
|
|
95
|
+
player: ScoringEventPlayer;
|
|
96
|
+
scoring_type: ScoringType;
|
|
97
|
+
kick_successful: boolean | null;
|
|
98
|
+
try_score_x: number | null;
|
|
99
|
+
try_score_y: number | null;
|
|
100
|
+
break_x: number | null;
|
|
101
|
+
break_y: number | null;
|
|
102
|
+
kicking_x: number | null;
|
|
103
|
+
kicking_y: number | null;
|
|
104
|
+
try_associated: number | null;
|
|
105
|
+
try_comments: string | null;
|
|
106
|
+
try_overall_location: TryOverallLocation | null;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Response for GET /admin/nrl/matches/:matchId/scoring
|
|
110
|
+
*/
|
|
111
|
+
export interface GetScoringDataResponse {
|
|
112
|
+
match_id: number;
|
|
113
|
+
home_team_id: number;
|
|
114
|
+
away_team_id: number;
|
|
115
|
+
events: ScoringEventItem[];
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Single scoring event update (PK + editable fields)
|
|
119
|
+
*/
|
|
120
|
+
export interface ScoringEventUpdate {
|
|
121
|
+
player_id: number;
|
|
122
|
+
sample_offset_s: number;
|
|
123
|
+
try_score_x: number | null;
|
|
124
|
+
try_score_y: number | null;
|
|
125
|
+
break_x: number | null;
|
|
126
|
+
break_y: number | null;
|
|
127
|
+
kicking_x: number | null;
|
|
128
|
+
kicking_y: number | null;
|
|
129
|
+
try_associated: number | null;
|
|
130
|
+
try_comments: string | null;
|
|
131
|
+
try_overall_location: TryOverallLocation | null;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Request body for PUT /admin/nrl/matches/:matchId/scoring
|
|
135
|
+
*/
|
|
136
|
+
export interface UpdateScoringDataRequest {
|
|
137
|
+
events: ScoringEventUpdate[];
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Response for PUT /admin/nrl/matches/:matchId/scoring
|
|
141
|
+
*/
|
|
142
|
+
export interface UpdateScoringDataResponse {
|
|
143
|
+
match_id: number;
|
|
144
|
+
updated_count: number;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=nrl-matches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nrl-matches.d.ts","sourceRoot":"","sources":["../../../src/api/admin/nrl-matches.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,MAAM;CAAG;AAE7C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IAGb,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM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;CACvB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type ArticleStatus = "draft" | "released" | "deleted";
|
|
2
|
+
export type ArticleContentBlock = {
|
|
3
|
+
type: "subtitle";
|
|
4
|
+
text: string;
|
|
5
|
+
} | {
|
|
6
|
+
type: "paragraph";
|
|
7
|
+
text: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: "image";
|
|
10
|
+
url: string;
|
|
11
|
+
caption?: string;
|
|
12
|
+
} | {
|
|
13
|
+
type: "dotpoints";
|
|
14
|
+
items: string[];
|
|
15
|
+
} | {
|
|
16
|
+
type: "numbered_list";
|
|
17
|
+
items: string[];
|
|
18
|
+
} | {
|
|
19
|
+
type: "divider";
|
|
20
|
+
} | {
|
|
21
|
+
type: "internal_link";
|
|
22
|
+
text: string;
|
|
23
|
+
route: string;
|
|
24
|
+
} | {
|
|
25
|
+
type: "external_link";
|
|
26
|
+
text: string;
|
|
27
|
+
url: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: "tags";
|
|
30
|
+
items: string[];
|
|
31
|
+
};
|
|
32
|
+
export interface ArticleListItem {
|
|
33
|
+
article_id: number;
|
|
34
|
+
slug: string;
|
|
35
|
+
title: string;
|
|
36
|
+
date: string;
|
|
37
|
+
main_image: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface GetArticlesResponse {
|
|
40
|
+
articles: ArticleListItem[];
|
|
41
|
+
}
|
|
42
|
+
export interface GetArticleDetailResponse {
|
|
43
|
+
article_id: number;
|
|
44
|
+
slug: string;
|
|
45
|
+
title: string;
|
|
46
|
+
date: string;
|
|
47
|
+
main_image: string | null;
|
|
48
|
+
content: ArticleContentBlock[];
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=articles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"articles.d.ts","sourceRoot":"","sources":["../../src/api/articles.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,GA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;IAC1B,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authentication API Types
|
|
3
|
+
* Shared type definitions for authentication endpoints
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Sign-in method types
|
|
7
|
+
*/
|
|
8
|
+
export type SignInMethod = "google" | "apple" | "email";
|
|
9
|
+
/**
|
|
10
|
+
* User type classifications
|
|
11
|
+
*/
|
|
12
|
+
export type UserType = "regular" | "special" | "admin";
|
|
13
|
+
/**
|
|
14
|
+
* Authentication Response Structure
|
|
15
|
+
* Returned by OAuth and OTP verification endpoints
|
|
16
|
+
*/
|
|
17
|
+
export interface AuthResponse {
|
|
18
|
+
token: string | null;
|
|
19
|
+
user_type: UserType | null;
|
|
20
|
+
method: SignInMethod | null;
|
|
21
|
+
rc_uuid: string | null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* OTP Code Sent Response
|
|
25
|
+
* Returned by /auth/send-otp endpoint
|
|
26
|
+
*/
|
|
27
|
+
export interface AuthCodeSentResponse {
|
|
28
|
+
email: string;
|
|
29
|
+
code_sent: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Token test response
|
|
33
|
+
* Returned by /token-test endpoint
|
|
34
|
+
*/
|
|
35
|
+
export interface TokenTestResponse {
|
|
36
|
+
userId: number;
|
|
37
|
+
userType: UserType;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Admin test response
|
|
41
|
+
* Returned by /admin/test endpoint (admin-protected route)
|
|
42
|
+
*/
|
|
43
|
+
export interface AdminTestResponse {
|
|
44
|
+
userId: number;
|
|
45
|
+
userType: "admin";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Display name update request
|
|
49
|
+
* Sent to /auth/update-display-name endpoint
|
|
50
|
+
*/
|
|
51
|
+
export interface UpdateDisplayNameRequest {
|
|
52
|
+
display_name: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Display name update response
|
|
56
|
+
* Returned by /auth/update-display-name endpoint
|
|
57
|
+
*/
|
|
58
|
+
export interface UpdateDisplayNameResponse {
|
|
59
|
+
success: boolean;
|
|
60
|
+
display_name: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* User info response
|
|
64
|
+
* Returned by /auth/user-info endpoint
|
|
65
|
+
*/
|
|
66
|
+
export interface UserInfoResponse {
|
|
67
|
+
email: string;
|
|
68
|
+
display_name: string;
|
|
69
|
+
google_linked: boolean;
|
|
70
|
+
apple_linked: boolean;
|
|
71
|
+
last_sign_in: string | null;
|
|
72
|
+
last_sign_in_method: SignInMethod | null;
|
|
73
|
+
legacy: boolean;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/api/auth.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,mBAAmB,EAAE,YAAY,GAAG,IAAI,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC;CACjB"}
|
package/dist/api/auth.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Season interface - represents a single season within a competition
|
|
3
|
+
*/
|
|
4
|
+
export interface Season {
|
|
5
|
+
season_id: number;
|
|
6
|
+
value: string;
|
|
7
|
+
start_date: string | null;
|
|
8
|
+
end_date: string | null;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Competition interface - represents a competition with all its metadata and seasons
|
|
12
|
+
*/
|
|
13
|
+
export interface Competition {
|
|
14
|
+
competition_id: number;
|
|
15
|
+
sport_id: number;
|
|
16
|
+
code_name: string;
|
|
17
|
+
display_name: string;
|
|
18
|
+
display_name_short: string | null;
|
|
19
|
+
display_name_code: string | null;
|
|
20
|
+
sex: "men" | "women" | "mixed";
|
|
21
|
+
country_code: string | null;
|
|
22
|
+
tier: number | null;
|
|
23
|
+
slug: string;
|
|
24
|
+
logo: string | null;
|
|
25
|
+
ladder_exists: boolean;
|
|
26
|
+
seasons: Season[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Response type for get_all_competitions_for_sport endpoint
|
|
30
|
+
*/
|
|
31
|
+
export interface GetAllCompetitionsForSportResponse {
|
|
32
|
+
competitions: Competition[];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=competitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"competitions.d.ts","sourceRoot":"","sources":["../../src/api/competitions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,GAAG,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC;IAC/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./competitions";
|
|
2
|
+
export * from "./test";
|
|
3
|
+
export * from "./matches";
|
|
4
|
+
export * from "./auth";
|
|
5
|
+
export * from "./version";
|
|
6
|
+
export * from "./shared";
|
|
7
|
+
export * from "./votes";
|
|
8
|
+
export * from "./search";
|
|
9
|
+
export * from "./players";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { MatchTeam, MatchVenue } from "./shared";
|
|
2
|
+
/**
|
|
3
|
+
* Match status enum - represents current state of a match
|
|
4
|
+
*/
|
|
5
|
+
export type MatchStatus = "scheduled" | "live" | "completed" | "postponed" | "cancelled";
|
|
6
|
+
/**
|
|
7
|
+
* Match structure - simplified, shared across all competitions
|
|
8
|
+
*/
|
|
9
|
+
export interface Match {
|
|
10
|
+
match_id: number;
|
|
11
|
+
datetime: string;
|
|
12
|
+
status: MatchStatus;
|
|
13
|
+
slug: string;
|
|
14
|
+
venue: MatchVenue;
|
|
15
|
+
home_team: MatchTeam;
|
|
16
|
+
away_team: MatchTeam;
|
|
17
|
+
home_team_score: number | null;
|
|
18
|
+
away_team_score: number | null;
|
|
19
|
+
extra_time: boolean | null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Match group - groups matches by round/matchday/etc.
|
|
23
|
+
*/
|
|
24
|
+
export interface MatchGroup {
|
|
25
|
+
grouping_key: string;
|
|
26
|
+
grouping_value: number;
|
|
27
|
+
grouping_text: string;
|
|
28
|
+
matches: Match[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Response type for get_all_matches_for_competition_season endpoint
|
|
32
|
+
*/
|
|
33
|
+
export interface GetAllMatchesForCompetitionSeasonResponse {
|
|
34
|
+
groups: MatchGroup[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Competition metadata (without seasons array)
|
|
38
|
+
* Used in match detail responses
|
|
39
|
+
*/
|
|
40
|
+
export interface CompetitionBasicInfo {
|
|
41
|
+
competition_id: number;
|
|
42
|
+
sport_id: number;
|
|
43
|
+
code_name: string;
|
|
44
|
+
display_name: string;
|
|
45
|
+
display_name_short: string | null;
|
|
46
|
+
display_name_code: string | null;
|
|
47
|
+
sex: "men" | "women" | "mixed";
|
|
48
|
+
country_code: string | null;
|
|
49
|
+
tier: number | null;
|
|
50
|
+
slug: string;
|
|
51
|
+
logo: string | null;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Response type for get_match_basic_info endpoint
|
|
55
|
+
* Returns match data with competition metadata (no extras)
|
|
56
|
+
*/
|
|
57
|
+
export interface GetMatchBasicInfoResponse {
|
|
58
|
+
match: Match;
|
|
59
|
+
competition: CompetitionBasicInfo;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Response type for get_match_detail endpoint
|
|
63
|
+
* Returns competition code_name and sport-specific detail in one call
|
|
64
|
+
*/
|
|
65
|
+
export interface GetMatchDetailResponse {
|
|
66
|
+
code_name: string;
|
|
67
|
+
detail: unknown;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Timeline match - combines match with competition metadata
|
|
71
|
+
* Used for time-based free-scrolling feature across all competitions
|
|
72
|
+
*/
|
|
73
|
+
export interface TimelineMatch {
|
|
74
|
+
match: Match;
|
|
75
|
+
competition: CompetitionBasicInfo;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=matches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matches.d.ts","sourceRoot":"","sources":["../../src/api/matches.ts"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AI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,oBAAoB,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,oBAAoB,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type ArticleStatus = "draft" | "released" | "deleted";
|
|
2
|
+
export type ArticleContentBlock = {
|
|
3
|
+
type: "subtitle";
|
|
4
|
+
text: string;
|
|
5
|
+
} | {
|
|
6
|
+
type: "paragraph";
|
|
7
|
+
text: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: "image";
|
|
10
|
+
url: string;
|
|
11
|
+
caption?: string;
|
|
12
|
+
} | {
|
|
13
|
+
type: "dotpoints";
|
|
14
|
+
items: string[];
|
|
15
|
+
} | {
|
|
16
|
+
type: "numbered_list";
|
|
17
|
+
items: string[];
|
|
18
|
+
} | {
|
|
19
|
+
type: "divider";
|
|
20
|
+
} | {
|
|
21
|
+
type: "internal_link";
|
|
22
|
+
text: string;
|
|
23
|
+
route: string;
|
|
24
|
+
} | {
|
|
25
|
+
type: "external_link";
|
|
26
|
+
text: string;
|
|
27
|
+
url: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: "tags";
|
|
30
|
+
items: string[];
|
|
31
|
+
};
|
|
32
|
+
export interface ArticleListItem {
|
|
33
|
+
article_id: number;
|
|
34
|
+
slug: string;
|
|
35
|
+
title: string;
|
|
36
|
+
date: string;
|
|
37
|
+
main_image: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface GetArticlesResponse {
|
|
40
|
+
articles: ArticleListItem[];
|
|
41
|
+
}
|
|
42
|
+
export interface GetArticleDetailResponse {
|
|
43
|
+
article_id: number;
|
|
44
|
+
slug: string;
|
|
45
|
+
title: string;
|
|
46
|
+
date: string;
|
|
47
|
+
main_image: string | null;
|
|
48
|
+
content: ArticleContentBlock[];
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=news.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"news.d.ts","sourceRoot":"","sources":["../../src/api/news.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAI7D,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAGtC,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAGD,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC"}
|
package/dist/api/news.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { MatchTeam } from "../shared";
|
|
2
|
+
/**
|
|
3
|
+
* Player scoring statistics for analytics
|
|
4
|
+
* Contains historical try-scoring patterns for betting analytics
|
|
5
|
+
*/
|
|
6
|
+
export interface PlayerScoringStats {
|
|
7
|
+
player_id: number;
|
|
8
|
+
first_name: string;
|
|
9
|
+
last_name: string;
|
|
10
|
+
team_id: number;
|
|
11
|
+
image_default: string | null;
|
|
12
|
+
image_headshot: string | null;
|
|
13
|
+
competition_image_default: string | null;
|
|
14
|
+
competition_image_headshot: string | null;
|
|
15
|
+
games_played: number;
|
|
16
|
+
games_scored_1_or_more: number;
|
|
17
|
+
games_scored_2_or_more: number;
|
|
18
|
+
games_scored_3_or_more: number;
|
|
19
|
+
games_scored_first: number;
|
|
20
|
+
games_scored_second: number;
|
|
21
|
+
games_scored_third: number;
|
|
22
|
+
games_scored_first_or_second: number;
|
|
23
|
+
games_scored_first_or_second_or_third: number;
|
|
24
|
+
games_scored_last: number;
|
|
25
|
+
games_scored_first_or_last: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Response for NRL scoring analytics endpoint
|
|
29
|
+
* Returns historical scoring statistics for all players in a match's lineups
|
|
30
|
+
*/
|
|
31
|
+
export interface GetScoringAnalyticsResponse {
|
|
32
|
+
match_id: number;
|
|
33
|
+
competition_id: number;
|
|
34
|
+
season_id: number;
|
|
35
|
+
season_value: string;
|
|
36
|
+
teams: Record<number, MatchTeam>;
|
|
37
|
+
players: PlayerScoringStats[];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Segment definition for categorizing opponents
|
|
41
|
+
* Used across multiple analytics types
|
|
42
|
+
*/
|
|
43
|
+
export interface Segment {
|
|
44
|
+
id: "top_4" | "mid_5_8" | "top_8" | "bottom" | "total_average";
|
|
45
|
+
label: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Stat with segmented values by opponent category
|
|
49
|
+
* Generic pattern used across all analytics types
|
|
50
|
+
*/
|
|
51
|
+
export interface StatWithSegments {
|
|
52
|
+
key: string;
|
|
53
|
+
label: string;
|
|
54
|
+
values: Record<string, number | string>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Big Win Little Win analytics
|
|
58
|
+
* Categorizes wins by margin against different opponent categories
|
|
59
|
+
*/
|
|
60
|
+
export interface BWLWAnalytics {
|
|
61
|
+
stats: StatWithSegments[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Score first analytics
|
|
65
|
+
* Tracks percentage of games scoring first by opponent category
|
|
66
|
+
*/
|
|
67
|
+
export interface ScoreFirstAnalytics {
|
|
68
|
+
stats: StatWithSegments[];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Team total tries analytics
|
|
72
|
+
* Average tries per game by opponent category
|
|
73
|
+
*/
|
|
74
|
+
export interface TeamTotalTriesAnalytics {
|
|
75
|
+
stats: StatWithSegments[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* First try match data
|
|
79
|
+
* Individual match data for first try analysis
|
|
80
|
+
*/
|
|
81
|
+
export interface FirstTryMatch {
|
|
82
|
+
opposition_id: number;
|
|
83
|
+
scored_first: boolean;
|
|
84
|
+
timestamp_s: number;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Half-time/full-time match data
|
|
88
|
+
* Score differentials by half for individual matches
|
|
89
|
+
*/
|
|
90
|
+
export interface HTFTMatch {
|
|
91
|
+
opposition_id: number;
|
|
92
|
+
first_half_score_diff: number;
|
|
93
|
+
second_half_score_diff: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Total points analytics
|
|
97
|
+
* Points by half and opponent category
|
|
98
|
+
*/
|
|
99
|
+
export interface TotalPointsAnalytics {
|
|
100
|
+
stats: StatWithSegments[];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Complete stats analytics for a single team
|
|
104
|
+
* Combines BWLW and all scoring analytics
|
|
105
|
+
*/
|
|
106
|
+
export interface TeamStatsAnalytics {
|
|
107
|
+
team_id: number;
|
|
108
|
+
bwlw: BWLWAnalytics;
|
|
109
|
+
score_first: ScoreFirstAnalytics;
|
|
110
|
+
team_total_tries: TeamTotalTriesAnalytics;
|
|
111
|
+
first_try: FirstTryMatch[];
|
|
112
|
+
htft: HTFTMatch[];
|
|
113
|
+
total_points: TotalPointsAnalytics;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Response for NRL stats analytics endpoint
|
|
117
|
+
* Returns comprehensive BWLW and scoring analytics for both teams in a match
|
|
118
|
+
*/
|
|
119
|
+
export interface GetStatsAnalyticsResponse {
|
|
120
|
+
match_id: number;
|
|
121
|
+
competition_id: number;
|
|
122
|
+
season_id: number;
|
|
123
|
+
season_value: string;
|
|
124
|
+
teams: Record<number, MatchTeam>;
|
|
125
|
+
segments: Segment[];
|
|
126
|
+
home: TeamStatsAnalytics;
|
|
127
|
+
away: TeamStatsAnalytics;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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