import { ServiceError } from '@escapenavigator/utils/dist/get-service-error'; import { AxiosPromise, AxiosResponse } from 'axios'; type ApiMethod = { (params: P, transportConfig?: T): AxiosPromise; displayName: DisplayName; }; type BaseResult = { fetch: ApiMethod; data: R | null; loading: boolean; error: ServiceError | null; statusOk: boolean | null; }; type Result = { [K in keyof BaseResult as `${DisplayName}${Capitalize}`]: BaseResult[K]; }; type Props = { api: ApiMethod; successCallback?: (data: AxiosResponse, params: P) => void; errorCallback?: (error: ServiceError) => void; }; export declare const useApiMethod: ({ api, successCallback, errorCallback, }: Props) => Result; export {};