fansunited-data-layer 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/api/fansunited/constants.d.ts +5 -0
  2. package/api/fansunited/constants.d.ts.map +1 -0
  3. package/api/fansunited/football/competition/index.d.ts +30 -0
  4. package/api/fansunited/football/competition/index.d.ts.map +1 -0
  5. package/api/fansunited/football/competition/transformer.d.ts +11 -0
  6. package/api/fansunited/football/competition/transformer.d.ts.map +1 -0
  7. package/api/fansunited/football/competition/types.d.ts +70 -0
  8. package/api/fansunited/football/competition/types.d.ts.map +1 -0
  9. package/api/fansunited/football/competitions/index.d.ts +27 -0
  10. package/api/fansunited/football/competitions/index.d.ts.map +1 -0
  11. package/api/fansunited/football/competitions/transformer.d.ts +14 -0
  12. package/api/fansunited/football/competitions/transformer.d.ts.map +1 -0
  13. package/api/fansunited/football/competitions/types.d.ts +67 -0
  14. package/api/fansunited/football/competitions/types.d.ts.map +1 -0
  15. package/api/fansunited/football/http.d.ts +8 -0
  16. package/api/fansunited/football/http.d.ts.map +1 -0
  17. package/api/fansunited/football/index.d.ts +19 -0
  18. package/api/fansunited/football/index.d.ts.map +1 -0
  19. package/api/fansunited/football/matches/index.d.ts +61 -0
  20. package/api/fansunited/football/matches/index.d.ts.map +1 -0
  21. package/api/fansunited/football/matches/transformer.d.ts +28 -0
  22. package/api/fansunited/football/matches/transformer.d.ts.map +1 -0
  23. package/api/fansunited/football/matches/types.d.ts +328 -0
  24. package/api/fansunited/football/matches/types.d.ts.map +1 -0
  25. package/api/fansunited/football/players/index.d.ts +30 -0
  26. package/api/fansunited/football/players/index.d.ts.map +1 -0
  27. package/api/fansunited/football/players/transformer.d.ts +10 -0
  28. package/api/fansunited/football/players/transformer.d.ts.map +1 -0
  29. package/api/fansunited/football/players/types.d.ts +70 -0
  30. package/api/fansunited/football/players/types.d.ts.map +1 -0
  31. package/api/fansunited/football/search/index.d.ts +49 -0
  32. package/api/fansunited/football/search/index.d.ts.map +1 -0
  33. package/api/fansunited/football/search/transformer.d.ts +10 -0
  34. package/api/fansunited/football/search/transformer.d.ts.map +1 -0
  35. package/api/fansunited/football/search/types.d.ts +151 -0
  36. package/api/fansunited/football/search/types.d.ts.map +1 -0
  37. package/api/fansunited/football/teams/index.d.ts +30 -0
  38. package/api/fansunited/football/teams/index.d.ts.map +1 -0
  39. package/api/fansunited/football/teams/transformer.d.ts +10 -0
  40. package/api/fansunited/football/teams/transformer.d.ts.map +1 -0
  41. package/api/fansunited/football/teams/types.d.ts +87 -0
  42. package/api/fansunited/football/teams/types.d.ts.map +1 -0
  43. package/api/fansunited/http.d.ts +54 -0
  44. package/api/fansunited/http.d.ts.map +1 -0
  45. package/api/fansunited/index.d.ts +10 -0
  46. package/api/fansunited/index.d.ts.map +1 -0
  47. package/api/sportal365-sports/constants.d.ts +16 -0
  48. package/api/sportal365-sports/constants.d.ts.map +1 -0
  49. package/api/sportal365-sports/football/competitions/competition.types.d.ts +148 -0
  50. package/api/sportal365-sports/football/competitions/competition.types.d.ts.map +1 -0
  51. package/api/sportal365-sports/football/competitions/index.d.ts +54 -0
  52. package/api/sportal365-sports/football/competitions/index.d.ts.map +1 -0
  53. package/api/sportal365-sports/football/competitions/utils.d.ts +14 -0
  54. package/api/sportal365-sports/football/competitions/utils.d.ts.map +1 -0
  55. package/api/sportal365-sports/football/http.d.ts +8 -0
  56. package/api/sportal365-sports/football/http.d.ts.map +1 -0
  57. package/api/sportal365-sports/football/index.d.ts +19 -0
  58. package/api/sportal365-sports/football/index.d.ts.map +1 -0
  59. package/api/sportal365-sports/football/matches/index.d.ts +151 -0
  60. package/api/sportal365-sports/football/matches/index.d.ts.map +1 -0
  61. package/api/sportal365-sports/football/matches/transformers/commentary.d.ts +12 -0
  62. package/api/sportal365-sports/football/matches/transformers/commentary.d.ts.map +1 -0
  63. package/api/sportal365-sports/football/matches/transformers/index.d.ts +10 -0
  64. package/api/sportal365-sports/football/matches/transformers/index.d.ts.map +1 -0
  65. package/api/sportal365-sports/football/matches/transformers/lineup.d.ts +11 -0
  66. package/api/sportal365-sports/football/matches/transformers/lineup.d.ts.map +1 -0
  67. package/api/sportal365-sports/football/matches/transformers/match-event.d.ts +12 -0
  68. package/api/sportal365-sports/football/matches/transformers/match-event.d.ts.map +1 -0
  69. package/api/sportal365-sports/football/matches/transformers/match.d.ts +11 -0
  70. package/api/sportal365-sports/football/matches/transformers/match.d.ts.map +1 -0
  71. package/api/sportal365-sports/football/matches/transformers/odds.d.ts +11 -0
  72. package/api/sportal365-sports/football/matches/transformers/odds.d.ts.map +1 -0
  73. package/api/sportal365-sports/football/matches/transformers/statistics.d.ts +11 -0
  74. package/api/sportal365-sports/football/matches/transformers/statistics.d.ts.map +1 -0
  75. package/api/sportal365-sports/football/matches/types/commentary.types.d.ts +27 -0
  76. package/api/sportal365-sports/football/matches/types/commentary.types.d.ts.map +1 -0
  77. package/api/sportal365-sports/football/matches/types/event.types.d.ts +19 -0
  78. package/api/sportal365-sports/football/matches/types/event.types.d.ts.map +1 -0
  79. package/api/sportal365-sports/football/matches/types/index.d.ts +16 -0
  80. package/api/sportal365-sports/football/matches/types/index.d.ts.map +1 -0
  81. package/api/sportal365-sports/football/matches/types/lineup.types.d.ts +80 -0
  82. package/api/sportal365-sports/football/matches/types/lineup.types.d.ts.map +1 -0
  83. package/api/sportal365-sports/football/matches/types/match.types.d.ts +47 -0
  84. package/api/sportal365-sports/football/matches/types/match.types.d.ts.map +1 -0
  85. package/api/sportal365-sports/football/matches/types/minute.types.d.ts +8 -0
  86. package/api/sportal365-sports/football/matches/types/minute.types.d.ts.map +1 -0
  87. package/api/sportal365-sports/football/matches/types/odds.types.d.ts +80 -0
  88. package/api/sportal365-sports/football/matches/types/odds.types.d.ts.map +1 -0
  89. package/api/sportal365-sports/football/matches/types/option.types.d.ts +129 -0
  90. package/api/sportal365-sports/football/matches/types/option.types.d.ts.map +1 -0
  91. package/api/sportal365-sports/football/matches/types/referee.types.d.ts +13 -0
  92. package/api/sportal365-sports/football/matches/types/referee.types.d.ts.map +1 -0
  93. package/api/sportal365-sports/football/matches/types/statistics.types.d.ts +45 -0
  94. package/api/sportal365-sports/football/matches/types/statistics.types.d.ts.map +1 -0
  95. package/api/sportal365-sports/football/matches/types/status.types.d.ts +13 -0
  96. package/api/sportal365-sports/football/matches/types/status.types.d.ts.map +1 -0
  97. package/api/sportal365-sports/football/matches/types/team.types.d.ts +17 -0
  98. package/api/sportal365-sports/football/matches/types/team.types.d.ts.map +1 -0
  99. package/api/sportal365-sports/football/matches/types/winner.types.d.ts +15 -0
  100. package/api/sportal365-sports/football/matches/types/winner.types.d.ts.map +1 -0
  101. package/api/sportal365-sports/football/search/index.d.ts +45 -0
  102. package/api/sportal365-sports/football/search/index.d.ts.map +1 -0
  103. package/api/sportal365-sports/football/search/search.transformer.d.ts +10 -0
  104. package/api/sportal365-sports/football/search/search.transformer.d.ts.map +1 -0
  105. package/api/sportal365-sports/football/search/search.types.d.ts +147 -0
  106. package/api/sportal365-sports/football/search/search.types.d.ts.map +1 -0
  107. package/api/sportal365-sports/football/standings/index.d.ts +43 -0
  108. package/api/sportal365-sports/football/standings/index.d.ts.map +1 -0
  109. package/api/sportal365-sports/football/standings/standing.transformer.d.ts +15 -0
  110. package/api/sportal365-sports/football/standings/standing.transformer.d.ts.map +1 -0
  111. package/api/sportal365-sports/football/standings/standing.types.d.ts +73 -0
  112. package/api/sportal365-sports/football/standings/standing.types.d.ts.map +1 -0
  113. package/api/sportal365-sports/football/statistics/index.d.ts +42 -0
  114. package/api/sportal365-sports/football/statistics/index.d.ts.map +1 -0
  115. package/api/sportal365-sports/football/statistics/player-season.transformer.d.ts +11 -0
  116. package/api/sportal365-sports/football/statistics/player-season.transformer.d.ts.map +1 -0
  117. package/api/sportal365-sports/football/statistics/player-season.types.d.ts +84 -0
  118. package/api/sportal365-sports/football/statistics/player-season.types.d.ts.map +1 -0
  119. package/api/sportal365-sports/football/teams/index.d.ts +53 -0
  120. package/api/sportal365-sports/football/teams/index.d.ts.map +1 -0
  121. package/api/sportal365-sports/football/teams/squad.types.d.ts +63 -0
  122. package/api/sportal365-sports/football/teams/squad.types.d.ts.map +1 -0
  123. package/api/sportal365-sports/football/teams/team.types.d.ts +58 -0
  124. package/api/sportal365-sports/football/teams/team.types.d.ts.map +1 -0
  125. package/api/sportal365-sports/football/teams/utils.d.ts +24 -0
  126. package/api/sportal365-sports/football/teams/utils.d.ts.map +1 -0
  127. package/api/sportal365-sports/http.d.ts +59 -0
  128. package/api/sportal365-sports/http.d.ts.map +1 -0
  129. package/api/sportal365-sports/index.d.ts +14 -0
  130. package/api/sportal365-sports/index.d.ts.map +1 -0
  131. package/api/sportal365-sports/search/http.d.ts +8 -0
  132. package/api/sportal365-sports/search/http.d.ts.map +1 -0
  133. package/api/sportal365-sports/search/index.d.ts +43 -0
  134. package/api/sportal365-sports/search/index.d.ts.map +1 -0
  135. package/api/sportal365-sports/search/search.transformer.d.ts +10 -0
  136. package/api/sportal365-sports/search/search.transformer.d.ts.map +1 -0
  137. package/api/sportal365-sports/search/search.types.d.ts +209 -0
  138. package/api/sportal365-sports/search/search.types.d.ts.map +1 -0
  139. package/api/sportal365-sports/shared/index.d.ts +6 -0
  140. package/api/sportal365-sports/shared/index.d.ts.map +1 -0
  141. package/api/sportal365-sports/shared/providerRef.helper.d.ts +79 -0
  142. package/api/sportal365-sports/shared/providerRef.helper.d.ts.map +1 -0
  143. package/api/sportal365-sports/shared/types.d.ts +189 -0
  144. package/api/sportal365-sports/shared/types.d.ts.map +1 -0
  145. package/api/sportal365-sports/statistics/http.d.ts +8 -0
  146. package/api/sportal365-sports/statistics/http.d.ts.map +1 -0
  147. package/api/sportal365-sports/statistics/index.d.ts +55 -0
  148. package/api/sportal365-sports/statistics/index.d.ts.map +1 -0
  149. package/api/sportal365-sports/statistics/team-stats.transformer.d.ts +14 -0
  150. package/api/sportal365-sports/statistics/team-stats.transformer.d.ts.map +1 -0
  151. package/api/sportal365-sports/statistics/team-stats.types.d.ts +45 -0
  152. package/api/sportal365-sports/statistics/team-stats.types.d.ts.map +1 -0
  153. package/client.cjs +8 -0
  154. package/client.d.ts +20 -0
  155. package/client.d.ts.map +1 -0
  156. package/client.js +12065 -0
  157. package/config/index.d.ts +31 -0
  158. package/config/index.d.ts.map +1 -0
  159. package/config/types.d.ts +36 -0
  160. package/config/types.d.ts.map +1 -0
  161. package/fansunited-data-layer.cjs +1 -0
  162. package/fansunited-data-layer.js +1739 -0
  163. package/helpers/competition.helpers.d.ts +22 -0
  164. package/helpers/competition.helpers.d.ts.map +1 -0
  165. package/helpers/index.d.ts +7 -0
  166. package/helpers/index.d.ts.map +1 -0
  167. package/helpers/team.helpers.d.ts +289 -0
  168. package/helpers/team.helpers.d.ts.map +1 -0
  169. package/index-Cogo-Kkd.cjs +1 -0
  170. package/index-D7T2Yy11.js +1170 -0
  171. package/index.d.ts +39 -0
  172. package/index.d.ts.map +1 -0
  173. package/package.json +12 -15
  174. package/providers/competition/hooks/index.d.ts +6 -0
  175. package/providers/competition/hooks/index.d.ts.map +1 -0
  176. package/providers/competition/hooks/useCompetitionStats.d.ts +8 -0
  177. package/providers/competition/hooks/useCompetitionStats.d.ts.map +1 -0
  178. package/providers/competition/hooks/useGoalDistribution.d.ts +11 -0
  179. package/providers/competition/hooks/useGoalDistribution.d.ts.map +1 -0
  180. package/providers/competition/hooks/useMatchHelpers.d.ts +16 -0
  181. package/providers/competition/hooks/useMatchHelpers.d.ts.map +1 -0
  182. package/providers/competition/hooks/useStandingsCalculations.d.ts +18 -0
  183. package/providers/competition/hooks/useStandingsCalculations.d.ts.map +1 -0
  184. package/providers/competition/hooks/useStandingsHelpers.d.ts +23 -0
  185. package/providers/competition/hooks/useStandingsHelpers.d.ts.map +1 -0
  186. package/providers/competition/hooks/useTeamPosition.d.ts +8 -0
  187. package/providers/competition/hooks/useTeamPosition.d.ts.map +1 -0
  188. package/providers/competition/hooks/useTeamResultsTable.d.ts +9 -0
  189. package/providers/competition/hooks/useTeamResultsTable.d.ts.map +1 -0
  190. package/providers/competition/utils/competitionStats.d.ts +42 -0
  191. package/providers/competition/utils/competitionStats.d.ts.map +1 -0
  192. package/providers/competition/utils/goalDistribution.d.ts +41 -0
  193. package/providers/competition/utils/goalDistribution.d.ts.map +1 -0
  194. package/providers/competition/utils/index.d.ts +6 -0
  195. package/providers/competition/utils/index.d.ts.map +1 -0
  196. package/providers/competition/utils/standingsCalculations.d.ts +24 -0
  197. package/providers/competition/utils/standingsCalculations.d.ts.map +1 -0
  198. package/providers/competition.context.d.ts +8 -0
  199. package/providers/competition.context.d.ts.map +1 -0
  200. package/providers/competition.provider.d.ts +3 -0
  201. package/providers/competition.provider.d.ts.map +1 -0
  202. package/providers/competition.types.d.ts +118 -0
  203. package/providers/competition.types.d.ts.map +1 -0
  204. package/providers/fansunited-config.context.d.ts +6 -0
  205. package/providers/fansunited-config.context.d.ts.map +1 -0
  206. package/providers/fansunited-config.hooks.d.ts +19 -0
  207. package/providers/fansunited-config.hooks.d.ts.map +1 -0
  208. package/providers/fansunited-config.provider.d.ts +44 -0
  209. package/providers/fansunited-config.provider.d.ts.map +1 -0
  210. package/providers/fansunited-config.types.d.ts +48 -0
  211. package/providers/fansunited-config.types.d.ts.map +1 -0
  212. package/providers/fansunited-sdk.hook.d.ts +40 -0
  213. package/providers/fansunited-sdk.hook.d.ts.map +1 -0
  214. package/providers/index.d.ts +20 -0
  215. package/providers/index.d.ts.map +1 -0
  216. package/providers/match/hooks/useEventHelpers.d.ts +12 -0
  217. package/providers/match/hooks/useEventHelpers.d.ts.map +1 -0
  218. package/providers/match/hooks/useHeadToHeadHelpers.d.ts +13 -0
  219. package/providers/match/hooks/useHeadToHeadHelpers.d.ts.map +1 -0
  220. package/providers/match/hooks/useLineupHelpers.d.ts +13 -0
  221. package/providers/match/hooks/useLineupHelpers.d.ts.map +1 -0
  222. package/providers/match/hooks/useMatchStandingsCalculations.d.ts +20 -0
  223. package/providers/match/hooks/useMatchStandingsCalculations.d.ts.map +1 -0
  224. package/providers/match/hooks/useMatchStatus.d.ts +12 -0
  225. package/providers/match/hooks/useMatchStatus.d.ts.map +1 -0
  226. package/providers/match/hooks/useOddsHelpers.d.ts +10 -0
  227. package/providers/match/hooks/useOddsHelpers.d.ts.map +1 -0
  228. package/providers/match/hooks/useScoreHelpers.d.ts +16 -0
  229. package/providers/match/hooks/useScoreHelpers.d.ts.map +1 -0
  230. package/providers/match/hooks/useStandingsHelpers.d.ts +22 -0
  231. package/providers/match/hooks/useStandingsHelpers.d.ts.map +1 -0
  232. package/providers/match/hooks/useStatisticsHelpers.d.ts +13 -0
  233. package/providers/match/hooks/useStatisticsHelpers.d.ts.map +1 -0
  234. package/providers/match/hooks/useTeamHelpers.d.ts +11 -0
  235. package/providers/match/hooks/useTeamHelpers.d.ts.map +1 -0
  236. package/providers/match/hooks/useTeamStatsHelpers.d.ts +12 -0
  237. package/providers/match/hooks/useTeamStatsHelpers.d.ts.map +1 -0
  238. package/providers/match.context.d.ts +8 -0
  239. package/providers/match.context.d.ts.map +1 -0
  240. package/providers/match.provider.d.ts +3 -0
  241. package/providers/match.provider.d.ts.map +1 -0
  242. package/providers/match.types.d.ts +151 -0
  243. package/providers/match.types.d.ts.map +1 -0
  244. package/providers/team/hooks/useFormStats.d.ts +49 -0
  245. package/providers/team/hooks/useFormStats.d.ts.map +1 -0
  246. package/providers/team/hooks/useMatchHelpers.d.ts +12 -0
  247. package/providers/team/hooks/useMatchHelpers.d.ts.map +1 -0
  248. package/providers/team/hooks/useSquadHelpers.d.ts +17 -0
  249. package/providers/team/hooks/useSquadHelpers.d.ts.map +1 -0
  250. package/providers/team.context.d.ts +8 -0
  251. package/providers/team.context.d.ts.map +1 -0
  252. package/providers/team.provider.d.ts +3 -0
  253. package/providers/team.provider.d.ts.map +1 -0
  254. package/providers/team.types.d.ts +68 -0
  255. package/providers/team.types.d.ts.map +1 -0
  256. package/types/canonical/base.types.d.ts +366 -0
  257. package/types/canonical/base.types.d.ts.map +1 -0
  258. package/types/canonical/commentary.types.d.ts +42 -0
  259. package/types/canonical/commentary.types.d.ts.map +1 -0
  260. package/types/canonical/event.types.d.ts +31 -0
  261. package/types/canonical/event.types.d.ts.map +1 -0
  262. package/types/canonical/index.d.ts +17 -0
  263. package/types/canonical/index.d.ts.map +1 -0
  264. package/types/canonical/lineup.types.d.ts +33 -0
  265. package/types/canonical/lineup.types.d.ts.map +1 -0
  266. package/types/canonical/match.types.d.ts +153 -0
  267. package/types/canonical/match.types.d.ts.map +1 -0
  268. package/types/canonical/odds.types.d.ts +73 -0
  269. package/types/canonical/odds.types.d.ts.map +1 -0
  270. package/types/canonical/search.types.d.ts +101 -0
  271. package/types/canonical/search.types.d.ts.map +1 -0
  272. package/types/canonical/sports-search.types.d.ts +151 -0
  273. package/types/canonical/sports-search.types.d.ts.map +1 -0
  274. package/types/canonical/squad.types.d.ts +30 -0
  275. package/types/canonical/squad.types.d.ts.map +1 -0
  276. package/types/canonical/standing.types.d.ts +85 -0
  277. package/types/canonical/standing.types.d.ts.map +1 -0
  278. package/types/canonical/statistics.types.d.ts +81 -0
  279. package/types/canonical/statistics.types.d.ts.map +1 -0
  280. package/types/index.d.ts +10 -0
  281. package/types/index.d.ts.map +1 -0
  282. package/utilities/stats/core/helpers.d.ts +65 -0
  283. package/utilities/stats/core/helpers.d.ts.map +1 -0
  284. package/utilities/stats/core/index.d.ts +7 -0
  285. package/utilities/stats/core/index.d.ts.map +1 -0
  286. package/utilities/stats/core/types.d.ts +39 -0
  287. package/utilities/stats/core/types.d.ts.map +1 -0
  288. package/utilities/stats/index.d.ts +27 -0
  289. package/utilities/stats/index.d.ts.map +1 -0
  290. package/utilities/stats/match/headToHead.d.ts +73 -0
  291. package/utilities/stats/match/headToHead.d.ts.map +1 -0
  292. package/utilities/stats/match/homeVsAway.d.ts +30 -0
  293. package/utilities/stats/match/homeVsAway.d.ts.map +1 -0
  294. package/utilities/stats/match/index.d.ts +8 -0
  295. package/utilities/stats/match/index.d.ts.map +1 -0
  296. package/utilities/stats/match/overUnder.d.ts +59 -0
  297. package/utilities/stats/match/overUnder.d.ts.map +1 -0
  298. package/utilities/stats/match/result.d.ts +13 -0
  299. package/utilities/stats/match/result.d.ts.map +1 -0
  300. package/utilities/stats/team/commonOpponents.d.ts +28 -0
  301. package/utilities/stats/team/commonOpponents.d.ts.map +1 -0
  302. package/utilities/stats/team/goalStats.d.ts +42 -0
  303. package/utilities/stats/team/goalStats.d.ts.map +1 -0
  304. package/utilities/stats/team/index.d.ts +7 -0
  305. package/utilities/stats/team/index.d.ts.map +1 -0
  306. package/utilities/stats/team/streaks.d.ts +48 -0
  307. package/utilities/stats/team/streaks.d.ts.map +1 -0
  308. package/vite.svg +1 -0
