import type { Action } from "@reduxjs/toolkit";
import type { State } from "../../../../../metabase-types/store";
export interface EntityQuery<TId> {
    id: TId;
}
export interface EntityFetchOptions {
    reload?: boolean;
    requestType?: string;
}
export interface EntityQueryOptions<TId> {
    entityId?: TId;
}
export interface UseEntityOwnProps<TId, TItem> {
    fetch: (query: EntityQuery<TId>, options?: EntityFetchOptions) => Action;
    getObject: (state: State, options: EntityQueryOptions<TId>) => TItem | undefined;
    getLoading: (state: State, options: EntityQueryOptions<TId>) => boolean;
    getError: (state: State, options: EntityQueryOptions<TId>) => unknown;
    requestType?: string;
}
export interface UseEntityQueryProps<TId, TQuery = never> {
    id?: TId;
    query?: TQuery;
    reload?: boolean;
    enabled?: boolean;
}
export interface UseEntityQueryResult<TItem> {
    data?: TItem;
    isLoading: boolean;
    error: unknown;
}
/**
 * @deprecated use "metabase/api" instead
 */
export declare const useEntityQuery: <TId, TItem, TQuery = never>({ id: entityId, query: entityQuery, reload, enabled, }: UseEntityQueryProps<TId, TQuery>, { fetch, getObject, getLoading, getError, requestType, }: UseEntityOwnProps<TId, TItem>) => UseEntityQueryResult<TItem>;
