Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/entities/role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ 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'
| 'delete'
| 'publish'
| 'unpublish'
| 'archive'
| 'unarchive'
| 'unarchive'
| 'access'
| 'query'

type ConditionType = 'and' | 'or' | 'not' | 'equals'
export type ConstraintType = {
Expand All @@ -28,15 +30,15 @@ export type RoleProps = {
*/
permissions: {
ContentDelivery: string[] | string
ContentModel: string[]
ContentModel: string[] | string
EnvironmentAliases: string[] | string
Environments: string[] | string
Settings: string[] | string
Tags: string[] | string
}
policies: {
effect: string
actions: ActionType[] | 'all'
actions: RoleActionType[] | 'all'
constraint: ConstraintType
}[]
}
Expand Down
2 changes: 1 addition & 1 deletion lib/export-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down