UNPKG

@refinedev/core

Version:

Refine is a React meta-framework for building enterprise-level, data-intensive applications rapidly with support for modern UI libraries and headless integrations.

17 lines 1.01 kB
import { type UseQueryOptions, type UseQueryResult } from "@tanstack/react-query"; import type { PermissionResponse } from "../../../contexts/auth/types"; export type UsePermissionsProps<TData = PermissionResponse, TParams extends Record<string, any> = Record<string, any>> = { options?: UseQueryOptions<TData>; params?: TParams; }; export type UsePermissionsReturnType<TData = PermissionResponse> = UseQueryResult<TData, unknown>; /** * `usePermissions` calls `getPermissions` method from {@link https://refine.dev/docs/api-reference/core/providers/auth-provider `authProvider`} under the hood. * * @see {@link https://refine.dev/docs/api-reference/core/hooks/auth/usePermissions} for more details. * * @typeParam TData - Result data of the query * */ export declare function usePermissions<TData = any, TParams extends Record<string, any> = Record<string, any>>({ options, params, }: UsePermissionsProps<TData, TParams>): UsePermissionsReturnType<TData>; //# sourceMappingURL=index.d.ts.map