import { AxiosPromise, AxiosRequestConfig } from 'axios'; type ErrorData = { errorId: string; application: string; errorCode: string; message: string; originalErrorCode?: string; }; declare function initApi(apiDeclaration: ApiDeclaration, baseURL: string): Api; type ApiMethodDeclaration = { (params: ParamsData): AxiosRequestConfig; _r?: ResponseData; }; type PickApiMethodResponseType = T extends ApiMethodDeclaration ? R : never; type PickApiMethodParamsType = T extends ApiMethodDeclaration ? P : never; type ApiDeclaration = { [P in keyof T]: T[P]; }; type Api = { [P in keyof T]: MakeServiceFromServiceDeclaration>; }; type MakeServiceFromServiceDeclaration = { (params: ExtractApiMethodParamsType): AxiosPromise>; }; type ExtractApiMethodResponseDataType = T extends ApiMethodDeclaration ? D : any; type ExtractApiMethodParamsType = T extends ApiMethodDeclaration ? P : any; type ExtendServiceParams = ApiMethodDeclaration, ExtractApiMethodResponseDataType>; export { ErrorData, initApi, ApiMethodDeclaration, PickApiMethodResponseType, PickApiMethodParamsType, ApiDeclaration, Api };