be-components 7.4.8 → 7.5.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 (575) hide show
  1. package/lib/commonjs/ApiOverrides/index.js +4 -0
  2. package/lib/commonjs/ApiOverrides/index.js.map +1 -1
  3. package/lib/commonjs/BetRouter/api/index.js +884 -0
  4. package/lib/commonjs/BetRouter/api/index.js.map +1 -0
  5. package/lib/commonjs/BetRouter/api/types.js +2 -0
  6. package/lib/commonjs/BetRouter/api/types.js.map +1 -0
  7. package/lib/commonjs/BetRouter/components/AccountManager.js +592 -0
  8. package/lib/commonjs/BetRouter/components/AccountManager.js.map +1 -0
  9. package/lib/commonjs/BetRouter/components/AdminPortal.js +51 -0
  10. package/lib/commonjs/BetRouter/components/AdminPortal.js.map +1 -0
  11. package/lib/commonjs/BetRouter/components/BuyOpportunities.js +550 -0
  12. package/lib/commonjs/BetRouter/components/BuyOpportunities.js.map +1 -0
  13. package/lib/commonjs/BetRouter/components/BuyOpportunityCard.js +320 -0
  14. package/lib/commonjs/BetRouter/components/BuyOpportunityCard.js.map +1 -0
  15. package/lib/commonjs/BetRouter/components/ContestLiquidity.js +666 -0
  16. package/lib/commonjs/BetRouter/components/ContestLiquidity.js.map +1 -0
  17. package/lib/commonjs/BetRouter/components/ContestSelector.js +193 -0
  18. package/lib/commonjs/BetRouter/components/ContestSelector.js.map +1 -0
  19. package/lib/commonjs/BetRouter/components/MyOpportunities.js +332 -0
  20. package/lib/commonjs/BetRouter/components/MyOpportunities.js.map +1 -0
  21. package/lib/commonjs/BetRouter/components/MyOpportunities.tsx.bak +440 -0
  22. package/lib/commonjs/BetRouter/components/OpportunityDetailModal.js +545 -0
  23. package/lib/commonjs/BetRouter/components/OpportunityDetailModal.js.map +1 -0
  24. package/lib/commonjs/BetRouter/components/OpportunityHistory.js +489 -0
  25. package/lib/commonjs/BetRouter/components/OpportunityHistory.js.map +1 -0
  26. package/lib/commonjs/BetRouter/components/PartnerCredentials.js +229 -0
  27. package/lib/commonjs/BetRouter/components/PartnerCredentials.js.map +1 -0
  28. package/lib/commonjs/BetRouter/components/PlacedOpportunityModal.js +262 -0
  29. package/lib/commonjs/BetRouter/components/PlacedOpportunityModal.js.map +1 -0
  30. package/lib/commonjs/BetRouter/components/admin/AutoFillView.js +380 -0
  31. package/lib/commonjs/BetRouter/components/admin/AutoFillView.js.map +1 -0
  32. package/lib/commonjs/BetRouter/components/admin/ConfigManager.js +814 -0
  33. package/lib/commonjs/BetRouter/components/admin/ConfigManager.js.map +1 -0
  34. package/lib/commonjs/BetRouter/components/admin/JobManager.js +895 -0
  35. package/lib/commonjs/BetRouter/components/admin/JobManager.js.map +1 -0
  36. package/lib/commonjs/BetRouter/components/admin/LeagueContests.js +2844 -0
  37. package/lib/commonjs/BetRouter/components/admin/LeagueContests.js.map +1 -0
  38. package/lib/commonjs/BetRouter/components/admin/LeagueInfo.js +378 -0
  39. package/lib/commonjs/BetRouter/components/admin/LeagueInfo.js.map +1 -0
  40. package/lib/commonjs/BetRouter/components/admin/LeagueParticipants.js +795 -0
  41. package/lib/commonjs/BetRouter/components/admin/LeagueParticipants.js.map +1 -0
  42. package/lib/commonjs/BetRouter/index.js +411 -0
  43. package/lib/commonjs/BetRouter/index.js.map +1 -0
  44. package/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.js +312 -0
  45. package/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.js.map +1 -0
  46. package/lib/commonjs/BetRouter/layouts/DesktopLayout.js +271 -0
  47. package/lib/commonjs/BetRouter/layouts/DesktopLayout.js.map +1 -0
  48. package/lib/commonjs/BetRouter/layouts/MobileAdminLayout.js +435 -0
  49. package/lib/commonjs/BetRouter/layouts/MobileAdminLayout.js.map +1 -0
  50. package/lib/commonjs/BetRouter/layouts/MobileLayout.js +293 -0
  51. package/lib/commonjs/BetRouter/layouts/MobileLayout.js.map +1 -0
  52. package/lib/commonjs/BetRouter/types/ADMIN_PORTAL.md +863 -0
  53. package/lib/commonjs/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
  54. package/lib/commonjs/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
  55. package/lib/commonjs/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
  56. package/lib/commonjs/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
  57. package/lib/commonjs/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
  58. package/lib/commonjs/BetRouter/types/README.md +249 -0
  59. package/lib/commonjs/BetRouter/types/accounts.js +2 -0
  60. package/lib/commonjs/BetRouter/types/accounts.js.map +1 -0
  61. package/lib/commonjs/BetRouter/types/api-contracts.js +776 -0
  62. package/lib/commonjs/BetRouter/types/api-contracts.js.map +1 -0
  63. package/lib/commonjs/BetRouter/types/config.js +2 -0
  64. package/lib/commonjs/BetRouter/types/config.js.map +1 -0
  65. package/lib/commonjs/BetRouter/types/contests.js +2 -0
  66. package/lib/commonjs/BetRouter/types/contests.js.map +1 -0
  67. package/lib/commonjs/BetRouter/types/credentials.js +90 -0
  68. package/lib/commonjs/BetRouter/types/credentials.js.map +1 -0
  69. package/lib/commonjs/BetRouter/types/index.js +149 -0
  70. package/lib/commonjs/BetRouter/types/index.js.map +1 -0
  71. package/lib/commonjs/BetRouter/types/jobs.js +2 -0
  72. package/lib/commonjs/BetRouter/types/jobs.js.map +1 -0
  73. package/lib/commonjs/BetRouter/types/leagues.js +2 -0
  74. package/lib/commonjs/BetRouter/types/leagues.js.map +1 -0
  75. package/lib/commonjs/BetRouter/types/liquidity.js +2 -0
  76. package/lib/commonjs/BetRouter/types/liquidity.js.map +1 -0
  77. package/lib/commonjs/BetRouter/types/markets.js +2 -0
  78. package/lib/commonjs/BetRouter/types/markets.js.map +1 -0
  79. package/lib/commonjs/BetRouter/types/opportunities.js +6 -0
  80. package/lib/commonjs/BetRouter/types/opportunities.js.map +1 -0
  81. package/lib/commonjs/BetRouter/types/orders.js +2 -0
  82. package/lib/commonjs/BetRouter/types/orders.js.map +1 -0
  83. package/lib/commonjs/BetRouter/types/participants.js +2 -0
  84. package/lib/commonjs/BetRouter/types/participants.js.map +1 -0
  85. package/lib/commonjs/BetRouter/types/partners.js +2 -0
  86. package/lib/commonjs/BetRouter/types/partners.js.map +1 -0
  87. package/lib/commonjs/Charts/README.md +310 -0
  88. package/lib/commonjs/Charts/adapters/TradeChartAdapter.js +406 -0
  89. package/lib/commonjs/Charts/adapters/TradeChartAdapter.js.map +1 -0
  90. package/lib/commonjs/Charts/components/BaseLineChart.js +285 -0
  91. package/lib/commonjs/Charts/components/BaseLineChart.js.map +1 -0
  92. package/lib/commonjs/Charts/components/LivePriceChart.js +504 -0
  93. package/lib/commonjs/Charts/components/LivePriceChart.js.map +1 -0
  94. package/lib/commonjs/Charts/index.js +126 -0
  95. package/lib/commonjs/Charts/index.js.map +1 -0
  96. package/lib/commonjs/Charts/themes/chartTheme.js +141 -0
  97. package/lib/commonjs/Charts/themes/chartTheme.js.map +1 -0
  98. package/lib/commonjs/Charts/types.js +2 -0
  99. package/lib/commonjs/Charts/types.js.map +1 -0
  100. package/lib/commonjs/Charts/utils/formatters.js +194 -0
  101. package/lib/commonjs/Charts/utils/formatters.js.map +1 -0
  102. package/lib/commonjs/Components/Dropdown.js +5 -3
  103. package/lib/commonjs/Components/Dropdown.js.map +1 -1
  104. package/lib/commonjs/Components/Icons.js +24 -0
  105. package/lib/commonjs/Components/Icons.js.map +1 -1
  106. package/lib/commonjs/Components/index.js +34 -0
  107. package/lib/commonjs/Components/index.js.map +1 -1
  108. package/lib/commonjs/index.js +28 -0
  109. package/lib/commonjs/index.js.map +1 -1
  110. package/lib/commonjs/types.d.js +16 -0
  111. package/lib/commonjs/types.d.js.map +1 -1
  112. package/lib/module/ApiOverrides/index.js +4 -0
  113. package/lib/module/ApiOverrides/index.js.map +1 -1
  114. package/lib/module/BetRouter/api/index.js +873 -0
  115. package/lib/module/BetRouter/api/index.js.map +1 -0
  116. package/lib/module/BetRouter/api/types.js +2 -0
  117. package/lib/module/BetRouter/api/types.js.map +1 -0
  118. package/lib/module/BetRouter/components/AccountManager.js +584 -0
  119. package/lib/module/BetRouter/components/AccountManager.js.map +1 -0
  120. package/lib/module/BetRouter/components/AdminPortal.js +43 -0
  121. package/lib/module/BetRouter/components/AdminPortal.js.map +1 -0
  122. package/lib/module/BetRouter/components/BuyOpportunities.js +542 -0
  123. package/lib/module/BetRouter/components/BuyOpportunities.js.map +1 -0
  124. package/lib/module/BetRouter/components/BuyOpportunityCard.js +313 -0
  125. package/lib/module/BetRouter/components/BuyOpportunityCard.js.map +1 -0
  126. package/lib/module/BetRouter/components/ContestLiquidity.js +658 -0
  127. package/lib/module/BetRouter/components/ContestLiquidity.js.map +1 -0
  128. package/lib/module/BetRouter/components/ContestSelector.js +185 -0
  129. package/lib/module/BetRouter/components/ContestSelector.js.map +1 -0
  130. package/lib/module/BetRouter/components/MyOpportunities.js +324 -0
  131. package/lib/module/BetRouter/components/MyOpportunities.js.map +1 -0
  132. package/lib/module/BetRouter/components/MyOpportunities.tsx.bak +440 -0
  133. package/lib/module/BetRouter/components/OpportunityDetailModal.js +538 -0
  134. package/lib/module/BetRouter/components/OpportunityDetailModal.js.map +1 -0
  135. package/lib/module/BetRouter/components/OpportunityHistory.js +481 -0
  136. package/lib/module/BetRouter/components/OpportunityHistory.js.map +1 -0
  137. package/lib/module/BetRouter/components/PartnerCredentials.js +222 -0
  138. package/lib/module/BetRouter/components/PartnerCredentials.js.map +1 -0
  139. package/lib/module/BetRouter/components/PlacedOpportunityModal.js +255 -0
  140. package/lib/module/BetRouter/components/PlacedOpportunityModal.js.map +1 -0
  141. package/lib/module/BetRouter/components/admin/AutoFillView.js +372 -0
  142. package/lib/module/BetRouter/components/admin/AutoFillView.js.map +1 -0
  143. package/lib/module/BetRouter/components/admin/ConfigManager.js +806 -0
  144. package/lib/module/BetRouter/components/admin/ConfigManager.js.map +1 -0
  145. package/lib/module/BetRouter/components/admin/JobManager.js +888 -0
  146. package/lib/module/BetRouter/components/admin/JobManager.js.map +1 -0
  147. package/lib/module/BetRouter/components/admin/LeagueContests.js +2836 -0
  148. package/lib/module/BetRouter/components/admin/LeagueContests.js.map +1 -0
  149. package/lib/module/BetRouter/components/admin/LeagueInfo.js +372 -0
  150. package/lib/module/BetRouter/components/admin/LeagueInfo.js.map +1 -0
  151. package/lib/module/BetRouter/components/admin/LeagueParticipants.js +787 -0
  152. package/lib/module/BetRouter/components/admin/LeagueParticipants.js.map +1 -0
  153. package/lib/module/BetRouter/index.js +399 -0
  154. package/lib/module/BetRouter/index.js.map +1 -0
  155. package/lib/module/BetRouter/layouts/DesktopAdminLayout.js +304 -0
  156. package/lib/module/BetRouter/layouts/DesktopAdminLayout.js.map +1 -0
  157. package/lib/module/BetRouter/layouts/DesktopLayout.js +263 -0
  158. package/lib/module/BetRouter/layouts/DesktopLayout.js.map +1 -0
  159. package/lib/module/BetRouter/layouts/MobileAdminLayout.js +427 -0
  160. package/lib/module/BetRouter/layouts/MobileAdminLayout.js.map +1 -0
  161. package/lib/module/BetRouter/layouts/MobileLayout.js +285 -0
  162. package/lib/module/BetRouter/layouts/MobileLayout.js.map +1 -0
  163. package/lib/module/BetRouter/types/ADMIN_PORTAL.md +863 -0
  164. package/lib/module/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
  165. package/lib/module/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
  166. package/lib/module/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
  167. package/lib/module/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
  168. package/lib/module/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
  169. package/lib/module/BetRouter/types/README.md +249 -0
  170. package/lib/module/BetRouter/types/accounts.js +2 -0
  171. package/lib/module/BetRouter/types/accounts.js.map +1 -0
  172. package/lib/module/BetRouter/types/api-contracts.js +770 -0
  173. package/lib/module/BetRouter/types/api-contracts.js.map +1 -0
  174. package/lib/module/BetRouter/types/config.js +2 -0
  175. package/lib/module/BetRouter/types/config.js.map +1 -0
  176. package/lib/module/BetRouter/types/contests.js +2 -0
  177. package/lib/module/BetRouter/types/contests.js.map +1 -0
  178. package/lib/module/BetRouter/types/credentials.js +78 -0
  179. package/lib/module/BetRouter/types/credentials.js.map +1 -0
  180. package/lib/module/BetRouter/types/index.js +17 -0
  181. package/lib/module/BetRouter/types/index.js.map +1 -0
  182. package/lib/module/BetRouter/types/jobs.js +2 -0
  183. package/lib/module/BetRouter/types/jobs.js.map +1 -0
  184. package/lib/module/BetRouter/types/leagues.js +2 -0
  185. package/lib/module/BetRouter/types/leagues.js.map +1 -0
  186. package/lib/module/BetRouter/types/liquidity.js +2 -0
  187. package/lib/module/BetRouter/types/liquidity.js.map +1 -0
  188. package/lib/module/BetRouter/types/markets.js +2 -0
  189. package/lib/module/BetRouter/types/markets.js.map +1 -0
  190. package/lib/module/BetRouter/types/opportunities.js +2 -0
  191. package/lib/module/BetRouter/types/opportunities.js.map +1 -0
  192. package/lib/module/BetRouter/types/orders.js +2 -0
  193. package/lib/module/BetRouter/types/orders.js.map +1 -0
  194. package/lib/module/BetRouter/types/participants.js +2 -0
  195. package/lib/module/BetRouter/types/participants.js.map +1 -0
  196. package/lib/module/BetRouter/types/partners.js +2 -0
  197. package/lib/module/BetRouter/types/partners.js.map +1 -0
  198. package/lib/module/Charts/README.md +310 -0
  199. package/lib/module/Charts/adapters/TradeChartAdapter.js +400 -0
  200. package/lib/module/Charts/adapters/TradeChartAdapter.js.map +1 -0
  201. package/lib/module/Charts/components/BaseLineChart.js +281 -0
  202. package/lib/module/Charts/components/BaseLineChart.js.map +1 -0
  203. package/lib/module/Charts/components/LivePriceChart.js +497 -0
  204. package/lib/module/Charts/components/LivePriceChart.js.map +1 -0
  205. package/lib/module/Charts/index.js +36 -0
  206. package/lib/module/Charts/index.js.map +1 -0
  207. package/lib/module/Charts/themes/chartTheme.js +134 -0
  208. package/lib/module/Charts/themes/chartTheme.js.map +1 -0
  209. package/lib/module/Charts/types.js +2 -0
  210. package/lib/module/Charts/types.js.map +1 -0
  211. package/lib/module/Charts/utils/formatters.js +178 -0
  212. package/lib/module/Charts/utils/formatters.js.map +1 -0
  213. package/lib/module/Components/Dropdown.js +5 -3
  214. package/lib/module/Components/Dropdown.js.map +1 -1
  215. package/lib/module/Components/Icons.js +24 -1
  216. package/lib/module/Components/Icons.js.map +1 -1
  217. package/lib/module/Components/index.js +3 -0
  218. package/lib/module/Components/index.js.map +1 -1
  219. package/lib/module/index.js +5 -1
  220. package/lib/module/index.js.map +1 -1
  221. package/lib/module/types.d.js +16 -0
  222. package/lib/module/types.d.js.map +1 -1
  223. package/lib/typescript/lib/commonjs/ApiOverrides/index.d.ts.map +1 -1
  224. package/lib/typescript/lib/commonjs/BetRouter/api/index.d.ts +109 -0
  225. package/lib/typescript/lib/commonjs/BetRouter/api/index.d.ts.map +1 -0
  226. package/lib/typescript/lib/commonjs/BetRouter/api/types.d.ts +2 -0
  227. package/lib/typescript/lib/commonjs/BetRouter/api/types.d.ts.map +1 -0
  228. package/lib/typescript/lib/commonjs/BetRouter/components/AccountManager.d.ts +16 -0
  229. package/lib/typescript/lib/commonjs/BetRouter/components/AccountManager.d.ts.map +1 -0
  230. package/lib/typescript/lib/commonjs/BetRouter/components/AdminPortal.d.ts +9 -0
  231. package/lib/typescript/lib/commonjs/BetRouter/components/AdminPortal.d.ts.map +1 -0
  232. package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunities.d.ts +16 -0
  233. package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
  234. package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunityCard.d.ts +14 -0
  235. package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
  236. package/lib/typescript/lib/commonjs/BetRouter/components/ContestLiquidity.d.ts +11 -0
  237. package/lib/typescript/lib/commonjs/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
  238. package/lib/typescript/lib/commonjs/BetRouter/components/ContestSelector.d.ts +11 -0
  239. package/lib/typescript/lib/commonjs/BetRouter/components/ContestSelector.d.ts.map +1 -0
  240. package/lib/typescript/lib/commonjs/BetRouter/components/MyOpportunities.d.ts +8 -0
  241. package/lib/typescript/lib/commonjs/BetRouter/components/MyOpportunities.d.ts.map +1 -0
  242. package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityDetailModal.d.ts +14 -0
  243. package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
  244. package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityHistory.d.ts +9 -0
  245. package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
  246. package/lib/typescript/lib/commonjs/BetRouter/components/PartnerCredentials.d.ts +10 -0
  247. package/lib/typescript/lib/commonjs/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
  248. package/lib/typescript/lib/commonjs/BetRouter/components/PlacedOpportunityModal.d.ts +11 -0
  249. package/lib/typescript/lib/commonjs/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
  250. package/lib/typescript/lib/commonjs/BetRouter/components/admin/AutoFillView.d.ts +4 -0
  251. package/lib/typescript/lib/commonjs/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
  252. package/lib/typescript/lib/commonjs/BetRouter/components/admin/ConfigManager.d.ts +4 -0
  253. package/lib/typescript/lib/commonjs/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
  254. package/lib/typescript/lib/commonjs/BetRouter/components/admin/JobManager.d.ts +4 -0
  255. package/lib/typescript/lib/commonjs/BetRouter/components/admin/JobManager.d.ts.map +1 -0
  256. package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueContests.d.ts +7 -0
  257. package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
  258. package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueInfo.d.ts +6 -0
  259. package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
  260. package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueParticipants.d.ts +6 -0
  261. package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
  262. package/lib/typescript/lib/commonjs/BetRouter/index.d.ts +8 -0
  263. package/lib/typescript/lib/commonjs/BetRouter/index.d.ts.map +1 -0
  264. package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.d.ts +9 -0
  265. package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
  266. package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopLayout.d.ts +20 -0
  267. package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
  268. package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileAdminLayout.d.ts +9 -0
  269. package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
  270. package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileLayout.d.ts +20 -0
  271. package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
  272. package/lib/typescript/lib/commonjs/BetRouter/types/accounts.d.ts +2 -0
  273. package/lib/typescript/lib/commonjs/BetRouter/types/accounts.d.ts.map +1 -0
  274. package/lib/typescript/lib/commonjs/BetRouter/types/api-contracts.d.ts +743 -0
  275. package/lib/typescript/lib/commonjs/BetRouter/types/api-contracts.d.ts.map +1 -0
  276. package/lib/typescript/lib/commonjs/BetRouter/types/config.d.ts +2 -0
  277. package/lib/typescript/lib/commonjs/BetRouter/types/config.d.ts.map +1 -0
  278. package/lib/typescript/lib/commonjs/BetRouter/types/contests.d.ts +2 -0
  279. package/lib/typescript/lib/commonjs/BetRouter/types/contests.d.ts.map +1 -0
  280. package/lib/typescript/lib/commonjs/BetRouter/types/credentials.d.ts +56 -0
  281. package/lib/typescript/lib/commonjs/BetRouter/types/credentials.d.ts.map +1 -0
  282. package/lib/typescript/lib/commonjs/BetRouter/types/index.d.ts +2 -0
  283. package/lib/typescript/lib/commonjs/BetRouter/types/index.d.ts.map +1 -0
  284. package/lib/typescript/lib/commonjs/BetRouter/types/jobs.d.ts +2 -0
  285. package/lib/typescript/lib/commonjs/BetRouter/types/jobs.d.ts.map +1 -0
  286. package/lib/typescript/lib/commonjs/BetRouter/types/leagues.d.ts +2 -0
  287. package/lib/typescript/lib/commonjs/BetRouter/types/leagues.d.ts.map +1 -0
  288. package/lib/typescript/lib/commonjs/BetRouter/types/liquidity.d.ts +2 -0
  289. package/lib/typescript/lib/commonjs/BetRouter/types/liquidity.d.ts.map +1 -0
  290. package/lib/typescript/lib/commonjs/BetRouter/types/markets.d.ts +2 -0
  291. package/lib/typescript/lib/commonjs/BetRouter/types/markets.d.ts.map +1 -0
  292. package/lib/typescript/lib/commonjs/BetRouter/types/opportunities.d.ts +2 -0
  293. package/lib/typescript/lib/commonjs/BetRouter/types/opportunities.d.ts.map +1 -0
  294. package/lib/typescript/lib/commonjs/BetRouter/types/orders.d.ts +2 -0
  295. package/lib/typescript/lib/commonjs/BetRouter/types/orders.d.ts.map +1 -0
  296. package/lib/typescript/lib/commonjs/BetRouter/types/participants.d.ts +2 -0
  297. package/lib/typescript/lib/commonjs/BetRouter/types/participants.d.ts.map +1 -0
  298. package/lib/typescript/lib/commonjs/BetRouter/types/partners.d.ts +2 -0
  299. package/lib/typescript/lib/commonjs/BetRouter/types/partners.d.ts.map +1 -0
  300. package/lib/typescript/lib/commonjs/Charts/adapters/TradeChartAdapter.d.ts +87 -0
  301. package/lib/typescript/lib/commonjs/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
  302. package/lib/typescript/lib/commonjs/Charts/components/BaseLineChart.d.ts +31 -0
  303. package/lib/typescript/lib/commonjs/Charts/components/BaseLineChart.d.ts.map +1 -0
  304. package/lib/typescript/lib/commonjs/Charts/components/LivePriceChart.d.ts +45 -0
  305. package/lib/typescript/lib/commonjs/Charts/components/LivePriceChart.d.ts.map +1 -0
  306. package/lib/typescript/lib/commonjs/Charts/index.d.ts +95 -0
  307. package/lib/typescript/lib/commonjs/Charts/index.d.ts.map +1 -0
  308. package/lib/typescript/lib/commonjs/Charts/themes/chartTheme.d.ts +106 -0
  309. package/lib/typescript/lib/commonjs/Charts/themes/chartTheme.d.ts.map +1 -0
  310. package/lib/typescript/lib/commonjs/Charts/types.d.ts +2 -0
  311. package/lib/typescript/lib/commonjs/Charts/types.d.ts.map +1 -0
  312. package/lib/typescript/lib/commonjs/Charts/utils/formatters.d.ts +24 -0
  313. package/lib/typescript/lib/commonjs/Charts/utils/formatters.d.ts.map +1 -0
  314. package/lib/typescript/lib/commonjs/Components/Dropdown.d.ts.map +1 -1
  315. package/lib/typescript/lib/commonjs/Components/Icons.d.ts +5 -0
  316. package/lib/typescript/lib/commonjs/Components/Icons.d.ts.map +1 -1
  317. package/lib/typescript/lib/commonjs/index.d.ts +4 -0
  318. package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
  319. package/lib/typescript/lib/module/ApiOverrides/index.d.ts.map +1 -1
  320. package/lib/typescript/lib/module/BetRouter/api/index.d.ts +108 -0
  321. package/lib/typescript/lib/module/BetRouter/api/index.d.ts.map +1 -0
  322. package/lib/typescript/lib/module/BetRouter/api/types.d.ts +2 -0
  323. package/lib/typescript/lib/module/BetRouter/api/types.d.ts.map +1 -0
  324. package/lib/typescript/lib/module/BetRouter/components/AccountManager.d.ts +16 -0
  325. package/lib/typescript/lib/module/BetRouter/components/AccountManager.d.ts.map +1 -0
  326. package/lib/typescript/lib/module/BetRouter/components/AdminPortal.d.ts +9 -0
  327. package/lib/typescript/lib/module/BetRouter/components/AdminPortal.d.ts.map +1 -0
  328. package/lib/typescript/lib/module/BetRouter/components/BuyOpportunities.d.ts +16 -0
  329. package/lib/typescript/lib/module/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
  330. package/lib/typescript/lib/module/BetRouter/components/BuyOpportunityCard.d.ts +14 -0
  331. package/lib/typescript/lib/module/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
  332. package/lib/typescript/lib/module/BetRouter/components/ContestLiquidity.d.ts +11 -0
  333. package/lib/typescript/lib/module/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
  334. package/lib/typescript/lib/module/BetRouter/components/ContestSelector.d.ts +11 -0
  335. package/lib/typescript/lib/module/BetRouter/components/ContestSelector.d.ts.map +1 -0
  336. package/lib/typescript/lib/module/BetRouter/components/MyOpportunities.d.ts +8 -0
  337. package/lib/typescript/lib/module/BetRouter/components/MyOpportunities.d.ts.map +1 -0
  338. package/lib/typescript/lib/module/BetRouter/components/OpportunityDetailModal.d.ts +15 -0
  339. package/lib/typescript/lib/module/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
  340. package/lib/typescript/lib/module/BetRouter/components/OpportunityHistory.d.ts +9 -0
  341. package/lib/typescript/lib/module/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
  342. package/lib/typescript/lib/module/BetRouter/components/PartnerCredentials.d.ts +11 -0
  343. package/lib/typescript/lib/module/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
  344. package/lib/typescript/lib/module/BetRouter/components/PlacedOpportunityModal.d.ts +12 -0
  345. package/lib/typescript/lib/module/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
  346. package/lib/typescript/lib/module/BetRouter/components/admin/AutoFillView.d.ts +4 -0
  347. package/lib/typescript/lib/module/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
  348. package/lib/typescript/lib/module/BetRouter/components/admin/ConfigManager.d.ts +4 -0
  349. package/lib/typescript/lib/module/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
  350. package/lib/typescript/lib/module/BetRouter/components/admin/JobManager.d.ts +4 -0
  351. package/lib/typescript/lib/module/BetRouter/components/admin/JobManager.d.ts.map +1 -0
  352. package/lib/typescript/lib/module/BetRouter/components/admin/LeagueContests.d.ts +9 -0
  353. package/lib/typescript/lib/module/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
  354. package/lib/typescript/lib/module/BetRouter/components/admin/LeagueInfo.d.ts +6 -0
  355. package/lib/typescript/lib/module/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
  356. package/lib/typescript/lib/module/BetRouter/components/admin/LeagueParticipants.d.ts +8 -0
  357. package/lib/typescript/lib/module/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
  358. package/lib/typescript/lib/module/BetRouter/index.d.ts +9 -0
  359. package/lib/typescript/lib/module/BetRouter/index.d.ts.map +1 -0
  360. package/lib/typescript/lib/module/BetRouter/layouts/DesktopAdminLayout.d.ts +9 -0
  361. package/lib/typescript/lib/module/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
  362. package/lib/typescript/lib/module/BetRouter/layouts/DesktopLayout.d.ts +20 -0
  363. package/lib/typescript/lib/module/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
  364. package/lib/typescript/lib/module/BetRouter/layouts/MobileAdminLayout.d.ts +9 -0
  365. package/lib/typescript/lib/module/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
  366. package/lib/typescript/lib/module/BetRouter/layouts/MobileLayout.d.ts +20 -0
  367. package/lib/typescript/lib/module/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
  368. package/lib/typescript/lib/module/BetRouter/types/accounts.d.ts +2 -0
  369. package/lib/typescript/lib/module/BetRouter/types/accounts.d.ts.map +1 -0
  370. package/lib/typescript/lib/module/BetRouter/types/api-contracts.d.ts +742 -0
  371. package/lib/typescript/lib/module/BetRouter/types/api-contracts.d.ts.map +1 -0
  372. package/lib/typescript/lib/module/BetRouter/types/config.d.ts +2 -0
  373. package/lib/typescript/lib/module/BetRouter/types/config.d.ts.map +1 -0
  374. package/lib/typescript/lib/module/BetRouter/types/contests.d.ts +2 -0
  375. package/lib/typescript/lib/module/BetRouter/types/contests.d.ts.map +1 -0
  376. package/lib/typescript/lib/module/BetRouter/types/credentials.d.ts +55 -0
  377. package/lib/typescript/lib/module/BetRouter/types/credentials.d.ts.map +1 -0
  378. package/lib/typescript/lib/module/BetRouter/types/index.d.ts +14 -0
  379. package/lib/typescript/lib/module/BetRouter/types/index.d.ts.map +1 -0
  380. package/lib/typescript/lib/module/BetRouter/types/jobs.d.ts +2 -0
  381. package/lib/typescript/lib/module/BetRouter/types/jobs.d.ts.map +1 -0
  382. package/lib/typescript/lib/module/BetRouter/types/leagues.d.ts +2 -0
  383. package/lib/typescript/lib/module/BetRouter/types/leagues.d.ts.map +1 -0
  384. package/lib/typescript/lib/module/BetRouter/types/liquidity.d.ts +2 -0
  385. package/lib/typescript/lib/module/BetRouter/types/liquidity.d.ts.map +1 -0
  386. package/lib/typescript/lib/module/BetRouter/types/markets.d.ts +2 -0
  387. package/lib/typescript/lib/module/BetRouter/types/markets.d.ts.map +1 -0
  388. package/lib/typescript/lib/module/BetRouter/types/opportunities.d.ts +2 -0
  389. package/lib/typescript/lib/module/BetRouter/types/opportunities.d.ts.map +1 -0
  390. package/lib/typescript/lib/module/BetRouter/types/orders.d.ts +2 -0
  391. package/lib/typescript/lib/module/BetRouter/types/orders.d.ts.map +1 -0
  392. package/lib/typescript/lib/module/BetRouter/types/participants.d.ts +2 -0
  393. package/lib/typescript/lib/module/BetRouter/types/participants.d.ts.map +1 -0
  394. package/lib/typescript/lib/module/BetRouter/types/partners.d.ts +2 -0
  395. package/lib/typescript/lib/module/BetRouter/types/partners.d.ts.map +1 -0
  396. package/lib/typescript/lib/module/Charts/adapters/TradeChartAdapter.d.ts +81 -0
  397. package/lib/typescript/lib/module/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
  398. package/lib/typescript/lib/module/Charts/components/BaseLineChart.d.ts +31 -0
  399. package/lib/typescript/lib/module/Charts/components/BaseLineChart.d.ts.map +1 -0
  400. package/lib/typescript/lib/module/Charts/components/LivePriceChart.d.ts +41 -0
  401. package/lib/typescript/lib/module/Charts/components/LivePriceChart.d.ts.map +1 -0
  402. package/lib/typescript/lib/module/Charts/index.d.ts +6 -0
  403. package/lib/typescript/lib/module/Charts/index.d.ts.map +1 -0
  404. package/lib/typescript/lib/module/Charts/themes/chartTheme.d.ts +102 -0
  405. package/lib/typescript/lib/module/Charts/themes/chartTheme.d.ts.map +1 -0
  406. package/lib/typescript/lib/module/Charts/types.d.ts +2 -0
  407. package/lib/typescript/lib/module/Charts/types.d.ts.map +1 -0
  408. package/lib/typescript/lib/module/Charts/utils/formatters.d.ts +14 -0
  409. package/lib/typescript/lib/module/Charts/utils/formatters.d.ts.map +1 -0
  410. package/lib/typescript/lib/module/Components/Dropdown.d.ts.map +1 -1
  411. package/lib/typescript/lib/module/Components/Icons.d.ts +5 -0
  412. package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
  413. package/lib/typescript/lib/module/Components/index.d.ts +1 -0
  414. package/lib/typescript/lib/module/Components/index.d.ts.map +1 -1
  415. package/lib/typescript/lib/module/index.d.ts +3 -1
  416. package/lib/typescript/lib/module/index.d.ts.map +1 -1
  417. package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
  418. package/lib/typescript/src/BetRouter/api/index.d.ts +115 -0
  419. package/lib/typescript/src/BetRouter/api/index.d.ts.map +1 -0
  420. package/lib/typescript/src/BetRouter/api/types.d.ts +2 -0
  421. package/lib/typescript/src/BetRouter/api/types.d.ts.map +1 -0
  422. package/lib/typescript/src/BetRouter/components/AccountManager.d.ts +18 -0
  423. package/lib/typescript/src/BetRouter/components/AccountManager.d.ts.map +1 -0
  424. package/lib/typescript/src/BetRouter/components/AdminPortal.d.ts +15 -0
  425. package/lib/typescript/src/BetRouter/components/AdminPortal.d.ts.map +1 -0
  426. package/lib/typescript/src/BetRouter/components/BuyOpportunities.d.ts +24 -0
  427. package/lib/typescript/src/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
  428. package/lib/typescript/src/BetRouter/components/BuyOpportunityCard.d.ts +19 -0
  429. package/lib/typescript/src/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
  430. package/lib/typescript/src/BetRouter/components/ContestLiquidity.d.ts +15 -0
  431. package/lib/typescript/src/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
  432. package/lib/typescript/src/BetRouter/components/ContestSelector.d.ts +13 -0
  433. package/lib/typescript/src/BetRouter/components/ContestSelector.d.ts.map +1 -0
  434. package/lib/typescript/src/BetRouter/components/MyOpportunities.d.ts +16 -0
  435. package/lib/typescript/src/BetRouter/components/MyOpportunities.d.ts.map +1 -0
  436. package/lib/typescript/src/BetRouter/components/OpportunityDetailModal.d.ts +21 -0
  437. package/lib/typescript/src/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
  438. package/lib/typescript/src/BetRouter/components/OpportunityHistory.d.ts +20 -0
  439. package/lib/typescript/src/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
  440. package/lib/typescript/src/BetRouter/components/PartnerCredentials.d.ts +12 -0
  441. package/lib/typescript/src/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
  442. package/lib/typescript/src/BetRouter/components/PlacedOpportunityModal.d.ts +18 -0
  443. package/lib/typescript/src/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
  444. package/lib/typescript/src/BetRouter/components/admin/AutoFillView.d.ts +4 -0
  445. package/lib/typescript/src/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
  446. package/lib/typescript/src/BetRouter/components/admin/ConfigManager.d.ts +4 -0
  447. package/lib/typescript/src/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
  448. package/lib/typescript/src/BetRouter/components/admin/JobManager.d.ts +4 -0
  449. package/lib/typescript/src/BetRouter/components/admin/JobManager.d.ts.map +1 -0
  450. package/lib/typescript/src/BetRouter/components/admin/LeagueContests.d.ts +9 -0
  451. package/lib/typescript/src/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
  452. package/lib/typescript/src/BetRouter/components/admin/LeagueInfo.d.ts +8 -0
  453. package/lib/typescript/src/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
  454. package/lib/typescript/src/BetRouter/components/admin/LeagueParticipants.d.ts +8 -0
  455. package/lib/typescript/src/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
  456. package/lib/typescript/src/BetRouter/index.d.ts +16 -0
  457. package/lib/typescript/src/BetRouter/index.d.ts.map +1 -0
  458. package/lib/typescript/src/BetRouter/layouts/DesktopAdminLayout.d.ts +15 -0
  459. package/lib/typescript/src/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
  460. package/lib/typescript/src/BetRouter/layouts/DesktopLayout.d.ts +44 -0
  461. package/lib/typescript/src/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
  462. package/lib/typescript/src/BetRouter/layouts/MobileAdminLayout.d.ts +15 -0
  463. package/lib/typescript/src/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
  464. package/lib/typescript/src/BetRouter/layouts/MobileLayout.d.ts +44 -0
  465. package/lib/typescript/src/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
  466. package/lib/typescript/src/BetRouter/types/accounts.d.ts +19 -0
  467. package/lib/typescript/src/BetRouter/types/accounts.d.ts.map +1 -0
  468. package/lib/typescript/src/BetRouter/types/api-contracts.d.ts +1071 -0
  469. package/lib/typescript/src/BetRouter/types/api-contracts.d.ts.map +1 -0
  470. package/lib/typescript/src/BetRouter/types/config.d.ts +12 -0
  471. package/lib/typescript/src/BetRouter/types/config.d.ts.map +1 -0
  472. package/lib/typescript/src/BetRouter/types/contests.d.ts +34 -0
  473. package/lib/typescript/src/BetRouter/types/contests.d.ts.map +1 -0
  474. package/lib/typescript/src/BetRouter/types/credentials.d.ts +24 -0
  475. package/lib/typescript/src/BetRouter/types/credentials.d.ts.map +1 -0
  476. package/lib/typescript/src/BetRouter/types/index.d.ts +14 -0
  477. package/lib/typescript/src/BetRouter/types/index.d.ts.map +1 -0
  478. package/lib/typescript/src/BetRouter/types/jobs.d.ts +35 -0
  479. package/lib/typescript/src/BetRouter/types/jobs.d.ts.map +1 -0
  480. package/lib/typescript/src/BetRouter/types/leagues.d.ts +26 -0
  481. package/lib/typescript/src/BetRouter/types/leagues.d.ts.map +1 -0
  482. package/lib/typescript/src/BetRouter/types/liquidity.d.ts +14 -0
  483. package/lib/typescript/src/BetRouter/types/liquidity.d.ts.map +1 -0
  484. package/lib/typescript/src/BetRouter/types/markets.d.ts +87 -0
  485. package/lib/typescript/src/BetRouter/types/markets.d.ts.map +1 -0
  486. package/lib/typescript/src/BetRouter/types/opportunities.d.ts +88 -0
  487. package/lib/typescript/src/BetRouter/types/opportunities.d.ts.map +1 -0
  488. package/lib/typescript/src/BetRouter/types/orders.d.ts +34 -0
  489. package/lib/typescript/src/BetRouter/types/orders.d.ts.map +1 -0
  490. package/lib/typescript/src/BetRouter/types/participants.d.ts +33 -0
  491. package/lib/typescript/src/BetRouter/types/participants.d.ts.map +1 -0
  492. package/lib/typescript/src/BetRouter/types/partners.d.ts +11 -0
  493. package/lib/typescript/src/BetRouter/types/partners.d.ts.map +1 -0
  494. package/lib/typescript/src/Charts/adapters/TradeChartAdapter.d.ts +117 -0
  495. package/lib/typescript/src/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
  496. package/lib/typescript/src/Charts/components/BaseLineChart.d.ts +40 -0
  497. package/lib/typescript/src/Charts/components/BaseLineChart.d.ts.map +1 -0
  498. package/lib/typescript/src/Charts/components/LivePriceChart.d.ts +13 -0
  499. package/lib/typescript/src/Charts/components/LivePriceChart.d.ts.map +1 -0
  500. package/lib/typescript/src/Charts/index.d.ts +28 -0
  501. package/lib/typescript/src/Charts/index.d.ts.map +1 -0
  502. package/lib/typescript/src/Charts/themes/chartTheme.d.ts +78 -0
  503. package/lib/typescript/src/Charts/themes/chartTheme.d.ts.map +1 -0
  504. package/lib/typescript/src/Charts/types.d.ts +155 -0
  505. package/lib/typescript/src/Charts/types.d.ts.map +1 -0
  506. package/lib/typescript/src/Charts/utils/formatters.d.ts +66 -0
  507. package/lib/typescript/src/Charts/utils/formatters.d.ts.map +1 -0
  508. package/lib/typescript/src/Components/Dropdown.d.ts.map +1 -1
  509. package/lib/typescript/src/Components/Icons.d.ts +1 -0
  510. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  511. package/lib/typescript/src/Components/index.d.ts +1 -0
  512. package/lib/typescript/src/Components/index.d.ts.map +1 -1
  513. package/lib/typescript/src/index.d.ts +4 -1
  514. package/lib/typescript/src/index.d.ts.map +1 -1
  515. package/package.json +4 -2
  516. package/src/ApiOverrides/index.ts +4 -0
  517. package/src/BetRouter/api/index.ts +854 -0
  518. package/src/BetRouter/api/types.ts +0 -0
  519. package/src/BetRouter/components/AccountManager.tsx +533 -0
  520. package/src/BetRouter/components/AdminPortal.tsx +44 -0
  521. package/src/BetRouter/components/BuyOpportunities.tsx +491 -0
  522. package/src/BetRouter/components/BuyOpportunityCard.tsx +331 -0
  523. package/src/BetRouter/components/ContestLiquidity.tsx +613 -0
  524. package/src/BetRouter/components/ContestSelector.tsx +179 -0
  525. package/src/BetRouter/components/MyOpportunities.tsx +279 -0
  526. package/src/BetRouter/components/MyOpportunities.tsx.bak +440 -0
  527. package/src/BetRouter/components/OpportunityDetailModal.tsx +360 -0
  528. package/src/BetRouter/components/OpportunityHistory.tsx +408 -0
  529. package/src/BetRouter/components/PartnerCredentials.tsx +212 -0
  530. package/src/BetRouter/components/PlacedOpportunityModal.tsx +192 -0
  531. package/src/BetRouter/components/admin/AutoFillView.tsx +275 -0
  532. package/src/BetRouter/components/admin/ConfigManager.tsx +596 -0
  533. package/src/BetRouter/components/admin/JobManager.tsx +758 -0
  534. package/src/BetRouter/components/admin/LeagueContests.tsx +2443 -0
  535. package/src/BetRouter/components/admin/LeagueInfo.tsx +253 -0
  536. package/src/BetRouter/components/admin/LeagueParticipants.tsx +662 -0
  537. package/src/BetRouter/index.tsx +453 -0
  538. package/src/BetRouter/layouts/DesktopAdminLayout.tsx +348 -0
  539. package/src/BetRouter/layouts/DesktopLayout.tsx +292 -0
  540. package/src/BetRouter/layouts/MobileAdminLayout.tsx +387 -0
  541. package/src/BetRouter/layouts/MobileLayout.tsx +325 -0
  542. package/src/BetRouter/types/ADMIN_PORTAL.md +863 -0
  543. package/src/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
  544. package/src/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
  545. package/src/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
  546. package/src/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
  547. package/src/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
  548. package/src/BetRouter/types/README.md +249 -0
  549. package/src/BetRouter/types/accounts.ts +21 -0
  550. package/src/BetRouter/types/api-contracts.ts +1164 -0
  551. package/src/BetRouter/types/config.ts +12 -0
  552. package/src/BetRouter/types/contests.ts +37 -0
  553. package/src/BetRouter/types/credentials.ts +99 -0
  554. package/src/BetRouter/types/index.ts +16 -0
  555. package/src/BetRouter/types/jobs.ts +37 -0
  556. package/src/BetRouter/types/leagues.ts +29 -0
  557. package/src/BetRouter/types/liquidity.ts +15 -0
  558. package/src/BetRouter/types/markets.ts +94 -0
  559. package/src/BetRouter/types/opportunities.ts +107 -0
  560. package/src/BetRouter/types/orders.ts +51 -0
  561. package/src/BetRouter/types/participants.ts +34 -0
  562. package/src/BetRouter/types/partners.ts +10 -0
  563. package/src/Charts/README.md +310 -0
  564. package/src/Charts/adapters/TradeChartAdapter.ts +471 -0
  565. package/src/Charts/components/BaseLineChart.tsx +293 -0
  566. package/src/Charts/components/LivePriceChart.tsx +521 -0
  567. package/src/Charts/index.tsx +62 -0
  568. package/src/Charts/themes/chartTheme.ts +113 -0
  569. package/src/Charts/types.ts +160 -0
  570. package/src/Charts/utils/formatters.ts +182 -0
  571. package/src/Components/Dropdown.tsx +6 -3
  572. package/src/Components/Icons.tsx +12 -0
  573. package/src/Components/index.tsx +4 -0
  574. package/src/index.tsx +6 -0
  575. package/src/types.d.ts +410 -2
