fansunited-data-layer 0.0.7 → 0.0.9
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 +44 -0
- package/dist/api/sportal365-sports/football/competitions/competition.types.d.ts +148 -0
- package/dist/api/sportal365-sports/football/competitions/competition.types.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/competitions/index.d.ts +51 -0
- package/dist/api/sportal365-sports/football/competitions/index.d.ts.map +1 -0
- package/dist/api/sportal365-sports/football/competitions/utils.d.ts +14 -0
- package/dist/api/sportal365-sports/football/competitions/utils.d.ts.map +1 -0
- 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/matches/index.d.ts.map +1 -1
- package/dist/api/sportal365-sports/football/matches/types/commentary.types.d.ts +3 -0
- package/dist/api/sportal365-sports/football/matches/types/commentary.types.d.ts.map +1 -1
- package/dist/api/sportal365-sports/football/matches/types/option.types.d.ts +13 -0
- package/dist/api/sportal365-sports/football/matches/types/option.types.d.ts.map +1 -1
- package/dist/api/sportal365-sports/football/standings/http.d.ts.map +1 -1
- package/dist/api/sportal365-sports/football/standings/index.d.ts.map +1 -1
- package/dist/api/sportal365-sports/football/standings/standing.types.d.ts +3 -0
- package/dist/api/sportal365-sports/football/standings/standing.types.d.ts.map +1 -1
- package/dist/api/sportal365-sports/football/teams/index.d.ts.map +1 -1
- package/dist/api/sportal365-sports/football/teams/team.types.d.ts +3 -0
- package/dist/api/sportal365-sports/football/teams/team.types.d.ts.map +1 -1
- package/dist/api/sportal365-sports/http.d.ts +12 -0
- package/dist/api/sportal365-sports/http.d.ts.map +1 -1
- package/dist/api/sportal365-sports/index.d.ts +3 -2
- package/dist/api/sportal365-sports/index.d.ts.map +1 -1
- package/dist/client.cjs +6 -0
- package/dist/client.d.ts +20 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +451 -0
- package/dist/fansunited-data-layer.cjs +1 -0
- package/dist/fansunited-data-layer.js +52 -1093
- package/dist/helpers/competition.helpers.d.ts +22 -0
- package/dist/helpers/competition.helpers.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +6 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/team.helpers.d.ts +45 -0
- package/dist/helpers/team.helpers.d.ts.map +1 -0
- package/dist/index-4gbkCyy3.cjs +1 -0
- package/dist/index-C8byrMrI.js +806 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/providers/competition.provider.d.ts +1 -1
- package/dist/providers/competition.provider.d.ts.map +1 -1
- package/dist/providers/competition.types.d.ts +21 -3
- package/dist/providers/competition.types.d.ts.map +1 -1
- package/dist/types/canonical/base.types.d.ts +51 -0
- package/dist/types/canonical/base.types.d.ts.map +1 -1
- package/dist/types/canonical/index.d.ts +1 -1
- package/dist/types/canonical/index.d.ts.map +1 -1
- package/package.json +8 -3
- package/dist/fansunited-data-layer.umd.cjs +0 -6
package/README.md
CHANGED
|
@@ -131,6 +131,50 @@ console.log(team.name);
|
|
|
131
131
|
console.log(team.assets?.logo);
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
+
## React Providers (Client Components)
|
|
135
|
+
|
|
136
|
+
For React Server Components (RSC) compatibility, client-side exports are available from a separate entry point:
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
"use client";
|
|
140
|
+
|
|
141
|
+
import { CompetitionProvider, useCompetition } from "fansunited-data-layer/client";
|
|
142
|
+
|
|
143
|
+
function MatchList() {
|
|
144
|
+
const { matches, getUpcomingMatches } = useCompetition();
|
|
145
|
+
const upcoming = getUpcomingMatches();
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
<ul>
|
|
149
|
+
{upcoming.map((match) => (
|
|
150
|
+
<li key={match.id}>{match.competitorOne.name} vs {match.competitorTwo.name}</li>
|
|
151
|
+
))}
|
|
152
|
+
</ul>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Wrap your app with the provider
|
|
157
|
+
function App() {
|
|
158
|
+
return (
|
|
159
|
+
<CompetitionProvider
|
|
160
|
+
competitionId="123"
|
|
161
|
+
matches={matches}
|
|
162
|
+
standings={standings}
|
|
163
|
+
>
|
|
164
|
+
<MatchList />
|
|
165
|
+
</CompetitionProvider>
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Available client exports:**
|
|
171
|
+
|
|
172
|
+
- `CompetitionProvider` - React context provider for competition data
|
|
173
|
+
- `useCompetition` - Hook to access competition context
|
|
174
|
+
- `CompetitionContext` - Raw context (for advanced use cases)
|
|
175
|
+
|
|
176
|
+
**Note:** Server-safe functions (`setConfig`, `getFootballMatch`, etc.) should be imported from the main entry point `'fansunited-data-layer'`, not from `'/client'`.
|
|
177
|
+
|
|
134
178
|
## Canonical Types
|
|
135
179
|
|
|
136
180
|
All responses are transformed to provider-agnostic canonical types prefixed with `FUSports`:
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Competition types for Sportal365 Sports API
|
|
3
|
+
* Types for tournament/competition entity responses
|
|
4
|
+
*/
|
|
5
|
+
import type { NextCacheOptions } from "../../http";
|
|
6
|
+
/**
|
|
7
|
+
* Country in tournament response (v1 format)
|
|
8
|
+
*/
|
|
9
|
+
export interface RawTournamentCountry {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
slug: string;
|
|
13
|
+
uuid: string;
|
|
14
|
+
url_flag?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Season in tournament response
|
|
18
|
+
*/
|
|
19
|
+
export interface RawTournamentSeason {
|
|
20
|
+
id: number;
|
|
21
|
+
name: string;
|
|
22
|
+
slug: string;
|
|
23
|
+
active: boolean;
|
|
24
|
+
uuid: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Raw tournament response from /tournaments/{id}
|
|
28
|
+
*/
|
|
29
|
+
export interface RawTournamentResponse {
|
|
30
|
+
id: number;
|
|
31
|
+
name: string;
|
|
32
|
+
slug: string;
|
|
33
|
+
country: RawTournamentCountry;
|
|
34
|
+
regional_league: boolean;
|
|
35
|
+
gender: "MALE" | "FEMALE";
|
|
36
|
+
type: "LEAGUE" | "CUP";
|
|
37
|
+
region: "DOMESTIC" | "INTERNATIONAL";
|
|
38
|
+
uuid: string;
|
|
39
|
+
seasons: RawTournamentSeason[];
|
|
40
|
+
url_logo?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Country in v2 season details response
|
|
44
|
+
*/
|
|
45
|
+
export interface RawSeasonDetailsCountry {
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
slug: string;
|
|
49
|
+
code: string | null;
|
|
50
|
+
assets?: {
|
|
51
|
+
flag?: {
|
|
52
|
+
url: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
uuid: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Tournament in v2 season details response
|
|
59
|
+
*/
|
|
60
|
+
export interface RawSeasonDetailsTournament {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
slug: string;
|
|
64
|
+
country: RawSeasonDetailsCountry;
|
|
65
|
+
gender: "MALE" | "FEMALE";
|
|
66
|
+
type: "LEAGUE" | "CUP";
|
|
67
|
+
region: "DOMESTIC" | "INTERNATIONAL";
|
|
68
|
+
assets?: {
|
|
69
|
+
logo?: {
|
|
70
|
+
url: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
uuid: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Season in v2 season details response
|
|
77
|
+
*/
|
|
78
|
+
export interface RawSeasonDetailsSeason {
|
|
79
|
+
id: string;
|
|
80
|
+
name: string;
|
|
81
|
+
slug: string;
|
|
82
|
+
tournament: RawSeasonDetailsTournament;
|
|
83
|
+
status: "ACTIVE" | "INACTIVE";
|
|
84
|
+
uuid: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Round in v2 season details response
|
|
88
|
+
*/
|
|
89
|
+
export interface RawSeasonDetailsRound {
|
|
90
|
+
id: string;
|
|
91
|
+
key: string;
|
|
92
|
+
name: string;
|
|
93
|
+
type: "LEAGUE" | "CUP" | "QUALIFICATION" | "PLAYOFF";
|
|
94
|
+
status: "ACTIVE" | "INACTIVE";
|
|
95
|
+
start_date: string;
|
|
96
|
+
end_date: string;
|
|
97
|
+
uuid: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Stage in v2 season details response
|
|
101
|
+
*/
|
|
102
|
+
export interface RawSeasonDetailsStage {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
slug: string;
|
|
106
|
+
type: "LEAGUE" | "CUP" | "GROUP" | "KNOCKOUT" | "PLAYOFF" | "QUALIFICATION";
|
|
107
|
+
status: "ACTIVE" | "INACTIVE";
|
|
108
|
+
coverage: "LIVE" | "HIGHLIGHTS" | "NONE";
|
|
109
|
+
order_in_season: number;
|
|
110
|
+
start_date: string;
|
|
111
|
+
end_date: string;
|
|
112
|
+
short_name: string | null;
|
|
113
|
+
uuid: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Stage with rounds in v2 season details response
|
|
117
|
+
*/
|
|
118
|
+
export interface RawSeasonDetailsStageWithRounds {
|
|
119
|
+
stage: RawSeasonDetailsStage;
|
|
120
|
+
rounds: RawSeasonDetailsRound[];
|
|
121
|
+
uuid: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Full response from /v2/seasons/details endpoint
|
|
125
|
+
*/
|
|
126
|
+
export interface RawSeasonDetailsResponse {
|
|
127
|
+
season: RawSeasonDetailsSeason;
|
|
128
|
+
stages: RawSeasonDetailsStageWithRounds[];
|
|
129
|
+
}
|
|
130
|
+
export interface GetFootballCompetitionOptions {
|
|
131
|
+
/** Language code for translations (e.g., 'en', 'bg'). Defaults to 'en' */
|
|
132
|
+
languageCode?: string;
|
|
133
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
134
|
+
next?: NextCacheOptions;
|
|
135
|
+
}
|
|
136
|
+
export interface GetFootballSeasonDetailsOptions {
|
|
137
|
+
/** Season ID to fetch details for */
|
|
138
|
+
seasonId?: string;
|
|
139
|
+
/** Tournament/competition ID (used with status to get current season) */
|
|
140
|
+
competitionId?: string;
|
|
141
|
+
/** Season status filter (e.g., 'CURRENT'). Used with competitionId */
|
|
142
|
+
status?: "CURRENT";
|
|
143
|
+
/** Language code for translations (e.g., 'en', 'bg'). Defaults to 'en' */
|
|
144
|
+
languageCode?: string;
|
|
145
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
146
|
+
next?: NextCacheOptions;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=competition.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"competition.types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/competitions/competition.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMnD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAA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C,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,+BAA+B;IAC5C,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sEAAsE;IACtE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sportal365 Sports API - Football Competitions
|
|
3
|
+
*
|
|
4
|
+
* Fetches competition/tournament data and transforms to canonical FUSports types.
|
|
5
|
+
*/
|
|
6
|
+
import type { FUSportsCompetition, FUSportsSeasonDetails } from "../../../../types/canonical";
|
|
7
|
+
import type { GetFootballCompetitionOptions, GetFootballSeasonDetailsOptions } from "./competition.types";
|
|
8
|
+
export type { GetFootballCompetitionOptions, GetFootballSeasonDetailsOptions } from "./competition.types";
|
|
9
|
+
/**
|
|
10
|
+
* Get a football competition/tournament by ID
|
|
11
|
+
*
|
|
12
|
+
* Fetches full competition details including all available seasons.
|
|
13
|
+
*
|
|
14
|
+
* @param competitionId - The competition ID, UUID, or slug
|
|
15
|
+
* @param options - Optional parameters
|
|
16
|
+
* @returns Canonical FUSportsCompetition with all seasons
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const competition = await getFootballCompetition('3');
|
|
21
|
+
* console.log(competition.name); // "Premier League"
|
|
22
|
+
* console.log(competition.seasons?.length); // 27
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function getFootballCompetition(competitionId: string, options?: GetFootballCompetitionOptions): Promise<FUSportsCompetition>;
|
|
26
|
+
/**
|
|
27
|
+
* Get detailed season information with stages and rounds
|
|
28
|
+
*
|
|
29
|
+
* Can be called with either:
|
|
30
|
+
* - `seasonId` to get a specific season's details
|
|
31
|
+
* - `competitionId` + `status: 'CURRENT'` to get the current season for a competition
|
|
32
|
+
*
|
|
33
|
+
* @param options - Options including seasonId or competitionId+status
|
|
34
|
+
* @returns Canonical FUSportsSeasonDetails with competition, stages, and rounds
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* // Get by season ID
|
|
39
|
+
* const season = await getFootballSeasonDetails({ seasonId: '7575016' });
|
|
40
|
+
* console.log(season.name); // "2025/2026"
|
|
41
|
+
* console.log(season.stages?.length); // 1
|
|
42
|
+
*
|
|
43
|
+
* // Get current season for a competition
|
|
44
|
+
* const currentSeason = await getFootballSeasonDetails({
|
|
45
|
+
* competitionId: '3',
|
|
46
|
+
* status: 'CURRENT'
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare function getFootballSeasonDetails(options?: GetFootballSeasonDetailsOptions): Promise<FUSportsSeasonDetails>;
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/competitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAG9F,OAAO,KAAK,EAGR,6BAA6B,EAC7B,+BAA+B,EAClC,MAAM,qBAAqB,CAAC;AAI7B,YAAY,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAE1G;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,sBAAsB,CACxC,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,6BAAkC,GAC5C,OAAO,CAAC,mBAAmB,CAAC,CAY9B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,wBAAwB,CAC1C,OAAO,GAAE,+BAAoC,GAC9C,OAAO,CAAC,qBAAqB,CAAC,CA2BhC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Competition transformers for Sportal365 Sports API
|
|
3
|
+
*/
|
|
4
|
+
import type { FUSportsCompetition, FUSportsSeasonDetails } from "../../../../types/canonical";
|
|
5
|
+
import type { RawTournamentResponse, RawSeasonDetailsResponse } from "./competition.types";
|
|
6
|
+
/**
|
|
7
|
+
* Transform raw tournament response to canonical FUSportsCompetition
|
|
8
|
+
*/
|
|
9
|
+
export declare function transformCompetition(raw: RawTournamentResponse): FUSportsCompetition;
|
|
10
|
+
/**
|
|
11
|
+
* Transform raw season details response to canonical FUSportsSeasonDetails
|
|
12
|
+
*/
|
|
13
|
+
export declare function transformSeasonDetails(raw: RawSeasonDetailsResponse): FUSportsSeasonDetails;
|
|
14
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/competitions/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACR,mBAAmB,EACnB,qBAAqB,EAGxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACR,qBAAqB,EACrB,wBAAwB,EAE3B,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,qBAAqB,GAAG,mBAAmB,CAyBpF;AA+BD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,wBAAwB,GAAG,qBAAqB,CAiC3F"}
|
|
@@ -8,6 +8,8 @@ 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 { getFootballCompetition, getFootballSeasonDetails } from "./competitions";
|
|
12
|
+
export type { GetFootballCompetitionOptions, GetFootballSeasonDetailsOptions } from "./competitions";
|
|
11
13
|
export { getFootballStandings } from "./standings";
|
|
12
14
|
export type { GetFootballStandingsOptions, StandingsCoverageType, StandingsOptionalData } from "./standings";
|
|
13
15
|
//# 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;AAGtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,aAAa,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,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAClF,YAAY,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAC;AAGrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +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,EACjC,yBAAyB,EAC5B,MAAM,SAAS,CAAC;AAWjB,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,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,uBAA4B,GAAG,OAAO,CAAC,aAAa,CAAC,
|
|
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,EACjC,yBAAyB,EAC5B,MAAM,SAAS,CAAC;AAWjB,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,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,uBAA4B,GAAG,OAAO,CAAC,aAAa,CAAC,CAmBrH;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CACxC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC,GAC5C,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAY/B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,uBAAuB,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,8BAAmC,GAC7C,OAAO,CAAC,oBAAoB,CAAC,CAY/B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,oBAAoB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,2BAAgC,GAC1C,OAAO,CAAC,iBAAiB,CAAC,CAkB5B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,iCAAsC,GAChD,OAAO,CAAC,uBAAuB,CAAC,CAYlC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,iCAAsC,GAChD,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAYnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAiDrG"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Commentary types for Sportal365 Sports API
|
|
3
3
|
*/
|
|
4
|
+
import type { NextCacheOptions } from "../../../http";
|
|
4
5
|
export interface RawCommentaryDetail {
|
|
5
6
|
[key: string]: unknown;
|
|
6
7
|
}
|
|
@@ -20,5 +21,7 @@ export interface RawCommentary {
|
|
|
20
21
|
export interface GetFootballMatchCommentaryOptions {
|
|
21
22
|
/** Language code for translations. Required by the API. Defaults to 'en' */
|
|
22
23
|
languageCode?: string;
|
|
24
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
25
|
+
next?: NextCacheOptions;
|
|
23
26
|
}
|
|
24
27
|
//# sourceMappingURL=commentary.types.d.ts.map
|
|
@@ -1 +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;
|
|
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,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,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;IACtB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Match options types for Sportal365 Sports API
|
|
3
3
|
*/
|
|
4
|
+
import type { NextCacheOptions } from "../../../http";
|
|
4
5
|
export type OddType = "LIVE" | "PRE_EVENT" | "ALL";
|
|
5
6
|
export type ScopeType = "ORDINARY_TIME" | "FULL_TIME";
|
|
6
7
|
export type OddFormat = "FRACTIONAL" | "DECIMAL" | "MONEYLINE";
|
|
@@ -23,14 +24,20 @@ export interface GetFootballMatchOptions {
|
|
|
23
24
|
optionalData?: OptionalMatchData[];
|
|
24
25
|
/** Filter odds by bookmaker IDs */
|
|
25
26
|
bookmakerIds?: string[];
|
|
27
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
28
|
+
next?: NextCacheOptions;
|
|
26
29
|
}
|
|
27
30
|
export interface GetFootballMatchEventsOptions {
|
|
28
31
|
/** Language code for translations. Defaults to 'en' */
|
|
29
32
|
languageCode?: string;
|
|
33
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
34
|
+
next?: NextCacheOptions;
|
|
30
35
|
}
|
|
31
36
|
export interface GetFootballMatchLineupsOptions {
|
|
32
37
|
/** Language code for translations. Defaults to 'en' */
|
|
33
38
|
languageCode?: string;
|
|
39
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
40
|
+
next?: NextCacheOptions;
|
|
34
41
|
}
|
|
35
42
|
export interface GetFootballMatchOddsOptions {
|
|
36
43
|
/** Language code for translations. Defaults to 'en' */
|
|
@@ -47,10 +54,14 @@ export interface GetFootballMatchOddsOptions {
|
|
|
47
54
|
marketTypes?: MarketType[];
|
|
48
55
|
/** Filter odds by bookmaker IDs */
|
|
49
56
|
bookmakerIds?: string[];
|
|
57
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
58
|
+
next?: NextCacheOptions;
|
|
50
59
|
}
|
|
51
60
|
export interface GetFootballMatchStatisticsOptions {
|
|
52
61
|
/** Language code for translations. Defaults to 'en' */
|
|
53
62
|
languageCode?: string;
|
|
63
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
64
|
+
next?: NextCacheOptions;
|
|
54
65
|
}
|
|
55
66
|
/** Status types for filtering matches */
|
|
56
67
|
export type MatchStatusType = "FINISHED" | "NOT_STARTED" | "LIVE" | "INTERRUPTED" | "CANCELLED" | "UNKNOWN" | "POSTPONED";
|
|
@@ -112,5 +123,7 @@ export interface GetFootballMatchesOptions {
|
|
|
112
123
|
sortDirection?: SortDirection;
|
|
113
124
|
/** Optional data to include ('MAIN_EVENTS') */
|
|
114
125
|
optionalData?: "MAIN_EVENTS"[];
|
|
126
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
127
|
+
next?: NextCacheOptions;
|
|
115
128
|
}
|
|
116
129
|
//# sourceMappingURL=option.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/types/option.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,KAAK,CAAC;AACnD,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,WAAW,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,WAAW,CAAC;AAC/D,MAAM,MAAM,UAAU,GAChB,KAAK,GACL,IAAI,GACJ,YAAY,GACZ,eAAe,GACf,eAAe,GACf,aAAa,GACb,qBAAqB,GACrB,eAAe,GACf,kBAAkB,GAClB,uBAAuB,GACvB,6BAA6B,GAC7B,wBAAwB,GACxB,6BAA6B,CAAC;AACpC,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,eAAe,CAAC;AAEhE,MAAM,WAAW,uBAAuB;IACpC,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,qBAAqB;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,2CAA2C;IAC3C,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,6BAA6B;IAC1C,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"option.types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/api/sportal365-sports/football/matches/types/option.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,KAAK,CAAC;AACnD,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,WAAW,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,WAAW,CAAC;AAC/D,MAAM,MAAM,UAAU,GAChB,KAAK,GACL,IAAI,GACJ,YAAY,GACZ,eAAe,GACf,eAAe,GACf,aAAa,GACb,qBAAqB,GACrB,eAAe,GACf,kBAAkB,GAClB,uBAA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IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,wDAAwD;IACxD,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAGvB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,qBAAqB;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAGxB,qCAAqC;IACrC,aAAa,CAAC,EAAE,aAAa,CAAC;IAG9B,+CAA+C;IAC/C,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAE/B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B"}
|
|
@@ -1 +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,
|
|
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,oBA4C3B,CAAC"}
|
|
@@ -1 +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,
|
|
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,CAyB3G"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Based on the standings API response structure
|
|
4
4
|
*/
|
|
5
5
|
import type { RawAsset, RawAssets, RawCompetition } from "../../shared/types";
|
|
6
|
+
import type { NextCacheOptions } from "../../http";
|
|
6
7
|
export interface RawStandingsStage {
|
|
7
8
|
id: string;
|
|
8
9
|
name: string;
|
|
@@ -124,5 +125,7 @@ export interface GetFootballStandingsOptions {
|
|
|
124
125
|
coverageType?: StandingsCoverageType;
|
|
125
126
|
/** Optional data to include (e.g., "form" for recent results) */
|
|
126
127
|
optionalData?: StandingsOptionalData[];
|
|
128
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
129
|
+
next?: NextCacheOptions;
|
|
127
130
|
}
|
|
128
131
|
//# sourceMappingURL=standing.types.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMnD,MAAM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AM,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;IACvC,2DAA2D;IAC3D,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/teams/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,OAAO,KAAK,EAAkB,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAI3E,YAAY,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,eAAe,CACjC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,sBAA2B,GACrC,OAAO,CAAC,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/teams/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,OAAO,KAAK,EAAkB,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAI3E,YAAY,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,eAAe,CACjC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,sBAA2B,GACrC,OAAO,CAAC,kBAAkB,CAAC,CAa7B"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Types specific to team entities and team profile responses
|
|
4
4
|
*/
|
|
5
5
|
import type { RawAssets, RawCountry, RawVenue, RawSeason, RawFormMatch } from "../../shared/types";
|
|
6
|
+
import type { NextCacheOptions } from "../../http";
|
|
6
7
|
export interface RawTeamSocial {
|
|
7
8
|
web?: string;
|
|
8
9
|
twitter_id?: string;
|
|
@@ -27,6 +28,8 @@ export interface RawShirtColor {
|
|
|
27
28
|
export interface GetFootballTeamOptions {
|
|
28
29
|
/** Language code for translations (e.g., 'en', 'bg'). Defaults to 'en' */
|
|
29
30
|
languageCode?: string;
|
|
31
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
32
|
+
next?: NextCacheOptions;
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
32
35
|
* Full team profile response from /v2/teams/{id}?optional_data=form
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team.types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/teams/team.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"team.types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/sportal365-sports/football/teams/team.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMnD,MAAM,WAAW,aAAa;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,QAAQ;IACrB,EAAE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 +2,23 @@
|
|
|
2
2
|
* Sportal365 Sports API - HTTP client factory
|
|
3
3
|
* Creates sport-specific HTTP clients for Sportal365 APIs
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* Next.js cache options for fetch requests
|
|
7
|
+
* @see https://nextjs.org/docs/app/api-reference/functions/fetch#optionsnext
|
|
8
|
+
*/
|
|
9
|
+
export interface NextCacheOptions {
|
|
10
|
+
/** Time in seconds to cache the response. Set to 0 to disable caching. */
|
|
11
|
+
revalidate?: number | false;
|
|
12
|
+
/** Cache tags for on-demand revalidation with revalidateTag() */
|
|
13
|
+
tags?: string[];
|
|
14
|
+
}
|
|
5
15
|
export interface RequestOptions {
|
|
6
16
|
/** API path (e.g., '/v2/matches/123') */
|
|
7
17
|
path: string;
|
|
8
18
|
/** Query parameters */
|
|
9
19
|
params?: Record<string, string | string[] | undefined>;
|
|
20
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
21
|
+
next?: NextCacheOptions;
|
|
10
22
|
}
|
|
11
23
|
export interface Sportal365HttpClient {
|
|
12
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/lib/api/sportal365-sports/http.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,cAAc;IAC3B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/lib/api/sportal365-sports/http.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC3B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IACvD,2DAA2D;IAC3D,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACjC;;;;;;;;;;;OAWG;IACH,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC/C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,CA4DrE"}
|
|
@@ -4,6 +4,7 @@
|
|
|
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, 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";
|
|
7
|
+
export { getFootballMatch, getFootballMatchEvents, getFootballMatchLineups, getFootballMatchOdds, getFootballMatchStatistics, getFootballMatchCommentary, getFootballMatches, getFootballTeam, getFootballCompetition, getFootballSeasonDetails, getFootballStandings, } from "./football";
|
|
8
|
+
export type { GetFootballMatchOptions, GetFootballMatchEventsOptions, GetFootballMatchLineupsOptions, GetFootballMatchOddsOptions, GetFootballMatchStatisticsOptions, GetFootballMatchCommentaryOptions, GetFootballMatchesOptions, GetFootballTeamOptions, GetFootballCompetitionOptions, GetFootballSeasonDetailsOptions, GetFootballStandingsOptions, StandingsCoverageType, StandingsOptionalData, OddType, ScopeType, OddFormat, MarketType, OptionalMatchData, MatchStatusType, SortDirection, } from "./football";
|
|
9
|
+
export type { NextCacheOptions } from "./http";
|
|
9
10
|
//# 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,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"}
|
|
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,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,GACvB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACR,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,iCAAiC,EACjC,iCAAiC,EACjC,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAC7B,+BAA+B,EAC/B,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,aAAa,GAChB,MAAM,YAAY,CAAC;AAGpB,YAAY,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC"}
|
package/dist/client.cjs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),N=require("./index-4gbkCyy3.cjs");var G={exports:{}},D={};var Q;function re(){if(Q)return D;Q=1;var l=Symbol.for("react.transitional.element"),b=Symbol.for("react.fragment");function E(T,u,f){var k=null;if(f!==void 0&&(k=""+f),u.key!==void 0&&(k=""+u.key),"key"in u){f={};for(var d in u)d!=="key"&&(f[d]=u[d])}else f=u;return u=f.ref,{$$typeof:l,type:T,key:k,ref:u!==void 0?u:null,props:f}}return D.Fragment=b,D.jsx=E,D.jsxs=E,D}var M={};var K;function ne(){return K||(K=1,process.env.NODE_ENV!=="production"&&(function(){function l(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case v:return"Profiler";case U:return"StrictMode";case V:return"Suspense";case X:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case L:return"Portal";case q:return e.displayName||"Context";case W:return(e._context.displayName||"Context")+".Consumer";case I:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case h:return n=e.displayName||null,n!==null?n:l(e.type)||"Memo";case C:n=e._payload,e=e._init;try{return l(e(n))}catch{}}return null}function b(e){return""+e}function E(e){try{b(e);var n=!1}catch{n=!0}if(n){n=console;var s=n.error,t=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),b(e)}}function T(e){if(e===c)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===C)return"<...>";try{var n=l(e);return n?"<"+n+">":"<...>"}catch{return"<...>"}}function u(){var e=S.A;return e===null?null:e.getOwner()}function f(){return Error("react-stack-top-frame")}function k(e){if(O.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return!1}return e.key!==void 0}function d(e,n){function s(){R||(R=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n))}s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}function F(){var e=l(this.type);return y[e]||(y[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function Y(e,n,s,t,r,i){var o=s.ref;return e={$$typeof:m,type:e,key:n,props:s,_owner:t},(o!==void 0?o:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:F}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:r}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function w(e,n,s,t,r,i){var o=n.children;if(o!==void 0)if(t)if(B(o)){for(t=0;t<o.length;t++)$(o[t]);Object.freeze&&Object.freeze(o)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else $(o);if(O.call(n,"key")){o=l(e);var g=Object.keys(n).filter(function(te){return te!=="key"});t=0<g.length?"{key: someKey, "+g.join(": ..., ")+": ...}":"{key: someKey}",j[o+t]||(g=0<g.length?"{"+g.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,t,o,g,o),j[o+t]=!0)}if(o=null,s!==void 0&&(E(s),o=""+s),k(n)&&(E(n.key),o=""+n.key),"key"in n){s={};for(var H in n)H!=="key"&&(s[H]=n[H])}else s=n;return o&&d(s,typeof e=="function"?e.displayName||e.name||"Unknown":e),Y(e,o,s,u(),r,i)}function $(e){_(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===C&&(e._payload.status==="fulfilled"?_(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function _(e){return typeof e=="object"&&e!==null&&e.$$typeof===m}var p=a,m=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),q=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),S=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,B=Array.isArray,P=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(e){return e()}};var R,y={},x=p.react_stack_bottom_frame.bind(p,f)(),A=P(T(f)),j={};M.Fragment=c,M.jsx=function(e,n,s){var t=1e4>S.recentlyCreatedOwnerStacks++;return w(e,n,s,!1,t?Error("react-stack-top-frame"):x,t?P(T(e)):A)},M.jsxs=function(e,n,s){var t=1e4>S.recentlyCreatedOwnerStacks++;return w(e,n,s,!0,t?Error("react-stack-top-frame"):x,t?P(T(e)):A)}})()),M}var ee;function oe(){return ee||(ee=1,process.env.NODE_ENV==="production"?G.exports=re():G.exports=ne()),G.exports}var ae=oe();const Z=a.createContext(null);function se(){const l=a.useContext(Z);if(!l)throw new Error("useCompetition must be used within CompetitionProvider");return l}function ie({competitionId:l,seasonId:b,stageId:E,competition:T,season:u,matches:f,standings:k,previousSeasons:d,config:F,autoRefresh:Y=!0,refreshInterval:w=3e4,children:$}){const[_,p]=a.useState(T),[m,L]=a.useState(u),[c,U]=a.useState(f??[]),[v,W]=a.useState(k??[]),[q,I]=a.useState(!1),[V,X]=a.useState(void 0);a.useEffect(()=>{p(T)},[T]),a.useEffect(()=>{L(u)},[u]),a.useEffect(()=>{U(f??[])},[f]),a.useEffect(()=>{W(k??[])},[k]),a.useEffect(()=>{if(_&&m)return;(async()=>{try{const r=b??m?.id,[i,o]=await Promise.all([_?Promise.resolve(_):N.getFootballCompetition(l),m?Promise.resolve(m):r?N.getFootballSeasonDetails({seasonId:r}):N.getFootballSeasonDetails({competitionId:l,status:"CURRENT"})]);_||p(i),m||L(o)}catch(r){console.error("[CompetitionProvider] Error fetching initial data:",r)}})()},[l,b]);const h=a.useCallback(async()=>{const t=b??m?.id;if(t){I(!0);try{const r=E??m?.stages?.find(g=>g.status==="ACTIVE")?.id,[i,o]=await Promise.all([N.getFootballMatches({tournamentIds:[l],seasonIds:[t],stageIds:r?[r]:void 0,limit:552,offset:0}),r?N.getFootballStandings({stageId:r}):Promise.resolve({entries:[],metadata:void 0,legend:void 0})]);U(i),W(o.entries),X(new Date)}catch(r){console.error("[CompetitionProvider] Error refreshing matches/standings:",r)}finally{I(!1)}}},[l,b,E,m?.id,m?.stages]);a.useEffect(()=>{if(!Y||!c.some(i=>i.status.code==="live"))return;const r=setInterval(()=>{h()},w);return()=>clearInterval(r)},[Y,w,c,h]);const C=a.useCallback(t=>c.find(r=>r.id===t),[c]),J=a.useCallback(t=>c.filter(r=>r.competitorOne.id===t||r.competitorTwo.id===t),[c]),z=a.useCallback(t=>c.filter(r=>r.timing.kickoffTime.toISOString().startsWith(t)),[c]),S=a.useCallback(t=>c.filter(r=>r.round?.id===t),[c]),O=a.useCallback(()=>c.filter(t=>t.status.code==="live"),[c]),B=a.useCallback(t=>{const r=new Date;let i=c.filter(o=>o.status.code==="not_started"&&o.timing.kickoffTime>r);return t&&(i=i.filter(o=>o.competitorOne.id===t||o.competitorTwo.id===t)),i.sort((o,g)=>o.timing.kickoffTime.getTime()-g.timing.kickoffTime.getTime())},[c]),P=a.useCallback(t=>{let r=c.filter(i=>i.status.code==="finished");return t&&(r=r.filter(i=>i.competitorOne.id===t||i.competitorTwo.id===t)),r.sort((i,o)=>o.timing.kickoffTime.getTime()-i.timing.kickoffTime.getTime())},[c]),R=a.useCallback(t=>v.find(r=>r.competitor.id===t),[v]),y=a.useCallback(t=>R(t)?.form?.formString,[R]),x=a.useCallback(t=>R(t)?.stats,[R]),A=a.useCallback(t=>[...v].sort((r,i)=>r.rank-i.rank).slice(0,t),[v]),j=a.useCallback(t=>[...v].sort((r,i)=>i.rank-r.rank).slice(0,t),[v]),e=a.useCallback(t=>d?.find(r=>r.id===t)?.matches,[d]),n=a.useCallback(t=>d?.find(r=>r.id===t)?.standings,[d]),s=a.useMemo(()=>({competitionId:l,seasonId:b,stageId:E,competition:_,season:m,isRefreshing:q,lastRefreshed:V,matches:c,standings:v,previousSeasons:d,config:F,refresh:h,getMatch:C,getMatchesByTeam:J,getMatchesByDate:z,getMatchesByRound:S,getLiveMatches:O,getUpcomingMatches:B,getFinishedMatches:P,getTeamStanding:R,getTeamForm:y,getTeamStats:x,getTopTeams:A,getBottomTeams:j,getSeasonMatches:e,getSeasonStandings:n}),[l,b,E,_,m,q,V,c,v,d,F,h,C,J,z,S,O,B,P,R,y,x,A,j,e,n]);return ae.jsx(Z.Provider,{value:s,children:$})}exports.CompetitionContext=Z;exports.CompetitionProvider=ie;exports.useCompetition=se;
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side exports for fansunited-data-layer
|
|
3
|
+
*
|
|
4
|
+
* This module exports React components, hooks, and context providers
|
|
5
|
+
* that require "use client" directive for React Server Components compatibility.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // In a client component
|
|
10
|
+
* "use client";
|
|
11
|
+
* import { CompetitionProvider, useCompetition } from 'fansunited-data-layer/client';
|
|
12
|
+
*
|
|
13
|
+
* function MyComponent() {
|
|
14
|
+
* const { matches, standings } = useCompetition();
|
|
15
|
+
* return <div>...</div>;
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export { CompetitionProvider, useCompetition, CompetitionContext, type CompetitionConfig, type Season, type CompetitionContextValue, type CompetitionProviderProps, } from "./providers";
|
|
20
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/lib/client.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EACH,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,MAAM,EACX,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAChC,MAAM,aAAa,CAAC"}
|