import { League, SportsSdkClient } from '@sports-sdk/core';

type FantasyProsClientLeague = Omit<League, League.EPL | League.NCAAF>;
/**
 * NFL specific types
 */
type FantasyProsNFLPosition = "QB" | "RB" | "WR" | "TE" | "K" | "OP" | "FLX" | "DST" | "IDP" | "DL" | "LB" | "DB" | "TK" | "TQB" | "TRB" | "TWR" | "TTE" | "TOL" | "HC" | "P";
type FantasyProsNFLRankingsType = "ROS" | "DK" | "WW" | "ADP" | "weekly" | "draft";
type FantasyProsNFLScoringType = "STD" | "PPR" | "HALF";
/**
 * NBA specific types
 */
type FantasyProsNBAPosition = "ALL" | "PG" | "SG" | "SF" | "PF" | "G" | "F" | "C" | "SGF" | "PFC";
type FantasyProsNBARankingsType = "ROS" | "DK" | "ADP" | "draft";
type FantasyProsNBAScoringType = "ROTO" | "YAHOO" | "ESPN" | "CBS";
/**
 * MLB specific types
 */
type FantasyProsMLBPosition = "ALL" | "H" | "P" | "1B" | "2B" | "3B" | "SS" | "C" | "OF" | "SP" | "RP" | "DH" | "LF" | "CF" | "RF";
type FantasyProsMLBRankingsType = "ROS" | "DK" | "ADP" | "prospect" | "draft";
/**
 * NHL specific types
 */
type FantasyProsNHLPosition = "ALL" | "C" | "LW" | "RW" | "D" | "G";
type FantasyProsNHLRankingsType = "ROS" | "ADP" | "draft";
type FantasyProsNHLScoringType = "ROTO" | "YAHOO" | "ESPN";
/**
 * Generic/dynamically typed types
 */
type FantasyProsPosition<T extends FantasyProsClientLeague> = T extends League.NFL ? FantasyProsNFLPosition : T extends League.NBA ? FantasyProsNBAPosition : T extends League.MLB ? FantasyProsMLBPosition : T extends League.NHL ? FantasyProsNHLPosition : never;
type FantasyProsRankingsType<T extends FantasyProsClientLeague> = T extends League.NFL ? FantasyProsNFLRankingsType : T extends League.NBA ? FantasyProsNBARankingsType : T extends League.MLB ? FantasyProsMLBRankingsType : T extends League.NHL ? FantasyProsNHLRankingsType : never;
type FantasyProsScoringType<T extends Omit<FantasyProsClientLeague, League.MLB>> = T extends League.NFL ? FantasyProsNFLScoringType : T extends League.NBA ? FantasyProsNBAScoringType : T extends League.NHL ? FantasyProsNHLScoringType : never;
type GetRankingsParameters<T extends FantasyProsClientLeague> = T extends League.NFL | League.NBA | League.NHL ? RankingsWithScoringProps<T> : T extends League.MLB ? RankingsProps<T> : never;
interface RankingsProps<T extends FantasyProsClientLeague> {
    /**
     * The positions to return the rankings for. If omitted, all will be searched.
     */
    position?: FantasyProsPosition<T>;
    /**
     * The rankings type such as Rest of Season (ROS)" | " Dynasty (DK)" | " etc. Omit to get preseason/weekly rankings
     */
    rankingsType?: FantasyProsRankingsType<T>;
    /**
     * The fantasy season to get rankings for
     */
    season: number;
    /**
     * Whether to include the expert's information.
     * @FTD - Show expert information like name and twitter handle.
     */
    showExperts?: boolean;
    /**
     * Specific experts to get rankings from via the expert's id
     */
    specificExperts?: Array<string>;
    /**
     * The week to get the rankings for
     */
    week?: number;
}
interface RankingsWithScoringProps<T extends Omit<FantasyProsClientLeague, League.MLB>> extends RankingsProps<T> {
    /**
     * Leagues scoring type
     */
    scoring?: FantasyProsScoringType<T>;
}
interface RankingsResponse {
    count: number;
    expert_image_url?: {
        [key: string]: string;
    };
    expert_names?: {
        [key: string]: string;
    };
    expert_pub?: {
        [key: string]: string;
    };
    expert_twitter?: {
        [key: string]: string;
    };
    filters: string;
    last_updated: string;
    last_updated_ts: number;
    players: Array<RankingsPlayer>;
    position_id: string;
    ranking_type_name: string;
    scoring: string;
    sport: string;
    total_experts: number;
    type: string;
    week: string;
    year: string;
}
interface RankingsPlayer {
    cbs_player_id: string;
    experts?: {
        [key: string]: string;
    };
    player_bye_week?: string;
    player_ecr_delta?: number;
    player_eligibility: string;
    player_filename: string;
    player_id: number;
    player_image_url: string;
    player_name: string;
    player_owned_avg: number;
    player_owned_espn: number;
    player_owned_yahoo: number;
    player_page_url: string;
    player_position_id: string;
    player_positions: string;
    player_short_name: string;
    player_square_image_url: string;
    player_team_id: string;
    player_yahoo_id: string;
    player_yahoo_positions?: string;
    pos_rank: string;
    rank_ave: string;
    rank_ecr: number;
    rank_max: string;
    rank_min: string;
    rank_points: number;
    rank_std: string;
    sportsdata_id?: string;
    tier: number;
}

interface RequestParams {
    [key: string]: any;
}
declare class FantasyProsClient<S extends FantasyProsClientLeague> extends SportsSdkClient {
    protected readonly league: S;
    protected readonly apiKey: string;
    /**
     * Create a FantasyPros API client
     * @param league - The league to get data from
     * @param apiKey - The API key for authenticating API requests. If not provided, it will look for `FANTASY_PROS_KEY` in the environment variables.
     * @throws Will throw an error if the API key is not provided or found in the environment variables.
     */
    constructor(league: S, apiKey?: string);
    private isMlb;
    private isNfl;
    /**
     * Sends a GET request to the specified URL path.
     * @param path - The path to append to base URL to send the request to.
     * @param additionalParams - Additional query parameters for the request.
     * @returns The response data from the API
     * @throws Will throw an error if the request fails.
     */
    private request;
    /**
     * Lookup the current state for the sport. The state consists of the current week in the league, season start date, current season, current week, etc.
     * @returns The current state of the sport.
     */
    getRankings(params: GetRankingsParameters<S>): Promise<RankingsResponse>;
}

export { FantasyProsClient, type FantasyProsClientLeague, type FantasyProsMLBPosition, type FantasyProsMLBRankingsType, type FantasyProsNBAPosition, type FantasyProsNBARankingsType, type FantasyProsNBAScoringType, type FantasyProsNFLPosition, type FantasyProsNFLRankingsType, type FantasyProsNFLScoringType, type FantasyProsNHLPosition, type FantasyProsNHLRankingsType, type FantasyProsNHLScoringType, type FantasyProsPosition, type FantasyProsRankingsType, type FantasyProsScoringType, type GetRankingsParameters, type RankingsPlayer, type RankingsProps, type RankingsResponse, type RankingsWithScoringProps, type RequestParams };
