import { KeyedMutator } from 'swr'; import type { FetchHookOptions, HookResponse } from './types.js'; import { FetchResponse, PageInfo, PostEntity, PostsArchiveParams, QueriedObject, SearchFetchStrategy } from '../../data/index.js'; export interface useSearchResponse extends HookResponse { data: { posts: T[]; pageInfo: PageInfo; queriedObject: QueriedObject; }; mutate: KeyedMutator>; } /** * The useFetchSearch hook. Returns a collection of post entities * * See {@link useSearch} for usage instructions. * * @param params The list of params to pass to the fetch strategy. It overrides the ones in the URL. * @param options The options to pass to the swr hook. * @param path The path of the url to get url params from. * * @category Data Fetching Hooks */ export declare function useFetchSearch(params?: P | {}, options?: FetchHookOptions>, path?: string): useSearchResponse; /** * @internal */ export declare namespace useFetchSearch { const fetcher: (sourceUrl?: string, defaultParams?: P) => SearchFetchStrategy; }