@sudobility/sports_api_client 1.0.9 → 1.0.10
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/dist/baseball/hooks/baseball-context.js.map +1 -1
- package/dist/baseball/hooks/baseball-types.js.map +1 -1
- package/dist/baseball/hooks/index.js.map +1 -1
- package/dist/baseball/hooks/use-baseball-countries.js.map +1 -1
- package/dist/baseball/hooks/use-baseball-games.js.map +1 -1
- package/dist/baseball/hooks/use-baseball-leagues.js.map +1 -1
- package/dist/baseball/hooks/use-baseball-seasons.js.map +1 -1
- package/dist/baseball/hooks/use-baseball-standings.js.map +1 -1
- package/dist/baseball/hooks/use-baseball-teams.js.map +1 -1
- package/dist/baseball/hooks/use-baseball-timezone.js.map +1 -1
- package/dist/baseball/index.js.map +1 -1
- package/dist/baseball/network/api-baseball-client.js.map +1 -1
- package/dist/baseball/network/baseball-endpoints.js.map +1 -1
- package/dist/baseball/network/index.js.map +1 -1
- package/dist/baseball/store/api-baseball-store.js.map +1 -1
- package/dist/baseball/store/index.js.map +1 -1
- package/dist/baseball/types/baseball-common.js.map +1 -1
- package/dist/baseball/types/baseball-games.js.map +1 -1
- package/dist/baseball/types/baseball-leagues.js.map +1 -1
- package/dist/baseball/types/baseball-standings.js.map +1 -1
- package/dist/baseball/types/baseball-teams.js.map +1 -1
- package/dist/baseball/types/index.js.map +1 -1
- package/dist/basketball/hooks/basketball-context.js.map +1 -1
- package/dist/basketball/hooks/basketball-types.js.map +1 -1
- package/dist/basketball/hooks/index.js.map +1 -1
- package/dist/basketball/hooks/use-basketball-countries.js.map +1 -1
- package/dist/basketball/hooks/use-basketball-games.js.map +1 -1
- package/dist/basketball/hooks/use-basketball-leagues.js.map +1 -1
- package/dist/basketball/hooks/use-basketball-seasons.js.map +1 -1
- package/dist/basketball/hooks/use-basketball-standings.js.map +1 -1
- package/dist/basketball/hooks/use-basketball-teams.js.map +1 -1
- package/dist/basketball/hooks/use-basketball-timezone.js.map +1 -1
- package/dist/basketball/index.js.map +1 -1
- package/dist/basketball/network/api-basketball-client.js.map +1 -1
- package/dist/basketball/network/basketball-endpoints.js.map +1 -1
- package/dist/basketball/network/index.js.map +1 -1
- package/dist/basketball/store/api-basketball-store.js.map +1 -1
- package/dist/basketball/store/index.js.map +1 -1
- package/dist/basketball/types/basketball-common.js.map +1 -1
- package/dist/basketball/types/basketball-games.js.map +1 -1
- package/dist/basketball/types/basketball-leagues.js.map +1 -1
- package/dist/basketball/types/basketball-standings.js.map +1 -1
- package/dist/basketball/types/basketball-teams.js.map +1 -1
- package/dist/basketball/types/index.js.map +1 -1
- package/dist/common/base-types.js.map +1 -1
- package/dist/common/index.js.map +1 -1
- package/dist/football/hooks/football-context.js.map +1 -1
- package/dist/football/hooks/football-types.js.map +1 -1
- package/dist/football/hooks/index.js.map +1 -1
- package/dist/football/hooks/use-football-coaches.js.map +1 -1
- package/dist/football/hooks/use-football-countries.js.map +1 -1
- package/dist/football/hooks/use-football-fixtures.js.map +1 -1
- package/dist/football/hooks/use-football-injuries.js.map +1 -1
- package/dist/football/hooks/use-football-leagues.js.map +1 -1
- package/dist/football/hooks/use-football-players.js.map +1 -1
- package/dist/football/hooks/use-football-seasons.js.map +1 -1
- package/dist/football/hooks/use-football-sidelined.js.map +1 -1
- package/dist/football/hooks/use-football-standings.js.map +1 -1
- package/dist/football/hooks/use-football-teams.js.map +1 -1
- package/dist/football/hooks/use-football-timezone.js.map +1 -1
- package/dist/football/hooks/use-football-transfers.js.map +1 -1
- package/dist/football/hooks/use-football-trophies.js.map +1 -1
- package/dist/football/network/api-football-client.js.map +1 -1
- package/dist/football/network/football-endpoints.js.map +1 -1
- package/dist/football/network/index.js.map +1 -1
- package/dist/football/store/api-football-store.js.map +1 -1
- package/dist/football/store/index.js.map +1 -1
- package/dist/football/types/football-common.js.map +1 -1
- package/dist/football/types/football-countries.js.map +1 -1
- package/dist/football/types/football-fixtures.js.map +1 -1
- package/dist/football/types/football-leagues.js.map +1 -1
- package/dist/football/types/football-players.js.map +1 -1
- package/dist/football/types/football-standings.js.map +1 -1
- package/dist/football/types/football-statistics.js.map +1 -1
- package/dist/football/types/football-teams.js.map +1 -1
- package/dist/football/types/football-transfers.js.map +1 -1
- package/dist/football/types/index.js.map +1 -1
- package/dist/formula1/hooks/f1-context.js.map +1 -1
- package/dist/formula1/hooks/f1-types.js.map +1 -1
- package/dist/formula1/hooks/index.js.map +1 -1
- package/dist/formula1/hooks/use-f1-circuits.js.map +1 -1
- package/dist/formula1/hooks/use-f1-competitions.js.map +1 -1
- package/dist/formula1/hooks/use-f1-drivers.js.map +1 -1
- package/dist/formula1/hooks/use-f1-pitstops.js.map +1 -1
- package/dist/formula1/hooks/use-f1-races.js.map +1 -1
- package/dist/formula1/hooks/use-f1-rankings.js.map +1 -1
- package/dist/formula1/hooks/use-f1-seasons.js.map +1 -1
- package/dist/formula1/hooks/use-f1-teams.js.map +1 -1
- package/dist/formula1/hooks/use-f1-timezone.js.map +1 -1
- package/dist/formula1/index.js.map +1 -1
- package/dist/formula1/network/api-f1-client.js.map +1 -1
- package/dist/formula1/network/f1-endpoints.js.map +1 -1
- package/dist/formula1/network/index.js.map +1 -1
- package/dist/formula1/store/api-f1-store.js.map +1 -1
- package/dist/formula1/store/index.js.map +1 -1
- package/dist/formula1/types/f1-circuits.js.map +1 -1
- package/dist/formula1/types/f1-common.js.map +1 -1
- package/dist/formula1/types/f1-competitions.js.map +1 -1
- package/dist/formula1/types/f1-drivers.js.map +1 -1
- package/dist/formula1/types/f1-pitstops.js.map +1 -1
- package/dist/formula1/types/f1-races.js.map +1 -1
- package/dist/formula1/types/f1-rankings.js.map +1 -1
- package/dist/formula1/types/f1-teams.js.map +1 -1
- package/dist/formula1/types/index.js.map +1 -1
- package/dist/handball/hooks/handball-context.js.map +1 -1
- package/dist/handball/hooks/handball-types.js.map +1 -1
- package/dist/handball/hooks/index.js.map +1 -1
- package/dist/handball/hooks/use-handball-countries.js.map +1 -1
- package/dist/handball/hooks/use-handball-games.js.map +1 -1
- package/dist/handball/hooks/use-handball-h2h.js.map +1 -1
- package/dist/handball/hooks/use-handball-leagues.js.map +1 -1
- package/dist/handball/hooks/use-handball-odds.js.map +1 -1
- package/dist/handball/hooks/use-handball-seasons.js.map +1 -1
- package/dist/handball/hooks/use-handball-standings.js.map +1 -1
- package/dist/handball/hooks/use-handball-teams.js.map +1 -1
- package/dist/handball/hooks/use-handball-timezone.js.map +1 -1
- package/dist/handball/index.js.map +1 -1
- package/dist/handball/network/api-handball-client.js.map +1 -1
- package/dist/handball/network/handball-endpoints.js.map +1 -1
- package/dist/handball/network/index.js.map +1 -1
- package/dist/handball/store/api-handball-store.js.map +1 -1
- package/dist/handball/store/index.js.map +1 -1
- package/dist/handball/types/handball-common.js.map +1 -1
- package/dist/handball/types/handball-games.js.map +1 -1
- package/dist/handball/types/handball-leagues.js.map +1 -1
- package/dist/handball/types/handball-odds.js.map +1 -1
- package/dist/handball/types/handball-standings.js.map +1 -1
- package/dist/handball/types/handball-teams.js.map +1 -1
- package/dist/handball/types/index.js.map +1 -1
- package/dist/hockey/hooks/hockey-context.js.map +1 -1
- package/dist/hockey/hooks/hockey-types.js.map +1 -1
- package/dist/hockey/hooks/index.js.map +1 -1
- package/dist/hockey/hooks/use-hockey-countries.js.map +1 -1
- package/dist/hockey/hooks/use-hockey-games.js.map +1 -1
- package/dist/hockey/hooks/use-hockey-leagues.js.map +1 -1
- package/dist/hockey/hooks/use-hockey-seasons.js.map +1 -1
- package/dist/hockey/hooks/use-hockey-standings.js.map +1 -1
- package/dist/hockey/hooks/use-hockey-teams.js.map +1 -1
- package/dist/hockey/hooks/use-hockey-timezone.js.map +1 -1
- package/dist/hockey/index.js.map +1 -1
- package/dist/hockey/network/api-hockey-client.js.map +1 -1
- package/dist/hockey/network/hockey-endpoints.js.map +1 -1
- package/dist/hockey/network/index.js.map +1 -1
- package/dist/hockey/store/api-hockey-store.js.map +1 -1
- package/dist/hockey/store/index.js.map +1 -1
- package/dist/hockey/types/hockey-common.js.map +1 -1
- package/dist/hockey/types/hockey-games.js.map +1 -1
- package/dist/hockey/types/hockey-leagues.js.map +1 -1
- package/dist/hockey/types/hockey-standings.js.map +1 -1
- package/dist/hockey/types/hockey-teams.js.map +1 -1
- package/dist/hockey/types/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mma/hooks/index.js.map +1 -1
- package/dist/mma/hooks/mma-context.js.map +1 -1
- package/dist/mma/hooks/mma-types.js.map +1 -1
- package/dist/mma/hooks/use-mma-categories.js.map +1 -1
- package/dist/mma/hooks/use-mma-countries.js.map +1 -1
- package/dist/mma/hooks/use-mma-fighters.js.map +1 -1
- package/dist/mma/hooks/use-mma-fights.js.map +1 -1
- package/dist/mma/hooks/use-mma-seasons.js.map +1 -1
- package/dist/mma/hooks/use-mma-timezone.js.map +1 -1
- package/dist/mma/index.js.map +1 -1
- package/dist/mma/network/api-mma-client.js.map +1 -1
- package/dist/mma/network/index.js.map +1 -1
- package/dist/mma/network/mma-endpoints.js.map +1 -1
- package/dist/mma/store/api-mma-store.js.map +1 -1
- package/dist/mma/store/index.js.map +1 -1
- package/dist/mma/types/index.js.map +1 -1
- package/dist/mma/types/mma-categories.js.map +1 -1
- package/dist/mma/types/mma-common.js.map +1 -1
- package/dist/mma/types/mma-fighters.js.map +1 -1
- package/dist/mma/types/mma-fights.js.map +1 -1
- package/dist/mma/types/mma-leagues.js.map +1 -1
- package/dist/nfl/hooks/index.js.map +1 -1
- package/dist/nfl/hooks/nfl-context.js.map +1 -1
- package/dist/nfl/hooks/nfl-types.js.map +1 -1
- package/dist/nfl/hooks/use-nfl-countries.js.map +1 -1
- package/dist/nfl/hooks/use-nfl-games.js.map +1 -1
- package/dist/nfl/hooks/use-nfl-leagues.js.map +1 -1
- package/dist/nfl/hooks/use-nfl-seasons.js.map +1 -1
- package/dist/nfl/hooks/use-nfl-standings.js.map +1 -1
- package/dist/nfl/hooks/use-nfl-teams.js.map +1 -1
- package/dist/nfl/hooks/use-nfl-timezone.js.map +1 -1
- package/dist/nfl/index.js.map +1 -1
- package/dist/nfl/network/api-nfl-client.js.map +1 -1
- package/dist/nfl/network/index.js.map +1 -1
- package/dist/nfl/network/nfl-endpoints.js.map +1 -1
- package/dist/nfl/store/api-nfl-store.js.map +1 -1
- package/dist/nfl/store/index.js.map +1 -1
- package/dist/nfl/types/index.js.map +1 -1
- package/dist/nfl/types/nfl-common.js.map +1 -1
- package/dist/nfl/types/nfl-games.js.map +1 -1
- package/dist/nfl/types/nfl-leagues.js.map +1 -1
- package/dist/nfl/types/nfl-standings.js.map +1 -1
- package/dist/nfl/types/nfl-teams.js.map +1 -1
- package/dist/rugby/hooks/index.js.map +1 -1
- package/dist/rugby/hooks/rugby-context.js.map +1 -1
- package/dist/rugby/hooks/rugby-types.js.map +1 -1
- package/dist/rugby/hooks/use-rugby-countries.js.map +1 -1
- package/dist/rugby/hooks/use-rugby-games.js.map +1 -1
- package/dist/rugby/hooks/use-rugby-leagues.js.map +1 -1
- package/dist/rugby/hooks/use-rugby-seasons.js.map +1 -1
- package/dist/rugby/hooks/use-rugby-standings.js.map +1 -1
- package/dist/rugby/hooks/use-rugby-teams.js.map +1 -1
- package/dist/rugby/hooks/use-rugby-timezone.js.map +1 -1
- package/dist/rugby/index.js.map +1 -1
- package/dist/rugby/network/api-rugby-client.js.map +1 -1
- package/dist/rugby/network/index.js.map +1 -1
- package/dist/rugby/network/rugby-endpoints.js.map +1 -1
- package/dist/rugby/store/api-rugby-store.js.map +1 -1
- package/dist/rugby/store/index.js.map +1 -1
- package/dist/rugby/types/index.js.map +1 -1
- package/dist/rugby/types/rugby-common.js.map +1 -1
- package/dist/rugby/types/rugby-games.js.map +1 -1
- package/dist/rugby/types/rugby-leagues.js.map +1 -1
- package/dist/rugby/types/rugby-standings.js.map +1 -1
- package/dist/rugby/types/rugby-teams.js.map +1 -1
- package/dist/utils/cache-utils.js.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/query-params.js.map +1 -1
- package/dist/volleyball/hooks/index.js.map +1 -1
- package/dist/volleyball/hooks/use-volleyball-countries.js.map +1 -1
- package/dist/volleyball/hooks/use-volleyball-games.js.map +1 -1
- package/dist/volleyball/hooks/use-volleyball-h2h.js.map +1 -1
- package/dist/volleyball/hooks/use-volleyball-leagues.js.map +1 -1
- package/dist/volleyball/hooks/use-volleyball-seasons.js.map +1 -1
- package/dist/volleyball/hooks/use-volleyball-standings.js.map +1 -1
- package/dist/volleyball/hooks/use-volleyball-teams.js.map +1 -1
- package/dist/volleyball/hooks/use-volleyball-timezone.js.map +1 -1
- package/dist/volleyball/hooks/volleyball-context.js.map +1 -1
- package/dist/volleyball/hooks/volleyball-types.js.map +1 -1
- package/dist/volleyball/index.js.map +1 -1
- package/dist/volleyball/network/api-volleyball-client.js.map +1 -1
- package/dist/volleyball/network/index.js.map +1 -1
- package/dist/volleyball/network/volleyball-endpoints.js.map +1 -1
- package/dist/volleyball/store/api-volleyball-store.js.map +1 -1
- package/dist/volleyball/store/index.js.map +1 -1
- package/dist/volleyball/types/index.js.map +1 -1
- package/dist/volleyball/types/volleyball-common.js.map +1 -1
- package/dist/volleyball/types/volleyball-games.js.map +1 -1
- package/dist/volleyball/types/volleyball-leagues.js.map +1 -1
- package/dist/volleyball/types/volleyball-standings.js.map +1 -1
- package/dist/volleyball/types/volleyball-teams.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-football-client.js","sourceRoot":"","sources":["../../../src/football/network/api-football-client.ts"],"names":[],"mappings":"AAqEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AA0B9B,MAAM,OAAO,iBAAiB;IAW5B,YAAY,aAA4B,EAAE,MAAyB;QACjE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IA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CAAC,OAAO,CAAgB,GAAG,kBAAkB,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC,CAAC;IAC7E,CAAC;IASD,KAAK,CAAC,WAAW,CACf,MAA8B;QAE9B,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,OAAO,CACjB,GAAG,kBAAkB,CAAC,QAAQ,GAAG,KAAK,EAAE,CACzC,CAAC;IACJ,CAAC;CACF;AAgBD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,aAA4B,EAC5B,MAAyB,EACN,EAAE;IACrB,OAAO,IAAI,iBAAiB,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"api-football-client.js","sourceRoot":"","sources":["../../../src/football/network/api-football-client.ts"],"names":[],"mappings":"AAqEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AA0B9B,MAAM,OAAO,iBAAiB;IAW5B,YAAY,aAA4B,EAAE,MAAyB;QACjE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,qBAAqB,CAAC;QAGvD,IAAI,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;YAC9C,IAAI,CAAC,OAAO,GAAG;gBACb,GAAG,wBAAwB;gBAC3B,iBAAiB,EAAE,MAAM,CAAC,YAAY,IAAI,sBAAsB;gBAChE,gBAAgB,EAAE,MAAM,CAAC,MAAM;aAChC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,GAAG;gBACb,GAAG,wBAAwB;gBAC3B,iBAAiB,EAAE,MAAM,CAAC,MAAM;aACjC,CAAC;QACJ,CAAC;IACH,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AC;AACtD,CAAC,CAAC","sourcesContent":["/**\n * @module api-football-client\n * @description API-Football v3 Client Library\n *\n * A TypeScript client for the API-Football v3 API that provides type-safe\n * access to football data including leagues, teams, fixtures, players, and more.\n *\n * Uses dependency injection for network requests, making it compatible with\n * both React (web) and React Native applications.\n *\n * @example\n * ```typescript\n * import { ApiFootballClient } from \"@sudobility/sports_api_client\";\n *\n * const client = new ApiFootballClient(networkClient, {\n * apiKey: \"YOUR_API_KEY\",\n * });\n *\n * const leagues = await client.getLeagues({ country: \"England\" });\n * ```\n */\n\nimport type { NetworkClient } from \"@sudobility/types\";\nimport type {\n ApiFootballConfig,\n ApiFootballResponse,\n FootballCoach,\n FootballCoachsParams,\n FootballCountriesParams,\n FootballCountry,\n FootballFixtureEvent,\n FootballFixtureEventsParams,\n FootballFixtureLineup,\n FootballFixtureLineupsParams,\n FootballFixturePlayersParams,\n FootballFixturePlayerStats,\n FootballFixtureResponse,\n FootballFixturesParams,\n FootballFixtureStatistics,\n FootballFixtureStatisticsParams,\n FootballHeadToHeadParams,\n FootballInjuriesParams,\n FootballInjury,\n FootballLeagueResponse,\n FootballLeaguesParams,\n FootballPlayerResponse,\n FootballPlayersParams,\n FootballPlayersSeasonParams,\n FootballSidelined,\n FootballSidelinedParams,\n FootballSquadResponse,\n FootballSquadsParams,\n FootballStandingsParams,\n FootballStandingsResponse,\n FootballTeamResponse,\n FootballTeamsParams,\n FootballTeamStatistics,\n FootballTeamStatisticsParams,\n FootballTimezone,\n FootballTopAssistsParams,\n FootballTopCardsParams,\n FootballTopScorersParams,\n FootballTransferResponse,\n FootballTransfersParams,\n FootballTrophiesParams,\n FootballTrophy,\n FootballVenue,\n FootballVenuesParams,\n} from \"../types\";\nimport { buildQueryString } from \"../../utils/query-params\";\nimport {\n FOOTBALL_API_BASE_URL,\n FOOTBALL_DEFAULT_HEADERS,\n FOOTBALL_ENDPOINTS,\n FOOTBALL_RAPIDAPI_HOST,\n} from \"./football-endpoints\";\n\n/**\n * API-Football Client class\n *\n * Provides type-safe methods for all API-Football v3 endpoints.\n * Uses NetworkClient from @sudobility/di for network requests, enabling\n * cross-platform compatibility between React and React Native.\n *\n * @class ApiFootballClient\n *\n * @example\n * ```typescript\n * // Direct API authentication\n * const client = new ApiFootballClient(networkClient, {\n * apiKey: \"YOUR_API_KEY\",\n * });\n *\n * // RapidAPI authentication\n * const rapidClient = new ApiFootballClient(networkClient, {\n * apiKey: \"YOUR_RAPIDAPI_KEY\",\n * useRapidApi: true,\n * rapidApiHost: \"api-football-v1.p.rapidapi.com\",\n * });\n * ```\n */\nexport class ApiFootballClient {\n private baseUrl: string;\n private networkClient: NetworkClient;\n private headers: Record<string, string>;\n\n /**\n * Create a new ApiFootballClient instance\n *\n * @param networkClient - NetworkClient instance for making HTTP requests\n * @param config - API configuration including API key\n */\n constructor(networkClient: NetworkClient, config: ApiFootballConfig) {\n this.networkClient = networkClient;\n this.baseUrl = config.baseUrl || FOOTBALL_API_BASE_URL;\n\n // Set up authentication headers\n if (config.useRapidApi && config.rapidApiHost) {\n this.headers = {\n ...FOOTBALL_DEFAULT_HEADERS,\n \"x-rapidapi-host\": config.rapidApiHost || FOOTBALL_RAPIDAPI_HOST,\n \"x-rapidapi-key\": config.apiKey,\n };\n } else {\n this.headers = {\n ...FOOTBALL_DEFAULT_HEADERS,\n \"x-apisports-key\": config.apiKey,\n };\n }\n }\n\n /**\n * Make a GET request to the API\n */\n private async request<T>(endpoint: string): Promise<ApiFootballResponse<T>> {\n const url = `${this.baseUrl}${endpoint}`;\n\n const response = await this.networkClient.get<ApiFootballResponse<T>>(url, {\n headers: this.headers,\n });\n\n if (response.data === undefined || response.data === null) {\n throw new Error(\"No data received from API-Football\");\n }\n\n // Check for API errors\n const data = response.data as ApiFootballResponse<T>;\n if (data.errors && Object.keys(data.errors).length > 0) {\n const errorMsg = Array.isArray(data.errors)\n ? data.errors.join(\", \")\n : Object.values(data.errors).join(\", \");\n throw new Error(`API-Football error: ${errorMsg}`);\n }\n\n return data;\n }\n\n // ============================================================================\n // General Endpoints\n // ============================================================================\n\n /**\n * Get all available timezones supported by the API\n *\n * @returns Promise resolving to array of timezone strings (e.g., \"Europe/London\")\n * @throws Error if API returns an error or no data\n *\n * @example\n * ```typescript\n * const timezones = await client.getTimezone();\n * console.log(timezones.response); // [\"Europe/London\", \"America/New_York\", ...]\n * ```\n */\n async getTimezone(): Promise<ApiFootballResponse<FootballTimezone>> {\n return this.request<FootballTimezone>(FOOTBALL_ENDPOINTS.TIMEZONE);\n }\n\n /**\n * Get all available countries or filter by name/code\n *\n * @param params - Optional filter parameters\n * @param params.name - Filter by country name\n * @param params.code - Filter by ISO 3166-1 alpha-2 code\n * @param params.search - Search by partial name (min 3 characters)\n * @returns Promise resolving to array of Country objects\n * @throws Error if API returns an error or no data\n *\n * @example\n * ```typescript\n * // Get all countries\n * const allCountries = await client.getCountries();\n *\n * // Search for countries\n * const results = await client.getCountries({ search: \"eng\" });\n * ```\n */\n async getCountries(\n params?: FootballCountriesParams,\n ): Promise<ApiFootballResponse<FootballCountry>> {\n const query = params ? buildQueryString(params) : \"\";\n return this.request<FootballCountry>(\n `${FOOTBALL_ENDPOINTS.COUNTRIES}${query}`,\n );\n }\n\n // ============================================================================\n // Leagues Endpoints\n // ============================================================================\n\n /**\n * Get all available seasons (years) in the API\n *\n * @returns Promise resolving to array of season years (e.g., [2020, 2021, 2022, 2023])\n * @throws Error if API returns an error or no data\n *\n * @example\n * ```typescript\n * const seasons = await client.getSeasons();\n * const currentSeason = Math.max(...seasons.response);\n * ```\n */\n async getSeasons(): Promise<ApiFootballResponse<number>> {\n return this.request<number>(FOOTBALL_ENDPOINTS.LEAGUES_SEASONS);\n }\n\n /**\n * Get leagues and cups with optional filtering\n *\n * @param params - Optional filter parameters\n * @param params.id - Filter by league ID\n * @param params.name - Filter by league name\n * @param params.country - Filter by country name\n * @param params.season - Filter by season year\n * @param params.team - Filter by team ID\n * @param params.type - Filter by type (\"league\" or \"cup\")\n * @param params.current - Get only current leagues\n * @param params.search - Search by partial name (min 3 characters)\n * @returns Promise resolving to array of LeagueResponse objects\n * @throws Error if API returns an error or no data\n *\n * @example\n * ```typescript\n * // Get Premier League\n * const pl = await client.getLeagues({ id: 39 });\n *\n * // Get all English leagues\n * const english = await client.getLeagues({ country: \"England\" });\n * ```\n */\n async getLeagues(\n params?: FootballLeaguesParams,\n ): Promise<ApiFootballResponse<FootballLeagueResponse>> {\n const query = params ? buildQueryString(params) : \"\";\n return this.request<FootballLeagueResponse>(\n `${FOOTBALL_ENDPOINTS.LEAGUES}${query}`,\n );\n }\n\n // ============================================================================\n // Teams Endpoints\n // ============================================================================\n\n /**\n * Get teams\n */\n async getTeams(\n params: FootballTeamsParams,\n ): Promise<ApiFootballResponse<FootballTeamResponse>> {\n const query = buildQueryString(params);\n return this.request<FootballTeamResponse>(\n `${FOOTBALL_ENDPOINTS.TEAMS}${query}`,\n );\n }\n\n /**\n * Get team statistics\n */\n async getTeamStatistics(\n params: FootballTeamStatisticsParams,\n ): Promise<ApiFootballResponse<FootballTeamStatistics>> {\n const query = buildQueryString(params);\n return this.request<FootballTeamStatistics>(\n `${FOOTBALL_ENDPOINTS.TEAMS_STATISTICS}${query}`,\n );\n }\n\n /**\n * Get venues/stadiums\n */\n async getVenues(\n params?: FootballVenuesParams,\n ): Promise<ApiFootballResponse<FootballVenue>> {\n const query = params ? buildQueryString(params) : \"\";\n return this.request<FootballVenue>(`${FOOTBALL_ENDPOINTS.VENUES}${query}`);\n }\n\n // ============================================================================\n // Standings Endpoints\n // ============================================================================\n\n /**\n * Get league standings/table for a season\n *\n * @param params - Required filter parameters\n * @param params.league - League ID (required)\n * @param params.season - Season year (required)\n * @param params.team - Filter by team ID\n * @returns Promise resolving to array of StandingsResponse objects\n * @throws Error if API returns an error or no data\n *\n * @example\n * ```typescript\n * // Get Premier League 2023 standings\n * const standings = await client.getStandings({ league: 39, season: 2023 });\n * const table = standings.response[0]?.league.standings[0];\n * ```\n */\n async getStandings(\n params: FootballStandingsParams,\n ): Promise<ApiFootballResponse<FootballStandingsResponse>> {\n const query = buildQueryString(params);\n return this.request<FootballStandingsResponse>(\n `${FOOTBALL_ENDPOINTS.STANDINGS}${query}`,\n );\n }\n\n // ============================================================================\n // Fixtures Endpoints\n // ============================================================================\n\n /**\n * Get fixtures (matches) with optional filtering\n *\n * @param params - Optional filter parameters\n * @param params.id - Filter by fixture ID\n * @param params.live - Get live fixtures (\"all\" or league IDs)\n * @param params.date - Filter by date (YYYY-MM-DD)\n * @param params.league - Filter by league ID\n * @param params.season - Filter by season year\n * @param params.team - Filter by team ID\n * @param params.last - Get last N fixtures\n * @param params.next - Get next N fixtures\n * @param params.from - Filter from date (YYYY-MM-DD)\n * @param params.to - Filter to date (YYYY-MM-DD)\n * @returns Promise resolving to array of FixtureResponse objects\n * @throws Error if API returns an error or no data\n *\n * @example\n * ```typescript\n * // Get live fixtures\n * const live = await client.getFixtures({ live: \"all\" });\n *\n * // Get fixtures for a date\n * const today = await client.getFixtures({ date: \"2024-01-15\" });\n *\n * // Get next 5 fixtures for a team\n * const next = await client.getFixtures({ team: 33, next: 5 });\n * ```\n */\n async getFixtures(\n params?: FootballFixturesParams,\n ): Promise<ApiFootballResponse<FootballFixtureResponse>> {\n const query = params ? buildQueryString(params) : \"\";\n return this.request<FootballFixtureResponse>(\n `${FOOTBALL_ENDPOINTS.FIXTURES}${query}`,\n );\n }\n\n /**\n * Get head to head fixtures between two teams\n */\n async getFixturesHeadToHead(\n params: FootballHeadToHeadParams,\n ): Promise<ApiFootballResponse<FootballFixtureResponse>> {\n const query = buildQueryString(params);\n return this.request<FootballFixtureResponse>(\n `${FOOTBALL_ENDPOINTS.FIXTURES_HEAD_TO_HEAD}${query}`,\n );\n }\n\n /**\n * Get fixture statistics\n */\n async getFixtureStatistics(\n params: FootballFixtureStatisticsParams,\n ): Promise<ApiFootballResponse<FootballFixtureStatistics>> {\n const query = buildQueryString(params);\n return this.request<FootballFixtureStatistics>(\n `${FOOTBALL_ENDPOINTS.FIXTURES_STATISTICS}${query}`,\n );\n }\n\n /**\n * Get fixture events (goals, cards, substitutions, VAR)\n */\n async getFixtureEvents(\n params: FootballFixtureEventsParams,\n ): Promise<ApiFootballResponse<FootballFixtureEvent>> {\n const query = buildQueryString(params);\n return this.request<FootballFixtureEvent>(\n `${FOOTBALL_ENDPOINTS.FIXTURES_EVENTS}${query}`,\n );\n }\n\n /**\n * Get fixture lineups\n */\n async getFixtureLineups(\n params: FootballFixtureLineupsParams,\n ): Promise<ApiFootballResponse<FootballFixtureLineup>> {\n const query = buildQueryString(params);\n return this.request<FootballFixtureLineup>(\n `${FOOTBALL_ENDPOINTS.FIXTURES_LINEUPS}${query}`,\n );\n }\n\n /**\n * Get player statistics for a fixture\n */\n async getFixturePlayers(\n params: FootballFixturePlayersParams,\n ): Promise<ApiFootballResponse<FootballFixturePlayerStats>> {\n const query = buildQueryString(params);\n return this.request<FootballFixturePlayerStats>(\n `${FOOTBALL_ENDPOINTS.FIXTURES_PLAYERS}${query}`,\n );\n }\n\n // ============================================================================\n // Players Endpoints\n // ============================================================================\n\n /**\n * Get players\n */\n async getPlayers(\n params: FootballPlayersParams,\n ): Promise<ApiFootballResponse<FootballPlayerResponse>> {\n const query = buildQueryString(params);\n return this.request<FootballPlayerResponse>(\n `${FOOTBALL_ENDPOINTS.PLAYERS}${query}`,\n );\n }\n\n /**\n * Get available player seasons\n */\n async getPlayersSeasons(\n params?: FootballPlayersSeasonParams,\n ): Promise<ApiFootballResponse<number>> {\n const query = params ? buildQueryString(params) : \"\";\n return this.request<number>(\n `${FOOTBALL_ENDPOINTS.PLAYERS_SEASONS}${query}`,\n );\n }\n\n /**\n * Get team squads or player's teams\n */\n async getSquads(\n params: FootballSquadsParams,\n ): Promise<ApiFootballResponse<FootballSquadResponse>> {\n const query = buildQueryString(params);\n return this.request<FootballSquadResponse>(\n `${FOOTBALL_ENDPOINTS.PLAYERS_SQUADS}${query}`,\n );\n }\n\n /**\n * Get top scorers for a league/season\n */\n async getTopScorers(\n params: FootballTopScorersParams,\n ): Promise<ApiFootballResponse<FootballPlayerResponse>> {\n const query = buildQueryString(params);\n return this.request<FootballPlayerResponse>(\n `${FOOTBALL_ENDPOINTS.PLAYERS_TOP_SCORERS}${query}`,\n );\n }\n\n /**\n * Get top assists for a league/season\n */\n async getTopAssists(\n params: FootballTopAssistsParams,\n ): Promise<ApiFootballResponse<FootballPlayerResponse>> {\n const query = buildQueryString(params);\n return this.request<FootballPlayerResponse>(\n `${FOOTBALL_ENDPOINTS.PLAYERS_TOP_ASSISTS}${query}`,\n );\n }\n\n /**\n * Get top cards (most carded players) for a league/season\n */\n async getTopCards(\n params: FootballTopCardsParams,\n ): Promise<ApiFootballResponse<FootballPlayerResponse>> {\n const query = buildQueryString(params);\n return this.request<FootballPlayerResponse>(\n `${FOOTBALL_ENDPOINTS.PLAYERS_TOP_CARDS}${query}`,\n );\n }\n\n // ============================================================================\n // Transfers Endpoints\n // ============================================================================\n\n /**\n * Get player transfers\n */\n async getTransfers(\n params: FootballTransfersParams,\n ): Promise<ApiFootballResponse<FootballTransferResponse>> {\n const query = buildQueryString(params);\n return this.request<FootballTransferResponse>(\n `${FOOTBALL_ENDPOINTS.TRANSFERS}${query}`,\n );\n }\n\n // ============================================================================\n // Trophies Endpoints\n // ============================================================================\n\n /**\n * Get trophies for a player or coach\n */\n async getTrophies(\n params: FootballTrophiesParams,\n ): Promise<ApiFootballResponse<FootballTrophy>> {\n const query = buildQueryString(params);\n return this.request<FootballTrophy>(\n `${FOOTBALL_ENDPOINTS.TROPHIES}${query}`,\n );\n }\n\n // ============================================================================\n // Sidelined Endpoints\n // ============================================================================\n\n /**\n * Get sidelined players (injured/suspended)\n */\n async getSidelined(\n params: FootballSidelinedParams,\n ): Promise<ApiFootballResponse<FootballSidelined>> {\n const query = buildQueryString(params);\n return this.request<FootballSidelined>(\n `${FOOTBALL_ENDPOINTS.SIDELINED}${query}`,\n );\n }\n\n // ============================================================================\n // Coachs Endpoints\n // ============================================================================\n\n /**\n * Get coach information\n */\n async getCoachs(\n params: FootballCoachsParams,\n ): Promise<ApiFootballResponse<FootballCoach>> {\n const query = buildQueryString(params);\n return this.request<FootballCoach>(`${FOOTBALL_ENDPOINTS.COACHS}${query}`);\n }\n\n // ============================================================================\n // Injuries Endpoints\n // ============================================================================\n\n /**\n * Get injuries\n */\n async getInjuries(\n params: FootballInjuriesParams,\n ): Promise<ApiFootballResponse<FootballInjury>> {\n const query = buildQueryString(params);\n return this.request<FootballInjury>(\n `${FOOTBALL_ENDPOINTS.INJURIES}${query}`,\n );\n }\n}\n\n/**\n * Factory function to create an ApiFootballClient instance\n *\n * @param networkClient - NetworkClient instance for making HTTP requests\n * @param config - API configuration including API key\n * @returns New ApiFootballClient instance\n *\n * @example\n * ```typescript\n * const client = createApiFootballClient(networkClient, {\n * apiKey: \"YOUR_API_KEY\",\n * });\n * ```\n */\nexport const createApiFootballClient = (\n networkClient: NetworkClient,\n config: ApiFootballConfig,\n): ApiFootballClient => {\n return new ApiFootballClient(networkClient, config);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"football-endpoints.js","sourceRoot":"","sources":["../../../src/football/network/football-endpoints.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,qBAAqB,GAAG,mCAAmC,CAAC;AAKzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,gCAAgC,CAAC;AAKvE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAEhC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,YAAY;IAGvB,OAAO,EAAE,UAAU;IACnB,eAAe,EAAE,kBAAkB;IAGnC,KAAK,EAAE,QAAQ;IACf,gBAAgB,EAAE,mBAAmB;IACrC,aAAa,EAAE,gBAAgB;IAC/B,eAAe,EAAE,kBAAkB;IAGnC,MAAM,EAAE,SAAS;IAGjB,SAAS,EAAE,YAAY;IAGvB,QAAQ,EAAE,WAAW;IACrB,eAAe,EAAE,kBAAkB;IACnC,qB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E,mBAAmB;IAGrC,OAAO,EAAE,UAAU;IACnB,eAAe,EAAE,kBAAkB;IACnC,cAAc,EAAE,iBAAiB;IACjC,mBAAmB,EAAE,qBAAqB;IAC1C,mBAAmB,EAAE,qBAAqB;IAC1C,iBAAiB,EAAE,mBAAmB;IAGtC,SAAS,EAAE,YAAY;IAGvB,QAAQ,EAAE,WAAW;IAGrB,SAAS,EAAE,YAAY;IAGvB,MAAM,EAAE,SAAS;IAGjB,QAAQ,EAAE,WAAW;CACb,CAAC;AAKX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,cAAc,EAAE,kBAAkB;IAClC,MAAM,EAAE,kBAAkB;CAC3B,CAAC","sourcesContent":["/**\n * API-Football v3 endpoint definitions\n */\n\n/**\n * Base URL for API-Football v3\n */\nexport const FOOTBALL_API_BASE_URL = \"https://v3.football.api-sports.io\";\n\n/**\n * RapidAPI host for API-Football\n */\nexport const FOOTBALL_RAPIDAPI_HOST = \"api-football-v1.p.rapidapi.com\";\n\n/**\n * All API-Football v3 endpoints\n */\nexport const FOOTBALL_ENDPOINTS = {\n // General\n TIMEZONE: \"/timezone\",\n COUNTRIES: \"/countries\",\n\n // Leagues\n LEAGUES: \"/leagues\",\n LEAGUES_SEASONS: \"/leagues/seasons\",\n\n // Teams\n TEAMS: \"/teams\",\n TEAMS_STATISTICS: \"/teams/statistics\",\n TEAMS_SEASONS: \"/teams/seasons\",\n TEAMS_COUNTRIES: \"/teams/countries\",\n\n // Venues\n VENUES: \"/venues\",\n\n // Standings\n STANDINGS: \"/standings\",\n\n // Fixtures\n FIXTURES: \"/fixtures\",\n FIXTURES_ROUNDS: \"/fixtures/rounds\",\n FIXTURES_HEAD_TO_HEAD: \"/fixtures/headtohead\",\n FIXTURES_STATISTICS: \"/fixtures/statistics\",\n FIXTURES_EVENTS: \"/fixtures/events\",\n FIXTURES_LINEUPS: \"/fixtures/lineups\",\n FIXTURES_PLAYERS: \"/fixtures/players\",\n\n // Players\n PLAYERS: \"/players\",\n PLAYERS_SEASONS: \"/players/seasons\",\n PLAYERS_SQUADS: \"/players/squads\",\n PLAYERS_TOP_SCORERS: \"/players/topscorers\",\n PLAYERS_TOP_ASSISTS: \"/players/topassists\",\n PLAYERS_TOP_CARDS: \"/players/topcards\",\n\n // Transfers\n TRANSFERS: \"/transfers\",\n\n // Trophies\n TROPHIES: \"/trophies\",\n\n // Sidelined\n SIDELINED: \"/sidelined\",\n\n // Coachs\n COACHS: \"/coachs\",\n\n // Injuries\n INJURIES: \"/injuries\",\n} as const;\n\n/**\n * Default headers for API-Football\n */\nexport const FOOTBALL_DEFAULT_HEADERS = {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/football/network/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/football/network/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC","sourcesContent":["/**\n * Network module exports\n */\n\nexport {\n ApiFootballClient,\n createApiFootballClient,\n} from \"./api-football-client\";\nexport {\n FOOTBALL_API_BASE_URL,\n FOOTBALL_RAPIDAPI_HOST,\n FOOTBALL_ENDPOINTS,\n FOOTBALL_DEFAULT_HEADERS,\n} from \"./football-endpoints\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-football-store.js","sourceRoot":"","sources":["../../../src/football/store/api-football-store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E,cAAc,CAAC,CAAC,CAAC;AAC/E,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"api-football-store.js","sourceRoot":"","sources":["../../../src/football/store/api-football-store.ts"],"names":[],"mappings":"AAoCA,OAAO,EAAE,MAAM,EAAgB,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAkB,MAAM,oBAAoB,CAAC;AAoB7D,OAAO,EAEL,YAAY,IAAI,eAAe,EAC/B,gBAAgB,EAChB,iBAAiB,GAElB,MAAM,yBAAyB,CAAC;AAyJjC,MAAM,gBAAgB,GAAmC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAEtE,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI,GAAG,EAAE;IAClB,KAAK,EAAE,IAAI,GAAG,EAAE;IAChB,cAAc,EAAE,IAAI,GAAG,EAAE;IACzB,MAAM,EAAE,IAAI,GAAG,EAAE;IACjB,QAAQ,EAAE,IAAI,GAAG,EAAE;IACnB,iBAAiB,EAAE,IAAI,GAAG,EAAE;IAC5B,aAAa,EAAE,IAAI,GAAG,EAAE;IACxB,cAAc,EAAE,IAAI,GAAG,EAAE;IACzB,cAAc,EAAE,IAAI,GAAG,EAAE;IACzB,SAAS,EAAE,IAAI,GAAG,EAAE;IACpB,OAAO,EAAE,IAAI,GAAG,EAAE;IAClB,MAAM,EAAE,IAAI,GAAG,EAAE;IACjB,SAAS,EAAE,IAAI,GAAG,EAAE;IACpB,OAAO,EAAE,IAAI,GAAG,EAAE;IAClB,QAAQ,EAAE,IAAI,GAAG,EAAE;IACnB,SAAS,EAAE,IAAI,GAAG,EAAE;IACpB,QAAQ,EAAE,iBAAiB;IAG3B,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CACrB,GAAG,CAAC,EAAE,SAAS,EAAE,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC;IAEzD,YAA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1B,QAAQ,EAAE,KAAK,CAAC,QAAQ;SACzB,CAAC;KACH,CAAC;IAEF,OAAO,MAAM,EAAoB,CAAC,OAAO,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC,CAAC;AAC/E,CAAC,CAAC","sourcesContent":["/**\n * @module api-football-store\n * @description Zustand store for API-Football data caching\n *\n * Provides local caching with timestamps for cache invalidation.\n * Supports persistence via zustand/middleware persist with custom\n * serialization for Map data structures.\n *\n * Features:\n * - Timestamp-based cache invalidation with configurable TTL\n * - Cross-platform storage via StorageAdapter interface\n * - Automatic Map serialization/deserialization for persistence\n * - Type-safe getters and setters for all cached data types\n *\n * @example\n * ```typescript\n * import {\n * createApiFootballStore,\n * generateCacheKey,\n * } from \"@sudobility/sports_api_client\";\n *\n * // Create store with custom storage (React Native)\n * import AsyncStorage from \"@react-native-async-storage/async-storage\";\n * const useStore = createApiFootballStore({\n * getItem: AsyncStorage.getItem,\n * setItem: AsyncStorage.setItem,\n * removeItem: AsyncStorage.removeItem,\n * });\n *\n * // Use the store\n * const store = useStore.getState();\n * const cacheKey = generateCacheKey(\"leagues\", { country: \"England\" });\n * const cached = store.getLeagues(cacheKey);\n * ```\n */\n\nimport { create, StateCreator } from \"zustand\";\nimport { persist, PersistOptions } from \"zustand/middleware\";\nimport type {\n FootballCoach,\n FootballCountry,\n FootballFixtureEvent,\n FootballFixtureLineup,\n FootballFixturePlayerStats,\n FootballFixtureResponse,\n FootballFixtureStatistics,\n FootballLeagueResponse,\n FootballPlayerResponse,\n FootballSidelined,\n FootballSquadResponse,\n FootballStandingsResponse,\n FootballTeamResponse,\n FootballTeamStatistics,\n FootballTransferResponse,\n FootballTrophy,\n FootballVenue,\n} from \"../types\";\nimport {\n CachedData,\n isCacheValid as checkCacheValid,\n createCacheEntry,\n DEFAULT_CACHE_TTL,\n StorageAdapter,\n} from \"../../utils/cache-utils\";\n\n/**\n * API Football Store State interface\n *\n * Defines the complete state shape for the API-Football cache store,\n * including all cached data types, setters, getters, and utilities.\n *\n * @interface ApiFootballState\n *\n * @example\n * ```typescript\n * const store = useApiFootballStore.getState();\n *\n * // Set cached data\n * store.setLeagues(\"england\", leaguesData);\n *\n * // Get cached data (returns null if expired)\n * const leagues = store.getLeagues(\"england\");\n *\n * // Check cache validity\n * const isValid = store.isCacheValid(timestamp);\n *\n * // Clear all cached data\n * store.clearCache();\n * ```\n */\nexport interface ApiFootballState {\n // ============================================================================\n // Cached Data\n // ============================================================================\n\n /** Cached countries */\n countries: CachedData<FootballCountry[]> | null;\n\n /** Cached timezones */\n timezones: CachedData<string[]> | null;\n\n /** Cached seasons */\n seasons: CachedData<number[]> | null;\n\n /** Cached leagues by key */\n leagues: Map<string, CachedData<FootballLeagueResponse[]>>;\n\n /** Cached teams by key */\n teams: Map<string, CachedData<FootballTeamResponse[]>>;\n\n /** Cached team statistics by key */\n teamStatistics: Map<string, CachedData<FootballTeamStatistics>>;\n\n /** Cached venues by key */\n venues: Map<string, CachedData<FootballVenue[]>>;\n\n /** Cached fixtures by key */\n fixtures: Map<string, CachedData<FootballFixtureResponse[]>>;\n\n /** Cached fixture statistics by key */\n fixtureStatistics: Map<string, CachedData<FootballFixtureStatistics[]>>;\n\n /** Cached fixture events by key */\n fixtureEvents: Map<string, CachedData<FootballFixtureEvent[]>>;\n\n /** Cached fixture lineups by key */\n fixtureLineups: Map<string, CachedData<FootballFixtureLineup[]>>;\n\n /** Cached fixture players by key */\n fixturePlayers: Map<string, CachedData<FootballFixturePlayerStats[]>>;\n\n /** Cached standings by key */\n standings: Map<string, CachedData<FootballStandingsResponse[]>>;\n\n /** Cached players by key */\n players: Map<string, CachedData<FootballPlayerResponse[]>>;\n\n /** Cached squads by key */\n squads: Map<string, CachedData<FootballSquadResponse[]>>;\n\n /** Cached transfers by key */\n transfers: Map<string, CachedData<FootballTransferResponse[]>>;\n\n /** Cached coaches by key */\n coaches: Map<string, CachedData<FootballCoach[]>>;\n\n /** Cached trophies by key */\n trophies: Map<string, CachedData<FootballTrophy[]>>;\n\n /** Cached sidelined by key */\n sidelined: Map<string, CachedData<FootballSidelined[]>>;\n\n // ============================================================================\n // Cache Settings\n // ============================================================================\n\n /** Global cache TTL in milliseconds */\n cacheTTL: number;\n\n // ============================================================================\n // Actions\n // ============================================================================\n\n // Setters for single-value caches\n setCountries: (data: FootballCountry[]) => void;\n setTimezones: (data: string[]) => void;\n setSeasons: (data: number[]) => void;\n\n // Setters for keyed caches\n setLeagues: (key: string, data: FootballLeagueResponse[]) => void;\n setTeams: (key: string, data: FootballTeamResponse[]) => void;\n setTeamStatistics: (key: string, data: FootballTeamStatistics) => void;\n setVenues: (key: string, data: FootballVenue[]) => void;\n setFixtures: (key: string, data: FootballFixtureResponse[]) => void;\n setFixtureStatistics: (\n key: string,\n data: FootballFixtureStatistics[],\n ) => void;\n setFixtureEvents: (key: string, data: FootballFixtureEvent[]) => void;\n setFixtureLineups: (key: string, data: FootballFixtureLineup[]) => void;\n setFixturePlayers: (key: string, data: FootballFixturePlayerStats[]) => void;\n setStandings: (key: string, data: FootballStandingsResponse[]) => void;\n setPlayers: (key: string, data: FootballPlayerResponse[]) => void;\n setSquads: (key: string, data: FootballSquadResponse[]) => void;\n setTransfers: (key: string, data: FootballTransferResponse[]) => void;\n setCoaches: (key: string, data: FootballCoach[]) => void;\n setTrophies: (key: string, data: FootballTrophy[]) => void;\n setSidelined: (key: string, data: FootballSidelined[]) => void;\n\n // Getters for keyed caches (returns null if not found or expired)\n getLeagues: (key: string) => FootballLeagueResponse[] | null;\n getTeams: (key: string) => FootballTeamResponse[] | null;\n getTeamStatistics: (key: string) => FootballTeamStatistics | null;\n getVenues: (key: string) => FootballVenue[] | null;\n getFixtures: (key: string) => FootballFixtureResponse[] | null;\n getFixtureStatistics: (key: string) => FootballFixtureStatistics[] | null;\n getFixtureEvents: (key: string) => FootballFixtureEvent[] | null;\n getFixtureLineups: (key: string) => FootballFixtureLineup[] | null;\n getFixturePlayers: (key: string) => FootballFixturePlayerStats[] | null;\n getStandings: (key: string) => FootballStandingsResponse[] | null;\n getPlayers: (key: string) => FootballPlayerResponse[] | null;\n getSquads: (key: string) => FootballSquadResponse[] | null;\n getTransfers: (key: string) => FootballTransferResponse[] | null;\n getCoaches: (key: string) => FootballCoach[] | null;\n getTrophies: (key: string) => FootballTrophy[] | null;\n getSidelined: (key: string) => FootballSidelined[] | null;\n\n // Cache utilities\n isCacheValid: (timestamp: number) => boolean;\n clearCache: () => void;\n setCacheTTL: (ttl: number) => void;\n}\n\n/**\n * Create the store state and actions\n */\nconst createStoreSlice: StateCreator<ApiFootballState> = (set, get) => ({\n // Initial state\n countries: null,\n timezones: null,\n seasons: null,\n leagues: new Map(),\n teams: new Map(),\n teamStatistics: new Map(),\n venues: new Map(),\n fixtures: new Map(),\n fixtureStatistics: new Map(),\n fixtureEvents: new Map(),\n fixtureLineups: new Map(),\n fixturePlayers: new Map(),\n standings: new Map(),\n players: new Map(),\n squads: new Map(),\n transfers: new Map(),\n coaches: new Map(),\n trophies: new Map(),\n sidelined: new Map(),\n cacheTTL: DEFAULT_CACHE_TTL,\n\n // Single-value setters\n setCountries: (data) =>\n set({ countries: createCacheEntry(\"countries\", data) }),\n\n setTimezones: (data) =>\n set({ timezones: createCacheEntry(\"timezones\", data) }),\n\n setSeasons: (data) => set({ seasons: createCacheEntry(\"seasons\", data) }),\n\n // Keyed setters\n setLeagues: (key, data) =>\n set((state) => {\n const newLeagues = new Map(state.leagues);\n newLeagues.set(key, createCacheEntry(key, data));\n return { leagues: newLeagues };\n }),\n\n setTeams: (key, data) =>\n set((state) => {\n const newTeams = new Map(state.teams);\n newTeams.set(key, createCacheEntry(key, data));\n return { teams: newTeams };\n }),\n\n setTeamStatistics: (key, data) =>\n set((state) => {\n const newStats = new Map(state.teamStatistics);\n newStats.set(key, createCacheEntry(key, data));\n return { teamStatistics: newStats };\n }),\n\n setVenues: (key, data) =>\n set((state) => {\n const newVenues = new Map(state.venues);\n newVenues.set(key, createCacheEntry(key, data));\n return { venues: newVenues };\n }),\n\n setFixtures: (key, data) =>\n set((state) => {\n const newFixtures = new Map(state.fixtures);\n newFixtures.set(key, createCacheEntry(key, data));\n return { fixtures: newFixtures };\n }),\n\n setFixtureStatistics: (key, data) =>\n set((state) => {\n const newStats = new Map(state.fixtureStatistics);\n newStats.set(key, createCacheEntry(key, data));\n return { fixtureStatistics: newStats };\n }),\n\n setFixtureEvents: (key, data) =>\n set((state) => {\n const newEvents = new Map(state.fixtureEvents);\n newEvents.set(key, createCacheEntry(key, data));\n return { fixtureEvents: newEvents };\n }),\n\n setFixtureLineups: (key, data) =>\n set((state) => {\n const newLineups = new Map(state.fixtureLineups);\n newLineups.set(key, createCacheEntry(key, data));\n return { fixtureLineups: newLineups };\n }),\n\n setFixturePlayers: (key, data) =>\n set((state) => {\n const newPlayers = new Map(state.fixturePlayers);\n newPlayers.set(key, createCacheEntry(key, data));\n return { fixturePlayers: newPlayers };\n }),\n\n setStandings: (key, data) =>\n set((state) => {\n const newStandings = new Map(state.standings);\n newStandings.set(key, createCacheEntry(key, data));\n return { standings: newStandings };\n }),\n\n setPlayers: (key, data) =>\n set((state) => {\n const newPlayers = new Map(state.players);\n newPlayers.set(key, createCacheEntry(key, data));\n return { players: newPlayers };\n }),\n\n setSquads: (key, data) =>\n set((state) => {\n const newSquads = new Map(state.squads);\n newSquads.set(key, createCacheEntry(key, data));\n return { squads: newSquads };\n }),\n\n setTransfers: (key, data) =>\n set((state) => {\n const newTransfers = new Map(state.transfers);\n newTransfers.set(key, createCacheEntry(key, data));\n return { transfers: newTransfers };\n }),\n\n setCoaches: (key, data) =>\n set((state) => {\n const newCoaches = new Map(state.coaches);\n newCoaches.set(key, createCacheEntry(key, data));\n return { coaches: newCoaches };\n }),\n\n setTrophies: (key, data) =>\n set((state) => {\n const newTrophies = new Map(state.trophies);\n newTrophies.set(key, createCacheEntry(key, data));\n return { trophies: newTrophies };\n }),\n\n setSidelined: (key, data) =>\n set((state) => {\n const newSidelined = new Map(state.sidelined);\n newSidelined.set(key, createCacheEntry(key, data));\n return { sidelined: newSidelined };\n }),\n\n // Keyed getters (return null if not found or expired)\n getLeagues: (key) => {\n const cached = get().leagues.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getTeams: (key) => {\n const cached = get().teams.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getTeamStatistics: (key) => {\n const cached = get().teamStatistics.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getVenues: (key) => {\n const cached = get().venues.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getFixtures: (key) => {\n const cached = get().fixtures.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getFixtureStatistics: (key) => {\n const cached = get().fixtureStatistics.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getFixtureEvents: (key) => {\n const cached = get().fixtureEvents.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getFixtureLineups: (key) => {\n const cached = get().fixtureLineups.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getFixturePlayers: (key) => {\n const cached = get().fixturePlayers.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getStandings: (key) => {\n const cached = get().standings.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getPlayers: (key) => {\n const cached = get().players.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getSquads: (key) => {\n const cached = get().squads.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getTransfers: (key) => {\n const cached = get().transfers.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getCoaches: (key) => {\n const cached = get().coaches.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getTrophies: (key) => {\n const cached = get().trophies.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n getSidelined: (key) => {\n const cached = get().sidelined.get(key);\n if (!cached || !get().isCacheValid(cached.timestamp)) return null;\n return cached.data;\n },\n\n // Cache utilities\n isCacheValid: (timestamp) => checkCacheValid(timestamp, get().cacheTTL),\n\n clearCache: () =>\n set({\n countries: null,\n timezones: null,\n seasons: null,\n leagues: new Map(),\n teams: new Map(),\n teamStatistics: new Map(),\n venues: new Map(),\n fixtures: new Map(),\n fixtureStatistics: new Map(),\n fixtureEvents: new Map(),\n fixtureLineups: new Map(),\n fixturePlayers: new Map(),\n standings: new Map(),\n players: new Map(),\n squads: new Map(),\n transfers: new Map(),\n coaches: new Map(),\n trophies: new Map(),\n sidelined: new Map(),\n }),\n\n setCacheTTL: (ttl) => set({ cacheTTL: ttl }),\n});\n\n/**\n * Persist options type\n */\ntype ApiFootballPersistOptions = PersistOptions<\n ApiFootballState,\n Partial<ApiFootballState>\n>;\n\n/**\n * Custom storage that handles Map serialization\n */\nconst createCustomStorage = (storage: StorageAdapter) => ({\n getItem: async (name: string) => {\n const value = await storage.getItem(name);\n if (!value) return null;\n\n try {\n const parsed = JSON.parse(value);\n\n // Restore Maps from arrays\n const mapFields = [\n \"leagues\",\n \"teams\",\n \"teamStatistics\",\n \"venues\",\n \"fixtures\",\n \"fixtureStatistics\",\n \"fixtureEvents\",\n \"fixtureLineups\",\n \"fixturePlayers\",\n \"standings\",\n \"players\",\n \"squads\",\n \"transfers\",\n \"coaches\",\n \"trophies\",\n \"sidelined\",\n ];\n\n for (const field of mapFields) {\n if (parsed.state && Array.isArray(parsed.state[field])) {\n parsed.state[field] = new Map(parsed.state[field]);\n }\n }\n\n return parsed;\n } catch {\n return null;\n }\n },\n setItem: async (name: string, value: unknown) => {\n const serialized = JSON.stringify(value, (_, val) => {\n // Convert Maps to arrays for JSON serialization\n if (val instanceof Map) {\n return Array.from(val.entries());\n }\n return val;\n });\n await storage.setItem(name, serialized);\n },\n removeItem: async (name: string) => {\n await storage.removeItem(name);\n },\n});\n\n/**\n * Create an API Football store with persistence\n *\n * Factory function that creates a new Zustand store instance with persistence.\n * The store automatically handles Map serialization for JSON storage.\n *\n * Requires a StorageAdapter for cross-platform compatibility. Use createStorageAdapter()\n * to convert a DI StorageService to the required format.\n *\n * @param storage - Storage adapter for persistence (required for React Native compatibility)\n * @returns Zustand store hook with API Football state\n *\n * @example\n * ```typescript\n * import { createApiFootballStore, createStorageAdapter } from \"@sudobility/sports_api_client\";\n * import type { StorageService } from \"@sudobility/di\";\n *\n * // Get storage service from your DI container\n * const storageService = container.get<StorageService>(ServiceKeys.STORAGE);\n *\n * // Create store with DI storage service\n * const useStore = createApiFootballStore(createStorageAdapter(storageService));\n *\n * // Usage in React component\n * function MyComponent() {\n * const leagues = useStore((state) => state.getLeagues(\"england\"));\n * const setLeagues = useStore((state) => state.setLeagues);\n * // ...\n * }\n * ```\n */\nexport const createApiFootballStore = (storage: StorageAdapter) => {\n const persistOptions: ApiFootballPersistOptions = {\n name: \"api-football-cache\",\n storage: createCustomStorage(storage),\n partialize: (state) => ({\n countries: state.countries,\n timezones: state.timezones,\n seasons: state.seasons,\n leagues: state.leagues,\n teams: state.teams,\n teamStatistics: state.teamStatistics,\n venues: state.venues,\n fixtures: state.fixtures,\n fixtureStatistics: state.fixtureStatistics,\n fixtureEvents: state.fixtureEvents,\n fixtureLineups: state.fixtureLineups,\n fixturePlayers: state.fixturePlayers,\n standings: state.standings,\n players: state.players,\n squads: state.squads,\n transfers: state.transfers,\n coaches: state.coaches,\n trophies: state.trophies,\n sidelined: state.sidelined,\n cacheTTL: state.cacheTTL,\n }),\n };\n\n return create<ApiFootballState>()(persist(createStoreSlice, persistOptions));\n};\n\n/** Type for the store hook returned by createApiFootballStore */\nexport type ApiFootballStore = ReturnType<typeof createApiFootballStore>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/football/store/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,GAGvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,oBAAoB,GAGrB,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/football/store/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,GAGvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,oBAAoB,GAGrB,MAAM,yBAAyB,CAAC","sourcesContent":["/**\n * Store module exports\n */\n\nexport {\n createApiFootballStore,\n type ApiFootballState,\n type ApiFootballStore,\n} from \"./api-football-store\";\n\nexport {\n DEFAULT_CACHE_TTL,\n createCacheEntry,\n isCacheValid,\n getRemainingTTL,\n generateCacheKey,\n createStorageAdapter,\n type CachedData,\n type StorageAdapter,\n} from \"../../utils/cache-utils\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"football-common.js","sourceRoot":"","sources":["../../../src/football/types/football-common.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"football-common.js","sourceRoot":"","sources":["../../../src/football/types/football-common.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Common types for API-Football responses\n */\n\nimport type { Optional } from \"@sudobility/types\";\nimport type {\n BaseApiConfig,\n BaseApiPaging,\n BaseApiResponse,\n} from \"../../common\";\n\n/**\n * Pagination information for API-Football\n *\n * Uses the base paging type - football doesn't need additional fields.\n */\nexport type ApiFootballPaging = BaseApiPaging;\n\n/**\n * Configuration for API-Football client\n *\n * Uses the base config type - football doesn't need additional fields.\n */\nexport type ApiFootballConfig = BaseApiConfig;\n\n/**\n * Base response wrapper for all API-Football endpoints\n *\n * Extends BaseApiResponse with football-specific paging field.\n */\nexport interface ApiFootballResponse<T> extends BaseApiResponse<T> {\n /** Pagination information */\n paging: ApiFootballPaging;\n}\n\n/**\n * Common image/logo type\n */\nexport interface FootballLogo {\n /** URL of the logo image */\n logo: string;\n}\n\n/**\n * Common birth information\n */\nexport interface FootballBirth {\n /** Date of birth (YYYY-MM-DD) */\n date: Optional<string>;\n /** Place of birth */\n place: Optional<string>;\n /** Country of birth */\n country: Optional<string>;\n}\n\n/**\n * Common paging parameters for list endpoints\n */\nexport interface FootballPagingParams {\n /** Page number (default: 1) */\n page?: Optional<number>;\n}\n\n/**\n * Rate limit information from response headers\n */\nexport interface FootballRateLimitInfo {\n /** Requests remaining in current period */\n requestsRemaining: number;\n /** Total requests limit */\n requestsLimit: number;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"football-countries.js","sourceRoot":"","sources":["../../../src/football/types/football-countries.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"football-countries.js","sourceRoot":"","sources":["../../../src/football/types/football-countries.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Types for Countries and Timezone endpoints\n */\n\nimport type { Optional } from \"@sudobility/types\";\n\n/**\n * Country information\n */\nexport interface FootballCountry {\n /** Country name */\n name: string;\n /** ISO 3166-1 alpha-2 country code */\n code: Optional<string>;\n /** URL to country flag image */\n flag: Optional<string>;\n}\n\n/**\n * Parameters for countries endpoint\n */\nexport interface FootballCountriesParams {\n /** Filter by country name */\n name?: Optional<string>;\n /** Filter by country code */\n code?: Optional<string>;\n /** Search by partial name (min 3 characters) */\n search?: Optional<string>;\n}\n\n/**\n * Timezone is returned as a simple string\n */\nexport type FootballTimezone = string;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"football-fixtures.js","sourceRoot":"","sources":["../../../src/football/types/football-fixtures.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"football-fixtures.js","sourceRoot":"","sources":["../../../src/football/types/football-fixtures.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Types for Fixtures endpoints\n */\n\nimport type { Optional } from \"@sudobility/types\";\n\n/**\n * Fixture information\n */\nexport interface FootballFixture {\n /** Fixture ID */\n id: number;\n /** Referee name */\n referee: Optional<string>;\n /** Timezone of the fixture */\n timezone: string;\n /** Date and time in ISO format */\n date: string;\n /** Unix timestamp */\n timestamp: number;\n /** Match periods */\n periods: FootballFixturePeriods;\n /** Venue information */\n venue: FootballFixtureVenue;\n /** Match status */\n status: FootballFixtureStatus;\n}\n\n/**\n * Fixture periods (kickoff times)\n */\nexport interface FootballFixturePeriods {\n /** First half start timestamp */\n first: Optional<number>;\n /** Second half start timestamp */\n second: Optional<number>;\n}\n\n/**\n * Simplified venue for fixture\n */\nexport interface FootballFixtureVenue {\n /** Venue ID */\n id: Optional<number>;\n /** Venue name */\n name: Optional<string>;\n /** City */\n city: Optional<string>;\n}\n\n/**\n * Fixture status\n */\nexport interface FootballFixtureStatus {\n /** Long status description */\n long: string;\n /** Short status code */\n short: FootballFixtureStatusCode;\n /** Elapsed minutes */\n elapsed: Optional<number>;\n}\n\n/**\n * Fixture status codes\n */\nexport type FootballFixtureStatusCode =\n | \"TBD\" // Time To Be Defined\n | \"NS\" // Not Started\n | \"1H\" // First Half\n | \"HT\" // Halftime\n | \"2H\" // Second Half\n | \"ET\" // Extra Time\n | \"P\" // Penalty In Progress\n | \"FT\" // Match Finished\n | \"AET\" // Match Finished After Extra Time\n | \"PEN\" // Match Finished After Penalty\n | \"BT\" // Break Time\n | \"SUSP\" // Match Suspended\n | \"INT\" // Match Interrupted\n | \"PST\" // Match Postponed\n | \"CANC\" // Match Cancelled\n | \"ABD\" // Match Abandoned\n | \"AWD\" // Technical Loss\n | \"WO\" // WalkOver\n | \"LIVE\"; // Live\n\n/**\n * League info in fixture context\n */\nexport interface FootballFixtureLeague {\n /** League ID */\n id: number;\n /** League name */\n name: string;\n /** Country */\n country: string;\n /** League logo URL */\n logo: string;\n /** Country flag URL */\n flag: Optional<string>;\n /** Season year */\n season: number;\n /** Round/matchday */\n round: string;\n}\n\n/**\n * Teams in a fixture\n */\nexport interface FootballFixtureTeams {\n /** Home team */\n home: FootballFixtureTeam;\n /** Away team */\n away: FootballFixtureTeam;\n}\n\n/**\n * Team in fixture context\n */\nexport interface FootballFixtureTeam {\n /** Team ID */\n id: number;\n /** Team name */\n name: string;\n /** Team logo URL */\n logo: string;\n /** Whether team won (null if draw or ongoing) */\n winner: Optional<boolean>;\n}\n\n/**\n * Goals in a fixture\n */\nexport interface FootballFixtureGoals {\n /** Home team goals */\n home: Optional<number>;\n /** Away team goals */\n away: Optional<number>;\n}\n\n/**\n * Score breakdown by period\n */\nexport interface FootballFixtureScore {\n /** Halftime score */\n halftime: FootballFixtureGoals;\n /** Fulltime score */\n fulltime: FootballFixtureGoals;\n /** Extra time score */\n extratime: FootballFixtureGoals;\n /** Penalty shootout score */\n penalty: FootballFixtureGoals;\n}\n\n/**\n * Complete fixture response\n */\nexport interface FootballFixtureResponse {\n /** Fixture information */\n fixture: FootballFixture;\n /** League information */\n league: FootballFixtureLeague;\n /** Teams */\n teams: FootballFixtureTeams;\n /** Goals */\n goals: FootballFixtureGoals;\n /** Score by period */\n score: FootballFixtureScore;\n}\n\n/**\n * Parameters for fixtures endpoint\n */\nexport interface FootballFixturesParams {\n /** Filter by fixture ID */\n id?: Optional<number>;\n /** Get live fixtures */\n live?: Optional<\"all\" | string>;\n /** Filter by date (YYYY-MM-DD) */\n date?: Optional<string>;\n /** Filter by league ID */\n league?: Optional<number>;\n /** Filter by season year */\n season?: Optional<number>;\n /** Filter by team ID */\n team?: Optional<number>;\n /** Get last N fixtures */\n last?: Optional<number>;\n /** Get next N fixtures */\n next?: Optional<number>;\n /** Filter from date */\n from?: Optional<string>;\n /** Filter to date */\n to?: Optional<string>;\n /** Filter by round */\n round?: Optional<string>;\n /** Filter by status */\n status?: Optional<string>;\n /** Filter by venue ID */\n venue?: Optional<number>;\n /** Filter by timezone */\n timezone?: Optional<string>;\n}\n\n/**\n * Parameters for head to head endpoint\n */\nexport interface FootballHeadToHeadParams {\n /** Head to head teams (format: \"team1-team2\") */\n h2h: string;\n /** Filter by date */\n date?: Optional<string>;\n /** Filter by league ID */\n league?: Optional<number>;\n /** Filter by season */\n season?: Optional<number>;\n /** Get last N matches */\n last?: Optional<number>;\n /** Get next N matches */\n next?: Optional<number>;\n /** Filter from date */\n from?: Optional<string>;\n /** Filter to date */\n to?: Optional<string>;\n /** Filter by status */\n status?: Optional<string>;\n /** Filter by venue */\n venue?: Optional<number>;\n /** Filter by timezone */\n timezone?: Optional<string>;\n}\n\n/**\n * Fixture event (goal, card, substitution, etc.)\n */\nexport interface FootballFixtureEvent {\n /** Time of the event */\n time: {\n elapsed: number;\n extra: Optional<number>;\n };\n /** Team that the event belongs to */\n team: {\n id: number;\n name: string;\n logo: string;\n };\n /** Primary player */\n player: {\n id: Optional<number>;\n name: Optional<string>;\n };\n /** Assist/Secondary player */\n assist: {\n id: Optional<number>;\n name: Optional<string>;\n };\n /** Event type */\n type: \"Goal\" | \"Card\" | \"subst\" | \"Var\";\n /** Event detail */\n detail: string;\n /** Comments */\n comments: Optional<string>;\n}\n\n/**\n * Parameters for fixture events endpoint\n */\nexport interface FootballFixtureEventsParams {\n /** Fixture ID (required) */\n fixture: number;\n /** Filter by team ID */\n team?: Optional<number>;\n /** Filter by player ID */\n player?: Optional<number>;\n /** Filter by event type */\n type?: Optional<\"goal\" | \"card\" | \"subst\" | \"var\">;\n}\n\n/**\n * Fixture lineup\n */\nexport interface FootballFixtureLineup {\n /** Team information */\n team: {\n id: number;\n name: string;\n logo: string;\n colors: Optional<FootballTeamColors>;\n };\n /** Formation */\n formation: Optional<string>;\n /** Starting XI */\n startXI: FootballLineupPlayer[];\n /** Substitutes */\n substitutes: FootballLineupPlayer[];\n /** Coach */\n coach: {\n id: Optional<number>;\n name: Optional<string>;\n photo: Optional<string>;\n };\n}\n\n/**\n * Team colors for lineup\n */\nexport interface FootballTeamColors {\n player: FootballColorSet;\n goalkeeper: FootballColorSet;\n}\n\n/**\n * Color set (primary, number, border)\n */\nexport interface FootballColorSet {\n primary: string;\n number: string;\n border: string;\n}\n\n/**\n * Player in lineup\n */\nexport interface FootballLineupPlayer {\n player: {\n id: number;\n name: string;\n number: number;\n pos: Optional<string>;\n grid: Optional<string>;\n };\n}\n\n/**\n * Parameters for fixture lineups endpoint\n */\nexport interface FootballFixtureLineupsParams {\n /** Fixture ID (required) */\n fixture: number;\n /** Filter by team ID */\n team?: Optional<number>;\n /** Filter by player ID */\n player?: Optional<number>;\n /** Filter by type */\n type?: Optional<string>;\n}\n\n/**\n * Fixture statistics\n */\nexport interface FootballFixtureStatistics {\n /** Team information */\n team: {\n id: number;\n name: string;\n logo: string;\n };\n /** Statistics array */\n statistics: FootballStatisticItem[];\n}\n\n/**\n * Single statistic item\n */\nexport interface FootballStatisticItem {\n /** Statistic type */\n type: string;\n /** Statistic value */\n value: Optional<number | string>;\n}\n\n/**\n * Parameters for fixture statistics endpoint\n */\nexport interface FootballFixtureStatisticsParams {\n /** Fixture ID (required) */\n fixture: number;\n /** Filter by team ID */\n team?: Optional<number>;\n /** Filter by statistic type */\n type?: Optional<string>;\n}\n\n/**\n * Player statistics in a fixture\n */\nexport interface FootballFixturePlayerStats {\n /** Team information */\n team: {\n id: number;\n name: string;\n logo: string;\n update: string;\n };\n /** Players with their statistics */\n players: FootballPlayerFixtureStats[];\n}\n\n/**\n * Individual player's fixture statistics\n */\nexport interface FootballPlayerFixtureStats {\n /** Player information */\n player: {\n id: number;\n name: string;\n photo: string;\n };\n /** Statistics array (different for each position) */\n statistics: FootballPlayerStatDetail[];\n}\n\n/**\n * Player statistic detail\n */\nexport interface FootballPlayerStatDetail {\n games: {\n minutes: Optional<number>;\n number: number;\n position: string;\n rating: Optional<string>;\n captain: boolean;\n substitute: boolean;\n };\n offsides: Optional<number>;\n shots: {\n total: Optional<number>;\n on: Optional<number>;\n };\n goals: {\n total: Optional<number>;\n conceded: Optional<number>;\n assists: Optional<number>;\n saves: Optional<number>;\n };\n passes: {\n total: Optional<number>;\n key: Optional<number>;\n accuracy: Optional<string>;\n };\n tackles: {\n total: Optional<number>;\n blocks: Optional<number>;\n interceptions: Optional<number>;\n };\n duels: {\n total: Optional<number>;\n won: Optional<number>;\n };\n dribbles: {\n attempts: Optional<number>;\n success: Optional<number>;\n past: Optional<number>;\n };\n fouls: {\n drawn: Optional<number>;\n committed: Optional<number>;\n };\n cards: {\n yellow: number;\n red: number;\n };\n penalty: {\n won: Optional<number>;\n commited: Optional<number>;\n scored: Optional<number>;\n missed: Optional<number>;\n saved: Optional<number>;\n };\n}\n\n/**\n * Parameters for fixture players endpoint\n */\nexport interface FootballFixturePlayersParams {\n /** Fixture ID (required) */\n fixture: number;\n /** Filter by team ID */\n team?: Optional<number>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"football-leagues.js","sourceRoot":"","sources":["../../../src/football/types/football-leagues.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"football-leagues.js","sourceRoot":"","sources":["../../../src/football/types/football-leagues.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Types for Leagues and Seasons endpoints\n */\n\nimport type { Optional } from \"@sudobility/types\";\nimport type { FootballCountry } from \"./football-countries\";\n\n/**\n * League information\n */\nexport interface FootballLeague {\n /** League ID */\n id: number;\n /** League name */\n name: string;\n /** Type of competition */\n type: \"League\" | \"Cup\";\n /** URL to league logo */\n logo: string;\n}\n\n/**\n * Season information within a league\n */\nexport interface FootballSeason {\n /** Season year (e.g., 2023) */\n year: number;\n /** Season start date (YYYY-MM-DD) */\n start: string;\n /** Season end date (YYYY-MM-DD) */\n end: string;\n /** Whether this is the current season */\n current: boolean;\n /** Coverage information for this season */\n coverage: FootballSeasonCoverage;\n}\n\n/**\n * Coverage information for a season\n */\nexport interface FootballSeasonCoverage {\n /** Fixtures coverage */\n fixtures: FootballFixturesCoverage;\n /** Whether standings are available */\n standings: boolean;\n /** Whether players data is available */\n players: boolean;\n /** Whether top scorers are available */\n top_scorers: boolean;\n /** Whether top assists are available */\n top_assists: boolean;\n /** Whether top cards are available */\n top_cards: boolean;\n /** Whether injuries data is available */\n injuries: boolean;\n /** Whether predictions are available */\n predictions: boolean;\n /** Whether odds are available */\n odds: boolean;\n}\n\n/**\n * Fixtures coverage details\n */\nexport interface FootballFixturesCoverage {\n /** Whether events are available */\n events: boolean;\n /** Whether lineups are available */\n lineups: boolean;\n /** Whether statistics by fixture are available */\n statistics_fixtures: boolean;\n /** Whether statistics by players are available */\n statistics_players: boolean;\n}\n\n/**\n * Complete league response including country and seasons\n */\nexport interface FootballLeagueResponse {\n /** League information */\n league: FootballLeague;\n /** Country information */\n country: FootballCountry;\n /** Available seasons */\n seasons: FootballSeason[];\n}\n\n/**\n * Parameters for leagues endpoint\n */\nexport interface FootballLeaguesParams {\n /** Filter by league ID */\n id?: Optional<number>;\n /** Filter by league name */\n name?: Optional<string>;\n /**\n * Filter by country name (NOT country code).\n * Use full country name like \"Japan\", not \"JP\".\n * Get valid names from the /countries endpoint.\n */\n country?: Optional<string>;\n /** Filter by 2-letter country code (e.g., \"JP\", \"US\") */\n code?: Optional<string>;\n /** Filter by season year (free tier: 2021-2023 only) */\n season?: Optional<number>;\n /** Filter by team ID */\n team?: Optional<number>;\n /** Filter by league type */\n type?: Optional<\"league\" | \"cup\">;\n /** Get current leagues only */\n current?: Optional<boolean>;\n /** Search by partial name (min 3 characters) */\n search?: Optional<string>;\n /** Return last N seasons */\n last?: Optional<number>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"football-players.js","sourceRoot":"","sources":["../../../src/football/types/football-players.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"football-players.js","sourceRoot":"","sources":["../../../src/football/types/football-players.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Types for Players endpoints\n */\n\nimport type { Optional } from \"@sudobility/types\";\nimport type { FootballBirth } from \"./football-common\";\n\n/**\n * Player information\n */\nexport interface FootballPlayer {\n /** Player ID */\n id: number;\n /** Full name */\n name: string;\n /** First name */\n firstname: string;\n /** Last name */\n lastname: string;\n /** Age */\n age: number;\n /** Birth information */\n birth: FootballBirth;\n /** Nationality */\n nationality: string;\n /** Height (e.g., \"180 cm\") */\n height: Optional<string>;\n /** Weight (e.g., \"75 kg\") */\n weight: Optional<string>;\n /** Whether player is injured */\n injured: boolean;\n /** Photo URL */\n photo: string;\n}\n\n/**\n * Player statistics for a season\n */\nexport interface FootballPlayerStatistics {\n /** Team information */\n team: {\n id: number;\n name: string;\n logo: string;\n };\n /** League information */\n league: {\n id: number;\n name: string;\n country: string;\n logo: string;\n flag: Optional<string>;\n season: number;\n };\n /** Games statistics */\n games: {\n appearences: Optional<number>;\n lineups: Optional<number>;\n minutes: Optional<number>;\n number: Optional<number>;\n position: string;\n rating: Optional<string>;\n captain: boolean;\n };\n /** Substitutes statistics */\n substitutes: {\n in: Optional<number>;\n out: Optional<number>;\n bench: Optional<number>;\n };\n /** Shots statistics */\n shots: {\n total: Optional<number>;\n on: Optional<number>;\n };\n /** Goals statistics */\n goals: {\n total: Optional<number>;\n conceded: Optional<number>;\n assists: Optional<number>;\n saves: Optional<number>;\n };\n /** Passes statistics */\n passes: {\n total: Optional<number>;\n key: Optional<number>;\n accuracy: Optional<number>;\n };\n /** Tackles statistics */\n tackles: {\n total: Optional<number>;\n blocks: Optional<number>;\n interceptions: Optional<number>;\n };\n /** Duels statistics */\n duels: {\n total: Optional<number>;\n won: Optional<number>;\n };\n /** Dribbles statistics */\n dribbles: {\n attempts: Optional<number>;\n success: Optional<number>;\n past: Optional<number>;\n };\n /** Fouls statistics */\n fouls: {\n drawn: Optional<number>;\n committed: Optional<number>;\n };\n /** Cards statistics */\n cards: {\n yellow: Optional<number>;\n yellowred: Optional<number>;\n red: Optional<number>;\n };\n /** Penalty statistics */\n penalty: {\n won: Optional<number>;\n commited: Optional<number>;\n scored: Optional<number>;\n missed: Optional<number>;\n saved: Optional<number>;\n };\n}\n\n/**\n * Complete player response with statistics\n */\nexport interface FootballPlayerResponse {\n /** Player information */\n player: FootballPlayer;\n /** Statistics by team/league/season */\n statistics: FootballPlayerStatistics[];\n}\n\n/**\n * Parameters for players endpoint\n */\nexport interface FootballPlayersParams {\n /** Filter by player ID */\n id?: Optional<number>;\n /** Filter by team ID */\n team?: Optional<number>;\n /** Filter by league ID */\n league?: Optional<number>;\n /** Filter by season year (required if team or league provided) */\n season?: Optional<number>;\n /** Search by player name (min 3 characters) */\n search?: Optional<string>;\n /** Page number */\n page?: Optional<number>;\n}\n\n/**\n * Parameters for player seasons endpoint\n */\nexport interface FootballPlayersSeasonParams {\n /** Filter by player ID */\n player?: Optional<number>;\n}\n\n/**\n * Squad member (simplified player in squad context)\n */\nexport interface FootballSquadPlayer {\n /** Player ID */\n id: number;\n /** Player name */\n name: string;\n /** Age */\n age: number;\n /** Jersey number */\n number: Optional<number>;\n /** Position */\n position: string;\n /** Photo URL */\n photo: string;\n}\n\n/**\n * Squad response\n */\nexport interface FootballSquadResponse {\n /** Team information */\n team: {\n id: number;\n name: string;\n logo: string;\n };\n /** Players in the squad */\n players: FootballSquadPlayer[];\n}\n\n/**\n * Parameters for squads endpoint\n */\nexport interface FootballSquadsParams {\n /** Team ID (required if player not provided) */\n team?: Optional<number>;\n /** Player ID (required if team not provided) */\n player?: Optional<number>;\n}\n\n/**\n * Parameters for top scorers endpoint\n */\nexport interface FootballTopScorersParams {\n /** League ID (required) */\n league: number;\n /** Season year (required) */\n season: number;\n}\n\n/**\n * Parameters for top assists endpoint\n */\nexport interface FootballTopAssistsParams {\n /** League ID (required) */\n league: number;\n /** Season year (required) */\n season: number;\n}\n\n/**\n * Parameters for top cards endpoint\n */\nexport interface FootballTopCardsParams {\n /** League ID (required) */\n league: number;\n /** Season year (required) */\n season: number;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"football-standings.js","sourceRoot":"","sources":["../../../src/football/types/football-standings.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"football-standings.js","sourceRoot":"","sources":["../../../src/football/types/football-standings.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Types for Standings endpoint\n */\n\nimport type { Optional } from \"@sudobility/types\";\n\n/**\n * Standings response wrapper\n */\nexport interface FootballStandingsResponse {\n /** League information */\n league: FootballStandingsLeague;\n}\n\n/**\n * League with standings\n */\nexport interface FootballStandingsLeague {\n /** League ID */\n id: number;\n /** League name */\n name: string;\n /** Country */\n country: string;\n /** League logo URL */\n logo: string;\n /** Country flag URL */\n flag: Optional<string>;\n /** Season year */\n season: number;\n /** Standings groups (array of arrays for multiple groups) */\n standings: FootballStanding[][];\n}\n\n/**\n * Individual team standing\n */\nexport interface FootballStanding {\n /** Position/Rank */\n rank: number;\n /** Team information */\n team: FootballStandingTeam;\n /** Points */\n points: number;\n /** Goal difference */\n goalsDiff: number;\n /** Group name (if applicable) */\n group: string;\n /** Form string (e.g., \"WWDLW\") */\n form: Optional<string>;\n /** Status (promotion, relegation, etc.) */\n status: Optional<string>;\n /** Description of position */\n description: Optional<string>;\n /** All matches statistics */\n all: FootballStandingStats;\n /** Home matches statistics */\n home: FootballStandingStats;\n /** Away matches statistics */\n away: FootballStandingStats;\n /** Last update timestamp */\n update: string;\n}\n\n/**\n * Team info in standing context\n */\nexport interface FootballStandingTeam {\n /** Team ID */\n id: number;\n /** Team name */\n name: string;\n /** Team logo URL */\n logo: string;\n}\n\n/**\n * Standing statistics\n */\nexport interface FootballStandingStats {\n /** Matches played */\n played: number;\n /** Matches won */\n win: number;\n /** Matches drawn */\n draw: number;\n /** Matches lost */\n lose: number;\n /** Goals statistics */\n goals: {\n /** Goals scored */\n for: number;\n /** Goals conceded */\n against: number;\n };\n}\n\n/**\n * Parameters for standings endpoint\n */\nexport interface FootballStandingsParams {\n /** League ID (required) */\n league: number;\n /** Season year (required) */\n season: number;\n /** Filter by team ID */\n team?: Optional<number>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"football-statistics.js","sourceRoot":"","sources":["../../../src/football/types/football-statistics.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"football-statistics.js","sourceRoot":"","sources":["../../../src/football/types/football-statistics.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Additional statistics types\n * Re-exports and additional stat-related types\n */\n\nimport type { Optional } from \"@sudobility/types\";\n\n/**\n * Generic statistic value that can be number, string, or percentage\n */\nexport type FootballStatValue = Optional<number | string>;\n\n/**\n * Percentage statistic with value and percentage\n */\nexport interface FootballPercentageStat {\n /** Absolute value */\n total: Optional<number>;\n /** Percentage string (e.g., \"45%\") */\n percentage: Optional<string>;\n}\n\n/**\n * Minute range statistic breakdown\n */\nexport interface FootballMinuteStats {\n \"0-15\": FootballPercentageStat;\n \"16-30\": FootballPercentageStat;\n \"31-45\": FootballPercentageStat;\n \"46-60\": FootballPercentageStat;\n \"61-75\": FootballPercentageStat;\n \"76-90\": FootballPercentageStat;\n \"91-105\": FootballPercentageStat;\n \"106-120\": FootballPercentageStat;\n}\n\n/**\n * Common statistic types for fixture statistics\n */\nexport type FootballFixtureStatType =\n | \"Shots on Goal\"\n | \"Shots off Goal\"\n | \"Total Shots\"\n | \"Blocked Shots\"\n | \"Shots insidebox\"\n | \"Shots outsidebox\"\n | \"Fouls\"\n | \"Corner Kicks\"\n | \"Offsides\"\n | \"Ball Possession\"\n | \"Yellow Cards\"\n | \"Red Cards\"\n | \"Goalkeeper Saves\"\n | \"Total passes\"\n | \"Passes accurate\"\n | \"Passes %\"\n | \"expected_goals\";\n\n/**\n * Player position types\n */\nexport type FootballPlayerPosition =\n | \"Goalkeeper\"\n | \"Defender\"\n | \"Midfielder\"\n | \"Attacker\";\n\n/**\n * Card type\n */\nexport type FootballCardType = \"Yellow Card\" | \"Red Card\" | \"Yellow/Red Card\";\n\n/**\n * Goal type\n */\nexport type FootballGoalType =\n | \"Normal Goal\"\n | \"Own Goal\"\n | \"Penalty\"\n | \"Missed Penalty\";\n\n/**\n * Event type\n */\nexport type FootballEventType = \"Goal\" | \"Card\" | \"subst\" | \"Var\";\n\n/**\n * VAR decision types\n */\nexport type FootballVarDecision =\n | \"Goal cancelled\"\n | \"Penalty confirmed\"\n | \"Goal confirmed\"\n | \"Card upgrade\"\n | \"Penalty cancelled\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"football-teams.js","sourceRoot":"","sources":["../../../src/football/types/football-teams.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"football-teams.js","sourceRoot":"","sources":["../../../src/football/types/football-teams.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Types for Teams and Venues endpoints\n */\n\nimport type { Optional } from \"@sudobility/types\";\n\n/**\n * Team information\n */\nexport interface FootballTeam {\n /** Team ID */\n id: number;\n /** Team name */\n name: string;\n /** Team code (short name) */\n code: Optional<string>;\n /** Country of the team */\n country: string;\n /** Year the team was founded */\n founded: Optional<number>;\n /** Whether this is a national team */\n national: boolean;\n /** URL to team logo */\n logo: string;\n}\n\n/**\n * Venue/Stadium information\n */\nexport interface FootballVenue {\n /** Venue ID */\n id: Optional<number>;\n /** Venue name */\n name: string;\n /** Address of the venue */\n address: Optional<string>;\n /** City where the venue is located */\n city: string;\n /** Capacity of the venue */\n capacity: Optional<number>;\n /** Playing surface type */\n surface: Optional<string>;\n /** URL to venue image */\n image: Optional<string>;\n}\n\n/**\n * Complete team response including venue\n */\nexport interface FootballTeamResponse {\n /** Team information */\n team: FootballTeam;\n /** Venue information */\n venue: FootballVenue;\n}\n\n/**\n * Parameters for teams endpoint\n */\nexport interface FootballTeamsParams {\n /** Filter by team ID */\n id?: Optional<number>;\n /** Filter by team name */\n name?: Optional<string>;\n /** Filter by league ID (requires season) */\n league?: Optional<number>;\n /** Filter by season year */\n season?: Optional<number>;\n /** Filter by country name */\n country?: Optional<string>;\n /** Filter by team code */\n code?: Optional<string>;\n /** Filter by venue ID */\n venue?: Optional<number>;\n /** Search by partial name (min 3 characters) */\n search?: Optional<string>;\n}\n\n/**\n * Parameters for venues endpoint\n */\nexport interface FootballVenuesParams {\n /** Filter by venue ID */\n id?: Optional<number>;\n /** Filter by venue name */\n name?: Optional<string>;\n /** Filter by city */\n city?: Optional<string>;\n /** Filter by country */\n country?: Optional<string>;\n /** Search by partial name (min 3 characters) */\n search?: Optional<string>;\n}\n\n/**\n * Team statistics for a league/season\n */\nexport interface FootballTeamStatistics {\n /** League information */\n league: {\n id: number;\n name: string;\n country: string;\n logo: string;\n flag: Optional<string>;\n season: number;\n };\n /** Team information */\n team: FootballTeam;\n /** Form string (e.g., \"WWDLW\") */\n form: Optional<string>;\n /** Fixtures statistics */\n fixtures: FootballTeamFixturesStats;\n /** Goals statistics */\n goals: FootballTeamGoalsStats;\n /** Biggest statistics */\n biggest: FootballTeamBiggestStats;\n /** Clean sheet statistics */\n clean_sheet: FootballTeamHomeAwayTotal;\n /** Failed to score statistics */\n failed_to_score: FootballTeamHomeAwayTotal;\n /** Penalty statistics */\n penalty: FootballTeamPenaltyStats;\n /** Lineups used */\n lineups: FootballTeamLineup[];\n /** Cards statistics */\n cards: FootballTeamCardsStats;\n}\n\n/**\n * Team fixtures statistics\n */\nexport interface FootballTeamFixturesStats {\n played: FootballTeamHomeAwayTotal;\n wins: FootballTeamHomeAwayTotal;\n draws: FootballTeamHomeAwayTotal;\n loses: FootballTeamHomeAwayTotal;\n}\n\n/**\n * Home/Away/Total breakdown\n */\nexport interface FootballTeamHomeAwayTotal {\n home: number;\n away: number;\n total: number;\n}\n\n/**\n * Team goals statistics\n */\nexport interface FootballTeamGoalsStats {\n for: FootballTeamGoalsDetail;\n against: FootballTeamGoalsDetail;\n}\n\n/**\n * Goals detail with minute breakdown\n */\nexport interface FootballTeamGoalsDetail {\n total: FootballTeamHomeAwayTotal;\n average: {\n home: string;\n away: string;\n total: string;\n };\n minute: Record<\n string,\n { total: Optional<number>; percentage: Optional<string> }\n >;\n}\n\n/**\n * Biggest wins/losses/streaks\n */\nexport interface FootballTeamBiggestStats {\n streak: {\n wins: number;\n draws: number;\n loses: number;\n };\n wins: {\n home: Optional<string>;\n away: Optional<string>;\n };\n loses: {\n home: Optional<string>;\n away: Optional<string>;\n };\n goals: {\n for: {\n home: number;\n away: number;\n };\n against: {\n home: number;\n away: number;\n };\n };\n}\n\n/**\n * Penalty statistics\n */\nexport interface FootballTeamPenaltyStats {\n scored: {\n total: number;\n percentage: string;\n };\n missed: {\n total: number;\n percentage: string;\n };\n total: number;\n}\n\n/**\n * Lineup formation used\n */\nexport interface FootballTeamLineup {\n formation: string;\n played: number;\n}\n\n/**\n * Cards statistics by minute\n */\nexport interface FootballTeamCardsStats {\n yellow: Record<\n string,\n { total: Optional<number>; percentage: Optional<string> }\n >;\n red: Record<\n string,\n { total: Optional<number>; percentage: Optional<string> }\n >;\n}\n\n/**\n * Parameters for team statistics endpoint\n */\nexport interface FootballTeamStatisticsParams {\n /** League ID (required) */\n league: number;\n /** Season year (required) */\n season: number;\n /** Team ID (required) */\n team: number;\n /** Filter by date */\n date?: Optional<string>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"football-transfers.js","sourceRoot":"","sources":["../../../src/football/types/football-transfers.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"football-transfers.js","sourceRoot":"","sources":["../../../src/football/types/football-transfers.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Types for Transfers, Trophies, Sidelined, and Coachs endpoints\n */\n\nimport type { Optional } from \"@sudobility/types\";\nimport type { FootballBirth } from \"./football-common\";\n\n/**\n * Transfer record\n */\nexport interface FootballTransfer {\n /** Transfer date */\n date: string;\n /** Transfer type */\n type: string;\n /** Teams involved */\n teams: {\n /** Team player left */\n in: {\n id: Optional<number>;\n name: string;\n logo: Optional<string>;\n };\n /** Team player joined */\n out: {\n id: Optional<number>;\n name: string;\n logo: Optional<string>;\n };\n };\n}\n\n/**\n * Transfer response (player with transfers)\n */\nexport interface FootballTransferResponse {\n /** Player information */\n player: {\n id: number;\n name: string;\n };\n /** Update timestamp */\n update: string;\n /** Transfer history */\n transfers: FootballTransfer[];\n}\n\n/**\n * Parameters for transfers endpoint\n */\nexport interface FootballTransfersParams {\n /** Filter by player ID */\n player?: Optional<number>;\n /** Filter by team ID */\n team?: Optional<number>;\n}\n\n/**\n * Trophy record\n */\nexport interface FootballTrophy {\n /** League/Competition name */\n league: string;\n /** Country */\n country: string;\n /** Season */\n season: string;\n /** Place/Result */\n place: string;\n}\n\n/**\n * Parameters for trophies endpoint\n */\nexport interface FootballTrophiesParams {\n /** Filter by player ID */\n player?: Optional<number>;\n /** Filter by coach ID */\n coach?: Optional<number>;\n}\n\n/**\n * Sidelined record (injury/suspension)\n */\nexport interface FootballSidelined {\n /** Type of absence */\n type: string;\n /** Start date */\n start: string;\n /** End date */\n end: Optional<string>;\n}\n\n/**\n * Parameters for sidelined endpoint\n */\nexport interface FootballSidelinedParams {\n /** Filter by player ID */\n player?: Optional<number>;\n /** Filter by coach ID */\n coach?: Optional<number>;\n}\n\n/**\n * Coach information\n */\nexport interface FootballCoach {\n /** Coach ID */\n id: number;\n /** Coach name */\n name: string;\n /** First name */\n firstname: string;\n /** Last name */\n lastname: string;\n /** Age */\n age: number;\n /** Birth information */\n birth: FootballBirth;\n /** Nationality */\n nationality: string;\n /** Height */\n height: Optional<string>;\n /** Weight */\n weight: Optional<string>;\n /** Photo URL */\n photo: string;\n /** Team information */\n team: {\n id: number;\n name: string;\n logo: string;\n };\n /** Career history */\n career: FootballCoachCareer[];\n}\n\n/**\n * Coach career entry\n */\nexport interface FootballCoachCareer {\n /** Team information */\n team: {\n id: number;\n name: string;\n logo: string;\n };\n /** Start date */\n start: string;\n /** End date */\n end: Optional<string>;\n}\n\n/**\n * Parameters for coachs endpoint\n */\nexport interface FootballCoachsParams {\n /** Filter by coach ID */\n id?: Optional<number>;\n /** Filter by team ID */\n team?: Optional<number>;\n /** Search by name */\n search?: Optional<string>;\n}\n\n/**\n * Injury record\n */\nexport interface FootballInjury {\n /** Player information */\n player: {\n id: number;\n name: string;\n photo: string;\n type: string;\n reason: string;\n };\n /** Team information */\n team: {\n id: number;\n name: string;\n logo: string;\n };\n /** Fixture information */\n fixture: {\n id: number;\n timezone: string;\n date: string;\n timestamp: number;\n };\n /** League information */\n league: {\n id: number;\n season: number;\n name: string;\n country: string;\n logo: string;\n flag: Optional<string>;\n };\n}\n\n/**\n * Parameters for injuries endpoint\n */\nexport interface FootballInjuriesParams {\n /** Filter by league ID */\n league?: Optional<number>;\n /** Filter by season */\n season?: Optional<number>;\n /** Filter by fixture ID */\n fixture?: Optional<number>;\n /** Filter by team ID */\n team?: Optional<number>;\n /** Filter by player ID */\n player?: Optional<number>;\n /** Filter by date */\n date?: Optional<string>;\n /** Filter by timezone */\n timezone?: Optional<string>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/football/types/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/football/types/index.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * API-Football Client Type Definitions\n *\n * This module exports all TypeScript types for the API-Football v3 API.\n * Types from @sudobility/types are NOT re-exported.\n * Import them directly from @sudobility/types as a peer dependency.\n */\n\n// Common types\nexport type {\n ApiFootballResponse,\n ApiFootballPaging,\n ApiFootballConfig,\n FootballLogo,\n FootballBirth,\n FootballPagingParams,\n FootballRateLimitInfo,\n} from \"./football-common\";\n\n// Countries and Timezone types\nexport type {\n FootballCountry,\n FootballCountriesParams,\n FootballTimezone,\n} from \"./football-countries\";\n\n// Leagues and Seasons types\nexport type {\n FootballLeague,\n FootballSeason,\n FootballSeasonCoverage,\n FootballFixturesCoverage,\n FootballLeagueResponse,\n FootballLeaguesParams,\n} from \"./football-leagues\";\n\n// Teams and Venues types\nexport type {\n FootballTeam,\n FootballVenue,\n FootballTeamResponse,\n FootballTeamsParams,\n FootballVenuesParams,\n FootballTeamStatistics,\n FootballTeamFixturesStats,\n FootballTeamHomeAwayTotal,\n FootballTeamGoalsStats,\n FootballTeamGoalsDetail,\n FootballTeamBiggestStats,\n FootballTeamPenaltyStats,\n FootballTeamLineup,\n FootballTeamCardsStats,\n FootballTeamStatisticsParams,\n} from \"./football-teams\";\n\n// Fixtures types\nexport type {\n FootballFixture,\n FootballFixturePeriods,\n FootballFixtureVenue,\n FootballFixtureStatus,\n FootballFixtureStatusCode,\n FootballFixtureLeague,\n FootballFixtureTeams,\n FootballFixtureTeam,\n FootballFixtureGoals,\n FootballFixtureScore,\n FootballFixtureResponse,\n FootballFixturesParams,\n FootballHeadToHeadParams,\n FootballFixtureEvent,\n FootballFixtureEventsParams,\n FootballFixtureLineup,\n FootballTeamColors,\n FootballColorSet,\n FootballLineupPlayer,\n FootballFixtureLineupsParams,\n FootballFixtureStatistics,\n FootballStatisticItem,\n FootballFixtureStatisticsParams,\n FootballFixturePlayerStats,\n FootballPlayerFixtureStats,\n FootballPlayerStatDetail,\n FootballFixturePlayersParams,\n} from \"./football-fixtures\";\n\n// Standings types\nexport type {\n FootballStandingsResponse,\n FootballStandingsLeague,\n FootballStanding,\n FootballStandingTeam,\n FootballStandingStats,\n FootballStandingsParams,\n} from \"./football-standings\";\n\n// Players types\nexport type {\n FootballPlayer,\n FootballPlayerStatistics,\n FootballPlayerResponse,\n FootballPlayersParams,\n FootballPlayersSeasonParams,\n FootballSquadPlayer,\n FootballSquadResponse,\n FootballSquadsParams,\n FootballTopScorersParams,\n FootballTopAssistsParams,\n FootballTopCardsParams,\n} from \"./football-players\";\n\n// Transfers, Trophies, Sidelined, Coachs types\nexport type {\n FootballTransfer,\n FootballTransferResponse,\n FootballTransfersParams,\n FootballTrophy,\n FootballTrophiesParams,\n FootballSidelined,\n FootballSidelinedParams,\n FootballCoach,\n FootballCoachCareer,\n FootballCoachsParams,\n FootballInjury,\n FootballInjuriesParams,\n} from \"./football-transfers\";\n\n// Statistics types\nexport type {\n FootballStatValue,\n FootballPercentageStat,\n FootballMinuteStats,\n FootballFixtureStatType,\n FootballPlayerPosition,\n FootballCardType,\n FootballGoalType,\n FootballEventType,\n FootballVarDecision,\n} from \"./football-statistics\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"f1-context.js","sourceRoot":"","sources":["../../../src/formula1/hooks/f1-context.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EACZ,aAAa,EAEb,UAAU,EACV,OAAO,GACR,MAAM,OAAO,CAAC;AAGf,OAAO,EAGL,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAclB,MAAM,YAAY,GAAG,aAAa,CAA2B,IAAI,CAAC,CAAC;AAoBnE,MAAM,UAAU,aAAa,CAAC,EAC5B,MAAM,EACN,cAAc,EACd,QAAQ,GACW;IAEnB,MAAM,QAAQ,GAAG,OAAO,CACtB,GAAG,EAAE,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC,EAC5D,CAAC,cAAc,CAAC,CACjB,CAAC;IAEF,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAC5B,CAAC,MAAM,EAAE,QAAQ,CAAC,CACnB,CAAC;IAEF,OAAO,CACL,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IACvC,QAAQ,CACa,CACzB,CAAC;AACJ,CAAC;AAQD,MAAM,UAAU,cAAc;IAC5B,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qDAAqD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M,UAAU,cAAc;IAC5B,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC,MAAM,CAAC;AACxB,CAAC;AAQD,MAAM,UAAU,oBAAoB;IAClC,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,2DAA2D,CAC5D,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC,QAAQ,CAAC;AAC1B,CAAC;AAQD,MAAM,UAAU,aAAa;IAC3B,MAAM,QAAQ,GAAG,oBAAoB,EAAE,CAAC;IACxC,OAAO,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC","sourcesContent":["/**\n * @module hooks/f1-context\n * @description React context for API-Formula-1 client and store\n */\n\nimport React, {\n createContext,\n type ReactNode,\n useContext,\n useMemo,\n} from \"react\";\nimport type { StorageService } from \"@sudobility/di\";\nimport type { ApiF1Client } from \"../network/api-f1-client\";\nimport {\n type ApiF1State,\n type ApiF1Store,\n createApiF1Store,\n createStorageAdapter,\n} from \"../store\";\n\n/**\n * Context value containing the API client and store\n */\ninterface ApiF1ContextValue {\n client: ApiF1Client;\n useStore: ApiF1Store;\n}\n\n/**\n * React context for API-Formula-1 client and store\n * @internal\n */\nconst ApiF1Context = createContext<ApiF1ContextValue | null>(null);\n\n/**\n * Props for ApiF1Provider\n */\nexport interface ApiF1ProviderProps {\n /** The ApiF1Client instance to provide */\n client: ApiF1Client;\n /** Storage service from DI for cross-platform persistence */\n storageService: StorageService;\n /** Child components */\n children: ReactNode;\n}\n\n/**\n * Provider component for API-Formula-1 hooks\n *\n * @param props - Provider props including client, storageService, and children\n * @returns Provider component\n */\nexport function ApiF1Provider({\n client,\n storageService,\n children,\n}: ApiF1ProviderProps) {\n // Create store once with the provided storage service\n const useStore = useMemo(\n () => createApiF1Store(createStorageAdapter(storageService)),\n [storageService],\n );\n\n const contextValue = useMemo(\n () => ({ client, useStore }),\n [client, useStore],\n );\n\n return (\n <ApiF1Context.Provider value={contextValue}>\n {children}\n </ApiF1Context.Provider>\n );\n}\n\n/**\n * Hook to access the ApiF1Client from context\n *\n * @returns The ApiF1Client instance\n * @throws Error if used outside of ApiF1Provider\n */\nexport function useApiF1Client(): ApiF1Client {\n const context = useContext(ApiF1Context);\n if (!context) {\n throw new Error(\"useApiF1Client must be used within an ApiF1Provider\");\n }\n return context.client;\n}\n\n/**\n * Hook to access the API-Formula-1 Zustand store from context\n *\n * @returns The Zustand store hook for API-Formula-1 state\n * @throws Error if used outside of ApiF1Provider\n */\nexport function useApiF1StoreContext(): ApiF1Store {\n const context = useContext(ApiF1Context);\n if (!context) {\n throw new Error(\n \"useApiF1StoreContext must be used within an ApiF1Provider\",\n );\n }\n return context.useStore;\n}\n\n/**\n * Hook to access API-Formula-1 store state\n *\n * @returns Full store state with getters, setters, and cached data\n * @throws Error if used outside of ApiF1Provider\n */\nexport function useApiF1Store(): ApiF1State {\n const useStore = useApiF1StoreContext();\n return useStore((state) => state);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"f1-types.js","sourceRoot":"","sources":["../../../src/formula1/hooks/f1-types.ts"],"names":[],"mappings":"AA+BA,MAAM,WAAW,GAAG,CAAC,QAAQ,CAAU,CAAC;AAKxC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,EAAE,WAAW;IAGhB,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,WAAW,EAAE,UAAU,CAAU;IACrD,OAAO,EAAE;QACP,GAAG,EAAE,CAAC,GAAG,WAAW,EAAE,SAAS,CAAU;QACzC,IAAI,EAAE,CAAC,MAAe,EAAE,EAAE,CACxB,CAAC,GAAG,WA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AG,WAAW,EAAE,SAAS,CAAU;QACzC,IAAI,EAAE,CAAC,MAAe,EAAE,EAAE,CACxB,CAAC,GAAG,WAAW,EAAE,SAAS,EAAE,MAAM,IAAI,EAAE,CAAU;KACrD;IAGD,KAAK,EAAE;QACL,GAAG,EAAE,CAAC,GAAG,WAAW,EAAE,OAAO,CAAU;QACvC,IAAI,EAAE,CAAC,MAAe,EAAE,EAAE,CAAC,CAAC,GAAG,WAAW,EAAE,OAAO,EAAE,MAAM,IAAI,EAAE,CAAU;KAC5E;IAGD,QAAQ,EAAE;QACR,OAAO,EAAE,CAAC,MAAc,EAAE,EAAE,CAC1B,CAAC,GAAG,WAAW,EAAE,kBAAkB,EAAE,MAAM,CAAU;QACvD,KAAK,EAAE,CAAC,MAAc,EAAE,EAAE,CACxB,CAAC,GAAG,WAAW,EAAE,gBAAgB,EAAE,MAAM,CAAU;KACtD;IAGD,QAAQ,EAAE;QACR,GAAG,EAAE,CAAC,GAAG,WAAW,EAAE,UAAU,CAAU;QAC1C,IAAI,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,GAAG,WAAW,EAAE,UAAU,EAAE,MAAM,CAAU;KACxE;CACO,CAAC","sourcesContent":["/**\n * @module hooks/f1-types\n * @description Type definitions for API-Formula-1 hooks\n */\n\nimport type { UseQueryOptions } from \"@tanstack/react-query\";\nimport type { ApiF1Response } from \"../types\";\n\n/**\n * Base options for all API-Formula-1 hooks\n */\nexport interface UseApiF1QueryOptions<TData, TParams = void> extends Omit<\n UseQueryOptions<ApiF1Response<TData>, Error>,\n \"queryKey\" | \"queryFn\"\n> {\n /** Parameters for the API call */\n params?: TParams;\n}\n\n/**\n * Options for hooks with required parameters\n */\nexport interface UseApiF1QueryOptionsRequired<TData, TParams> extends Omit<\n UseQueryOptions<ApiF1Response<TData>, Error>,\n \"queryKey\" | \"queryFn\"\n> {\n /** Parameters for the API call (required) */\n params: TParams;\n}\n\n// Base key for all API-Formula-1 queries\nconst F1_BASE_KEY = [\"api-f1\"] as const;\n\n/**\n * Query keys namespace for all API-Formula-1 queries\n */\nexport const apiF1Keys = {\n all: F1_BASE_KEY,\n\n // General\n timezone: () => [...F1_BASE_KEY, \"timezone\"] as const,\n seasons: {\n all: [...F1_BASE_KEY, \"seasons\"] as const,\n list: (params?: object) =>\n [...F1_BASE_KEY, \"seasons\", params ?? {}] as const,\n },\n\n // Circuits\n circuits: {\n all: [...F1_BASE_KEY, \"circuits\"] as const,\n list: (params?: object) =>\n [...F1_BASE_KEY, \"circuits\", params ?? {}] as const,\n },\n\n // Competitions\n competitions: {\n all: [...F1_BASE_KEY, \"competitions\"] as const,\n list: (params?: object) =>\n [...F1_BASE_KEY, \"competitions\", params ?? {}] as const,\n },\n\n // Teams\n teams: {\n all: [...F1_BASE_KEY, \"teams\"] as const,\n list: (params?: object) => [...F1_BASE_KEY, \"teams\", params ?? {}] as const,\n },\n\n // Drivers\n drivers: {\n all: [...F1_BASE_KEY, \"drivers\"] as const,\n list: (params?: object) =>\n [...F1_BASE_KEY, \"drivers\", params ?? {}] as const,\n },\n\n // Races\n races: {\n all: [...F1_BASE_KEY, \"races\"] as const,\n list: (params?: object) => [...F1_BASE_KEY, \"races\", params ?? {}] as const,\n },\n\n // Rankings\n rankings: {\n drivers: (params: object) =>\n [...F1_BASE_KEY, \"rankings-drivers\", params] as const,\n teams: (params: object) =>\n [...F1_BASE_KEY, \"rankings-teams\", params] as const,\n },\n\n // Pit Stops\n pitStops: {\n all: [...F1_BASE_KEY, \"pitstops\"] as const,\n list: (params: object) => [...F1_BASE_KEY, \"pitstops\", params] as const,\n },\n} as const;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/formula1/hooks/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,oBAAoB,GAErB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,SAAS,GAGV,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/formula1/hooks/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,oBAAoB,GAErB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,SAAS,GAGV,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * @module formula1/hooks\n * @description Hook exports for API-Formula-1\n */\n\nexport {\n ApiF1Provider,\n useApiF1Client,\n useApiF1Store,\n useApiF1StoreContext,\n type ApiF1ProviderProps,\n} from \"./f1-context\";\n\nexport {\n apiF1Keys,\n type UseApiF1QueryOptions,\n type UseApiF1QueryOptionsRequired,\n} from \"./f1-types\";\n\nexport { useF1Timezone } from \"./use-f1-timezone\";\nexport { useF1Seasons } from \"./use-f1-seasons\";\nexport { useF1Circuits } from \"./use-f1-circuits\";\nexport { useF1Competitions } from \"./use-f1-competitions\";\nexport { useF1Teams } from \"./use-f1-teams\";\nexport { useF1Drivers } from \"./use-f1-drivers\";\nexport { useF1Races } from \"./use-f1-races\";\nexport { useF1DriverRankings, useF1TeamRankings } from \"./use-f1-rankings\";\nexport { useF1PitStops } from \"./use-f1-pitstops\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-f1-circuits.js","sourceRoot":"","sources":["../../../src/formula1/hooks/use-f1-circuits.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAA6B,MAAM,YAAY,CAAC;AASlE,MAAM,UAAU,aAAa,CAC3B,OAA2D;IAE3D,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IAC/D,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAC/B,MAAM,QAAQ,GAAG,gBAAgB,CAC/B,UAAU,EACV,MAA4C,CAC7C,CAAC;IAEF,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,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IAAI,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAClD,WAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACzC,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,MAAM,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO;oBACL,GAAG,EAAE,UAAU;oBACf,UAAU,EAAE,EAA4B;oBACxC,MAAM,EAAE,EAAc;oBACtB,OAAO,EAAE,MAAM,CAAC,MAAM;oBACtB,QAAQ,EAAE,MAAM;iBACjB,CAAC;YACJ,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,SAAS,EAAE,QAAQ;QACnB,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @module hooks/use-f1-circuits\n * @description React hook for circuits endpoint\n */\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useApiF1Client, useApiF1Store } from \"./f1-context\";\nimport { generateCacheKey } from \"../../utils/cache-utils\";\nimport { apiF1Keys, type UseApiF1QueryOptions } from \"./f1-types\";\nimport type { F1Circuit, F1CircuitsParams } from \"../types\";\n\n/**\n * Hook to fetch circuits\n *\n * @param options - Query options including optional params\n * @returns Query result with circuit data\n */\nexport function useF1Circuits(\n options?: UseApiF1QueryOptions<F1Circuit, F1CircuitsParams>,\n) {\n const client = useApiF1Client();\n const { getCircuits, setCircuits, cacheTTL } = useApiF1Store();\n const params = options?.params;\n const cacheKey = generateCacheKey(\n \"circuits\",\n params as unknown as Record<string, unknown>,\n );\n\n return useQuery({\n queryKey: apiF1Keys.circuits.list(params),\n queryFn: async () => {\n const response = await client.getCircuits(params);\n setCircuits(cacheKey, response.response);\n return response;\n },\n initialData: () => {\n const cached = getCircuits(cacheKey);\n if (cached) {\n return {\n get: \"circuits\",\n parameters: {} as Record<string, string>,\n errors: [] as string[],\n results: cached.length,\n response: cached,\n };\n }\n return undefined;\n },\n staleTime: cacheTTL,\n ...options,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-f1-competitions.js","sourceRoot":"","sources":["../../../src/formula1/hooks/use-f1-competitions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAA6B,MAAM,YAAY,CAAC;AASlE,MAAM,UAAU,iBAAiB,CAC/B,OAAmE;IAEnE,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IACvE,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAC/B,MAAM,QAAQ,GAAG,gBAAgB,CAC/B,cAAc,EACd,MAA4C,CAC7C,CAAC;IAEF,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7C,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YACtD,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC7C,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO;oBACL,GAAG,EAAE,cA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,CAAC;YACzC,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO;oBACL,GAAG,EAAE,cAAc;oBACnB,UAAU,EAAE,EAA4B;oBACxC,MAAM,EAAE,EAAc;oBACtB,OAAO,EAAE,MAAM,CAAC,MAAM;oBACtB,QAAQ,EAAE,MAAM;iBACjB,CAAC;YACJ,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,SAAS,EAAE,QAAQ;QACnB,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @module hooks/use-f1-competitions\n * @description React hook for competitions endpoint\n */\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useApiF1Client, useApiF1Store } from \"./f1-context\";\nimport { generateCacheKey } from \"../../utils/cache-utils\";\nimport { apiF1Keys, type UseApiF1QueryOptions } from \"./f1-types\";\nimport type { F1Competition, F1CompetitionsParams } from \"../types\";\n\n/**\n * Hook to fetch competitions (Grand Prix events)\n *\n * @param options - Query options including optional params\n * @returns Query result with competition data\n */\nexport function useF1Competitions(\n options?: UseApiF1QueryOptions<F1Competition, F1CompetitionsParams>,\n) {\n const client = useApiF1Client();\n const { getCompetitions, setCompetitions, cacheTTL } = useApiF1Store();\n const params = options?.params;\n const cacheKey = generateCacheKey(\n \"competitions\",\n params as unknown as Record<string, unknown>,\n );\n\n return useQuery({\n queryKey: apiF1Keys.competitions.list(params),\n queryFn: async () => {\n const response = await client.getCompetitions(params);\n setCompetitions(cacheKey, response.response);\n return response;\n },\n initialData: () => {\n const cached = getCompetitions(cacheKey);\n if (cached) {\n return {\n get: \"competitions\",\n parameters: {} as Record<string, string>,\n errors: [] as string[],\n results: cached.length,\n response: cached,\n };\n }\n return undefined;\n },\n staleTime: cacheTTL,\n ...options,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-f1-drivers.js","sourceRoot":"","sources":["../../../src/formula1/hooks/use-f1-drivers.ts"],"names":[],"mappings":"AAKA,OAAO,EAA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AC;AACL,CAAC","sourcesContent":["/**\n * @module hooks/use-f1-drivers\n * @description React hook for drivers endpoint\n */\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useApiF1Client, useApiF1Store } from \"./f1-context\";\nimport { generateCacheKey } from \"../../utils/cache-utils\";\nimport { apiF1Keys, type UseApiF1QueryOptions } from \"./f1-types\";\nimport type { F1Driver, F1DriversParams } from \"../types\";\n\n/**\n * Hook to fetch drivers\n *\n * @param options - Query options including optional params\n * @returns Query result with driver data\n */\nexport function useF1Drivers(\n options?: UseApiF1QueryOptions<F1Driver, F1DriversParams>,\n) {\n const client = useApiF1Client();\n const { getDrivers, setDrivers, cacheTTL } = useApiF1Store();\n const params = options?.params;\n const cacheKey = generateCacheKey(\n \"drivers\",\n params as unknown as Record<string, unknown>,\n );\n\n return useQuery({\n queryKey: apiF1Keys.drivers.list(params),\n queryFn: async () => {\n const response = await client.getDrivers(params);\n setDrivers(cacheKey, response.response);\n return response;\n },\n initialData: () => {\n const cached = getDrivers(cacheKey);\n if (cached) {\n return {\n get: \"drivers\",\n parameters: {} as Record<string, string>,\n errors: [] as string[],\n results: cached.length,\n response: cached,\n };\n }\n return undefined;\n },\n staleTime: cacheTTL,\n ...options,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-f1-pitstops.js","sourceRoot":"","sources":["../../../src/formula1/hooks/use-f1-pitstops.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAqC,MAAM,YAAY,CAAC;AAS1E,MAAM,UAAU,aAAa,CAC3B,OAAkE;IAElE,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,Q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E;IAElE,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;IAC5C,MAAM,QAAQ,GAAG,gBAAgB,CAC/B,UAAU,EACV,MAA4C,CAC7C,CAAC;IAEF,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAClD,WAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACzC,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,MAAM,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO;oBACL,GAAG,EAAE,UAAU;oBACf,UAAU,EAAE,EAA4B;oBACxC,MAAM,EAAE,EAAc;oBACtB,OAAO,EAAE,MAAM,CAAC,MAAM;oBACtB,QAAQ,EAAE,MAAM;iBACjB,CAAC;YACJ,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,SAAS,EAAE,QAAQ;QACnB,GAAG,YAAY;KAChB,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @module hooks/use-f1-pitstops\n * @description React hook for pit stops endpoint\n */\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useApiF1Client, useApiF1Store } from \"./f1-context\";\nimport { generateCacheKey } from \"../../utils/cache-utils\";\nimport { apiF1Keys, type UseApiF1QueryOptionsRequired } from \"./f1-types\";\nimport type { F1PitStop, F1PitStopsParams } from \"../types\";\n\n/**\n * Hook to fetch pit stops for a race\n *\n * @param options - Query options with required params (race)\n * @returns Query result with pit stop data\n */\nexport function useF1PitStops(\n options: UseApiF1QueryOptionsRequired<F1PitStop, F1PitStopsParams>,\n) {\n const client = useApiF1Client();\n const { getPitStops, setPitStops, cacheTTL } = useApiF1Store();\n const { params, ...queryOptions } = options;\n const cacheKey = generateCacheKey(\n \"pitstops\",\n params as unknown as Record<string, unknown>,\n );\n\n return useQuery({\n queryKey: apiF1Keys.pitStops.list(params),\n queryFn: async () => {\n const response = await client.getPitStops(params);\n setPitStops(cacheKey, response.response);\n return response;\n },\n initialData: () => {\n const cached = getPitStops(cacheKey);\n if (cached) {\n return {\n get: \"pitstops\",\n parameters: {} as Record<string, string>,\n errors: [] as string[],\n results: cached.length,\n response: cached,\n };\n }\n return undefined;\n },\n staleTime: cacheTTL,\n ...queryOptions,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-f1-races.js","sourceRoot":"","sources":["../../../src/formula1/hooks/use-f1-races.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAA6B,MAAM,YAAY,CAAC;AASlE,MAAM,UAAU,UAAU,CACxB,OAAqD;IAErD,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IACzD,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAC/B,MAAM,QAAQ,GAAG,gBAAgB,CAC/B,OAAO,EACP,MAA4C,CAC7C,CAAC;IAEF,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CA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C;QACd,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;QACtC,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC/C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACtC,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAClC,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO;oBACL,GAAG,EAAE,OAAO;oBACZ,UAAU,EAAE,EAA4B;oBACxC,MAAM,EAAE,EAAc;oBACtB,OAAO,EAAE,MAAM,CAAC,MAAM;oBACtB,QAAQ,EAAE,MAAM;iBACjB,CAAC;YACJ,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,SAAS,EAAE,QAAQ;QACnB,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @module hooks/use-f1-races\n * @description React hook for races endpoint\n */\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useApiF1Client, useApiF1Store } from \"./f1-context\";\nimport { generateCacheKey } from \"../../utils/cache-utils\";\nimport { apiF1Keys, type UseApiF1QueryOptions } from \"./f1-types\";\nimport type { F1Race, F1RacesParams } from \"../types\";\n\n/**\n * Hook to fetch races\n *\n * @param options - Query options including optional params\n * @returns Query result with race data\n */\nexport function useF1Races(\n options?: UseApiF1QueryOptions<F1Race, F1RacesParams>,\n) {\n const client = useApiF1Client();\n const { getRaces, setRaces, cacheTTL } = useApiF1Store();\n const params = options?.params;\n const cacheKey = generateCacheKey(\n \"races\",\n params as unknown as Record<string, unknown>,\n );\n\n return useQuery({\n queryKey: apiF1Keys.races.list(params),\n queryFn: async () => {\n const response = await client.getRaces(params);\n setRaces(cacheKey, response.response);\n return response;\n },\n initialData: () => {\n const cached = getRaces(cacheKey);\n if (cached) {\n return {\n get: \"races\",\n parameters: {} as Record<string, string>,\n errors: [] as string[],\n results: cached.length,\n response: cached,\n };\n }\n return undefined;\n },\n staleTime: cacheTTL,\n ...options,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-f1-rankings.js","sourceRoot":"","sources":["../../../src/formula1/hooks/use-f1-rankings.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAqC,MAAM,YAAY,CAAC;AAc1E,MAAM,UAAU,mBAAmB,CACjC,OAGC;IAED,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IAC3E,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;IAC5C,MAAM,QAAQ,GAAG,gBAAgB,CAC/B,iBAAiB,EACjB,MAA4C,CAC7C,CAAC;IAEF,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;QAC5C,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;YACxD,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC/C,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,MAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;YAC3C,IAAI,M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React hooks for rankings endpoints\n */\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useApiF1Client, useApiF1Store } from \"./f1-context\";\nimport { generateCacheKey } from \"../../utils/cache-utils\";\nimport { apiF1Keys, type UseApiF1QueryOptionsRequired } from \"./f1-types\";\nimport type {\n F1DriverRanking,\n F1DriverRankingsParams,\n F1TeamRanking,\n F1TeamRankingsParams,\n} from \"../types\";\n\n/**\n * Hook to fetch driver rankings\n *\n * @param options - Query options with required params (season)\n * @returns Query result with driver rankings data\n */\nexport function useF1DriverRankings(\n options: UseApiF1QueryOptionsRequired<\n F1DriverRanking,\n F1DriverRankingsParams\n >,\n) {\n const client = useApiF1Client();\n const { getDriverRankings, setDriverRankings, cacheTTL } = useApiF1Store();\n const { params, ...queryOptions } = options;\n const cacheKey = generateCacheKey(\n \"driver-rankings\",\n params as unknown as Record<string, unknown>,\n );\n\n return useQuery({\n queryKey: apiF1Keys.rankings.drivers(params),\n queryFn: async () => {\n const response = await client.getDriverRankings(params);\n setDriverRankings(cacheKey, response.response);\n return response;\n },\n initialData: () => {\n const cached = getDriverRankings(cacheKey);\n if (cached) {\n return {\n get: \"rankings/drivers\",\n parameters: {} as Record<string, string>,\n errors: [] as string[],\n results: cached.length,\n response: cached,\n };\n }\n return undefined;\n },\n staleTime: cacheTTL,\n ...queryOptions,\n });\n}\n\n/**\n * Hook to fetch team (constructor) rankings\n *\n * @param options - Query options with required params (season)\n * @returns Query result with team rankings data\n */\nexport function useF1TeamRankings(\n options: UseApiF1QueryOptionsRequired<F1TeamRanking, F1TeamRankingsParams>,\n) {\n const client = useApiF1Client();\n const { getTeamRankings, setTeamRankings, cacheTTL } = useApiF1Store();\n const { params, ...queryOptions } = options;\n const cacheKey = generateCacheKey(\n \"team-rankings\",\n params as unknown as Record<string, unknown>,\n );\n\n return useQuery({\n queryKey: apiF1Keys.rankings.teams(params),\n queryFn: async () => {\n const response = await client.getTeamRankings(params);\n setTeamRankings(cacheKey, response.response);\n return response;\n },\n initialData: () => {\n const cached = getTeamRankings(cacheKey);\n if (cached) {\n return {\n get: \"rankings/teams\",\n parameters: {} as Record<string, string>,\n errors: [] as string[],\n results: cached.length,\n response: cached,\n };\n }\n return undefined;\n },\n staleTime: cacheTTL,\n ...queryOptions,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-f1-seasons.js","sourceRoot":"","sources":["../../../src/formula1/hooks/use-f1-seasons.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,SAAS,EAA6B,MAAM,YAAY,CAAC;AASlE,MAAM,UAAU,YAAY,CAC1B,OAAuD;IAEvD,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IAC1D,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAE/B,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;QACxC,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACjD,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAChC,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,IAAI,OAAO,EAAE,IAAI,EAAE,CAAC;gBAC7B,OAAO;oBACL,GAAG,EAAE,SAAS;oBACd,UAAU,EAAE,EAA4B;oBACxC,MAAM,EAAE,EAAc;oBACtB,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM;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AO,CAAC,IAAI;iBACvB,CAAC;YACJ,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,SAAS,EAAE,QAAQ;QACnB,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @module hooks/use-f1-seasons\n * @description React hook for seasons endpoint\n */\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useApiF1Client, useApiF1Store } from \"./f1-context\";\nimport { apiF1Keys, type UseApiF1QueryOptions } from \"./f1-types\";\nimport type { F1SeasonsParams } from \"../types\";\n\n/**\n * Hook to fetch available seasons\n *\n * @param options - Query options including optional params\n * @returns Query result with season data\n */\nexport function useF1Seasons(\n options?: UseApiF1QueryOptions<number, F1SeasonsParams>,\n) {\n const client = useApiF1Client();\n const { seasons, setSeasons, cacheTTL } = useApiF1Store();\n const params = options?.params;\n\n return useQuery({\n queryKey: apiF1Keys.seasons.list(params),\n queryFn: async () => {\n const response = await client.getSeasons(params);\n if (!params) {\n setSeasons(response.response);\n }\n return response;\n },\n initialData: () => {\n if (!params && seasons?.data) {\n return {\n get: \"seasons\",\n parameters: {} as Record<string, string>,\n errors: [] as string[],\n results: seasons.data.length,\n response: seasons.data,\n };\n }\n return undefined;\n },\n staleTime: cacheTTL,\n ...options,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-f1-teams.js","sourceRoot":"","sources":["../../../src/formula1/hooks/use-f1-teams.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAA6B,MAAM,YAAY,CAAC;AASlE,MAAM,UAAU,UAAU,CACxB,OAAqD;IAErD,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,MAAM,EAAE,Q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AAqD;IAErD,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IACzD,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAC/B,MAAM,QAAQ,GAAG,gBAAgB,CAC/B,OAAO,EACP,MAA4C,CAC7C,CAAC;IAEF,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;QACtC,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC/C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACtC,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAClC,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO;oBACL,GAAG,EAAE,OAAO;oBACZ,UAAU,EAAE,EAA4B;oBACxC,MAAM,EAAE,EAAc;oBACtB,OAAO,EAAE,MAAM,CAAC,MAAM;oBACtB,QAAQ,EAAE,MAAM;iBACjB,CAAC;YACJ,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,SAAS,EAAE,QAAQ;QACnB,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @module hooks/use-f1-teams\n * @description React hook for teams endpoint\n */\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useApiF1Client, useApiF1Store } from \"./f1-context\";\nimport { generateCacheKey } from \"../../utils/cache-utils\";\nimport { apiF1Keys, type UseApiF1QueryOptions } from \"./f1-types\";\nimport type { F1Team, F1TeamsParams } from \"../types\";\n\n/**\n * Hook to fetch teams (constructors)\n *\n * @param options - Query options including optional params\n * @returns Query result with team data\n */\nexport function useF1Teams(\n options?: UseApiF1QueryOptions<F1Team, F1TeamsParams>,\n) {\n const client = useApiF1Client();\n const { getTeams, setTeams, cacheTTL } = useApiF1Store();\n const params = options?.params;\n const cacheKey = generateCacheKey(\n \"teams\",\n params as unknown as Record<string, unknown>,\n );\n\n return useQuery({\n queryKey: apiF1Keys.teams.list(params),\n queryFn: async () => {\n const response = await client.getTeams(params);\n setTeams(cacheKey, response.response);\n return response;\n },\n initialData: () => {\n const cached = getTeams(cacheKey);\n if (cached) {\n return {\n get: \"teams\",\n parameters: {} as Record<string, string>,\n errors: [] as string[],\n results: cached.length,\n response: cached,\n };\n }\n return undefined;\n },\n staleTime: cacheTTL,\n ...options,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-f1-timezone.js","sourceRoot":"","sources":["../../../src/formula1/hooks/use-f1-timezone.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,SAAS,EAA6B,MAAM,YAAY,CAAC;AASlE,MAAM,UAAU,aAAa,CAAC,OAA0C;IACtE,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IAE9D,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC;YAC5C,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAChC,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,IAAI,SAAS,EAAE,IAAI,EAAE,CA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AAI;iBACzB,CAAC;YACJ,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,SAAS,EAAE,QAAQ;QACnB,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @module hooks/use-f1-timezone\n * @description React hook for timezone endpoint\n */\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useApiF1Client, useApiF1Store } from \"./f1-context\";\nimport { apiF1Keys, type UseApiF1QueryOptions } from \"./f1-types\";\nimport type { F1Timezone } from \"../types\";\n\n/**\n * Hook to fetch available timezones\n *\n * @param options - Query options\n * @returns Query result with timezone data\n */\nexport function useF1Timezone(options?: UseApiF1QueryOptions<F1Timezone>) {\n const client = useApiF1Client();\n const { timezones, setTimezones, cacheTTL } = useApiF1Store();\n\n return useQuery({\n queryKey: apiF1Keys.timezone(),\n queryFn: async () => {\n const response = await client.getTimezone();\n setTimezones(response.response);\n return response;\n },\n initialData: () => {\n if (timezones?.data) {\n return {\n get: \"timezone\",\n parameters: {} as Record<string, string>,\n errors: [] as string[],\n results: timezones.data.length,\n response: timezones.data,\n };\n }\n return undefined;\n },\n staleTime: cacheTTL,\n ...options,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/formula1/index.ts"],"names":[],"mappings":"AAkCA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,gBAAgB,EAAoC,MAAM,SAAS,CAAC;AAG7E,OAAO,EACL,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,aAAa,GAId,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/formula1/index.ts"],"names":[],"mappings":"AAkCA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,gBAAgB,EAAoC,MAAM,SAAS,CAAC;AAG7E,OAAO,EACL,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,aAAa,GAId,MAAM,SAAS,CAAC","sourcesContent":["/**\n * @module formula1\n * @description API-Formula-1 client library exports\n *\n * Provides type-safe access to the API-Formula-1 API with React hooks,\n * Zustand caching, and React Query integration.\n */\n\n// Types\nexport type {\n ApiF1Config,\n ApiF1Response,\n F1Circuit,\n F1CircuitsParams,\n F1Competition,\n F1CompetitionsParams,\n F1Driver,\n F1DriverRanking,\n F1DriverRankingsParams,\n F1DriversParams,\n F1PitStop,\n F1PitStopsParams,\n F1Race,\n F1RacesParams,\n F1RaceStatus,\n F1SeasonsParams,\n F1Team,\n F1TeamRanking,\n F1TeamRankingsParams,\n F1TeamsParams,\n F1Timezone,\n} from \"./types\";\n\n// Network\nexport {\n ApiF1Client,\n createApiF1Client,\n F1_API_BASE_URL,\n F1_DEFAULT_HEADERS,\n F1_ENDPOINTS,\n F1_RAPIDAPI_HOST,\n} from \"./network\";\n\n// Store\nexport { createApiF1Store, type ApiF1State, type ApiF1Store } from \"./store\";\n\n// Hooks\nexport {\n ApiF1Provider,\n apiF1Keys,\n useApiF1Client,\n useApiF1Store,\n useApiF1StoreContext,\n useF1Circuits,\n useF1Competitions,\n useF1DriverRankings,\n useF1Drivers,\n useF1PitStops,\n useF1Races,\n useF1Seasons,\n useF1TeamRankings,\n useF1Teams,\n useF1Timezone,\n type ApiF1ProviderProps,\n type UseApiF1QueryOptions,\n type UseApiF1QueryOptionsRequired,\n} from \"./hooks\";\n"]}
|