synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
15 lines • 1.38 kB
TypeScript
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