///
import { CountResponse, GetResponse, SearchResponse } from 'elasticsearch';
import { Readable } from 'stream';
import { ApiResponse, Client, RequestParams } from '@elastic/elasticsearch';
import { AnyClass, Indexed, IndexedClass } from '../types';
export declare type IndexedGetParams = Indexed;
export declare type IndexedSearchParams = Indexed;
export declare type IndexedCountParams = Indexed;
export declare const DEFAULT_BULK_SIZE = 100;
export interface ICoreOptions {
indexPrefix?: string;
}
export interface ISearchOptions {
instantiateResult?: boolean;
}
export declare class Core {
private readonly client;
private readonly options;
static getIndices(): AnyClass[];
constructor(client: Client, options: ICoreOptions);
close(): void | Promise;
bulkIndex(cls: IndexedClass, documentsOrStream: Array> | Readable, bulkSize?: number): Promise;
count(clsOrParams: RequestParams.Count): Promise>;
count(clsOrParams: IndexedClass, countParams?: RequestParams.Count): Promise>;
create(docOrClass: T | IndexedClass, docOrId?: Partial | string, doc?: Partial): Promise;
delete(docOrClass: T | IndexedClass, docId?: string): Promise;
get(cls: IndexedClass, idOrParams: string | IndexedGetParams): Promise<{
response: ApiResponse>;
document: T;
}>;
index(docOrClass: T | IndexedClass, docOrId?: Partial | string, doc?: Partial): Promise;
scroll(cls: IndexedClass, params: RequestParams.Scroll): Promise<{
response: ApiResponse>;
documents: T[];
}>;
search(cls: IndexedClass, params: IndexedSearchParams, options?: ISearchOptions): Promise<{
response: ApiResponse>;
documents: T[];
}>;
update(docOrClass: T | IndexedClass, docOrId?: Partial | string, doc?: Partial): Promise;
}