mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
* refactored injector of services on the browser service module * refactored the search and popup serach service to use state provider * renamed back to default * removed token service that was readded during merge conflict * Updated search service construction on the cli * updated to use user key definition * Reafctored all components that refernce issearchable * removed commented variable * added uncommited code to remove dependencies not needed anymore * added uncommited code to remove dependencies not needed anymore
21 lines
835 B
TypeScript
21 lines
835 B
TypeScript
import { Observable } from "rxjs";
|
|
|
|
import { SendView } from "../tools/send/models/view/send.view";
|
|
import { IndexedEntityId } from "../types/guid";
|
|
import { CipherView } from "../vault/models/view/cipher.view";
|
|
|
|
export abstract class SearchService {
|
|
indexedEntityId$: Observable<IndexedEntityId | null>;
|
|
|
|
clearIndex: () => Promise<void>;
|
|
isSearchable: (query: string) => Promise<boolean>;
|
|
indexCiphers: (ciphersToIndex: CipherView[], indexedEntityGuid?: string) => 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[];
|
|
}
|