import { IDictionary } from "../model/IDictionary"; import { IRequestToken } from "../model/IRequestToken"; import { IValidation } from "../model/IValidation"; import { ResponseError } from "./ResponseError"; export interface IRequestInit { method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; headers?: IDictionary; body?: any; token?: string | IRequestToken; allowUnsafeRetries?: boolean; json?: boolean; } export interface IResponse { body: T; headers: Headers; } export declare abstract class BaseClient { protected endpoint: string | undefined; static retries: number; static waitForConnectivity: () => Promise; static onResponseError: (error: ResponseError) => Promise; private validateHeaders; private verbose; private configuredRetries; private timeoutMs?; private maxBackoffDelayMs; private json; constructor(endpoint: string | undefined, options?: { validateHeaders?: (headers: Headers) => IValidation; verbose?: boolean; retries?: number; timeoutMs?: number; maxBackoffDelayMs?: number; json?: boolean; }); protected getRetries(): number; protected getHeaders(): { [_: string]: string; }; protected fetch(path: string, extendedInit?: IRequestInit): Promise; protected fetchVerbose(path: string, extendedInit?: IRequestInit): Promise>; private doFetch; private getConstructor; static isNetworkError(error: any): boolean; }