///
import { Work } from "../types/context-types";
export interface IIndexApi {
all(): Promise;
find(selector: (index: PouchDB.Find.Index) => boolean): Promise;
filter(selector: (index: PouchDB.Find.Index) => boolean): Promise;
remove(index: PouchDB.Find.DeleteIndexOptions): Promise>;
create(creator: (factory: IIndexFactory) => void): Promise>;
}
export declare class IndexApi implements IIndexApi {
private readonly _doWork;
constructor(doWork: Work);
all(): Promise;
find(selector: (index: PouchDB.Find.Index) => boolean): Promise;
filter(selector: (index: PouchDB.Find.Index) => boolean): Promise;
create(creator: (factory: IIndexFactory) => void): Promise>;
remove(index: PouchDB.Find.DeleteIndexOptions): Promise>;
}
interface IIndexFactory {
fields(creator: (factory: IKeyFactory) => void): IIndexFactory;
/**
* This is the name to use for useIndex
* @param name Name
* @returns IIndexFactory
*/
designDocumentName(name: string): IIndexFactory;
name(name: string): IIndexFactory;
}
interface IKeyFactory {
add(name: string): IKeyFactory;
}
export {};