{"openapi":"3.1.0","info":{"title":"Court Vision API","description":"Fantasy basketball analytics and insights","version":"1.0.0"},"paths":{"/v1/rankings/espn/movement":{"get":{"tags":["Rankings"],"summary":"Compare ESPN draft-market snapshots","description":"Compare the union of players in two independently resolved ESPN market snapshots. Each selector uses the newest snapshot on or before its date. Positive rank and ADP changes mean an earlier, improved position; positive auction changes mean an increase. Entrants, exits, and missing measurements remain null instead of becoming zero. If the selectors cannot resolve two distinct snapshots, the response is a successful empty collection.","operationId":"get_espn_market_movement_v1_rankings_espn_movement_get","parameters":[{"name":"from_as_of","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Resolve the before snapshot on or before this date","title":"From As Of"},"description":"Resolve the before snapshot on or before this date"},{"name":"to_as_of","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Resolve the after snapshot on or before this date","title":"To As Of"},"description":"Resolve the after snapshot on or before this date"},{"name":"season","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}$"},{"type":"null"}],"description":"NBA season; defaults to the configured active season","title":"Season"},"description":"NBA season; defaults to the configured active season"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"description":"Case- and accent-insensitive name search","title":"Name"},"description":"Case- and accent-insensitive name search"},{"name":"metric","in":"query","required":false,"schema":{"enum":["rank","adp","auction_value","auction_value_avg"],"type":"string","description":"Metric used to filter and order movement","default":"rank","title":"Metric"},"description":"Metric used to filter and order movement"},{"name":"direction","in":"query","required":false,"schema":{"enum":["up","down","both"],"type":"string","description":"Return risers, fallers, or both","default":"both","title":"Direction"},"description":"Return risers, fallers, or both"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum results","default":50,"title":"Limit"},"description":"Maximum results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ESPNMarketMovementResp"}}}},"422":{"description":"Invalid date order, metric, direction, or pagination"},"429":{"description":"Rate limit exceeded"}}}},"/v1/rankings/espn":{"get":{"tags":["Rankings"],"summary":"Get ESPN draft rankings and market values","description":"ESPN editorial draft ranks, ADP, auction values, position eligibility, and injury status. These are preseason market snapshots, separate from Court Vision performance rankings. Includes mapped players without game stats. Missing values are null and sort last; ties sort by NBA player ID. `as_of` selects the newest snapshot on or before that date. An unavailable snapshot returns an empty success response; there is no cross-season fallback.","operationId":"get_espn_rankings_v1_rankings_espn_get","parameters":[{"name":"season","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}$"},{"type":"null"}],"description":"NBA season, e.g. 2026-27; defaults to the configured active season","title":"Season"},"description":"NBA season, e.g. 2026-27; defaults to the configured active season"},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Latest snapshot on or before this date; omit for latest","title":"As Of"},"description":"Latest snapshot on or before this date; omit for latest"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"description":"Case- and accent-insensitive name search","title":"Name"},"description":"Case- and accent-insensitive name search"},{"name":"sort_by","in":"query","required":false,"schema":{"enum":["rank","adp","auction_value","auction_value_avg"],"type":"string","description":"rank/adp ascend; auction values descend; nulls last","default":"rank","title":"Sort By"},"description":"rank/adp ascend; auction values descend; nulls last"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ESPNMarketResp"}}}},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/rankings/":{"get":{"tags":["Rankings"],"summary":"Get player rankings","description":"Returns all NBA players ranked by fantasy points (`format=points`, the default) or by summed per-category z-scores for head-to-head category leagues (`format=categories`). Use `window=7`, `window=14`, or `window=30` for rolling averages over the last N calendar days. Omit for full-season rankings.\n\nResponses are cached briefly and carry an `ETag`; a conditional request with `If-None-Match` is answered 304.","operationId":"get_rankings_v1_rankings__get","parameters":[{"name":"window","in":"query","required":false,"schema":{"anyOf":[{"enum":[7,14,30],"type":"integer"},{"type":"null"}],"description":"Rolling day window for averages: 7, 14, or 30. Omit for full-season.","title":"Window"},"description":"Rolling day window for averages: 7, 14, or 30. Omit for full-season."},{"name":"format","in":"query","required":false,"schema":{"enum":["points","categories"],"type":"string","description":"Ranking format: `points` (fantasy points) or `categories` (sum of category z-scores).","default":"points","title":"Format"},"description":"Ranking format: `points` (fantasy points) or `categories` (sum of category z-scores)."},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated category keys for `format=categories`; defaults to standard 9-cat. Allowed: pts, reb, ast, stl, blk, tov, fgm, fga, fg_pct, ftm, fta, ft_pct, fg3m, fg3a, fg3_pct.","title":"Categories"},"description":"Comma-separated category keys for `format=categories`; defaults to standard 9-cat. Allowed: pts, reb, ast, stl, blk, tov, fgm, fga, fg_pct, ftm, fta, ft_pct, fg3m, fg3a, fg3_pct."},{"name":"min_games","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":82,"minimum":1},{"type":"null"}],"description":"Minimum games played to be ranked (`format=categories` only). Defaults to 1 for every window — the floor is an opt-in filter.","title":"Min Games"},"description":"Minimum games played to be ranked (`format=categories` only). Defaults to 1 for every window — the floor is an opt-in filter."}],"responses":{"200":{"description":"Rankings retrieved successfully (an empty list with a message before opening night)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RankingsResp"}}}},"304":{"description":"Not modified — the client's `If-None-Match` matches the current response"},"400":{"description":"Rejected by the rankings service"},"422":{"description":"Invalid window, format, or category key"},"429":{"description":"Rate limit exceeded"}}}},"/v1/players/search":{"get":{"tags":["Players"],"summary":"Search the player directory","description":"Search the NBA player dimension rather than season statistics. Results include mapped rookies and players without games, with NBA/ESPN identities and profile freshness timestamps.","operationId":"search_players_v1_players_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":".*\\S.*","description":"Player name, NBA ID, or ESPN ID","title":"Q"},"description":"Player name, NBA ID, or ESPN ID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum results","default":10,"title":"Limit"},"description":"Maximum results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"}],"responses":{"200":{"description":"Players retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerSearchResp"}}}},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/{player_id}/profile":{"get":{"tags":["Players"],"summary":"Get a player's profile","description":"Return NBA/ESPN identity fields and the latest biographical profile snapshot. A known player whose profile has not been ingested returns data with profile=null.","operationId":"get_player_profile_v1_players__player_id__profile_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"NBA player ID","title":"Player Id"},"description":"NBA player ID"}],"responses":{"200":{"description":"Player profile retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerProfileResp"}}}},"404":{"description":"Player not found"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/projections":{"get":{"tags":["Players"],"summary":"List ESPN preseason player projections","description":"Return every row from one ESPN projection snapshot, ordered by player name and NBA ID. `as_of` selects the newest snapshot on or before that date and the response reports the actual snapshot date. Statistics are per-game, shooting rates use a 0–1 scale, and missing measurements remain null. An unavailable snapshot returns an empty success response.","operationId":"list_player_projections_v1_players_projections_get","parameters":[{"name":"season","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}$"},{"type":"null"}],"description":"NBA season; defaults to the configured active season","title":"Season"},"description":"NBA season; defaults to the configured active season"},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Latest snapshot on or before this date; omit for latest","title":"As Of"},"description":"Latest snapshot on or before this date; omit for latest"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"description":"Case- and accent-insensitive name search","title":"Name"},"description":"Case- and accent-insensitive name search"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum results","default":50,"title":"Limit"},"description":"Maximum results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerProjectionsResp"}}}},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/{player_id}/projection":{"get":{"tags":["Players"],"summary":"Get a player's ESPN preseason projection","description":"Projected games and per-game statistics from the latest ESPN projection snapshot in the requested season. Shooting rates are recomputed from makes/attempts on a 0–1 scale. Missing measurements remain null. A known player without a projection returns success with data=null; an unknown NBA player ID returns 404.","operationId":"get_player_projection_v1_players__player_id__projection_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"NBA player ID","title":"Player Id"},"description":"NBA player ID"},{"name":"season","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}$"},{"type":"null"}],"description":"NBA season; defaults to the configured active season","title":"Season"},"description":"NBA season; defaults to the configured active season"},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Latest snapshot on or before this date; omit for latest","title":"As Of"},"description":"Latest snapshot on or before this date; omit for latest"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerProjectionResp"}}}},"404":{"description":"Player not found"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/":{"get":{"tags":["Players"],"summary":"List players","description":"List NBA players with optional filters for team, position, games played, and name search.","operationId":"list_players_v1_players__get","parameters":[{"name":"team","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by team abbreviation (e.g., LAL)","title":"Team"},"description":"Filter by team abbreviation (e.g., LAL)"},{"name":"position","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by position (G, F, C)","title":"Position"},"description":"Filter by position (G, F, C)"},{"name":"min_games","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Minimum games played","title":"Min Games"},"description":"Minimum games played"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by player name","title":"Name"},"description":"Search by player name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum results","default":50,"title":"Limit"},"description":"Maximum results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"}],"responses":{"200":{"description":"Players retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayersListResp"}}}},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/stats":{"get":{"tags":["Players"],"summary":"Get player statistics","description":"Retrieve detailed statistics for a player by ID or name/team combination. Use the `window` parameter to get averages over a specific game window.","operationId":"get_player_stats_by_query_v1_players_stats_get","parameters":[{"name":"espn_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"ESPN player ID; takes precedence over player_id","title":"Espn Id"},"description":"ESPN player ID; takes precedence over player_id"},{"name":"player_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"NBA player ID (distinct from espn_id)","title":"Player Id"},"description":"NBA player ID (distinct from espn_id)"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Player name (used for public/roster lookup)","title":"Name"},"description":"Player name (used for public/roster lookup)"},{"name":"team","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Player team abbreviation (used with name)","title":"Team"},"description":"Player team abbreviation (used with name)"},{"name":"window","in":"query","required":false,"schema":{"type":"string","pattern":"^(season|l[1-9][0-9]?)$","description":"Stat window for averages: 'season' for full season, or 'lN' for last N games (e.g. l5, l10, l15)","default":"season","title":"Window"},"description":"Stat window for averages: 'season' for full season, or 'lN' for last N games (e.g. l5, l10, l15)"}],"responses":{"200":{"description":"Player stats retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerStatsResp"}}}},"400":{"description":"No player identifier given"},"404":{"description":"Player not found, or no game stats for the player"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/{player_id}/stats":{"get":{"tags":["Players"],"summary":"Get player statistics by ID","description":"Retrieve detailed statistics for a player by their ID.","operationId":"get_player_stats_v1_players__player_id__stats_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"integer","description":"NBA player ID","title":"Player Id"},"description":"NBA player ID"},{"name":"window","in":"query","required":false,"schema":{"type":"string","pattern":"^(season|l[1-9][0-9]?)$","description":"Full season or last N games (l5, l10, etc.)","default":"season","title":"Window"},"description":"Full season or last N games (l5, l10, etc.)"}],"responses":{"200":{"description":"Player stats retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerStatsResp"}}}},"404":{"description":"Player not found"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/{player_id}/games":{"get":{"tags":["Players"],"summary":"Get player game log","description":"Retrieve the recent game log for a player showing box scores for each game.","operationId":"get_player_games_v1_players__player_id__games_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"integer","description":"NBA player ID","title":"Player Id"},"description":"NBA player ID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Number of games to return","default":10,"title":"Limit"},"description":"Number of games to return"}],"responses":{"200":{"description":"Game log retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerGamesResp"}}}},"404":{"description":"Player not found"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/{player_id}/trends":{"get":{"tags":["Players"],"summary":"Get player trends","description":"Retrieve trend data for a player including performance over different periods and ownership changes.","operationId":"get_player_trends_v1_players__player_id__trends_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"integer","description":"NBA player ID","title":"Player Id"},"description":"NBA player ID"}],"responses":{"200":{"description":"Trends retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerTrendsResp"}}}},"404":{"description":"Player not found"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/{player_id}/percentiles":{"get":{"tags":["Players"],"summary":"Get player percentile ranks","description":"Get percentile ranks for a player's stats compared to all qualifying players.","operationId":"get_player_percentiles_v1_players__player_id__percentiles_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"integer","description":"NBA player ID","title":"Player Id"},"description":"NBA player ID"},{"name":"min_games","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Minimum games played to qualify","default":20,"title":"Min Games"},"description":"Minimum games played to qualify"}],"responses":{"200":{"description":"Percentiles calculated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerPercentilesResp"}}}},"404":{"description":"Player not found"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/{player_id}/status":{"get":{"tags":["Players"],"summary":"Get player injury status","description":"Get a player's current injury status. Only reports from the last 7 days count; a player whose latest report is older has no current status and `data` is null.","operationId":"get_player_status_v1_players__player_id__status_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"integer","description":"NBA player ID","title":"Player Id"},"description":"NBA player ID"}],"responses":{"200":{"description":"Player status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerStatusResp"}}}},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/players/{player_id}/ownership":{"get":{"tags":["Players"],"summary":"Get player ownership","description":"Get the current fantasy ownership percentage for a player.","operationId":"get_player_ownership_v1_players__player_id__ownership_get","parameters":[{"name":"player_id","in":"path","required":true,"schema":{"type":"integer","description":"NBA player ID","title":"Player Id"},"description":"NBA player ID"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"description":"Lookback window in days for trend comparison","default":14,"title":"Days"},"description":"Lookback window in days for trend comparison"}],"responses":{"200":{"description":"Ownership data retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerOwnershipResp"}}}},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/games/{game_date}":{"get":{"tags":["Games"],"summary":"Get games on a date","description":"Returns all NBA games scheduled for or played on a specific date.","operationId":"get_games_on_date_v1_games__game_date__get","parameters":[{"name":"game_date","in":"path","required":true,"schema":{"type":"string","format":"date","description":"Date in YYYY-MM-DD format","title":"Game Date"},"description":"Date in YYYY-MM-DD format"}],"responses":{"200":{"description":"Games retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GamesOnDateResp"}}}},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_abbrev}/schedule":{"get":{"tags":["Teams"],"summary":"Get team schedule","description":"Returns the schedule for an NBA team including upcoming and past games.","operationId":"get_team_schedule_v1_teams__team_abbrev__schedule_get","parameters":[{"name":"team_abbrev","in":"path","required":true,"schema":{"type":"string","description":"Team abbreviation (e.g., LAL, BOS, GSW)","title":"Team Abbrev"},"description":"Team abbreviation (e.g., LAL, BOS, GSW)"},{"name":"upcoming","in":"query","required":false,"schema":{"type":"boolean","description":"Only return future games","default":false,"title":"Upcoming"},"description":"Only return future games"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of games to return","default":20,"title":"Limit"},"description":"Maximum number of games to return"}],"responses":{"200":{"description":"Schedule retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamScheduleResp"}}}},"404":{"description":"Team not found"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_abbrev}/stats":{"get":{"tags":["Teams"],"summary":"Get team season stats","description":"Returns the latest season-to-date statistics for an NBA team.","operationId":"get_team_stats_v1_teams__team_abbrev__stats_get","parameters":[{"name":"team_abbrev","in":"path","required":true,"schema":{"type":"string","description":"Team abbreviation (e.g., LAL, BOS, GSW)","title":"Team Abbrev"},"description":"Team abbreviation (e.g., LAL, BOS, GSW)"}],"responses":{"200":{"description":"Stats retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NBATeamStatsResp"}}}},"404":{"description":"Team not found or no stats available"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_abbrev}/roster":{"get":{"tags":["Teams"],"summary":"Get team roster","description":"Returns players with last known season-stat team assignments, per-game averages, and injury status. Each player's latest row is used, including inactive players. The response reports the season served; before opening night this may be the previous season. This is not an authoritative current roster feed.","operationId":"get_team_roster_v1_teams__team_abbrev__roster_get","parameters":[{"name":"team_abbrev","in":"path","required":true,"schema":{"type":"string","description":"Team abbreviation (e.g., LAL, BOS, GSW)","title":"Team Abbrev"},"description":"Team abbreviation (e.g., LAL, BOS, GSW)"}],"responses":{"200":{"description":"Roster retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NBATeamRosterResp"}}}},"404":{"description":"Team not found or no data available"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teams/{team_abbrev}/live-game":{"get":{"tags":["Teams"],"summary":"Get team live/upcoming game","description":"Returns the live, most recent, or next upcoming game for an NBA team.","operationId":"get_team_live_game_v1_teams__team_abbrev__live_game_get","parameters":[{"name":"team_abbrev","in":"path","required":true,"schema":{"type":"string","description":"Team abbreviation (e.g., LAL, BOS, GSW)","title":"Team Abbrev"},"description":"Team abbreviation (e.g., LAL, BOS, GSW)"}],"responses":{"200":{"description":"Game data retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NBATeamLiveGameResp"}}}},"404":{"description":"Team not found or no games available"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ownership/trending":{"get":{"tags":["Ownership"],"summary":"Get trending players by ownership","description":"Returns players with significant ownership changes over a specified period.\n\nUses velocity-based ranking by default, which measures relative change:\n- 5% → 15% = +200% velocity (breakout player)\n- 60% → 65% = +8% velocity (established player with small uptick)\n\nThis surfaces emerging players better than absolute change alone.","operationId":"get_ownership_trending_v1_ownership_trending_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"description":"Lookback period in days","default":7,"title":"Days"},"description":"Lookback period in days"},{"name":"min_change","in":"query","required":false,"schema":{"type":"number","maximum":100,"minimum":0,"description":"Minimum ownership change in percentage points","default":5.0,"title":"Min Change"},"description":"Minimum ownership change in percentage points"},{"name":"min_ownership","in":"query","required":false,"schema":{"type":"number","maximum":100,"minimum":0,"description":"Minimum ownership % to filter noise from deep roster players","default":3.0,"title":"Min Ownership"},"description":"Minimum ownership % to filter noise from deep roster players"},{"name":"sort_by","in":"query","required":false,"schema":{"enum":["velocity","change"],"type":"string","description":"Sort by velocity (relative change) or change (absolute)","default":"velocity","title":"Sort By"},"description":"Sort by velocity (relative change) or change (absolute)"},{"name":"direction","in":"query","required":false,"schema":{"enum":["up","down","both"],"type":"string","description":"Trend direction","default":"both","title":"Direction"},"description":"Trend direction"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum players per direction","default":20,"title":"Limit"},"description":"Maximum players per direction"}],"responses":{"200":{"description":"Trending players retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnershipTrendingResp"}}}},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/generate-lineup":{"post":{"tags":["Analytics"],"summary":"Generate optimized lineup","description":"Auto-fetch roster and free agents from stored ESPN/Yahoo credentials, then generate an optimized lineup. Requires API key with 'analytics' scope.","operationId":"generate_lineup_v1_analytics_generate_lineup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateLineupRequest"}}},"required":true},"responses":{"200":{"description":"Lineup generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizeResp"}}}},"401":{"description":"API key required or invalid"},"403":{"description":"API key lacks required scope"},"404":{"description":"Team not found or does not belong to this API key"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/analytics/breakout-streamers":{"get":{"tags":["Analytics"],"summary":"Breakout streamer candidates","description":"Returns players likely to see increased minutes due to a prominent teammate being injured or suspended. Updated daily. Requires API key with 'analytics' scope.","operationId":"get_breakout_streamers_v1_analytics_breakout_streamers_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum candidates to return","default":20,"title":"Limit"},"description":"Maximum candidates to return"},{"name":"team","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by NBA team abbreviation (e.g. LAL, BOS)","title":"Team"},"description":"Filter by NBA team abbreviation (e.g. LAL, BOS)"}],"responses":{"200":{"description":"Breakout candidates retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakoutResp"}}}},"401":{"description":"API key required or invalid"},"403":{"description":"API key lacks required scope"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/schedule/weeks":{"get":{"tags":["Schedule"],"summary":"Get all schedule weeks","description":"Returns every fantasy week of the active season with start/end dates, the current week number, and a `season` block (key, dates, phase).","operationId":"get_schedule_weeks_v1_schedule_weeks_get","responses":{"200":{"description":"Schedule weeks retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleWeeksResp"}}}},"429":{"description":"Rate limit exceeded"}}}},"/v1/live/players/today":{"get":{"tags":["Live"],"summary":"Get Live Players Today","description":"Get live stats for all players with games today.\n\nReturns current box score stats for every player in an active or\nrecently-completed game, ordered by fantasy points descending.\nUpdated every ~60 seconds by the live polling pipeline.","operationId":"get_live_players_today_v1_live_players_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LivePlayersResp"}}}}}}},"/v1/live/schedule/today":{"get":{"tags":["Live"],"summary":"Get Today Schedule","description":"Get game scheduling info for today's live polling.\n\nReturns the first tip-off time so the cron-runner's live loop can\nsleep until 30 minutes before the first game rather than relying on\na hardcoded cron start time. Reads from the precomputed game schedule\nin the DB (populated by GameStartTimesPipeline).","operationId":"get_today_schedule_v1_live_schedule_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveScheduleResp"}}}}}}},"/v1/live/scoreboard":{"get":{"tags":["Live"],"summary":"Get Live Scoreboard","description":"Get the current NBA scoreboard with live game statuses.\n\nReturns each active game's status, period, and game clock.\nHits NBA's live CDN directly — reflects near-real-time game state.","operationId":"get_live_scoreboard_v1_live_scoreboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreboardResp"}}}}}}},"/v1/playoff/bracket":{"get":{"tags":["playoff"],"summary":"Get Playoff Bracket","description":"Get the NBA playoff bracket with current series standings.\n\nReturns all rounds (First Round through Finals), grouped by conference.\nUpdated once nightly after games complete via PlayoffBracketPipeline.","operationId":"get_playoff_bracket_v1_playoff_bracket_get","parameters":[{"name":"season","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}$"},{"type":"null"}],"description":"Season string (e.g. '2025-26'). Omit for latest.","title":"Season"},"description":"Season string (e.g. '2025-26'). Omit for latest."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayoffBracketResp"}}}},"404":{"description":"No bracket data for the requested season"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sqlmate/schema":{"get":{"tags":["SQLMate"],"summary":"Get the query-builder schema","operationId":"get_schema_v1_sqlmate_schema_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/sqlmate/query":{"post":{"tags":["SQLMate"],"summary":"Run a visual query","operationId":"run_query_v1_sqlmate_query_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/users/update":{"post":{"tags":["user management"],"summary":"Update User","operationId":"update_user_v1_internal_users_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/users/delete":{"post":{"tags":["user management"],"summary":"Delete User","operationId":"delete_user_v1_internal_users_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeleteReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeleteResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/teams/":{"get":{"tags":["team management"],"summary":"Get Teams","operationId":"get_teams_v1_internal_teams__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamGetResp"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/teams/add":{"post":{"tags":["team management"],"summary":"Add Team","operationId":"add_team_v1_internal_teams_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamAddReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamAddResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/teams/remove":{"delete":{"tags":["team management"],"summary":"Remove Team","operationId":"remove_team_v1_internal_teams_remove_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"query","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRemoveResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/update":{"put":{"tags":["team management"],"summary":"Update Team","operationId":"update_team_v1_internal_teams_update_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdateReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdateResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/teams/view":{"get":{"tags":["team management"],"summary":"View Team","operationId":"view_team_v1_internal_teams_view_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"query","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamDataResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/insights":{"get":{"tags":["team management"],"summary":"Get Team Insights","operationId":"get_team_insights_v1_internal_teams__team_id__insights_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInsightsResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/league":{"get":{"tags":["team management"],"summary":"Get Team League","description":"Provider-detected league settings for an owned team (None until synced).","operationId":"get_team_league_v1_internal_teams__team_id__league_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeagueGetResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/league/sync":{"post":{"tags":["team management"],"summary":"Sync Team League","description":"Re-fetch the league's scoring settings from the provider and store them.\n\nDeliberately not wrapped in `respond`: an ERROR envelope *with data* here is a\nsoft warning (\"provider settings unavailable; using default points scoring\")\nthat the client renders, so it stays a 200.","operationId":"sync_team_league_v1_internal_teams__team_id__league_sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeagueSyncResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/lineups/generate":{"post":{"tags":["lineup management"],"summary":"Generate Lineup","operationId":"generate_lineup_v1_internal_lineups_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateLineupReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateLineupResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/lineups":{"get":{"tags":["lineup management"],"summary":"Get Lineups","operationId":"get_lineups_v1_internal_lineups_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"query","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLineupsResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/lineups/save":{"put":{"tags":["lineup management"],"summary":"Save Lineup","operationId":"save_lineup_v1_internal_lineups_save_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveLineupReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveLineupResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/lineups/remove":{"delete":{"tags":["lineup management"],"summary":"Remove Lineup","operationId":"remove_lineup_v1_internal_lineups_remove_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lineup_id","in":"query","required":true,"schema":{"type":"integer","title":"Lineup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteLineupResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/yahoo/authorize":{"get":{"tags":["Yahoo Fantasy"],"summary":"Yahoo Authorize","description":"Initiate Yahoo OAuth flow.\n\nReturns the Yahoo authorization URL that the frontend should redirect to\n(503 YAHOO_NOT_CONFIGURED when the client credentials are missing). The\ncallback lands on `return_to` with `?yahoo_connected=true&yahoo_connection=<id>`\nor `?yahoo_error=<code>` added.","operationId":"yahoo_authorize_v1_internal_yahoo_authorize_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"return_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Frontend path the callback sends the browser back to, e.g. `/week`; a path on the app's own origin only (optionally with a query), at most 200 characters. Anything else is ignored and the callback returns to the Account desk.","title":"Return To"},"description":"Frontend path the callback sends the browser back to, e.g. `/week`; a path on the app's own origin only (optionally with a query), at most 200 characters. Anything else is ignored and the callback returns to the Account desk."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YahooAuthUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/yahoo/callback":{"get":{"tags":["Yahoo Fantasy"],"summary":"Yahoo Callback","description":"Handle Yahoo OAuth callback.\n\nThis endpoint is called by Yahoo after the user authorizes the app.\nIt exchanges the authorization code for tokens and redirects to the frontend.","operationId":"yahoo_callback_v1_internal_yahoo_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Authorization code from Yahoo","title":"Code"},"description":"Authorization code from Yahoo"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State token for CSRF protection","title":"State"},"description":"State token for CSRF protection"},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error code if authorization failed","title":"Error"},"description":"Error code if authorization failed"},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error description","title":"Error Description"},"description":"Error description"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/yahoo/leagues":{"get":{"tags":["Yahoo Fantasy"],"summary":"Get User Leagues","description":"Get all Yahoo fantasy basketball leagues for the authenticated user.\n\nTakes the connection id issued by the callback rather than the access token\nitself, so no Yahoo credential ever appears in a URL. A rejected token is a\n403 PROVIDER_AUTH_EXPIRED; a Yahoo outage a 502/504.","operationId":"get_user_leagues_v1_internal_yahoo_leagues_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"query","required":true,"schema":{"type":"integer","description":"Opaque Yahoo connection id from the OAuth callback","title":"Connection Id"},"description":"Opaque Yahoo connection id from the OAuth callback"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YahooLeaguesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/yahoo/teams":{"get":{"tags":["Yahoo Fantasy"],"summary":"Get League Teams","description":"Get all teams in a specific Yahoo league.\n\nUse this to let the user select which team they own.","operationId":"get_league_teams_v1_internal_yahoo_teams_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"query","required":true,"schema":{"type":"integer","description":"Opaque Yahoo connection id from the OAuth callback","title":"Connection Id"},"description":"Opaque Yahoo connection id from the OAuth callback"},{"name":"league_key","in":"query","required":true,"schema":{"type":"string","description":"Yahoo league key","title":"League Key"},"description":"Yahoo league key"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YahooTeamsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/matchups/current":{"post":{"tags":["matchups"],"summary":"Get Current Matchup","description":"Get current week's matchup with projections.\n\nRequires league_info with credentials and team name.\nReturns both teams' rosters, current scores, and projected final scores.\nNo matchup (bye week / offseason) is a 200 with `data: null` and a message.","operationId":"get_current_matchup_v1_internal_matchups_current_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchupReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchupResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/matchups/current/{team_id}":{"get":{"tags":["matchups"],"summary":"Get Matchup By Team","description":"Get matchup for a saved team using the team's stored league info.\n\nThis endpoint is convenient when you have a saved team and don't want\nto pass all the league credentials again.","operationId":"get_matchup_by_team_v1_internal_matchups_current__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}},{"name":"avg_window","in":"query","required":false,"schema":{"type":"string","pattern":"^(season|last_7|last_14|last_30)$","description":"Averaging window: season, last_7, last_14, or last_30","default":"season","title":"Avg Window"},"description":"Averaging window: season, last_7, last_14, or last_30"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchupResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/matchups/live/{team_id}":{"get":{"tags":["matchups"],"summary":"Get Live Matchup","description":"Get the current matchup with live in-game stats per player.\n\nCombines ESPN/Yahoo live scores (correct for custom league scoring) with\nper-player box score stats from the live polling pipeline (~60s cadence).\nPlayers with no game today have live=null. Includes all roster slots\n(active and bench) so the frontend can render the full matchup layout.","operationId":"get_live_matchup_v1_internal_matchups_live__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveMatchupResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/matchups/history/{team_id}":{"get":{"tags":["matchups"],"summary":"Get Matchup Score History","description":"Get daily score history for a team's matchup period.\n\nReturns historical daily snapshots of both teams' scores for charting\nthe score progression over time.","operationId":"get_matchup_score_history_v1_internal_matchups_history__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}},{"name":"matchup_period","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Specific matchup period (week number). If omitted, returns the latest.","title":"Matchup Period"},"description":"Specific matchup period (week number). If omitted, returns the latest."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchupScoreHistoryResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/matchups/week/{team_id}":{"get":{"tags":["matchups"],"summary":"Get Weekly Matchup","description":"Get all days in the current matchup period in a single request.\n\nMakes one ESPN/Yahoo API call and returns per-day player data for every\nday in the matchup period. Use this instead of N parallel getDailyMatchup\ncalls when rendering the matchup bar chart.","operationId":"get_weekly_matchup_v1_internal_matchups_week__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyMatchupResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/matchups/season-summary/{team_id}":{"get":{"tags":["matchups"],"summary":"Get Season Summary","description":"Get the full-season W/L record, total points, and per-week results for a team.\n\nAggregates DailyMatchupScore snapshots across all matchup periods.\nThe last snapshot per period is used as the final score for that week.","operationId":"get_season_summary_v1_internal_matchups_season_summary__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeasonSummaryResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/matchups/daily/{team_id}":{"get":{"tags":["matchups"],"summary":"Get Daily Matchup","description":"Get daily drill-down for a matchup day.\n\nFor past dates: returns player box score stats from player_game_stats.\nFor future dates: returns which players have games scheduled.\nFor today: returns stats so far (frontend should prefer live endpoint).","operationId":"get_daily_matchup_v1_internal_matchups_daily__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}},{"name":"date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Target date in YYYY-MM-DD format","title":"Date"},"description":"Target date in YYYY-MM-DD format"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyMatchupResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/streamers/breakout":{"get":{"tags":["Streamers"],"summary":"Get Breakout Streamers","description":"Return breakout streamer candidates for logged-in Court Vision users.","operationId":"get_breakout_streamers_v1_internal_streamers_breakout_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum candidates to return","default":20,"title":"Limit"},"description":"Maximum candidates to return"},{"name":"team","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by NBA team abbreviation (e.g. LAL, BOS)","title":"Team"},"description":"Filter by NBA team abbreviation (e.g. LAL, BOS)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakoutResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/streamers/find":{"post":{"tags":["Streamers"],"summary":"Find Streamers","description":"Find and rank the best streaming candidates from free agents.\n\nSupports two modes:\n- week (default): Rank by rest-of-week value, prioritizing schedule density\n  and players on teams with remaining back-to-back games.\n- daily: Rank by single-day pickup value, prioritizing per-game performance.\n  Only returns players with a game on the target day. In this mode, B2B\n  only means the target day + the next day.\n\nRequest body:\n- league_info: ESPN/Yahoo league credentials\n- fa_count: Number of free agents to analyze (default 50)\n- exclude_injured: Exclude injured players (default true)\n- b2b_only: Only show B2B team players (default false)\n- mode: Scoring mode - 'week' or 'daily' (default 'week')\n- target_day: Day index for daily mode (0-indexed). If null, uses current day.\n- avg_days: Number of days for rolling average (default 7, range 3-30)","operationId":"find_streamers_v1_internal_streamers_find_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamerReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamerResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/notifications/preferences":{"get":{"tags":["notifications"],"summary":"Get Preferences","description":"Get the current user's notification preferences (or defaults).","operationId":"get_preferences_v1_internal_notifications_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferenceResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["notifications"],"summary":"Update Preferences","description":"Create or update notification preferences for the current user.","operationId":"update_preferences_v1_internal_notifications_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferenceReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/notifications/team-preferences":{"get":{"tags":["notifications"],"summary":"Get Team Preferences","description":"List all team-level notification preference overrides for the current user.","operationId":"get_team_preferences_v1_internal_notifications_team_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTeamPreferenceListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/notifications/team-preferences/{team_id}":{"put":{"tags":["notifications"],"summary":"Upsert Team Preference","description":"Create or update a team-level notification preference override.","operationId":"upsert_team_preference_v1_internal_notifications_team_preferences__team_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTeamPreferenceReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTeamPreferenceSingleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["notifications"],"summary":"Delete Team Preference","description":"Delete a team-level override, reverting that team to global defaults.","operationId":"delete_team_preference_v1_internal_notifications_team_preferences__team_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/notifications/check-lineup/{team_id}":{"get":{"tags":["notifications"],"summary":"Check Lineup","description":"Manually check lineup issues for a specific team.\n\nReturns lineup issues without sending a notification.\nUseful for on-demand checking from the frontend.","operationId":"check_lineup_v1_internal_notifications_check_lineup__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineupCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/notifications/send-test/{team_id}":{"post":{"tags":["notifications"],"summary":"Send Test Alert","description":"Force-send today's lineup alert for a team to an address of your choice.\n\nBypasses the pipeline's tip-off window and daily dedup. The content is the\nsame fill plan the pipeline would mail (services.lineup_planner): the\nsuggested moves, or a \"nothing to fill\" confirmation when the lineup is set.","operationId":"send_test_alert_v1_internal_notifications_send_test__team_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","description":"Email address to send the test alert to","title":"Email"},"description":"Email address to send the test alert to"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/notifications/history":{"get":{"tags":["notifications"],"summary":"Get Notification History","description":"Get recent notification history for the current user.","operationId":"get_notification_history_v1_internal_notifications_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/api-keys/":{"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"List all active API keys for the authenticated user.","operationId":"list_api_keys_v1_internal_api_keys__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyListResp"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a new API key. The raw key is returned only once in this response.","operationId":"create_api_key_v1_internal_api_keys__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/api-keys/{key_id}":{"delete":{"tags":["API Keys"],"summary":"Revoke Api Key","description":"Soft-delete an API key (set is_active=False).","operationId":"revoke_api_key_v1_internal_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeApiKeyResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/rankings/{team_id}":{"get":{"tags":["Rankings"],"summary":"Get player rankings under a team's league scoring","description":"Ranks every NBA player by the scoring settings of the league this team belongs to: the league's point weights, or its categories for a head-to-head category league. `meta.scoring` reports which was used, whether the league's settings were successfully read from the provider, and any scoring keys that could not be honored.\n\nThe format is the league's — use the public `/v1/rankings/` endpoint to rank by an arbitrary format or category set.","operationId":"get_league_rankings_v1_internal_rankings__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}},{"name":"window","in":"query","required":false,"schema":{"anyOf":[{"enum":[7,14,30],"type":"integer"},{"type":"null"}],"description":"Rolling day window for averages: 7, 14, or 30. Omit for full-season.","title":"Window"},"description":"Rolling day window for averages: 7, 14, or 30. Omit for full-season."},{"name":"min_games","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":82,"minimum":1},{"type":"null"}],"description":"Minimum games played to be ranked. Defaults to 1 — the floor is an opt-in filter.","title":"Min Games"},"description":"Minimum games played to be ranked. Defaults to 1 — the floor is an opt-in filter."}],"responses":{"200":{"description":"Rankings retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RankingsResp"}}}},"304":{"description":"Not modified — the client's `If-None-Match` matches the current response"},"400":{"description":"Rejected by the rankings service"},"404":{"description":"No such team, or it does not belong to the caller"},"422":{"description":"Invalid window or min_games"}}}},"/v1/internal/sqlmate/users/save_table":{"post":{"tags":["SQLMate"],"summary":"Save a query as a user table","operationId":"save_table_v1_internal_sqlmate_users_save_table_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/sqlmate/users/get_tables":{"get":{"tags":["SQLMate"],"summary":"List the caller's saved tables","operationId":"get_tables_v1_internal_sqlmate_users_get_tables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/sqlmate/users/get_table_data":{"get":{"tags":["SQLMate"],"summary":"Get one saved table","operationId":"get_table_data_v1_internal_sqlmate_users_get_table_data_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_name","in":"query","required":true,"schema":{"type":"string","title":"Table Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/sqlmate/users/delete_table":{"post":{"tags":["SQLMate"],"summary":"Delete saved user tables","operationId":"delete_table_v1_internal_sqlmate_users_delete_table_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/sqlmate/users/update_table":{"post":{"tags":["SQLMate"],"summary":"Update a saved user table","operationId":"update_table_v1_internal_sqlmate_users_update_table_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/drafts/board":{"get":{"tags":["Drafts"],"summary":"Get the draft board under a team's league scoring","description":"Every draftable player, valued by the scoring settings of the league this team belongs to (point weights, or the fpts-scale category value for a category league), from ESPN's published projections where available and last season's per-game baseline otherwise. Rows carry the latest ESPN market rank/ADP and a `market_rank − cv_rank` delta, and are flagged `cap_blocked` when the league's hard position caps leave no room for them on the caller's roster.\n\n`cv_rank` is computed over the full pool before `picked`/`mine` are removed, so it stays stable and market-comparable throughout a draft.\n\nCategory leagues also carry `fit_value`/`fit_rank`: the same board re-scored for the caller's own roster, with any `punt` categories weighing zero.\n\n`market_rank` and `auction_value` come from the ESPN board matching the league's format — STANDARD for points, ROTO for categories — which `meta.market_rank_type` names.\n\nRows come back in the order `meta.rank_basis` names — `board` asks for one, the meta says what ran: ESPN's published rank in an ESPN room (a league ESPN runs, or a team with no synced league — its market pool is ESPN's anyway), with `board_rank` as each row's place and players ESPN does not rank trailing in CV order; Court Vision's rank for a league elsewhere, or while no snapshot exists.\n\nStateless: pick state rides in the query params, so there is no slot to count from and rows carry no availability. Use the session board once a draft room is open.","operationId":"get_draft_board_v1_internal_drafts_board_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"picked","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"description":"NBA player ids already drafted by anyone; removed from the board","default":[],"title":"Picked"},"description":"NBA player ids already drafted by anyone; removed from the board"},{"name":"mine","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"description":"NBA player ids drafted by the caller (no need to repeat them in `picked`); also removed, and counted against the league's position caps","default":[],"title":"Mine"},"description":"NBA player ids drafted by the caller (no need to repeat them in `picked`); also removed, and counted against the league's position caps"},{"name":"punt","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Category keys to concede, e.g. `punt=ft_pct&punt=tov`. They weigh zero in `fit_value`; unknown keys are ignored here (the room stores validated punts on the session instead). No effect on a points league.","default":[],"title":"Punt"},"description":"Category keys to concede, e.g. `punt=ft_pct&punt=tov`. They weigh zero in `fit_value`; unknown keys are ignored here (the room stores validated punts on the session instead). No effect on a points league."},{"name":"board","in":"query","required":false,"schema":{"enum":["espn","cv","my_team"],"type":"string","description":"Whose rankings order the rows. `espn` (the default) is ESPN's published draft rank for this league's format — the order an ESPN draft room shows — wherever the room can have it; `cv` is Court Vision's ranking, the opt-in; `my_team` is that ranking re-ordered for the caller's roster (`room_rank`: value over replacement under the room's punts, less the starts the roster could not use), which moves with every pick. `meta.rank_basis` says which actually ran and `meta.rank_basis_reason` why.","default":"espn","title":"Board"},"description":"Whose rankings order the rows. `espn` (the default) is ESPN's published draft rank for this league's format — the order an ESPN draft room shows — wherever the room can have it; `cv` is Court Vision's ranking, the opt-in; `my_team` is that ranking re-ordered for the caller's roster (`room_rank`: value over replacement under the room's punts, less the starts the roster could not use), which moves with every pick. `meta.rank_basis` says which actually ran and `meta.rank_basis_reason` why."},{"name":"rank_source","in":"query","required":false,"schema":{"enum":["cv","espn"],"type":"string","description":"What orders `recommendations`. `cv` (the default) is Court Vision's room-aware pick — value over replacement with the room's punts and lineup congestion applied; `espn` takes the best remaining on ESPN's own board for this league's format. Every component is computed either way, so switching never changes a card's numbers, only which opinion put it on top. `espn` falls back to `cv` when no market snapshot exists; `meta.rank_source` says which actually ran.","default":"cv","title":"Rank Source"},"description":"What orders `recommendations`. `cv` (the default) is Court Vision's room-aware pick — value over replacement with the room's punts and lineup congestion applied; `espn` takes the best remaining on ESPN's own board for this league's format. Every component is computed either way, so switching never changes a card's numbers, only which opinion put it on top. `espn` falls back to `cv` when no market snapshot exists; `meta.rank_source` says which actually ran."},{"name":"playoff_weight","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":4.0,"minimum":1.0},{"type":"null"}],"description":"How many regular-season games one game in the league's fantasy-playoff weeks counts as in Court Vision's value: 1 (playoffs weigh nothing extra) to 4, snapped to 1, 1.5, 2, 3 or 4. Default 2. Moves `cv_rank`, `season_games` and the recommendations; ESPN's order never moves with it. `meta.playoffs` names the weeks and echoes the weight used.","title":"Playoff Weight"},"description":"How many regular-season games one game in the league's fantasy-playoff weeks counts as in Court Vision's value: 1 (playoffs weigh nothing extra) to 4, snapped to 1, 1.5, 2, 3 or 4. Default 2. Moves `cv_rank`, `season_games` and the recommendations; ESPN's order never moves with it. `meta.playoffs` names the weeks and echoes the weight used."},{"name":"team_id","in":"query","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Board retrieved successfully (empty data with a message before any season data exists)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftBoardResp"}}}},"404":{"description":"No such team, or it does not belong to the caller"},"422":{"description":"Invalid picked/mine player ids"}}}},"/v1/internal/drafts":{"get":{"tags":["Drafts"],"summary":"List the caller's draft sessions","description":"Newest first, each with its pick count and whose turn is next. Picks themselves are on the detail route.","operationId":"list_draft_sessions_v1_internal_drafts_get","responses":{"200":{"description":"Sessions retrieved (empty list before the first draft)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftSessionListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Drafts"],"summary":"Start a draft session","description":"Creates a draft room. With a `team_id`, everything the provider already told us is prefilled from that team's synced league: draft type, pick order, rounds (the league's draftable roster spots, starters plus bench) and the keeper allowance. Omit `team_id` for generic settings: a snake of 13 rounds.\n\nA `live` room without a `team_id` is `league_pending`: for a league joined minutes before its draft. It opens on the generic settings and, when the Draft Tap connects, links to that ESPN draft, syncs the league and adds your team there (`sync/init`).\n\n`kind` says where the picks come from. `live` follows the team's own ESPN draft and is linked to it at once — one active live room per league, so a second is refused with the first's id. `mock` follows an ESPN mock lobby and links to the first one it reconciles with. `manual` follows nothing.\n\n`my_slot` is the one thing the caller must supply: `pick_order` holds ESPN team ids that nothing maps back to our teams, so the room asks which seat is yours.","operationId":"create_draft_session_v1_internal_drafts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftSessionCreate"}}},"required":true},"responses":{"200":{"description":"Session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftSessionResponse"}}}},"400":{"description":"Slot outside the draft, or a live room without a synced ESPN league"},"404":{"description":"No such team, or it does not belong to the caller"},"409":{"description":"An active room already follows that ESPN draft (`existing_session_id`)"},"422":{"description":"Invalid session fields"}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/drafts/{session_id}":{"get":{"tags":["Drafts"],"summary":"Get one draft session with its picks","operationId":"get_draft_session_v1_internal_drafts__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Session retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftSessionResponse"}}}},"404":{"description":"No such session, or it does not belong to the caller"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Drafts"],"summary":"Update a draft session","description":"Partial update — only the fields present in the body are written. Used for confirming or correcting `my_slot`, editing pre-designated `keepers`, setting the `punts` this room is drafting around, and closing the room (`status: completed`, which stamps `completed_at` the first time).\n\n`punts` must be categories this league actually scores; a points-scored room has none, and an empty list clears the build.\n\nChanging `draft_type` or `pick_order` re-derives the round and slot of every recorded pick. A change that would leave the session inconsistent — a slot outside the new pick order, or a draft resized shorter than the picks already recorded — is refused.\n\n`name` renames the room. `espn_league_id` links it to one ESPN draft (a real league's id, or a mock lobby's): exclusive — one active room per draft, refused with the other room's id otherwise — and an explicit null unlinks.","operationId":"update_draft_session_v1_internal_drafts__session_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftSessionUpdate"}}}},"responses":{"200":{"description":"Session updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftSessionResponse"}}}},"400":{"description":"Slot outside the draft, a draft resized shorter than its recorded picks, or punts this league cannot score"},"404":{"description":"No such session, or it does not belong to the caller"},"409":{"description":"Another active room already follows that ESPN draft (`existing_session_id`)"},"422":{"description":"Empty or invalid update"}}},"delete":{"tags":["Drafts"],"summary":"Delete a draft session","description":"Removes the room and every pick recorded in it. There is no undo: a finished draft is better closed (`status: completed`) than deleted.","operationId":"delete_draft_session_v1_internal_drafts__session_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Session deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftSessionDeleteResponse"}}}},"404":{"description":"No such session, or it does not belong to the caller"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/drafts/{session_id}/board":{"get":{"tags":["Drafts"],"summary":"Get the draft board for a session","description":"The room's board: the same valuation as `/drafts/board`, with pick state taken from the session rather than the query string, and with recommendations for the caller's next pick — every component of the score visible (`season_value`, `vorp`, `punts`, `injury`, `congestion`), all in season-value points. Every row the caller can still draft carries the same number as `room_score`, and its place by it as `room_rank`; `board=my_team` returns the rows in that order.\n\nPlayers the league's hard position caps have made undraftable for the caller are flagged `cap_blocked` (shown greyed, never hidden) and are excluded from the recommendations.\n\n`roster` lists the caller's drafted players with primary position, eligible slots and NBA team — what the roster zone needs to fill lineup slots, count caps and flag stacking.\n\nCategory leagues additionally carry `fit_value`/`fit_rank` — the board re-scored for this roster's needs, with the session's `punts` at zero weight — and `meta.category_need`, which says how far the roster trails an average team in each category. The punts are part of the score (`punts`); the needs are shown on every recommendation as `category_fit` and deliberately left out of it.\n\nRows with market data carry `availability` (`likely`/`tossup`/`gone`) for the caller's next pick — the pick after that while the caller is on the clock.\n\nRows come back in the order `meta.rank_basis` names: ESPN's published rank for the league's format in an ESPN room (a league ESPN runs, a room with no league, or one following an ESPN draft), with `board_rank` as each row's place and players ESPN does not rank trailing in CV order; Court Vision's rank for a league elsewhere, or while no market snapshot exists; `room_rank` when `board=my_team` asked for it. `meta.rank_basis_reason` says which.\n\n`rank_source` chooses what orders the recommendations: Court Vision's room-aware pick (the default), or the best remaining on ESPN's board. Every component is computed either way, so switching views never changes the numbers on a card — only which of the two opinions put it at the top.","operationId":"get_draft_session_board_v1_internal_drafts__session_id__board_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"board","in":"query","required":false,"schema":{"enum":["espn","cv","my_team"],"type":"string","description":"Whose rankings order the rows. `espn` (the default) is ESPN's published draft rank for this league's format — the order an ESPN draft room shows — wherever the room can have it; `cv` is Court Vision's ranking, the opt-in; `my_team` is that ranking re-ordered for the caller's roster (`room_rank`: value over replacement under the room's punts, less the starts the roster could not use), which moves with every pick. `meta.rank_basis` says which actually ran and `meta.rank_basis_reason` why.","default":"espn","title":"Board"},"description":"Whose rankings order the rows. `espn` (the default) is ESPN's published draft rank for this league's format — the order an ESPN draft room shows — wherever the room can have it; `cv` is Court Vision's ranking, the opt-in; `my_team` is that ranking re-ordered for the caller's roster (`room_rank`: value over replacement under the room's punts, less the starts the roster could not use), which moves with every pick. `meta.rank_basis` says which actually ran and `meta.rank_basis_reason` why."},{"name":"rank_source","in":"query","required":false,"schema":{"enum":["cv","espn"],"type":"string","description":"What orders `recommendations`. `cv` (the default) is Court Vision's room-aware pick — value over replacement with the room's punts and lineup congestion applied; `espn` takes the best remaining on ESPN's own board for this league's format. Every component is computed either way, so switching never changes a card's numbers, only which opinion put it on top. `espn` falls back to `cv` when no market snapshot exists; `meta.rank_source` says which actually ran.","default":"cv","title":"Rank Source"},"description":"What orders `recommendations`. `cv` (the default) is Court Vision's room-aware pick — value over replacement with the room's punts and lineup congestion applied; `espn` takes the best remaining on ESPN's own board for this league's format. Every component is computed either way, so switching never changes a card's numbers, only which opinion put it on top. `espn` falls back to `cv` when no market snapshot exists; `meta.rank_source` says which actually ran."},{"name":"playoff_weight","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":4.0,"minimum":1.0},{"type":"null"}],"description":"How many regular-season games one game in the league's fantasy-playoff weeks counts as in Court Vision's value: 1 (playoffs weigh nothing extra) to 4, snapped to 1, 1.5, 2, 3 or 4. Default 2. Moves `cv_rank`, `season_games` and the recommendations; ESPN's order never moves with it. `meta.playoffs` names the weeks and echoes the weight used.","title":"Playoff Weight"},"description":"How many regular-season games one game in the league's fantasy-playoff weeks counts as in Court Vision's value: 1 (playoffs weigh nothing extra) to 4, snapped to 1, 1.5, 2, 3 or 4. Default 2. Moves `cv_rank`, `season_games` and the recommendations; ESPN's order never moves with it. `meta.playoffs` names the weeks and echoes the weight used."}],"responses":{"200":{"description":"Board retrieved successfully (empty data with a message before any season data exists)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftBoardResp"}}}},"404":{"description":"No such session, or it does not belong to the caller"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/drafts/{session_id}/picks":{"post":{"tags":["Drafts"],"summary":"Record a pick","description":"Appends a pick. `overall_pick` defaults to the session's lowest unused number, so the normal path is to post the player alone; passing it explicitly is how a correction lands in a hole an undo left. The player is resolved NBA id → ESPN id → normalized name, and a pick whose player is not in `nba.players` yet is still recorded with the provider identity. A player already in the session cannot be recorded a second time — undo the earlier pick to correct it.\n\n`source: keeper` records a keeper at the pick its round costs (the session's `keepers` carry that number as `overall_pick`). A keeper pick leaves the board like any other but never counts as the draft front: whose-turn arithmetic steps over it, so it is checked against the session's designated keepers rather than taken on trust. `source: mock` is rejected here — it claims the autopicker made the pick, which only the server may say.","operationId":"add_draft_pick_v1_internal_drafts__session_id__picks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftPickCreate"}}}},"responses":{"200":{"description":"Pick recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftPickResponse"}}}},"400":{"description":"Pick past the end of the draft"},"404":{"description":"No such session/player, or the session does not belong to the caller"},"409":{"description":"That pick number is already recorded, or that player already is"},"422":{"description":"A pick that identifies no player"}}}},"/v1/internal/drafts/{session_id}/picks/{overall_pick}":{"delete":{"tags":["Drafts"],"summary":"Undo a pick","description":"Removes one pick by its overall number. The number becomes the next default, so a mis-entered pick is re-recorded in place.\n\nA room that follows an ESPN draft may only undo what Court Vision recorded itself — a hand-entered pick or the autopicker's. A pick ESPN reported is ESPN's record: removing it here would change nothing on their side and the next sync would restore it, so it is refused with `DRAFT_PICK_NOT_UNDOABLE`.","operationId":"remove_draft_pick_v1_internal_drafts__session_id__picks__overall_pick__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"overall_pick","in":"path","required":true,"schema":{"type":"integer","title":"Overall Pick"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Pick undone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftPickDeleteResponse"}}}},"400":{"description":"The pick is ESPN's, not this room's, to undo"},"404":{"description":"No such session or pick, or the session does not belong to the caller"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/drafts/{session_id}/sync/init":{"post":{"tags":["Drafts"],"summary":"Reconcile a session with the ESPN draft room's INIT frame","description":"Decodes the ESPN draft room's INIT snapshot and folds it into this session. On a session with no picks yet it sets the pick order, slot, rounds and draft type from the room; then it records every pick the room has made, at that pick's ESPN number, skipping the ones already recorded and reporting (never overwriting) any that disagree.\n\nIdempotent by design: the room's tab posts this on every connect, so a reconnect re-posts the whole snapshot and only the newly-made picks are inserted.\n\nA `league_pending` room (a live room started without a team) links to the ESPN draft this INIT came from and then adopts its league: the league's settings are synced and your team in it is added to your account, as the add-team flow would, and the room takes the league's scoring and roster. `league_adopted` reports it; when ESPN cannot be read `league_adoption_error` says why and the next connect tries again.","operationId":"sync_draft_init_v1_internal_drafts__session_id__sync_init_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftInitSyncRequest"}}}},"responses":{"200":{"description":"Reconciled — see `inserted`, `skipped`, `conflicts`, `warnings`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftInitSyncResponse"}}}},"400":{"description":"The payload is not a decodable INIT frame"},"404":{"description":"No such session, or it does not belong to the caller"},"409":{"description":"The ESPN room belongs to a different league than this session"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/drafts/{session_id}/mock/advance":{"post":{"tags":["Drafts"],"summary":"Run the mock autopicker","description":"Plays the draft forward from where it stands. `until: my_turn` runs the other seats up to — not including — your next pick, so the room lands on the clock with the board already scored; with no turn of yours left it runs to the end, which is how a mock finishes on that button alone. `until: end` runs every remaining pick, yours included, and completes the session.\n\nEach seat takes the best available by ADP (ESPN's editorial rank where there is no ADP), with a small preference for reaching a few names down the board, and never past a hard position cap — if every remaining player would break the caps of the seat on the clock, the run stops and says so rather than breaching one. There is no roster-need modelling: the other seats are a clock, not opponents, and neither is your own seat under `end`. Stop at your turn and read the board if you want the pick made well.\n\nDeterministic: every pick is seeded from `(session_id, overall_pick)`, so advancing a room turn by turn produces exactly the draft advancing it in one call would, and a mock replays identically. A different room drafts differently, on purpose.\n\nMock rooms only, and only ones following nothing. A manual or live room is tracking a real draft, and a mock room already linked to an ESPN lobby takes its picks from there — simulating over either would be fiction. Picks are recorded `source: mock` and undo one by one like any other.\n\nBefore ESPN publishes a market snapshot for the season the seats fall back to CV value and the response says so (`fallback`).","operationId":"advance_mock_draft_v1_internal_drafts__session_id__mock_advance_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockAdvanceRequest"}}}},"responses":{"200":{"description":"Advanced — see `picks_made`, `stopped_at`, `stopped_reason`, `fallback`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockAdvanceResponse"}}}},"400":{"description":"No pick order or round count, an auction room, or no slot to stop at"},"404":{"description":"No such session, or it does not belong to the caller"},"409":{"description":"Not a mock room, a mock room already following an ESPN draft, or a draft that is not active"},"422":{"description":"`until` is neither `my_turn` nor `end`"}}}},"/v1/internal/drafts/{session_id}/recap":{"get":{"tags":["Drafts"],"summary":"Grade a finished draft","description":"The session's own picks, priced against the board they were drafted from — however they were recorded (by hand, from a live ESPN room, from an import, or by the autopicker).\n\nEach pick carries `value_over_slot`: what the player was worth against the player CV ranked at that pick number. `surplus_cv` and `surplus_market` say the same in rank terms, against our board and against ESPN's ADP.\n\nSeats are graded A–F on the sum of their picks' `value_over_slot`, **ranked against the other seats in this room only** — a grade says who drafted best here, not how the room compares to any other league. An auction has no value ladder to price a pick number against, so those rooms grade on total value instead (`meta.graded_by`).\n\nCategory leagues also project the standings: each seat's per-category z-sum ranked into roto points, plus the categories it would win against every other seat. That is an approximation from the draft, not a season simulation (`meta.standings_basis`). Points leagues get projected season value per seat.\n\nA pick whose player never resolved, or who has no line to value, is listed with a null `value` and left out of its seat's sums — never dropped, and never charged to the seat.\n\nAvailable before a draft finishes as well: `meta.complete` and `picks_made` say how far it got.","operationId":"get_draft_recap_v1_internal_drafts__session_id__recap_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Recap built (empty data with a message when the room has no picks)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftRecapResp"}}}},"404":{"description":"No such session, or it does not belong to the caller"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/drafts/{session_id}/import":{"post":{"tags":["Drafts"],"summary":"Import a finished ESPN draft","description":"Records a completed ESPN draft into this session, so a draft run without the room still gets a recap.\n\nOnly after the fact: ESPN writes the picks into `mDraftDetail` when the draft completes, atomically with its `drafted` flag, and shows every slot empty until then — an unfinished draft answers 409 `DRAFT_NOT_COMPLETE` rather than importing a skeleton. While a draft is running, the tap (`/sync/init` plus live picks) is what tracks it.\n\nAn empty session takes its pick order, slot, length and type from the draft; one that already holds picks keeps its own and reports the disagreements as `warnings`. Picks are recorded `source: import` (ESPN's keepers as `keeper`), and `by_me` is the team whose name matches the session team's.\n\nIdempotent: re-importing skips every pick already held and reports any that disagree instead of overwriting them. The session is marked completed either way.","operationId":"import_draft_v1_internal_drafts__session_id__import_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Imported — see `inserted`, `skipped`, `conflicts`, `header_applied`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftImportResponse"}}}},"400":{"description":"The room has no team, the provider is not ESPN, or the team is not in the league"},"401":{"description":"The stored ESPN credentials were rejected"},"404":{"description":"No such session, or it does not belong to the caller"},"409":{"description":"The draft has not finished, the room is simulated, or it follows a different ESPN draft"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/lineup":{"get":{"tags":["lineup editor"],"summary":"Get Lineup","description":"Slots, eligibility, locks and game times for the team's current ESPN day, or a later one.","operationId":"get_lineup_v1_internal_teams__team_id__lineup_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}},{"name":"scoring_period_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"description":"A later ESPN day to read; its board is writable like today's (POST .../moves with expected_scoring_period_id = this day). Omit for today. 400 SCORING_PERIOD_OUT_OF_RANGE before today or past the season's last day.","title":"Scoring Period Id"},"description":"A later ESPN day to read; its board is writable like today's (POST .../moves with expected_scoring_period_id = this day). Omit for today. 400 SCORING_PERIOD_OUT_OF_RANGE before today or past the season's last day."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineupStateResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/lineup/plan":{"get":{"tags":["lineup editor"],"summary":"Get Lineup Plan","description":"The fill-only moves Court Vision would make today. Never writes.","operationId":"get_lineup_plan_v1_internal_teams__team_id__lineup_plan_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineupPlanResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/lineup/moves":{"post":{"tags":["lineup editor"],"summary":"Apply Lineup Moves","description":"Send slot moves to ESPN as one transaction for the board's day (`expected_scoring_period_id`,\ntoday or later), then return the re-read board.","operationId":"apply_lineup_moves_v1_internal_teams__team_id__lineup_moves_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyLineupMovesReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyLineupMovesResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/actions":{"get":{"tags":["lineup editor"],"summary":"Get Daily Actions","description":"Today's recommended roster actions (start / IR / pickup), each ready to stage. Never writes.","operationId":"get_daily_actions_v1_internal_teams__team_id__actions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyActionsResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/lineup-snapshots":{"get":{"tags":["lineup snapshots"],"summary":"List Lineup Snapshots","description":"The team's stored lineups over a range of finished days, with the days that have none.","operationId":"list_lineup_snapshots_v1_internal_teams__team_id__lineup_snapshots_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"First day (YYYY-MM-DD). Default: the current matchup week.","title":"From"},"description":"First day (YYYY-MM-DD). Default: the current matchup week."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"Last day (YYYY-MM-DD), at most 31 days after `from`.","title":"To"},"description":"Last day (YYYY-MM-DD), at most 31 days after `from`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineupSnapshotListResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/lineup-snapshots/{date}":{"get":{"tags":["lineup snapshots"],"summary":"Get Lineup Snapshot","description":"One team's roster and lineup slots as they stood on that day.\n\nThe stored snapshot when there is one; otherwise ESPN's own history of the\nday, read live (`source: provider_history`). 404 LINEUP_SNAPSHOT_NOT_FOUND\nwhen neither has it; 400 DATE_NOT_PAST for today or a later day.","operationId":"get_lineup_snapshot_v1_internal_teams__team_id__lineup_snapshots__date__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A finished day (YYYY-MM-DD)","title":"Date"},"description":"A finished day (YYYY-MM-DD)"},{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}},{"name":"provider_team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"description":"Another team in the same league (the opponent's ESPN team id). Default: this team.","title":"Provider Team Id"},"description":"Another team in the same league (the opponent's ESPN team id). Default: this team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineupSnapshotResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/jobs/lineup/evaluate":{"post":{"tags":["internal jobs"],"summary":"Evaluate Lineup","description":"Plan today's fill-only moves for one team; apply them when `apply` is set.\n\nCalled by data-platform's lineup-alerts pipeline for every opted-in team.\nBusiness outcomes are reported in `data.outcome`, never raised.","operationId":"evaluate_lineup_v1_internal_jobs_lineup_evaluate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineupEvaluateReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineupEvaluationResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/jobs/pickups/execute":{"post":{"tags":["internal jobs"],"summary":"Execute Pickups","description":"Attempt every scheduled pickup that is due, up to `limit` rows.\n\nCalled by data-platform's scheduled-pickups pipeline every minute (its route\ngates on whether anything is due). Each row's outcome is reported in\n`data.results`, never raised: executed, skipped (the player is gone — the\nno-op), failed, expired, or deferred (a lock, a waiver period or a writer\noutage; the row waits for `next_attempt_at`). A write is sent at most once:\none that got no answer is settled by the next attempt from the board alone\n(executed, or failed `interrupted`). With roster writes switched off nothing\nis attempted and due rows are pushed back ten minutes.","operationId":"execute_pickups_v1_internal_jobs_pickups_execute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PickupExecuteReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PickupExecuteResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/jobs/valuation/standard":{"post":{"tags":["internal jobs"],"summary":"Value Standard League","description":"Rank a set of projections in the standard league, in points and in 9-cat.\n\nCalled by data-platform's projections editor, which holds the projections\n(and the edit being previewed) and has no valuation of its own. The ranks\nare the `cv_rank` a room with no league would show for the same\nprojections: ESPN's default points weights or the standard nine categories,\ntwelve teams, thirteen rounds, the default fantasy-playoff weeks. Nothing\nis read from or written to the database.","operationId":"value_standard_league_v1_internal_jobs_valuation_standard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardValuationReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardValuationResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/teams/{team_id}/streamers/find":{"post":{"tags":["Streamers"],"summary":"Find Team Streamers","description":"Rank the free agents this team could pick up for the week it is (or will be)\nplaying — the same search as `POST /streamers/find`, scoped to a saved team.\n\nEach candidate says whether the pickup is immediate (`acquisition_status:\nfree_agent`) or a waiver claim (`waivers`, clearing on `waivers_until`).\nBefore opening night the picks are for week 1 (`upcoming: true`). A 200\nwith `data: null` means there is no matchup on the calendar.","operationId":"find_team_streamers_v1_internal_teams__team_id__streamers_find_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamerFindReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamerResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/roster/transactions":{"post":{"tags":["roster transactions"],"summary":"Apply Roster Transaction","description":"Pick up and/or release one player as a single ESPN transaction, then return\nthe re-read board.\n\nFailures keep the lineup editor's statuses — 403 ROSTER_WRITE_DISABLED, 409\nROSTER_WRITE_BLOCKED / ROSTER_STALE (with the fresh board) /\nROSTER_WRITE_REJECTED (ESPN's own sentence), 503 ROSTER_WRITE_UNAVAILABLE —\nplus 422 ROSTER_TRANSACTION_INVALID with `data.reason` when the board or the\nplayer pool refuses the request before ESPN is asked (a locked drop, a player\non waivers, one already rostered, ...). Roster limits are ESPN's call.","operationId":"apply_roster_transaction_v1_internal_teams__team_id__roster_transactions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterTransactionReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterTransactionResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/pickups":{"post":{"tags":["scheduled pickups"],"summary":"Schedule Pickup","description":"Schedule a pickup for a later ESPN day. The add/drop is made automatically at\nthe earliest moment it counts for that day — the previous day's first tip-off,\nor the rollover into the day when the player to drop plays the day before — and\nis a no-op if the player is gone by then.\n\nThe request is checked against today's board and ESPN's pool before it is stored:\n403 ROSTER_WRITE_DISABLED, 409 ROSTER_WRITE_BLOCKED, 400 SCORING_PERIOD_OUT_OF_RANGE\n(a day past the season), 422 SCHEDULED_PICKUP_INVALID with `data.reason`\n(not_future, add_not_available, drop_not_on_roster, ...), 409\nSCHEDULED_PICKUP_DUPLICATE when that player is already scheduled.","operationId":"schedule_pickup_v1_internal_teams__team_id__pickups_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulePickupReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledPickupResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["scheduled pickups"],"summary":"List Pickups","description":"Pending pickups (soonest day first) and those settled in the last week (newest first).","operationId":"list_pickups_v1_internal_teams__team_id__pickups_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledPickupListResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/pickups/{pickup_id}":{"delete":{"tags":["scheduled pickups"],"summary":"Cancel Pickup","description":"Cancel a pending pickup. 404 when it is not this team's; 409 SCHEDULED_PICKUP_NOT_PENDING\nwhen it already ran (or was cancelled); 409 SCHEDULED_PICKUP_IN_PROGRESS while an attempt is\nmaking it — its outcome follows in a few minutes, and a deferred pickup can be cancelled again.","operationId":"cancel_pickup_v1_internal_teams__team_id__pickups__pickup_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pickup_id","in":"path","required":true,"schema":{"type":"integer","title":"Pickup Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledPickupResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/stream-lanes/plan":{"post":{"tags":["stream lanes"],"summary":"Plan Stream Lane","description":"What a lane started now on `player_id`'s spot would do: who would hold the spot each\nremaining day of the matchup, what each adds to that day's lineup, the gain over\nkeeping the spot's player, and the adds it would use. A projection only — the lane\nre-plans before each day with the players available then. Nothing is stored.\n\n422 STREAM_LANE_INVALID with `data.reason` (not_on_roster, on_ir, no_matchup_end,\nmatchup_over, waiver_period_unsupported); 409 ROSTER_WRITE_BLOCKED for a league\nwhose rosters can't be changed from here.","operationId":"plan_stream_lane_v1_internal_teams__team_id__stream_lanes_plan_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLanePlanReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLanePlanResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/stream-lanes":{"post":{"tags":["stream lanes"],"summary":"Start Stream Lane","description":"Start streaming `player_id`'s spot through the matchup's last day. The first decision\nis made when a pickup for the first open day can first be made (possibly at once).\n`notify: desk` keeps the lane from emailing.\n\nBesides the plan route's errors: 403 ROSTER_WRITE_DISABLED, 409 STREAM_LANE_EXISTS\n(one open lane per team), 422 STREAM_LANE_INVALID `scheduled_out` (a pickup already\nscheduled drops that player).","operationId":"start_stream_lane_v1_internal_teams__team_id__stream_lanes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLaneStartReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLaneResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["stream lanes"],"summary":"List Stream Lanes","description":"The open lane (active or paused) and lanes that ended in the last week, each with its\nlatest projection and its events (newest first).","operationId":"list_stream_lanes_v1_internal_teams__team_id__stream_lanes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLaneListResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/teams/{team_id}/stream-lanes/{lane_id}":{"patch":{"tags":["stream lanes"],"summary":"Update Stream Lane","description":"Pause (`status: paused`) or resume (`status: active`) a lane, or change `notify`.\nPausing cancels a pickup the lane scheduled that hasn't run, and that day is decided\nagain on resume; 409 STREAM_LANE_BUSY while the pickup is being made. Resuming needs\nthe spot's player still on the roster (422 STREAM_LANE_INVALID `holder_gone`) and no\npickup scheduled that drops them (`scheduled_out`); a lane resumed after its matchup's\nlast open day ends instead. 404 STREAM_LANE_NOT_FOUND; 409 STREAM_LANE_ENDED.","operationId":"update_stream_lane_v1_internal_teams__team_id__stream_lanes__lane_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lane_id","in":"path","required":true,"schema":{"type":"integer","title":"Lane Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLaneUpdateReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLaneResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["stream lanes"],"summary":"Stop Stream Lane","description":"Stop a lane. A pickup it scheduled that hasn't run is cancelled with it; the player\nholding the spot stays on the roster. 409 STREAM_LANE_BUSY while that pickup is being\nmade (try again in a few minutes); 404 STREAM_LANE_NOT_FOUND; 409 STREAM_LANE_ENDED.","operationId":"stop_stream_lane_v1_internal_teams__team_id__stream_lanes__lane_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lane_id","in":"path","required":true,"schema":{"type":"integer","title":"Lane Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLaneResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/connections/":{"get":{"tags":["provider connections"],"summary":"List Connections","operationId":"list_connections_v1_internal_connections__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectionListResp"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/connections/espn":{"post":{"tags":["provider connections"],"summary":"Connect Espn","description":"Connect an ESPN account, or refresh the cookies of one already connected.\n\nESPN checks the pair first, by reading one of the account's private leagues\nwith it: 403 PROVIDER_AUTH_EXPIRED when it refuses them, 400\nESPN_ACCOUNT_NOT_FOUND for a SWID it does not know, and nothing is saved.\nAn account with only public leagues cannot confirm a pair; it is saved with\nstatus \"unknown\".","operationId":"connect_espn_v1_internal_connections_espn_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EspnConnectReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectionResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/connections/{connection_id}/verify":{"post":{"tags":["provider connections"],"summary":"Verify Connection","description":"Re-check a stored ESPN connection's cookies. A refusal is a 200 whose\nconnection reads \"expired\"; an ESPN outage, or an account with no private\nleague to check against, records nothing.","operationId":"verify_connection_v1_internal_connections__connection_id__verify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectionResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/connections/{connection_id}/espn/teams":{"get":{"tags":["provider connections"],"summary":"Espn Account Teams","description":"The fantasy basketball teams on a connected ESPN account, as ESPN lists\nthem, each marked with the Court Vision team already tracking it.","operationId":"espn_account_teams_v1_internal_connections__connection_id__espn_teams_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EspnAccountTeamsResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/connections/{connection_id}":{"delete":{"tags":["provider connections"],"summary":"Delete Connection","description":"Remove a connection. Its teams are unlinked, not deleted.","operationId":"delete_connection_v1_internal_connections__connection_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectionDeleteResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/ai/ask":{"post":{"tags":["AI"],"summary":"Ask the assistant a question about NBA players","description":"Answers by looking players up through Court Vision's own services; every number in the answer comes from one of those lookups, listed in `tool_calls`. Each caller has a daily allowance of questions, and the route is off unless AI_ENABLED is set.","operationId":"ask_v1_internal_ai_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResp"}}}},"422":{"description":"Invalid question, or the assistant declined it (AI_DECLINED)"},"429":{"description":"The caller's daily allowance is used up (AI_QUOTA_EXCEEDED)"},"502":{"description":"The model provider failed (AI_UNAVAILABLE, AI_BUSY, AI_INCOMPLETE)"},"503":{"description":"Turned off (AI_DISABLED) or today's global budget is spent (AI_DAILY_BUDGET_REACHED)"},"504":{"description":"The assistant took too long (AI_TIMEOUT)"}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/ai/route":{"post":{"tags":["AI"],"summary":"Route a question to the place that answers it","description":"Returns one of three kinds. `show`: a Court Vision view, as a terminal or page `target` the client applies. `statmuse`: an NBA stat question no view covers, with a server-built `statmuse_url` the user opens. `cannot`: neither covers it, with `suggestions`. Every ID in a target has been checked, and a fantasy team is always one of the caller's. Shares the daily allowance with /ai/ask and is off unless AI_ENABLED is set.","operationId":"route_v1_internal_ai_route_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteResp"}}}},"422":{"description":"Invalid question or context, or the assistant declined it (AI_DECLINED)"},"429":{"description":"The caller's daily allowance is used up (AI_QUOTA_EXCEEDED)"},"502":{"description":"The model provider failed (AI_UNAVAILABLE, AI_BUSY, AI_INCOMPLETE)"},"503":{"description":"Turned off (AI_DISABLED) or today's global budget is spent (AI_DAILY_BUDGET_REACHED)"},"504":{"description":"The assistant took too long (AI_TIMEOUT)"}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/ai/questions/{question_id}/feedback":{"post":{"tags":["AI"],"summary":"Rate a routed answer","description":"Thumbs up or down on one of the caller's own routed questions; null clears it.","operationId":"question_feedback_v1_internal_ai_questions__question_id__feedback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiFeedbackReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiFeedbackResp"}}}},"404":{"description":"No such question for this caller (AI_QUESTION_NOT_FOUND)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/ai/usage":{"get":{"tags":["AI"],"summary":"The caller's access to the agent and this month's spend","description":"Open to any signed-in user, so the desk can say whether the agent is available to them.","operationId":"agent_usage_v1_internal_ai_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiUsageResp"}}}},"503":{"description":"Turned off (AI_DISABLED)"}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/ai/conversations":{"get":{"tags":["AI"],"summary":"The caller's conversations, most recent first","operationId":"list_conversations_v1_internal_ai_conversations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiConversationListResp"}}}},"403":{"description":"The caller is not on the invite list (AI_INVITE_ONLY)"},"503":{"description":"Turned off (AI_DISABLED)"}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["AI"],"summary":"Start a conversation with the agent","operationId":"create_conversation_v1_internal_ai_conversations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiConversationCreateReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiConversationResp"}}}},"403":{"description":"The caller is not on the invite list (AI_INVITE_ONLY)"},"503":{"description":"Turned off (AI_DISABLED)"},"404":{"description":"team_id is not one of the caller's teams (TEAM_NOT_FOUND)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/ai/conversations/{conversation_id}":{"get":{"tags":["AI"],"summary":"One conversation with every turn","operationId":"get_conversation_v1_internal_ai_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiConversationResp"}}}},"403":{"description":"The caller is not on the invite list (AI_INVITE_ONLY)"},"503":{"description":"Turned off (AI_DISABLED)"},"404":{"description":"No such conversation for this caller"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["AI"],"summary":"Delete a conversation and its turns","operationId":"delete_conversation_v1_internal_ai_conversations__conversation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"403":{"description":"The caller is not on the invite list (AI_INVITE_ONLY)"},"503":{"description":"Turned off (AI_DISABLED)"},"404":{"description":"No such conversation for this caller"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/ai/conversations/{conversation_id}/turns":{"post":{"tags":["AI"],"summary":"Send the agent a message; the answer streams back","description":"A `text/event-stream` of the turn as it happens:\n\n- `status` `{text, kind, tool?}`: what the agent is doing (`kind` is `tool` for a lookup, `note` for the agent's own progress note);\n- `text` `{delta}`: the answer's prose, as it is written;\n- `block` (an `AiTable`): a table the server built from the agent's lookups;\n- `error` `{code, message}`: the turn failed (AI_DECLINED, AI_TIMEOUT, AI_INCOMPLETE, AI_BUSY, ...);\n- `done` `{turn_id, outcome, cost_usd, model_calls, duration_ms, spend}`: always last.\n\nText and blocks arrive in the order the user should see them. Lines starting with `:` are keepalives. Errors before the stream starts are ordinary JSON errors.","operationId":"send_turn_v1_internal_ai_conversations__conversation_id__turns_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTurnReq"}}}},"responses":{"200":{"description":"The turn's events","content":{"application/json":{"schema":{}},"text/event-stream":{}}},"403":{"description":"The caller is not on the invite list (AI_INVITE_ONLY)"},"503":{"description":"Turned off (AI_DISABLED)"},"404":{"description":"No such conversation for this caller (AI_CONVERSATION_NOT_FOUND)"},"409":{"description":"Another turn is running (AI_CONVERSATION_BUSY), or the conversation is full (AI_CONVERSATION_FULL)"},"429":{"description":"The caller's monthly budget is used up (AI_USER_BUDGET_REACHED)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/ai/turns/{turn_id}/feedback":{"post":{"tags":["AI"],"summary":"Rate one of the agent's answers","description":"Thumbs up or down on one of the caller's own turns; null clears it.","operationId":"turn_feedback_v1_internal_ai_turns__turn_id__feedback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"turn_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Turn Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiFeedbackReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTurnFeedbackResp"}}}},"403":{"description":"The caller is not on the invite list (AI_INVITE_ONLY)"},"503":{"description":"Turned off (AI_DISABLED)"},"404":{"description":"No such turn for this caller (AI_TURN_NOT_FOUND)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ping":{"get":{"summary":"Ping","operationId":"ping_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcquisitionState":{"properties":{"per":{"type":"string","enum":["matchup","day"],"title":"Per"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"matchup_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Matchup Period Id"},"matchup_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Matchup Start"},"matchup_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Matchup End"},"matchup_used":{"type":"integer","title":"Matchup Used","default":0},"season_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Season Limit"},"season_used":{"type":"integer","title":"Season Used","default":0},"waiver_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Waiver Hours"}},"type":"object","required":["per","limit","matchup_period_id","matchup_start","matchup_end","matchup_used","season_limit","season_used","waiver_hours"],"title":"AcquisitionState","description":"ESPN's limits on adds and what this team has used: `settings.acquisitionSettings`\n(mSettings) and the team's `transactionCounter` (mTeam). A day's own adds (what a\nper-day limit counts) are not in the counter: `services.acquisitions.adds_for_day`."},"AdvancedStatsData":{"properties":{"off_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Off Rating"},"def_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Def Rating"},"net_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Rating"},"usg_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Usg Pct"},"ast_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ast Pct"},"ast_to_tov":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ast To Tov"},"reb_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reb Pct"},"oreb_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Oreb Pct"},"dreb_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dreb Pct"},"tov_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tov Pct"},"pace":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pace"},"pie":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pie"},"plus_minus":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Plus Minus"}},"type":"object","required":["off_rating","def_rating","net_rating","usg_pct","ast_pct","ast_to_tov","reb_pct","oreb_pct","dreb_pct","tov_pct","pace","pie","plus_minus"],"title":"AdvancedStatsData","description":"Advanced stats from pipeline - always season-level."},"AiBlockPart":{"properties":{"kind":{"type":"string","const":"block","title":"Kind","default":"block"},"block":{"$ref":"#/components/schemas/AiTable"}},"type":"object","required":["kind","block"],"title":"AiBlockPart"},"AiContext":{"properties":{"page":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^[^\\x00]*$"},{"type":"null"}],"title":"Page","description":"Current route, e.g. 'terminal'"},"mode":{"anyOf":[{"type":"string","enum":["overview","player","team","nba_team"]},{"type":"null"}],"title":"Mode","description":"Terminal mode, when on the terminal"},"player_id":{"anyOf":[{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Player Id","description":"Focused NBA player ID"},"compare_ids":{"items":{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0},"type":"array","maxItems":4,"title":"Compare Ids","description":"NBA player IDs"},"team_id":{"anyOf":[{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Team Id","description":"Selected fantasy team ID"},"nba_team":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2,3}$"},{"type":"null"}],"title":"Nba Team","description":"Focused NBA team abbreviation"},"window":{"anyOf":[{"type":"string","pattern":"^(season|l([1-9]|[1-7][0-9]|8[0-2]))$"},{"type":"null"}],"title":"Window","description":"Terminal stat window"}},"type":"object","title":"AiContext","description":"Where the user is when they ask. IDs only -- never names from league data,\nso the context adds no prompt-injection surface."},"AiConversationCreateReq":{"properties":{"team_id":{"anyOf":[{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Team Id","description":"One of the caller's teams: what 'my team' means in this conversation"}},"type":"object","title":"AiConversationCreateReq","description":"Body for POST /v1/internal/ai/conversations."},"AiConversationDetail":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"The first message, shortened; null until one is sent"},"team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"turns":{"type":"integer","title":"Turns"},"full":{"type":"boolean","title":"Full","description":"True when the conversation takes no more turns: start a new one"},"history":{"items":{"$ref":"#/components/schemas/AiTurnView"},"type":"array","title":"History","description":"Every turn, oldest first, failed ones included"}},"type":"object","required":["id","title","team_id","created_at","updated_at","turns","full","history"],"title":"AiConversationDetail"},"AiConversationListResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/AiConversationSummary"},"type":"array"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"AiConversationListResp"},"AiConversationResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/AiConversationDetail"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"AiConversationResp"},"AiConversationSummary":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"The first message, shortened; null until one is sent"},"team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"turns":{"type":"integer","title":"Turns"}},"type":"object","required":["id","title","team_id","created_at","updated_at","turns"],"title":"AiConversationSummary"},"AiFeedbackData":{"properties":{"question_id":{"type":"integer","title":"Question Id"},"feedback":{"anyOf":[{"type":"string","enum":["up","down"]},{"type":"null"}],"title":"Feedback"}},"type":"object","required":["question_id","feedback"],"title":"AiFeedbackData"},"AiFeedbackReq":{"properties":{"feedback":{"anyOf":[{"type":"string","enum":["up","down"]},{"type":"null"}],"title":"Feedback","description":"null clears earlier feedback"}},"type":"object","required":["feedback"],"title":"AiFeedbackReq"},"AiFeedbackResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/AiFeedbackData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"AiFeedbackResp","description":"Response for POST /v1/internal/ai/questions/{question_id}/feedback."},"AiTable":{"properties":{"type":{"type":"string","const":"table","title":"Type","default":"table"},"id":{"type":"string","title":"Id","description":"Unique within its turn, e.g. 't1'"},"title":{"type":"string","title":"Title"},"result_ids":{"items":{"type":"string"},"type":"array","title":"Result Ids","description":"The tool results the rows were copied from"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","description":"The lookups behind those results"},"columns":{"items":{"$ref":"#/components/schemas/AiTableColumn"},"type":"array","title":"Columns"},"rows":{"items":{"items":{},"type":"array"},"type":"array","title":"Rows","description":"One list of cells per row, in column order"},"total_rows":{"type":"integer","title":"Total Rows","description":"Rows before the table's limit"}},"type":"object","required":["type","id","title","result_ids","tools","columns","rows","total_rows"],"title":"AiTable","description":"A table the server built from the agent's tool results; the model never types its values."},"AiTableColumn":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"}},"type":"object","required":["key","label"],"title":"AiTableColumn"},"AiTextPart":{"properties":{"kind":{"type":"string","const":"text","title":"Kind","default":"text"},"text":{"type":"string","title":"Text"}},"type":"object","required":["kind","text"],"title":"AiTextPart"},"AiToolCall":{"properties":{"name":{"type":"string","title":"Name","description":"Tool name, e.g. get_player_stats"},"input":{"additionalProperties":true,"type":"object","title":"Input","description":"Arguments the model passed"},"is_error":{"type":"boolean","title":"Is Error","description":"True when the lookup failed or was refused"}},"type":"object","required":["name","input","is_error"],"title":"AiToolCall","description":"One Court Vision lookup the model made while answering."},"AiTurnFeedbackData":{"properties":{"turn_id":{"type":"integer","title":"Turn Id"},"feedback":{"anyOf":[{"type":"string","enum":["up","down"]},{"type":"null"}],"title":"Feedback"}},"type":"object","required":["turn_id","feedback"],"title":"AiTurnFeedbackData"},"AiTurnFeedbackResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/AiTurnFeedbackData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"AiTurnFeedbackResp"},"AiTurnReq":{"properties":{"message":{"type":"string","maxLength":2000,"minLength":1,"pattern":"^[^\\x00]*$","title":"Message"}},"type":"object","required":["message"],"title":"AiTurnReq","description":"Body for POST /v1/internal/ai/conversations/{conversation_id}/turns."},"AiTurnView":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"message":{"type":"string","title":"Message"},"parts":{"items":{"oneOf":[{"$ref":"#/components/schemas/AiTextPart"},{"$ref":"#/components/schemas/AiBlockPart"}],"discriminator":{"propertyName":"kind","mapping":{"block":"#/components/schemas/AiBlockPart","text":"#/components/schemas/AiTextPart"}}},"type":"array","title":"Parts","description":"The answer as the user saw it: text and blocks, in order"},"outcome":{"type":"string","title":"Outcome","description":"'ok', or the error code the turn ended with"},"feedback":{"anyOf":[{"type":"string","enum":["up","down"]},{"type":"null"}],"title":"Feedback"},"cost_usd":{"type":"number","title":"Cost Usd"}},"type":"object","required":["id","created_at","message","parts","outcome","feedback","cost_usd"],"title":"AiTurnView"},"AiUsage":{"properties":{"model":{"type":"string","title":"Model","description":"Model that produced the final answer"},"model_calls":{"type":"integer","title":"Model Calls","description":"Messages API calls made"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"cache_read_input_tokens":{"type":"integer","title":"Cache Read Input Tokens"},"cache_creation_input_tokens":{"type":"integer","title":"Cache Creation Input Tokens"},"fallback":{"type":"boolean","title":"Fallback","description":"True when a refusal was re-served by a fallback model"}},"type":"object","required":["model","model_calls","input_tokens","output_tokens","cache_read_input_tokens","cache_creation_input_tokens","fallback"],"title":"AiUsage","description":"Token spend for one request, summed over its model calls."},"AiUsageData":{"properties":{"access":{"type":"boolean","title":"Access","description":"Whether the caller may use the agent (it is invite-only)"},"month_usd":{"type":"number","title":"Month Usd","description":"The caller's agent spend this calendar month (UTC)"},"cap_usd":{"type":"number","title":"Cap Usd","description":"The caller's monthly cap"},"model":{"type":"string","title":"Model"},"effort":{"type":"string","title":"Effort"}},"type":"object","required":["access","month_usd","cap_usd","model","effort"],"title":"AiUsageData"},"AiUsageResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/AiUsageData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"AiUsageResp"},"ApiKeyListItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"rate_limit":{"type":"integer","title":"Rate Limit"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","name","key_prefix","scopes","rate_limit","created_at","last_used_at","expires_at","is_active"],"title":"ApiKeyListItem","description":"Single API key item for list responses (never includes the raw key or hash)."},"ApiKeyListResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/ApiKeyListItem"},"type":"array"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"ApiKeyListResp","description":"GET /v1/internal/api-keys/"},"ApiStatus":{"type":"string","enum":["success","error","skipped","bad_request","validation_error","authentication_error","authorization_error","not_found","conflict","rate_limited","server_error"],"title":"ApiStatus","description":"Standard API response statuses"},"ApplyLineupMovesData":{"properties":{"lineup":{"$ref":"#/components/schemas/LineupState"},"applied_moves":{"items":{"$ref":"#/components/schemas/LineupMoveResult"},"type":"array","title":"Applied Moves"},"verified":{"type":"boolean","title":"Verified"},"audit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audit Id"}},"type":"object","required":["lineup","applied_moves","verified","audit_id"],"title":"ApplyLineupMovesData"},"ApplyLineupMovesReq":{"properties":{"moves":{"items":{"$ref":"#/components/schemas/LineupMoveReq"},"type":"array","maxItems":30,"minItems":1,"title":"Moves"},"expected_scoring_period_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Scoring Period Id"},"roster_version":{"type":"string","maxLength":64,"minLength":1,"title":"Roster Version"}},"type":"object","required":["moves","expected_scoring_period_id","roster_version"],"title":"ApplyLineupMovesReq"},"ApplyLineupMovesResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplyLineupMovesData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"ApplyLineupMovesResp"},"AskData":{"properties":{"answer":{"type":"string","title":"Answer","description":"The model's answer"},"tool_calls":{"items":{"$ref":"#/components/schemas/AiToolCall"},"type":"array","title":"Tool Calls"},"usage":{"$ref":"#/components/schemas/AiUsage"}},"type":"object","required":["answer","tool_calls","usage"],"title":"AskData"},"AskReq":{"properties":{"question":{"type":"string","maxLength":500,"minLength":1,"pattern":"^[^\\x00]*$","title":"Question","description":"A question about NBA players, in plain language"}},"type":"object","required":["question"],"title":"AskReq","description":"Body for POST /v1/internal/ai/ask."},"AskResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/AskData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"AskResp","description":"Response for POST /v1/internal/ai/ask."},"AvgStats":{"properties":{"avg_fpts":{"type":"number","title":"Avg Fpts"},"avg_points":{"type":"number","title":"Avg Points"},"avg_rebounds":{"type":"number","title":"Avg Rebounds"},"avg_assists":{"type":"number","title":"Avg Assists"},"avg_steals":{"type":"number","title":"Avg Steals"},"avg_blocks":{"type":"number","title":"Avg Blocks"},"avg_turnovers":{"type":"number","title":"Avg Turnovers"},"avg_minutes":{"type":"number","title":"Avg Minutes"},"avg_fg_pct":{"type":"number","title":"Avg Fg Pct"},"avg_fg3_pct":{"type":"number","title":"Avg Fg3 Pct"},"avg_ft_pct":{"type":"number","title":"Avg Ft Pct"},"avg_ts_pct":{"type":"number","title":"Avg Ts Pct"},"avg_efg_pct":{"type":"number","title":"Avg Efg Pct"},"avg_three_rate":{"type":"number","title":"Avg Three Rate"},"avg_ft_rate":{"type":"number","title":"Avg Ft Rate"},"avg_fgm":{"type":"number","title":"Avg Fgm"},"avg_fga":{"type":"number","title":"Avg Fga"},"avg_fg3m":{"type":"number","title":"Avg Fg3M"},"avg_fg3a":{"type":"number","title":"Avg Fg3A"},"avg_ftm":{"type":"number","title":"Avg Ftm"},"avg_fta":{"type":"number","title":"Avg Fta"}},"type":"object","required":["avg_fpts","avg_points","avg_rebounds","avg_assists","avg_steals","avg_blocks","avg_turnovers","avg_minutes","avg_fg_pct","avg_fg3_pct","avg_ft_pct","avg_ts_pct","avg_efg_pct","avg_three_rate","avg_ft_rate","avg_fgm","avg_fga","avg_fg3m","avg_fg3a","avg_ftm","avg_fta"],"title":"AvgStats"},"BaseResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"BaseResponse","description":"Base response model that all API responses should extend.\nProvides consistent structure across all endpoints."},"BreakoutBeneficiary":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"},"position":{"type":"string","title":"Position"},"depth_rank":{"type":"integer","title":"Depth Rank"},"avg_min":{"type":"number","title":"Avg Min"},"avg_fpts":{"type":"number","title":"Avg Fpts"},"games_remaining":{"type":"integer","title":"Games Remaining"},"has_b2b":{"type":"boolean","title":"Has B2B"}},"type":"object","required":["player_id","nba_player_id","name","team","position","depth_rank","avg_min","avg_fpts","games_remaining","has_b2b"],"title":"BreakoutBeneficiary","description":"The player expected to benefit from the minutes vacuum."},"BreakoutCandidateResp":{"properties":{"beneficiary":{"$ref":"#/components/schemas/BreakoutBeneficiary"},"injured_player":{"$ref":"#/components/schemas/BreakoutInjuredPlayer"},"signals":{"$ref":"#/components/schemas/BreakoutSignals"}},"type":"object","required":["beneficiary","injured_player","signals"],"title":"BreakoutCandidateResp","description":"A single breakout streamer recommendation."},"BreakoutData":{"properties":{"as_of_date":{"type":"string","format":"date","title":"As Of Date"},"candidates":{"items":{"$ref":"#/components/schemas/BreakoutCandidateResp"},"type":"array","title":"Candidates"}},"type":"object","required":["as_of_date","candidates"],"title":"BreakoutData"},"BreakoutInjuredPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"avg_min":{"type":"number","title":"Avg Min"},"status":{"type":"string","title":"Status"},"expected_return":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expected Return"}},"type":"object","required":["player_id","name","avg_min","status","expected_return"],"title":"BreakoutInjuredPlayer","description":"The prominent injured player creating the opportunity."},"BreakoutResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/BreakoutData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"BreakoutResp"},"BreakoutSignals":{"properties":{"depth_rank":{"type":"integer","title":"Depth Rank"},"projected_min_boost":{"type":"number","title":"Projected Min Boost"},"opp_min_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opp Min Avg"},"opp_fpts_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opp Fpts Avg"},"opp_game_count":{"type":"integer","title":"Opp Game Count","default":0},"breakout_score":{"type":"number","title":"Breakout Score"}},"type":"object","required":["depth_rank","projected_min_boost","opp_min_avg","opp_fpts_avg","opp_game_count","breakout_score"],"title":"BreakoutSignals","description":"Evidence supporting this breakout recommendation."},"CategoryComparison":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CategoryScoreItem"},"type":"array","title":"Items"},"wins":{"type":"integer","title":"Wins"},"losses":{"type":"integer","title":"Losses"},"ties":{"type":"integer","title":"Ties"}},"type":"object","required":["items","wins","losses","ties"],"title":"CategoryComparison"},"CategoryDefResp":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"higher_is_better":{"type":"boolean","title":"Higher Is Better"},"is_rate":{"type":"boolean","title":"Is Rate"}},"type":"object","required":["key","label","higher_is_better","is_rate"],"title":"CategoryDefResp"},"CategoryNeedResp":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"mine":{"type":"number","title":"Mine","description":"Summed per-category z the caller's drafted players hold"},"pace":{"type":"number","title":"Pace","description":"What an average team holds after the same number of picks"},"need":{"type":"number","title":"Need","description":"(pace - mine) / spread, clamped to +/-2; positive means behind"},"weight":{"type":"number","title":"Weight","description":"What fit multiplies this category by; 0 when punted"},"punted":{"type":"boolean","title":"Punted"},"my_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"My Rank","description":"Where this roster stands in the category among the teams in the draft, 1 = most. Counted on what the rosters hold right now, unscaled. None until the other seats can be read (no confirmed slot, or nobody else has drafted)."},"seats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seats","description":"Teams `my_rank` is out of, the caller included"}},"type":"object","required":["key","label","mine","pace","need","weight","punted","my_rank","seats"],"title":"CategoryNeedResp","description":"One category's standing on the caller's roster, and what fit does about it.\n\n`need` is in standard deviations of a k-pick sum: positive means the roster\nis *behind* an average team after the same number of picks. It is not a\nprobability and does not claim to be one."},"CategoryScoreItem":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"you":{"type":"number","title":"You"},"opp":{"type":"number","title":"Opp"},"winner":{"type":"string","enum":["you","opp","tie"],"title":"Winner"},"higher_is_better":{"type":"boolean","title":"Higher Is Better"},"is_rate":{"type":"boolean","title":"Is Rate"}},"type":"object","required":["key","label","you","opp","winner","higher_is_better","is_rate"],"title":"CategoryScoreItem","description":"One category in a head-to-head comparison."},"CategoryStrengths":{"properties":{"avg_points":{"type":"number","title":"Avg Points"},"avg_rebounds":{"type":"number","title":"Avg Rebounds"},"avg_assists":{"type":"number","title":"Avg Assists"},"avg_steals":{"type":"number","title":"Avg Steals"},"avg_blocks":{"type":"number","title":"Avg Blocks"},"avg_turnovers":{"type":"number","title":"Avg Turnovers"},"avg_fg_pct":{"type":"number","title":"Avg Fg Pct","description":"Team FG% as a 0-1 fraction (sum FGM / sum FGA)"},"avg_ft_pct":{"type":"number","title":"Avg Ft Pct","description":"Team FT% as a 0-1 fraction (sum FTM / sum FTA)"},"avg_fg3m":{"type":"number","title":"Avg Fg3M"},"avg_fga":{"type":"number","title":"Avg Fga"},"avg_fta":{"type":"number","title":"Avg Fta"},"window_days":{"type":"integer","title":"Window Days"}},"type":"object","required":["avg_points","avg_rebounds","avg_assists","avg_steals","avg_blocks","avg_turnovers","avg_fg_pct","avg_ft_pct","avg_fg3m","avg_fga","avg_fta","window_days"],"title":"CategoryStrengths","description":"Team per-game totals per stat category over the trailing window.\n\nCounting stats are the sum of each rostered player's per-game average over\nthe window (what the roster produces in one game with everyone active).\nPercentages are 0-1 fractions from summed makes / summed attempts, never a\nmean of player percentages."},"CategoryTeamScore":{"properties":{"totals":{"additionalProperties":{"type":"number"},"type":"object","title":"Totals"},"raw":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Raw"},"wins":{"type":"integer","title":"Wins","default":0},"losses":{"type":"integer","title":"Losses","default":0},"ties":{"type":"integer","title":"Ties","default":0},"live_adjusted":{"type":"boolean","title":"Live Adjusted","default":false}},"type":"object","required":["totals","raw","wins","losses","ties","live_adjusted"],"title":"CategoryTeamScore","description":"A team's per-category totals (rates as 0-1 fractions) and record."},"ConnectionTeamInfo":{"properties":{"team_id":{"type":"integer","title":"Team Id"},"team_name":{"type":"string","title":"Team Name"},"league_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"League Name"},"league_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"League Id"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},"type":"object","required":["team_id","team_name","league_name","league_id","year"],"title":"ConnectionTeamInfo"},"CreateApiKeyData":{"properties":{"raw_key":{"type":"string","title":"Raw Key"},"key":{"$ref":"#/components/schemas/ApiKeyListItem"}},"type":"object","required":["raw_key","key"],"title":"CreateApiKeyData","description":"Response data returned when a new API key is created."},"CreateApiKeyRequest":{"properties":{"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","default":["read"]},"expires_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires Days"}},"type":"object","required":["name"],"title":"CreateApiKeyRequest","description":"Request body for creating a new API key."},"CreateApiKeyResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/CreateApiKeyData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"CreateApiKeyResp","description":"POST /v1/internal/api-keys/ — raw_key appears here once and never again."},"DailyAction":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","enum":["start","ir_in","ir_out","add","add_drop"],"title":"Kind"},"title":{"type":"string","title":"Title"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"player":{"$ref":"#/components/schemas/DailyActionPlayer"},"counterpart":{"anyOf":[{"$ref":"#/components/schemas/DailyActionPlayer"},{"type":"null"}]},"moves":{"items":{"$ref":"#/components/schemas/LineupMoveResult"},"type":"array","title":"Moves","default":[]},"transaction":{"anyOf":[{"$ref":"#/components/schemas/DailyActionTransaction"},{"type":"null"}]},"blocked_reason":{"anyOf":[{"type":"string","const":"roster_full"},{"type":"null"}],"title":"Blocked Reason"},"game_time_et":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Time Et"}},"type":"object","required":["id","kind","title","detail","player","counterpart","moves","transaction","blocked_reason","game_time_et"],"title":"DailyAction"},"DailyActionPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"},"lineup_slot_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lineup Slot Id"},"lineup_slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lineup Slot"},"avg_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Points"}},"type":"object","required":["player_id","nba_player_id","name","team","injury_status","lineup_slot_id","lineup_slot","avg_points"],"title":"DailyActionPlayer"},"DailyActionTransaction":{"properties":{"pickup":{"$ref":"#/components/schemas/StreamerPlayerResp"},"drop_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Drop Player Id"}},"type":"object","required":["pickup","drop_player_id"],"title":"DailyActionTransaction"},"DailyActionsData":{"properties":{"lineup":{"anyOf":[{"$ref":"#/components/schemas/LineupState"},{"type":"null"}]},"roster_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roster Version"},"scoring_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scoring Period Id"},"nba_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nba Date"},"can_write":{"type":"boolean","title":"Can Write","default":false},"write_blocked_reason":{"anyOf":[{"type":"string","enum":["provider_not_supported","provider_read_only","no_credentials","writes_disabled","no_scoring_period","not_team_owner","team_id_unresolved"]},{"type":"null"}],"title":"Write Blocked Reason"},"value_kind":{"type":"string","enum":["fpts","cat_value"],"title":"Value Kind","default":"fpts"},"unfilled":{"items":{"$ref":"#/components/schemas/LineupUnfilled"},"type":"array","title":"Unfilled","default":[]},"actions":{"items":{"$ref":"#/components/schemas/DailyAction"},"type":"array","title":"Actions","default":[]},"streamers_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Streamers Error"}},"type":"object","required":["lineup","roster_version","scoring_period_id","nba_date","can_write","write_blocked_reason","value_kind","unfilled","actions","streamers_error"],"title":"DailyActionsData"},"DailyActionsResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/DailyActionsData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"DailyActionsResp"},"DailyMatchupData":{"properties":{"date":{"type":"string","title":"Date"},"day_type":{"type":"string","enum":["past","today","future"],"title":"Day Type"},"day_of_week":{"type":"string","title":"Day Of Week"},"day_index":{"type":"integer","title":"Day Index"},"matchup_period":{"type":"integer","title":"Matchup Period"},"matchup_period_start":{"type":"string","title":"Matchup Period Start"},"matchup_period_end":{"type":"string","title":"Matchup Period End"},"your_team":{"$ref":"#/components/schemas/DailyMatchupTeam"},"opponent_team":{"$ref":"#/components/schemas/DailyMatchupTeam"},"scoring_format":{"type":"string","enum":["points","categories"],"title":"Scoring Format","default":"points"},"category_comparison":{"anyOf":[{"$ref":"#/components/schemas/CategoryComparison"},{"type":"null"}]}},"type":"object","required":["date","day_type","day_of_week","day_index","matchup_period","matchup_period_start","matchup_period_end","your_team","opponent_team","scoring_format","category_comparison"],"title":"DailyMatchupData","description":"Response data for daily matchup drill-down."},"DailyMatchupFuturePlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"},"position":{"type":"string","title":"Position"},"has_game":{"type":"boolean","title":"Has Game"},"opponent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opponent"},"game_time_et":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Time Et"},"injured":{"type":"boolean","title":"Injured"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"}},"type":"object","required":["player_id","nba_player_id","name","team","position","has_game","opponent","game_time_et","injured","injury_status"],"title":"DailyMatchupFuturePlayer","description":"Player info for a future day. Shows whether they have a game."},"DailyMatchupPlayerStats":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"},"position":{"type":"string","title":"Position"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"},"had_game":{"type":"boolean","title":"Had Game"},"lineup_slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lineup Slot"},"lineup_slot_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lineup Slot Id"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"},"fpts":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fpts"},"pts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pts"},"reb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reb"},"ast":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ast"},"stl":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stl"},"blk":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Blk"},"tov":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tov"},"min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min"},"fgm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fgm"},"fga":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fga"},"fg3m":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fg3M"},"fg3a":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fg3A"},"ftm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ftm"},"fta":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fta"}},"type":"object","required":["player_id","name","team","position","nba_player_id","had_game","lineup_slot","lineup_slot_id","injury_status","fpts","pts","reb","ast","stl","blk","tov","min","fgm","fga","fg3m","fg3a","ftm","fta"],"title":"DailyMatchupPlayerStats","description":"Player stats for a single past day.\n\nThe lineup fields are set when the day's roster came from a lineup snapshot\n(or ESPN's per-day history) and left None when the team's current roster\nstood in for it — today's slots are never presented as that day's."},"DailyMatchupResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/DailyMatchupData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"DailyMatchupResp","description":"Response containing daily matchup drill-down data."},"DailyMatchupTeam":{"properties":{"team_name":{"type":"string","title":"Team Name"},"team_id":{"type":"integer","title":"Team Id"},"total_fpts":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Fpts"},"roster":{"anyOf":[{"items":{"$ref":"#/components/schemas/DailyMatchupPlayerStats"},"type":"array"},{"items":{"$ref":"#/components/schemas/DailyMatchupFuturePlayer"},"type":"array"}],"title":"Roster"},"categories":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Categories"},"roster_source":{"type":"string","enum":["snapshot","provider_history","current"],"title":"Roster Source","default":"current"},"lineup_captured_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lineup Captured At"}},"type":"object","required":["team_name","team_id","total_fpts","roster","categories","roster_source","lineup_captured_at"],"title":"DailyMatchupTeam","description":"Team data for a daily matchup view."},"DailyScorePoint":{"properties":{"date":{"type":"string","title":"Date"},"day_of_matchup":{"type":"integer","title":"Day Of Matchup"},"your_score":{"type":"number","title":"Your Score"},"opponent_score":{"type":"number","title":"Opponent Score"},"your_categories":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Your Categories"},"opponent_categories":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Opponent Categories"}},"type":"object","required":["date","day_of_matchup","your_score","opponent_score","your_categories","opponent_categories"],"title":"DailyScorePoint","description":"Single day's score snapshot for chart visualization"},"DeleteLineupResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"DeleteLineupResp","description":"Delete lineup response"},"DraftBoardMeta":{"properties":{"season":{"type":"string","title":"Season"},"format":{"type":"string","title":"Format"},"value_kind":{"type":"string","enum":["fpts","cat_value"],"title":"Value Kind"},"pool_size":{"type":"integer","title":"Pool Size"},"available":{"type":"integer","title":"Available"},"projection_count":{"type":"integer","title":"Projection Count"},"baseline_count":{"type":"integer","title":"Baseline Count"},"market_only_count":{"type":"integer","title":"Market Only Count","default":0},"projections_as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Projections As Of"},"projection_source":{"anyOf":[{"type":"string","enum":["cv","espn"]},{"type":"null"}],"title":"Projection Source","description":"Whose projection the `projection` rows were valued from: `cv` (Court Vision's own — three seasons of history, ESPN's line and curated adjustments) once the cv-projection pipeline has published, `espn` until then. None when no projection exists yet."},"market_as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Market As Of"},"rank_source":{"type":"string","enum":["cv","espn"],"title":"Rank Source","description":"What actually ordered `recommendations` on this response","default":"cv"},"rank_source_requested":{"type":"string","enum":["cv","espn"],"title":"Rank Source Requested","description":"What the caller asked for. Differs from `rank_source` only when `espn` was asked for and no market snapshot exists yet, which falls back to `cv`.","default":"cv"},"market_rank_type":{"type":"string","enum":["standard","roto"],"title":"Market Rank Type","description":"Which of ESPN's two boards `market_rank` and `auction_value` come from: `standard` for points leagues, `roto` for category leagues. They are separate opinions — over ESPN's own top 150 they disagree by a mean of 28 places.","default":"standard"},"rank_basis":{"type":"string","enum":["espn","cv","my_team"],"title":"Rank Basis","description":"Whose rank orders the rows and fills `board_rank`. `espn` in an ESPN room: a league ESPN runs, a room with no league at all, or one following an ESPN draft. `cv` when the caller asked for Court Vision's rankings (`board=cv`), for a league elsewhere, or while no market snapshot exists. `my_team` when the caller asked for those rankings re-ordered for their own roster (`board=my_team`): rows in `room_rank` order. `board` asks; this is what ran.","default":"cv"},"rank_basis_reason":{"type":"string","enum":["espn_league","league_less_room","linked_espn_draft","caller_chose_cv","caller_chose_my_team","provider_not_espn","no_market_snapshot"],"title":"Rank Basis Reason","description":"Why `rank_basis` is what it is, in the words the room shows","default":"provider_not_espn"},"rank_basis_requested":{"type":"string","enum":["espn","cv","my_team"],"title":"Rank Basis Requested","description":"What the caller asked `board` for. Differs from `rank_basis` only when `espn` was asked for and the room cannot have it: a league elsewhere, or no market snapshot yet.","default":"espn"},"session_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Id"},"league_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"League Size"},"roster_slots":{"additionalProperties":{"type":"integer"},"type":"object","title":"Roster Slots","default":{}},"position_source":{"type":"string","enum":["espn","coarse","none"],"title":"Position Source","description":"Where position data came from: espn (default_position_id on the market snapshot, exact caps), coarse (nba.players G/F/C, caps enforced per group only), none","default":"none"},"position_limits":{"additionalProperties":{"type":"integer"},"type":"object","title":"Position Limits","default":{}},"categories":{"items":{"$ref":"#/components/schemas/CategoryDefResp"},"type":"array","title":"Categories","default":[]},"punts":{"items":{"type":"string"},"type":"array","title":"Punts","description":"Category keys this room concedes, as stored on the session","default":[]},"category_need":{"items":{"$ref":"#/components/schemas/CategoryNeedResp"},"type":"array","title":"Category Need","description":"Category leagues only: where the caller's roster stands after the same number of picks, and the weight fit gives each category","default":[]},"pace_source":{"anyOf":[{"type":"string","enum":["seats","tier"]},{"type":"null"}],"title":"Pace Source","description":"What `category_need` was measured against: `seats` reads the opposing rosters in this room, `tier` estimates an average team from the draftable pool (a room with no confirmed slot, or before enough seats have drafted). None for points leagues."},"seats_drafted":{"type":"integer","title":"Seats Drafted","description":"Opposing seats holding at least one player the pool can score. The pace reads them once there are three, so this is how far a `tier` room is from switching — not a claim that it did. Read `pace_source` for that.","default":0},"settings_synced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Settings Synced"},"unsupported":{"items":{"type":"string"},"type":"array","title":"Unsupported","description":"League scoring keys the board cannot honor: dd/td are per-game bonuses, and the aggregate projection and season-baseline lines the board is valued from cannot carry them","default":[]},"congestion":{"anyOf":[{"$ref":"#/components/schemas/DraftCongestionResp"},{"type":"null"}],"description":"Lineup congestion for the roster zone: what the roster benches on its real game nights and which NBA teams it stacks. Set on every board."},"playoffs":{"anyOf":[{"$ref":"#/components/schemas/DraftPlayoffsResp"},{"type":"null"}],"description":"The fantasy-playoff weeks behind every row's `playoff_games`, and the weight the CV value gives them. None in roto leagues and when the season calendar is unavailable."}},"type":"object","required":["season","format","value_kind","pool_size","available","projection_count","baseline_count","market_only_count","projections_as_of","projection_source","market_as_of","rank_source","rank_source_requested","market_rank_type","rank_basis","rank_basis_reason","rank_basis_requested","session_id","league_size","roster_slots","position_source","position_limits","categories","punts","category_need","pace_source","seats_drafted","settings_synced","unsupported","congestion","playoffs"],"title":"DraftBoardMeta"},"DraftBoardResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"items":{"$ref":"#/components/schemas/DraftBoardRow"},"type":"array","title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"recommendations":{"items":{"$ref":"#/components/schemas/DraftRecommendation"},"type":"array","title":"Recommendations","description":"Best available for the caller's next pick, best first. Cap-blocked players and rows with no value are never recommended. Empty when nothing can be valued.","default":[]},"roster":{"items":{"$ref":"#/components/schemas/DraftRosterEntry"},"type":"array","title":"Roster","description":"The caller's drafted players (session picks plus `mine`), in big-board order","default":[]},"meta":{"anyOf":[{"$ref":"#/components/schemas/DraftBoardMeta"},{"type":"null"}]}},"type":"object","required":["status","message","data","error_code","timestamp","recommendations","roster","meta"],"title":"DraftBoardResp"},"DraftBoardRow":{"properties":{"player_id":{"type":"integer","title":"Player Id","description":"NBA player id (nba.players.id) — the id terminal panels expect"},"espn_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Id"},"name":{"type":"string","title":"Name"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team","description":"Current NBA team abbreviation (nba.player_profiles), falling back to last season's stats team; None when neither knows him (a rookie before his profile syncs)"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position","description":"NBA-style position (G, F, C, F-C, ...)"},"primary_position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Position","description":"ESPN primary position (PG/SG/SF/PF/C) from the market snapshot — what hard position caps are counted against. None until the market snapshot carries the player."},"positions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Positions","description":"ESPN lineup slots the player is eligible for, verbatim and authoritative (a pure centre is simply not F-eligible). None until the market snapshot carries them."},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status","description":"ESPN injury status (OUT, DAY_TO_DAY, ...); None when active or unknown"},"cv_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cv Rank","description":"Rank by CV value over the full pool, picked players included — a pre-draft big board rank that stays stable (and comparable to market_rank) as picks remove rows. None for market-only rows, which carry no value to rank."},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value","description":"League-scored per-game value: fantasy points under the league's weights, or the fpts-scale category value. None for a market-only row — a player ESPN ranks but neither a projection nor last season's baseline can value (a rookie, before projections)."},"value_source":{"type":"string","enum":["projection","baseline","market"],"title":"Value Source","description":"projection: a per-game projection for the coming season (`meta.projection_source` says whose). baseline: last season's per-game averages. market: no stat line at all — the row exists because ESPN drafts him."},"board_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Board Rank","description":"The row's place on the board `meta.rank_basis` names — ESPN's published rank for the league's format in an ESPN room, `cv_rank` on Court Vision's board, `room_rank` on `my_team`. Rows come back in this order. None for a player the basis does not rank; those trail every ranked row, ordered by the other opinion, and are never given a number that looks like ESPN's."},"room_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Room Score","description":"Court Vision's value for *this roster*, in season-value points: value over the league's replacement level, plus what the room's punts add, minus the starts this roster could not use (lineup congestion). The number the recommendation cards decompose, on every row it was computed for. None for drafted, cap-blocked and market-only rows."},"room_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Room Rank","description":"Rank by `room_score` among the players the caller can still draft — the `my_team` board's order. Like `fit_rank` and unlike `cv_rank`, it moves with every pick."},"value_season":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Season","description":"Set only when a baseline `value` came from an OLDER season than the board's own previous one, e.g. `2024-25` on a 2026-27 board — a player who missed last season entirely is valued off the most recent one he played, and that value is a year staler than every other row. None for everyone valued from last season, and for projection and market-only rows."},"last_season_gp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Season Gp","description":"Games played last season; None for rookies"},"projected_gp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Projected Gp","description":"Projected games this season, when a projection exists"},"season_games":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Season Games","description":"The games Court Vision's value is built on: projected games (65 when nothing projects him) spread over his team's schedule, with games in the league's fantasy-playoff weeks counted `meta.playoffs.weight` times and games after the fantasy season not at all, renormalized so the league-average player keeps his games. Roto counts every game once."},"playoff_games":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Playoff Games","description":"Games his current NBA team plays in the league's fantasy-playoff weeks (`meta.playoffs.weeks`). None when his team or the season calendar is unknown, and in roto leagues, which have no playoffs."},"playoff_light_games":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Playoff Light Games","description":"Of `playoff_games`, those on light nights — 7 or fewer NBA games — when a daily-lineup manager can nearly always start him."},"playoff_games_by_week":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Playoff Games By Week","description":"`playoff_games` split by playoff week, in `meta.playoffs.weeks` order"},"fpts_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fpts Avg","description":"Per-game fantasy points under the platform default formula (familiar scale, tiebreak); None for market-only rows"},"market_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Market Rank","description":"ESPN editorial draft rank from the latest snapshot, taken from the board that matches the league's format — see `meta.market_rank_type`. Falls back to the points board on snapshots written before the category board was captured."},"adp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adp","description":"Average draft position across real ESPN drafts. Unlike `market_rank` this is NOT format-specific: ESPN publishes one crowd average, sampled from the reference league's own format (points). A category room should read it as a rough availability signal, not as its own format's ADP."},"auction_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auction Value","description":"ESPN editorial auction value from the same board as `market_rank`"},"market_delta":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Market Delta","description":"market_rank − cv_rank; positive means the market ranks the player worse than CV does (a bargain)"},"fit_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fit Value","description":"Category leagues only: `value` re-scored for *this* roster — the same per-category z's weighted by how far the roster trails an average team, with punted categories at zero. None for points leagues and for rows with no stat line to score."},"fit_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fit Rank","description":"Rank by `fit_value` among the players still available. Unlike `cv_rank` this moves with every pick — it is a statement about the roster, not about the player."},"availability":{"anyOf":[{"type":"string","enum":["likely","tossup","gone"]},{"type":"null"}],"title":"Availability","description":"Whether the player is likely to survive to the caller's next pick (the pick after that, when the caller is on the clock): `likely`, `tossup` or `gone`, from the gap between ADP (or market rank) and that pick. None without a confirmed slot or market data. Deliberately a bucket, not a probability — ESPN publishes a point estimate, and a percentage would imply a calibration we do not have."},"cap_blocked":{"type":"boolean","title":"Cap Blocked","description":"Drafting this player would exceed a hard per-position roster cap (league position_limits vs the caller's current roster). Shown greyed with a CAP badge, never hidden.","default":false},"categories":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Categories","description":"Per-game value per category; rates are 0-1 fractions (None when the player has no attempts)"},"category_z":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Category Z","description":"Signed contribution per category (positive is always good; TOV is inverted): the player's expected weekly total, games included, against the league's draftable cohort, with each category's week-to-week noise in the denominator (G-score). Roto uses season totals and no noise term."},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score","description":"Sum of `category_z`; what `value` is mapped from and `cv_rank` is ordered by"}},"type":"object","required":["player_id","espn_id","name","team","position","primary_position","positions","injury_status","cv_rank","value","value_source","board_rank","room_score","room_rank","value_season","last_season_gp","projected_gp","season_games","playoff_games","playoff_light_games","playoff_games_by_week","fpts_avg","market_rank","adp","auction_value","market_delta","fit_value","fit_rank","availability","cap_blocked","categories","category_z","score"],"title":"DraftBoardRow"},"DraftCongestionResp":{"properties":{"benched_per_week":{"type":"number","title":"Benched Per Week","description":"Starter value the roster benches per sampled fantasy week"},"benched_season":{"type":"number","title":"Benched Season","description":"`benched_per_week` scaled to `season_weeks`"},"sample_weeks":{"items":{"type":"integer"},"type":"array","title":"Sample Weeks","description":"Fantasy week numbers measured — every week the league scores, so the weeks after its playoffs are left out; empty when no calendar could be read","default":[]},"season_weeks":{"type":"integer","title":"Season Weeks","description":"Weeks `benched_season` covers (the measured weeks); 0 when no calendar could be read","default":0},"slots":{"type":"integer","title":"Slots","description":"Active lineup slots the matching fills; 0 when the league's slots are unknown, which zeroes every penalty","default":0},"stacks":{"items":{"$ref":"#/components/schemas/DraftStackResp"},"type":"array","title":"Stacks","description":"NBA teams with two or more roster players, largest first","default":[]},"no_team":{"items":{"type":"integer"},"type":"array","title":"No Team","description":"Roster players with no team on file: never benched, never penalized","default":[]},"evaluated":{"type":"integer","title":"Evaluated","description":"Candidates the congestion term was measured for: everyone the caller can still draft, or 0 when there is no lineup or calendar to measure against","default":0}},"type":"object","required":["benched_per_week","benched_season","sample_weeks","season_weeks","slots","stacks","no_team","evaluated"],"title":"DraftCongestionResp","description":"Lineup congestion on the caller's roster: starter value that would sit on\nnights more rostered players play than the league can start, measured on\nevery week of the calendar the league scores."},"DraftImportResp":{"properties":{"session":{"$ref":"#/components/schemas/DraftSessionResp"},"espn_league_id":{"type":"integer","title":"Espn League Id"},"espn_team_id":{"type":"integer","title":"Espn Team Id","description":"The session team's ESPN team id — what `by_me` is counted against"},"draft_type":{"type":"string","enum":["snake","auction"],"title":"Draft Type"},"made":{"type":"integer","title":"Made","description":"Picks in the completed ESPN draft"},"inserted":{"type":"integer","title":"Inserted","description":"Picks newly recorded from this import"},"skipped":{"type":"integer","title":"Skipped","description":"Picks the session already held (a re-import)"},"conflicts":{"items":{"$ref":"#/components/schemas/DraftSyncConflict"},"type":"array","title":"Conflicts","default":[]},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Header disagreements on a session that already has picks (not applied)","default":[]},"header_applied":{"type":"boolean","title":"Header Applied","description":"Whether pick order / slot / rounds / type were written from ESPN (only on an empty session)"}},"type":"object","required":["session","espn_league_id","espn_team_id","draft_type","made","inserted","skipped","conflicts","warnings","header_applied"],"title":"DraftImportResp"},"DraftImportResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/DraftImportResp"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"DraftImportResponse","description":"What the import recorded, in the shape `sync/init` reports."},"DraftInitSyncRequest":{"properties":{"payload":{"type":"string","maxLength":1000000,"minLength":24,"title":"Payload","description":"Base64 of the room's INIT snapshot (a leading `INIT ` prefix and whitespace are tolerated)"}},"type":"object","required":["payload"],"title":"DraftInitSyncRequest","description":"The base64 body of the ESPN draft room's `INIT <base64>` frame.\n\nThe room posts it on every connect, so this endpoint is idempotent: picks it\nalready holds are skipped, not re-recorded."},"DraftInitSyncResp":{"properties":{"session":{"$ref":"#/components/schemas/DraftSessionResp"},"espn_league_id":{"type":"integer","title":"Espn League Id","description":"The ESPN league id decoded from the INIT frame"},"espn_team_id":{"type":"integer","title":"Espn Team Id","description":"The connecting user's ESPN team id (INIT.teamId) — what `by_me` is counted against"},"draft_state":{"type":"integer","title":"Draft State","description":"ESPN's draft state code from the snapshot (0 = not started)"},"draft_type":{"type":"string","enum":["snake","auction"],"title":"Draft Type"},"made":{"type":"integer","title":"Made","description":"Picks made in the INIT snapshot"},"inserted":{"type":"integer","title":"Inserted","description":"Picks newly recorded from this INIT"},"skipped":{"type":"integer","title":"Skipped","description":"Picks the session already held (a normal reconnect)"},"conflicts":{"items":{"$ref":"#/components/schemas/DraftSyncConflict"},"type":"array","title":"Conflicts","default":[]},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Header disagreements on a session that already has picks (not applied)","default":[]},"espn_front":{"type":"integer","title":"Espn Front","description":"Next pick number to assign — one past the last made pick; what the live path numbers from"},"header_applied":{"type":"boolean","title":"Header Applied","description":"Whether pick order / slot / rounds / type were written from INIT (only on an empty session)"},"position_limits":{"additionalProperties":{"type":"integer"},"type":"object","title":"Position Limits","description":"Hard per-position caps decoded from the room (display; the league's own are authoritative)","default":{}},"league_adopted":{"anyOf":[{"$ref":"#/components/schemas/DraftLeagueAdoption"},{"type":"null"}],"description":"Set when this INIT turned a league-pending room into a room on a real league (see `session.league_pending`)"},"league_adoption_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"League Adoption Error","description":"Why a league-pending room could not adopt its league this time (ESPN unreachable, a private league with no ESPN connection on the account, …). Picks still sync; the room keeps its placeholder settings and tries again on the next connect."}},"type":"object","required":["session","espn_league_id","espn_team_id","draft_state","draft_type","made","inserted","skipped","conflicts","warnings","espn_front","header_applied","position_limits","league_adopted","league_adoption_error"],"title":"DraftInitSyncResp"},"DraftInitSyncResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/DraftInitSyncResp"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"DraftInitSyncResponse","description":"The reconciled session plus a report of what the INIT changed."},"DraftKeeper-Input":{"properties":{"player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Player Id","description":"NBA player id (nba.players.id)"},"espn_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Player Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"round":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Round","description":"Round the keeper costs, when the league assigns one"},"overall_pick":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overall Pick","description":"Computed on read, ignored on input: the pick this keeper consumes — the caller's slot in `round`, once the session has a slot and a pick order."}},"type":"object","title":"DraftKeeper","description":"One pre-designated keeper. Identity is whatever the client knows; the\nroom resolves it the same way a pick is resolved."},"DraftKeeper-Output":{"properties":{"player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Player Id","description":"NBA player id (nba.players.id)"},"espn_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Player Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"round":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Round","description":"Round the keeper costs, when the league assigns one"},"overall_pick":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overall Pick","description":"Computed on read, ignored on input: the pick this keeper consumes — the caller's slot in `round`, once the session has a slot and a pick order."}},"type":"object","required":["player_id","espn_player_id","name","round","overall_pick"],"title":"DraftKeeper","description":"One pre-designated keeper. Identity is whatever the client knows; the\nroom resolves it the same way a pick is resolved."},"DraftLeagueAdoption":{"properties":{"team_id":{"type":"integer","title":"Team Id","description":"Your team in that league, in `usr.teams` — created now unless it already existed"},"league_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"League Id","description":"The synced league row; null if ESPN's settings could not be read"},"espn_league_id":{"type":"integer","title":"Espn League Id"},"espn_team_id":{"type":"integer","title":"Espn Team Id"},"team_name":{"type":"string","title":"Team Name"},"league_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"League Name"},"team_created":{"type":"boolean","title":"Team Created","description":"False when the team was already on your account"}},"type":"object","required":["team_id","league_id","espn_league_id","espn_team_id","team_name","league_name","team_created"],"title":"DraftLeagueAdoption","description":"What a league-pending room took from the ESPN draft it connected to."},"DraftPickCreate":{"properties":{"player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Player Id","description":"NBA player id (nba.players.id)"},"espn_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Player Id"},"player_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Player Name"},"espn_team_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Espn Team Id","description":"The ESPN team that made the pick (an id from `pick_order`), when the pick came from ESPN. Sets `slot` by lookup rather than by the snake geometry — a traded pick or an auction pick lands in the seat that actually made it."},"overall_pick":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Overall Pick","description":"Defaults to the session's next unused pick"},"by_me":{"type":"boolean","title":"By Me","description":"Drafted by the caller (counts against position caps and fills the roster zone)","default":false},"source":{"type":"string","enum":["manual","espn_sync","import","keeper"],"title":"Source","description":"`keeper` records a pick spent before the draft started (at the pick its round costs): it leaves the board like any pick but never counts as the draft front — and it is checked against the session's designated keepers before it is written.\n\n`mock` is not accepted here: it means the autopicker made the pick, and only the server may say that.","default":"manual"},"bid":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Bid","description":"Auction price (v2; ignored by snake drafts)"}},"type":"object","title":"DraftPickCreate","description":"One pick. The player is identified by whatever the client has; the\nservice resolves NBA id -> ESPN id -> normalized name, in that order."},"DraftPickDeleteResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"DraftPickDeleteResponse","description":"The overall pick number that was undone."},"DraftPickResp":{"properties":{"overall_pick":{"type":"integer","title":"Overall Pick"},"round":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Round","description":"1-based round; None for auction drafts"},"slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slot","description":"1-based seat in pick_order that made the pick: the ESPN team's seat when the pick's team is known, else derived from the pick number (snake drafts only)"},"player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Player Id","description":"NBA player id, when the pick resolved to one"},"espn_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Player Id"},"espn_team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Team Id","description":"The ESPN team that made the pick, when ESPN said"},"player_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Player Name"},"by_me":{"type":"boolean","title":"By Me","default":false},"source":{"type":"string","enum":["manual","espn_sync","import","keeper","mock"],"title":"Source","default":"manual"},"bid":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bid"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["overall_pick","round","slot","player_id","espn_player_id","espn_team_id","player_name","by_me","source","bid","created_at"],"title":"DraftPickResp"},"DraftPickResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/DraftPickResp"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"DraftPickResponse","description":"The pick that was just recorded."},"DraftPlayoffsResp":{"properties":{"weeks":{"items":{"type":"integer"},"type":"array","title":"Weeks","description":"Calendar week numbers of the playoffs, in order"},"rounds":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array","title":"Rounds","description":"The weeks of each playoff round"},"label":{"type":"string","title":"Label","description":"Human label, e.g. `weeks 20-23`"},"source":{"type":"string","enum":["league","espn_default","yahoo_weeks_assumed"],"title":"Source","description":"league: read from the league's synced schedule settings. espn_default: the league has none (league-less room, unsynced league), so ESPN's default shape — two two-week rounds ending the week before the NBA's last. yahoo_weeks_assumed: Yahoo's playoff start week, read as this calendar's week number."},"weight":{"type":"number","title":"Weight","description":"λ: how many regular-season games one playoff-week game counts as"},"weights":{"items":{"type":"number"},"type":"array","title":"Weights","description":"The weights the caller may ask for (`playoff_weight`)"},"games_min":{"type":"integer","title":"Games Min","description":"Fewest playoff-week games any NBA team plays"},"games_max":{"type":"integer","title":"Games Max","description":"Most playoff-week games any NBA team plays"},"games_mean":{"type":"number","title":"Games Mean","description":"Average playoff-week games across the 30 teams"}},"type":"object","required":["weeks","rounds","label","source","weight","weights","games_min","games_max","games_mean"],"title":"DraftPlayoffsResp","description":"The league's fantasy-playoff weeks and how much the CV value weighs them."},"DraftRecapResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"items":{"$ref":"#/components/schemas/RecapPickResp"},"type":"array","title":"Data","default":[]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"seats":{"items":{"$ref":"#/components/schemas/RecapSeatResp"},"type":"array","title":"Seats","default":[]},"standings":{"items":{"$ref":"#/components/schemas/RecapStandingResp"},"type":"array","title":"Standings","default":[]},"meta":{"anyOf":[{"$ref":"#/components/schemas/RecapMeta"},{"type":"null"}]}},"type":"object","required":["status","message","data","error_code","timestamp","seats","standings","meta"],"title":"DraftRecapResp","description":"The finished draft: every pick priced, every seat graded, standings projected."},"DraftRecommendation":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"primary_position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Position"},"value":{"type":"number","title":"Value","description":"Per-game league-scored value (the board row's `value`)"},"season_value":{"type":"number","title":"Season Value","description":"value x projected games"},"vorp":{"type":"number","title":"Vorp","description":"season_value minus the replacement level: the league's last starter still to be filled, or the lower level at a position whose own lineup seats the league cannot fill"},"score":{"type":"number","title":"Score","description":"vorp + punts + injury + congestion, every term in season-value points — the board row's `room_score`. Court Vision's own number, always computed — it only *orders* this list when `source` is `cv`."},"source":{"type":"string","enum":["cv","espn"],"title":"Source","description":"What ordered the list: `cv` (the default) the composite `score`, `espn` the best remaining on ESPN's board for the league's format. The other opinion rides along either way — `market_rank` on a CV card, `score` on an ESPN one — as the visible dissent rather than the ranking key.","default":"cv"},"market_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Market Rank","description":"ESPN's draft rank for the league's format; None for a player ESPN does not rank"},"cv_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cv Rank","description":"Court Vision's rank over the full pool — the board's `cv_rank` for this player"},"components":{"items":{"$ref":"#/components/schemas/RecommendationComponent"},"type":"array","title":"Components","default":[]},"reason":{"type":"string","title":"Reason","description":"One-sentence summary of the dominant terms"}},"type":"object","required":["player_id","name","primary_position","value","season_value","vorp","score","source","market_rank","cv_rank","components","reason"],"title":"DraftRecommendation","description":"One candidate for the caller's next pick, with the whole score decomposed."},"DraftRosterEntry":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"primary_position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Position"},"positions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Positions"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"value_source":{"type":"string","enum":["projection","baseline","market"],"title":"Value Source","default":"baseline"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"}},"type":"object","required":["player_id","name","team","primary_position","positions","value","value_source","injury_status"],"title":"DraftRosterEntry","description":"A player the caller has drafted, with what the roster zone needs to place\nhim: primary position for caps, eligible slots for the lineup, NBA team for\nstacking. The session's picks say when he was taken."},"DraftSessionCreate":{"properties":{"team_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Team Id","description":"Owned team whose league settings the room uses; omit for generic settings"},"kind":{"type":"string","enum":["live","manual","mock","import"],"title":"Kind","description":"Where the picks come from. `live`: an ESPN draft. With a `team_id` it is that team's own draft (the team needs a synced ESPN league) and the room is linked to it at once; without one the room is `league_pending`: it links to the ESPN draft the Draft Tap connects to, reads that league's settings and adds your team there on the first INIT. `mock`: an ESPN mock lobby, linked on the first INIT it reconciles with. `manual`: the caller enters every pick.","default":"manual"},"name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Name","description":"A label of the caller's choosing"},"draft_type":{"anyOf":[{"type":"string","enum":["snake","auction"]},{"type":"null"}],"title":"Draft Type","description":"Defaults to the league's draft type, else snake"},"pick_order":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Pick Order","description":"Provider team ids in first-round order; defaults to the league's"},"my_slot":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"My Slot","description":"1-based slot the caller drafts from"},"rounds":{"anyOf":[{"type":"integer","maximum":40.0,"minimum":1.0},{"type":"null"}],"title":"Rounds","description":"Defaults to the league's draftable roster spots (starters plus bench, IR excluded), else 13"},"keepers":{"items":{"$ref":"#/components/schemas/DraftKeeper-Input"},"type":"array","title":"Keepers","default":[]},"scoring_format":{"anyOf":[{"type":"string","enum":["points","categories"]},{"type":"null"}],"title":"Scoring Format","description":"What a room with no team drafts for: `points` (the default) or `categories`, the standard 9-cat. Rejected with a `team_id` — a room that has a league takes that league's format, and the team's `scoring_preview` is how that one is overridden."}},"type":"object","title":"DraftSessionCreate","description":"Everything omitted here is prefilled from the team's synced league.\n\n`my_slot` is the exception: `pick_order` holds ESPN team ids we cannot map\nback to `usr.teams`, so the user confirms their own slot at create time."},"DraftSessionDeleteResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"DraftSessionDeleteResponse","description":"The id of the session that was deleted."},"DraftSessionListResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"items":{"$ref":"#/components/schemas/DraftSessionResp"},"type":"array","title":"Data","default":[]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"DraftSessionListResponse","description":"Every draft session the caller owns, newest first."},"DraftSessionResp":{"properties":{"id":{"type":"integer","title":"Id"},"team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Id"},"league_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"League Id"},"kind":{"type":"string","enum":["live","manual","mock","import"],"title":"Kind"},"status":{"type":"string","enum":["active","completed","abandoned"],"title":"Status"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"espn_league_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn League Id","description":"The ESPN draft this room follows; null until a mock or league-pending room links to one"},"league_pending":{"type":"boolean","title":"League Pending","description":"A live room started without a team: on the first INIT it adopts the ESPN league the Draft Tap connected to (settings synced, your team added) and this turns false. Until then its teams, scoring and rounds are the placeholders it was created with.","default":false},"draft_type":{"type":"string","enum":["snake","auction"],"title":"Draft Type"},"pick_order":{"items":{"type":"integer"},"type":"array","title":"Pick Order","default":[]},"my_slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"My Slot"},"rounds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rounds"},"keepers":{"items":{"$ref":"#/components/schemas/DraftKeeper-Output"},"type":"array","title":"Keepers","default":[]},"punts":{"items":{"type":"string"},"type":"array","title":"Punts","description":"Category keys this room concedes; they weigh 0 in the board's fit column","default":[]},"scoring_format":{"anyOf":[{"type":"string","enum":["points","categories"]},{"type":"null"}],"title":"Scoring Format","description":"The format a league-less room drafts for; null when the room takes its league's format instead (or when a league-less room drafts for points, the default)"},"league_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"League Size","description":"Teams in the draft: len(pick_order) when known"},"keeper_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Keeper Count","description":"Keepers the league allows, from its draft settings"},"total_picks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Picks","description":"league_size x rounds, when both are known"},"pick_count":{"type":"integer","title":"Pick Count","description":"Picks recorded so far","default":0},"next_overall_pick":{"type":"integer","title":"Next Overall Pick","description":"The number a new pick takes by default: the lowest unused one, so an undo is re-fillable in place. Not necessarily where the draft front is — see my_next_pick.","default":1},"my_next_pick":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"My Next Pick","description":"Next overall pick belonging to my_slot, counted from the draft front rather than from a hole an undo left (snake drafts with a slot confirmed)"},"picks_until_my_turn":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Picks Until My Turn","description":"Picks between the draft front and my turn; 0 means I am on the clock"},"picks":{"items":{"$ref":"#/components/schemas/DraftPickResp"},"type":"array","title":"Picks","description":"Populated on the detail route; empty in list responses","default":[]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","team_id","league_id","kind","status","name","espn_league_id","league_pending","draft_type","pick_order","my_slot","rounds","keepers","punts","scoring_format","league_size","keeper_count","total_picks","pick_count","next_overall_pick","my_next_pick","picks_until_my_turn","picks","started_at","completed_at","created_at","updated_at"],"title":"DraftSessionResp"},"DraftSessionResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/DraftSessionResp"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"DraftSessionResponse","description":"One draft session."},"DraftSessionUpdate":{"properties":{"status":{"anyOf":[{"type":"string","enum":["active","completed","abandoned"]},{"type":"null"}],"title":"Status"},"name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Name","description":"A label of the caller's choosing; empty clears it"},"espn_league_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Espn League Id","description":"Link the room to one ESPN draft (a real league's id, or a mock lobby's). Exclusive: one active room per ESPN draft, so linking to a draft another active room already follows is refused with that room's id. An explicit null unlinks."},"draft_type":{"anyOf":[{"type":"string","enum":["snake","auction"]},{"type":"null"}],"title":"Draft Type"},"pick_order":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Pick Order"},"my_slot":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"My Slot"},"rounds":{"anyOf":[{"type":"integer","maximum":40.0,"minimum":1.0},{"type":"null"}],"title":"Rounds"},"keepers":{"anyOf":[{"items":{"$ref":"#/components/schemas/DraftKeeper-Input"},"type":"array"},{"type":"null"}],"title":"Keepers"},"punts":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":12},{"type":"null"}],"title":"Punts","description":"Category keys this room concedes (e.g. `[\"ft_pct\", \"tov\"]`). Every key must be one of the league's own rankable categories; a points-scored room has none to punt."}},"type":"object","title":"DraftSessionUpdate","description":"Partial update — only the fields present are written."},"DraftStackResp":{"properties":{"team":{"type":"string","title":"Team"},"count":{"type":"integer","title":"Count"},"player_ids":{"items":{"type":"integer"},"type":"array","title":"Player Ids","description":"The players on that team, best first"}},"type":"object","required":["team","count","player_ids"],"title":"DraftStackResp","description":"Roster players sharing one NBA team's schedule."},"DraftSyncConflict":{"properties":{"pick_number":{"type":"integer","title":"Pick Number"},"espn_player_id":{"type":"integer","title":"Espn Player Id"},"reason":{"type":"string","enum":["pick_number_taken","player_already_drafted"],"title":"Reason"},"held_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Held At","description":"Where the player is already recorded (player_already_drafted)"},"held_espn_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Held Espn Player Id","description":"Who already holds this pick number (pick_number_taken)"},"message":{"type":"string","title":"Message"}},"type":"object","required":["pick_number","espn_player_id","reason","held_at","held_espn_player_id","message"],"title":"DraftSyncConflict","description":"One INIT pick that disagrees with what the session already has — reported,\nnever applied. The fix is a resync (INIT is authoritative) or a manual undo."},"ESPNMarketData":{"properties":{"season":{"type":"string","title":"Season"},"source":{"type":"string","const":"espn","title":"Source","default":"espn"},"as_of_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of Date"},"players":{"items":{"$ref":"#/components/schemas/ESPNMarketPlayer"},"type":"array","title":"Players"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"sort_by":{"type":"string","enum":["rank","adp","auction_value","auction_value_avg"],"title":"Sort By"}},"type":"object","required":["season","source","as_of_date","players","total","limit","offset","sort_by"],"title":"ESPNMarketData"},"ESPNMarketMovementData":{"properties":{"season":{"type":"string","title":"Season"},"source":{"type":"string","const":"espn","title":"Source","default":"espn"},"from_as_of_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From As Of Date"},"to_as_of_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To As Of Date"},"metric":{"type":"string","enum":["rank","adp","auction_value","auction_value_avg"],"title":"Metric"},"direction":{"type":"string","enum":["up","down","both"],"title":"Direction"},"players":{"items":{"$ref":"#/components/schemas/ESPNMarketMovementPlayer"},"type":"array","title":"Players"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["season","source","from_as_of_date","to_as_of_date","metric","direction","players","total","limit","offset"],"title":"ESPNMarketMovementData"},"ESPNMarketMovementPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id","description":"NBA player ID"},"espn_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Id"},"name":{"type":"string","title":"Name"},"before":{"anyOf":[{"$ref":"#/components/schemas/MarketMeasurements"},{"type":"null"}],"description":"Measurements in the resolved from snapshot; null when the player was absent"},"after":{"anyOf":[{"$ref":"#/components/schemas/MarketMeasurements"},{"type":"null"}],"description":"Measurements in the resolved to snapshot; null when the player was absent"},"changes":{"$ref":"#/components/schemas/MarketChanges"}},"type":"object","required":["player_id","espn_id","name","before","after","changes"],"title":"ESPNMarketMovementPlayer"},"ESPNMarketMovementResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/ESPNMarketMovementData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"ESPNMarketMovementResp"},"ESPNMarketPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id","description":"NBA player ID"},"espn_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Id"},"name":{"type":"string","title":"Name"},"overall_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overall Rank","description":"ESPN STANDARD editorial draft rank; lower is better"},"adp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adp","description":"Average pick in real ESPN drafts; lower is earlier"},"auction_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auction Value","description":"ESPN editorial auction value"},"auction_value_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auction Value Avg","description":"Average auction price in real ESPN drafts"},"default_position_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Position Id","description":"ESPN primary position: 1=PG, 2=SG, 3=SF, 4=PF, 5=C"},"eligible_slot_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Eligible Slot Ids","description":"ESPN lineup slot IDs: 0=PG, 1=SG, 2=SF, 3=PF, 4=C, 5=G, 6=F, 11=UT; distinct from primary position IDs"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status","description":"ESPN status at snapshot time (ACTIVE, OUT, DAY_TO_DAY, etc.)"}},"type":"object","required":["player_id","espn_id","name","overall_rank","adp","auction_value","auction_value_avg","default_position_id","eligible_slot_ids","injury_status"],"title":"ESPNMarketPlayer"},"ESPNMarketResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/ESPNMarketData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"ESPNMarketResp"},"EnrichedRosterPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"},"name":{"type":"string","title":"Name"},"avg_points":{"type":"number","title":"Avg Points"},"team":{"type":"string","title":"Team"},"valid_positions":{"items":{"type":"string"},"type":"array","title":"Valid Positions"},"injured":{"type":"boolean","title":"Injured"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"},"value_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Source"},"schedule":{"anyOf":[{"$ref":"#/components/schemas/PlayerScheduleInfo"},{"type":"null"}]},"avg_fpts_l7":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Fpts L7"},"avg_fpts_l14":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Fpts L14"},"avg_fpts_l30":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Fpts L30"}},"type":"object","required":["player_id","nba_player_id","name","avg_points","team","valid_positions","injured","injury_status","value_source","schedule","avg_fpts_l7","avg_fpts_l14","avg_fpts_l30"],"title":"EnrichedRosterPlayer","description":"Roster player with schedule and multi-window stat data."},"EspnAccountTeam":{"properties":{"league_id":{"type":"integer","title":"League Id"},"season":{"type":"integer","title":"Season"},"espn_team_id":{"type":"integer","title":"Espn Team Id"},"team_name":{"type":"string","title":"Team Name"},"team_abbrev":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Abbrev"},"league_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"League Name"},"league_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"League Size"},"scoring_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scoring Type"},"tracked_team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tracked Team Id"}},"type":"object","required":["league_id","season","espn_team_id","team_name","team_abbrev","league_name","league_size","scoring_type","tracked_team_id"],"title":"EspnAccountTeam"},"EspnAccountTeamsResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"items":{"$ref":"#/components/schemas/EspnAccountTeam"},"type":"array","title":"Data","default":[]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"EspnAccountTeamsResp"},"EspnConnectReq":{"properties":{"espn_s2":{"type":"string","minLength":1,"title":"Espn S2"},"swid":{"type":"string","minLength":1,"title":"Swid"}},"type":"object","required":["espn_s2","swid"],"title":"EspnConnectReq"},"FantasyProvider":{"type":"string","enum":["espn","yahoo"],"title":"FantasyProvider","description":"Supported fantasy basketball providers."},"GameInfo":{"properties":{"game_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Id","description":"NBA game ID"},"game_date":{"type":"string","title":"Game Date","description":"Date of the game (YYYY-MM-DD)"},"home_team":{"type":"string","title":"Home Team","description":"Home team abbreviation"},"away_team":{"type":"string","title":"Away Team","description":"Away team abbreviation"},"home_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Home Score","description":"Home team score (null if not started)"},"away_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Away Score","description":"Away team score (null if not started)"},"status":{"type":"string","title":"Status","description":"Game status: scheduled, in_progress, or final"},"arena":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arena","description":"Arena name"},"period":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period","description":"Current period (null if not started)"},"game_clock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Clock","description":"Remaining time in period (ISO 8601 duration, null if not live)"},"start_time_et":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time Et","description":"Scheduled tip-off time in ET (HH:MM format)"}},"type":"object","required":["game_id","game_date","home_team","away_team","home_score","away_score","status","arena","period","game_clock","start_time_et"],"title":"GameInfo","description":"Individual game information."},"GameLog":{"properties":{"date":{"type":"string","title":"Date","description":"Game date (YYYY-MM-DD)"},"game_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Id","description":"NBA game ID when the stored schedule identifies a unique matchup"},"opponent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opponent","description":"Opponent team abbreviation"},"home":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Home","description":"Whether this was a home game"},"fpts":{"type":"integer","title":"Fpts","description":"Fantasy points scored"},"pts":{"type":"integer","title":"Pts","description":"Points"},"reb":{"type":"integer","title":"Reb","description":"Rebounds"},"ast":{"type":"integer","title":"Ast","description":"Assists"},"stl":{"type":"integer","title":"Stl","description":"Steals"},"blk":{"type":"integer","title":"Blk","description":"Blocks"},"tov":{"type":"integer","title":"Tov","description":"Turnovers"},"min":{"type":"integer","title":"Min","description":"Minutes played"},"fgm":{"type":"integer","title":"Fgm","description":"Field goals made"},"fga":{"type":"integer","title":"Fga","description":"Field goals attempted"},"fg3m":{"type":"integer","title":"Fg3M","description":"Three-pointers made"},"fg3a":{"type":"integer","title":"Fg3A","description":"Three-pointers attempted"},"ftm":{"type":"integer","title":"Ftm","description":"Free throws made"},"fta":{"type":"integer","title":"Fta","description":"Free throws attempted"}},"type":"object","required":["date","game_id","opponent","home","fpts","pts","reb","ast","stl","blk","tov","min","fgm","fga","fg3m","fg3a","ftm","fta"],"title":"GameLog","description":"Individual game in a player's game log."},"GameScoreSnapshot":{"properties":{"captured_at":{"type":"string","title":"Captured At"},"period":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period"},"game_clock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Clock"},"home_score":{"type":"integer","title":"Home Score"},"away_score":{"type":"integer","title":"Away Score"},"game_status":{"type":"integer","title":"Game Status"}},"type":"object","required":["captured_at","period","game_clock","home_score","away_score","game_status"],"title":"GameScoreSnapshot","description":"Score snapshot for an NBA game at a specific point in time."},"GamesOnDateData":{"properties":{"date":{"type":"string","title":"Date","description":"Date queried (YYYY-MM-DD)"},"games":{"items":{"$ref":"#/components/schemas/GameInfo"},"type":"array","title":"Games","description":"List of games on this date"},"count":{"type":"integer","title":"Count","description":"Number of games on this date"}},"type":"object","required":["date","games","count"],"title":"GamesOnDateData","description":"Response data for games on a specific date."},"GamesOnDateResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/GamesOnDateData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"GamesOnDateResp","description":"Response for GET /v1/games/{date}."},"GenerateLineupReq":{"properties":{"team_id":{"type":"integer","minimum":1.0,"title":"Team Id","description":"Team ID must be positive"},"streaming_slots":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Streaming Slots","description":"Number of roster spots to use for streaming"},"week":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Week","description":"Fantasy week (1-based); must exist in the season calendar"},"avg_mode":{"type":"string","enum":["season","recent"],"title":"Avg Mode","description":"FPTS averaging mode: season avg or decay-weighted last-14-day avg","default":"season"}},"type":"object","required":["team_id","streaming_slots","week"],"title":"GenerateLineupReq"},"GenerateLineupRequest":{"properties":{"team_id":{"type":"integer","title":"Team Id","description":"ID of the user's stored team (from the Account desk)"},"week":{"type":"integer","maximum":26.0,"minimum":1.0,"title":"Week","description":"Fantasy week to optimize for"},"streaming_slots":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Streaming Slots","description":"Number of streaming add/drop moves to consider","default":2},"use_recent_stats":{"type":"boolean","title":"Use Recent Stats","description":"Use decay-weighted recent stats instead of season averages","default":false}},"type":"object","required":["team_id","week"],"title":"GenerateLineupRequest","description":"Request body for lineup generation from a connected team."},"GenerateLineupResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LineupInfo-Output"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"GenerateLineupResp","description":"Generate lineup response"},"GetLineupsResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/LineupInfo-Output"},"type":"array"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"GetLineupsResp","description":"Get user lineups response"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InjuredPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"injury_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Type"},"expected_return":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Return"}},"type":"object","required":["player_id","name","status","injury_type","expected_return"],"title":"InjuredPlayer","description":"Player with an injury status."},"LaneNotice":{"properties":{"lane_id":{"type":"integer","title":"Lane Id"},"team_id":{"type":"integer","title":"Team Id"},"user_id":{"type":"integer","title":"User Id"},"team_name":{"type":"string","title":"Team Name","default":""},"notify":{"type":"string","enum":["email","desk"],"title":"Notify"},"action":{"type":"string","enum":["paused","blocked"],"title":"Action"},"reason":{"type":"string","title":"Reason"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"holder":{"$ref":"#/components/schemas/ScheduledPickupPlayer"},"scoring_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scoring Period Id"},"nba_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Nba Date"},"ended":{"type":"boolean","title":"Ended","default":false}},"type":"object","required":["lane_id","team_id","user_id","team_name","notify","action","reason","detail","holder","scoring_period_id","nba_date","ended"],"title":"LaneNotice","description":"A stream lane decision the user hears about (unless the lane is desk-only): it paused\n(`reason`: holder_gone, auth_expired, ...), or a day passed without a decision (blocked, missed)."},"LanePlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"}},"type":"object","required":["player_id","name","team","nba_player_id"],"title":"LanePlayer"},"LaneProjection":{"properties":{"as_of":{"type":"string","format":"date-time","title":"As Of"},"days":{"items":{"$ref":"#/components/schemas/LaneProjectionDay"},"type":"array","title":"Days","default":[]},"value":{"type":"number","title":"Value"},"hold_value":{"type":"number","title":"Hold Value"},"gain":{"type":"number","title":"Gain"},"adds":{"type":"integer","title":"Adds"},"adds_left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Adds Left"},"rehold_after":{"type":"integer","title":"Rehold After"}},"type":"object","required":["as_of","days","value","hold_value","gain","adds","adds_left","rehold_after"],"title":"LaneProjection"},"LaneProjectionDay":{"properties":{"scoring_period_id":{"type":"integer","title":"Scoring Period Id"},"nba_date":{"type":"string","format":"date","title":"Nba Date"},"player":{"$ref":"#/components/schemas/LanePlayer"},"value":{"type":"number","title":"Value"},"switch":{"type":"boolean","title":"Switch","default":false}},"type":"object","required":["scoring_period_id","nba_date","player","value","switch"],"title":"LaneProjectionDay"},"LeagueDetail":{"properties":{"id":{"type":"integer","title":"Id"},"provider":{"$ref":"#/components/schemas/FantasyProvider"},"provider_league_id":{"type":"string","title":"Provider League Id"},"season":{"type":"integer","title":"Season"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"scoring_type":{"type":"string","enum":["points","categories","roto"],"title":"Scoring Type"},"category_win_mode":{"anyOf":[{"type":"string","enum":["each_category","most_categories"]},{"type":"null"}],"title":"Category Win Mode"},"categories":{"items":{"$ref":"#/components/schemas/CategoryDefResp"},"type":"array","title":"Categories","default":[]},"point_weights":{"additionalProperties":{"type":"number"},"type":"object","title":"Point Weights","default":{}},"settings_synced":{"type":"boolean","title":"Settings Synced","default":false},"settings_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settings Synced At"},"scoring_preview":{"anyOf":[{"type":"string","enum":["points","categories"]},{"type":"null"}],"title":"Scoring Preview"},"matchup_periods":{"additionalProperties":true,"type":"object","title":"Matchup Periods","default":{}},"roster_slots":{"additionalProperties":{"type":"integer"},"type":"object","title":"Roster Slots","default":{}},"position_limits":{"additionalProperties":{"type":"integer"},"type":"object","title":"Position Limits","default":{}},"draft_settings":{"additionalProperties":true,"type":"object","title":"Draft Settings","default":{}},"unsupported":{"items":{"type":"string"},"type":"array","title":"Unsupported","default":[]},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]}},"type":"object","required":["id","provider","provider_league_id","season","name","scoring_type","category_win_mode","categories","point_weights","settings_synced","settings_synced_at","scoring_preview","matchup_periods","roster_slots","position_limits","draft_settings","unsupported","warnings"],"title":"LeagueDetail"},"LeagueGetResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LeagueDetail"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LeagueGetResp"},"LeagueInfo":{"properties":{"provider":{"$ref":"#/components/schemas/FantasyProvider","default":"espn"},"league_id":{"type":"integer","minimum":1.0,"title":"League Id","description":"League ID must be positive"},"team_name":{"type":"string","minLength":1,"title":"Team Name","description":"Team name cannot be empty"},"league_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"League Name","default":"N/A"},"year":{"type":"integer","maximum":2030.0,"minimum":2020.0,"title":"Year","description":"Year must be between 2020 and 2030"},"espn_s2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Espn S2","default":""},"swid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Swid","default":""},"espn_team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Team Id"},"espn_connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Connection Id"},"yahoo_access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yahoo Access Token"},"yahoo_refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yahoo Refresh Token"},"yahoo_token_expiry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yahoo Token Expiry"},"yahoo_team_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yahoo Team Key"},"yahoo_connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Yahoo Connection Id"},"scoring_preview":{"anyOf":[{"type":"string","enum":["points","categories"]},{"type":"null"}],"title":"Scoring Preview","description":"Override the rendered scoring format for this team only; None uses the league's synced format"}},"type":"object","required":["league_id","team_name","year"],"title":"LeagueInfo"},"LeagueInfoPublic":{"properties":{"provider":{"$ref":"#/components/schemas/FantasyProvider","default":"espn"},"league_id":{"type":"integer","title":"League Id"},"team_name":{"type":"string","title":"Team Name"},"league_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"League Name","default":"N/A"},"year":{"type":"integer","title":"Year"},"yahoo_team_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yahoo Team Key"},"espn_team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Team Id"},"scoring_preview":{"anyOf":[{"type":"string","enum":["points","categories"]},{"type":"null"}],"title":"Scoring Preview"},"has_espn_credentials":{"type":"boolean","title":"Has Espn Credentials","default":false},"has_yahoo_credentials":{"type":"boolean","title":"Has Yahoo Credentials","default":false}},"type":"object","required":["provider","league_id","team_name","league_name","year","yahoo_team_key","espn_team_id","scoring_preview","has_espn_credentials","has_yahoo_credentials"],"title":"LeagueInfoPublic","description":"What a client is allowed to see about a stored team.\n\nDeliberately a separate model rather than `LeagueInfo` with fields excluded:\na model that cannot *represent* a credential cannot leak one, however it is\nconstructed. `LeagueInfo` stays the internal working object that carries\nsecrets to the provider services.\n\n`yahoo_team_key` is here because it identifies a team, not because it grants\nanything — it is useless without a token."},"LeagueInfoWrite":{"properties":{"provider":{"$ref":"#/components/schemas/FantasyProvider","default":"espn"},"league_id":{"type":"integer","minimum":1.0,"title":"League Id","description":"League ID must be positive"},"team_name":{"type":"string","minLength":1,"title":"Team Name","description":"Team name cannot be empty"},"league_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"League Name","default":"N/A"},"year":{"type":"integer","maximum":2030.0,"minimum":2020.0,"title":"Year","description":"Year must be between 2020 and 2030"},"espn_s2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Espn S2","default":""},"swid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Swid","default":""},"espn_connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Connection Id"},"yahoo_connection_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Yahoo Connection Id"},"yahoo_team_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yahoo Team Key"},"scoring_preview":{"anyOf":[{"type":"string","enum":["points","categories"]},{"type":"null"}],"title":"Scoring Preview","description":"Override the rendered scoring format for this team only; None uses the league's synced format"}},"type":"object","required":["league_id","team_name","year"],"title":"LeagueInfoWrite","description":"What a client is allowed to *send* about a team.\n\nThe request-side twin of `LeagueInfoPublic`, and separate from `LeagueInfo`\nfor the same reason: a model that cannot represent a Yahoo token cannot\naccept one. The browser stopped handling raw tokens with the credential\nboundary (7b) — it sends `yahoo_connection_id`, an opaque handle the OAuth\ncallback issued — but the request schema still advertised the token fields,\nso a generated client would have typed them right back into the UI.\n\nPydantic silently drops unknown fields, so a legacy client posting raw\ntokens loses them rather than erroring; post-7b no shipped client does.\nESPN cookies stay accepted here: the browser legitimately collects them\n(empty string = \"keep what is stored\" on update)."},"LeagueSummary":{"properties":{"id":{"type":"integer","title":"Id"},"provider":{"$ref":"#/components/schemas/FantasyProvider"},"provider_league_id":{"type":"string","title":"Provider League Id"},"season":{"type":"integer","title":"Season"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"scoring_type":{"type":"string","enum":["points","categories","roto"],"title":"Scoring Type"},"category_win_mode":{"anyOf":[{"type":"string","enum":["each_category","most_categories"]},{"type":"null"}],"title":"Category Win Mode"},"categories":{"items":{"$ref":"#/components/schemas/CategoryDefResp"},"type":"array","title":"Categories","default":[]},"point_weights":{"additionalProperties":{"type":"number"},"type":"object","title":"Point Weights","default":{}},"settings_synced":{"type":"boolean","title":"Settings Synced","default":false},"settings_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settings Synced At"},"scoring_preview":{"anyOf":[{"type":"string","enum":["points","categories"]},{"type":"null"}],"title":"Scoring Preview"}},"type":"object","required":["id","provider","provider_league_id","season","name","scoring_type","category_win_mode","categories","point_weights","settings_synced","settings_synced_at","scoring_preview"],"title":"LeagueSummary","description":"Provider-detected league settings (scoring format), embedded in team responses."},"LeagueSyncResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LeagueSummary"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LeagueSyncResp"},"LineupCheckResp":{"properties":{"team_name":{"type":"string","title":"Team Name"},"issues":{"items":{"$ref":"#/components/schemas/LineupIssueResp"},"type":"array","title":"Issues"},"first_game_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Game Time"},"teams_playing_today":{"items":{"type":"string"},"type":"array","title":"Teams Playing Today"}},"type":"object","required":["team_name","issues","first_game_time","teams_playing_today"],"title":"LineupCheckResp","description":"Lineup check result for a team."},"LineupCheckResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LineupCheckResp"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LineupCheckResponse","description":"API response wrapper for lineup check results."},"LineupEvaluateReq":{"properties":{"team_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Team Id"},"user_id":{"type":"integer","exclusiveMinimum":0.0,"title":"User Id"},"nba_date":{"type":"string","format":"date","title":"Nba Date"},"apply":{"type":"boolean","title":"Apply","default":false}},"type":"object","required":["team_id","user_id","nba_date"],"title":"LineupEvaluateReq"},"LineupEvaluationData":{"properties":{"outcome":{"type":"string","enum":["planned","applied","noop","rejected","failed","skipped"],"title":"Outcome"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"moves":{"items":{"$ref":"#/components/schemas/LineupMoveResult"},"type":"array","title":"Moves","default":[]},"unfilled":{"items":{"$ref":"#/components/schemas/LineupUnfilled"},"type":"array","title":"Unfilled","default":[]},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"scoring_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scoring Period Id"},"nba_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nba Date"},"first_game_time_et":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Game Time Et"},"team_name":{"type":"string","title":"Team Name","default":""},"audit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audit Id"}},"type":"object","required":["outcome","reason","moves","unfilled","verified","scoring_period_id","nba_date","first_game_time_et","team_name","audit_id"],"title":"LineupEvaluationData"},"LineupEvaluationResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LineupEvaluationData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LineupEvaluationResp"},"LineupInfo-Input":{"properties":{"Lineup":{"items":{"$ref":"#/components/schemas/SlimGene-Input"},"type":"array","minItems":1,"title":"Lineup","description":"Lineup must have at least one gene"},"Improvement":{"type":"integer","title":"Improvement","description":"Improvement value"},"Timestamp":{"type":"string","title":"Timestamp","description":"Lineup timestamp"},"Week":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Week","description":"Fantasy week (1-based; 24 weeks in a season, playoffs may extend)"},"StreamingSlots":{"type":"integer","minimum":0.0,"title":"Streamingslots","description":"Number of streaming slots used"},"Id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},"type":"object","required":["Lineup","Improvement","Timestamp","Week","StreamingSlots"],"title":"LineupInfo"},"LineupInfo-Output":{"properties":{"Lineup":{"items":{"$ref":"#/components/schemas/SlimGene-Output"},"type":"array","minItems":1,"title":"Lineup","description":"Lineup must have at least one gene"},"Improvement":{"type":"integer","title":"Improvement","description":"Improvement value"},"Timestamp":{"type":"string","title":"Timestamp","description":"Lineup timestamp"},"Week":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Week","description":"Fantasy week (1-based; 24 weeks in a season, playoffs may extend)"},"StreamingSlots":{"type":"integer","minimum":0.0,"title":"Streamingslots","description":"Number of streaming slots used"},"Id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},"type":"object","required":["Lineup","Improvement","Timestamp","Week","StreamingSlots","Id"],"title":"LineupInfo"},"LineupIssueResp":{"properties":{"issue_type":{"type":"string","title":"Issue Type"},"player_name":{"type":"string","title":"Player Name"},"player_team":{"type":"string","title":"Player Team"},"current_slot":{"type":"string","title":"Current Slot"},"suggested_action":{"type":"string","title":"Suggested Action"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"}},"type":"object","required":["issue_type","player_name","player_team","current_slot","suggested_action","injury_status"],"title":"LineupIssueResp","description":"Single lineup issue."},"LineupMoveReq":{"properties":{"player_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Player Id"},"from_slot_id":{"type":"integer","maximum":15.0,"minimum":0.0,"title":"From Slot Id"},"to_slot_id":{"type":"integer","maximum":15.0,"minimum":0.0,"title":"To Slot Id"}},"type":"object","required":["player_id","from_slot_id","to_slot_id"],"title":"LineupMoveReq"},"LineupMoveResult":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"from_slot_id":{"type":"integer","title":"From Slot Id"},"from_slot":{"type":"string","title":"From Slot"},"to_slot_id":{"type":"integer","title":"To Slot Id"},"to_slot":{"type":"string","title":"To Slot"},"role":{"type":"string","enum":["start","bench","shift"],"title":"Role","default":"shift"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["player_id","name","from_slot_id","from_slot","to_slot_id","to_slot","role","note"],"title":"LineupMoveResult"},"LineupPlanData":{"properties":{"moves":{"items":{"$ref":"#/components/schemas/LineupMoveResult"},"type":"array","title":"Moves","default":[]},"unfilled":{"items":{"$ref":"#/components/schemas/LineupUnfilled"},"type":"array","title":"Unfilled","default":[]},"summary":{"type":"string","title":"Summary"},"scoring_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scoring Period Id"},"nba_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nba Date"},"roster_version":{"type":"string","title":"Roster Version"}},"type":"object","required":["moves","unfilled","summary","scoring_period_id","nba_date","roster_version"],"title":"LineupPlanData"},"LineupPlanResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LineupPlanData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LineupPlanResp"},"LineupPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"},"lineup_slot_id":{"type":"integer","title":"Lineup Slot Id"},"lineup_slot":{"type":"string","title":"Lineup Slot"},"eligible_slot_ids":{"items":{"type":"integer"},"type":"array","title":"Eligible Slot Ids"},"eligible_slots":{"items":{"type":"string"},"type":"array","title":"Eligible Slots"},"injured":{"type":"boolean","title":"Injured","default":false},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"},"default_position_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Position Id"},"lineup_locked":{"type":"boolean","title":"Lineup Locked","default":false},"has_game_today":{"type":"boolean","title":"Has Game Today","default":false},"opponent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opponent"},"game_time_et":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Time Et"},"game_started":{"type":"boolean","title":"Game Started","default":false},"locked":{"type":"boolean","title":"Locked","default":false},"playable":{"type":"boolean","title":"Playable","default":false},"avg_points":{"type":"number","title":"Avg Points","default":0.0},"value_kind":{"type":"string","enum":["fpts","cat_value"],"title":"Value Kind","default":"fpts"},"value_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Source"}},"type":"object","required":["player_id","nba_player_id","name","team","lineup_slot_id","lineup_slot","eligible_slot_ids","eligible_slots","injured","injury_status","default_position_id","lineup_locked","has_game_today","opponent","game_time_et","game_started","locked","playable","avg_points","value_kind","value_source"],"title":"LineupPlayer"},"LineupResponse":{"properties":{"lineup_id":{"type":"integer","title":"Lineup Id"},"lineup_data":{"additionalProperties":true,"type":"object","title":"Lineup Data"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"week":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Week"},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"}},"type":"object","required":["lineup_id","lineup_data","created_at","week","threshold"],"title":"LineupResponse","description":"Lineup data response model"},"LineupSlotDef":{"properties":{"slot_id":{"type":"integer","title":"Slot Id"},"slot":{"type":"string","title":"Slot"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["slot_id","slot","count"],"title":"LineupSlotDef"},"LineupSnapshot":{"properties":{"provider":{"$ref":"#/components/schemas/FantasyProvider"},"provider_league_id":{"type":"string","title":"Provider League Id"},"season":{"type":"integer","title":"Season"},"provider_team_id":{"type":"integer","title":"Provider Team Id"},"team_name":{"type":"string","title":"Team Name"},"scoring_period_id":{"type":"integer","title":"Scoring Period Id"},"nba_date":{"type":"string","title":"Nba Date"},"matchup_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Matchup Period Id"},"opponent_provider_team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Opponent Provider Team Id"},"applied_stat_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Applied Stat Total"},"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captured At"},"source":{"type":"string","enum":["snapshot","provider_history"],"title":"Source"},"players":{"items":{"$ref":"#/components/schemas/LineupSnapshotPlayer"},"type":"array","title":"Players"}},"type":"object","required":["provider","provider_league_id","season","provider_team_id","team_name","scoring_period_id","nba_date","matchup_period_id","opponent_provider_team_id","applied_stat_total","captured_at","source","players"],"title":"LineupSnapshot"},"LineupSnapshotListData":{"properties":{"team_id":{"type":"integer","title":"Team Id"},"provider_team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Provider Team Id"},"from_date":{"type":"string","title":"From Date"},"to_date":{"type":"string","title":"To Date"},"snapshots":{"items":{"$ref":"#/components/schemas/LineupSnapshot"},"type":"array","title":"Snapshots"},"missing_dates":{"items":{"type":"string"},"type":"array","title":"Missing Dates"}},"type":"object","required":["team_id","provider_team_id","from_date","to_date","snapshots","missing_dates"],"title":"LineupSnapshotListData"},"LineupSnapshotListResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LineupSnapshotListData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LineupSnapshotListResp"},"LineupSnapshotPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"},"position":{"type":"string","title":"Position"},"lineup_slot_id":{"type":"integer","title":"Lineup Slot Id"},"lineup_slot":{"type":"string","title":"Lineup Slot"},"eligible_slots":{"items":{"type":"string"},"type":"array","title":"Eligible Slots","default":[]},"injured":{"type":"boolean","title":"Injured","default":false},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"},"applied_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Applied Total"}},"type":"object","required":["player_id","nba_player_id","name","team","position","lineup_slot_id","lineup_slot","eligible_slots","injured","injury_status","applied_total"],"title":"LineupSnapshotPlayer"},"LineupSnapshotResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LineupSnapshot"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LineupSnapshotResp"},"LineupState":{"properties":{"provider":{"$ref":"#/components/schemas/FantasyProvider"},"team_name":{"type":"string","title":"Team Name"},"espn_team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Team Id"},"nba_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nba Date"},"scoring_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scoring Period Id"},"scoring_period_source":{"type":"string","enum":["provider","calendar","none"],"title":"Scoring Period Source","default":"none"},"current_scoring_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Scoring Period Id"},"final_scoring_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Final Scoring Period Id"},"first_game_time_et":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Game Time Et"},"slot_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Slot Counts","default":{}},"slots":{"items":{"$ref":"#/components/schemas/LineupSlotDef"},"type":"array","title":"Slots","default":[]},"position_limits":{"additionalProperties":{"type":"integer"},"type":"object","title":"Position Limits","default":{}},"lock_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Type"},"players":{"items":{"$ref":"#/components/schemas/LineupPlayer"},"type":"array","title":"Players","default":[]},"can_write":{"type":"boolean","title":"Can Write","default":false},"write_blocked_reason":{"anyOf":[{"type":"string","enum":["provider_not_supported","provider_read_only","no_credentials","writes_disabled","no_scoring_period","not_team_owner","team_id_unresolved"]},{"type":"null"}],"title":"Write Blocked Reason"},"roster_version":{"type":"string","title":"Roster Version"},"fetched_at":{"type":"string","title":"Fetched At"},"acquisitions":{"anyOf":[{"$ref":"#/components/schemas/AcquisitionState"},{"type":"null"}]}},"type":"object","required":["provider","team_name","espn_team_id","nba_date","scoring_period_id","scoring_period_source","current_scoring_period_id","final_scoring_period_id","first_game_time_et","slot_counts","slots","position_limits","lock_type","players","can_write","write_blocked_reason","roster_version","fetched_at","acquisitions"],"title":"LineupState"},"LineupStateResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LineupState"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LineupStateResp"},"LineupUnfilled":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"slot":{"type":"string","title":"Slot"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["player_id","name","slot","reason"],"title":"LineupUnfilled","description":"A bench player with a game today the planner could not start."},"LiveMatchupData":{"properties":{"matchup_period":{"type":"integer","title":"Matchup Period"},"matchup_period_start":{"type":"string","title":"Matchup Period Start"},"matchup_period_end":{"type":"string","title":"Matchup Period End"},"your_team":{"$ref":"#/components/schemas/LiveMatchupTeam"},"opponent_team":{"$ref":"#/components/schemas/LiveMatchupTeam"},"projected_winner":{"type":"string","title":"Projected Winner"},"projected_margin":{"type":"number","title":"Projected Margin"},"game_date":{"type":"string","title":"Game Date"},"baseline_stale_days":{"type":"integer","title":"Baseline Stale Days","default":0},"scoring_format":{"type":"string","enum":["points","categories"],"title":"Scoring Format","default":"points"},"settings_synced":{"type":"boolean","title":"Settings Synced","default":false},"category_comparison":{"anyOf":[{"$ref":"#/components/schemas/CategoryComparison"},{"type":"null"}]}},"type":"object","required":["matchup_period","matchup_period_start","matchup_period_end","your_team","opponent_team","projected_winner","projected_margin","game_date","baseline_stale_days","scoring_format","settings_synced","category_comparison"],"title":"LiveMatchupData"},"LiveMatchupPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"},"position":{"type":"string","title":"Position"},"lineup_slot":{"type":"string","title":"Lineup Slot"},"avg_points":{"type":"number","title":"Avg Points"},"projected_points":{"type":"number","title":"Projected Points"},"games_remaining":{"type":"integer","title":"Games Remaining"},"injured":{"type":"boolean","title":"Injured"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"},"live":{"anyOf":[{"$ref":"#/components/schemas/PlayerLiveStats"},{"type":"null"}]}},"type":"object","required":["player_id","nba_player_id","name","team","position","lineup_slot","avg_points","projected_points","games_remaining","injured","injury_status","live"],"title":"LiveMatchupPlayer","description":"MatchupPlayerResp extended with live game stats (None if no game today)."},"LiveMatchupResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LiveMatchupData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LiveMatchupResp"},"LiveMatchupTeam":{"properties":{"team_name":{"type":"string","title":"Team Name"},"team_id":{"type":"integer","title":"Team Id"},"current_score":{"type":"number","title":"Current Score"},"projected_score":{"type":"number","title":"Projected Score"},"roster":{"items":{"$ref":"#/components/schemas/LiveMatchupPlayer"},"type":"array","title":"Roster"},"categories":{"anyOf":[{"$ref":"#/components/schemas/CategoryTeamScore"},{"type":"null"}]}},"type":"object","required":["team_name","team_id","current_score","projected_score","roster","categories"],"title":"LiveMatchupTeam"},"LivePlayerItem":{"properties":{"espn_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Id"},"player_id":{"type":"integer","title":"Player Id"},"player_name":{"type":"string","title":"Player Name"},"game_id":{"type":"string","title":"Game Id"},"game_date":{"type":"string","title":"Game Date"},"game_status":{"type":"integer","title":"Game Status"},"period":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period"},"game_clock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Clock"},"fpts":{"type":"integer","title":"Fpts"},"pts":{"type":"integer","title":"Pts"},"reb":{"type":"integer","title":"Reb"},"ast":{"type":"integer","title":"Ast"},"stl":{"type":"integer","title":"Stl"},"blk":{"type":"integer","title":"Blk"},"tov":{"type":"integer","title":"Tov"},"min":{"type":"integer","title":"Min"},"fgm":{"type":"integer","title":"Fgm"},"fga":{"type":"integer","title":"Fga"},"fg3m":{"type":"integer","title":"Fg3M"},"fg3a":{"type":"integer","title":"Fg3A"},"ftm":{"type":"integer","title":"Ftm"},"fta":{"type":"integer","title":"Fta"},"last_updated":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated"}},"type":"object","required":["espn_id","player_id","player_name","game_id","game_date","game_status","period","game_clock","fpts","pts","reb","ast","stl","blk","tov","min","fgm","fga","fg3m","fg3a","ftm","fta","last_updated"],"title":"LivePlayerItem","description":"One player's current box score from nba.live_player_stats."},"LivePlayersData":{"properties":{"game_date":{"type":"string","title":"Game Date"},"player_count":{"type":"integer","title":"Player Count"},"players":{"items":{"$ref":"#/components/schemas/LivePlayerItem"},"type":"array","title":"Players"}},"type":"object","required":["game_date","player_count","players"],"title":"LivePlayersData"},"LivePlayersResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LivePlayersData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LivePlayersResp","description":"GET /v1/live/players/today"},"LiveScheduleData":{"properties":{"has_games":{"type":"boolean","title":"Has Games"},"game_date":{"type":"string","title":"Game Date"},"first_game_et":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Game Et"},"wake_at_et":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wake At Et"}},"type":"object","required":["has_games","game_date","first_game_et","wake_at_et"],"title":"LiveScheduleData","description":"First-tip info for the cron-runner's live loop.\n\n`first_game_et` / `wake_at_et` are ISO datetimes with offset; both are None\nwhen there are no games or start times have not been loaded yet."},"LiveScheduleResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LiveScheduleData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"LiveScheduleResp","description":"GET /v1/live/schedule/today"},"MarketChanges":{"properties":{"overall_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overall Rank","description":"Positive means the player improved to an earlier ESPN editorial rank"},"adp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adp","description":"Positive means the player improved to an earlier average draft position"},"auction_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auction Value","description":"Positive means ESPN's editorial auction value increased"},"auction_value_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auction Value Avg","description":"Positive means the average ESPN auction price increased"}},"type":"object","required":["overall_rank","adp","auction_value","auction_value_avg"],"title":"MarketChanges"},"MarketMeasurements":{"properties":{"overall_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overall Rank"},"adp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adp"},"auction_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auction Value"},"auction_value_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auction Value Avg"}},"type":"object","required":["overall_rank","adp","auction_value","auction_value_avg"],"title":"MarketMeasurements"},"MatchupData":{"properties":{"matchup_period":{"type":"integer","title":"Matchup Period"},"matchup_period_start":{"type":"string","title":"Matchup Period Start"},"matchup_period_end":{"type":"string","title":"Matchup Period End"},"your_team":{"$ref":"#/components/schemas/MatchupTeamResp"},"opponent_team":{"$ref":"#/components/schemas/MatchupTeamResp"},"projected_winner":{"type":"string","title":"Projected Winner"},"projected_margin":{"type":"number","title":"Projected Margin"},"scoring_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scoring Period Id"},"scoring_period_source":{"type":"string","enum":["provider","calendar","unknown"],"title":"Scoring Period Source","default":"unknown"},"schedule_week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schedule Week"},"scoring_format":{"type":"string","enum":["points","categories"],"title":"Scoring Format","default":"points"},"settings_synced":{"type":"boolean","title":"Settings Synced","default":false},"category_comparison":{"anyOf":[{"$ref":"#/components/schemas/CategoryComparison"},{"type":"null"}]},"projected_category_comparison":{"anyOf":[{"$ref":"#/components/schemas/CategoryComparison"},{"type":"null"}]}},"type":"object","required":["matchup_period","matchup_period_start","matchup_period_end","your_team","opponent_team","projected_winner","projected_margin","scoring_period_id","scoring_period_source","schedule_week","scoring_format","settings_synced","category_comparison","projected_category_comparison"],"title":"MatchupData","description":"Complete matchup data structure"},"MatchupPlayerResp":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"},"position":{"type":"string","title":"Position"},"lineup_slot":{"type":"string","title":"Lineup Slot"},"avg_points":{"type":"number","title":"Avg Points"},"projected_points":{"type":"number","title":"Projected Points"},"games_remaining":{"type":"integer","title":"Games Remaining"},"injured":{"type":"boolean","title":"Injured"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"}},"type":"object","required":["player_id","nba_player_id","name","team","position","lineup_slot","avg_points","projected_points","games_remaining","injured","injury_status"],"title":"MatchupPlayerResp","description":"Player data within a matchup context"},"MatchupReq":{"properties":{"league_info":{"$ref":"#/components/schemas/LeagueInfo"},"avg_window":{"type":"string","pattern":"^(season|last_7|last_14|last_30)$","title":"Avg Window","description":"Averaging window for projections: season, last_7, last_14, or last_30","default":"season"}},"type":"object","required":["league_info"],"title":"MatchupReq","description":"Request for getting matchup data"},"MatchupResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/MatchupData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"MatchupResp","description":"Response containing matchup data"},"MatchupScoreHistory":{"properties":{"team_id":{"type":"integer","title":"Team Id"},"team_name":{"type":"string","title":"Team Name"},"opponent_team_name":{"type":"string","title":"Opponent Team Name"},"matchup_period":{"type":"integer","title":"Matchup Period"},"history":{"items":{"$ref":"#/components/schemas/DailyScorePoint"},"type":"array","title":"History"},"scoring_format":{"type":"string","enum":["points","categories"],"title":"Scoring Format","default":"points"}},"type":"object","required":["team_id","team_name","opponent_team_name","matchup_period","history","scoring_format"],"title":"MatchupScoreHistory","description":"Historical score data for a matchup period"},"MatchupScoreHistoryResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/MatchupScoreHistory"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"MatchupScoreHistoryResp","description":"Response containing matchup score history"},"MatchupTeamResp":{"properties":{"team_name":{"type":"string","title":"Team Name"},"team_id":{"type":"integer","title":"Team Id"},"current_score":{"type":"number","title":"Current Score"},"projected_score":{"type":"number","title":"Projected Score"},"roster":{"items":{"$ref":"#/components/schemas/MatchupPlayerResp"},"type":"array","title":"Roster"},"categories":{"anyOf":[{"$ref":"#/components/schemas/CategoryTeamScore"},{"type":"null"}]}},"type":"object","required":["team_name","team_id","current_score","projected_score","roster","categories"],"title":"MatchupTeamResp","description":"Team data within a matchup"},"MockAdvanceRequest":{"properties":{"until":{"type":"string","enum":["my_turn","end"],"title":"Until","description":"`my_turn`: run the other seats up to — not including — your next pick, so the room lands on the clock with the board already scored. When you have no turn left, it runs to the end, which is how a mock finishes on this button alone.\n\n`end`: run every remaining pick, yours included — the autopicker plays your seat exactly as it plays the others, and those picks are recorded as yours.","default":"my_turn"}},"type":"object","title":"MockAdvanceRequest","description":"How far to play the draft forward."},"MockAdvanceResp":{"properties":{"session":{"$ref":"#/components/schemas/DraftSessionResp","description":"The room after the advance, with every pick — the newly simulated ones are those with `from_pick <= overall_pick` (and `< stopped_at`, when the run stopped short)"},"picks_made":{"type":"integer","title":"Picks Made","description":"Picks the autopicker recorded on this call"},"until":{"type":"string","enum":["my_turn","end"],"title":"Until"},"from_pick":{"type":"integer","title":"From Pick","description":"The pick the autopicker started at — the draft front when it was called"},"stopped_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stopped At","description":"The first pick the autopicker did not make: your next pick under `my_turn`, or the pick it could not fill when the pool or a cap stopped it. Null when it ran the draft out."},"stopped_reason":{"type":"string","enum":["my_turn","end","pool_exhausted","cap_blocked"],"title":"Stopped Reason","description":"`my_turn`/`end`: it reached where it was going. `pool_exhausted`: nothing draftable was left. `cap_blocked`: players were left, but every one would break the seat on the clock's hard position caps — the autopicker stops rather than breach one."},"completed":{"type":"boolean","title":"Completed","description":"The session auto-completed on this advance"},"fallback":{"type":"boolean","title":"Fallback","description":"The seats drafted by CV value because the season has no market snapshot yet, not by ADP. True exactly when `market_as_of` is null."},"market_as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Market As Of","description":"Snapshot date of the ADP the seats drafted from"}},"type":"object","required":["session","picks_made","until","from_pick","stopped_at","stopped_reason","completed","fallback","market_as_of"],"title":"MockAdvanceResp","description":"What the autopicker did, and the room it left behind."},"MockAdvanceResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/MockAdvanceResp"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"MockAdvanceResponse","description":"The advanced room."},"NBATeamLiveGameData":{"properties":{"game_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Id"},"game_date":{"type":"string","title":"Game Date"},"home_team":{"type":"string","title":"Home Team"},"away_team":{"type":"string","title":"Away Team"},"home_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Home Score"},"away_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Away Score"},"status":{"type":"string","title":"Status"},"period":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period"},"game_clock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Clock"},"start_time_et":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Time Et"},"arena":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arena"},"home_periods":{"items":{"type":"integer"},"type":"array","title":"Home Periods"},"away_periods":{"items":{"type":"integer"},"type":"array","title":"Away Periods"},"home_top_performers":{"items":{"$ref":"#/components/schemas/TopPerformer"},"type":"array","title":"Home Top Performers"},"away_top_performers":{"items":{"$ref":"#/components/schemas/TopPerformer"},"type":"array","title":"Away Top Performers"},"injured_players":{"items":{"$ref":"#/components/schemas/InjuredPlayer"},"type":"array","title":"Injured Players"},"is_today":{"type":"boolean","title":"Is Today","default":false},"is_upcoming":{"type":"boolean","title":"Is Upcoming","default":false},"score_history":{"items":{"$ref":"#/components/schemas/GameScoreSnapshot"},"type":"array","title":"Score History"}},"type":"object","required":["game_id","game_date","home_team","away_team","home_score","away_score","status","period","game_clock","start_time_et","arena","home_periods","away_periods","home_top_performers","away_top_performers","injured_players","is_today","is_upcoming","score_history"],"title":"NBATeamLiveGameData","description":"Current, most recent, or upcoming game for an NBA team."},"NBATeamLiveGameResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/NBATeamLiveGameData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"NBATeamLiveGameResp","description":"Response for GET /v1/teams/{abbrev}/live-game."},"NBATeamRosterData":{"properties":{"team":{"type":"string","title":"Team"},"team_name":{"type":"string","title":"Team Name"},"players":{"items":{"$ref":"#/components/schemas/NBATeamRosterPlayer"},"type":"array","title":"Players"},"as_of_date":{"type":"string","title":"As Of Date"},"season":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Season","description":"Season supplying the roster's last known team assignments and statistics"}},"type":"object","required":["team","team_name","players","as_of_date","season"],"title":"NBATeamRosterData","description":"Roster data for an NBA team."},"NBATeamRosterPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"gp":{"type":"integer","title":"Gp"},"pts":{"type":"number","title":"Pts"},"reb":{"type":"number","title":"Reb"},"ast":{"type":"number","title":"Ast"},"stl":{"type":"number","title":"Stl"},"blk":{"type":"number","title":"Blk"},"tov":{"type":"number","title":"Tov"},"fpts":{"type":"number","title":"Fpts"},"fg_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fg Pct"},"fg3_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fg3 Pct"},"ft_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ft Pct"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"}},"type":"object","required":["player_id","name","position","gp","pts","reb","ast","stl","blk","tov","fpts","fg_pct","fg3_pct","ft_pct","injury_status"],"title":"NBATeamRosterPlayer","description":"Player on an NBA team roster with per-game averages."},"NBATeamRosterResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/NBATeamRosterData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"NBATeamRosterResp","description":"Response for GET /v1/teams/{abbrev}/roster."},"NBATeamStatsData":{"properties":{"team":{"type":"string","title":"Team"},"team_name":{"type":"string","title":"Team Name"},"conference":{"type":"string","title":"Conference"},"division":{"type":"string","title":"Division"},"as_of_date":{"type":"string","title":"As Of Date"},"season":{"type":"string","title":"Season"},"gp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gp"},"w":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"W"},"l":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"L"},"w_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"W Pct"},"pts":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pts"},"reb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reb"},"ast":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ast"},"stl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stl"},"blk":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Blk"},"tov":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tov"},"fg_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fg Pct"},"fg3_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fg3 Pct"},"ft_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ft Pct"},"off_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Off Rating"},"def_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Def Rating"},"net_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Rating"},"pace":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pace"},"ts_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ts Pct"},"efg_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Efg Pct"},"pie":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pie"}},"type":"object","required":["team","team_name","conference","division","as_of_date","season","gp","w","l","w_pct","pts","reb","ast","stl","blk","tov","fg_pct","fg3_pct","ft_pct","off_rating","def_rating","net_rating","pace","ts_pct","efg_pct","pie"],"title":"NBATeamStatsData","description":"Season-to-date stats for an NBA team."},"NBATeamStatsResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/NBATeamStatsData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"NBATeamStatsResp","description":"Response for GET /v1/teams/{abbrev}/stats."},"NotificationPreferenceReq":{"properties":{"lineup_alerts_enabled":{"type":"boolean","title":"Lineup Alerts Enabled","default":true},"alert_benched_starters":{"type":"boolean","title":"Alert Benched Starters","default":true},"alert_active_non_playing":{"type":"boolean","title":"Alert Active Non Playing","default":true},"alert_injured_active":{"type":"boolean","title":"Alert Injured Active","default":true},"alert_minutes_before":{"type":"integer","maximum":150.0,"minimum":15.0,"title":"Alert Minutes Before","default":90},"auto_lineup_enabled":{"type":"boolean","title":"Auto Lineup Enabled","default":false},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"NotificationPreferenceReq","description":"Request model for creating/updating notification preferences."},"NotificationPreferenceResp":{"properties":{"lineup_alerts_enabled":{"type":"boolean","title":"Lineup Alerts Enabled","default":false},"alert_benched_starters":{"type":"boolean","title":"Alert Benched Starters","default":true},"alert_active_non_playing":{"type":"boolean","title":"Alert Active Non Playing","default":true},"alert_injured_active":{"type":"boolean","title":"Alert Injured Active","default":true},"alert_minutes_before":{"type":"integer","maximum":150.0,"minimum":15.0,"title":"Alert Minutes Before","default":90},"auto_lineup_enabled":{"type":"boolean","title":"Auto Lineup Enabled","default":false},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["lineup_alerts_enabled","alert_benched_starters","alert_active_non_playing","alert_injured_active","alert_minutes_before","auto_lineup_enabled","email"],"title":"NotificationPreferenceResp","description":"Notification preference data."},"NotificationPreferenceResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/NotificationPreferenceResp"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"NotificationPreferenceResponse","description":"API response wrapper for notification preferences."},"NotificationTeamPreferenceListResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/NotificationTeamPreferenceResp"},"type":"array"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"NotificationTeamPreferenceListResponse","description":"API response wrapper for listing team preference overrides."},"NotificationTeamPreferenceReq":{"properties":{"lineup_alerts_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lineup Alerts Enabled"},"alert_benched_starters":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert Benched Starters"},"alert_active_non_playing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert Active Non Playing"},"alert_injured_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert Injured Active"},"alert_minutes_before":{"anyOf":[{"type":"integer","maximum":150.0,"minimum":15.0},{"type":"null"}],"title":"Alert Minutes Before"},"auto_lineup_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Lineup Enabled"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"NotificationTeamPreferenceReq","description":"Request model — all fields optional; only supplied fields are overridden."},"NotificationTeamPreferenceResp":{"properties":{"team_id":{"type":"integer","title":"Team Id"},"has_override":{"type":"boolean","title":"Has Override"},"lineup_alerts_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lineup Alerts Enabled"},"alert_benched_starters":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert Benched Starters"},"alert_active_non_playing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert Active Non Playing"},"alert_injured_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Alert Injured Active"},"alert_minutes_before":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Alert Minutes Before"},"auto_lineup_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Lineup Enabled"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["team_id","has_override","lineup_alerts_enabled","alert_benched_starters","alert_active_non_playing","alert_injured_active","alert_minutes_before","auto_lineup_enabled","email"],"title":"NotificationTeamPreferenceResp","description":"Team-level notification preference override data."},"NotificationTeamPreferenceSingleResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/NotificationTeamPreferenceResp"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"NotificationTeamPreferenceSingleResponse","description":"API response wrapper for a single team preference override."},"OptimizeData":{"properties":{"week":{"type":"integer","title":"Week","description":"Fantasy week"},"projected_total_fpts":{"type":"number","title":"Projected Total Fpts","description":"Total projected fpts for week"},"daily_lineups":{"items":{"$ref":"#/components/schemas/OptimizedDay"},"type":"array","title":"Daily Lineups","description":"Optimized lineup for each day","default":[]},"recommended_moves":{"items":{"$ref":"#/components/schemas/RecommendedMove"},"type":"array","title":"Recommended Moves","description":"Recommended roster moves","default":[]},"optimization_notes":{"items":{"type":"string"},"type":"array","title":"Optimization Notes","description":"Additional notes about optimization","default":[]}},"type":"object","required":["week","projected_total_fpts","daily_lineups","recommended_moves","optimization_notes"],"title":"OptimizeData","description":"Response data for lineup optimization."},"OptimizeResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/OptimizeData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"OptimizeResp","description":"Response for POST /v1/analytics/generate-lineup."},"OptimizedDay":{"properties":{"date":{"type":"string","title":"Date","description":"Date (YYYY-MM-DD)"},"active_players":{"items":{"type":"string"},"type":"array","title":"Active Players","description":"Player names in active slots"},"bench_players":{"items":{"type":"string"},"type":"array","title":"Bench Players","description":"Player names on bench"},"projected_fpts":{"type":"number","title":"Projected Fpts","description":"Projected fantasy points"}},"type":"object","required":["date","active_players","bench_players","projected_fpts"],"title":"OptimizedDay","description":"Optimized lineup for a single day."},"OwnershipTrend":{"properties":{"current":{"type":"number","title":"Current","description":"Current ownership percentage"},"change_7d":{"type":"number","title":"Change 7D","description":"Change over last 7 days"}},"type":"object","required":["current","change_7d"],"title":"OwnershipTrend","description":"Ownership trend data."},"OwnershipTrendingData":{"properties":{"days":{"type":"integer","title":"Days","description":"Lookback period in days"},"min_ownership":{"type":"number","title":"Min Ownership","description":"Minimum ownership filter applied"},"sort_by":{"type":"string","title":"Sort By","description":"Sort method used (velocity or change)"},"trending_up":{"items":{"$ref":"#/components/schemas/TrendingPlayer"},"type":"array","title":"Trending Up","description":"Players with rising ownership"},"trending_down":{"items":{"$ref":"#/components/schemas/TrendingPlayer"},"type":"array","title":"Trending Down","description":"Players with falling ownership"}},"type":"object","required":["days","min_ownership","sort_by","trending_up","trending_down"],"title":"OwnershipTrendingData","description":"Response data for ownership trending."},"OwnershipTrendingResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/OwnershipTrendingData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"OwnershipTrendingResp","description":"Response for GET /v1/ownership/trending."},"PageTarget":{"properties":{"type":{"type":"string","const":"page","title":"Type","default":"page"},"page":{"type":"string","enum":["rankings","streamers","matchup","lineup-generation","your-teams","draft","playoffs"],"title":"Page"},"team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Id","description":"Set as the selected team before navigating"},"rankings":{"anyOf":[{"$ref":"#/components/schemas/RankingsParams"},{"type":"null"}],"description":"Only when page is rankings"}},"type":"object","required":["type","page","team_id","rankings"],"title":"PageTarget","description":"Navigate to a page, optionally selecting one of the caller's teams first."},"PercentileData":{"properties":{"avg_fpts":{"type":"integer","title":"Avg Fpts"},"avg_points":{"type":"integer","title":"Avg Points"},"avg_rebounds":{"type":"integer","title":"Avg Rebounds"},"avg_assists":{"type":"integer","title":"Avg Assists"},"avg_steals":{"type":"integer","title":"Avg Steals"},"avg_blocks":{"type":"integer","title":"Avg Blocks"},"avg_turnovers":{"type":"integer","title":"Avg Turnovers"},"avg_minutes":{"type":"integer","title":"Avg Minutes"},"avg_fg_pct":{"type":"integer","title":"Avg Fg Pct"},"avg_fg3_pct":{"type":"integer","title":"Avg Fg3 Pct"},"avg_ft_pct":{"type":"integer","title":"Avg Ft Pct"},"avg_fg3m":{"type":"integer","title":"Avg Fg3M"}},"type":"object","required":["avg_fpts","avg_points","avg_rebounds","avg_assists","avg_steals","avg_blocks","avg_turnovers","avg_minutes","avg_fg_pct","avg_fg3_pct","avg_ft_pct","avg_fg3m"],"title":"PercentileData"},"PickupExecuteData":{"properties":{"due":{"type":"integer","title":"Due"},"results":{"items":{"$ref":"#/components/schemas/PickupResult"},"type":"array","title":"Results","default":[]},"lanes":{"items":{"$ref":"#/components/schemas/LaneNotice"},"type":"array","title":"Lanes","default":[]}},"type":"object","required":["due","results","lanes"],"title":"PickupExecuteData"},"PickupExecuteReq":{"properties":{"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":4},"now":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Now"}},"type":"object","title":"PickupExecuteReq"},"PickupExecuteResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PickupExecuteData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PickupExecuteResp"},"PickupLane":{"properties":{"lane_id":{"type":"integer","title":"Lane Id"},"notify":{"type":"string","enum":["email","desk"],"title":"Notify"},"projected":{"anyOf":[{"$ref":"#/components/schemas/ScheduledPickupPlayer"},{"type":"null"}]},"why":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Why"},"last_day":{"type":"boolean","title":"Last Day","default":false}},"type":"object","required":["lane_id","notify","projected","why","last_day"],"title":"PickupLane","description":"A stream lane's pickup, for its email: the lane, whether it emails at all, and how the\nmove compares with the projection shown before it."},"PickupResult":{"properties":{"pickup_id":{"type":"integer","title":"Pickup Id"},"team_id":{"type":"integer","title":"Team Id"},"user_id":{"type":"integer","title":"User Id"},"team_name":{"type":"string","title":"Team Name","default":""},"outcome":{"type":"string","enum":["executed","skipped","failed","expired","deferred"],"title":"Outcome"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"add":{"$ref":"#/components/schemas/ScheduledPickupPlayer"},"drop":{"anyOf":[{"$ref":"#/components/schemas/ScheduledPickupPlayer"},{"type":"null"}]},"nba_date":{"type":"string","format":"date","title":"Nba Date"},"scoring_period_id":{"type":"integer","title":"Scoring Period Id"},"seated_slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seated Slot"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"audit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audit Id"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"lane":{"anyOf":[{"$ref":"#/components/schemas/PickupLane"},{"type":"null"}]}},"type":"object","required":["pickup_id","team_id","user_id","team_name","outcome","reason","detail","add","drop","nba_date","scoring_period_id","seated_slot","verified","audit_id","next_attempt_at","lane"],"title":"PickupResult"},"PlayerGamesData":{"properties":{"player_id":{"type":"integer","title":"Player Id","description":"NBA player ID"},"player_name":{"type":"string","title":"Player Name","description":"Player name"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team","description":"Current team abbreviation"},"games":{"items":{"$ref":"#/components/schemas/GameLog"},"type":"array","title":"Games","description":"List of games"},"total_games":{"type":"integer","title":"Total Games","description":"Number of games in response"}},"type":"object","required":["player_id","player_name","team","games","total_games"],"title":"PlayerGamesData","description":"Response data for a player's game log."},"PlayerGamesResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayerGamesData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayerGamesResp","description":"Response for GET /v1/players/{id}/games."},"PlayerInput":{"properties":{"id":{"type":"integer","title":"Id","description":"ESPN player ID"},"name":{"type":"string","title":"Name","description":"Player name"},"team":{"type":"string","title":"Team","description":"Team abbreviation"},"position":{"type":"string","title":"Position","description":"Player position (PG, SG, SF, PF, C)"},"avg_fpts":{"type":"number","title":"Avg Fpts","description":"Average fantasy points"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status","description":"Injury status if any"}},"type":"object","required":["id","name","team","position","avg_fpts","injury_status"],"title":"PlayerInput","description":"Player data for optimization input."},"PlayerListItem":{"properties":{"id":{"type":"integer","title":"Id","description":"NBA player ID"},"espn_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Id","description":"ESPN player ID"},"name":{"type":"string","title":"Name","description":"Player name"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team","description":"Team abbreviation"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position","description":"Player position"},"games_played":{"type":"integer","title":"Games Played","description":"Games played this season"},"avg_fpts":{"type":"number","title":"Avg Fpts","description":"Average fantasy points per game"},"rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rank","description":"Current fantasy ranking"}},"type":"object","required":["id","espn_id","name","team","position","games_played","avg_fpts","rank"],"title":"PlayerListItem","description":"Individual player in the players list."},"PlayerLiveStats":{"properties":{"nba_player_id":{"type":"integer","title":"Nba Player Id"},"live_fpts":{"type":"number","title":"Live Fpts"},"live_pts":{"type":"integer","title":"Live Pts"},"live_reb":{"type":"integer","title":"Live Reb"},"live_ast":{"type":"integer","title":"Live Ast"},"live_stl":{"type":"integer","title":"Live Stl"},"live_blk":{"type":"integer","title":"Live Blk"},"live_tov":{"type":"integer","title":"Live Tov"},"live_min":{"type":"integer","title":"Live Min"},"live_fgm":{"type":"integer","title":"Live Fgm","default":0},"live_fga":{"type":"integer","title":"Live Fga","default":0},"live_fg3m":{"type":"integer","title":"Live Fg3M","default":0},"live_fg3a":{"type":"integer","title":"Live Fg3A","default":0},"live_ftm":{"type":"integer","title":"Live Ftm","default":0},"live_fta":{"type":"integer","title":"Live Fta","default":0},"game_status":{"type":"integer","title":"Game Status"},"period":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period"},"game_clock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Clock"},"last_updated":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated"}},"type":"object","required":["nba_player_id","live_fpts","live_pts","live_reb","live_ast","live_stl","live_blk","live_tov","live_min","live_fgm","live_fga","live_fg3m","live_fg3a","live_ftm","live_fta","game_status","period","game_clock","last_updated"],"title":"PlayerLiveStats","description":"Live in-game stat overlay for a player (from live_player_stats table)."},"PlayerOwnershipData":{"properties":{"current_ownership":{"type":"number","title":"Current Ownership"},"prev_ownership":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prev Ownership"},"change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change"},"snapshot_date":{"type":"string","title":"Snapshot Date"}},"type":"object","required":["current_ownership","prev_ownership","change","snapshot_date"],"title":"PlayerOwnershipData"},"PlayerOwnershipResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayerOwnershipData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayerOwnershipResp"},"PlayerPercentilesResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PercentileData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayerPercentilesResp"},"PlayerProfileData":{"properties":{"id":{"type":"integer","title":"Id","description":"NBA player ID"},"espn_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Id","description":"ESPN player ID, when mapped"},"name":{"type":"string","title":"Name"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position","description":"Position from the player dimension"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"UTC timestamp when the player identity was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"UTC timestamp when the player identity was last updated"},"profile":{"anyOf":[{"$ref":"#/components/schemas/PlayerProfileDetails"},{"type":"null"}],"description":"Biographical/profile snapshot; null until the profile pipeline has supplied one"}},"type":"object","required":["id","espn_id","name","position","created_at","updated_at","profile"],"title":"PlayerProfileData","description":"Player identity plus its optional profile snapshot."},"PlayerProfileDetails":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"birthdate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthdate"},"height":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Height","description":"NBA height text, for example \"6-11\""},"height_inches":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height Inches"},"weight":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weight","description":"Weight in pounds"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"jersey_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jersey Number"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team","description":"Team abbreviation at profile refresh time; not a current-roster guarantee"},"draft_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Year"},"draft_round":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Round"},"draft_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Number","description":"Overall draft pick"},"season_exp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Season Exp"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"school":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School"},"from_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"From Year"},"to_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"To Year"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"UTC timestamp of this profile snapshot"}},"type":"object","required":["first_name","last_name","birthdate","height","height_inches","weight","position","jersey_number","team","draft_year","draft_round","draft_number","season_exp","country","school","from_year","to_year","updated_at"],"title":"PlayerProfileDetails","description":"The optional ``nba.player_profiles`` row for a player identity."},"PlayerProfileResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayerProfileData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayerProfileResp","description":"Response for GET /v1/players/{player_id}/profile."},"PlayerProjectionData":{"properties":{"player_id":{"type":"integer","title":"Player Id","description":"NBA player ID"},"espn_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Id"},"name":{"type":"string","title":"Name"},"season":{"type":"string","title":"Season"},"source":{"type":"string","const":"espn","title":"Source","default":"espn"},"as_of_date":{"type":"string","format":"date","title":"As Of Date"},"projected_gp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Projected Gp"},"stats":{"$ref":"#/components/schemas/ProjectionStats"}},"type":"object","required":["player_id","espn_id","name","season","source","as_of_date","projected_gp","stats"],"title":"PlayerProjectionData"},"PlayerProjectionResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayerProjectionData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayerProjectionResp"},"PlayerProjectionsData":{"properties":{"season":{"type":"string","title":"Season"},"source":{"type":"string","const":"espn","title":"Source","default":"espn"},"as_of_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of Date"},"players":{"items":{"$ref":"#/components/schemas/PlayerProjectionData"},"type":"array","title":"Players"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["season","source","as_of_date","players","total","limit","offset"],"title":"PlayerProjectionsData"},"PlayerProjectionsResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayerProjectionsData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayerProjectionsResp"},"PlayerResp":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"avg_points":{"type":"number","title":"Avg Points"},"team":{"type":"string","title":"Team"},"valid_positions":{"items":{"type":"string"},"type":"array","title":"Valid Positions"},"injured":{"type":"boolean","title":"Injured"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"},"value_kind":{"type":"string","enum":["fpts","cat_value"],"title":"Value Kind","default":"fpts"},"value_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Source"},"acquisition_status":{"anyOf":[{"type":"string","enum":["free_agent","waivers"]},{"type":"null"}],"title":"Acquisition Status"},"waivers_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Waivers Until"},"default_position_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Position Id"}},"type":"object","required":["player_id","name","avg_points","team","valid_positions","injured","injury_status","value_kind","value_source","acquisition_status","waivers_until","default_position_id"],"title":"PlayerResp"},"PlayerScheduleInfo":{"properties":{"game_days":{"items":{"type":"integer"},"type":"array","title":"Game Days"},"games_remaining":{"type":"integer","title":"Games Remaining"},"has_b2b":{"type":"boolean","title":"Has B2B"}},"type":"object","required":["game_days","games_remaining","has_b2b"],"title":"PlayerScheduleInfo","description":"Schedule info for a player's NBA team in the current matchup."},"PlayerSearchData":{"properties":{"query":{"type":"string","title":"Query"},"players":{"items":{"$ref":"#/components/schemas/PlayerSearchItem"},"type":"array","title":"Players"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["query","players","total","limit","offset"],"title":"PlayerSearchData"},"PlayerSearchItem":{"properties":{"id":{"type":"integer","title":"Id","description":"NBA player ID"},"espn_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Id","description":"ESPN player ID, when mapped"},"name":{"type":"string","title":"Name"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team","description":"Team abbreviation from the player-profile snapshot; not a current-roster guarantee"},"player_updated_at":{"type":"string","format":"date-time","title":"Player Updated At","description":"UTC timestamp of the player identity row"},"profile_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Profile Updated At","description":"UTC timestamp of the joined profile snapshot, or null when no profile is stored"}},"type":"object","required":["id","espn_id","name","position","team","player_updated_at","profile_updated_at"],"title":"PlayerSearchItem","description":"Minimal dimension-backed player identity for search results."},"PlayerSearchResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayerSearchData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayerSearchResp","description":"Response for GET /v1/players/search."},"PlayerStats":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"},"games_played":{"type":"integer","title":"Games Played"},"window":{"type":"string","title":"Window"},"window_games":{"type":"integer","title":"Window Games"},"avg_stats":{"$ref":"#/components/schemas/AvgStats"},"advanced_stats":{"anyOf":[{"$ref":"#/components/schemas/AdvancedStatsData"},{"type":"null"}]},"game_logs":{"items":{"$ref":"#/components/schemas/GameLog"},"type":"array","title":"Game Logs"}},"type":"object","required":["id","name","team","games_played","window","window_games","avg_stats","advanced_stats","game_logs"],"title":"PlayerStats"},"PlayerStatsResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayerStats"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayerStatsResp"},"PlayerStatusData":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"injury_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Type"},"injury_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Detail"},"expected_return":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Return"},"report_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Date"},"report_age_days":{"type":"integer","title":"Report Age Days"}},"type":"object","required":["status","injury_type","injury_detail","expected_return","report_date","report_age_days"],"title":"PlayerStatusData"},"PlayerStatusResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayerStatusData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayerStatusResp"},"PlayerTrendsData":{"properties":{"player_id":{"type":"integer","title":"Player Id","description":"NBA player ID"},"player_name":{"type":"string","title":"Player Name","description":"Player name"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team","description":"Current team abbreviation"},"current_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Rank","description":"Current fantasy ranking"},"trends":{"additionalProperties":{"$ref":"#/components/schemas/TrendPeriod"},"type":"object","title":"Trends","description":"Trend data for different periods (last_7_days, last_14_days, last_30_days)"},"ownership":{"anyOf":[{"$ref":"#/components/schemas/OwnershipTrend"},{"type":"null"}],"description":"Ownership trend data"}},"type":"object","required":["player_id","player_name","team","current_rank","trends","ownership"],"title":"PlayerTrendsData","description":"Response data for player trends."},"PlayerTrendsResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayerTrendsData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayerTrendsResp","description":"Response for GET /v1/players/{id}/trends."},"PlayersListData":{"properties":{"players":{"items":{"$ref":"#/components/schemas/PlayerListItem"},"type":"array","title":"Players","description":"List of players"},"total":{"type":"integer","title":"Total","description":"Total number of players matching filters"},"limit":{"type":"integer","title":"Limit","description":"Number of results returned"},"offset":{"type":"integer","title":"Offset","description":"Offset from start"},"season":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Season","description":"Season actually served (may be the previous season before opening night)"},"as_of_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of Date","description":"Newest snapshot date in the selected season"}},"type":"object","required":["players","total","limit","offset","season","as_of_date"],"title":"PlayersListData","description":"Response data for player list."},"PlayersListResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayersListData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayersListResp","description":"Response for GET /v1/players."},"PlayoffBracketData":{"properties":{"season":{"type":"string","title":"Season"},"rounds":{"items":{"$ref":"#/components/schemas/PlayoffRound"},"type":"array","title":"Rounds"}},"type":"object","required":["season","rounds"],"title":"PlayoffBracketData"},"PlayoffBracketResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/PlayoffBracketData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"PlayoffBracketResp"},"PlayoffRound":{"properties":{"round_num":{"type":"integer","title":"Round Num"},"round_name":{"type":"string","title":"Round Name"},"series":{"items":{"$ref":"#/components/schemas/PlayoffSeriesResp"},"type":"array","title":"Series"}},"type":"object","required":["round_num","round_name","series"],"title":"PlayoffRound"},"PlayoffSeriesResp":{"properties":{"series_id":{"type":"string","title":"Series Id"},"conference":{"type":"string","title":"Conference"},"round_num":{"type":"integer","title":"Round Num"},"top_seed_team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top Seed Team Id"},"top_seed_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Seed Name"},"top_seed_abbr":{"type":"string","title":"Top Seed Abbr"},"top_seed_wins":{"type":"integer","title":"Top Seed Wins"},"bottom_seed_team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bottom Seed Team Id"},"bottom_seed_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bottom Seed Name"},"bottom_seed_abbr":{"type":"string","title":"Bottom Seed Abbr"},"bottom_seed_wins":{"type":"integer","title":"Bottom Seed Wins"},"series_complete":{"type":"boolean","title":"Series Complete"},"series_leader_abbr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Series Leader Abbr"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["series_id","conference","round_num","top_seed_team_id","top_seed_name","top_seed_abbr","top_seed_wins","bottom_seed_team_id","bottom_seed_name","bottom_seed_abbr","bottom_seed_wins","series_complete","series_leader_abbr","updated_at"],"title":"PlayoffSeriesResp"},"ProjectionStats":{"properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min"},"pts":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pts"},"reb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reb"},"ast":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ast"},"stl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stl"},"blk":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Blk"},"tov":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tov"},"fgm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fgm"},"fga":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fga"},"fg3m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fg3M"},"fg3a":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fg3A"},"ftm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ftm"},"fta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fta"},"fg_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fg Pct","description":"Projected FGM / FGA (0–1); null without positive attempts"},"fg3_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fg3 Pct","description":"Projected 3PM / 3PA (0–1); null without positive attempts"},"ft_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ft Pct","description":"Projected FTM / FTA (0–1); null without positive attempts"}},"type":"object","required":["min","pts","reb","ast","stl","blk","tov","fgm","fga","fg3m","fg3a","ftm","fta","fg_pct","fg3_pct","ft_pct"],"title":"ProjectionStats","description":"Per-game projections. Shooting rates use a 0–1 scale."},"ProviderCapabilitiesResp":{"properties":{"lineup_read":{"type":"boolean","title":"Lineup Read"},"lineup_write":{"type":"boolean","title":"Lineup Write"},"transactions":{"type":"boolean","title":"Transactions"},"waiver_claims":{"type":"boolean","title":"Waiver Claims"},"position_limits":{"type":"boolean","title":"Position Limits"},"live_totals":{"type":"boolean","title":"Live Totals"},"daily_lineups":{"type":"boolean","title":"Daily Lineups"},"account_teams":{"type":"boolean","title":"Account Teams"},"draft_sync":{"type":"boolean","title":"Draft Sync"},"draft_import":{"type":"boolean","title":"Draft Import"},"write_scope":{"type":"boolean","title":"Write Scope"}},"type":"object","required":["lineup_read","lineup_write","transactions","waiver_claims","position_limits","live_totals","daily_lineups","account_teams","draft_sync","draft_import","write_scope"],"title":"ProviderCapabilitiesResp","description":"What this team's provider can do for it (services.providers.capabilities).\n\nThe client reads these instead of branching on the provider name: a\nfeature is offered when its capability is true and renders the empty state\nwith `write_blocked_reason` otherwise."},"ProviderConnectionDeleteData":{"properties":{"id":{"type":"integer","title":"Id"},"unlinked_team_ids":{"items":{"type":"integer"},"type":"array","title":"Unlinked Team Ids","default":[]}},"type":"object","required":["id","unlinked_team_ids"],"title":"ProviderConnectionDeleteData"},"ProviderConnectionDeleteResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/ProviderConnectionDeleteData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"ProviderConnectionDeleteResp"},"ProviderConnectionInfo":{"properties":{"id":{"type":"integer","title":"Id"},"provider":{"$ref":"#/components/schemas/FantasyProvider"},"account_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Hint"},"status":{"type":"string","enum":["ok","expired","unknown"],"title":"Status"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"auth_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Auth Failed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"teams":{"items":{"$ref":"#/components/schemas/ConnectionTeamInfo"},"type":"array","title":"Teams","default":[]}},"type":"object","required":["id","provider","account_hint","status","verified_at","auth_failed_at","created_at","updated_at","teams"],"title":"ProviderConnectionInfo"},"ProviderConnectionListResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"items":{"$ref":"#/components/schemas/ProviderConnectionInfo"},"type":"array","title":"Data","default":[]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"ProviderConnectionListResp"},"ProviderConnectionResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/ProviderConnectionInfo"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"created":{"type":"boolean","title":"Created","default":false}},"type":"object","required":["status","message","data","error_code","timestamp","created"],"title":"ProviderConnectionResp"},"RankingsMeta":{"properties":{"format":{"type":"string","title":"Format"},"window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Window"},"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"},"categories":{"items":{"$ref":"#/components/schemas/CategoryDefResp"},"type":"array","title":"Categories","default":[]},"pool_size":{"type":"integer","title":"Pool Size"},"min_games":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Games"},"season":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Season"},"season_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Season Day"},"max_gp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Gp"},"scoring":{"anyOf":[{"$ref":"#/components/schemas/RankingsScoring"},{"type":"null"}]}},"type":"object","required":["format","window","as_of","categories","pool_size","min_games","season","season_day","max_gp","scoring"],"title":"RankingsMeta"},"RankingsParams":{"properties":{"scope":{"anyOf":[{"type":"string","enum":["global","league"]},{"type":"null"}],"title":"Scope"},"format":{"anyOf":[{"type":"string","enum":["points","categories"]},{"type":"null"}],"title":"Format"},"window":{"anyOf":[{"type":"integer","enum":[7,14,30]},{"type":"null"}],"title":"Window","description":"Days; null means season"},"cats":{"items":{"type":"string"},"type":"array","title":"Cats","description":"Category keys, e.g. ['blk', 'stl']"},"min_games":{"anyOf":[{"type":"integer","maximum":82.0,"minimum":1.0},{"type":"null"}],"title":"Min Games"}},"type":"object","required":["scope","format","window","cats","min_games"],"title":"RankingsParams","description":"URL parameters for /rankings (frontend lib/rankings-params.ts)."},"RankingsPlayer":{"properties":{"id":{"type":"integer","title":"Id"},"rank":{"type":"integer","title":"Rank"},"player_name":{"type":"string","title":"Player Name"},"team":{"type":"string","title":"Team"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position","description":"Primary position (e.g. 'G', 'F-C'); null when nba.players has none for the player"},"total_fpts":{"type":"number","title":"Total Fpts"},"avg_fpts":{"type":"number","title":"Avg Fpts"},"rank_change":{"type":"integer","title":"Rank Change","description":"Change in league-wide rank versus 7 days ago; positive is an improvement. 0 for rolling-window and category rankings, which do not track movement, and for everyone during the first week of a season.","default":0},"gp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gp"},"categories":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Categories","description":"Per-game value per category; rates are 0-1 fractions (None when the player has no attempts)"},"category_z":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Category Z","description":"Signed z-score per category over the ranked pool (positive is always good; TOV is inverted)"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score","description":"Sum of category z-scores; the ranking key"}},"type":"object","required":["id","rank","player_name","team","position","total_fpts","avg_fpts","rank_change","gp","categories","category_z","score"],"title":"RankingsPlayer"},"RankingsResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"items":{"$ref":"#/components/schemas/RankingsPlayer"},"type":"array","title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"meta":{"anyOf":[{"$ref":"#/components/schemas/RankingsMeta"},{"type":"null"}]}},"type":"object","required":["status","message","data","error_code","timestamp","meta"],"title":"RankingsResp"},"RankingsScoring":{"properties":{"basis":{"type":"string","enum":["default_points","league_points","categories"],"title":"Basis","description":"default_points: the platform's default points formula. league_points: the league's own point weights. categories: summed per-category z-scores (see `categories` on the meta)."},"point_weights":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Point Weights","description":"Per-stat point values used; null for category rankings"},"league_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"League Id"},"league_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"League Name"},"settings_synced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Settings Synced","description":"Whether the league's settings were successfully read from the provider. False means the defaults below were substituted. Null when no league is involved."},"unsupported":{"items":{"type":"string"},"type":"array","title":"Unsupported","description":"League scoring keys that could not be honored (e.g. dd/td, which need per-game detail)","default":[]}},"type":"object","required":["basis","point_weights","league_id","league_name","settings_synced","unsupported"],"title":"RankingsScoring","description":"What the ranking was scored by.\n\n`points` rankings are not universal: the stored `fpts` columns every points\nranking sorts on are one hardcoded formula (one ESPN league's settings). This\nblock says so, and says whose settings were used when a league supplied them."},"RecapCategoryLine":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"z_sum":{"type":"number","title":"Z Sum","description":"Summed per-category z of everyone the seat drafted"},"rank":{"type":"number","title":"Rank"},"roto_points":{"type":"number","title":"Roto Points"}},"type":"object","required":["key","label","z_sum","rank","roto_points"],"title":"RecapCategoryLine"},"RecapH2HCell":{"properties":{"opponent_slot":{"type":"integer","title":"Opponent Slot"},"won":{"type":"number","title":"Won"},"lost":{"type":"number","title":"Lost"},"tied":{"type":"number","title":"Tied"}},"type":"object","required":["opponent_slot","won","lost","tied"],"title":"RecapH2HCell"},"RecapMeta":{"properties":{"format":{"type":"string","title":"Format"},"value_kind":{"type":"string","enum":["fpts","cat_value"],"title":"Value Kind"},"graded_by":{"type":"string","enum":["value_over_slot","value","market_value_over_slot","market_value_over_bid"],"title":"Graded By","description":"What the seat grades rank on. Under `grade_basis: espn` a snake grades on ESPN's auction value over the ESPN-ranked player at each pick and an auction on ESPN value over the bid; under `cv` a snake grades on CV value over slot and an auction, which has no value ladder to price picks against, on total value."},"grade_basis":{"type":"string","enum":["espn","cv"],"title":"Grade Basis","description":"Whose board the seats are graded against: ESPN's published board in an ESPN room, Court Vision's otherwise — the same rule as the board's `rank_basis`, plus a fall-back to `cv` when the snapshot carries no auction values to price picks with.","default":"cv"},"grade_basis_reason":{"anyOf":[{"type":"string","enum":["espn_league","league_less_room","linked_espn_draft","provider_not_espn","no_market_snapshot","no_auction_values"]},{"type":"null"}],"title":"Grade Basis Reason","description":"Why `grade_basis` is what it is"},"market_rank_type":{"type":"string","enum":["standard","roto"],"title":"Market Rank Type","description":"Which of ESPN's two boards `market_rank` and `market_value` come from","default":"standard"},"standings_basis":{"type":"string","enum":["z_sum","season_value"],"title":"Standings Basis","description":"Category standings sum per-player z; they approximate a roto finish, they do not simulate a season."},"session_id":{"type":"integer","title":"Session Id"},"status":{"type":"string","enum":["active","completed","abandoned"],"title":"Status"},"complete":{"type":"boolean","title":"Complete","description":"Whether every pick in the draft has been recorded"},"picks_made":{"type":"integer","title":"Picks Made"},"total_picks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Picks"},"unscored":{"type":"integer","title":"Unscored","description":"Picks nothing could value"},"unattributed":{"type":"integer","title":"Unattributed","description":"Picks with no seat — a room that never learned its pick order"},"league_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"League Size"},"rounds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rounds"},"my_slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"My Slot"},"draft_type":{"type":"string","enum":["snake","auction"],"title":"Draft Type"},"categories":{"items":{"$ref":"#/components/schemas/CategoryDefResp"},"type":"array","title":"Categories","default":[]},"projections_as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Projections As Of"},"market_as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Market As Of"}},"type":"object","required":["format","value_kind","graded_by","grade_basis","grade_basis_reason","market_rank_type","standings_basis","session_id","status","complete","picks_made","total_picks","unscored","unattributed","league_size","rounds","my_slot","draft_type","categories","projections_as_of","market_as_of"],"title":"RecapMeta"},"RecapPickResp":{"properties":{"overall_pick":{"type":"integer","title":"Overall Pick"},"round":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Round"},"slot":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slot","description":"Seat that made the pick (index into `pick_order`)"},"by_me":{"type":"boolean","title":"By Me","default":false},"source":{"type":"string","enum":["manual","espn_sync","import","keeper","mock"],"title":"Source"},"player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Player Id"},"espn_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Player Id"},"player_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Player Name"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value","description":"League-scored value; null for a pick nothing can score"},"cv_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cv Rank"},"market_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Market Rank"},"adp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adp"},"surplus_cv":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Surplus Cv","description":"cv_rank − overall_pick; positive = taken later than his rank"},"surplus_market":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Surplus Market","description":"adp − overall_pick; positive = later than ESPN's crowd"},"value_over_slot":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Over Slot","description":"value(player) − value(the cv-ranked player at this pick number); null in an auction"},"market_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Value","description":"ESPN's auction value for the league's format; null for a player ESPN does not price"},"surplus_espn":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Surplus Espn","description":"market_rank − overall_pick; positive = taken later than ESPN ranks him"},"market_value_over_slot":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Value Over Slot","description":"market_value(player) − market_value(the ESPN-ranked player at this pick number); null in an auction, and for a pick ESPN cannot price"},"market_value_over_bid":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Value Over Bid","description":"market_value − bid; auctions only, null for a pick ESPN cannot price"},"bid":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bid"}},"type":"object","required":["overall_pick","round","slot","by_me","source","player_id","espn_player_id","player_name","team","value","cv_rank","market_rank","adp","surplus_cv","surplus_market","value_over_slot","market_value","surplus_espn","market_value_over_slot","market_value_over_bid","bid"],"title":"RecapPickResp","description":"One pick, priced against the board CV would have drafted from."},"RecapSeatResp":{"properties":{"slot":{"type":"integer","title":"Slot"},"espn_team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Espn Team Id"},"is_me":{"type":"boolean","title":"Is Me","default":false},"picks":{"type":"integer","title":"Picks"},"unscored":{"type":"integer","title":"Unscored","description":"Picks with no value to price — listed in `picks`, left out of the sums"},"total_value":{"type":"number","title":"Total Value"},"value_over_slot":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Over Slot","description":"Σ over the seat's priced picks; null in an auction"},"market_value_over_slot":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Value Over Slot","description":"Σ market_value_over_slot over the seat's ESPN-priced picks; null in an auction"},"market_value_over_bid":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Value Over Bid","description":"Σ market_value_over_bid over the seat's ESPN-priced picks; auctions only"},"unpriced":{"type":"integer","title":"Unpriced","description":"Picks ESPN cannot price — listed in `picks`, left out of the ESPN sums","default":0},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade","description":"Relative letter A–F; a four-seat league tops out at D"},"position":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position","description":"Rank among the seats, ties sharing the average position"},"best_pick":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Pick"},"worst_pick":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Worst Pick"}},"type":"object","required":["slot","espn_team_id","is_me","picks","unscored","total_value","value_over_slot","market_value_over_slot","market_value_over_bid","unpriced","grade","position","best_pick","worst_pick"],"title":"RecapSeatResp","description":"One seat's draft, graded against the other seats in the same room."},"RecapStandingResp":{"properties":{"slot":{"type":"integer","title":"Slot"},"categories":{"items":{"$ref":"#/components/schemas/RecapCategoryLine"},"type":"array","title":"Categories","default":[]},"roto_points":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roto Points"},"roto_rank":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roto Rank"},"season_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Season Value","description":"Points leagues: Σ value × projected games"},"value_rank":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Rank"},"expected_wins":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expected Wins","description":"Categories won in an average matchup; a tie counts half"},"h2h":{"items":{"$ref":"#/components/schemas/RecapH2HCell"},"type":"array","title":"H2H","default":[]}},"type":"object","required":["slot","categories","roto_points","roto_rank","season_value","value_rank","expected_wins","h2h"],"title":"RecapStandingResp","description":"Where a seat's drafted roster projects to finish."},"RecommendationComponent":{"properties":{"key":{"type":"string","enum":["season_value","vorp","punts","injury","congestion","category_fit"],"title":"Key"},"label":{"type":"string","title":"Label"},"value":{"type":"number","title":"Value"},"in_score":{"type":"boolean","title":"In Score","description":"Whether this term is summed into `score`. `season_value` is the base the other terms are computed from and is shown for context, not added on top of `vorp`. `category_fit` (category leagues) is what weighting categories by this roster's needs would add: information for the drafter, deliberately not part of the score. `punts` (category leagues) is how the room's conceded categories move his value over replacement."},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"One line of why, for the room to render verbatim"}},"type":"object","required":["key","label","value","in_score","detail"],"title":"RecommendationComponent","description":"One visible term of a recommendation score, in season-value points."},"RecommendedMove":{"properties":{"action":{"type":"string","title":"Action","description":"Action type: 'add', 'drop', 'stream'"},"player_add":{"anyOf":[{"$ref":"#/components/schemas/PlayerInput"},{"type":"null"}],"description":"Player to add"},"player_drop":{"anyOf":[{"$ref":"#/components/schemas/PlayerInput"},{"type":"null"}],"description":"Player to drop"},"reason":{"type":"string","title":"Reason","description":"Explanation for the move"},"projected_gain":{"type":"number","title":"Projected Gain","description":"Projected fpts gain from move"}},"type":"object","required":["action","player_add","player_drop","reason","projected_gain"],"title":"RecommendedMove","description":"A recommended roster move."},"RevokeApiKeyResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"RevokeApiKeyResp","description":"DELETE /v1/internal/api-keys/{key_id} — data is always null."},"RosterHealthSummary":{"properties":{"total_players":{"type":"integer","title":"Total Players"},"healthy":{"type":"integer","title":"Healthy"},"out":{"type":"integer","title":"Out"},"day_to_day":{"type":"integer","title":"Day To Day"},"game_time_decision":{"type":"integer","title":"Game Time Decision"}},"type":"object","required":["total_players","healthy","out","day_to_day","game_time_decision"],"title":"RosterHealthSummary","description":"Counts of players by health status."},"RosterTransactionData":{"properties":{"lineup":{"$ref":"#/components/schemas/LineupState"},"added":{"anyOf":[{"$ref":"#/components/schemas/RosterTransactionPlayer"},{"type":"null"}]},"dropped":{"anyOf":[{"$ref":"#/components/schemas/RosterTransactionPlayer"},{"type":"null"}]},"verified":{"type":"boolean","title":"Verified"},"audit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audit Id"},"scoring_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scoring Period Id"}},"type":"object","required":["lineup","added","dropped","verified","audit_id","scoring_period_id"],"title":"RosterTransactionData"},"RosterTransactionPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"}},"type":"object","required":["player_id","name","team"],"title":"RosterTransactionPlayer"},"RosterTransactionReq":{"properties":{"add_player_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Add Player Id"},"drop_player_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Drop Player Id"},"expected_scoring_period_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Scoring Period Id"},"roster_version":{"type":"string","maxLength":64,"minLength":1,"title":"Roster Version"}},"type":"object","required":["expected_scoring_period_id","roster_version"],"title":"RosterTransactionReq"},"RosterTransactionResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/RosterTransactionData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"RosterTransactionResp"},"RouteData":{"properties":{"kind":{"type":"string","enum":["show","statmuse","cannot"],"title":"Kind","description":"show: open `target` · statmuse: link out · cannot: say so"},"text":{"type":"string","title":"Text","description":"One line for the user"},"target":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/TerminalTarget"},{"$ref":"#/components/schemas/PageTarget"}],"discriminator":{"propertyName":"type","mapping":{"page":"#/components/schemas/PageTarget","terminal":"#/components/schemas/TerminalTarget"}}},{"type":"null"}],"title":"Target","description":"Where to go, when kind is show"},"statmuse_query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statmuse Query","description":"The question restated in full, when kind is statmuse"},"statmuse_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statmuse Url","description":"Built by the server from statmuse_query"},"suggestions":{"items":{"type":"string"},"type":"array","title":"Suggestions","description":"Questions it can answer, when kind is cannot"},"gap":{"anyOf":[{"type":"string","enum":["no_view","no_data","out_of_scope","invalid_target","ambiguous"]},{"type":"null"}],"title":"Gap","description":"Why a question could not be answered in Court Vision"},"question_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Question Id","description":"For feedback; null if the question could not be logged"},"sources":{"items":{"$ref":"#/components/schemas/AiToolCall"},"type":"array","title":"Sources","description":"Lookups the router made"},"usage":{"$ref":"#/components/schemas/AiUsage"}},"type":"object","required":["kind","text","target","statmuse_query","statmuse_url","suggestions","gap","question_id","sources","usage"],"title":"RouteData"},"RouteReq":{"properties":{"question":{"type":"string","maxLength":500,"minLength":1,"pattern":"^[^\\x00]*$","title":"Question","description":"The question, in plain language"},"context":{"$ref":"#/components/schemas/AiContext"}},"type":"object","required":["question"],"title":"RouteReq","description":"Body for POST /v1/internal/ai/route."},"RouteResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/RouteData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"RouteResp","description":"Response for POST /v1/internal/ai/route."},"SaveLineupReq":{"properties":{"team_id":{"type":"integer","minimum":0.0,"title":"Team Id","description":"Team ID must be non-negative"},"lineup_info":{"$ref":"#/components/schemas/LineupInfo-Input"}},"type":"object","required":["team_id","lineup_info"],"title":"SaveLineupReq"},"SaveLineupResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LineupResponse"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"SaveLineupResp","description":"Save lineup response"},"ScheduleGame":{"properties":{"date":{"type":"string","title":"Date","description":"Game date (YYYY-MM-DD)"},"opponent":{"type":"string","title":"Opponent","description":"Opponent team abbreviation"},"home":{"type":"boolean","title":"Home","description":"Whether this is a home game"},"back_to_back":{"type":"boolean","title":"Back To Back","description":"Whether this game is a back-to-back"},"status":{"type":"string","title":"Status","description":"Game status: scheduled, in_progress, or final"},"team_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Score","description":"Team's score (if game completed)"},"opponent_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Opponent Score","description":"Opponent's score (if game completed)"},"opponent_def_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Opponent Def Rating","description":"Opponent's defensive rating (points allowed per 100 possessions)"}},"type":"object","required":["date","opponent","home","back_to_back","status","team_score","opponent_score","opponent_def_rating"],"title":"ScheduleGame","description":"Individual game in a team's schedule."},"ScheduleOverview":{"properties":{"matchup_number":{"type":"integer","title":"Matchup Number"},"matchup_start":{"type":"string","title":"Matchup Start"},"matchup_end":{"type":"string","title":"Matchup End"},"current_day_index":{"type":"integer","title":"Current Day Index"},"game_span":{"type":"integer","title":"Game Span"},"total_team_games":{"type":"integer","title":"Total Team Games"},"teams_with_b2b":{"items":{"type":"string"},"type":"array","title":"Teams With B2B"},"day_game_counts":{"items":{"type":"integer"},"type":"array","title":"Day Game Counts"}},"type":"object","required":["matchup_number","matchup_start","matchup_end","current_day_index","game_span","total_team_games","teams_with_b2b","day_game_counts"],"title":"ScheduleOverview","description":"Current matchup week schedule context."},"SchedulePickupReq":{"properties":{"add_player_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Add Player Id"},"drop_player_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Drop Player Id"},"scoring_period_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Scoring Period Id"}},"type":"object","required":["add_player_id","scoring_period_id"],"title":"SchedulePickupReq"},"ScheduleWeek":{"properties":{"week":{"type":"integer","title":"Week"},"start_date":{"type":"string","title":"Start Date"},"end_date":{"type":"string","title":"End Date"},"game_span":{"type":"integer","title":"Game Span"}},"type":"object","required":["week","start_date","end_date","game_span"],"title":"ScheduleWeek"},"ScheduleWeeksData":{"properties":{"weeks":{"items":{"$ref":"#/components/schemas/ScheduleWeek"},"type":"array","title":"Weeks"},"current_week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Week"},"season":{"$ref":"#/components/schemas/SeasonInfo"}},"type":"object","required":["weeks","current_week","season"],"title":"ScheduleWeeksData"},"ScheduleWeeksResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/ScheduleWeeksData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"ScheduleWeeksResp"},"ScheduledPickup":{"properties":{"id":{"type":"integer","title":"Id"},"team_id":{"type":"integer","title":"Team Id"},"scoring_period_id":{"type":"integer","title":"Scoring Period Id"},"nba_date":{"type":"string","format":"date","title":"Nba Date"},"status":{"type":"string","enum":["pending","executed","skipped","failed","cancelled","expired"],"title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"add":{"$ref":"#/components/schemas/ScheduledPickupPlayer"},"drop":{"anyOf":[{"$ref":"#/components/schemas/ScheduledPickupPlayer"},{"type":"null"}]},"not_before_at":{"type":"string","format":"date-time","title":"Not Before At"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"attempts":{"type":"integer","title":"Attempts","default":0},"audit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audit Id"},"lineup_audit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lineup Audit Id"},"seated_slot_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seated Slot Id"},"seated_slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seated Slot"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"executed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Executed At"},"lane_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lane Id"}},"type":"object","required":["id","team_id","scoring_period_id","nba_date","status","reason","detail","add","drop","not_before_at","deadline_at","next_attempt_at","attempts","audit_id","lineup_audit_id","seated_slot_id","seated_slot","created_at","executed_at","lane_id"],"title":"ScheduledPickup"},"ScheduledPickupListData":{"properties":{"pending":{"items":{"$ref":"#/components/schemas/ScheduledPickup"},"type":"array","title":"Pending","default":[]},"recent":{"items":{"$ref":"#/components/schemas/ScheduledPickup"},"type":"array","title":"Recent","default":[]}},"type":"object","required":["pending","recent"],"title":"ScheduledPickupListData"},"ScheduledPickupListResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/ScheduledPickupListData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"ScheduledPickupListResp"},"ScheduledPickupPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"}},"type":"object","required":["player_id","name","team","nba_player_id"],"title":"ScheduledPickupPlayer"},"ScheduledPickupResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/ScheduledPickup"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"ScheduledPickupResp"},"ScoreboardData":{"properties":{"game_date":{"type":"string","title":"Game Date"},"game_count":{"type":"integer","title":"Game Count"},"games":{"items":{"$ref":"#/components/schemas/ScoreboardGameItem"},"type":"array","title":"Games"}},"type":"object","required":["game_date","game_count","games"],"title":"ScoreboardData"},"ScoreboardGameItem":{"properties":{"game_id":{"type":"string","title":"Game Id"},"game_status":{"type":"integer","title":"Game Status"},"game_status_label":{"type":"string","title":"Game Status Label"},"period":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period"},"game_clock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Clock"}},"type":"object","required":["game_id","game_status","game_status_label","period","game_clock"],"title":"ScoreboardGameItem"},"ScoreboardResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/ScoreboardData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"ScoreboardResp","description":"GET /v1/live/scoreboard"},"SeasonInfo":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"espn_year":{"type":"integer","title":"Espn Year"},"preseason_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preseason Start"},"regular_season_start":{"type":"string","title":"Regular Season Start"},"regular_season_end":{"type":"string","title":"Regular Season End"},"phase":{"type":"string","enum":["preseason","regular","offseason"],"title":"Phase"},"season_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Season Day"},"week_count":{"type":"integer","title":"Week Count"}},"type":"object","required":["key","label","espn_year","preseason_start","regular_season_start","regular_season_end","phase","season_day","week_count"],"title":"SeasonInfo","description":"The active season as the calendar sees it (frontend copy/phase come from here)."},"SeasonSummaryData":{"properties":{"team_id":{"type":"integer","title":"Team Id"},"team_name":{"type":"string","title":"Team Name"},"wins":{"type":"integer","title":"Wins"},"losses":{"type":"integer","title":"Losses"},"total_points_for":{"type":"number","title":"Total Points For"},"total_points_against":{"type":"number","title":"Total Points Against"},"best_week":{"anyOf":[{"$ref":"#/components/schemas/WeekResult"},{"type":"null"}]},"worst_week":{"anyOf":[{"$ref":"#/components/schemas/WeekResult"},{"type":"null"}]},"weeks":{"items":{"$ref":"#/components/schemas/WeekResult"},"type":"array","title":"Weeks"},"scoring_format":{"type":"string","enum":["points","categories"],"title":"Scoring Format","default":"points"}},"type":"object","required":["team_id","team_name","wins","losses","total_points_for","total_points_against","best_week","worst_week","weeks","scoring_format"],"title":"SeasonSummaryData"},"SeasonSummaryResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/SeasonSummaryData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"SeasonSummaryResp"},"SlimGene-Input":{"properties":{"Day":{"type":"integer","maximum":13.0,"minimum":0.0,"title":"Day","description":"Day must be between 0 and 13 (for all-star week)"},"Additions":{"items":{"$ref":"#/components/schemas/SlimPlayer"},"type":"array","title":"Additions"},"Removals":{"items":{"$ref":"#/components/schemas/SlimPlayer"},"type":"array","title":"Removals"},"Roster":{"additionalProperties":{"$ref":"#/components/schemas/SlimPlayer"},"type":"object","title":"Roster"}},"type":"object","required":["Day"],"title":"SlimGene"},"SlimGene-Output":{"properties":{"Day":{"type":"integer","maximum":13.0,"minimum":0.0,"title":"Day","description":"Day must be between 0 and 13 (for all-star week)"},"Additions":{"items":{"$ref":"#/components/schemas/SlimPlayer"},"type":"array","title":"Additions"},"Removals":{"items":{"$ref":"#/components/schemas/SlimPlayer"},"type":"array","title":"Removals"},"Roster":{"additionalProperties":{"$ref":"#/components/schemas/SlimPlayer"},"type":"object","title":"Roster"}},"type":"object","required":["Day","Additions","Removals","Roster"],"title":"SlimGene"},"SlimPlayer":{"properties":{"Name":{"type":"string","minLength":1,"title":"Name","description":"Player name cannot be empty"},"AvgPoints":{"type":"number","minimum":0.0,"title":"Avgpoints","description":"Average points must be non-negative"},"Team":{"type":"string","minLength":1,"title":"Team","description":"Team name cannot be empty"}},"type":"object","required":["Name","AvgPoints","Team"],"title":"SlimPlayer"},"StandardRankResp":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"points_rank":{"type":"integer","title":"Points Rank","description":"Place among the players sent, standard points league"},"points_value":{"type":"number","title":"Points Value","description":"Fantasy points per game under ESPN's default weights"},"points_season":{"type":"number","title":"Points Season","description":"points_value x effective games: what points_rank is ordered by"},"category_rank":{"type":"integer","title":"Category Rank","description":"Place among the players sent, standard 9-cat"},"category_value":{"type":"number","title":"Category Value","description":"The 9-cat value index"},"category_score":{"type":"number","title":"Category Score","description":"Summed per-category score the index is mapped from"},"games":{"type":"number","title":"Games","description":"Effective games: expected games weighted by when his team plays them"}},"type":"object","required":["player_id","points_rank","points_value","points_season","category_rank","category_value","category_score","games"],"title":"StandardRankResp"},"StandardValuationData":{"properties":{"league_size":{"type":"integer","title":"League Size"},"rounds":{"type":"integer","title":"Rounds"},"playoff_weight":{"type":"number","title":"Playoff Weight"},"playoff_weeks":{"items":{"type":"integer"},"type":"array","title":"Playoff Weeks","description":"The fantasy-playoff weeks weighted; empty when the season calendar is unavailable"},"players":{"items":{"$ref":"#/components/schemas/StandardRankResp"},"type":"array","title":"Players","description":"One entry per player sent, in the order sent"}},"type":"object","required":["league_size","rounds","playoff_weight","playoff_weeks","players"],"title":"StandardValuationData"},"StandardValuationReq":{"properties":{"players":{"items":{"$ref":"#/components/schemas/ValuationPlayer"},"type":"array","maxItems":2000,"minItems":1,"title":"Players","description":"The whole pool to value together: a rank is a place among these players, and the category values are measured against the draftable cohort among them."},"playoff_weight":{"anyOf":[{"type":"number","maximum":4.0,"minimum":1.0},{"type":"null"}],"title":"Playoff Weight","description":"How many regular-season games one fantasy-playoff game counts as. Default 2."}},"type":"object","required":["players"],"title":"StandardValuationReq"},"StandardValuationResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardValuationData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"StandardValuationResp"},"StreamLane":{"properties":{"id":{"type":"integer","title":"Id"},"team_id":{"type":"integer","title":"Team Id"},"status":{"type":"string","enum":["active","paused","ended"],"title":"Status"},"notify":{"type":"string","enum":["email","desk"],"title":"Notify"},"holder":{"$ref":"#/components/schemas/LanePlayer"},"original":{"$ref":"#/components/schemas/LanePlayer"},"start_period":{"type":"integer","title":"Start Period"},"end_period":{"type":"integer","title":"End Period"},"end_date":{"type":"string","format":"date","title":"End Date"},"next_period":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Period"},"next_decision_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Decision At"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"projection":{"anyOf":[{"$ref":"#/components/schemas/LaneProjection"},{"type":"null"}]},"events":{"items":{"$ref":"#/components/schemas/StreamLaneEvent"},"type":"array","title":"Events","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"}},"type":"object","required":["id","team_id","status","notify","holder","original","start_period","end_period","end_date","next_period","next_decision_at","reason","detail","projection","events","created_at","ended_at"],"title":"StreamLane"},"StreamLaneEvent":{"properties":{"id":{"type":"integer","title":"Id"},"scoring_period_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scoring Period Id"},"nba_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Nba Date"},"action":{"type":"string","enum":["started","switch","keep","blocked","paused","resumed","ended"],"title":"Action"},"add":{"anyOf":[{"$ref":"#/components/schemas/LanePlayer"},{"type":"null"}]},"drop":{"anyOf":[{"$ref":"#/components/schemas/LanePlayer"},{"type":"null"}]},"projected":{"anyOf":[{"$ref":"#/components/schemas/LanePlayer"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"pickup_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pickup Id"},"pickup_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pickup Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","scoring_period_id","nba_date","action","add","drop","projected","reason","detail","pickup_id","pickup_status","created_at"],"title":"StreamLaneEvent"},"StreamLaneListData":{"properties":{"open":{"items":{"$ref":"#/components/schemas/StreamLane"},"type":"array","title":"Open","default":[]},"recent":{"items":{"$ref":"#/components/schemas/StreamLane"},"type":"array","title":"Recent","default":[]}},"type":"object","required":["open","recent"],"title":"StreamLaneListData"},"StreamLaneListResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/StreamLaneListData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"StreamLaneListResp"},"StreamLanePlan":{"properties":{"holder":{"$ref":"#/components/schemas/LanePlayer"},"start_period":{"type":"integer","title":"Start Period"},"end_period":{"type":"integer","title":"End Period"},"end_date":{"type":"string","format":"date","title":"End Date"},"first_decision_at":{"type":"string","format":"date-time","title":"First Decision At"},"projection":{"$ref":"#/components/schemas/LaneProjection"}},"type":"object","required":["holder","start_period","end_period","end_date","first_decision_at","projection"],"title":"StreamLanePlan","description":"The dry run: what a lane started now on this spot would do."},"StreamLanePlanReq":{"properties":{"player_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Player Id"}},"type":"object","required":["player_id"],"title":"StreamLanePlanReq"},"StreamLanePlanResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/StreamLanePlan"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"StreamLanePlanResp"},"StreamLaneResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/StreamLane"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"StreamLaneResp"},"StreamLaneStartReq":{"properties":{"player_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Player Id"},"notify":{"type":"string","enum":["email","desk"],"title":"Notify","default":"email"}},"type":"object","required":["player_id"],"title":"StreamLaneStartReq"},"StreamLaneUpdateReq":{"properties":{"status":{"anyOf":[{"type":"string","enum":["active","paused"]},{"type":"null"}],"title":"Status"},"notify":{"anyOf":[{"type":"string","enum":["email","desk"]},{"type":"null"}],"title":"Notify"}},"type":"object","title":"StreamLaneUpdateReq"},"StreamerData":{"properties":{"matchup_number":{"type":"integer","title":"Matchup Number"},"current_day_index":{"type":"integer","title":"Current Day Index"},"game_span":{"type":"integer","title":"Game Span"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"upcoming":{"type":"boolean","title":"Upcoming","default":false},"avg_days":{"type":"integer","title":"Avg Days"},"mode":{"$ref":"#/components/schemas/StreamerMode"},"target_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Day"},"teams_with_b2b":{"items":{"type":"string"},"type":"array","title":"Teams With B2B"},"streamers":{"items":{"$ref":"#/components/schemas/StreamerPlayerResp"},"type":"array","title":"Streamers"},"value_kind":{"type":"string","enum":["fpts","cat_value"],"title":"Value Kind","default":"fpts"}},"type":"object","required":["matchup_number","current_day_index","game_span","start_date","end_date","upcoming","avg_days","mode","target_day","teams_with_b2b","streamers","value_kind"],"title":"StreamerData","description":"Complete streamer search results."},"StreamerFindReq":{"properties":{"fa_count":{"type":"integer","maximum":300.0,"minimum":5.0,"title":"Fa Count","default":300},"exclude_injured":{"type":"boolean","title":"Exclude Injured","default":true},"b2b_only":{"type":"boolean","title":"B2B Only","description":"Only show B2B players (week: any remaining B2B, daily: target day + next day)","default":false},"mode":{"$ref":"#/components/schemas/StreamerMode","description":"Scoring mode: 'week' for rest-of-week hold, 'daily' for single-day pickup","default":"week"},"target_day":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Target Day","description":"Day index for daily mode (0-indexed). If None, uses current day."},"avg_days":{"type":"integer","maximum":30.0,"minimum":3.0,"title":"Avg Days","description":"Number of days to use for rolling average calculation","default":7}},"type":"object","title":"StreamerFindReq","description":"Streamer search options for a saved team (`POST /teams/{id}/streamers/find`);\nthe league and its credentials come from the team, never from the body."},"StreamerMode":{"type":"string","enum":["week","daily"],"title":"StreamerMode"},"StreamerPlayerResp":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"nba_player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nba Player Id"},"name":{"type":"string","title":"Name"},"team":{"type":"string","title":"Team"},"valid_positions":{"items":{"type":"string"},"type":"array","title":"Valid Positions"},"avg_points_last_n":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Points Last N"},"avg_points_season":{"type":"number","title":"Avg Points Season"},"avg_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avg Source"},"games_remaining":{"type":"integer","title":"Games Remaining"},"has_b2b":{"type":"boolean","title":"Has B2B"},"b2b_game_count":{"type":"integer","title":"B2B Game Count"},"game_days":{"items":{"type":"integer"},"type":"array","title":"Game Days"},"streamer_score":{"type":"number","title":"Streamer Score"},"injured":{"type":"boolean","title":"Injured"},"injury_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Injury Status"},"acquisition_status":{"anyOf":[{"type":"string","enum":["free_agent","waivers"]},{"type":"null"}],"title":"Acquisition Status"},"waivers_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Waivers Until"},"default_position_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Position Id"}},"type":"object","required":["player_id","nba_player_id","name","team","valid_positions","avg_points_last_n","avg_points_season","avg_source","games_remaining","has_b2b","b2b_game_count","game_days","streamer_score","injured","injury_status","acquisition_status","waivers_until","default_position_id"],"title":"StreamerPlayerResp","description":"A streaming candidate player."},"StreamerReq":{"properties":{"fa_count":{"type":"integer","maximum":300.0,"minimum":5.0,"title":"Fa Count","default":300},"exclude_injured":{"type":"boolean","title":"Exclude Injured","default":true},"b2b_only":{"type":"boolean","title":"B2B Only","description":"Only show B2B players (week: any remaining B2B, daily: target day + next day)","default":false},"mode":{"$ref":"#/components/schemas/StreamerMode","description":"Scoring mode: 'week' for rest-of-week hold, 'daily' for single-day pickup","default":"week"},"target_day":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Target Day","description":"Day index for daily mode (0-indexed). If None, uses current day."},"avg_days":{"type":"integer","maximum":30.0,"minimum":3.0,"title":"Avg Days","description":"Number of days to use for rolling average calculation","default":7},"league_info":{"$ref":"#/components/schemas/LeagueInfo"}},"type":"object","required":["league_info"],"title":"StreamerReq","description":"The legacy `POST /streamers/find` body: the same options plus the league itself."},"StreamerResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/StreamerData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"StreamerResp","description":"Response containing streamer candidates."},"TeamAddReq":{"properties":{"league_info":{"$ref":"#/components/schemas/LeagueInfoWrite"}},"type":"object","required":["league_info"],"title":"TeamAddReq"},"TeamAddResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Id"},"already_exists":{"type":"boolean","title":"Already Exists","default":false}},"type":"object","required":["status","message","data","error_code","timestamp","team_id","already_exists"],"title":"TeamAddResp","description":"Add team response"},"TeamDataResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/PlayerResp"},"type":"array"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"TeamDataResp"},"TeamGetResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/TeamResponse"},"type":"array"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"TeamGetResp","description":"Get user teams response"},"TeamInsightsData":{"properties":{"roster":{"items":{"$ref":"#/components/schemas/EnrichedRosterPlayer"},"type":"array","title":"Roster"},"category_strengths":{"anyOf":[{"$ref":"#/components/schemas/CategoryStrengths"},{"type":"null"}]},"opponent_category_strengths":{"anyOf":[{"$ref":"#/components/schemas/CategoryStrengths"},{"type":"null"}]},"category_comparison":{"anyOf":[{"$ref":"#/components/schemas/CategoryComparison"},{"type":"null"}]},"scoring_format":{"type":"string","enum":["points","categories"],"title":"Scoring Format","default":"points"},"value_kind":{"type":"string","enum":["fpts","cat_value"],"title":"Value Kind","default":"fpts"},"schedule_overview":{"anyOf":[{"$ref":"#/components/schemas/ScheduleOverview"},{"type":"null"}]},"roster_health":{"$ref":"#/components/schemas/RosterHealthSummary"},"projected_week_fpts":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projected Week Fpts"}},"type":"object","required":["roster","category_strengths","opponent_category_strengths","category_comparison","scoring_format","value_kind","schedule_overview","roster_health","projected_week_fpts"],"title":"TeamInsightsData","description":"Complete team insights response."},"TeamInsightsResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/TeamInsightsData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"TeamInsightsResp"},"TeamRemoveResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"TeamRemoveResp","description":"Remove team response"},"TeamResponse":{"properties":{"team_id":{"type":"integer","title":"Team Id"},"league_info":{"$ref":"#/components/schemas/LeagueInfoPublic"},"league":{"anyOf":[{"$ref":"#/components/schemas/LeagueSummary"},{"type":"null"}]},"capabilities":{"$ref":"#/components/schemas/ProviderCapabilitiesResp"}},"type":"object","required":["team_id","league_info","league","capabilities"],"title":"TeamResponse","description":"Team data response model"},"TeamScheduleData":{"properties":{"team":{"type":"string","title":"Team","description":"Team abbreviation"},"team_name":{"type":"string","title":"Team Name","description":"Full team name"},"schedule":{"items":{"$ref":"#/components/schemas/ScheduleGame"},"type":"array","title":"Schedule","description":"List of games"},"remaining_games":{"type":"integer","title":"Remaining Games","description":"Number of remaining scheduled games"},"total_games":{"type":"integer","title":"Total Games","description":"Total games in response"}},"type":"object","required":["team","team_name","schedule","remaining_games","total_games"],"title":"TeamScheduleData","description":"Response data for a team's schedule."},"TeamScheduleResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/TeamScheduleData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"TeamScheduleResp","description":"Response for GET /v1/teams/{abbrev}/schedule."},"TeamUpdateReq":{"properties":{"team_id":{"type":"integer","minimum":1.0,"title":"Team Id","description":"Team ID must be positive"},"league_info":{"$ref":"#/components/schemas/LeagueInfoWrite"}},"type":"object","required":["team_id","league_info"],"title":"TeamUpdateReq"},"TeamUpdateResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"TeamUpdateResp","description":"Update team response"},"TerminalTarget":{"properties":{"type":{"type":"string","const":"terminal","title":"Type","default":"terminal"},"mode":{"type":"string","enum":["overview","player","team","nba_team"],"title":"Mode"},"player_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Player Id","description":"NBA player ID; required for player mode"},"compare_ids":{"items":{"type":"integer"},"type":"array","title":"Compare Ids","description":"NBA player IDs, at most 4; player mode only"},"team_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Id","description":"The caller's fantasy team; required for team mode"},"nba_team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nba Team","description":"NBA team abbreviation; required for nba_team mode"},"window":{"anyOf":[{"type":"string","pattern":"^(season|l([1-9]|[1-7][0-9]|8[0-2]))$"},{"type":"null"}],"title":"Window","description":"`season` or `lN`"}},"type":"object","required":["type","mode","player_id","compare_ids","team_id","nba_team","window"],"title":"TerminalTarget","description":"Open the terminal in a mode, focused on a subject."},"TopPerformer":{"properties":{"player_id":{"type":"integer","title":"Player Id"},"name":{"type":"string","title":"Name"},"pts":{"type":"integer","title":"Pts"},"reb":{"type":"integer","title":"Reb"},"ast":{"type":"integer","title":"Ast"},"stl":{"type":"integer","title":"Stl"},"blk":{"type":"integer","title":"Blk"},"min":{"type":"integer","title":"Min"},"fgm":{"type":"integer","title":"Fgm"},"fga":{"type":"integer","title":"Fga"},"fg3m":{"type":"integer","title":"Fg3M"}},"type":"object","required":["player_id","name","pts","reb","ast","stl","blk","min","fgm","fga","fg3m"],"title":"TopPerformer","description":"Top performer in a game."},"TrendPeriod":{"properties":{"avg_fpts":{"type":"number","title":"Avg Fpts","description":"Average fantasy points per game"},"games":{"type":"integer","title":"Games","description":"Number of games in period"},"as_of_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of Date","description":"Date the rolling snapshot runs through"}},"type":"object","required":["avg_fpts","games","as_of_date"],"title":"TrendPeriod","description":"Stats for a trend period."},"TrendingPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id","description":"NBA player ID"},"player_name":{"type":"string","title":"Player Name","description":"Player name"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team","description":"Team abbreviation"},"current_ownership":{"type":"number","title":"Current Ownership","description":"Current ownership percentage"},"previous_ownership":{"type":"number","title":"Previous Ownership","description":"Ownership at start of period"},"change":{"type":"number","title":"Change","description":"Change in ownership percentage points"},"velocity":{"type":"number","title":"Velocity","description":"Relative change as percentage (change / previous * 100)"}},"type":"object","required":["player_id","player_name","team","current_ownership","previous_ownership","change","velocity"],"title":"TrendingPlayer","description":"Player in trending list."},"UserDeleteReq":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"UserDeleteReq"},"UserDeleteResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"UserDeleteResp","description":"User deletion response"},"UserResponse":{"properties":{"user_id":{"type":"integer","title":"User Id"},"email":{"type":"string","title":"Email"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"last_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login"}},"type":"object","required":["user_id","email","created_at","last_login"],"title":"UserResponse","description":"User data response model"},"UserUpdateReq":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"password":{"anyOf":[{"type":"string","minLength":8},{"type":"null"}],"title":"Password","description":"Password must be at least 8 characters"}},"type":"object","title":"UserUpdateReq"},"UserUpdateResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/UserResponse"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"UserUpdateResp","description":"User update response"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValuationPlayer":{"properties":{"player_id":{"type":"integer","title":"Player Id","description":"NBA player id (nba.players.id)"},"line":{"additionalProperties":{"type":"number"},"type":"object","title":"Line","description":"Per-game stats by canonical key (pts, reb, ast, stl, blk, tov, fgm, fga, fg3m, fg3a, ftm, fta, min). Unknown keys are ignored; percentages are derived from makes and attempts."},"games":{"anyOf":[{"type":"number","maximum":82.0,"minimum":0.0},{"type":"null"}],"title":"Games","description":"Expected games this season. Omit when nothing projects them (valued at 65)."},"team":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Team","description":"Current NBA team tricode, for his schedule around the fantasy playoffs"},"dd_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Dd Rate","description":"Double-doubles per game"},"td_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Td Rate","description":"Triple-doubles per game"}},"type":"object","required":["player_id","line"],"title":"ValuationPlayer","description":"One player's projection: a per-game line and the games it is expected over."},"WeekResult":{"properties":{"matchup_period":{"type":"integer","title":"Matchup Period"},"opponent_team_name":{"type":"string","title":"Opponent Team Name"},"points_for":{"type":"number","title":"Points For"},"points_against":{"type":"number","title":"Points Against"},"won":{"type":"boolean","title":"Won"},"categories_won":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Categories Won"},"categories_lost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Categories Lost"},"categories_tied":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Categories Tied"}},"type":"object","required":["matchup_period","opponent_team_name","points_for","points_against","won","categories_won","categories_lost","categories_tied"],"title":"WeekResult"},"WeeklyMatchupData":{"properties":{"matchup_period":{"type":"integer","title":"Matchup Period"},"days":{"items":{"$ref":"#/components/schemas/DailyMatchupData"},"type":"array","title":"Days"}},"type":"object","required":["matchup_period","days"],"title":"WeeklyMatchupData","description":"All days in the current matchup period, computed in a single ESPN call."},"WeeklyMatchupResp":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/WeeklyMatchupData"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["status","message","data","error_code","timestamp"],"title":"WeeklyMatchupResp","description":"Response containing all days for the current matchup period."},"YahooAuthUrlResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"auth_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Url"}},"type":"object","required":["status","message","data","error_code","timestamp","auth_url"],"title":"YahooAuthUrlResponse","description":"Response containing Yahoo OAuth authorization URL."},"YahooLeagueResponse":{"properties":{"league_key":{"type":"string","title":"League Key"},"league_id":{"type":"string","title":"League Id"},"name":{"type":"string","title":"Name"},"season":{"type":"string","title":"Season"},"num_teams":{"type":"integer","title":"Num Teams"},"scoring_type":{"type":"string","title":"Scoring Type"}},"type":"object","required":["league_key","league_id","name","season","num_teams","scoring_type"],"title":"YahooLeagueResponse","description":"Yahoo league information."},"YahooLeaguesResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"leagues":{"anyOf":[{"items":{"$ref":"#/components/schemas/YahooLeagueResponse"},"type":"array"},{"type":"null"}],"title":"Leagues"}},"type":"object","required":["status","message","data","error_code","timestamp","leagues"],"title":"YahooLeaguesResponse","description":"Response containing user's Yahoo leagues."},"YahooTeamResponse":{"properties":{"team_key":{"type":"string","title":"Team Key"},"team_id":{"type":"string","title":"Team Id"},"name":{"type":"string","title":"Name"},"is_owned_by_current_login":{"type":"boolean","title":"Is Owned By Current Login"}},"type":"object","required":["team_key","team_id","name","is_owned_by_current_login"],"title":"YahooTeamResponse","description":"Yahoo team information."},"YahooTeamsResponse":{"properties":{"status":{"$ref":"#/components/schemas/ApiStatus"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"teams":{"anyOf":[{"items":{"$ref":"#/components/schemas/YahooTeamResponse"},"type":"array"},{"type":"null"}],"title":"Teams"}},"type":"object","required":["status","message","data","error_code","timestamp","teams"],"title":"YahooTeamsResponse","description":"Response containing teams in a Yahoo league."}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"},"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"Players","description":"Player data and statistics"},{"name":"Games","description":"Game schedule and results"},{"name":"Teams","description":"Team information and schedules"},{"name":"Rankings","description":"Fantasy player rankings"},{"name":"Ownership","description":"ESPN roster ownership trends"},{"name":"Analytics","description":"Advanced analytics and streaming recommendations (API key required)"}]}