fansunited-data-layer 0.2.0 → 0.2.1
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/api/fansunited/constants.d.ts +5 -0
- package/api/fansunited/constants.d.ts.map +1 -0
- package/api/fansunited/football/competition/index.d.ts +30 -0
- package/api/fansunited/football/competition/index.d.ts.map +1 -0
- package/api/fansunited/football/competition/transformer.d.ts +11 -0
- package/api/fansunited/football/competition/transformer.d.ts.map +1 -0
- package/api/fansunited/football/competition/types.d.ts +70 -0
- package/api/fansunited/football/competition/types.d.ts.map +1 -0
- package/api/fansunited/football/competitions/index.d.ts +27 -0
- package/api/fansunited/football/competitions/index.d.ts.map +1 -0
- package/api/fansunited/football/competitions/transformer.d.ts +14 -0
- package/api/fansunited/football/competitions/transformer.d.ts.map +1 -0
- package/api/fansunited/football/competitions/types.d.ts +67 -0
- package/api/fansunited/football/competitions/types.d.ts.map +1 -0
- package/api/fansunited/football/http.d.ts +8 -0
- package/api/fansunited/football/http.d.ts.map +1 -0
- package/api/fansunited/football/index.d.ts +19 -0
- package/api/fansunited/football/index.d.ts.map +1 -0
- package/api/fansunited/football/matches/index.d.ts +61 -0
- package/api/fansunited/football/matches/index.d.ts.map +1 -0
- package/api/fansunited/football/matches/transformer.d.ts +28 -0
- package/api/fansunited/football/matches/transformer.d.ts.map +1 -0
- package/api/fansunited/football/matches/types.d.ts +328 -0
- package/api/fansunited/football/matches/types.d.ts.map +1 -0
- package/api/fansunited/football/players/index.d.ts +30 -0
- package/api/fansunited/football/players/index.d.ts.map +1 -0
- package/api/fansunited/football/players/transformer.d.ts +10 -0
- package/api/fansunited/football/players/transformer.d.ts.map +1 -0
- package/api/fansunited/football/players/types.d.ts +70 -0
- package/api/fansunited/football/players/types.d.ts.map +1 -0
- package/api/fansunited/football/search/index.d.ts +49 -0
- package/api/fansunited/football/search/index.d.ts.map +1 -0
- package/api/fansunited/football/search/transformer.d.ts +10 -0
- package/api/fansunited/football/search/transformer.d.ts.map +1 -0
- package/api/fansunited/football/search/types.d.ts +151 -0
- package/api/fansunited/football/search/types.d.ts.map +1 -0
- package/api/fansunited/football/teams/index.d.ts +30 -0
- package/api/fansunited/football/teams/index.d.ts.map +1 -0
- package/api/fansunited/football/teams/transformer.d.ts +10 -0
- package/api/fansunited/football/teams/transformer.d.ts.map +1 -0
- package/api/fansunited/football/teams/types.d.ts +87 -0
- package/api/fansunited/football/teams/types.d.ts.map +1 -0
- package/api/fansunited/http.d.ts +54 -0
- package/api/fansunited/http.d.ts.map +1 -0
- package/api/fansunited/index.d.ts +10 -0
- package/api/fansunited/index.d.ts.map +1 -0
- package/api/sportal365-sports/constants.d.ts +16 -0
- package/api/sportal365-sports/constants.d.ts.map +1 -0
- package/api/sportal365-sports/football/competitions/competition.types.d.ts +148 -0
- package/api/sportal365-sports/football/competitions/competition.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/competitions/index.d.ts +54 -0
- package/api/sportal365-sports/football/competitions/index.d.ts.map +1 -0
- package/api/sportal365-sports/football/competitions/utils.d.ts +14 -0
- package/api/sportal365-sports/football/competitions/utils.d.ts.map +1 -0
- package/api/sportal365-sports/football/http.d.ts +8 -0
- package/api/sportal365-sports/football/http.d.ts.map +1 -0
- package/api/sportal365-sports/football/index.d.ts +19 -0
- package/api/sportal365-sports/football/index.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/index.d.ts +151 -0
- package/api/sportal365-sports/football/matches/index.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/transformers/commentary.d.ts +12 -0
- package/api/sportal365-sports/football/matches/transformers/commentary.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/transformers/index.d.ts +10 -0
- package/api/sportal365-sports/football/matches/transformers/index.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/transformers/lineup.d.ts +11 -0
- package/api/sportal365-sports/football/matches/transformers/lineup.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/transformers/match-event.d.ts +12 -0
- package/api/sportal365-sports/football/matches/transformers/match-event.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/transformers/match.d.ts +11 -0
- package/api/sportal365-sports/football/matches/transformers/match.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/transformers/odds.d.ts +11 -0
- package/api/sportal365-sports/football/matches/transformers/odds.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/transformers/statistics.d.ts +11 -0
- package/api/sportal365-sports/football/matches/transformers/statistics.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/commentary.types.d.ts +27 -0
- package/api/sportal365-sports/football/matches/types/commentary.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/event.types.d.ts +19 -0
- package/api/sportal365-sports/football/matches/types/event.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/index.d.ts +16 -0
- package/api/sportal365-sports/football/matches/types/index.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/lineup.types.d.ts +80 -0
- package/api/sportal365-sports/football/matches/types/lineup.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/match.types.d.ts +47 -0
- package/api/sportal365-sports/football/matches/types/match.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/minute.types.d.ts +8 -0
- package/api/sportal365-sports/football/matches/types/minute.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/odds.types.d.ts +80 -0
- package/api/sportal365-sports/football/matches/types/odds.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/option.types.d.ts +129 -0
- package/api/sportal365-sports/football/matches/types/option.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/referee.types.d.ts +13 -0
- package/api/sportal365-sports/football/matches/types/referee.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/statistics.types.d.ts +45 -0
- package/api/sportal365-sports/football/matches/types/statistics.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/status.types.d.ts +13 -0
- package/api/sportal365-sports/football/matches/types/status.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/team.types.d.ts +17 -0
- package/api/sportal365-sports/football/matches/types/team.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/matches/types/winner.types.d.ts +15 -0
- package/api/sportal365-sports/football/matches/types/winner.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/search/index.d.ts +45 -0
- package/api/sportal365-sports/football/search/index.d.ts.map +1 -0
- package/api/sportal365-sports/football/search/search.transformer.d.ts +10 -0
- package/api/sportal365-sports/football/search/search.transformer.d.ts.map +1 -0
- package/api/sportal365-sports/football/search/search.types.d.ts +147 -0
- package/api/sportal365-sports/football/search/search.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/standings/index.d.ts +43 -0
- package/api/sportal365-sports/football/standings/index.d.ts.map +1 -0
- package/api/sportal365-sports/football/standings/standing.transformer.d.ts +15 -0
- package/api/sportal365-sports/football/standings/standing.transformer.d.ts.map +1 -0
- package/api/sportal365-sports/football/standings/standing.types.d.ts +73 -0
- package/api/sportal365-sports/football/standings/standing.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/statistics/index.d.ts +42 -0
- package/api/sportal365-sports/football/statistics/index.d.ts.map +1 -0
- package/api/sportal365-sports/football/statistics/player-season.transformer.d.ts +11 -0
- package/api/sportal365-sports/football/statistics/player-season.transformer.d.ts.map +1 -0
- package/api/sportal365-sports/football/statistics/player-season.types.d.ts +84 -0
- package/api/sportal365-sports/football/statistics/player-season.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/teams/index.d.ts +53 -0
- package/api/sportal365-sports/football/teams/index.d.ts.map +1 -0
- package/api/sportal365-sports/football/teams/squad.types.d.ts +63 -0
- package/api/sportal365-sports/football/teams/squad.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/teams/team.types.d.ts +58 -0
- package/api/sportal365-sports/football/teams/team.types.d.ts.map +1 -0
- package/api/sportal365-sports/football/teams/utils.d.ts +24 -0
- package/api/sportal365-sports/football/teams/utils.d.ts.map +1 -0
- package/api/sportal365-sports/http.d.ts +59 -0
- package/api/sportal365-sports/http.d.ts.map +1 -0
- package/api/sportal365-sports/index.d.ts +14 -0
- package/api/sportal365-sports/index.d.ts.map +1 -0
- package/api/sportal365-sports/search/http.d.ts +8 -0
- package/api/sportal365-sports/search/http.d.ts.map +1 -0
- package/api/sportal365-sports/search/index.d.ts +43 -0
- package/api/sportal365-sports/search/index.d.ts.map +1 -0
- package/api/sportal365-sports/search/search.transformer.d.ts +10 -0
- package/api/sportal365-sports/search/search.transformer.d.ts.map +1 -0
- package/api/sportal365-sports/search/search.types.d.ts +209 -0
- package/api/sportal365-sports/search/search.types.d.ts.map +1 -0
- package/api/sportal365-sports/shared/index.d.ts +6 -0
- package/api/sportal365-sports/shared/index.d.ts.map +1 -0
- package/api/sportal365-sports/shared/providerRef.helper.d.ts +79 -0
- package/api/sportal365-sports/shared/providerRef.helper.d.ts.map +1 -0
- package/api/sportal365-sports/shared/types.d.ts +189 -0
- package/api/sportal365-sports/shared/types.d.ts.map +1 -0
- package/api/sportal365-sports/statistics/http.d.ts +8 -0
- package/api/sportal365-sports/statistics/http.d.ts.map +1 -0
- package/api/sportal365-sports/statistics/index.d.ts +55 -0
- package/api/sportal365-sports/statistics/index.d.ts.map +1 -0
- package/api/sportal365-sports/statistics/team-stats.transformer.d.ts +14 -0
- package/api/sportal365-sports/statistics/team-stats.transformer.d.ts.map +1 -0
- package/api/sportal365-sports/statistics/team-stats.types.d.ts +45 -0
- package/api/sportal365-sports/statistics/team-stats.types.d.ts.map +1 -0
- package/client.cjs +8 -0
- package/client.d.ts +20 -0
- package/client.d.ts.map +1 -0
- package/client.js +12065 -0
- package/config/index.d.ts +31 -0
- package/config/index.d.ts.map +1 -0
- package/config/types.d.ts +36 -0
- package/config/types.d.ts.map +1 -0
- package/fansunited-data-layer.cjs +1 -0
- package/fansunited-data-layer.js +1739 -0
- package/helpers/competition.helpers.d.ts +22 -0
- package/helpers/competition.helpers.d.ts.map +1 -0
- package/helpers/index.d.ts +7 -0
- package/helpers/index.d.ts.map +1 -0
- package/helpers/team.helpers.d.ts +289 -0
- package/helpers/team.helpers.d.ts.map +1 -0
- package/index-Cogo-Kkd.cjs +1 -0
- package/index-D7T2Yy11.js +1170 -0
- package/index.d.ts +39 -0
- package/index.d.ts.map +1 -0
- package/package.json +12 -15
- package/providers/competition/hooks/index.d.ts +6 -0
- package/providers/competition/hooks/index.d.ts.map +1 -0
- package/providers/competition/hooks/useCompetitionStats.d.ts +8 -0
- package/providers/competition/hooks/useCompetitionStats.d.ts.map +1 -0
- package/providers/competition/hooks/useGoalDistribution.d.ts +11 -0
- package/providers/competition/hooks/useGoalDistribution.d.ts.map +1 -0
- package/providers/competition/hooks/useMatchHelpers.d.ts +16 -0
- package/providers/competition/hooks/useMatchHelpers.d.ts.map +1 -0
- package/providers/competition/hooks/useStandingsCalculations.d.ts +18 -0
- package/providers/competition/hooks/useStandingsCalculations.d.ts.map +1 -0
- package/providers/competition/hooks/useStandingsHelpers.d.ts +23 -0
- package/providers/competition/hooks/useStandingsHelpers.d.ts.map +1 -0
- package/providers/competition/hooks/useTeamPosition.d.ts +8 -0
- package/providers/competition/hooks/useTeamPosition.d.ts.map +1 -0
- package/providers/competition/hooks/useTeamResultsTable.d.ts +9 -0
- package/providers/competition/hooks/useTeamResultsTable.d.ts.map +1 -0
- package/providers/competition/utils/competitionStats.d.ts +42 -0
- package/providers/competition/utils/competitionStats.d.ts.map +1 -0
- package/providers/competition/utils/goalDistribution.d.ts +41 -0
- package/providers/competition/utils/goalDistribution.d.ts.map +1 -0
- package/providers/competition/utils/index.d.ts +6 -0
- package/providers/competition/utils/index.d.ts.map +1 -0
- package/providers/competition/utils/standingsCalculations.d.ts +24 -0
- package/providers/competition/utils/standingsCalculations.d.ts.map +1 -0
- package/providers/competition.context.d.ts +8 -0
- package/providers/competition.context.d.ts.map +1 -0
- package/providers/competition.provider.d.ts +3 -0
- package/providers/competition.provider.d.ts.map +1 -0
- package/providers/competition.types.d.ts +118 -0
- package/providers/competition.types.d.ts.map +1 -0
- package/providers/fansunited-config.context.d.ts +6 -0
- package/providers/fansunited-config.context.d.ts.map +1 -0
- package/providers/fansunited-config.hooks.d.ts +19 -0
- package/providers/fansunited-config.hooks.d.ts.map +1 -0
- package/providers/fansunited-config.provider.d.ts +44 -0
- package/providers/fansunited-config.provider.d.ts.map +1 -0
- package/providers/fansunited-config.types.d.ts +48 -0
- package/providers/fansunited-config.types.d.ts.map +1 -0
- package/providers/fansunited-sdk.hook.d.ts +40 -0
- package/providers/fansunited-sdk.hook.d.ts.map +1 -0
- package/providers/index.d.ts +20 -0
- package/providers/index.d.ts.map +1 -0
- package/providers/match/hooks/useEventHelpers.d.ts +12 -0
- package/providers/match/hooks/useEventHelpers.d.ts.map +1 -0
- package/providers/match/hooks/useHeadToHeadHelpers.d.ts +13 -0
- package/providers/match/hooks/useHeadToHeadHelpers.d.ts.map +1 -0
- package/providers/match/hooks/useLineupHelpers.d.ts +13 -0
- package/providers/match/hooks/useLineupHelpers.d.ts.map +1 -0
- package/providers/match/hooks/useMatchStandingsCalculations.d.ts +20 -0
- package/providers/match/hooks/useMatchStandingsCalculations.d.ts.map +1 -0
- package/providers/match/hooks/useMatchStatus.d.ts +12 -0
- package/providers/match/hooks/useMatchStatus.d.ts.map +1 -0
- package/providers/match/hooks/useOddsHelpers.d.ts +10 -0
- package/providers/match/hooks/useOddsHelpers.d.ts.map +1 -0
- package/providers/match/hooks/useScoreHelpers.d.ts +16 -0
- package/providers/match/hooks/useScoreHelpers.d.ts.map +1 -0
- package/providers/match/hooks/useStandingsHelpers.d.ts +22 -0
- package/providers/match/hooks/useStandingsHelpers.d.ts.map +1 -0
- package/providers/match/hooks/useStatisticsHelpers.d.ts +13 -0
- package/providers/match/hooks/useStatisticsHelpers.d.ts.map +1 -0
- package/providers/match/hooks/useTeamHelpers.d.ts +11 -0
- package/providers/match/hooks/useTeamHelpers.d.ts.map +1 -0
- package/providers/match/hooks/useTeamStatsHelpers.d.ts +12 -0
- package/providers/match/hooks/useTeamStatsHelpers.d.ts.map +1 -0
- package/providers/match.context.d.ts +8 -0
- package/providers/match.context.d.ts.map +1 -0
- package/providers/match.provider.d.ts +3 -0
- package/providers/match.provider.d.ts.map +1 -0
- package/providers/match.types.d.ts +151 -0
- package/providers/match.types.d.ts.map +1 -0
- package/providers/team/hooks/useFormStats.d.ts +49 -0
- package/providers/team/hooks/useFormStats.d.ts.map +1 -0
- package/providers/team/hooks/useMatchHelpers.d.ts +12 -0
- package/providers/team/hooks/useMatchHelpers.d.ts.map +1 -0
- package/providers/team/hooks/useSquadHelpers.d.ts +17 -0
- package/providers/team/hooks/useSquadHelpers.d.ts.map +1 -0
- package/providers/team.context.d.ts +8 -0
- package/providers/team.context.d.ts.map +1 -0
- package/providers/team.provider.d.ts +3 -0
- package/providers/team.provider.d.ts.map +1 -0
- package/providers/team.types.d.ts +68 -0
- package/providers/team.types.d.ts.map +1 -0
- package/types/canonical/base.types.d.ts +366 -0
- package/types/canonical/base.types.d.ts.map +1 -0
- package/types/canonical/commentary.types.d.ts +42 -0
- package/types/canonical/commentary.types.d.ts.map +1 -0
- package/types/canonical/event.types.d.ts +31 -0
- package/types/canonical/event.types.d.ts.map +1 -0
- package/types/canonical/index.d.ts +17 -0
- package/types/canonical/index.d.ts.map +1 -0
- package/types/canonical/lineup.types.d.ts +33 -0
- package/types/canonical/lineup.types.d.ts.map +1 -0
- package/types/canonical/match.types.d.ts +153 -0
- package/types/canonical/match.types.d.ts.map +1 -0
- package/types/canonical/odds.types.d.ts +73 -0
- package/types/canonical/odds.types.d.ts.map +1 -0
- package/types/canonical/search.types.d.ts +101 -0
- package/types/canonical/search.types.d.ts.map +1 -0
- package/types/canonical/sports-search.types.d.ts +151 -0
- package/types/canonical/sports-search.types.d.ts.map +1 -0
- package/types/canonical/squad.types.d.ts +30 -0
- package/types/canonical/squad.types.d.ts.map +1 -0
- package/types/canonical/standing.types.d.ts +85 -0
- package/types/canonical/standing.types.d.ts.map +1 -0
- package/types/canonical/statistics.types.d.ts +81 -0
- package/types/canonical/statistics.types.d.ts.map +1 -0
- package/types/index.d.ts +10 -0
- package/types/index.d.ts.map +1 -0
- package/utilities/stats/core/helpers.d.ts +65 -0
- package/utilities/stats/core/helpers.d.ts.map +1 -0
- package/utilities/stats/core/index.d.ts +7 -0
- package/utilities/stats/core/index.d.ts.map +1 -0
- package/utilities/stats/core/types.d.ts +39 -0
- package/utilities/stats/core/types.d.ts.map +1 -0
- package/utilities/stats/index.d.ts +27 -0
- package/utilities/stats/index.d.ts.map +1 -0
- package/utilities/stats/match/headToHead.d.ts +73 -0
- package/utilities/stats/match/headToHead.d.ts.map +1 -0
- package/utilities/stats/match/homeVsAway.d.ts +30 -0
- package/utilities/stats/match/homeVsAway.d.ts.map +1 -0
- package/utilities/stats/match/index.d.ts +8 -0
- package/utilities/stats/match/index.d.ts.map +1 -0
- package/utilities/stats/match/overUnder.d.ts +59 -0
- package/utilities/stats/match/overUnder.d.ts.map +1 -0
- package/utilities/stats/match/result.d.ts +13 -0
- package/utilities/stats/match/result.d.ts.map +1 -0
- package/utilities/stats/team/commonOpponents.d.ts +28 -0
- package/utilities/stats/team/commonOpponents.d.ts.map +1 -0
- package/utilities/stats/team/goalStats.d.ts +42 -0
- package/utilities/stats/team/goalStats.d.ts.map +1 -0
- package/utilities/stats/team/index.d.ts +7 -0
- package/utilities/stats/team/index.d.ts.map +1 -0
- package/utilities/stats/team/streaks.d.ts +48 -0
- package/utilities/stats/team/streaks.d.ts.map +1 -0
- package/vite.svg +1 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sports Search API types for Sportal365
|
|
3
|
+
* Cross-sport search across all entities
|
|
4
|
+
*/
|
|
5
|
+
import type { NextCacheOptions } from "../http";
|
|
6
|
+
/**
|
|
7
|
+
* Sport types supported by the search API
|
|
8
|
+
*/
|
|
9
|
+
export type SportType = "football" | "basketball" | "tennis" | "handball" | "volleyball" | "ice_hockey" | "horse_racing" | "esports";
|
|
10
|
+
/**
|
|
11
|
+
* Entity types that can be searched across all sports
|
|
12
|
+
*/
|
|
13
|
+
export type SportsSearchEntityType = "team" | "player" | "tournament" | "match" | "coach" | "referee" | "venue" | "city" | "country" | "horse" | "competition";
|
|
14
|
+
/**
|
|
15
|
+
* Options for sports search
|
|
16
|
+
*/
|
|
17
|
+
export interface GetSportsSearchOptions {
|
|
18
|
+
/** Search text (defaults to '*' if not provided) */
|
|
19
|
+
name?: string;
|
|
20
|
+
/** Filter entities by entity type */
|
|
21
|
+
entityTypes?: SportsSearchEntityType[];
|
|
22
|
+
/** Filter entities by sport */
|
|
23
|
+
sports?: SportType[];
|
|
24
|
+
/** Filter events by start time (formats: yyyy-mm-ddThh:mm:ss or yyyy-mm-dd) */
|
|
25
|
+
eventStartTime?: string;
|
|
26
|
+
/** Filter by a list of entity IDs */
|
|
27
|
+
ids?: string[];
|
|
28
|
+
/** Filter events by a list of competition IDs */
|
|
29
|
+
competitionIds?: string[];
|
|
30
|
+
/** Case-sensitive domain filter (sport, politics, fashion, etc) */
|
|
31
|
+
domain?: string;
|
|
32
|
+
/** Filter entities by available translations */
|
|
33
|
+
inputLanguage?: string;
|
|
34
|
+
/** Translate output where possible */
|
|
35
|
+
translationLanguage?: string;
|
|
36
|
+
/** Output page limit (maximum is 200) */
|
|
37
|
+
limit?: number;
|
|
38
|
+
/** Output offset for pagination */
|
|
39
|
+
offset?: number;
|
|
40
|
+
/** Next.js cache options */
|
|
41
|
+
next?: NextCacheOptions;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Translation object
|
|
45
|
+
*/
|
|
46
|
+
export interface RawTranslation {
|
|
47
|
+
language: string;
|
|
48
|
+
name: string;
|
|
49
|
+
short_name: string | null;
|
|
50
|
+
three_letter_code: string | null;
|
|
51
|
+
custom_content: unknown | null;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Display asset object
|
|
55
|
+
*/
|
|
56
|
+
export interface RawDisplayAsset {
|
|
57
|
+
url: string | null;
|
|
58
|
+
timestamp: string | null;
|
|
59
|
+
original_filename: string | null;
|
|
60
|
+
custom_urls: unknown | null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Base raw search result
|
|
64
|
+
*/
|
|
65
|
+
export interface RawSportsSearchResultBase {
|
|
66
|
+
id: string;
|
|
67
|
+
legacy_id: string | null;
|
|
68
|
+
name: string;
|
|
69
|
+
short_name: string | null;
|
|
70
|
+
three_letter_code: string | null;
|
|
71
|
+
translations: RawTranslation[];
|
|
72
|
+
display_asset: RawDisplayAsset | null;
|
|
73
|
+
entity_type: string;
|
|
74
|
+
slug: string;
|
|
75
|
+
tag_score: number | null;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Country in search results
|
|
79
|
+
*/
|
|
80
|
+
export interface RawSportsSearchCountry {
|
|
81
|
+
id: string;
|
|
82
|
+
legacy_id: string | null;
|
|
83
|
+
name: string;
|
|
84
|
+
short_name: string | null;
|
|
85
|
+
three_letter_code: string | null;
|
|
86
|
+
translations: RawTranslation[];
|
|
87
|
+
display_asset: RawDisplayAsset | null;
|
|
88
|
+
entity_type: "country";
|
|
89
|
+
slug: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Team search result
|
|
93
|
+
*/
|
|
94
|
+
export interface RawSportsSearchTeam extends RawSportsSearchResultBase {
|
|
95
|
+
sport: string;
|
|
96
|
+
country: RawSportsSearchCountry | null;
|
|
97
|
+
country_id: string | null;
|
|
98
|
+
gender: "MALE" | "FEMALE" | "UNDEFINED";
|
|
99
|
+
competition_ids: string[];
|
|
100
|
+
type: string;
|
|
101
|
+
venue: unknown | null;
|
|
102
|
+
national?: boolean;
|
|
103
|
+
undecided?: boolean;
|
|
104
|
+
entity_type: "team";
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* City search result
|
|
108
|
+
*/
|
|
109
|
+
export interface RawSportsSearchCity extends RawSportsSearchResultBase {
|
|
110
|
+
sport: string;
|
|
111
|
+
country: RawSportsSearchCountry | null;
|
|
112
|
+
entity_type: "city";
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Horse search result
|
|
116
|
+
*/
|
|
117
|
+
export interface RawSportsSearchHorse extends RawSportsSearchResultBase {
|
|
118
|
+
sport: string;
|
|
119
|
+
country: RawSportsSearchCountry | null;
|
|
120
|
+
country_id: string | null;
|
|
121
|
+
gender: "MALE" | "FEMALE" | "UNDEFINED";
|
|
122
|
+
entity_type: "horse";
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Player search result
|
|
126
|
+
*/
|
|
127
|
+
export interface RawSportsSearchPlayer extends RawSportsSearchResultBase {
|
|
128
|
+
sport: string;
|
|
129
|
+
country: RawSportsSearchCountry | null;
|
|
130
|
+
country_id: string | null;
|
|
131
|
+
gender: "MALE" | "FEMALE" | "UNDEFINED";
|
|
132
|
+
birthdate?: string | null;
|
|
133
|
+
position?: string | null;
|
|
134
|
+
entity_type: "player";
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Coach search result
|
|
138
|
+
*/
|
|
139
|
+
export interface RawSportsSearchCoach extends RawSportsSearchResultBase {
|
|
140
|
+
sport: string;
|
|
141
|
+
country: RawSportsSearchCountry | null;
|
|
142
|
+
country_id: string | null;
|
|
143
|
+
gender: "MALE" | "FEMALE" | "UNDEFINED";
|
|
144
|
+
birthdate?: string | null;
|
|
145
|
+
entity_type: "coach";
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Referee search result
|
|
149
|
+
*/
|
|
150
|
+
export interface RawSportsSearchReferee extends RawSportsSearchResultBase {
|
|
151
|
+
sport: string;
|
|
152
|
+
country: RawSportsSearchCountry | null;
|
|
153
|
+
country_id: string | null;
|
|
154
|
+
gender: "MALE" | "FEMALE" | "UNDEFINED";
|
|
155
|
+
birthdate?: string | null;
|
|
156
|
+
entity_type: "referee";
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Venue search result
|
|
160
|
+
*/
|
|
161
|
+
export interface RawSportsSearchVenue extends RawSportsSearchResultBase {
|
|
162
|
+
sport: string;
|
|
163
|
+
country: RawSportsSearchCountry | null;
|
|
164
|
+
country_id: string | null;
|
|
165
|
+
city?: RawSportsSearchCity | null;
|
|
166
|
+
city_id?: string | null;
|
|
167
|
+
entity_type: "venue";
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Tournament/Competition search result
|
|
171
|
+
*/
|
|
172
|
+
export interface RawSportsSearchTournament extends RawSportsSearchResultBase {
|
|
173
|
+
sport: string;
|
|
174
|
+
country: RawSportsSearchCountry | null;
|
|
175
|
+
country_id: string | null;
|
|
176
|
+
gender: "MALE" | "FEMALE" | "UNDEFINED";
|
|
177
|
+
type?: string | null;
|
|
178
|
+
region?: string | null;
|
|
179
|
+
entity_type: "tournament" | "competition";
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Match search result
|
|
183
|
+
*/
|
|
184
|
+
export interface RawSportsSearchMatch extends RawSportsSearchResultBase {
|
|
185
|
+
sport: string;
|
|
186
|
+
competition_id?: string | null;
|
|
187
|
+
start_time?: string | null;
|
|
188
|
+
home_team?: RawSportsSearchTeam | null;
|
|
189
|
+
away_team?: RawSportsSearchTeam | null;
|
|
190
|
+
entity_type: "match";
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Country search result (standalone)
|
|
194
|
+
*/
|
|
195
|
+
export interface RawSportsSearchCountryResult extends RawSportsSearchResultBase {
|
|
196
|
+
sport: string;
|
|
197
|
+
entity_type: "country";
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Union type for all raw search results
|
|
201
|
+
*/
|
|
202
|
+
export type RawSportsSearchResult = RawSportsSearchTeam | RawSportsSearchCity | RawSportsSearchHorse | RawSportsSearchPlayer | RawSportsSearchCoach | RawSportsSearchReferee | RawSportsSearchVenue | RawSportsSearchTournament | RawSportsSearchMatch | RawSportsSearchCountryResult;
|
|
203
|
+
/**
|
|
204
|
+
* Raw API response
|
|
205
|
+
*/
|
|
206
|
+
export interface RawSportsSearchResponse {
|
|
207
|
+
results: RawSportsSearchResult[];
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=search.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.types.d.ts","sourceRoot":"","sources":["../../../../src/lib/api/sportal365-sports/search/search.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,SAAS,GACf,UAAU,GACV,YAAY,GACZ,QAAQ,GACR,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,SAAS,CAAC;AAEhB;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC5B,MAAM,GACN,QAAQ,GACR,YAAY,GACZ,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,MAAM,GACN,SAAS,GACT,OAAO,GACP,aAAa,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,WAAW,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACvC,+BAA+B;IAC/B,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qCAAqC;IACrC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IAC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Q,GAAG,WAAW,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,YAAY,GAAG,aAAa,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,yBAAyB;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACvC,WAAW,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,yBAAyB;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC3B,mBAAmB,GACnB,mBAAmB,GACnB,oBAAoB,GACpB,qBAAqB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,oBAAoB,GACpB,yBAAyB,GACzB,oBAAoB,GACpB,4BAA4B,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,qBAAqB,EAAE,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/api/sportal365-sports/shared/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider reference helper utilities
|
|
3
|
+
* Converts old string-based providerRef to new array format and provides lookup utilities
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Convert a provider-specific UUID/reference string to the new array format
|
|
7
|
+
*
|
|
8
|
+
* @param uuid - The provider-specific UUID/reference (e.g., from Sportal365)
|
|
9
|
+
* @param provider - The provider name (default: "sportal365")
|
|
10
|
+
* @returns Array with single provider reference object, or undefined if uuid is not provided
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const ref = toProviderRefArray("abc-123-def");
|
|
15
|
+
* // Returns: [{ provider: "sportal365", id: "abc-123-def" }]
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function toProviderRefArray(uuid: string | undefined, provider?: string): {
|
|
19
|
+
provider: string;
|
|
20
|
+
id: string;
|
|
21
|
+
}[] | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Get provider ID from providerRef array by provider name
|
|
24
|
+
*
|
|
25
|
+
* @param providerRef - Array of provider references
|
|
26
|
+
* @param provider - The provider name to search for (e.g., "sportal365", "fans-united", "opta")
|
|
27
|
+
* @returns The provider-specific ID, or undefined if not found
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const refs = [
|
|
32
|
+
* { provider: "sportal365", id: "abc-123" },
|
|
33
|
+
* { provider: "fans-united", id: "fb:m:320180" }
|
|
34
|
+
* ];
|
|
35
|
+
*
|
|
36
|
+
* const sportalId = getProviderRefId(refs, "sportal365"); // "abc-123"
|
|
37
|
+
* const fuId = getProviderRefId(refs, "fans-united"); // "fb:m:320180"
|
|
38
|
+
* const optaId = getProviderRefId(refs, "opta"); // undefined
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function getProviderRefId(providerRef: {
|
|
42
|
+
provider: string;
|
|
43
|
+
id: string;
|
|
44
|
+
}[] | undefined, provider: string): string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Add or update a provider reference in the array
|
|
47
|
+
*
|
|
48
|
+
* @param providerRef - Existing array of provider references (can be undefined)
|
|
49
|
+
* @param provider - The provider name
|
|
50
|
+
* @param id - The provider-specific ID
|
|
51
|
+
* @returns Updated array with the new/updated provider reference
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* let refs = [{ provider: "sportal365", id: "abc-123" }];
|
|
56
|
+
*
|
|
57
|
+
* // Add new provider
|
|
58
|
+
* refs = addProviderRef(refs, "fans-united", "fb:m:320180");
|
|
59
|
+
* // refs = [
|
|
60
|
+
* // { provider: "sportal365", id: "abc-123" },
|
|
61
|
+
* // { provider: "fans-united", id: "fb:m:320180" }
|
|
62
|
+
* // ]
|
|
63
|
+
*
|
|
64
|
+
* // Update existing provider
|
|
65
|
+
* refs = addProviderRef(refs, "sportal365", "xyz-789");
|
|
66
|
+
* // refs = [
|
|
67
|
+
* // { provider: "sportal365", id: "xyz-789" },
|
|
68
|
+
* // { provider: "fans-united", id: "fb:m:320180" }
|
|
69
|
+
* // ]
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare function addProviderRef(providerRef: {
|
|
73
|
+
provider: string;
|
|
74
|
+
id: string;
|
|
75
|
+
}[] | undefined, provider: string, id: string): {
|
|
76
|
+
provider: string;
|
|
77
|
+
id: string;
|
|
78
|
+
}[];
|
|
79
|
+
//# sourceMappingURL=providerRef.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerRef.helper.d.ts","sourceRoot":"","sources":["../../../../src/lib/api/sportal365-sports/shared/providerRef.helper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,QAAQ,GAAE,MAAqB,GAChC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,SAAS,CAShD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAC5B,WAAW,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,SAAS,EAC3D,QAAQ,EAAE,MAAM,GACjB,MAAM,GAAG,SAAS,CAKpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,cAAc,CAC1B,WAAW,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,SAAS,EAC3D,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,GACX;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,CAapC"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types used across multiple Sportal365 Sports API endpoints
|
|
3
|
+
* These are common building blocks for API responses
|
|
4
|
+
*/
|
|
5
|
+
export interface RawAsset {
|
|
6
|
+
url: string;
|
|
7
|
+
}
|
|
8
|
+
export interface RawAssets {
|
|
9
|
+
flag?: RawAsset;
|
|
10
|
+
logo?: RawAsset;
|
|
11
|
+
image?: RawAsset;
|
|
12
|
+
home_kit?: RawAsset;
|
|
13
|
+
away_kit?: RawAsset;
|
|
14
|
+
squad_image?: RawAsset;
|
|
15
|
+
thumb?: RawAsset;
|
|
16
|
+
thumb_transparent_background?: RawAsset;
|
|
17
|
+
}
|
|
18
|
+
export interface RawCountry {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
slug: string;
|
|
22
|
+
code: string | null;
|
|
23
|
+
assets?: RawAssets;
|
|
24
|
+
uuid: string;
|
|
25
|
+
}
|
|
26
|
+
export interface RawCity {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
country: RawCountry;
|
|
30
|
+
uuid: string | null;
|
|
31
|
+
slug: string;
|
|
32
|
+
}
|
|
33
|
+
export interface RawVenueProfile {
|
|
34
|
+
lat: number;
|
|
35
|
+
lng: number;
|
|
36
|
+
capacity: number;
|
|
37
|
+
}
|
|
38
|
+
/** Full venue used in team profiles */
|
|
39
|
+
export interface RawVenue {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
slug: string;
|
|
43
|
+
country: RawCountry;
|
|
44
|
+
city: RawCity;
|
|
45
|
+
profile: RawVenueProfile;
|
|
46
|
+
assets?: RawAssets;
|
|
47
|
+
uuid: string;
|
|
48
|
+
}
|
|
49
|
+
/** Simplified venue used in match responses */
|
|
50
|
+
export interface RawMatchVenue {
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
slug: string;
|
|
54
|
+
assets?: RawAssets | null;
|
|
55
|
+
uuid: string;
|
|
56
|
+
}
|
|
57
|
+
export interface RawTournament {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
slug: string;
|
|
61
|
+
country: RawCountry;
|
|
62
|
+
gender: 'MALE' | 'FEMALE';
|
|
63
|
+
type: 'LEAGUE' | 'CUP';
|
|
64
|
+
region: 'DOMESTIC' | 'INTERNATIONAL';
|
|
65
|
+
assets: RawAssets | null;
|
|
66
|
+
uuid: string;
|
|
67
|
+
}
|
|
68
|
+
export interface RawSeason {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
slug: string;
|
|
72
|
+
tournament: RawTournament;
|
|
73
|
+
status: 'ACTIVE' | 'INACTIVE';
|
|
74
|
+
uuid: string;
|
|
75
|
+
}
|
|
76
|
+
export interface RawGroup {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
slug: string;
|
|
80
|
+
order_in_stage?: number;
|
|
81
|
+
uuid: string;
|
|
82
|
+
}
|
|
83
|
+
export interface RawStage {
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
slug: string;
|
|
87
|
+
type: 'GROUP' | 'LEAGUE' | 'KNOCK_OUT' | 'FRIENDLY';
|
|
88
|
+
start_date?: string;
|
|
89
|
+
end_date?: string;
|
|
90
|
+
order_in_season?: number;
|
|
91
|
+
coverage?: string;
|
|
92
|
+
short_name?: string | null;
|
|
93
|
+
status?: 'ACTIVE' | 'INACTIVE';
|
|
94
|
+
uuid?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface RawRound {
|
|
97
|
+
id?: string;
|
|
98
|
+
key: string;
|
|
99
|
+
name: string;
|
|
100
|
+
type?: string;
|
|
101
|
+
uuid?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface RawCompetitionCountry {
|
|
104
|
+
name: string;
|
|
105
|
+
id: string;
|
|
106
|
+
slug: string;
|
|
107
|
+
short_name: string | null;
|
|
108
|
+
three_letter_code: string | null;
|
|
109
|
+
legacy_id: string;
|
|
110
|
+
display_asset: RawAsset;
|
|
111
|
+
entity_type: 'country';
|
|
112
|
+
}
|
|
113
|
+
export interface RawCompetition {
|
|
114
|
+
name: string;
|
|
115
|
+
id: string;
|
|
116
|
+
sport: string;
|
|
117
|
+
country: RawCompetitionCountry;
|
|
118
|
+
gender: 'MALE' | 'FEMALE';
|
|
119
|
+
slug: string;
|
|
120
|
+
region: 'DOMESTIC' | 'INTERNATIONAL';
|
|
121
|
+
short_name: string | null;
|
|
122
|
+
three_letter_code: string | null;
|
|
123
|
+
legacy_id: string;
|
|
124
|
+
display_asset: RawAsset;
|
|
125
|
+
entity_type: 'competition';
|
|
126
|
+
tag_score: number | null;
|
|
127
|
+
}
|
|
128
|
+
export interface RawPartialPlayer {
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
slug: string;
|
|
132
|
+
position?: string;
|
|
133
|
+
gender?: 'MALE' | 'FEMALE';
|
|
134
|
+
assets?: RawAssets | null;
|
|
135
|
+
}
|
|
136
|
+
export interface RawTeamScore {
|
|
137
|
+
home: number;
|
|
138
|
+
away: number;
|
|
139
|
+
}
|
|
140
|
+
export interface RawScore {
|
|
141
|
+
total?: RawTeamScore;
|
|
142
|
+
half_time?: RawTeamScore;
|
|
143
|
+
regular_time?: RawTeamScore;
|
|
144
|
+
extra_time?: RawTeamScore;
|
|
145
|
+
penalty_shootout?: RawTeamScore;
|
|
146
|
+
aggregate?: RawTeamScore;
|
|
147
|
+
after_extra_time?: RawTeamScore;
|
|
148
|
+
display?: RawTeamScore;
|
|
149
|
+
}
|
|
150
|
+
export interface RawFormMatchStatus {
|
|
151
|
+
type: string;
|
|
152
|
+
name: string;
|
|
153
|
+
short_name: string;
|
|
154
|
+
}
|
|
155
|
+
export interface RawFormMatchResult {
|
|
156
|
+
type: string;
|
|
157
|
+
results: Array<{
|
|
158
|
+
value: string;
|
|
159
|
+
position: string;
|
|
160
|
+
}>;
|
|
161
|
+
}
|
|
162
|
+
export interface RawFormMatchParticipant {
|
|
163
|
+
id: string;
|
|
164
|
+
name: string;
|
|
165
|
+
slug: string;
|
|
166
|
+
position: string;
|
|
167
|
+
three_letter_code: string;
|
|
168
|
+
short_name: string | null;
|
|
169
|
+
entity_type: 'team';
|
|
170
|
+
display_asset: RawAsset;
|
|
171
|
+
legacy_id: string;
|
|
172
|
+
}
|
|
173
|
+
export interface RawFormMatch {
|
|
174
|
+
id: string;
|
|
175
|
+
status: RawFormMatchStatus;
|
|
176
|
+
result: RawFormMatchResult[];
|
|
177
|
+
outcome: 'win' | 'loss' | 'draw';
|
|
178
|
+
participants: RawFormMatchParticipant[];
|
|
179
|
+
slug: string;
|
|
180
|
+
start_time: string;
|
|
181
|
+
legacy_id: string;
|
|
182
|
+
competition: RawCompetition;
|
|
183
|
+
}
|
|
184
|
+
export interface ApiError {
|
|
185
|
+
message: string;
|
|
186
|
+
code?: string;
|
|
187
|
+
status?: number;
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/api/sportal365-sports/shared/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,QAAQ;IACvB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AM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,OAAO,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,YAAY,EAAE,uBAAuB,EAAE,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,cAAc,CAAC;CAC7B;AAMD,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../src/lib/api/sportal365-sports/statistics/http.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,eAAO,MAAM,cAAc,wCAAiD,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sportal365 Sports API - Statistics
|
|
3
|
+
*
|
|
4
|
+
* Statistics endpoints for the Sportal365 Sports API.
|
|
5
|
+
* All functions return canonical FUSports types.
|
|
6
|
+
*/
|
|
7
|
+
import type { FUSportsTeamSeasonStatistics } from "../../../types/canonical";
|
|
8
|
+
import { type DataLayerConfig } from "../../../config";
|
|
9
|
+
import type { NextCacheOptions } from "../http";
|
|
10
|
+
/**
|
|
11
|
+
* Options for getting team season statistics
|
|
12
|
+
*/
|
|
13
|
+
export interface GetTeamSeasonStatisticsOptions {
|
|
14
|
+
/** Team ID (participant ID) - required */
|
|
15
|
+
teamId: string;
|
|
16
|
+
/** Season ID - required */
|
|
17
|
+
seasonId: string;
|
|
18
|
+
/** Next.js cache options for ISR/on-demand revalidation */
|
|
19
|
+
next?: NextCacheOptions;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get team season statistics
|
|
23
|
+
*
|
|
24
|
+
* Fetches aggregate statistics for a team in a specific season.
|
|
25
|
+
* Returns detailed statistics including goals, assists, shots, possession, etc.
|
|
26
|
+
*
|
|
27
|
+
* By default, results are cached for 10 minutes (600 seconds).
|
|
28
|
+
* You can override this by passing a custom `next` option.
|
|
29
|
+
*
|
|
30
|
+
* @param options - Required parameters (teamId, seasonId)
|
|
31
|
+
* @param config - Optional data layer config (uses singleton if not provided)
|
|
32
|
+
* @returns Canonical FUSportsTeamSeasonStatistics
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const stats = await getTeamSeasonStatistics({
|
|
37
|
+
* teamId: '07810505-bdad-4099-bb1d-736c87d0b32c',
|
|
38
|
+
* seasonId: 'e69110fd-4dc5-42f2-91ff-52bdd2326a80'
|
|
39
|
+
* });
|
|
40
|
+
* console.log(stats.teamName); // "Manchester United"
|
|
41
|
+
* console.log(stats.statistics); // Array of statistics
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* // Custom cache duration (5 minutes)
|
|
47
|
+
* const stats = await getTeamSeasonStatistics({
|
|
48
|
+
* teamId: '07810505-bdad-4099-bb1d-736c87d0b32c',
|
|
49
|
+
* seasonId: 'e69110fd-4dc5-42f2-91ff-52bdd2326a80',
|
|
50
|
+
* next: { revalidate: 300 }
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare function getTeamSeasonStatistics(options: GetTeamSeasonStatisticsOptions, config?: DataLayerConfig): Promise<FUSportsTeamSeasonStatistics>;
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/api/sportal365-sports/statistics/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAKhD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,uBAAuB,CACzC,OAAO,EAAE,8BAA8B,EACvC,MAAM,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,4BAA4B,CAAC,CAuBvC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Team statistics transformation utilities
|
|
3
|
+
* Transforms raw API responses to canonical FUSports types
|
|
4
|
+
*/
|
|
5
|
+
import type { FUSportsTeamSeasonStatistics } from "../../../types/canonical";
|
|
6
|
+
import type { RawTeamStatistics } from "./team-stats.types";
|
|
7
|
+
/**
|
|
8
|
+
* Transform raw team statistics to canonical FUSportsTeamSeasonStatistics
|
|
9
|
+
*
|
|
10
|
+
* Note: The API doesn't return seasonId in the response, so it must be provided
|
|
11
|
+
* from the request parameters.
|
|
12
|
+
*/
|
|
13
|
+
export declare function transformTeamStatistics(raw: RawTeamStatistics, seasonId: string): FUSportsTeamSeasonStatistics;
|
|
14
|
+
//# sourceMappingURL=team-stats.transformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-stats.transformer.d.ts","sourceRoot":"","sources":["../../../../src/lib/api/sportal365-sports/statistics/team-stats.transformer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,GAAG,4BAA4B,CAW9G"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raw types for team statistics aggregate endpoint
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Raw country from statistics API
|
|
6
|
+
*/
|
|
7
|
+
export interface RawStatsCountry {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
short_name: string | null;
|
|
11
|
+
three_letter_code: string | null;
|
|
12
|
+
entity_type: "country";
|
|
13
|
+
assets: unknown | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Raw statistic entry
|
|
17
|
+
*/
|
|
18
|
+
export interface RawStatisticEntry {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Raw team statistics data
|
|
25
|
+
*/
|
|
26
|
+
export interface RawTeamStatistics {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
short_name: string | null;
|
|
30
|
+
three_letter_code: string | null;
|
|
31
|
+
entity_type: "team";
|
|
32
|
+
gender: "MALE" | "FEMALE";
|
|
33
|
+
country: RawStatsCountry;
|
|
34
|
+
statistics: RawStatisticEntry[];
|
|
35
|
+
team_type: "CLUB" | "NATIONAL";
|
|
36
|
+
team_ids: string[];
|
|
37
|
+
assets: unknown | null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Raw response from /statistics/aggregate endpoint
|
|
41
|
+
*/
|
|
42
|
+
export interface RawTeamStatisticsResponse {
|
|
43
|
+
data: RawTeamStatistics[];
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=team-stats.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-stats.types.d.ts","sourceRoot":"","sources":["../../../../src/lib/api/sportal365-sports/statistics/team-stats.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,WAAW,EAAE,SAAS,CAAC;IACvB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1B,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,iBAAiB,EAAE,CAAC;CAC7B"}
|