/** * League configuration * * Represents a sports league with configuration and settings */ export interface LeagueProps { /** Unique league identifier */ league_id:string; /** League display name */ league_name:string; /** Sport type (basketball, football, baseball, etc.) */ sport:string; /** URL to league logo image */ league_image:string; /** Display priority/order */ priority:number; /** Current league status */ status:string; /** Optional SportsDB external ID */ sport_db_id?:string; /** Currently active season type (regular, playoffs, etc.) */ active_season_type?:string; /** Currently active year */ active_year?:string; /** External data provider ID */ external_id?:string; /** External odds provider ID */ external_odds_id?:string; /** Default markets enabled for this league */ default_markets?:[]; /** Whether default tournaments are enabled */ default_tournaments?:boolean; /** Whether rankings are tracked */ rankings?:boolean; /** Active poll ID if applicable */ active_poll?:string; /** State/region for the league */ state?:string; /** City for the league */ city?:string; /** Timestamp when league was created */ create_datetime: any; /** Timestamp of last update */ last_update_datetime:any; } /** * Event (game/match) * * Represents a sporting event between two teams */ export interface EventProps { /** Unique event identifier */ event_id:string; /** External data provider ID */ external_id:string; /** Away team ID */ away_team_id: string; /** Optional populated away team data */ away?:TeamProps; /** Optional away team subtitle (record, ranking, etc.) */ away_sub_title?:string; /** Home team ID */ home_team_id:string; /** Optional populated home team data */ home?:TeamProps; /** Optional home team subtitle (record, ranking, etc.) */ home_sub_title?:string; /** Event display title */ event_title:string; /** Optional event subtitle */ event_sub_title?:string; /** Away team's current score */ away_team_score: number; /** Home team's current score */ home_team_score: number; /** Winner team ID (for soccer extra time/penalties) */ winner_id?:string; /** Winner side (for soccer extra time/penalties) */ winner_side?:'home'|'away'; /** Scheduled start time */ scheduled_datetime: any; /** Optional sponsor ID */ sponsor_id?:string; /** Optional event info (weather, venue, broadcast) */ info?: EventInfoProps; /** League ID this event belongs to */ league_id:string; /** Season type (regular, playoffs, preseason) */ season_type: string; /** Optional league name */ league_name?:string; /** Current game time/period detail */ time_detail?:string; /** Last play description */ last_play?:string; /** Home team player statistics */ home_athlete_stats?: AthleteStatProps[]; /** Away team player statistics */ away_athlete_stats?:AthleteStatProps[]; /** Period-by-period scoring */ event_scoring?: EventScoringProps[]; /** Whether event is currently live/active */ is_active?:boolean; /** Whether event should be sent to clients */ send_to_client?:boolean; /** Current event status */ status:string; /** Markets supported for this event */ supported_markets?:SupportedMarketProps[]; /** Whether event has been sent to market service */ sent_to_market?:boolean; /** Legacy system event ID */ legacy_id?:string; /** Last time pricing was requested */ last_price_request?:any; /** Timestamp when event was created */ create_datetime:any; /** Timestamp of last update */ last_update_datetime: any; } /** * Event information * * Additional context about an event (weather, venue, broadcast) */ export interface EventInfoProps { /** Team event external ID */ team_event_id: string; /** Weather conditions */ weather:WeatherType | undefined; /** Venue information */ venue: VenueType| undefined; /** Broadcast information */ broadcast:BroadcastType| undefined; } /** Weather conditions for an event */ export interface WeatherType { /** Temperature in Fahrenheit */ temp: number; /** Weather condition description */ condition:string; /** Optional humidity percentage */ humidity?:number; /** Optional dew point */ dew_point?:number; /** Optional wind speed in mph */ wind_speed?:number; /** Wind direction */ wind_direction:string; } /** Venue information for an event */ export interface VenueType { /** Venue seating capacity */ capacity: number; /** City where venue is located */ city: string; /** Country where venue is located */ country: string; /** Optional field orientation */ field_orientation?:string; /** Optional venue external ID */ id?:string; /** Venue name */ name:string; /** Optional attendance for this event */ attendance?:number; /** Stadium type (dome, outdoor, retractable, etc.) */ stadium_type:string; /** State/province where venue is located */ state:string; /** Optional playing surface type */ surface?:string; } /** Broadcast information for an event */ export interface BroadcastType { /** Optional broadcast network */ network?:string; } /** * Event scoring by period * * Period-by-period score tracking for an event */ export interface EventScoringProps { /** Period number (1-based) */ period: number; /** Period status */ status: 'not_started' | 'active' | 'closed'; /** Away team cumulative score through this period */ away_cumulative_score:number; /** Home team cumulative score through this period */ home_cumulative_score:number; /** Away team score in this period only */ away_period_score:number; /** Home team score in this period only */ home_period_score:number; /** Whether scoring has been sent to market service */ sent_to_market?:boolean; } /** * Tournament * * Multi-participant tournament (golf, racing, etc.) */ export interface TournamentProps { /** Unique tournament identifier */ tournament_id:string; /** League ID */ league_id:string; /** External data provider ID */ external_id:string; /** Tournament display name */ tournament_name:string; /** Tournament type */ tournament_type:string; /** Current time/round detail */ time_detail:string; /** Scheduled start time */ scheduled_datetime:any; /** Array of participant IDs */ participants:string[]; /** Type of participants in tournament */ participant_type: 'team'|'athlete'; /** Current tournament status */ status: string; /** Optional league name */ league_name?:string; /** Whether tournament is active */ active?:boolean; /** Timestamp when created */ create_datetime:any; /** Timestamp of last update */ last_update_datetime:any; /** Optional prior tournament ID for series/continuation */ prior_tournament_id?:string; /** Markets supported for this tournament */ supported_markets:SupportedMarketProps[]; /** Optional external market mappings for participants */ participant_external_markets?: ExternalParticipantMarket[]; } /** * Match * * Head-to-head match within a tournament or bracket */ export interface MatchProps { /** Unique match identifier */ match_id: string; /** External data provider ID */ external_id: string; /** Match display title */ match_title:string; /** Optional time/round detail */ time_detail?:string; /** Array of participant IDs in the match */ participants: string[]; /** Type of participants */ participant_type: 'athlete'|'team'; /** Current match status */ status: string; /** Scheduled start time */ scheduled_datetime: any; /** Timestamp when created */ create_datetime: string; /** Timestamp of last update */ last_update_datetime: string; /** Optional winner participant ID */ winner?:string; /** Tournament ID this match belongs to */ tournament_id:string; /** Whether match has been sent to market service */ sent_to_markets?:boolean; /** Optional populated tournament data */ tournament?:TournamentProps; /** Markets supported for this match */ supported_markets:SupportedMarketProps[]; } /** * Tournament result * * Final placement result for a participant in a tournament */ export interface TournamentResultProps { /** Unique tournament result ID */ tournament_result_id:string; /** Tournament ID */ tournament_id:string; /** Type of participant */ participant_type: 'team'|'athlete'; /** Participant ID */ participant_id:string; /** Whether participant won the tournament */ win:boolean; /** Optional status warning (WD, DQ, etc.) */ status_warning?:string; /** Final placement (1st, 2nd, 3rd, etc.) */ place: number; /** Result status */ status:string; /** Whether result has been sent to market service for settlement */ sent_to_markets:boolean; /** Timestamp when created */ create_datetime:any; /** Timestamp of last update */ last_update_datetime:any; } /** * Statistic definition * * Defines a trackable statistic */ export interface StatProps { /** Stat identifier (points, rebounds, yards, etc.) */ stat: string; /** Display label for the stat */ stat_label:string; /** Optional location context */ loc?:string; } /** * Athlete statistic * * Individual player stat for a specific event */ export interface AthleteStatProps { /** Athlete ID */ athlete_id:string; /** Event ID */ event_id:string; /** Stat definition */ stat:StatProps; /** Stat value */ value: number | string; } /** * External participant market mapping * * Maps tournament participants to external market IDs */ export interface ExternalParticipantMarket { /** Participant ID */ participant_id:string; /** Participant type */ participant_type:string; /** Optional external odds provider ID */ external_id?:string; /** Market ID */ market_id:string; } /** * Supported market * * Indicates a market is enabled for a specific contest */ export interface SupportedMarketProps { /** Market ID */ market_id:string; /** Optional external market ID */ external_id?:string; /** Whether market has been removed (no longer accepting bets) */ removed?:boolean; } /** * Team * * Represents a sports team */ export interface TeamProps { /** Unique team identifier */ team_id:string; /** Market/display name */ market_name:string; /** External data provider ID */ external_id:string; /** Optional external odds provider ID */ external_odds_id?:string; /** Team full name */ name:string; /** Team abbreviation */ abbr:string; /** League ID */ league_id:string; /** Current team status */ status:string; /** Optional team logo */ image?:{ url: string }; /** Optional primary brand color */ primary_color?:string; /** Optional SportsDB external ID */ sport_db_id?:string; /** Optional secondary brand color */ secondary_color?:string; /** Optional current ranking */ rank?:number; /** Optional state/region */ state?:string; /** Optional city */ city?:string; /** Optional division */ division?:string; /** Optional sub-division/conference */ sub_division?:string; /** Optional array of team athletes */ athletes?:AthleteProps[]; } /** * Athlete (player) * * Represents an individual athlete/player */ export interface AthleteProps { /** Unique athlete identifier */ athlete_id:string; /** Athlete's first name */ first_name:string; /** Athlete's last name */ last_name:string; /** External data provider ID */ external_id:string; /** Optional external odds provider ID */ external_odds_id?:string; /** Optional additional external IDs */ other_ids?:string[]; /** League ID */ league_id:string; /** Optional current team ID */ team_id?:string; /** Optional jersey number */ jersey_number?:number | string; /** Optional populated team data */ team?:TeamProps; /** Player position */ position:string; /** Optional league name */ league_name?:string; /** Abbreviated name for display */ abbr_name: string; /** Current athlete status */ status: string; /** Optional athlete photo */ image? :{ /** Image URL */ url:string; /** Image width */ width: number; /** Image height */ height:number; }; /** Timestamp when created */ create_datetime?: any; /** Timestamp of last update */ last_update_datetime?: any; } /** * Bracket * * Tournament bracket structure (March Madness style) */ export interface BracketProps { /** Unique bracket identifier */ bracket_id:string; /** Bracket display name */ bracket_name: string; /** Scheduled start time */ scheduled_datetime:any; /** League ID */ league_id:string; /** Whether to hide seed numbers */ hide_seeds?:boolean; /** Current bracket status */ status:string; /** Whether picks/predictions are allowed */ picks_allowed?:boolean; /** External data provider ID */ external_id:string; /** Timestamp when created */ create_datetime:any; /** Timestamp of last update */ last_update_datetime:any; } /** * Bracket group * * Regional grouping within a bracket (e.g., East, West, Midwest, South) */ export interface BracketGroupProps { /** Unique bracket group ID */ bracket_group_id:string; /** Parent bracket ID */ bracket_id:string; /** Group display name (East, West, etc.) */ group_name:string; /** Location/city for this group */ location:string; /** External data provider ID */ external_id:string; /** Display sequence/order */ sequence:number; /** Optional ID of bracket group this was copied from */ copied_id?:string; /** Optional bracket orientation (left, right, etc.) */ orientation?:string; /** Timestamp when created */ create_datetime:any; /** Timestamp of last update */ last_update_datetime:any; } /** * Bracket round * * A round within a bracket (Round of 64, Round of 32, Sweet 16, etc.) */ export interface BracketRoundProps { /** Unique bracket round ID */ bracket_round_id:string; /** Parent bracket ID */ bracket_id:string; /** Round display name */ round_name:string; /** Whether winners carry through automatically */ carry_through?:boolean; /** External data provider ID */ external_id:string; /** Scheduled start time */ scheduled_datetime:any; /** Current round status */ status:string; /** Optional ID of round this was copied from */ copied_id?:string; /** Optional series length (for best-of-X series) */ series_length?:number; /** Round number (1-based) */ round_number:number; /** Whether this is a loser bracket round (double elimination) */ loser_bracket?:boolean; /** Timestamp when created */ create_datetime:any; /** Timestamp of last update */ last_update_datetime:any; } /** * Round event * * Individual matchup/event within a bracket round */ export interface RoundEventProps { /** Unique round event ID */ round_event_id:string; /** Parent bracket round ID */ bracket_round_id:string; /** Event display name */ event_name:string; /** Parent bracket ID */ bracket_id:string; /** Optional associated event ID if linked to a real event */ event_id?:string; /** Optional ID of event this was copied from */ copied_id?:string; /** Whether picks are disabled for this event */ no_pick?:boolean; /** External data provider ID */ external_id:string; /** Current event status */ status:string; /** Whether both participants are confirmed */ matchup_confirmed:boolean; /** Event number within the round */ event_number:number; /** Event type */ event_type:string; /** Optional winning side */ winning_side?:'away'|'home'; /** Optional away placeholder (bracket event ID) */ away_placeholder?: string; /** Optional away placeholder outcome requirement */ away_placeholder_outcome?:'loss'|'win'; /** Optional home placeholder (bracket event ID) */ home_placeholder?: string; /** Optional home placeholder outcome requirement */ home_placeholder_outcome?:'loss'|'win'; /** Optional winner ID */ winning_side_id?:string; /** Optional winner type (team/athlete) */ winning_side_type?:string; /** Optional losing side */ losing_side?:'away'|'home'; /** Optional loser ID */ losing_side_id?:string; /** Optional away side ID */ away_side_id?:string; /** Optional away side type */ away_side_type?:string; /** Optional home side ID */ home_side_id?:string; /** Optional home side type */ home_side_type?:string; /** Whether this is a loser bracket event */ loser_bracket?:boolean; /** Optional loser type */ losing_side_type?:string; /** Optional away seed number */ away_seed?:number; /** Optional home seed number */ home_seed?:number; /** Optional series results (for best-of-X series) */ series_results?:{ /** Participant ID */ side_id: string; /** Number of wins in the series */ wins: number; }[]; /** Optional current game number in series */ current_series_number?:number; /** Optional bracket group ID for regional brackets */ bracket_group_id?:string; /** Timestamp when created */ create_datetime:any; /** Timestamp of last update */ last_update_datetime:any; } export interface GolferResolutionProps { tournament_id:string, par_strokes:number, golfer_id:string, level:'hole' | 'make_cut' | 'win', round:number, hole:number, strokes:number, side_result: 'yes' | 'no' | undefined } export interface GolfLeaderProps { tournament_id:string, athlete_id:string, place:number, //Active place. If the tournament hasnt started, will default to 1 status: 'active'|'inactive', //Will be active if the player is still playing. Inactive if CUT, WD or the tournament is not inprogress cut?:boolean, //Cut indicator wd?:boolean, //Withdraw indicator tied:boolean, money:number, tee_time?:any, starting_hole:number, rank:number, strokes: number //Total number of strokes. Defaults to 0 if tournament hasn't started score: number //Score relative to par (i.e., -3 or +3), score_label: string //If score is over par - this will add the + symbol to it leader_rounds:LeaderRoundProps[] //This holds the score by round create_datetime:any, last_update_datetime:any } export interface GolfCourseProps { tournament_id:string, course_id:string, course_name: string, yardage:number, par:number, holes: GolfHoleProps[] } export interface GolfHoleProps { course_id:string, number:number, par:number, yardage:number, name?:string } export interface LeaderRoundProps { tournament_id:string, athlete_id:string, tee_time?:string, score:number, round_number: number, thru:number //Holes they are thru on round birdies: number, eagles:number, pars:number, status:'closed'|'inprogress' bogeys: number, double_bogeys: number, other_scores:number, hole_in_ones:number strokes: number } export interface GolfScorecardProps { tournament_id:string, athlete_id:string, round_number: number, starting_hole?:number, par:number, hole_number: number, strokes: number } export interface GolfTournamentStatisticsProps { tournament_id:string, round_statistics: GolfRoundStatistics[] } export interface GolfRoundStatistics { tournament_id:string, round_number: number, hole_statistics: GolfHoleStatistics[] } export interface GolfHoleStatistics { round_number:number, hole_number:number par:number, strokes: number, players:number, eagles:number, birdies:number, pars:number, bogeys: number, double_bogeys:number, holes_in_one: number, other_scores:number, strokes_avg:number, avg_diff:number }