Update selected item color in Pass menu
[ProtonMail-WebClient.git] / packages / pass / lib / search / types.ts
blobff36f9717a4fe87947967ff1a0724949ea9b0beb
1 import type { FormSubmission, ItemRevision, ItemSortFilter, ItemType, MaybeNull } from '@proton/pass/types';
2 import type { ParsedUrl } from '@proton/pass/utils/url/types';
4 export type ItemMatchFuncMap = { [T in ItemType]: ItemMatchFunc<T> };
6 export type ItemMatchFunc<T extends ItemType = ItemType> = (item: ItemRevision<T>) => (needles: string[]) => boolean;
8 export type SelectItemsOptions = {
9     search?: string;
10     shareId?: MaybeNull<string>;
11     sort?: MaybeNull<ItemSortFilter>;
12     trashed?: boolean;
13     type?: MaybeNull<ItemType>;
16 export type SelectItemsByDomainOptions = {
17     isPrivate: boolean;
18     port: MaybeNull<string>;
19     protocol: MaybeNull<string>;
20     shareIds?: string[];
21     sortOn?: 'priority' | 'lastUseTime';
22     strict?: boolean;
25 export type SelectAutofillCandidatesOptions = ParsedUrl & { shareIds?: string[]; strict?: boolean };
26 export type SelectOTPAutofillCandidateOptions = ParsedUrl & { submission?: FormSubmission };
27 export type SelectAutosaveCandidatesOptions = { domain: string; userIdentifier: string; shareIds?: string[] };