fansunited-data-layer 0.0.1 → 0.0.2
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 +145 -60
- package/dist/api/sportal365-sports/football/index.d.ts +11 -0
- package/dist/api/sportal365-sports/football/index.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/index.d.ts +109 -0
- package/dist/api/sportal365-sports/football/matches/index.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/transformers/commentary.d.ts +12 -0
- package/dist/api/sportal365-sports/football/matches/transformers/commentary.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/transformers/index.d.ts +10 -0
- package/dist/api/sportal365-sports/football/matches/transformers/index.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/transformers/lineup.d.ts +11 -0
- package/dist/api/sportal365-sports/football/matches/transformers/lineup.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/transformers/match-event.d.ts +12 -0
- package/dist/api/sportal365-sports/football/matches/transformers/match-event.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/transformers/match.d.ts +11 -0
- package/dist/api/sportal365-sports/football/matches/transformers/match.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/transformers/odds.d.ts +11 -0
- package/dist/api/sportal365-sports/football/matches/transformers/odds.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/transformers/statistics.d.ts +11 -0
- package/dist/api/sportal365-sports/football/matches/transformers/statistics.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/commentary.types.d.ts +24 -0
- package/dist/api/sportal365-sports/football/matches/types/commentary.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/event.types.d.ts +19 -0
- package/dist/api/sportal365-sports/football/matches/types/event.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/index.d.ts +16 -0
- package/dist/api/sportal365-sports/football/matches/types/index.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/lineup.types.d.ts +78 -0
- package/dist/api/sportal365-sports/football/matches/types/lineup.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/match.types.d.ts +47 -0
- package/dist/api/sportal365-sports/football/matches/types/match.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/minute.types.d.ts +8 -0
- package/dist/api/sportal365-sports/football/matches/types/minute.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/odds.types.d.ts +80 -0
- package/dist/api/sportal365-sports/football/matches/types/odds.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/option.types.d.ts +55 -0
- package/dist/api/sportal365-sports/football/matches/types/option.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/referee.types.d.ts +13 -0
- package/dist/api/sportal365-sports/football/matches/types/referee.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/statistics.types.d.ts +45 -0
- package/dist/api/sportal365-sports/football/matches/types/statistics.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/status.types.d.ts +13 -0
- package/dist/api/sportal365-sports/football/matches/types/status.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/team.types.d.ts +17 -0
- package/dist/api/sportal365-sports/football/matches/types/team.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/matches/types/winner.types.d.ts +15 -0
- package/dist/api/sportal365-sports/football/matches/types/winner.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/teams/index.d.ts +25 -0
- package/dist/api/sportal365-sports/football/teams/index.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/teams/team.types.d.ts +55 -0
- package/dist/api/sportal365-sports/football/teams/team.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/teams/utils.d.ts +11 -0
- package/dist/api/sportal365-sports/football/teams/utils.d.ts.map +1 -0
- package/dist/api/sportal365-sports/http.d.ts +24 -0
- package/dist/api/sportal365-sports/http.d.ts.map +1 -0
- package/dist/api/sportal365-sports/index.d.ts +9 -0
- package/dist/api/sportal365-sports/index.d.ts.map +1 -0
- package/dist/api/sportal365-sports/shared/index.d.ts +5 -0
- package/dist/api/sportal365-sports/shared/index.d.ts.map +1 -0
- package/dist/api/sportal365-sports/shared/types.d.ts +189 -0
- package/dist/api/sportal365-sports/shared/types.d.ts.map +1 -0
- package/dist/config/index.d.ts +31 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/types.d.ts +34 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/fansunited-data-layer.js +1 -1
- package/dist/fansunited-data-layer.umd.cjs +1 -1
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/types/canonical/base.types.d.ts +134 -0
- package/dist/types/canonical/base.types.d.ts.map +1 -0
- package/dist/types/canonical/commentary.types.d.ts +42 -0
- package/dist/types/canonical/commentary.types.d.ts.map +1 -0
- package/dist/types/canonical/event.types.d.ts +31 -0
- package/dist/types/canonical/event.types.d.ts.map +1 -0
- package/dist/types/canonical/index.d.ts +14 -0
- package/dist/types/canonical/index.d.ts.map +1 -0
- package/dist/types/canonical/lineup.types.d.ts +33 -0
- package/dist/types/canonical/lineup.types.d.ts.map +1 -0
- package/dist/types/canonical/match.types.d.ts +139 -0
- package/dist/types/canonical/match.types.d.ts.map +1 -0
- package/dist/types/canonical/odds.types.d.ts +73 -0
- package/dist/types/canonical/odds.types.d.ts.map +1 -0
- package/dist/types/canonical/standing.types.d.ts +57 -0
- package/dist/types/canonical/standing.types.d.ts.map +1 -0
- package/dist/types/canonical/statistics.types.d.ts +27 -0
- package/dist/types/canonical/statistics.types.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,73 +1,158 @@
|
|
|
1
|
-
#
|
|
1
|
+
# fansunited-data-layer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A TypeScript library for fetching and transforming sports data from multiple API providers. Returns clean, canonical types that are provider-agnostic.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install fansunited-data-layer
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { setConfig, getFootballMatch } from "fansunited-data-layer";
|
|
9
15
|
|
|
10
|
-
|
|
16
|
+
// Configure the library (once at app startup)
|
|
17
|
+
setConfig({
|
|
18
|
+
sportal365Sports: {
|
|
19
|
+
username: "your-username",
|
|
20
|
+
password: "your-password",
|
|
21
|
+
projectId: "your-project-id",
|
|
22
|
+
domain: "https://api.example.com",
|
|
23
|
+
},
|
|
24
|
+
});
|
|
11
25
|
|
|
12
|
-
|
|
26
|
+
// Fetch a match
|
|
27
|
+
const match = await getFootballMatch("7576255");
|
|
28
|
+
console.log(match.competitorOne.name); // "Manchester United"
|
|
29
|
+
console.log(match.score?.competitorOne); // "2"
|
|
30
|
+
```
|
|
13
31
|
|
|
14
|
-
##
|
|
32
|
+
## API Reference
|
|
15
33
|
|
|
16
|
-
|
|
34
|
+
### Configuration
|
|
17
35
|
|
|
18
|
-
|
|
19
|
-
export default defineConfig([
|
|
20
|
-
globalIgnores(['dist']),
|
|
21
|
-
{
|
|
22
|
-
files: ['**/*.{ts,tsx}'],
|
|
23
|
-
extends: [
|
|
24
|
-
// Other configs...
|
|
36
|
+
#### `setConfig(config)`
|
|
25
37
|
|
|
26
|
-
|
|
27
|
-
tseslint.configs.recommendedTypeChecked,
|
|
28
|
-
// Alternatively, use this for stricter rules
|
|
29
|
-
tseslint.configs.strictTypeChecked,
|
|
30
|
-
// Optionally, add this for stylistic rules
|
|
31
|
-
tseslint.configs.stylisticTypeChecked,
|
|
38
|
+
Initialize the library with your API credentials.
|
|
32
39
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
])
|
|
40
|
+
```typescript
|
|
41
|
+
setConfig({
|
|
42
|
+
sportal365Sports: {
|
|
43
|
+
username: string; // API username
|
|
44
|
+
password: string; // API password
|
|
45
|
+
projectId: string; // Your project ID
|
|
46
|
+
domain: string; // API base URL
|
|
47
|
+
languageCode?: string; // Default language (default: 'en')
|
|
48
|
+
}
|
|
49
|
+
});
|
|
44
50
|
```
|
|
45
51
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
52
|
+
### Football Endpoints
|
|
53
|
+
|
|
54
|
+
#### `getFootballMatch(matchId, options?)`
|
|
55
|
+
|
|
56
|
+
Get a single match by ID, UUID, or slug.
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
const match = await getFootballMatch("7576255");
|
|
60
|
+
|
|
61
|
+
// With optional data
|
|
62
|
+
const match = await getFootballMatch("7576255", {
|
|
63
|
+
optionalData: ["MAIN_EVENTS", "LINEUP_STATUS", "REFEREES"],
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Options:**
|
|
68
|
+
|
|
69
|
+
- `optionalData` - Array of: `'MAIN_EVENTS'`, `'LINEUP_STATUS'`, `'REFEREES'`, `'PENALTY_SHOOTOUT_EVENTS'`
|
|
70
|
+
- `languageCode` - Override default language
|
|
71
|
+
|
|
72
|
+
#### `getFootballMatchEvents(matchId, options?)`
|
|
73
|
+
|
|
74
|
+
Get all events for a match (goals, cards, substitutions).
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
const events = await getFootballMatchEvents("7576255");
|
|
78
|
+
events.forEach((e) => console.log(`${e.minute}' - ${e.type}`));
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### `getFootballMatchLineups(matchId, options?)`
|
|
82
|
+
|
|
83
|
+
Get match lineups with formations and player details.
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
const lineups = await getFootballMatchLineups("7576255");
|
|
87
|
+
console.log(lineups.competitorOne.formation); // "4-3-3"
|
|
88
|
+
console.log(lineups.competitorOne.starters); // Player[]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### `getFootballMatchStatistics(matchId, options?)`
|
|
92
|
+
|
|
93
|
+
Get match statistics (possession, shots, corners, etc.).
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
const stats = await getFootballMatchStatistics("7576255");
|
|
97
|
+
stats.competitorOne.statistics.forEach((s) => {
|
|
98
|
+
console.log(`${s.label}: ${s.value}${s.unit || ""}`);
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### `getFootballMatchOdds(matchId, options?)`
|
|
103
|
+
|
|
104
|
+
Get betting odds from various operators.
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
const odds = await getFootballMatchOdds("7576255", {
|
|
108
|
+
oddType: "PREMATCH",
|
|
109
|
+
marketTypes: ["1X2", "OVER_UNDER"],
|
|
110
|
+
});
|
|
73
111
|
```
|
|
112
|
+
|
|
113
|
+
#### `getFootballMatchCommentary(matchId, options?)`
|
|
114
|
+
|
|
115
|
+
Get live text commentary for a match.
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
const commentary = await getFootballMatchCommentary("7576255");
|
|
119
|
+
commentary.forEach((c) => {
|
|
120
|
+
console.log(`${c.minute}' - ${c.text}`);
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
#### `getFootballTeam(teamId, options?)`
|
|
125
|
+
|
|
126
|
+
Get team details.
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
const team = await getFootballTeam("1234");
|
|
130
|
+
console.log(team.name);
|
|
131
|
+
console.log(team.assets?.logo);
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Canonical Types
|
|
135
|
+
|
|
136
|
+
All responses are transformed to provider-agnostic canonical types prefixed with `FUSports`:
|
|
137
|
+
|
|
138
|
+
- `FUSportsMatch` - Full match data
|
|
139
|
+
- `FUSportsMatchEvent` - Goals, cards, substitutions
|
|
140
|
+
- `FUSportsMatchLineups` - Team lineups and formations
|
|
141
|
+
- `FUSportsMatchStatistics` - Match statistics
|
|
142
|
+
- `FUSportsMatchOdds` - Betting odds
|
|
143
|
+
- `FUSportsCommentaryItem` - Commentary entries
|
|
144
|
+
- `FUSportsCompetitor` - Team/competitor data
|
|
145
|
+
- `FUSportsCompetition` - Tournament/league data
|
|
146
|
+
- `FUSportsPlayer` - Player data
|
|
147
|
+
|
|
148
|
+
## TypeScript
|
|
149
|
+
|
|
150
|
+
Full TypeScript support with exported types:
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
import type { FUSportsMatch, FUSportsMatchEvent, FUSportsCompetitor } from "fansunited-data-layer";
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## License
|
|
157
|
+
|
|
158
|
+
MIT
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sportal365 Sports API - Football
|
|
3
|
+
*
|
|
4
|
+
* Football-specific endpoints for the Sportal365 Sports API.
|
|
5
|
+
* All functions return canonical FUSports types.
|
|
6
|
+
*/
|
|
7
|
+
export { getFootballMatch, getFootballMatchEvents, getFootballMatchLineups, getFootballMatchOdds, getFootballMatchStatistics, getFootballMatchCommentary, } from "./matches";
|
|
8
|
+
export type { GetFootballMatchOptions, GetFootballMatchEventsOptions, GetFootballMatchLineupsOptions, GetFootballMatchOddsOptions, GetFootballMatchStatisticsOptions, GetFootballMatchCommentaryOptions, OddType, ScopeType, OddFormat, MarketType, OptionalMatchData, } from "./matches";
|
|
9
|
+
export { getFootballTeam } from "./teams";
|
|
10
|
+
export type { GetFootballTeamOptions } from "./teams";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/api/sportal365-sports/football/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACH,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,GAC7B,MAAM,WAAW,CAAC;AAEnB,YAAY,EACR,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,iCAAiC,EACjC,iCAAiC,EACjC,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,iBAAiB,GACpB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sportal365 Sports API - Football Matches
|
|
3
|
+
*
|
|
4
|
+
* Fetches match data and transforms to canonical FUSports types.
|
|
5
|
+
*/
|
|
6
|
+
import type { FUSportsMatch, FUSportsMatchEvent, FUSportsMatchLineups, FUSportsMatchStatistics, FUSportsMatchOdds, FUSportsCommentaryItem } from "../../../../types/canonical";
|
|
7
|
+
import type { GetFootballMatchOptions, GetFootballMatchEventsOptions, GetFootballMatchLineupsOptions, GetFootballMatchOddsOptions, GetFootballMatchStatisticsOptions, GetFootballMatchCommentaryOptions } from "./types";
|
|
8
|
+
export type { GetFootballMatchOptions, GetFootballMatchEventsOptions, GetFootballMatchLineupsOptions, GetFootballMatchOddsOptions, GetFootballMatchStatisticsOptions, GetFootballMatchCommentaryOptions, OddType, ScopeType, OddFormat, MarketType, OptionalMatchData, } from "./types";
|
|
9
|
+
/**
|
|
10
|
+
* Get a football match by ID, UUID, or slug
|
|
11
|
+
*
|
|
12
|
+
* @param matchId - The match ID, UUID, or slug
|
|
13
|
+
* @param options - Optional parameters for odds, events, lineups
|
|
14
|
+
* @returns Canonical FUSportsMatch
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* // Basic usage
|
|
19
|
+
* const match = await getFootballMatch('7576255');
|
|
20
|
+
* console.log(match.competitorOne.name); // "Manchester United"
|
|
21
|
+
*
|
|
22
|
+
* // With main events and lineup status
|
|
23
|
+
* const match = await getFootballMatch('7576255', {
|
|
24
|
+
* optionalData: ['MAIN_EVENTS', 'LINEUP_STATUS']
|
|
25
|
+
* });
|
|
26
|
+
* console.log(match.mainEvents); // Goals, cards, etc.
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function getFootballMatch(matchId: string, options?: GetFootballMatchOptions): Promise<FUSportsMatch>;
|
|
30
|
+
/**
|
|
31
|
+
* Get all events for a football match
|
|
32
|
+
*
|
|
33
|
+
* @param matchId - The match ID
|
|
34
|
+
* @param options - Optional parameters
|
|
35
|
+
* @returns Array of match events (goals, cards, substitutions, etc.)
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const events = await getFootballMatchEvents('7576255');
|
|
40
|
+
* events.forEach(e => console.log(`${e.minute}' - ${e.type}`));
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function getFootballMatchEvents(matchId: string, options?: GetFootballMatchEventsOptions): Promise<FUSportsMatchEvent[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Get lineups for a football match
|
|
46
|
+
*
|
|
47
|
+
* @param matchId - The match ID
|
|
48
|
+
* @param options - Optional parameters
|
|
49
|
+
* @returns Canonical match lineups with formations and players
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* const lineups = await getFootballMatchLineups('7576255');
|
|
54
|
+
* console.log(lineups.home.formation); // "4-3-3"
|
|
55
|
+
* console.log(lineups.home.starters);
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function getFootballMatchLineups(matchId: string, options?: GetFootballMatchLineupsOptions): Promise<FUSportsMatchLineups>;
|
|
59
|
+
/**
|
|
60
|
+
* Get odds for a football match
|
|
61
|
+
*
|
|
62
|
+
* Odds are fetched from the match endpoint with odds parameters.
|
|
63
|
+
* Uses `oddClient` and `languageCode` from config if not provided in options.
|
|
64
|
+
*
|
|
65
|
+
* @param matchId - The match ID
|
|
66
|
+
* @param options - Optional parameters for filtering odds
|
|
67
|
+
* @returns Canonical match odds with bookmaker details
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const odds = await getFootballMatchOdds('7576255', {
|
|
72
|
+
* marketTypes: ['1x2', 'OVER_UNDER']
|
|
73
|
+
* });
|
|
74
|
+
* console.log(`${odds.bookmakers.length} bookmakers available`);
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export declare function getFootballMatchOdds(matchId: string, options?: GetFootballMatchOddsOptions): Promise<FUSportsMatchOdds>;
|
|
78
|
+
/**
|
|
79
|
+
* Get team statistics for a football match
|
|
80
|
+
*
|
|
81
|
+
* @param matchId - The match ID (event ID)
|
|
82
|
+
* @param options - Optional parameters
|
|
83
|
+
* @returns Canonical match statistics for both teams
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const stats = await getFootballMatchStatistics('7576255');
|
|
88
|
+
* console.log(`Possession: ${stats.home.possession}% - ${stats.away.possession}%`);
|
|
89
|
+
* console.log(`Shots: ${stats.home.shotsTotal} - ${stats.away.shotsTotal}`);
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export declare function getFootballMatchStatistics(matchId: string, options?: GetFootballMatchStatisticsOptions): Promise<FUSportsMatchStatistics>;
|
|
93
|
+
/**
|
|
94
|
+
* Get live commentary for a football match
|
|
95
|
+
*
|
|
96
|
+
* @param matchId - The match ID, UUID, or slug
|
|
97
|
+
* @param options - Optional parameters
|
|
98
|
+
* @returns Array of commentary entries
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const commentary = await getFootballMatchCommentary('7576255');
|
|
103
|
+
* commentary.forEach(c => {
|
|
104
|
+
* console.log(`${c.elapsed}' - ${c.autoText}`);
|
|
105
|
+
* });
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export declare function getFootballMatchCommentary(matchId: string, options?: GetFootballMatchCommentaryOptions): Promise<FUSportsCommentaryItem[]>;
|
|
109
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/matches/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACR,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACzB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EAMR,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,iCAAiC,EACjC,iCAAiC,EACpC,MAAM,SAAS,CAAC;AAWjB,YAAY,EACR,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,iCAAiC,EACjC,iCAAiC,EACjC,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,iBAAiB,GACpB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,uBAA4B,GAAG,OAAO,CAAC,aAAa,CAAC,CAkBrH;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CACxC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC,GAC5C,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAW/B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,uBAAuB,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,8BAAmC,GAC7C,OAAO,CAAC,oBAAoB,CAAC,CAW/B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,oBAAoB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,2BAAgC,GAC1C,OAAO,CAAC,iBAAiB,CAAC,CAiB5B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,iCAAsC,GAChD,OAAO,CAAC,uBAAuB,CAAC,CAWlC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,iCAAsC,GAChD,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAWnC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commentary transformers
|
|
3
|
+
*
|
|
4
|
+
* Transforms raw API commentary data to canonical FUSportsCommentary type.
|
|
5
|
+
*/
|
|
6
|
+
import type { FUSportsCommentaryItem } from "../../../../../types/canonical";
|
|
7
|
+
import type { RawCommentary } from "../types";
|
|
8
|
+
/**
|
|
9
|
+
* Transform raw commentary entry to canonical format
|
|
10
|
+
*/
|
|
11
|
+
export declare function transformCommentary(raw: RawCommentary): FUSportsCommentaryItem;
|
|
12
|
+
//# sourceMappingURL=commentary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commentary.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/transformers/commentary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAa9C;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,sBAAsB,CAe9E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transformers barrel file
|
|
3
|
+
*/
|
|
4
|
+
export { transformEvent } from "./match-event";
|
|
5
|
+
export { transformMatch } from "./match";
|
|
6
|
+
export { transformLineups } from "./lineup";
|
|
7
|
+
export { transformStatistics } from "./statistics";
|
|
8
|
+
export { transformMatchOdds } from "./odds";
|
|
9
|
+
export { transformCommentary } from "./commentary";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/transformers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lineup transformation utilities
|
|
3
|
+
* Transforms raw API lineup responses to canonical FUSports types
|
|
4
|
+
*/
|
|
5
|
+
import type { FUSportsMatchLineups } from "../../../../../types/canonical";
|
|
6
|
+
import type { RawMatchLineups } from "../types";
|
|
7
|
+
/**
|
|
8
|
+
* Transform raw match lineups to canonical format
|
|
9
|
+
*/
|
|
10
|
+
export declare function transformLineups(raw: RawMatchLineups): FUSportsMatchLineups;
|
|
11
|
+
//# sourceMappingURL=lineup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineup.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/transformers/lineup.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACR,oBAAoB,EAIvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAuC,MAAM,UAAU,CAAC;AA2ErF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,eAAe,GAAG,oBAAoB,CAO3E"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event transformation utilities
|
|
3
|
+
* Transforms raw API event responses to canonical FUSports types
|
|
4
|
+
*/
|
|
5
|
+
import type { FUSportsMatchEvent } from "../../../../../types/canonical";
|
|
6
|
+
import type { RawMatchEvent } from "../types";
|
|
7
|
+
/**
|
|
8
|
+
* Transform raw event to canonical format
|
|
9
|
+
* Returns null for unknown event types
|
|
10
|
+
*/
|
|
11
|
+
export declare function transformEvent(raw: RawMatchEvent): FUSportsMatchEvent | null;
|
|
12
|
+
//# sourceMappingURL=match-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match-event.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/transformers/match-event.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAuB,MAAM,gCAAgC,CAAC;AAC9F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAoD9C;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,kBAAkB,GAAG,IAAI,CAkB5E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Match transformation utilities
|
|
3
|
+
* Transforms raw API match responses to canonical FUSports types
|
|
4
|
+
*/
|
|
5
|
+
import type { FUSportsMatch } from "../../../../../types/canonical";
|
|
6
|
+
import type { RawMatch } from "../types";
|
|
7
|
+
/**
|
|
8
|
+
* Transform raw match response to canonical FUSportsMatch
|
|
9
|
+
*/
|
|
10
|
+
export declare function transformMatch(raw: RawMatch): FUSportsMatch;
|
|
11
|
+
//# sourceMappingURL=match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/transformers/match.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACR,aAAa,EAUhB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,UAAU,CAAC;AAsL1D;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,QAAQ,GAAG,aAAa,CA2C3D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Odds transformation utilities
|
|
3
|
+
* Transforms raw API odds responses to canonical FUSports types
|
|
4
|
+
*/
|
|
5
|
+
import type { FUSportsMatchOdds } from "../../../../../types/canonical";
|
|
6
|
+
import type { RawMatchOdd } from "../types";
|
|
7
|
+
/**
|
|
8
|
+
* Transform raw match odds array to canonical format
|
|
9
|
+
*/
|
|
10
|
+
export declare function transformMatchOdds(matchId: string, raw: RawMatchOdd[]): FUSportsMatchOdds;
|
|
11
|
+
//# sourceMappingURL=odds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odds.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/transformers/odds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAIR,iBAAiB,EACpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAmC,MAAM,UAAU,CAAC;AA8D7E;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,iBAAiB,CAKzF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Statistics transformation utilities
|
|
3
|
+
* Transforms raw API statistics responses to canonical FUSports types
|
|
4
|
+
*/
|
|
5
|
+
import type { FUSportsMatchStatistics } from "../../../../../types/canonical";
|
|
6
|
+
import type { RawMatchStatisticsResponse } from "../types";
|
|
7
|
+
/**
|
|
8
|
+
* Transform raw match statistics response to canonical format
|
|
9
|
+
*/
|
|
10
|
+
export declare function transformStatistics(raw: RawMatchStatisticsResponse): FUSportsMatchStatistics;
|
|
11
|
+
//# sourceMappingURL=statistics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/transformers/statistics.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACR,uBAAuB,EAG1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,0BAA0B,EAAqB,MAAM,UAAU,CAAC;AA2C9E;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,0BAA0B,GAAG,uBAAuB,CAY5F"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commentary types for Sportal365 Sports API
|
|
3
|
+
*/
|
|
4
|
+
export interface RawCommentaryDetail {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface RawCommentary {
|
|
8
|
+
external_id?: string;
|
|
9
|
+
type?: string;
|
|
10
|
+
commentary_type?: string;
|
|
11
|
+
subtype_1?: string;
|
|
12
|
+
subtype_2?: string;
|
|
13
|
+
template_text?: string;
|
|
14
|
+
auto_text?: string;
|
|
15
|
+
elapsed?: string | number;
|
|
16
|
+
elapsed_plus?: string | number;
|
|
17
|
+
details?: RawCommentaryDetail[];
|
|
18
|
+
incident_timestamp?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GetFootballMatchCommentaryOptions {
|
|
21
|
+
/** Language code for translations. Required by the API. Defaults to 'en' */
|
|
22
|
+
languageCode?: string;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=commentary.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commentary.types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/types/commentary.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,mBAAmB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,iCAAiC;IAC9C,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Match event types for Sportal365 Sports API
|
|
3
|
+
*/
|
|
4
|
+
import type { RawPartialPlayer, RawTeamScore } from "../../../shared/types";
|
|
5
|
+
export type RawMatchEventTypeCode = "YELLOW_RED_CARD" | "PENALTY_SHOOTOUT_MISSED" | "PENALTY_SHOOTOUT_SCORED" | "SUBSTITUTION" | "GOAL" | "RED_CARD" | "PENALTY_MISS" | "YELLOW_CARD" | "ASSIST" | "PENALTY_GOAL" | "OWN_GOAL" | "DISALLOWED_GOAL" | "DISALLOWED_MISSED_PENALTY" | "DISALLOWED_PENALTY" | "DISALLOWED_OWN_GOAL" | "KICKOFF" | "HALFTIME" | "START_SECOND_HALF" | "FINISHED_FIRST_HALF" | "FINISHED_AFTER_EXTRA_TIME" | "FINISHED_AFTER_PENALTIES" | "OVERTIME_FIRST_HALF" | "OVERTIME_FIRST_HALF_END" | "OVERTIME_SECOND_HALF" | "INJURY_TIME" | "FINISHED";
|
|
6
|
+
export interface RawMatchEvent {
|
|
7
|
+
id: string;
|
|
8
|
+
match_id: string;
|
|
9
|
+
type_code: RawMatchEventTypeCode;
|
|
10
|
+
team_position?: "HOME" | "AWAY";
|
|
11
|
+
minute?: number;
|
|
12
|
+
injury_minute?: number;
|
|
13
|
+
injury_time_minutes?: number;
|
|
14
|
+
team_id?: string;
|
|
15
|
+
primary_player?: RawPartialPlayer;
|
|
16
|
+
secondary_player?: RawPartialPlayer;
|
|
17
|
+
score?: RawTeamScore;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=event.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/types/event.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE5E,MAAM,MAAM,qBAAqB,GAC3B,iBAAiB,GACjB,yBAAyB,GACzB,yBAAyB,GACzB,cAAc,GACd,MAAM,GACN,UAAU,GACV,cAAc,GACd,aAAa,GACb,QAAQ,GACR,cAAc,GACd,UAAU,GACV,iBAAiB,GACjB,2BAA2B,GAC3B,oBAAoB,GACpB,qBAAqB,GACrB,SAAS,GACT,UAAU,GACV,mBAAmB,GACnB,qBAAqB,GACrB,2BAA2B,GAC3B,0BAA0B,GAC1B,qBAAqB,GACrB,yBAAyB,GACzB,sBAAsB,GACtB,aAAa,GACb,UAAU,CAAC;AAEjB,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,qBAAqB,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,KAAK,CAAC,EAAE,YAAY,CAAC;CACxB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Match types barrel file
|
|
3
|
+
*/
|
|
4
|
+
export type { RawMatchStatusType, RawMatchStatus } from "./status.types";
|
|
5
|
+
export type { RawMatchTeam } from "./team.types";
|
|
6
|
+
export type { RawMatchEventTypeCode, RawMatchEvent } from "./event.types";
|
|
7
|
+
export type { RawMatchReferee } from "./referee.types";
|
|
8
|
+
export type { RawMatchWinnerReason, RawMatchOrAggregateWinner, RawMatchWinner } from "./winner.types";
|
|
9
|
+
export type { RawMatchMinute } from "./minute.types";
|
|
10
|
+
export type { RawOddsBookmakerAsset, RawOddsBookmakerLink, RawOddsBookmakerBranding, RawOddsBookmakerEventUrl, RawOddsBookmaker, RawOddsMarketType, RawOddsMarketScope, RawOddsSelectionUrl, RawOddsSelectionProviderInfo, RawOddsSelection, RawOddsMarket, RawMatchOdd, } from "./odds.types";
|
|
11
|
+
export type { RawLineupCountry, RawLineupPlayerDetails, RawLineupPlayerType, RawLineupPlayerEntry, RawLineupCoach, RawTeamLineup, RawMatchLineups, } from "./lineup.types";
|
|
12
|
+
export type { RawStatisticsData, RawTeamStatisticsEntry, RawMatchStatisticsResponse } from "./statistics.types";
|
|
13
|
+
export type { OddType, ScopeType, OddFormat, MarketType, OptionalMatchData, GetFootballMatchOptions, GetFootballMatchEventsOptions, GetFootballMatchLineupsOptions, GetFootballMatchOddsOptions, GetFootballMatchStatisticsOptions, } from "./option.types";
|
|
14
|
+
export type { RawCommentaryDetail, RawCommentary, GetFootballMatchCommentaryOptions } from "./commentary.types";
|
|
15
|
+
export type { RawMatchCoverage, RawLineupStatus, RawMatch } from "./match.types";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGzE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,YAAY,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG1E,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,YAAY,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGtG,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,YAAY,EACR,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,4BAA4B,EAC5B,gBAAgB,EAChB,aAAa,EACb,WAAW,GACd,MAAM,cAAc,CAAC;AAGtB,YAAY,EACR,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,eAAe,GAClB,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAGhH,YAAY,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,iCAAiC,GACpC,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,iCAAiC,EAAE,MAAM,oBAAoB,CAAC;AAGhH,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lineup types for Sportal365 Sports API
|
|
3
|
+
*/
|
|
4
|
+
import type { RawMatchEvent } from "./event.types";
|
|
5
|
+
export interface RawLineupCountry {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
slug: string;
|
|
9
|
+
code?: string;
|
|
10
|
+
uuid?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface RawLineupPlayerDetails {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
slug: string;
|
|
16
|
+
position?: string;
|
|
17
|
+
gender?: "MALE" | "FEMALE";
|
|
18
|
+
country?: RawLineupCountry;
|
|
19
|
+
active?: boolean;
|
|
20
|
+
birthdate?: string;
|
|
21
|
+
birth_city?: {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
country?: RawLineupCountry;
|
|
25
|
+
uuid?: string;
|
|
26
|
+
};
|
|
27
|
+
profile?: {
|
|
28
|
+
height?: string;
|
|
29
|
+
weight?: string;
|
|
30
|
+
};
|
|
31
|
+
social?: {
|
|
32
|
+
web?: string;
|
|
33
|
+
twitter_id?: string;
|
|
34
|
+
facebook_id?: string;
|
|
35
|
+
instagram_id?: string;
|
|
36
|
+
wikipedia_id?: string;
|
|
37
|
+
youtube_channel_id?: string;
|
|
38
|
+
};
|
|
39
|
+
uuid?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface RawLineupPlayerType {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
category: "start" | "sub" | "miss";
|
|
45
|
+
code: string;
|
|
46
|
+
uuid?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface RawLineupPlayerEntry {
|
|
49
|
+
type: RawLineupPlayerType;
|
|
50
|
+
player: RawLineupPlayerDetails;
|
|
51
|
+
position_x?: number | null;
|
|
52
|
+
position_y?: number | null;
|
|
53
|
+
shirt_number?: number;
|
|
54
|
+
uuid?: string;
|
|
55
|
+
events?: RawMatchEvent[];
|
|
56
|
+
}
|
|
57
|
+
export interface RawLineupCoach {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
slug?: string;
|
|
61
|
+
country?: RawLineupCountry;
|
|
62
|
+
birthdate?: string;
|
|
63
|
+
gender?: "MALE" | "FEMALE";
|
|
64
|
+
uuid?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface RawTeamLineup {
|
|
67
|
+
formation?: string;
|
|
68
|
+
coach?: RawLineupCoach;
|
|
69
|
+
team_id: string;
|
|
70
|
+
players: RawLineupPlayerEntry[];
|
|
71
|
+
}
|
|
72
|
+
export interface RawMatchLineups {
|
|
73
|
+
match_id: string;
|
|
74
|
+
status: "CONFIRMED" | "UNCONFIRMED" | "NOT_AVAILABLE";
|
|
75
|
+
home_team: RawTeamLineup;
|
|
76
|
+
away_team: RawTeamLineup;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=lineup.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineup.types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/types/lineup.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,gBAAgB,CAAC;QAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,MAAM,CAAC,EAAE;QACL,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,GAAG,aAAa,GAAG,eAAe,CAAC;IACtD,SAAS,EAAE,aAAa,CAAC;IACzB,SAAS,EAAE,aAAa,CAAC;CAC5B"}
|