import Base from '../Base'; import { RetryDecision } from '../../resources/enums'; import type { AuthSessionStoreKey } from '../../resources/enums'; import type Client from '../Client'; import type { AxiosRequestConfig } from 'axios'; interface RequestHeaders { [key: string]: any; } type RequestConfig = Omit & { headers?: RequestHeaders; }; export type RetryDecisionCallback = () => RetryDecision; /** * Represents the client's HTTP manager * @private */ declare class HTTP extends Base { /** * The axios instance */ private axios; /** * @param client The main client */ constructor(client: Client); /** * Sends an HTTP request * @param config The request config * @param retryDecision The callback deciding how to handle a rate limit retry * @param retries How many times this request has been retried (5xx errors) */ request(config: RequestConfig, retryDecision?: RetryDecisionCallback, retries?: number): Promise; /** * Sends an HTTP request to the Fortnite API * @param config The request config * @param auth The auth session to use * @param retryDecision The callback deciding how to handle a rate limit retry * @param authRetries How many times authentication has been retried (at most once) * @throws {EpicgamesAPIError} * @throws {AxiosError} * @throws {RetryAbandonedError} */ epicgamesRequest(config: RequestConfig, auth?: AuthSessionStoreKey, retryDecision?: RetryDecisionCallback, authRetries?: number): Promise; } export default HTTP;