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 = {
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[] };