/** Options for the Statcast search wrappers. */ export interface StatcastSearchOptions { /** `"batter"` (default) or `"pitcher"`. */ player_type?: string; /** Initial date-window size in days (default 7). */ chunk_days?: number; /** Tidy (underscore-normalize) the rows; default returns the raw CSV rows. */ parsed?: boolean; /** * Friendly filter kwargs translated to Savant's params (see `_translateFilters`): * `season`, `game_type`, `pitch_type`, `at_bat_result`, `batted_ball_type`, * `pitch_result`, `zone`, `count`, `outs`, `inning`, `runners_on`, `flag`, * `position` (pipe-lists); `batters_lookup` / `pitchers_lookup` (id or list); * `team`, `opponent`, `home_road`, `stadium`, `pitcher_throws`, `batter_stands`. * Any unrecognized key is forwarded verbatim, so raw Savant params still work. */ [filter: string]: any; } /** Split `[start, end]` (inclusive ISO dates) into `days`-wide windows. */ export declare function dateChunks(start: string, end: string, days?: number): Array<[string, string]>; /** * Format a scalar / iterable as a Savant pipe-list with a trailing `|`. * * Savant multi-value filters expect `"FF|SL|"` (trailing pipe); a scalar becomes * `"x|"` and `null`/empty becomes `""`. A non-string scalar (e.g. `season=2024`) * becomes `"2024|"` (single piped value, not iterated). */ export declare function pipe(values: any): string; /** * Map friendly search kwargs to Savant's query params; pass unknowns through. * * Turns readable kwargs (`season`, `pitch_type`, `at_bat_result`, * `batters_lookup`, `team`, …) into the cryptic Savant params (`hfSea`, `hfPT`, * `hfAB`, `batters_lookup[]`, `team`, …). Any key not in a map is forwarded * verbatim, so raw Savant params still work for power users. */ export declare function translateFilters(filters: Record): Record; /** * Pitch-by-pitch MLB Statcast search (`/statcast_search/csv`), date-chunked. * * Savant caps a single response at 25,000 rows with no pagination; this splits * the date range into `chunk_days` windows, halving any window that hits the * cap, and stitches the chunks back together. * * @param startDt / endDt `YYYY-MM-DD` (inclusive). * @param opts `player_type` (`"batter"`/`"pitcher"`), `chunk_days`, `parsed`, plus * friendly filter kwargs (see {@link StatcastSearchOptions}). * @returns One **raw** CSV row per pitch by default; tidy (underscore-normalized) * rows when `{ parsed: true }`. */ export declare function mlb_statcast_search(startDt: string, endDt: string, opts?: StatcastSearchOptions): Promise[]>; /** * Minor-league Statcast search (`/statcast-search-minors/csv`), date-chunked. * Same shape, columns, and chunking as {@link mlb_statcast_search}. Scope with * `hfLevel` (Triple-A/Double-A/…) + `hfSea` filters. */ export declare function mlb_statcast_search_minors(startDt: string, endDt: string, opts?: StatcastSearchOptions): Promise[]>; /** * World Baseball Classic Statcast search * (`/statcast-search-world-baseball-classic/csv`), date-chunked. Same shape and * chunking as {@link mlb_statcast_search}; pass WBC date windows. */ export declare function mlb_statcast_search_wbc(startDt: string, endDt: string, opts?: StatcastSearchOptions): Promise[]>; /** Options for {@link mlb_statcast_player}. */ export interface StatcastPlayerOptions { /** Which embedded `serverVals` table to flatten when `parsed` (default `"statcast"`). */ section?: string; /** Optional `stats` query value to scope the embedded payload. */ stats?: string; /** Parse the embedded `serverVals[section]` into tidy rows; default returns the raw HTML. */ parsed?: boolean; } /** * GET `/savant-player/{playerId}`. * * Returns the **raw page HTML string by default** (consistent with the rest of * the native surface — raw response unless you opt in); pass `{ parsed: true }` * to flatten one embedded `serverVals` table into tidy rows (`section`, default * `"statcast"`; the page embeds ~12 tables). * * @param playerId MLBAM player id (shared with the Stats API `personId`). * @param opts `parsed` (default `false`), `section` (default `"statcast"`), `stats`. * @returns The raw HTML `string` by default; tidy rows when `{ parsed: true }`. */ export declare function mlb_statcast_player(playerId: number | string, opts?: StatcastPlayerOptions): Promise[] | string>; //# sourceMappingURL=mlb_statcast_extra.d.ts.map