import { ApiConfig, RolePermissionInterface, ApiListType } from "./interfaces";
declare global {
    interface Window {
        __CHURCHAPPS_API_HELPER__?: ApiHelperClass;
    }
    var __CHURCHAPPS_API_HELPER__: ApiHelperClass | undefined;
}
declare class ApiHelperClass {
    apiConfigs: ApiConfig[];
    isAuthenticated: boolean;
    onRequest: (url: string, requestOptions: any) => void;
    onError: (url: string, requestOptions: any, error: any) => void;
    getConfig(keyName: string): ApiConfig;
    setDefaultPermissions(jwt: string): void;
    setPermissions(keyName: string, jwt: string, permissions: RolePermissionInterface[]): void;
    clearPermissions(): void;
    get(path: string, apiName: ApiListType): Promise<any>;
    getAnonymous(path: string, apiName: ApiListType): Promise<any>;
    post(path: string, data: any[] | {}, apiName: ApiListType): Promise<any>;
    patch(path: string, data: any[] | {}, apiName: ApiListType): Promise<any>;
    delete(path: string, apiName: ApiListType): Promise<void>;
    postAnonymous(path: string, data: any[] | {}, apiName: ApiListType): Promise<any>;
    fetchWithErrorHandling(url: string, requestOptions: any): Promise<any>;
    private throwApiError;
}
export declare const ApiHelper: any;
export type { ApiHelperClass };
//# sourceMappingURL=ApiHelper.d.ts.map