import { KeyedMutator } from 'swr'; import type { FetchHookOptions, HookResponse } from './types.js'; import { FetchResponse, PostEntity, PostParams, SinglePostFetchStrategy } from '../../data/index.js'; export interface usePostResponse extends HookResponse { data: { post: T; pageInfo: FetchResponse['pageInfo']; queriedObject: FetchResponse['queriedObject']; }; mutate: KeyedMutator>; } /** * The useFetchPost hook. Returns a single post entity * * See {@link usePost} 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. * * @module useFetchPost * @category Data Fetching Hooks */ export declare function useFetchPost(params?: P | {}, options?: FetchHookOptions>, path?: string): usePostResponse; /** * @internal */ export declare namespace useFetchPost { const fetcher: (sourceUrl?: string, defaultParams?: P) => SinglePostFetchStrategy; }