import { RequestInit } from '@genee/fetch';
type Path = string | {
    path: string;
    query: string | Record<string, string | string[]>;
};
type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
declare abstract class AbstractREST {
    protected baseUrl: string;
    constructor(baseUrl: string);
    protected abstract get additionalHeaders(): Record<string, string>;
    protected abstract get additionalQueries(): Record<string, string>;
    abstract url(path: Path): string;
    protected init(): Promise<void>;
    private _initPromise;
    private _initializing;
    protected initOnlyOnce(): Promise<void>;
    protected timeout: number;
    protected hashsum?: (url: string, body: any) => string;
    private _cookie?;
    get cookie(): string;
    protected rawRequest<Response = any, Payload = any>(method: Method, path: Path, body?: Payload, init_?: RequestInit): Promise<any>;
    reset(): void;
    request<Response = any, Payload = any>(method: Method, path: Path, body?: Payload, init?: RequestInit): Promise<Response>;
    get<Response = any>(path: Path, init?: RequestInit): Promise<Response>;
    post<Response = any, Payload = any>(path: Path, body?: Payload, init?: RequestInit): Promise<Response>;
    put<Response = any, Payload = any>(path: Path, body?: Payload, init?: RequestInit): Promise<Response>;
    patch<Response = any, Payload = any>(path: Path, body?: Payload, init?: RequestInit): Promise<Response>;
    delete<Response = any>(path: Path, init?: RequestInit): Promise<Response>;
}
export { AbstractREST, Method, Path };
