UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

26 lines 1.34 kB
import { RestrictionUiType } from './AccessIcon'; import { EntityBundle } from '@sage-bionetworks/synapse-types'; import { SynapseClientError } from '@/utils'; import { UseQueryOptions } from '@tanstack/react-query'; import { SxProps, Theme } from '@mui/material'; /** * Determines whether an Entity is accessible for download, or if it is blocked by the ACL or unmet Access Requirements. * * To make download available, and determine if the file is downloadable via the web, see {@link DirectDownload.tsx} * @param entityId * @returns */ export declare function useGetRestrictionUiType(entityId: string, useGetIsExternalFileHandleOptions: Partial<UseQueryOptions<EntityBundle, SynapseClientError, boolean>>): RestrictionUiType | undefined; export declare function useHasAccess(entityId: string, iconWrap?: boolean, iconSx?: SxProps<Theme>, options?: { showExternalAccessIcon?: boolean; }): { restrictionUiType: RestrictionUiType | undefined; accessText: string; icon: import("react/jsx-runtime").JSX.Element; handleGetAccess: () => void; isClickable: boolean; accessRequirementDialog: import("react/jsx-runtime").JSX.Element | null; setDisplayAccessRequirement: import("react").Dispatch<import("react").SetStateAction<boolean>>; }; export default useHasAccess; //# sourceMappingURL=useHasAccess.d.ts.map