@@ -0,0 +1,863 @@
1
+ # BetRouter Admin Portal - Implementation Guide
2
+
3
+ This document provides comprehensive instructions for building an admin portal to manage the BetRouter system. The portal will help admins visualize and manage the one-to-many relationships between router entities, raw partner data, and partner links.
4
+
5
+ ## 📊 Architecture Overview
6
+
7
+ BetRouter uses a **one-to-many architecture** with three layers:
8
+
9
+ ```
10
+ ┌─────────────────┐
11
+ │ Router Layer │ ← Canonical/normalized entities (source of truth)
12
+ │ (router_*) │
13
+ └────────┬────────┘
14
+
15
+ ↓ (one-to-many)
16
+ ┌─────────────────┐
17
+ │ Raw Layer │ ← Partner-specific data (as-is from partners)
18
+ │ (raw_*) │
19
+ └────────┬────────┘
20
+
21
+ ↓ (linked via)
22
+ ┌─────────────────┐
23
+ │ Partner Layer │ ← Junction table linking router ↔ raw
24
+ │ (partner_*) │
25
+ └─────────────────┘
26
+ ```
27
+
28
+ ### Entity Types
29
+
30
+ The system manages 4 core entities, each with this three-layer structure:
31
+
32
+ 1. **Leagues** - Sports leagues (NBA, NFL, MLB, etc.)
33
+ 2. **Contests** - Individual games/matches
34
+ 3. **Participants** - Teams, athletes, or event-level entities
35
+ 4. **Markets** - Betting markets (moneyline, spread, player props, etc.)
36
+
37
+ ## 🔄 Data Flow & Workflows
38
+
39
+ ### 1. League Setup (Foundation)
40
+
41
+ **Step 1: Load Raw Leagues from Partners**
42
+ ```http
43
+ POST /leagues/load-raw
44
+ Content-Type: application/json
45
+
46
+ {
47
+ "partner_id": "partner-123"
48
+ }
49
+ ```
50
+
51
+ Response:
52
+ ```json
53
+ {
54
+ "message": "Raw leagues loaded successfully",
55
+ "count": 5,
56
+ "raw_leagues": [
57
+ {
58
+ "raw_league_id": "raw-league-1",
59
+ "partner_id": "partner-123",
60
+ "external_id": "mlb-2024",
61
+ "name": "Major League Baseball",
62
+ "status": "active"
63
+ }
64
+ ]
65
+ }
66
+ ```
67
+
68
+ **Step 2: Create Router League (if doesn't exist)**
69
+ ```http
70
+ POST /leagues/router
71
+ Content-Type: application/json
72
+
73
+ {
74
+ "name": "MLB",
75
+ "status": "active"
76
+ }
77
+ ```
78
+
79
+ **Step 3: Link Raw League to Router League**
80
+ ```http
81
+ POST /leagues/link
82
+ Content-Type: application/json
83
+
84
+ {
85
+ "raw_league_ids": ["raw-league-1", "raw-league-2"],
86
+ "router_league_id": "router-league-abc"
87
+ }
88
+ ```
89
+
90
+ This creates `partner_league` records linking the raw leagues to the router league.
91
+
92
+ ---
93
+
94
+ ### 2. Contest Setup (Games/Matches)
95
+
96
+ **Step 1: Load Router Contests from BettorEdge**
97
+ ```http
98
+ POST /contests/load
99
+ Content-Type: application/json
100
+
101
+ {
102
+ "router_league_id": "router-league-abc"
103
+ }
104
+ ```
105
+
106
+ This loads all active contests for the league from BettorEdge (the primary source) and creates `router_contest` records.
107
+
108
+ **Step 2: Load Raw Contests from Other Partners**
109
+ ```http
110
+ POST /contests/load-raw
111
+ Content-Type: application/json
112
+
113
+ {
114
+ "partner_id": "partner-123",
115
+ "router_league_id": "router-league-abc"
116
+ }
117
+ ```
118
+
119
+ This loads contests from a specific partner (Kalshi, BetOpenly) and creates `raw_contest` records ready for linking.
120
+
121
+ **Step 3: Link Raw Contests to Router Contests**
122
+ ```http
123
+ POST /contests/link
124
+ Content-Type: application/json
125
+
126
+ {
127
+ "raw_contest_ids": ["raw-contest-1"],
128
+ "router_contest_id": "router-contest-xyz"
129
+ }
130
+ ```
131
+
132
+ **Step 4: Check Contest Status (Periodically)**
133
+ ```http
134
+ POST /contests/check-status
135
+ ```
136
+
137
+ This updates contest statuses (open → closed → settled).
138
+
139
+ **Important Order:**
140
+ 1. Load router contests FIRST (from BettorEdge)
141
+ 2. Then load raw contests from each partner
142
+ 3. Finally, link raw contests to router contests
143
+
144
+ ---
145
+
146
+ ### 3. Participant Setup (Teams/Athletes)
147
+
148
+ **Step 1: Load Participants from Router League**
149
+
150
+ For BettorEdge (creates both router and raw participants):
151
+ ```http
152
+ POST /participants/load
153
+ Content-Type: application/json
154
+
155
+ {
156
+ "router_league_id": "router-league-abc"
157
+ }
158
+ ```
159
+
160
+ **Step 2: Load Raw Participants by Partner**
161
+
162
+ For other partners:
163
+ ```http
164
+ POST /participants/load-raw
165
+ Content-Type: application/json
166
+
167
+ {
168
+ "partner_id": "partner-123",
169
+ "router_league_id": "router-league-abc"
170
+ }
171
+ ```
172
+
173
+ **Step 3: Link Participants**
174
+ ```http
175
+ POST /participants/link
176
+ Content-Type: application/json
177
+
178
+ {
179
+ "raw_participant_ids": ["raw-participant-1", "raw-participant-2"],
180
+ "router_participant_id": "router-participant-abc"
181
+ }
182
+ ```
183
+
184
+ ---
185
+
186
+ ### 4. Market Setup (Betting Markets)
187
+
188
+ **Step 1: Initialize Router Markets**
189
+
190
+ First, set up the foundational markets:
191
+ ```bash
192
+ npm run init:moneyline
193
+ ```
194
+
195
+ This creates the moneyline market with home/away sides.
196
+
197
+ **Step 2: Load Raw Markets for a Contest**
198
+ ```http
199
+ POST /markets/load-raw
200
+ Content-Type: application/json
201
+
202
+ {
203
+ "partner_id": "partner-123",
204
+ "router_contest_id": "router-contest-xyz"
205
+ }
206
+ ```
207
+
208
+ **Step 3: Link Raw Market to Router Market**
209
+ ```http
210
+ POST /markets/link
211
+ Content-Type: application/json
212
+
213
+ {
214
+ "raw_market_id": "raw-market-1",
215
+ "router_market_id": "router-market-moneyline",
216
+ "market_side_id": "market-side-home",
217
+ "partner_participant_id": "pp-lakers-123",
218
+ "timeframe_id": "tf-full-game",
219
+ "variable": 0,
220
+ "variable_type": "total",
221
+ "price_key": "yes"
222
+ }
223
+ ```
224
+
225
+ This creates a `partner_market` record with all the required relationships.
226
+
227
+ ---
228
+
229
+ ## 🎨 UI Components to Build
230
+
231
+ ### 1. League Management Page
232
+
233
+ **View: League List**
234
+ - Display all `router_leagues`
235
+ - For each router league, show:
236
+ - Name
237
+ - Status
238
+ - Count of linked partner leagues (e.g., "2/3 partners linked")
239
+ - List of which partners are linked (BettorEdge ✓, Kalshi ✗, BetOpenly ✓)
240
+ - Count of contests in this league
241
+
242
+ **Actions:**
243
+ - Load raw leagues from partner (dropdown to select partner)
244
+ - Create new router league
245
+ - **Link additional raw leagues to router league** (can link multiple times to add more partners)
246
+
247
+ **Important: One-to-Many Linking**
248
+ - A `router_league` can have **multiple** `raw_leagues` linked to it (one per partner)
249
+ - The UI should ALWAYS allow the admin to add more `raw_leagues` to a `router_league`
250
+ - Even if a `router_league` already has raw leagues linked, the "Link League" button should remain available
251
+ - The endpoint `GET /leagues/:router_league_id/available-raw/:partner_id` returns both unlinked and already-linked raw leagues
252
+
253
+ **Key Endpoints:**
254
+ ```http
255
+ GET /leagues/router
256
+ GET /leagues/:router_league_id/available-raw/:partner_id
257
+ POST /leagues/load-raw
258
+ POST /leagues/link
259
+ ```
260
+
261
+ ---
262
+
263
+ ### 2. Contest Management Page
264
+
265
+ **View: Contest List**
266
+ - Filter by `router_league_id`
267
+ - By default, display only ACTIVE `router_contests` (status='open') for selected league
268
+ - For each contest show:
269
+ - Contest label (e.g., "Yankees vs Red Sox")
270
+ - Scheduled datetime
271
+ - Status (should all be 'open' by default)
272
+ - Count of linked partner contests (e.g., "2/3 partners linked")
273
+ - List of which partners are linked (BettorEdge ✓, Kalshi ✓, BetOpenly ✗)
274
+ - Count of linked markets
275
+
276
+ **Query Parameters:**
277
+ - `status` (optional): Filter by contest status
278
+ - Default: `'open'` - Returns all active/open contests
279
+ - `'closed'` - Returns closed contests with pagination (max 100 per page)
280
+ - `offset` (optional): Pagination offset for closed contests
281
+ - Only used when `status='closed'`
282
+ - Default: `0`
283
+ - Example: `offset=100` for page 2, `offset=200` for page 3
284
+
285
+ **Response includes:**
286
+ - `router_contests[]` - Array of contests (all active OR up to 100 closed)
287
+ - `total_count` - Total number of contests matching the filter
288
+ - `has_more` - Boolean indicating if more results are available (for pagination)
289
+
290
+ **Actions:**
291
+ - Load raw contests by partner + league
292
+ - Create router contest manually
293
+ - **Link additional raw contests to router contest** (can link multiple times to add more partners)
294
+ - **Auto-link contests** - Automatically match and link all contests for a partner (recommended)
295
+ - View/load markets for contest
296
+ - Check contest status
297
+
298
+ **Important: One-to-Many Linking**
299
+ - A `router_contest` can have **multiple** `raw_contests` linked to it (one per partner)
300
+ - The UI should ALWAYS allow the admin to add more `raw_contests` to a `router_contest`
301
+ - Even if a `router_contest` already has raw contests linked, the "Link Contest" button should remain available
302
+ - Example: Router contest "Lakers vs Celtics" can have:
303
+ - BettorEdge raw contest (external_id: "be-12345")
304
+ - Kalshi raw contest (external_id: "KXNBA-LAL-BOS")
305
+ - BetOpenly raw contest (external_id: "bo-67890")
306
+ - The UI should show which partners are already linked and allow adding more
307
+
308
+ **Key Endpoints:**
309
+ ```http
310
+ GET /contests/router?status=open
311
+ GET /contests/open/:router_league_id
312
+ GET /contests/:router_contest_id/available-raw/:partner_id
313
+ POST /contests/load-raw
314
+ POST /contests/link
315
+ POST /autolinking/contests ← Auto-link (recommended)
316
+ ```
317
+
318
+ **Auto-Linking Contests:**
319
+ Instead of manually linking contests one-by-one, use auto-linking to automatically match contests for a partner.
320
+
321
+ **IMPORTANT:** Auto-linking only processes ACTIVE router_contests (status='open'). Closed or settled contests are excluded from autolinking.
322
+
323
+ ```http
324
+ POST /autolinking/contests
325
+ Content-Type: application/json
326
+
327
+ {
328
+ "router_league_id": "league-nba-123",
329
+ "partner_id": "kalshi-partner-id"
330
+ }
331
+ ```
332
+
333
+ Response:
334
+ ```json
335
+ {
336
+ "message": "Auto-linking complete: 23/25 matched (23 created, 0 updated)",
337
+ "entity_type": "contest",
338
+ "partner_name": "Kalshi",
339
+ "total_router_entities": 25,
340
+ "matched_count": 23,
341
+ "created_count": 23,
342
+ "updated_count": 0,
343
+ "failed_count": 2,
344
+ "results": [
345
+ {
346
+ "success": true,
347
+ "router_entity_id": "contest-123",
348
+ "partner_id": "kalshi-partner-id",
349
+ "partner_name": "Kalshi",
350
+ "raw_entity_id": "raw-kalshi-1",
351
+ "partner_entity_id": "pc-new-1",
352
+ "confidence": 0.95,
353
+ "match_method": "date_and_participants"
354
+ }
355
+ ]
356
+ }
357
+ ```
358
+
359
+ Auto-linking matches contests based on:
360
+ - Scheduled datetime similarity
361
+ - Participant matching
362
+ - Title similarity
363
+
364
+ Benefits:
365
+ - Much faster than manual linking
366
+ - Consistent matching logic
367
+ - Provides confidence scores
368
+ - Shows which contests failed to match for manual review
369
+
370
+ **Recommended UI Flow:**
371
+ ```
372
+ Contest Card: "Lakers vs Celtics"
373
+ ├─ Scheduled: 2024-01-15 7:00 PM
374
+ ├─ Status: Open
375
+ ├─ Linked Partners:
376
+ │ ├─ ✓ BettorEdge (external_id: be-12345)
377
+ │ ├─ ✓ Kalshi (external_id: KXNBA-LAL-BOS)
378
+ │ └─ ✗ BetOpenly (not linked)
379
+ └─ Actions:
380
+ ├─ [+ Link Another Partner] ← Always available
381
+ └─ [View Markets]
382
+ ```
383
+
384
+ ---
385
+
386
+ ### 3. Participant Management Page
387
+
388
+ **View: Participant List (League-Specific)**
389
+ - **Important:** Participants are accessed within a league context
390
+ - Navigate to participants via: League → Participants
391
+ - Filter by `participant_type` (team/athlete/event)
392
+ - Display `router_participants` for the selected league only
393
+ - For each participant show:
394
+ - Name
395
+ - Type
396
+ - League
397
+ - BettorEdge ID
398
+ - Tags (name variations)
399
+ - Count of linked partner participants (e.g., "2/3 partners linked")
400
+ - List of which partners are linked (BettorEdge ✓, Kalshi ✓, BetOpenly ✗)
401
+
402
+ **API Call:** `GET /participants/router?router_league_id=league-nba-123`
403
+
404
+ **Actions:**
405
+ - Load participants from BettorEdge (creates both router + raw for the league)
406
+ - Load raw participants by partner for the league
407
+ - **Link additional raw participants to router participant** (can link multiple times to add more partners)
408
+ - Edit participant tags for better matching
409
+
410
+ **Important: League-Specific Participants**
411
+ - Router participants are **league-specific** - each belongs to exactly one league
412
+ - "Dallas Cowboys" exists as a router participant in NFL
413
+ - "LA Lakers" exists as a separate router participant in NBA
414
+ - A `router_participant` can have **multiple** `raw_participants` linked to it (one per partner within that league)
415
+ - The UI should ALWAYS allow the admin to add more `raw_participants` to a `router_participant`
416
+ - Even if a `router_participant` already has raw participants linked, the "Link Participant" button should remain available
417
+ - The endpoint `GET /participants/:router_participant_id/available-raw/:partner_id/:router_league_id` returns both unlinked and already-linked raw participants
418
+
419
+ **Key Endpoints:**
420
+ ```http
421
+ GET /participants/router?router_league_id=league-nba-123
422
+ GET /participants/:router_participant_id/available-raw/:partner_id/:router_league_id
423
+ POST /participants/load
424
+ POST /participants/load-raw
425
+ POST /participants/link
426
+ ```
427
+
428
+ ---
429
+
430
+ ### 4. Market Management Page
431
+
432
+ **View: Market List by Contest**
433
+ - Select a `router_contest_id`
434
+ - Display all `router_markets` available
435
+ - For each router market show:
436
+ - Market label (Moneyline, Spread, etc.)
437
+ - Category
438
+ - Variable required?
439
+ - Count of linked partner markets
440
+
441
+ **Actions:**
442
+ - Load raw markets for contest by partner
443
+ - Link raw market to router market (with side, variable, etc.)
444
+ - View market sides and variables
445
+
446
+ **Key Endpoints:**
447
+ ```http
448
+ GET /markets/router
449
+ GET /markets/sides
450
+ GET /markets/variables
451
+ POST /markets/load-raw
452
+ POST /markets/link
453
+ ```
454
+
455
+ ---
456
+
457
+ ## 🔍 Data Relationships Visual Guide
458
+
459
+ ### One-to-Many Example: Yankees vs Red Sox Contest
460
+
461
+ ```
462
+ Router Contest
463
+ ┌─────────────────────────────────┐
464
+ │ router_contest_id: "rc-001" │
465
+ │ contest_label: "Yankees vs Sox" │
466
+ │ contest_id: "be-event-123" │ ← BettorEdge source ID
467
+ └─────────────────────────────────┘
468
+ ↓ one-to-many
469
+ ┌─────────────────────────────────┐
470
+ │ Raw Contest (BettorEdge) │
471
+ │ raw_contest_id: "raw-001" │
472
+ │ partner_id: "bettoredge" │
473
+ │ external_id: "be-event-123" │
474
+ │ pretty_title: "NYY @ BOS" │
475
+ └─────────────────────────────────┘
476
+
477
+ ┌─────────────────────────────────┐
478
+ │ Raw Contest (Kalshi) │
479
+ │ raw_contest_id: "raw-002" │
480
+ │ partner_id: "kalshi" │
481
+ │ external_id: "KXMLB-NYY-BOS" │
482
+ │ pretty_title: "Yankees @ Red Sox"│
483
+ └─────────────────────────────────┘
484
+
485
+ ┌─────────────────────────────────┐
486
+ │ Raw Contest (BetOpenly) │
487
+ │ raw_contest_id: "raw-003" │
488
+ │ partner_id: "betopenly" │
489
+ │ external_id: "bo-game-456" │
490
+ │ pretty_title: "NYY at BOS" │
491
+ └─────────────────────────────────┘
492
+ ↓ linked via
493
+ ┌─────────────────────────────────┐
494
+ │ Partner Contest Records │
495
+ │ - partner_contest_id: "pc-001" │
496
+ │ raw_contest_id: "raw-001" │
497
+ │ router_contest_id: "rc-001" │
498
+ │ │
499
+ │ - partner_contest_id: "pc-002" │
500
+ │ raw_contest_id: "raw-002" │
501
+ │ router_contest_id: "rc-001" │
502
+ │ │
503
+ │ - partner_contest_id: "pc-003" │
504
+ │ raw_contest_id: "raw-003" │
505
+ │ router_contest_id: "rc-001" │
506
+ └─────────────────────────────────┘
507
+ ```
508
+
509
+ ### Market Linking Example: Moneyline Market
510
+
511
+ ```
512
+ Router Market (Template)
513
+ ┌─────────────────────────────────┐
514
+ │ router_market_id: "rm-001" │
515
+ │ market_key: "moneyline" │
516
+ │ market_label: "Moneyline" │
517
+ │ category: "game_result" │
518
+ └─────────────────────────────────┘
519
+ ↓ has sides
520
+ ┌────────────────┬────────────────┐
521
+ │ Side: Home │ Side: Away │
522
+ │ side_key: home │ side_key: away │
523
+ └────────────────┴────────────────┘
524
+ ↓ for specific game
525
+ ┌─────────────────────────────────┐
526
+ │ Raw Market (BettorEdge) │
527
+ │ raw_market_id: "rawm-001" │
528
+ │ partner_contest_id: "pc-001" │
529
+ │ external_id: "2" │ ← BettorEdge market ID
530
+ │ pretty_title: "Winner" │
531
+ └─────────────────────────────────┘
532
+ ↓ linked via
533
+ ┌─────────────────────────────────┐
534
+ │ Partner Market (Home Side) │
535
+ │ partner_market_id: "pm-001" │
536
+ │ raw_market_id: "rawm-001" │
537
+ │ router_market_id: "rm-001" │
538
+ │ market_side_id: "side-home" │
539
+ │ router_market_variable_id: "v-0"│
540
+ │ price_key: null │
541
+ └─────────────────────────────────┘
542
+ ┌─────────────────────────────────┐
543
+ │ Partner Market (Away Side) │
544
+ │ partner_market_id: "pm-002" │
545
+ │ raw_market_id: "rawm-001" │
546
+ │ router_market_id: "rm-001" │
547
+ │ market_side_id: "side-away" │
548
+ │ router_market_variable_id: "v-0"│
549
+ │ price_key: null │
550
+ └─────────────────────────────────┘
551
+ ```
552
+
553
+ ---
554
+
555
+ ## 📋 Complete Endpoint Reference
556
+
557
+ ### League Endpoints
558
+
559
+ | Method | Endpoint | Body | Description |
560
+ |--------|----------|------|-------------|
561
+ | GET | `/leagues/router` | - | Get all router leagues |
562
+ | GET | `/leagues/raw` | - | Get all raw leagues |
563
+ | GET | `/leagues/partner` | - | Get all partner leagues |
564
+ | GET | `/leagues/:router_league_id/available-raw/:partner_id` | - | Get available raw leagues to link. Returns `{ raw_leagues: [], already_linked: [] }` |
565
+ | POST | `/leagues/load-raw` | `{ partner_id }` | Load raw leagues from partner |
566
+ | POST | `/leagues/link` | `{ raw_league_ids[], router_league_id }` | Link raw leagues to router league |
567
+
568
+ ### Contest Endpoints
569
+
570
+ | Method | Endpoint | Body | Description |
571
+ |--------|----------|------|-------------|
572
+ | POST | `/contests/load` | `{ router_league_id }` | **Load router contests from BettorEdge** (primary source) for a league |
573
+ | POST | `/contests/load-raw` | `{ partner_id, router_league_id }` | **Load raw contests from partner** (Kalshi, BetOpenly) for a league |
574
+ | GET | `/contests/router?status=open` | - | Get router contests by status |
575
+ | GET | `/contests/partner` | - | Get all partner contests |
576
+ | GET | `/contests/open/:router_league_id?status=open&offset=0` | - | Get contests for league. Default: status='open' (all active). For status='closed': paginated, max 100 per page |
577
+ | GET | `/contests/:router_contest_id` | - | Get specific contest |
578
+ | GET | `/contests/:router_contest_id/available-raw/:partner_id` | - | Get available raw contests to link. Returns `{ raw_contests: [], already_linked: [] }` |
579
+ | POST | `/contests/link` | `{ raw_contest_ids[], router_contest_id }` | Link raw contests to router contest (manual) |
580
+ | POST | `/contests/check-status` | - | Check and update contest statuses |
581
+ | POST | `/autolinking/contests` | `{ router_league_id, partner_id }` | **Auto-link all contests for a partner** (recommended) |
582
+
583
+ ### Participant Endpoints
584
+
585
+ | Method | Endpoint | Body | Description |
586
+ |--------|----------|------|-------------|
587
+ | GET | `/participants/router?router_league_id=xxx` | - | Get router participants for a specific league (query param required) |
588
+ | GET | `/participants/raw` | - | Get all raw participants |
589
+ | GET | `/participants/partner` | - | Get all partner participants |
590
+ | GET | `/participants/:router_participant_id/available-raw/:partner_id/:router_league_id` | - | Get available raw participants to link for a specific league context. Returns `{ raw_participants: [], already_linked: [] }` |
591
+ | POST | `/participants/load` | `{ router_league_id }` | **Load router participants from BettorEdge** for a league |
592
+ | POST | `/participants/load-raw` | `{ partner_id, router_league_id }` | **Load raw participants from partner** for a league |
593
+ | POST | `/participants/link` | `{ raw_participant_ids[], router_participant_id }` | Link raw participants to router participant |
594
+
595
+ **Important:** Router participants are now **league-specific**. Each participant belongs to exactly one league. When querying `/participants/router`, always include the `router_league_id` query parameter to filter participants for the league you're working with.
596
+
597
+ ### Market Endpoints
598
+
599
+ | Method | Endpoint | Body | Description |
600
+ |--------|----------|------|-------------|
601
+ | GET | `/markets/router` | - | Get all router markets |
602
+ | GET | `/markets/variables` | - | Get all market variables |
603
+ | GET | `/markets/sides` | - | Get all market sides |
604
+ | GET | `/markets/partner` | - | Get all partner markets |
605
+ | GET | `/markets/raw/:router_contest_id` | - | Get raw markets for contest |
606
+ | POST | `/markets/load-raw` | `{ partner_id, router_contest_id }` | Load raw markets by partner |
607
+ | POST | `/markets/link` | `{ raw_market_id, router_market_id, market_side_id, variable?, variable_type?, price_key? }` | Link raw market to router market |
608
+
609
+ ### Partner Endpoints
610
+
611
+ | Method | Endpoint | Body | Description |
612
+ |--------|----------|------|-------------|
613
+ | GET | `/partners` | - | Get all active partners with their options (including price_key_required, price_key_options) |
614
+ | POST | `/partners/load` | - | Create default partners if they don't exist |
615
+
616
+ **Partner Options Structure:**
617
+ ```typescript
618
+ {
619
+ partner_id: "kalshi-123",
620
+ name: "Kalshi",
621
+ status: "active",
622
+ options: {
623
+ price_key_required: true, // If true, admin must provide price_key when linking
624
+ price_key_options: ["yes", "no"] // Valid options for price_key
625
+ }
626
+ }
627
+ ```
628
+
629
+ ---
630
+
631
+ ## 💡 UI/UX Recommendations
632
+
633
+ ### 1. Dashboard Home
634
+ - Show summary statistics:
635
+ - Total router leagues
636
+ - Total active contests
637
+ - Total router participants
638
+ - Total router markets
639
+ - Pending links (raw entities not yet linked)
640
+
641
+ ### 2. Linking Interface
642
+
643
+ **Option A: Side-by-Side Selection**
644
+ ```
645
+ ┌─────────────────────┬─────────────────────┐
646
+ │ Raw Entities │ Router Entity │
647
+ │ (Checkboxes) │ (Single Select) │
648
+ ├─────────────────────┼─────────────────────┤
649
+ │ ☑ BettorEdge: NYY │ ○ Yankees │
650
+ │ ☑ Kalshi: YANKEES │ ○ Red Sox │
651
+ │ ☐ BetOpenly: NYY │ ○ Dodgers │
652
+ └─────────────────────┴─────────────────────┘
653
+ [Link Selected] Button
654
+ ```
655
+
656
+ **Option B: Drag and Drop**
657
+ ```
658
+ ┌─────────────────────┐ ┌─────────────────────┐
659
+ │ Raw Entities │ │ Router Entity │
660
+ │ │ │ │
661
+ │ [BettorEdge: NYY] │───▶│ [Yankees] │
662
+ │ [Kalshi: YANKEES] │ │ │
663
+ │ [BetOpenly: NYY] │ │ Drop raw entities │
664
+ │ │ │ here to link │
665
+ └─────────────────────┘ └─────────────────────┘
666
+ ```
667
+
668
+ ### 3. Filtering & Search
669
+ - Filter contests by:
670
+ - League
671
+ - Status (open/closed/settled)
672
+ - Date range
673
+ - Has markets / No markets yet
674
+
675
+ - Search participants by:
676
+ - Name
677
+ - Type (team/athlete)
678
+ - Has links / No links yet
679
+
680
+ ### 4. Bulk Operations
681
+ - Allow selecting multiple raw entities and linking them at once
682
+ - Batch load raw data from all partners for a league
683
+ - Bulk status checks
684
+
685
+ ### 5. Visual Indicators
686
+ - 🟢 Green: Fully linked (router + multiple raw + partner links)
687
+ - 🟡 Yellow: Partially linked (router + some raw, missing others)
688
+ - 🔴 Red: Unlinked (raw exists but no router/partner link)
689
+ - ⚪ Gray: Inactive/closed
690
+
691
+ ---
692
+
693
+ ## 🔒 Authentication
694
+
695
+ All endpoints require authentication. Include the auth token in headers:
696
+
697
+ ```javascript
698
+ const headers = {
699
+ 'Authorization': `Bearer ${token}`,
700
+ 'Content-Type': 'application/json'
701
+ };
702
+ ```
703
+
704
+ ---
705
+
706
+ ## 🚀 Suggested Build Order
707
+
708
+ 1. **Phase 1: Read-Only Views**
709
+ - League list
710
+ - Contest list
711
+ - Participant list
712
+ - Market list
713
+ - Partner list
714
+
715
+ 2. **Phase 2: Data Loading**
716
+ - Load raw leagues button
717
+ - Load raw contests button
718
+ - Load raw participants button
719
+ - Load raw markets button
720
+
721
+ 3. **Phase 3: Linking**
722
+ - Link leagues interface
723
+ - Link contests interface
724
+ - Link participants interface
725
+ - Link markets interface
726
+
727
+ 4. **Phase 4: Advanced Features**
728
+ - Bulk operations
729
+ - Search & filters
730
+ - Status checks
731
+ - Analytics dashboard
732
+
733
+ ---
734
+
735
+ ## 📦 TypeScript Types
736
+
737
+ All types are available in `src/types/`. Import them in your client:
738
+
739
+ ```typescript
740
+ import {
741
+ RouterLeagueProps,
742
+ RawLeagueProps,
743
+ PartnerLeagueProps,
744
+ RouterContestProps,
745
+ RawContestProps,
746
+ PartnerContestProps,
747
+ RouterParticipantProps,
748
+ RawParticipantProps,
749
+ PartnerParticipantProps,
750
+ RouterMarketProps,
751
+ RawMarketProps,
752
+ PartnerMarketProps,
753
+ MarketContestProps,
754
+ RouterMarketSideProps,
755
+ RouterMarketVariableProps
756
+ } from './types/betrouter';
757
+ ```
758
+
759
+ ---
760
+
761
+ ## 🎯 Example: Complete Contest Setup Workflow
762
+
763
+ ```javascript
764
+ // 1. Load raw contests from BettorEdge for NBA league
765
+ const loadResponse = await fetch('/contests/load-raw', {
766
+ method: 'POST',
767
+ headers,
768
+ body: JSON.stringify({
769
+ partner_id: 'bettoredge-partner-id',
770
+ router_league_id: 'nba-router-league-id'
771
+ })
772
+ });
773
+
774
+ const { raw_contests } = await loadResponse.json();
775
+ // Returns: [ { raw_contest_id, external_id, pretty_title, ... }, ... ]
776
+
777
+ // 2. Admin reviews the raw contests and selects one to link
778
+ // Let's say they select "Lakers vs Celtics"
779
+
780
+ // 3. Check if router contest exists
781
+ const routerContestsResponse = await fetch(
782
+ `/contests/open/nba-router-league-id`
783
+ );
784
+ const { router_contests } = await routerContestsResponse.json();
785
+
786
+ // Find matching router contest by contest_id (BettorEdge source)
787
+ const matchingRouterContest = router_contests.find(
788
+ rc => rc.contest_id === raw_contests[0].external_id
789
+ );
790
+
791
+ // 4. Link the raw contest to the router contest
792
+ if (matchingRouterContest) {
793
+ await fetch('/contests/link', {
794
+ method: 'POST',
795
+ headers,
796
+ body: JSON.stringify({
797
+ raw_contest_ids: [raw_contests[0].raw_contest_id],
798
+ router_contest_id: matchingRouterContest.router_contest_id
799
+ })
800
+ });
801
+ }
802
+
803
+ // 5. Now load markets for this contest
804
+ const marketsResponse = await fetch('/markets/load-raw', {
805
+ method: 'POST',
806
+ headers,
807
+ body: JSON.stringify({
808
+ partner_id: 'bettoredge-partner-id',
809
+ router_contest_id: matchingRouterContest.router_contest_id
810
+ })
811
+ });
812
+
813
+ const { raw_markets } = await marketsResponse.json();
814
+ // Returns: [ { raw_market_id, external_id, pretty_title, ... }, ... ]
815
+
816
+ // 6. Link each raw market to appropriate router market
817
+ // For example, link the moneyline market (external_id: "2")
818
+ const moneylineRaw = raw_markets.find(rm => rm.external_id === "2");
819
+
820
+ // Get router markets and sides
821
+ const [routerMarkets, marketSides] = await Promise.all([
822
+ fetch('/markets/router').then(r => r.json()),
823
+ fetch('/markets/sides').then(r => r.json())
824
+ ]);
825
+
826
+ const moneylineRouter = routerMarkets.find(rm => rm.market_key === "moneyline");
827
+ const homeSide = marketSides.find(
828
+ s => s.router_market_id === moneylineRouter.router_market_id &&
829
+ s.side_key === "home"
830
+ );
831
+
832
+ // Link raw market to router market for home side
833
+ await fetch('/markets/link', {
834
+ method: 'POST',
835
+ headers,
836
+ body: JSON.stringify({
837
+ raw_market_id: moneylineRaw.raw_market_id,
838
+ router_market_id: moneylineRouter.router_market_id,
839
+ market_side_id: homeSide.market_side_id,
840
+ variable: 0,
841
+ variable_type: 'total'
842
+ })
843
+ });
844
+
845
+ // Repeat for away side...
846
+ ```
847
+
848
+ ---
849
+
850
+ ## 📝 Notes
851
+
852
+ - **IDs are UUIDs**: All entity IDs are randomly generated strings. Display human-readable labels in the UI.
853
+ - **Denormalized fields**: `partner_id` and `external_id` are denormalized in junction tables for convenience.
854
+ - **Batch operations**: Always use batch GET operations and work in memory before saving for performance.
855
+ - **Status management**: Contests move through states: open → closed → settled. Markets can be active or closed.
856
+ - **Variable types**: Markets can have variables (spreads/totals) with type 'spread' or 'total'.
857
+ - **Price keys**: Kalshi markets use price_key ('yes'/'no') to indicate which side of the binary market to use. The `router_partners` table has `options.price_key_required` and `options.price_key_options` to indicate which partners require this field.
858
+ - **Participant types**: Can be 'team', 'athlete', or 'event' (for event-level totals).
859
+ - **Market categories**: 'game_result', 'team_stat', 'player_stat', 'game_stat'.
860
+
861
+ ---
862
+
863
+ This guide provides everything needed to build a comprehensive admin portal for managing the BetRouter system!