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 FieldMatch<T extends ItemType = ItemType> = (item: ItemRevision<T>) => (needle: string) => boolean;
5 export type ItemMatch<T extends ItemType = ItemType> = (item: ItemRevision<T>) => (needles: string[]) => boolean;
6 export type ItemMatchMap = { [T in ItemType]: ItemMatch<T> };
8 export type SelectItemsOptions = {
10 shareId?: MaybeNull<string>;
11 sort?: MaybeNull<ItemSortFilter>;
13 type?: MaybeNull<ItemType>;
16 export type SelectItemsByDomainOptions = {
18 port: MaybeNull<string>;
19 protocol: MaybeNull<string>;
21 sortOn?: 'priority' | 'lastUseTime';
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[] };