17 lines
693 B
TypeScript
17 lines
693 B
TypeScript
import { CipherView } from "../models/view/cipher.view";
|
|
import { SendView } from "../models/view/send.view";
|
|
|
|
export abstract class SearchService {
|
|
indexedEntityId?: string = null;
|
|
clearIndex: () => void;
|
|
isSearchable: (query: string) => boolean;
|
|
indexCiphers: (indexedEntityGuid?: string, ciphersToIndex?: CipherView[]) => Promise<void>;
|
|
searchCiphers: (
|
|
query: string,
|
|
filter?: ((cipher: CipherView) => boolean) | ((cipher: CipherView) => boolean)[],
|
|
ciphers?: CipherView[]
|
|
) => Promise<CipherView[]>;
|
|
searchCiphersBasic: (ciphers: CipherView[], query: string, deleted?: boolean) => CipherView[];
|
|
searchSends: (sends: SendView[], query: string) => SendView[];
|
|
}
|