import { DataStoreInterface, HttpClientInterface } from './interfaces';
import { Query } from 'rollun-ts-rql';
import { AxiosResponse } from 'axios';
export interface HttpDataStoreOptions {
    client?: HttpClientInterface;
    idField?: string;
    timeout?: number;
    headers?: {
        [key: string]: string;
    };
}
export default class HttpDatastore<T = any> implements DataStoreInterface<T> {
    readonly identifier: any;
    protected readonly timeout: number;
    private url;
    constructor(url: string, { idField, timeout, headers }?: HttpDataStoreOptions);
    read(id: string): Promise<T>;
    has(id: string): Promise<boolean>;
    query<U = T>(query?: Query): Promise<Array<U>>;
    create(item: Partial<T>): Promise<T>;
    update(item: Partial<T>): Promise<T>;
    delete(id: string): Promise<T>;
    count(): Promise<number>;
    rewrite(item: Partial<T>): Promise<T>;
    protected getItemCount(response: AxiosResponse): number;
}
