import type { APICallStartHook, APICallEndHook, APIRequest, APIResponse, FetchType, ResponseDecoder, RetryConfig, APICallRetryHook } from './types'; export declare class APICaller { static startHooks: APICallStartHook[]; static endHooks: Array>; static retryHooks: Array>; /** * @name APICaller.call * @description A global function for making API Calls, Uses fetch and constructs request from apiRequest param passed * @param apiRequest An instance/object which implements APIRequest interface used to call API * @param responseDecoder An function which helps decoding successful raw response to expected success type * @param errorResponseDecoder A function which helps decoding failure raw response to expected failure type * @param apiCaller function to override the native fetch method * @returns An resolved Promise with Two Instances - APISuccess or APIFailure */ static call(apiRequest: APIRequest, responseDecoder: ResponseDecoder, errorResponseDecoder?: ResponseDecoder | null, apiCaller?: FetchType): Promise>; /** * @description A global function for making API Calls, Uses fetch and constructs request from apiRequest param passed with support retrying failed calls * @param apiRequest An instance/object which implements APIRequest interface used to call API * @param responseDecoder An function which helps decoding successful raw response to expected success type * @param retryConfig Configuration for retrying failed API calls * @param errorResponseDecoder A function which helps decoding failure raw response to expected failure type * @param apiCaller function to override the native fetch method * @returns An resolved Promise with Two Instances - APISuccess or APIFailure */ static callWithRetries(apiRequest: APIRequest, responseDecoder: ResponseDecoder, retryConfig: RetryConfig, errorResponseDecoder?: ResponseDecoder | null, apiCaller?: FetchType): Promise>; static registerStartHook(hook: APICallStartHook): void; static registerEndHook(hook: APICallEndHook): void; static registerRetryHook(hook: APICallRetryHook): void; }