import { Query } from 'rollun-ts-rql'; export interface ReadInterface { readonly identifier: string; read(id: string): Promise; has(id: string): Promise; query(query?: Query): Promise>; count(): Promise; } export interface DataStoreInterface extends ReadInterface { create(item: Partial): Promise; rewrite(item: Partial): Promise; update(item: Partial): Promise; delete(id: string): Promise; } export interface HttpRequestOptions { timeout?: number; headers?: { [headerName: string]: string; }; } export interface HttpClientInterface { get(uri?: string, options?: HttpRequestOptions): Promise; post(uri?: string, body?: string | T, options?: HttpRequestOptions): Promise; put(uri?: string, body?: string | T, options?: HttpRequestOptions): Promise; delete(uri?: string, options?: HttpRequestOptions): Promise; head(uri?: string, options?: HttpRequestOptions): Promise; }