Skip to content

Commit a12d0ad

Browse files
committed
fix(roles): update types
1 parent 9762398 commit a12d0ad

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/entities/role.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ import enhanceWithMethods from '../enhance-with-methods'
44
import { wrapCollection } from '../common-utils'
55
import type { DefaultElements, BasicMetaSysProps, SysLink, MakeRequest } from '../common-types'
66

7-
export type ActionType =
7+
export type RoleActionType =
88
| 'read'
99
| 'create'
1010
| 'update'
1111
| 'delete'
1212
| 'publish'
1313
| 'unpublish'
1414
| 'archive'
15-
| 'unarchive'
15+
| 'unarchive'
16+
| 'access'
17+
| 'query'
1618

1719
type ConditionType = 'and' | 'or' | 'not' | 'equals'
1820
export type ConstraintType = {
@@ -28,15 +30,15 @@ export type RoleProps = {
2830
*/
2931
permissions: {
3032
ContentDelivery: string[] | string
31-
ContentModel: string[]
33+
ContentModel: string[] | string
3234
EnvironmentAliases: string[] | string
3335
Environments: string[] | string
3436
Settings: string[] | string
3537
Tags: string[] | string
3638
}
3739
policies: {
3840
effect: string
39-
actions: ActionType[] | 'all'
41+
actions: RoleActionType[] | 'all'
4042
constraint: ConstraintType
4143
}[]
4244
}

lib/export-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export type {
189189
ReleaseActionSysProps,
190190
ReleaseActionTypes,
191191
} from './entities/release-action'
192-
export type { CreateRoleProps, Role, RoleProps } from './entities/role'
192+
export type { CreateRoleProps, Role, RoleProps, RoleActionType } from './entities/role'
193193
export type {
194194
ScheduledAction,
195195
ScheduledActionProps,

0 commit comments

Comments
 (0)