import { HttpClient, HttpErrorResponse, HttpRequest, HttpResponse } from '@angular/common/http';
import { InjectionToken } from '@angular/core';
import { SdCacheOption } from '@sd-angular/core/services/cache';
export interface SdApiOption {
    cacheOption?: SdCacheOption;
    timeout?: number;
    autoCache?: boolean;
}
type HttpGetOption = Parameters<HttpClient['get']>[1];
export type SdGetOption = HttpGetOption & SdApiOption;
type HttpPostOption = Parameters<HttpClient['post']>[2];
export type SdPostOption = HttpPostOption & SdApiOption;
type HttpPutOption = Parameters<HttpClient['put']>[2];
export type SdPutOption = HttpPutOption & SdApiOption;
type HttpDeleteOption = Parameters<HttpClient['delete']>[1];
export type SdDeleteOption = HttpDeleteOption & SdApiOption;
export interface SdApiHandler {
    hosts: string[];
    intercept?: (request: HttpRequest<any>) => HttpRequest<any>;
    beforeRemote?: (request: HttpRequest<any>) => void | Promise<void>;
    afterRemote?: (response: HttpResponse<any> | HttpErrorResponse | Error) => void | Promise<void>;
    mapResponse?: <Tres = any, Tdata = any>(response: Tres) => Tdata;
    timeout?: number;
}
export interface ISdApiConfiguration {
    handlers: SdApiHandler[];
}
export declare const SD_API_CONFIG: InjectionToken<ISdApiConfiguration>;
export declare const TOKEN: string;
export {};
