// @flow import * as React from 'react'; import type { MessageDescriptor } from 'react-intl'; import { LIST_ACCESS_LEVEL, MANAGED_USERS_ACCESS_LEVEL, SECURITY_CONTROLS_FORMAT, SHARED_LINK_ACCESS_LEVEL, } from './constants'; type DownloadManagedUserAccessLevel = $Values | null; type SharedLinkAccessLevel = $Values | null; type ExternalCollabAccessLevel = $Values | null; type ApplicationAccessLevel = $Values | null; type App = { displayText: string, }; type ExternalCollabRestriction = { accessLevel?: ExternalCollabAccessLevel, }; type ApplicationRestriction = { accessLevel?: ApplicationAccessLevel, apps: Array, }; type BoxSignRequestRestriction = { enabled?: boolean, }; type DownloadRestriction = { restrictExternalUsers?: boolean, restrictManagedUsers?: DownloadManagedUserAccessLevel, }; type DownloadRestrictions = { desktop?: DownloadRestriction, mobile?: DownloadRestriction, web?: DownloadRestriction, }; type SharedLinkRestrictions = { accessLevel: SharedLinkAccessLevel, }; type WatermarkControl = { enabled?: boolean, }; type Controls = { app?: ApplicationRestriction, boxSignRequest?: BoxSignRequestRestriction, download?: DownloadRestrictions, externalCollab?: ExternalCollabRestriction, sharedLink?: SharedLinkRestrictions, watermark?: WatermarkControl, }; type ControlsFormat = $Values; type MessageItem = { message: MessageDescriptor | React.Node, tooltipMessage?: MessageDescriptor, }; export type { ApplicationRestriction, Controls, ControlsFormat, DownloadRestrictions, ExternalCollabRestriction, MessageItem, SharedLinkRestrictions, };