import { ApiResultT } from '../types/ApiResult'; import { Action, ActionT } from '../types/HaloTypes'; export type ExceptionCallback = (ex: any) => boolean | undefined; export interface HttpPostOptions { url: string; data?: object; success?: ActionT; fail?: ActionT>; callback?: ActionT>; exception?: ExceptionCallback; successMessage?: string | boolean; failMessage?: string; mutexKey?: string | boolean; loadingStatus?: ActionT; } export interface HttpGetOptions { url: string; callback?: ActionT; exception?: ExceptionCallback; loadingStatus?: ActionT; quiet?: boolean; } export interface OpenFileOptions { url: string; contentType?: string; method?: string; loadingStatus?: ActionT; exception?: ExceptionCallback; callback?: Action; } export interface DownloadFileOptions { url: string; filename?: string; contentType?: string; method?: string; exception?: ExceptionCallback; loadingStatus?: ActionT; callback?: Action; } export declare const useHttpTools: () => { post: (options: HttpPostOptions) => Promise; get: (options: HttpGetOptions) => Promise; confirmToPost: (title: string | undefined, message: string, options: HttpPostOptions) => void; getHttpErrorMessage: (ex: any, defaultErrorMessage?: string) => Promise; openFile: (options: OpenFileOptions) => Promise; downloadFile: (options: DownloadFileOptions) => Promise; };