import { FetchError } from "./types/FetchError"; export type UsePostOptions = { onSuccess?: (res: Response) => void; onError?: (error: FetchError) => void; onResponseGot?: (url: string, endpoint: string, responseCode: number | string | undefined) => void; convertToFormData?: boolean; removeIfValueIsNullOrUndefined?: boolean; headers?: Record; accessTokenLocalStorageKey?: string; callRefreshToken?: () => { on: number[]; body: Record; endpoint: string; saveAccessTokenFromResponse?: (res: any) => void; }; }; export declare function usePost(baseApiUrl: string, url: string, options?: UsePostOptions): { error: FetchError | undefined; loading: boolean; postData: (dataToPost: PostDataType, id?: number | string) => Promise; };