export type FindAnyFileWindowMode = 0 | 1 | 2; export type FindAnyFileTextValues = string | readonly string[]; export type FindAnyFileJsonPrimitive = string | number | boolean | null; export type FindAnyFileJsonValue = FindAnyFileJsonPrimitive | readonly FindAnyFileJsonValue[] | { readonly [key: string]: FindAnyFileJsonValue; }; export type FindAnyFileJsonData = { readonly [key: string]: FindAnyFileJsonValue; }; export type FindAnyFileRunControl = { /** * `run=0` prevents the search from automatically starting; `run=1` forces the search to start. */ run?: 0 | 1; norun?: never; } | { run?: never; /** * Adds FAF's documented bare `norun` parameter. */ norun?: true; }; export type FindAnyFileFindFields = { /** * Text for FAF's input fields. A string is serialized as `inp`; an array is serialized as `inp1`, `inp2`, ... */ inp?: FindAnyFileTextValues; /** * Search locations. A string is serialized as `loc`; an array is serialized as `loc1`, `loc2`, ... */ loc?: FindAnyFileTextValues; /** * Selects the Find window: 0 reuses the frontmost window, 1 reuses a non-altered window, 2 opens a new window. */ win?: FindAnyFileWindowMode; /** * `root=1` performs the search in root mode. */ root?: 1; /** * Search Template name without the `.faf` extension. */ tpl?: string; }; export type FindAnyFileFindPayload = FindAnyFileFindFields & FindAnyFileRunControl; export type FindAnyFileFindInLocationPayload = Omit & FindAnyFileRunControl & { /** * Search locations. A string is serialized as `loc`; an array is serialized as `loc1`, `loc2`, ... */ loc: FindAnyFileTextValues; }; export type FindAnyFileFindWithTemplatePayload = Omit & FindAnyFileRunControl & { /** * Search Template name without the `.faf` extension. */ tpl: string; }; export declare function findAnyFileFindUrl(payload?: FindAnyFileFindPayload): string; export declare function encodeFindAnyFileJsonData(json: string | FindAnyFileJsonData): string;