@@ -0,0 +1,328 @@
1
+ /**
2
+ * Match types for Fans United Football API
3
+ */
4
+ import type { NextCacheOptions } from "../../http";
5
+ export interface RawCountry {
6
+ id: string;
7
+ alias?: string | null;
8
+ country_code?: string;
9
+ name: string;
10
+ assets?: {
11
+ flag?: string;
12
+ };
13
+ }
14
+ export interface RawVenue {
15
+ id: number;
16
+ name: string;
17
+ slug?: string;
18
+ city?: string;
19
+ capacity?: number;
20
+ }
21
+ export interface RawCompetition {
22
+ id: string;
23
+ name: string;
24
+ slug?: string;
25
+ type?: "league" | "cup" | "tournament";
26
+ gender?: "male" | "female";
27
+ country?: RawCountry;
28
+ assets?: {
29
+ logo?: string;
30
+ };
31
+ }
32
+ export interface RawSeason {
33
+ id: number;
34
+ name: string;
35
+ slug?: string;
36
+ }
37
+ export interface RawRound {
38
+ id: number;
39
+ key: string;
40
+ name: string;
41
+ type?: string;
42
+ }
43
+ export interface RawGroup {
44
+ id: number;
45
+ name: string;
46
+ }
47
+ export interface RawTeam {
48
+ id: string;
49
+ name: string;
50
+ full_name?: string | null;
51
+ short_name?: string | null;
52
+ code?: string;
53
+ national: boolean;
54
+ gender?: "male" | "female";
55
+ undecided?: boolean;
56
+ country?: RawCountry;
57
+ assets?: {
58
+ logo?: string;
59
+ };
60
+ }
61
+ export interface RawScore {
62
+ home_goals: number | null;
63
+ away_goals: number | null;
64
+ }
65
+ export interface RawScores {
66
+ ft_score?: RawScore;
67
+ ht_score?: RawScore;
68
+ aet_score?: RawScore;
69
+ agg_score?: RawScore;
70
+ pen_score?: RawScore;
71
+ }
72
+ export interface RawReferee {
73
+ id: number;
74
+ name: string;
75
+ role?: "REFEREE" | "ASSISTANT_1" | "ASSISTANT_2" | "FOURTH_OFFICIAL" | "VAR";
76
+ }
77
+ export interface RawMatchStatus {
78
+ code: string;
79
+ name: string;
80
+ short_name?: string;
81
+ type: "NOT_STARTED" | "LIVE" | "FINISHED" | "POSTPONED" | "CANCELLED" | "ABANDONED";
82
+ }
83
+ /**
84
+ * Team statistics from match stats object
85
+ */
86
+ export interface RawTeamStats {
87
+ home_team: number | null;
88
+ away_team: number | null;
89
+ }
90
+ /**
91
+ * Match statistics - team-level aggregated stats
92
+ */
93
+ export interface RawMatchStats {
94
+ possession?: RawTeamStats;
95
+ possession_1h?: RawTeamStats;
96
+ possession_2h?: RawTeamStats;
97
+ possession_et?: RawTeamStats;
98
+ shots_on?: RawTeamStats;
99
+ shots_on_1h?: RawTeamStats;
100
+ shots_on_2h?: RawTeamStats;
101
+ shots_on_et?: RawTeamStats;
102
+ shots_off?: RawTeamStats;
103
+ shots_off_1h?: RawTeamStats;
104
+ shots_off_2h?: RawTeamStats;
105
+ shots_off_et?: RawTeamStats;
106
+ shots_blocked?: RawTeamStats;
107
+ shots_blocked_1h?: RawTeamStats;
108
+ shots_blocked_2h?: RawTeamStats;
109
+ shots_blocked_et?: RawTeamStats;
110
+ corners?: RawTeamStats;
111
+ corners_1h?: RawTeamStats;
112
+ corners_2h?: RawTeamStats;
113
+ corners_et?: RawTeamStats;
114
+ crosses?: RawTeamStats;
115
+ crosses_1h?: RawTeamStats;
116
+ crosses_2h?: RawTeamStats;
117
+ crosses_et?: RawTeamStats;
118
+ throw_in?: RawTeamStats;
119
+ throw_in_1h?: RawTeamStats;
120
+ throw_in_2h?: RawTeamStats;
121
+ throw_in_et?: RawTeamStats;
122
+ goal_kicks?: RawTeamStats;
123
+ goal_kicks_1h?: RawTeamStats;
124
+ goal_kicks_2h?: RawTeamStats;
125
+ goal_kicks_et?: RawTeamStats;
126
+ yellow_cards?: RawTeamStats;
127
+ yellow_cards_1h?: RawTeamStats;
128
+ yellow_cards_2h?: RawTeamStats;
129
+ yellow_cards_et?: RawTeamStats;
130
+ red_cards?: RawTeamStats;
131
+ red_cards_1h?: RawTeamStats;
132
+ red_cards_2h?: RawTeamStats;
133
+ red_cards_et?: RawTeamStats;
134
+ fouls_committed?: RawTeamStats;
135
+ fouls_committed_1h?: RawTeamStats;
136
+ fouls_committed_2h?: RawTeamStats;
137
+ fouls_committed_et?: RawTeamStats;
138
+ offside?: RawTeamStats;
139
+ offside_1h?: RawTeamStats;
140
+ offside_2h?: RawTeamStats;
141
+ offside_et?: RawTeamStats;
142
+ substitutions?: RawTeamStats;
143
+ substitutions_1h?: RawTeamStats;
144
+ substitutions_2h?: RawTeamStats;
145
+ substitutions_et?: RawTeamStats;
146
+ counter_attacks?: RawTeamStats;
147
+ counter_attacks_1h?: RawTeamStats;
148
+ counter_attacks_2h?: RawTeamStats;
149
+ counter_attacks_et?: RawTeamStats;
150
+ treatments?: RawTeamStats;
151
+ treatments_1h?: RawTeamStats;
152
+ treatments_2h?: RawTeamStats;
153
+ treatments_et?: RawTeamStats;
154
+ }
155
+ /**
156
+ * Player statistics from match
157
+ */
158
+ export interface RawPlayerStats {
159
+ player_id: string;
160
+ position: string;
161
+ minutes_played: number;
162
+ goals: number | null;
163
+ penalty_goals: number | null;
164
+ own_goals: number | null;
165
+ assists: number | null;
166
+ shots: number | null;
167
+ shots_on: number | null;
168
+ shots_blocked: number | null;
169
+ yellow_cards: number | null;
170
+ red_cards: number | null;
171
+ fouls_committed: number | null;
172
+ fouls_won: number | null;
173
+ penalty_committed: number | null;
174
+ penalty_won: number | null;
175
+ penalty_missed: number | null;
176
+ penalty_saved: number | null;
177
+ penalty_received: number | null;
178
+ clean_sheets: number | null;
179
+ tackles: number | null;
180
+ tackles_blocks: number | null;
181
+ tackles_interceptions: number | null;
182
+ interceptions: number | null;
183
+ conceded_goals: number | null;
184
+ caught_ball: number | null;
185
+ saves: number | null;
186
+ passes: number | null;
187
+ passes_accuracy: number | null;
188
+ key_passes: number | null;
189
+ crosses: number | null;
190
+ duels: number | null;
191
+ duels_won: number | null;
192
+ dribbles_attempts: number | null;
193
+ dribbles_success: number | null;
194
+ dribbles_past: number | null;
195
+ offsides: number | null;
196
+ }
197
+ /**
198
+ * Raw lineup player from API
199
+ */
200
+ export interface RawLineupPlayer {
201
+ id: string;
202
+ name: string;
203
+ position: string;
204
+ shirt_number?: number;
205
+ assets?: {
206
+ headshot?: string;
207
+ };
208
+ type: "start" | "sub";
209
+ }
210
+ /**
211
+ * Raw team lineup from API
212
+ */
213
+ export interface RawTeamLineup {
214
+ players: RawLineupPlayer[];
215
+ }
216
+ /**
217
+ * Raw lineups from API
218
+ */
219
+ export interface RawLineups {
220
+ home_team: RawTeamLineup;
221
+ away_team: RawTeamLineup;
222
+ }
223
+ /**
224
+ * Match context from API (competition, season, round, etc.)
225
+ */
226
+ export interface RawMatchContext {
227
+ competition?: RawCompetition;
228
+ season?: RawSeason;
229
+ round?: RawRound;
230
+ group?: RawGroup;
231
+ venue?: RawVenue;
232
+ }
233
+ /**
234
+ * Match status from API
235
+ */
236
+ export interface RawMatchStatusInfo {
237
+ type: "notstarted" | "live" | "finished" | "postponed" | "cancelled" | "abandoned";
238
+ sub_type?: string;
239
+ }
240
+ /**
241
+ * Raw match data from API
242
+ */
243
+ export interface RawMatch {
244
+ id: string;
245
+ kickoff_at: string;
246
+ started_at?: string | null;
247
+ finished_at?: string | null;
248
+ updated_at?: string;
249
+ minute?: number | null;
250
+ lineups_confirmed?: boolean;
251
+ is_deleted?: boolean;
252
+ undecided?: boolean;
253
+ home_team: RawTeam;
254
+ away_team: RawTeam;
255
+ scores?: RawScores;
256
+ stats?: RawMatchStats;
257
+ player_stats?: RawPlayerStats[];
258
+ lineups?: RawLineups;
259
+ context?: RawMatchContext;
260
+ status?: RawMatchStatusInfo;
261
+ }
262
+ /**
263
+ * Raw match response from /v1/matches/{id}
264
+ * The API wraps the match data in a "data" property
265
+ */
266
+ export interface RawMatchResponse {
267
+ data: RawMatch;
268
+ }
269
+ /**
270
+ * Pagination metadata from API
271
+ */
272
+ export interface RawPaginationMeta {
273
+ current_page: number;
274
+ items_per_page: number;
275
+ total_items: number;
276
+ number_of_pages: number;
277
+ }
278
+ /**
279
+ * Response metadata from API
280
+ */
281
+ export interface RawResponseMeta {
282
+ pagination: RawPaginationMeta;
283
+ }
284
+ /**
285
+ * Raw matches response from /v1/matches
286
+ * The API wraps the matches array in a "data" property with pagination metadata
287
+ */
288
+ export interface RawMatchesResponse {
289
+ meta: RawResponseMeta;
290
+ data: RawMatch[];
291
+ }
292
+ export interface GetFootballMatchOptions {
293
+ /** Language code for translations (e.g., 'EN', 'BG'). Defaults to 'EN' */
294
+ lang?: string;
295
+ /** Next.js cache options for ISR/on-demand revalidation */
296
+ next?: NextCacheOptions;
297
+ }
298
+ export interface GetFootballMatchesOptions {
299
+ /** Language code for translations (e.g., 'EN', 'BG'). Defaults to 'EN' */
300
+ lang?: string;
301
+ /** A list of comma-separated competition IDs */
302
+ competitions?: string;
303
+ /** A list of comma-separated country IDs */
304
+ countries?: string;
305
+ /** Date-time string in ISO format (e.g., "2020-01-06T08:55:00Z") */
306
+ fromDate?: string;
307
+ /** Date-time string in ISO format (e.g., "2020-01-06T08:55:00Z") */
308
+ toDate?: string;
309
+ /** Number of matches returned by the request. Default is 20. Maximum is 500. */
310
+ limit?: number;
311
+ /** A list of comma-separated match IDs */
312
+ matches?: string;
313
+ /** Choose the page in the result set. Starts from 1. */
314
+ page?: number;
315
+ /** Show deleted matches */
316
+ showDeleted?: boolean;
317
+ /** The field by which the results will be sorted. Date by default. */
318
+ sortField?: string;
319
+ /** The direction of the sorting: ascending or descending */
320
+ sortOrder?: "asc" | "desc";
321
+ /** Filter by status: "upcoming", "live", or "finished" */
322
+ status?: "upcoming" | "live" | "finished";
323
+ /** A list of comma-separated team IDs. Returns all matches from any combination from 1 to 50 teams. */
324
+ teams?: string;
325
+ /** Next.js cache options for ISR/on-demand revalidation */
326
+ next?: NextCacheOptions;
327
+ }
328
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/fansunited/football/matches/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMnD,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACL;AAED,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,YAAY,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,MAAM,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAA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UAAU,EAAE,iBAAiB,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,QAAQ,EAAE,CAAC;CACpB;AAMD,MAAM,WAAW,uBAAuB;IACpC,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,yBAAyB;IACtC,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC3B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;IAC1C,uGAAuG;IACvG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Football player endpoints for Fans United Football API
3
+ */
4
+ import type { FUSportsPlayerCompetitor } from "../../../../types/canonical";
5
+ import { type DataLayerConfig } from "../../../../config";
6
+ import type { GetFootballPlayerOptions } from "./types";
7
+ export type { GetFootballPlayerOptions } from "./types";
8
+ /**
9
+ * Get a football player by ID from Fans United Football API
10
+ *
11
+ * @param playerId - The player ID
12
+ * @param options - Query options
13
+ * @param config - Optional data layer config (uses singleton if not provided)
14
+ * @returns Player in canonical format
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * import { getFansUnitedFootballPlayer } from 'fansunited-data-layer';
19
+ *
20
+ * // Get player by ID
21
+ * const player = await getFansUnitedFootballPlayer('456', {
22
+ * lang: 'EN'
23
+ * });
24
+ *
25
+ * console.log(player.name); // "Cristiano Ronaldo"
26
+ * console.log(player.position); // "Forward"
27
+ * ```
28
+ */
29
+ export declare function getFansUnitedFootballPlayer(playerId: string, options?: GetFootballPlayerOptions, config?: DataLayerConfig): Promise<FUSportsPlayerCompetitor>;
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/fansunited/football/players/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,KAAK,EAAE,wBAAwB,EAAqB,MAAM,SAAS,CAAC;AAI3E,YAAY,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,2BAA2B,CAC7C,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,wBAAwB,EAClC,MAAM,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,wBAAwB,CAAC,CAkBnC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Transform raw player data to canonical FUSports types
3
+ */
4
+ import type { FUSportsPlayerCompetitor } from "../../../../types/canonical";
5
+ import type { RawPlayerResponse } from "./types";
6
+ /**
7
+ * Transform raw player response to canonical FUSportsPlayerCompetitor
8
+ */
9
+ export declare function transformPlayer(raw: RawPlayerResponse): FUSportsPlayerCompetitor;
10
+ //# sourceMappingURL=transformer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/fansunited/football/players/transformer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,SAAS,CAAC;AA6CxE;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,iBAAiB,GAAG,wBAAwB,CAEhF"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Player types for Fans United Football API
3
+ */
4
+ import type { NextCacheOptions } from "../../http";
5
+ export interface RawCountry {
6
+ id: string;
7
+ alias?: string | null;
8
+ country_code?: string;
9
+ name: string;
10
+ assets?: {
11
+ flag?: string;
12
+ };
13
+ }
14
+ export interface RawSocial {
15
+ website?: string;
16
+ twitter?: string;
17
+ facebook?: string;
18
+ instagram?: string;
19
+ wikipedia?: string;
20
+ }
21
+ export interface RawProfile {
22
+ height?: string;
23
+ weight?: string;
24
+ }
25
+ export interface RawTeam {
26
+ id: string;
27
+ name: string;
28
+ full_name?: string | null;
29
+ short_name?: string | null;
30
+ code?: string;
31
+ national: boolean;
32
+ gender?: "male" | "female";
33
+ undecided?: boolean;
34
+ country?: RawCountry;
35
+ assets?: {
36
+ logo?: string;
37
+ };
38
+ }
39
+ /**
40
+ * Raw player data from API
41
+ */
42
+ export interface RawPlayer {
43
+ id: string;
44
+ name: string;
45
+ first_name?: string;
46
+ last_name?: string;
47
+ position?: string;
48
+ birth_date?: string;
49
+ is_deleted?: boolean;
50
+ country?: RawCountry;
51
+ assets?: {
52
+ headshot?: string;
53
+ };
54
+ teams?: RawTeam[];
55
+ competitions?: unknown[];
56
+ }
57
+ /**
58
+ * Raw player response from /v1/players/{id}
59
+ * The API wraps the player data in a "data" property
60
+ */
61
+ export interface RawPlayerResponse {
62
+ data: RawPlayer;
63
+ }
64
+ export interface GetFootballPlayerOptions {
65
+ /** Language code for translations (e.g., 'EN', 'BG'). Defaults to 'EN' */
66
+ lang?: string;
67
+ /** Next.js cache options for ISR/on-demand revalidation */
68
+ next?: NextCacheOptions;
69
+ }
70
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/fansunited/football/players/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMnD,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACL;AAED,MAAM,WAAW,SAAS;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,MAAM,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACL;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,MAAM,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,SAAS,CAAC;CACnB;AAMD,MAAM,WAAW,wBAAwB;IACrC,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Football search endpoints for Fans United Football API
3
+ */
4
+ import { type DataLayerConfig } from "../../../../config";
5
+ import type { GetFootballSearchOptions, FansUnitedFootballSearchResult } from "./types";
6
+ export type { GetFootballSearchOptions, SearchEntityType, FansUnitedFootballSearchResult } from "./types";
7
+ /**
8
+ * Search for football entities (competitions, teams, players)
9
+ *
10
+ * Returns empty array if no query is provided or no results are found.
11
+ * If no entity types are specified, defaults to searching all supported types: teams, players, competitions.
12
+ *
13
+ * @param options - Search options including query and optional entity types
14
+ * @param config - Optional data layer config (uses singleton if not provided)
15
+ * @returns Array of wrapped search results with source, entityType, entityId, and entityData
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * // Search for all entity types (defaults to teams, players, competitions)
20
+ * const results = await getFansUnitedFootballSearch({ query: 'premier' });
21
+ * console.log(`Found ${results.length} results`);
22
+ *
23
+ * // Search only for teams and players
24
+ * const results = await getFansUnitedFootballSearch({
25
+ * query: 'manchester',
26
+ * entityTypes: ['team', 'player']
27
+ * });
28
+ *
29
+ * // Handle results by entity type
30
+ * results.forEach(result => {
31
+ * console.log(`Source: ${result.source}`); // "FOOTBALL"
32
+ * console.log(`Entity ID: ${result.entityId}`); // "fb:t:123"
33
+ *
34
+ * switch (result.entityType) {
35
+ * case 'player':
36
+ * console.log(`Player: ${result.entityData.name} (${result.entityData.position})`);
37
+ * break;
38
+ * case 'team':
39
+ * console.log(`Team: ${result.entityData.name} (${result.entityData.threeLetterCode})`);
40
+ * break;
41
+ * case 'competition':
42
+ * console.log(`Competition: ${result.entityData.name} (${result.entityData.type})`);
43
+ * break;
44
+ * }
45
+ * });
46
+ * ```
47
+ */
48
+ export declare function getFansUnitedFootballSearch(options: GetFootballSearchOptions, config?: DataLayerConfig): Promise<FansUnitedFootballSearchResult[]>;
49
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/fansunited/football/search/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,KAAK,EAAE,wBAAwB,EAAqB,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAI3G,YAAY,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAE1G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAsB,2BAA2B,CAC7C,OAAO,EAAE,wBAAwB,EACjC,MAAM,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,8BAA8B,EAAE,CAAC,CA+E3C"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Transform raw search results to canonical FUSports types
3
+ */
4
+ import type { RawSearchResult, FansUnitedFootballSearchResult } from "./types";
5
+ /**
6
+ * Transform raw search result to wrapped canonical type with source and entity info
7
+ * Note: Currently only supports competition, team, and player entity types
8
+ */
9
+ export declare function transformSearchResult(raw: RawSearchResult): FansUnitedFootballSearchResult | null;
10
+ //# sourceMappingURL=transformer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../../../../src/lib/api/fansunited/football/search/transformer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EACR,eAAe,EAKf,8BAA8B,EACjC,MAAM,SAAS,CAAC;AAqGjB;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,eAAe,GAAG,8BAA8B,GAAG,IAAI,CAsCjG"}
@@ -0,0 +1,151 @@
1
+ /**
2
+ * Football search types for Fans United Football API
3
+ */
4
+ import type { NextCacheOptions } from "../../http";
5
+ import type { FUSportsCompetition, FUSportsTeamCompetitor, FUSportsPlayerCompetitor } from "../../../../types/canonical";
6
+ /**
7
+ * Entity types that can be searched in Fans United Football API
8
+ * API accepts: "teams", "players", "competitions"
9
+ */
10
+ export type SearchEntityType = "competition" | "team" | "player";
11
+ /**
12
+ * Wrapped search result with source and entity information
13
+ * Note: API currently only supports searching for teams, players, and competitions
14
+ * but may return other entity types in the future
15
+ */
16
+ export type FansUnitedFootballSearchResult = {
17
+ source: "FOOTBALL";
18
+ entityType: "competition";
19
+ entityId: string;
20
+ entityData: FUSportsCompetition;
21
+ } | {
22
+ source: "FOOTBALL";
23
+ entityType: "team";
24
+ entityId: string;
25
+ entityData: FUSportsTeamCompetitor;
26
+ } | {
27
+ source: "FOOTBALL";
28
+ entityType: "player";
29
+ entityId: string;
30
+ entityData: FUSportsPlayerCompetitor;
31
+ };
32
+ /**
33
+ * Options for football search
34
+ */
35
+ export interface GetFootballSearchOptions {
36
+ /** Search query string (required) */
37
+ query: string;
38
+ /** Entity types to search for (if not provided, defaults to all supported types: teams, players, competitions) */
39
+ entityTypes?: SearchEntityType[];
40
+ /** Language code for localized results (e.g., 'EN', 'BG') */
41
+ lang?: string;
42
+ /** Maximum number of results to return */
43
+ limit?: number;
44
+ /** Next.js cache options for ISR/on-demand revalidation */
45
+ next?: NextCacheOptions;
46
+ }
47
+ /**
48
+ * Raw country in search results
49
+ */
50
+ export interface RawSearchCountry {
51
+ id: string;
52
+ name: string;
53
+ country_code?: string;
54
+ alias?: string | null;
55
+ assets?: {
56
+ flag?: string | null;
57
+ };
58
+ }
59
+ /**
60
+ * Raw competition search result
61
+ */
62
+ export interface RawSearchCompetition {
63
+ id: string;
64
+ name: string;
65
+ short_name?: string | null;
66
+ type?: "LEAGUE" | "CUP" | "TOURNAMENT" | "FRIENDLY";
67
+ region?: "DOMESTIC" | "INTERNATIONAL" | "CONTINENTAL";
68
+ gender?: "male" | "female";
69
+ country?: RawSearchCountry;
70
+ assets?: {
71
+ logo?: string | null;
72
+ };
73
+ entity_type?: "competition";
74
+ }
75
+ /**
76
+ * Raw team search result
77
+ */
78
+ export interface RawSearchTeam {
79
+ id: string;
80
+ name: string;
81
+ full_name?: string | null;
82
+ short_name?: string | null;
83
+ code?: string | null;
84
+ national?: boolean;
85
+ gender?: "male" | "female";
86
+ undecided?: boolean | null;
87
+ country?: RawSearchCountry;
88
+ assets?: {
89
+ logo?: string | null;
90
+ };
91
+ entity_type?: "team";
92
+ }
93
+ /**
94
+ * Raw player search result
95
+ */
96
+ export interface RawSearchPlayer {
97
+ id: string;
98
+ name: string;
99
+ position?: string | null;
100
+ gender?: "male" | "female";
101
+ country?: RawSearchCountry;
102
+ birthdate?: string | null;
103
+ assets?: {
104
+ photo?: string | null;
105
+ };
106
+ entity_type?: "player";
107
+ }
108
+ /**
109
+ * Raw venue search result
110
+ */
111
+ export interface RawSearchVenue {
112
+ id: number;
113
+ name: string;
114
+ slug?: string;
115
+ country?: RawSearchCountry;
116
+ city?: string;
117
+ capacity?: number;
118
+ latitude?: number;
119
+ longitude?: number;
120
+ image?: string;
121
+ entity_type: "venue";
122
+ }
123
+ /**
124
+ * Raw coach search result
125
+ */
126
+ export interface RawSearchCoach {
127
+ id: number;
128
+ name: string;
129
+ slug?: string;
130
+ country?: RawSearchCountry;
131
+ birthdate?: string;
132
+ photo?: string;
133
+ entity_type: "coach";
134
+ }
135
+ /**
136
+ * Union type for all search result types
137
+ */
138
+ export type RawSearchResult = RawSearchCompetition | RawSearchTeam | RawSearchPlayer | RawSearchVenue | RawSearchCoach;
139
+ /**
140
+ * Raw search response from API
141
+ * The API returns results grouped by entity type
142
+ */
143
+ export interface RawSearchResponse {
144
+ data: {
145
+ teams?: RawSearchTeam[];
146
+ players?: RawSearchPlayer[];
147
+ competitions?: RawSearchCompetition[];
148
+ };
149
+ total?: number;
150
+ }
151
+ //# sourceMappingURL=types.d.ts.map