2022-10-14 18:25:50 +02:00
|
|
|
import { CipherView } from "../models/view/cipher.view";
|
|
|
|
import { SendView } from "../models/view/send.view";
|
2018-02-28 21:15:10 +01:00
|
|
|
|
|
|
|
export abstract class SearchService {
|
2021-04-22 21:53:45 +02:00
|
|
|
indexedEntityId?: string = null;
|
2018-08-13 15:42:52 +02:00
|
|
|
clearIndex: () => void;
|
2018-08-13 17:52:55 +02:00
|
|
|
isSearchable: (query: string) => boolean;
|
2021-04-22 21:53:45 +02:00
|
|
|
indexCiphers: (indexedEntityGuid?: string, ciphersToIndex?: CipherView[]) => Promise<void>;
|
2020-04-08 22:44:13 +02:00
|
|
|
searchCiphers: (
|
|
|
|
query: string,
|
2020-08-12 21:42:42 +02:00
|
|
|
filter?: ((cipher: CipherView) => boolean) | ((cipher: CipherView) => boolean)[],
|
2020-04-08 22:44:13 +02:00
|
|
|
ciphers?: CipherView[]
|
|
|
|
) => Promise<CipherView[]>;
|
2020-04-03 22:32:15 +02:00
|
|
|
searchCiphersBasic: (ciphers: CipherView[], query: string, deleted?: boolean) => CipherView[];
|
2021-01-23 02:54:22 +01:00
|
|
|
searchSends: (sends: SendView[], query: string) => SendView[];
|
2018-02-28 21:15:10 +01:00
|
|
|
}
|