import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query"; import { GetOneResponse, HttpError, BaseRecord, BaseKey, MetaDataQuery, LiveModeProps, SuccessErrorNotification } from "../../interfaces"; export declare type UseOneProps = { /** * Resource name for API data interactions */ resource: string; /** * id of the item in the resource * @type [`BaseKey`](/docs/api-reference/core/interfaceReferences/#basekey) */ id: BaseKey; /** * react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options */ queryOptions?: UseQueryOptions, TError>; /** * Metadata query for `dataProvider`, */ metaData?: MetaDataQuery; /** * If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use. * @default `"default"`` */ dataProviderName?: string; } & SuccessErrorNotification & LiveModeProps; /** * `useOne` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/guides/queries `useQuery`} used for retrieving single items from a `resource`. * * It uses `getOne` method as query function from the `dataProvider` which is passed to ``. * * @see {@link https://refine.dev/docs/core/hooks/data/useOne} for more details. * * @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-references/interfaceReferences#baserecord `BaseRecord`} * @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-references/interfaceReferences#httperror `HttpError`} * */ export declare const useOne: ({ resource, id, queryOptions, successNotification, errorNotification, metaData, liveMode, onLiveEvent, liveParams, dataProviderName, }: UseOneProps) => QueryObserverResult, unknown>; //# sourceMappingURL=useOne.d.ts.map