import type { RawAxiosRequestHeaders, AxiosError } from 'axios'; import { BaseConfig, CalApiParams, MakeApiUrlData } from './types'; export declare abstract class Base { protected token: string | (() => string); private readonly axios; private readonly discoveryUrl; private readonly serviceKey; private readonly requestAccountId; private readonly requestProvidersAccountId; protected readonly feature: string | null; private readonly _isCrossAccount; private status; private _currentAccountId; private _targetAccountId; private _providersAccountId; private _serviceUrl; protected constructor({ token, discoveryUrl, serviceKey, requestAccountId, requestProvidersAccountId, feature, accountId, serviceUrl, useDefaultSerializer, paramSerializer, httpAgents, interceptors, }: BaseConfig); /** * @deprecated used for migration stage only * @ignore */ get currentAccountId(): string | null; /** @ignore */ get targetAccountId(): string | null; /** * @deprecated used for migration stage only * @ignore */ get providersAccountId(): string | null; /** @ignore */ get isCrossAccount(): boolean; /** @ignore */ init(): Promise; private injectInterceptors; /** @ignore */ private getServiceData; /** @ignore */ private getAccountId; /** @ignore */ private getProvidersAccId; /** @ignore */ get serviceUrl(): string | null; /** * * Override this method in case if api url has specific url arguments * @ignore */ makeApiUrl(data: MakeApiUrlData): string; /** * Method for parsing errors thrown from callApi request * * Override this method in case if you need specific error handling * @ignore */ parseError(e: AxiosError): Error; private getErrorSourcePrefix; /** @ignore */ protected getHeaders(): RawAxiosRequestHeaders; /** @ignore */ protected getToken(): string; /** * Make API request * ```typescript * const result = await instance.callApi({ * route: '/route', * method: 'GET', * data: requestData, * params: queryParams, * timeout: 2500, * }); * ``` * @deprecated use callApiV2 * @ignore */ protected callApi(params: CalApiParams): Promise; /** * Make API request * ```typescript * const result = await instance.callApi({ * route: '/route', * method: 'GET', * data: requestData, * params: queryParams, * timeout: 2500, * }); * ``` * @ignore */ protected callApiV2(params: CalApiParams): Promise; /** * Normalize route ro remove spaces from param * ```typescript * const result = await instance.normalizeRoute('/route'); * ``` * @ignore */ protected normalizeRoute(data: string): string; /** * Normalize URL for API request * @param {CalApiParams} params request params * @returns {string} normalized URL * @ignore */ protected getUrl(params: CalApiParams): string; } //# sourceMappingURL=Base.d.ts.map