fansunited-data-layer 0.0.4 → 0.0.6
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 +0 -68
- package/dist/api/sportal365-sports/constants.d.ts +1 -1
- package/dist/api/sportal365-sports/constants.d.ts.map +1 -1
- package/dist/api/sportal365-sports/football/index.d.ts +2 -0
- package/dist/api/sportal365-sports/football/index.d.ts.map +1 -1
- package/dist/api/sportal365-sports/football/standings/http.d.ts +13 -0
- package/dist/api/sportal365-sports/football/standings/http.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/standings/index.d.ts +30 -0
- package/dist/api/sportal365-sports/football/standings/index.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/standings/standing.transformer.d.ts +14 -0
- package/dist/api/sportal365-sports/football/standings/standing.transformer.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/standings/standing.types.d.ts +128 -0
- package/dist/api/sportal365-sports/football/standings/standing.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/index.d.ts +2 -2
- package/dist/api/sportal365-sports/index.d.ts.map +1 -1
- package/dist/fansunited-data-layer.js +585 -1256
- package/dist/fansunited-data-layer.umd.cjs +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/providers/competition.context.d.ts +8 -0
- package/dist/providers/competition.context.d.ts.map +1 -0
- package/dist/providers/competition.provider.d.ts +3 -0
- package/dist/providers/competition.provider.d.ts.map +1 -0
- package/dist/providers/competition.types.d.ts +68 -0
- package/dist/providers/competition.types.d.ts.map +1 -0
- package/dist/providers/index.d.ts +7 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/types/canonical/index.d.ts +1 -1
- package/dist/types/canonical/index.d.ts.map +1 -1
- package/dist/types/canonical/standing.types.d.ts +35 -8
- package/dist/types/canonical/standing.types.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -3
- package/dist/use-cases/index.d.ts +0 -13
- package/dist/use-cases/index.d.ts.map +0 -1
- package/dist/use-cases/mappers/index.d.ts +0 -7
- package/dist/use-cases/mappers/index.d.ts.map +0 -1
- package/dist/use-cases/mappers/matchMappers.d.ts +0 -45
- package/dist/use-cases/mappers/matchMappers.d.ts.map +0 -1
- package/dist/use-cases/match/index.d.ts +0 -14
- package/dist/use-cases/match/index.d.ts.map +0 -1
- package/dist/use-cases/match/prepareMatchList.server.d.ts +0 -53
- package/dist/use-cases/match/prepareMatchList.server.d.ts.map +0 -1
- package/dist/use-cases/match/prepareMatchScore.server.d.ts +0 -33
- package/dist/use-cases/match/prepareMatchScore.server.d.ts.map +0 -1
- package/dist/use-cases/match/usePrepareMatchList.d.ts +0 -20
- package/dist/use-cases/match/usePrepareMatchList.d.ts.map +0 -1
- package/dist/use-cases/match/usePrepareMatchScore.d.ts +0 -31
- package/dist/use-cases/match/usePrepareMatchScore.d.ts.map +0 -1
- package/dist/use-cases/team/index.d.ts +0 -10
- package/dist/use-cases/team/index.d.ts.map +0 -1
- package/dist/use-cases/team/prepareTeamMatches.server.d.ts +0 -56
- package/dist/use-cases/team/prepareTeamMatches.server.d.ts.map +0 -1
- package/dist/use-cases/team/usePrepareTeamMatches.d.ts +0 -26
- package/dist/use-cases/team/usePrepareTeamMatches.d.ts.map +0 -1
- package/dist/use-cases/types.d.ts +0 -8
- package/dist/use-cases/types.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -131,66 +131,6 @@ console.log(team.name);
|
|
|
131
131
|
console.log(team.assets?.logo);
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
## Use-Cases
|
|
135
|
-
|
|
136
|
-
Use-cases bridge the data layer and UI components from `fansunited-sports-ui`. Each use-case provides:
|
|
137
|
-
|
|
138
|
-
- **Server function** (`prepareX`) - Pure async function for SSR/SSG
|
|
139
|
-
- **Client hook** (`usePrepareX`) - React Query wrapper for client-side
|
|
140
|
-
|
|
141
|
-
### Match Use-Cases
|
|
142
|
-
|
|
143
|
-
#### `prepareMatchScore` / `usePrepareMatchScore`
|
|
144
|
-
|
|
145
|
-
Single match score display.
|
|
146
|
-
|
|
147
|
-
```typescript
|
|
148
|
-
import { prepareMatchScore, usePrepareMatchScore } from "fansunited-data-layer";
|
|
149
|
-
|
|
150
|
-
// Server-side
|
|
151
|
-
const data = await prepareMatchScore({ matchId: "7576255" });
|
|
152
|
-
|
|
153
|
-
// Client-side
|
|
154
|
-
const { data, isLoading } = usePrepareMatchScore({ matchId: "7576255" });
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
#### `prepareMatchList` / `usePrepareMatchList`
|
|
158
|
-
|
|
159
|
-
Match lists with various grouping variants.
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
import { prepareMatchList } from "fansunited-data-layer";
|
|
163
|
-
|
|
164
|
-
const data = await prepareMatchList({
|
|
165
|
-
variant: "daily",
|
|
166
|
-
date: new Date(),
|
|
167
|
-
tournamentIds: ["premier-league"],
|
|
168
|
-
limit: 20,
|
|
169
|
-
});
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
**Variants:** `daily`, `round`, `competition`, `teamResults`, `teamFixtures`, `teamMatches`, `teamResultsByCompetition`, `teamFixturesByCompetition`, `teamMatchesByCompetition`
|
|
173
|
-
|
|
174
|
-
### Team Use-Cases
|
|
175
|
-
|
|
176
|
-
Convenience wrappers for team-specific match queries.
|
|
177
|
-
|
|
178
|
-
```typescript
|
|
179
|
-
import { prepareTeamResults, usePrepareTeamResults } from "fansunited-data-layer";
|
|
180
|
-
|
|
181
|
-
// Get past matches for a team
|
|
182
|
-
const results = await prepareTeamResults("team-123", {
|
|
183
|
-
groupByCompetition: true,
|
|
184
|
-
limit: 20,
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
// Get upcoming matches
|
|
188
|
-
const fixtures = await prepareTeamFixtures("team-123");
|
|
189
|
-
|
|
190
|
-
// Get all matches (results + fixtures)
|
|
191
|
-
const matches = await prepareTeamMatches("team-123");
|
|
192
|
-
```
|
|
193
|
-
|
|
194
134
|
## Canonical Types
|
|
195
135
|
|
|
196
136
|
All responses are transformed to provider-agnostic canonical types prefixed with `FUSports`:
|
|
@@ -213,14 +153,6 @@ Full TypeScript support with exported types:
|
|
|
213
153
|
import type { FUSportsMatch, FUSportsMatchEvent, FUSportsCompetitor } from "fansunited-data-layer";
|
|
214
154
|
```
|
|
215
155
|
|
|
216
|
-
## Peer Dependencies
|
|
217
|
-
|
|
218
|
-
For use-cases with client hooks, you'll need:
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
npm install @tanstack/react-query
|
|
222
|
-
```
|
|
223
|
-
|
|
224
156
|
## License
|
|
225
157
|
|
|
226
158
|
MIT
|
|
@@ -10,5 +10,5 @@ export declare const SPORTAL365_BASKETBALL_DOMAIN = "https://basketball.api.spor
|
|
|
10
10
|
/** Tennis API domain */
|
|
11
11
|
export declare const SPORTAL365_TENNIS_DOMAIN = "https://tennis.api.sportal365.com";
|
|
12
12
|
/** Standings API domain */
|
|
13
|
-
export declare const SPORTAL365_STANDINGS_DOMAIN = "https://
|
|
13
|
+
export declare const SPORTAL365_STANDINGS_DOMAIN = "https://standing.api.sportal365.com";
|
|
14
14
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/api/sportal365-sports/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,0BAA0B;AAC1B,eAAO,MAAM,0BAA0B,wCAAwC,CAAC;AAEhF,4BAA4B;AAC5B,eAAO,MAAM,4BAA4B,0CAA0C,CAAC;AAEpF,wBAAwB;AACxB,eAAO,MAAM,wBAAwB,sCAAsC,CAAC;AAE5E,2BAA2B;AAC3B,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/api/sportal365-sports/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,0BAA0B;AAC1B,eAAO,MAAM,0BAA0B,wCAAwC,CAAC;AAEhF,4BAA4B;AAC5B,eAAO,MAAM,4BAA4B,0CAA0C,CAAC;AAEpF,wBAAwB;AACxB,eAAO,MAAM,wBAAwB,sCAAsC,CAAC;AAE5E,2BAA2B;AAC3B,eAAO,MAAM,2BAA2B,wCAAwC,CAAC"}
|
|
@@ -8,4 +8,6 @@ export { getFootballMatch, getFootballMatchEvents, getFootballMatchLineups, getF
|
|
|
8
8
|
export type { GetFootballMatchOptions, GetFootballMatchEventsOptions, GetFootballMatchLineupsOptions, GetFootballMatchOddsOptions, GetFootballMatchStatisticsOptions, GetFootballMatchCommentaryOptions, GetFootballMatchesOptions, OddType, ScopeType, OddFormat, MarketType, OptionalMatchData, MatchStatusType, SortDirection, } from "./matches";
|
|
9
9
|
export { getFootballTeam } from "./teams";
|
|
10
10
|
export type { GetFootballTeamOptions } from "./teams";
|
|
11
|
+
export { getFootballStandings } from "./standings";
|
|
12
|
+
export type { GetFootballStandingsOptions, StandingsCoverageType, StandingsOptionalData } from "./standings";
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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,EAC1B,kBAAkB,GACrB,MAAM,WAAW,CAAC;AAEnB,YAAY,EACR,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,iCAAiC,EACjC,iCAAiC,EACjC,yBAAyB,EACzB,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,aAAa,GAChB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC"}
|
|
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,EAC1B,kBAAkB,GACrB,MAAM,WAAW,CAAC;AAEnB,YAAY,EACR,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,iCAAiC,EACjC,iCAAiC,EACjC,yBAAyB,EACzB,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,aAAa,GAChB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAGtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standings HTTP client for Sportal365 API
|
|
3
|
+
*
|
|
4
|
+
* Note: The standings API uses a different header (X-Project) compared to
|
|
5
|
+
* other Sportal365 APIs (X-Project-Id), so we create a custom client here.
|
|
6
|
+
*/
|
|
7
|
+
import type { Sportal365HttpClient } from "../../http";
|
|
8
|
+
/**
|
|
9
|
+
* HTTP client configured for the Sportal365 Standings API
|
|
10
|
+
* Uses X-Project header instead of X-Project-Id
|
|
11
|
+
*/
|
|
12
|
+
export declare const standingsHttp: Sportal365HttpClient;
|
|
13
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/standings/http.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAkB,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAiBvE;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,oBA0C3B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sportal365 Sports API - Football Standings
|
|
3
|
+
*
|
|
4
|
+
* Fetches standings data and transforms to canonical FUSports types.
|
|
5
|
+
*/
|
|
6
|
+
import type { FUSportsStandings } from "../../../../types/canonical";
|
|
7
|
+
import type { GetFootballStandingsOptions } from "./standing.types";
|
|
8
|
+
export type { RawStandingsStage, RawStandingsGroup, RawStandingsTeam, RawStandingRuleType, RawStandingRule, RawStandingColumnCode, RawStandingColumnType, RawStandingColumn, RawStandingFormStatus, RawStandingFormResult, RawStandingFormParticipant, RawStandingFormOutcome, RawStandingFormMatch, RawStandingEntry, RawStandingsType, RawStandingsFilter, RawStandingsRankingType, RawStandingsTable, RawStageStandings, RawStandingsResponse, GetFootballStandingsOptions, StandingsCoverageType, StandingsOptionalData, } from "./standing.types";
|
|
9
|
+
/**
|
|
10
|
+
* Get football standings for a stage
|
|
11
|
+
*
|
|
12
|
+
* @param options - Options including stageId (required), coverageType, and optionalData
|
|
13
|
+
* @returns Array of canonical FUSportsStandingEntry objects
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // Get all standings with form data
|
|
18
|
+
* const standings = await getFootballStandings({
|
|
19
|
+
* stageId: 'f6461fd2-6968-4955-bed0-72e0ad9aee4a',
|
|
20
|
+
* coverageType: 'ALL',
|
|
21
|
+
* optionalData: ['form']
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* standings.forEach(entry => {
|
|
25
|
+
* console.log(`${entry.rank}. ${entry.competitor.name} - ${entry.stats.points} pts`);
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function getFootballStandings(options: GetFootballStandingsOptions): Promise<FUSportsStandings>;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/standings/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAwB,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAI1F,YAAY,EACR,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,GACxB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAwB3G"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standings transformer - converts raw Sportal365 standings to canonical FUSports types
|
|
3
|
+
*/
|
|
4
|
+
import type { FUSportsStandingEntry, FUSportsStandings } from "../../../../types/canonical";
|
|
5
|
+
import type { RawStandingEntry } from "./standing.types";
|
|
6
|
+
/**
|
|
7
|
+
* Transform a single raw standing entry to canonical format
|
|
8
|
+
*/
|
|
9
|
+
export declare function transformStandingEntry(raw: RawStandingEntry): FUSportsStandingEntry;
|
|
10
|
+
/**
|
|
11
|
+
* Transform raw standing entries to canonical standings with legend
|
|
12
|
+
*/
|
|
13
|
+
export declare function transformStandings(rawEntries: RawStandingEntry[]): FUSportsStandings;
|
|
14
|
+
//# sourceMappingURL=standing.transformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standing.transformer.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/standings/standing.transformer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAER,qBAAqB,EAErB,iBAAiB,EACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACR,gBAAgB,EAKnB,MAAM,kBAAkB,CAAC;AAuG1B;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,GAAG,qBAAqB,CAqCnF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,CAuBpF"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raw standings types for Sportal365 Sports API
|
|
3
|
+
* Based on the standings API response structure
|
|
4
|
+
*/
|
|
5
|
+
import type { RawAsset, RawAssets, RawCompetition } from "../../shared/types";
|
|
6
|
+
export interface RawStandingsStage {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
entity_type: "stage";
|
|
10
|
+
short_name: string | null;
|
|
11
|
+
slug: string;
|
|
12
|
+
assets: RawAssets | null;
|
|
13
|
+
start_date: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface RawStandingsGroup {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
type: "OVERALL" | "HOME" | "AWAY";
|
|
19
|
+
entity_type: "group";
|
|
20
|
+
short_name: string | null;
|
|
21
|
+
assets: RawAssets | null;
|
|
22
|
+
}
|
|
23
|
+
export interface RawStandingsTeam {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
type: "CLUB" | "NATIONAL";
|
|
27
|
+
gender: "MALE" | "FEMALE";
|
|
28
|
+
three_letter_code: string;
|
|
29
|
+
entity_type: "team";
|
|
30
|
+
assets: RawAssets | null;
|
|
31
|
+
short_name: string | null;
|
|
32
|
+
slug: string;
|
|
33
|
+
}
|
|
34
|
+
export type RawStandingRuleType = "CHAMPIONS_LEAGUE" | "EUROPA_LEAGUE" | "CONFERENCE_LEAGUE" | "RELEGATION" | "PLAYOFF" | "PROMOTION";
|
|
35
|
+
export interface RawStandingRule {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
type: "TOP" | "BOTTOM" | "MIDDLE";
|
|
39
|
+
standing_api_rule_type: RawStandingRuleType;
|
|
40
|
+
entity_type: "standing_position";
|
|
41
|
+
assets: RawAssets | null;
|
|
42
|
+
}
|
|
43
|
+
export type RawStandingColumnCode = "RANK" | "PLAYED" | "WINS" | "DRAWS" | "LOSSES" | "GOALS_FOR" | "GOALS_AGAINST" | "GOAL_DIFFERENCE" | "POINTS";
|
|
44
|
+
export interface RawStandingColumnType {
|
|
45
|
+
id: string;
|
|
46
|
+
name: string;
|
|
47
|
+
code: RawStandingColumnCode;
|
|
48
|
+
entity_type: "column_type";
|
|
49
|
+
short_name: string;
|
|
50
|
+
assets: RawAssets | null;
|
|
51
|
+
}
|
|
52
|
+
export interface RawStandingColumn {
|
|
53
|
+
type: RawStandingColumnType;
|
|
54
|
+
value: string;
|
|
55
|
+
}
|
|
56
|
+
export interface RawStandingFormStatus {
|
|
57
|
+
type: "FINISHED" | "LIVE" | "NOT_STARTED";
|
|
58
|
+
name: string;
|
|
59
|
+
short_name: string;
|
|
60
|
+
}
|
|
61
|
+
export interface RawStandingFormResult {
|
|
62
|
+
type: "display";
|
|
63
|
+
results: Array<{
|
|
64
|
+
value: string;
|
|
65
|
+
position: "1" | "2";
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
export interface RawStandingFormParticipant {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
slug: string;
|
|
72
|
+
position: "1" | "2";
|
|
73
|
+
three_letter_code: string;
|
|
74
|
+
short_name: string | null;
|
|
75
|
+
entity_type: "team";
|
|
76
|
+
display_asset: RawAsset;
|
|
77
|
+
legacy_id: string;
|
|
78
|
+
assets: RawAssets | null;
|
|
79
|
+
}
|
|
80
|
+
export type RawStandingFormOutcome = "win" | "loss" | "draw";
|
|
81
|
+
export interface RawStandingFormMatch {
|
|
82
|
+
id: string;
|
|
83
|
+
status: RawStandingFormStatus;
|
|
84
|
+
result: RawStandingFormResult[];
|
|
85
|
+
outcome: RawStandingFormOutcome;
|
|
86
|
+
participants: RawStandingFormParticipant[];
|
|
87
|
+
slug: string;
|
|
88
|
+
start_time: string;
|
|
89
|
+
legacy_id: string;
|
|
90
|
+
competition: RawCompetition;
|
|
91
|
+
}
|
|
92
|
+
export interface RawStandingEntry {
|
|
93
|
+
team: RawStandingsTeam;
|
|
94
|
+
rules: RawStandingRule[];
|
|
95
|
+
columns: RawStandingColumn[];
|
|
96
|
+
form: RawStandingFormMatch[];
|
|
97
|
+
}
|
|
98
|
+
export type RawStandingsType = "FINISHED" | "LIVE" | "ALL";
|
|
99
|
+
export type RawStandingsFilter = "NONE" | "HOME" | "AWAY";
|
|
100
|
+
export type RawStandingsRankingType = "POINTS" | "GOALS" | "WINS";
|
|
101
|
+
export interface RawStandingsTable {
|
|
102
|
+
group: RawStandingsGroup;
|
|
103
|
+
type: RawStandingsType;
|
|
104
|
+
filter: RawStandingsFilter;
|
|
105
|
+
ranking_type: RawStandingsRankingType;
|
|
106
|
+
standing: RawStandingEntry[];
|
|
107
|
+
}
|
|
108
|
+
export interface RawStageStandings {
|
|
109
|
+
stage: RawStandingsStage;
|
|
110
|
+
standings: RawStandingsTable[];
|
|
111
|
+
}
|
|
112
|
+
export interface RawStandingsResponse {
|
|
113
|
+
data: RawStageStandings[];
|
|
114
|
+
}
|
|
115
|
+
/** Coverage type filter for standings */
|
|
116
|
+
export type StandingsCoverageType = "ALL" | "HOME" | "AWAY";
|
|
117
|
+
/** Optional data to include in the standings response */
|
|
118
|
+
export type StandingsOptionalData = "form";
|
|
119
|
+
/** Options for fetching football standings */
|
|
120
|
+
export interface GetFootballStandingsOptions {
|
|
121
|
+
/** Stage ID (required) */
|
|
122
|
+
stageId: string;
|
|
123
|
+
/** Coverage type - ALL, HOME, or AWAY */
|
|
124
|
+
coverageType?: StandingsCoverageType;
|
|
125
|
+
/** Optional data to include (e.g., "form" for recent results) */
|
|
126
|
+
optionalData?: StandingsOptionalData[];
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=standing.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standing.types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/standings/standing.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAM9E,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAMD,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;CAC5B;AAMD,MAAM,WAAW,gBAAgB;IAC7B,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U,GAAG,MAAM,GAAG,KAAK,CAAC;AAC3D,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAC1D,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAElE,MAAM,WAAW,iBAAiB;IAC9B,KAAK,EAAE,iBAAiB,CAAC;IACzB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,YAAY,EAAE,uBAAuB,CAAC;IACtC,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAChC;AAMD,MAAM,WAAW,iBAAiB;IAC9B,KAAK,EAAE,iBAAiB,CAAC;IACzB,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAClC;AAMD,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,iBAAiB,EAAE,CAAC;CAC7B;AAMD,yCAAyC;AACzC,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5D,yDAAyD;AACzD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,8CAA8C;AAC9C,MAAM,WAAW,2BAA2B;IACxC,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,iEAAiE;IACjE,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAC1C"}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* API layer for communicating with Sportal365 Sports API.
|
|
5
5
|
* All public functions return canonical FUSports types.
|
|
6
6
|
*/
|
|
7
|
-
export { getFootballMatch, getFootballMatchEvents, getFootballMatchLineups, getFootballMatchOdds, getFootballMatchStatistics, getFootballMatchCommentary, getFootballMatches, getFootballTeam, } from "./football";
|
|
8
|
-
export type { GetFootballMatchOptions, GetFootballMatchEventsOptions, GetFootballMatchLineupsOptions, GetFootballMatchOddsOptions, GetFootballMatchStatisticsOptions, GetFootballMatchCommentaryOptions, GetFootballMatchesOptions, GetFootballTeamOptions, OddType, ScopeType, OddFormat, MarketType, OptionalMatchData, MatchStatusType, SortDirection, } from "./football";
|
|
7
|
+
export { getFootballMatch, getFootballMatchEvents, getFootballMatchLineups, getFootballMatchOdds, getFootballMatchStatistics, getFootballMatchCommentary, getFootballMatches, getFootballTeam, getFootballStandings, } from "./football";
|
|
8
|
+
export type { GetFootballMatchOptions, GetFootballMatchEventsOptions, GetFootballMatchLineupsOptions, GetFootballMatchOddsOptions, GetFootballMatchStatisticsOptions, GetFootballMatchCommentaryOptions, GetFootballMatchesOptions, GetFootballTeamOptions, GetFootballStandingsOptions, StandingsCoverageType, StandingsOptionalData, OddType, ScopeType, OddFormat, MarketType, OptionalMatchData, MatchStatusType, SortDirection, } from "./football";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/api/sportal365-sports/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACH,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,EAC1B,kBAAkB,EAClB,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/api/sportal365-sports/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACH,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,EAC1B,kBAAkB,EAClB,eAAe,EACf,oBAAoB,GACvB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACR,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,iCAAiC,EACjC,iCAAiC,EACjC,yBAAyB,EACzB,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,aAAa,GAChB,MAAM,YAAY,CAAC"}
|