diff --git a/lib/entities/role.ts b/lib/entities/role.ts index 87181fd0d6..64ff082ba2 100644 --- a/lib/entities/role.ts +++ b/lib/entities/role.ts @@ -4,7 +4,7 @@ import enhanceWithMethods from '../enhance-with-methods' import { wrapCollection } from '../common-utils' import type { DefaultElements, BasicMetaSysProps, SysLink, MakeRequest } from '../common-types' -export type ActionType = +export type RoleActionType = | 'read' | 'create' | 'update' @@ -12,7 +12,9 @@ export type ActionType = | 'publish' | 'unpublish' | 'archive' - | 'unarchive' + | 'unarchive' + | 'access' + | 'query' type ConditionType = 'and' | 'or' | 'not' | 'equals' export type ConstraintType = { @@ -28,7 +30,7 @@ export type RoleProps = { */ permissions: { ContentDelivery: string[] | string - ContentModel: string[] + ContentModel: string[] | string EnvironmentAliases: string[] | string Environments: string[] | string Settings: string[] | string @@ -36,7 +38,7 @@ export type RoleProps = { } policies: { effect: string - actions: ActionType[] | 'all' + actions: RoleActionType[] | 'all' constraint: ConstraintType }[] } diff --git a/lib/export-types.ts b/lib/export-types.ts index f88cca269d..8185f3364f 100644 --- a/lib/export-types.ts +++ b/lib/export-types.ts @@ -189,7 +189,7 @@ export type { ReleaseActionSysProps, ReleaseActionTypes, } from './entities/release-action' -export type { CreateRoleProps, Role, RoleProps } from './entities/role' +export type { CreateRoleProps, Role, RoleProps, RoleActionType } from './entities/role' export type { ScheduledAction, ScheduledActionProps,