export type Json = Record; export type QueryOptions = { before?: string; after?: string; limit?: number; }; export type RequestOptions = { retries?: number; timeout?: number; signal?: AbortSignal; useCache?: boolean; cacheSeconds?: number; }; export type PaginatedRequestOptions = RequestOptions & QueryOptions; export type CacheOptions = { enabled?: boolean; ttl?: number; maxSize?: number; }; export type BrawlStarsClientOptions = { token: string; timeout?: number; retries?: number; cache?: CacheOptions; }; export interface PlayerEndpoints { get: (playerTag: string, options?: RequestOptions) => Promise; getPlayer: (playerTag: string, options?: RequestOptions) => Promise; getBattlelog: (playerTag: string, options?: RequestOptions) => Promise; } export interface ClubEndpoints { get: (clubTag: string, options?: RequestOptions) => Promise; getClub: (clubTag: string, options?: RequestOptions) => Promise; getClubMembers: (clubTag: string, options?: PaginatedRequestOptions) => Promise; getMembers: (clubTag: string, options?: RequestOptions) => Promise; } export interface RankingEndpoints { getPlayerRankings: (countryCode: string, options?: PaginatedRequestOptions) => Promise; getClubRankings: (countryCode: string, options?: PaginatedRequestOptions) => Promise; getBrawlerRankings: (countryCode: string, brawlerId: number, options?: PaginatedRequestOptions) => Promise; getPlayers: (countryCode: string, options?: RequestOptions) => Promise; getClubs: (countryCode: string, options?: RequestOptions) => Promise; getBrawler: (countryCode: string, brawlerId: number, options?: RequestOptions) => Promise; } export interface BrawlerEndpoints { getBrawlers: (options?: PaginatedRequestOptions) => Promise; getAll: (options?: RequestOptions) => Promise; getBrawler: (brawlerId: number, options?: RequestOptions) => Promise; getBrawlerById: (brawlerId: number, options?: RequestOptions) => Promise; } export interface EventEndpoints { getGameModes: (options?: PaginatedRequestOptions) => Promise; getRotation: (options?: RequestOptions) => Promise; } export declare class BrawlStarsClient { #private; readonly players: PlayerEndpoints; readonly clubs: ClubEndpoints; readonly rankings: RankingEndpoints; readonly brawlers: BrawlerEndpoints; readonly events: EventEndpoints; constructor(options: string | BrawlStarsClientOptions); /** Fetches an endpoint using the same authenticated, cached request pipeline as resources. */ fetch(endpoint: string, options?: RequestOptions): Promise; /** Removes every entry from this client instance's in-memory cache. */ clearCache(): void; /** Removes one normalized endpoint and query combination from the cache. */ invalidateCache(endpoint?: string): void; private validatedBrawlerId; private ranking; private request; private send; private parseResponse; private httpError; private delay; }