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

15 lines 1.38 kB
import { ACCESS_TYPE } from '@sage-bionetworks/synapse-types'; declare const entityPermissionLevels: readonly ["CAN_VIEW", "CAN_DOWNLOAD", "CAN_EDIT", "CAN_EDIT_DELETE", "CAN_ADMINISTER"]; export type EntityPermissionsLevel = (typeof entityPermissionLevels)[number]; declare const accessRequirementPermissionLevels: readonly ["CAN_REVIEW_SUBMISSIONS", "IS_EXEMPTION_ELIGIBLE", "CAN_REVIEW_SUBMISSIONS_AND_IS_EXEMPTION_ELIGIBLE"]; export type AccessRequirementPermissionsLevel = (typeof accessRequirementPermissionLevels)[number]; declare const oauthClientPermissionLevels: readonly ["CAN_ADMINISTER_OAUTH_CLIENT"]; export type OAuthClientPermissionsLevel = (typeof oauthClientPermissionLevels)[number]; declare const portalClientPermissionLevels: readonly ["CAN_ADMINISTER_PORTAL"]; export type PortalClientPermissionsLevel = (typeof portalClientPermissionLevels)[number]; export type PermissionLevel = EntityPermissionsLevel | AccessRequirementPermissionsLevel | OAuthClientPermissionsLevel | PortalClientPermissionsLevel; export declare const getPermissionLevelFromAccessType: (accessType: ACCESS_TYPE[]) => PermissionLevel; export declare const getAccessTypeFromPermissionLevel: (permissionLevel: PermissionLevel) => ACCESS_TYPE[]; export declare const permissionLevelToLabel: Record<PermissionLevel, string>; export {}; //# sourceMappingURL=PermissionLevelToAccessType.d.ts.map