import { SearchQuery, SearchTarget, SortField, SortOrder } from '@mtna/search-manager-ui'; import { MtnaSearchStateConfig } from '../models/index'; export declare type UpdatedQueryOutput = { alreadyLoadedTarget: boolean; query: SearchQuery; useDefaults: boolean; concatResults: boolean; }; /** * Given several parameters, derrive an updated search query to perform. This will use the * `lastQuery` values initially, any properties from the partial query will override the values from the last query. * * @param query A new partial query to search with * @param lastQuery The last successful search query * @param targetId Optional search target ID to use * @param useDefaults Whether to use the default sorting and filters specified by the SearchTarget. This will override any values passed in the query. * @param concatResults Whether to concatenate the new results on the existing results on the state. This is typical for a load more. * @param target Optionally loaded search target currently on the state * @param searchStateConfig Optional globally injected search state configurations * @returns An object with the updated query, whether to use search target defaults, and whether the search target is already loaded on the state. */ export declare function getUpdatedQuery(query: Partial, lastQuery: SearchQuery, targetId?: string, useDefaults?: boolean, concatResults?: boolean, target?: SearchTarget, searchStateConfig?: MtnaSearchStateConfig): UpdatedQueryOutput; /** The type expected by the custom {@link mapUpdatedQuery} operator from upstream. */ export declare type MapUpdatedQueryUpstrem = [ { targetId?: string | undefined; query: Partial; useDefaults?: boolean | undefined; concatResults?: boolean; }, SearchQuery, SearchTarget | undefined ]; /** * A custom rxjs operator that maps to an {@link UpdatedQueryOutput} * @param searchStateConfig Optional search state configuration object * @returns pipable operator that will output an {@link UpdatedQueryOutput} */ export declare function mapUpdatedQuery(searchStateConfig?: MtnaSearchStateConfig): import("rxjs").OperatorFunction; /** * Function to derrive an updated array of SortField's. * @param field the current field * @param order the order of the current field * @param sortFields an array of sort fields * @returns updated SortField[] */ export declare function getUpdatedSortFields(field: string, order: SortOrder, sortFields: SortField[] | null | undefined): SortField[];