UNPKG

@cloudbet/market-helper

Version:

SDK to generate localized sport market information

13 lines (12 loc) 1.09 kB
import { EventData } from '../api-data-types'; import { ReturnValue } from '../common/types'; import { getMarketDefinitions } from './locales'; import { MarketNameSelection } from './reduced-types'; import { OutcomeInfo, OutcomeNameSelection } from './reduced-types.js'; import { Locale, MarketType } from './sports-core-types'; declare function getMarketDescription(locale: Locale, marketType: MarketType): ReturnValue<string>; declare function getMarketName(locale: Locale, selection: MarketNameSelection, marketType: MarketType, eventData?: EventData): ReturnValue<string>; declare function hasMarketDefinition(marketType: string, locale: Locale): boolean; declare function getOutcome(locale: Locale, eventData: Pick<EventData, 'home' | 'away' | 'players' | 'names'>, marketType: MarketType, selection: OutcomeNameSelection, enableAbbreviatedTeamName?: boolean): ReturnValue<OutcomeInfo | null>; declare function getSportsName(sportsKey: string, locale: Locale): string; export { getSportsName, getMarketName, getOutcome, getMarketDescription, getMarketDefinitions, hasMarketDefinition, };