Skip to content

Commit f6e4368

Browse files
committed
fix(roles): update types
1 parent c0017c3 commit f6e4368

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/entities/role.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ 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'
1617

1718
type ConditionType = 'and' | 'or' | 'not' | 'equals'
1819
export type ConstraintType = {
@@ -28,15 +29,15 @@ export type RoleProps = {
2829
*/
2930
permissions: {
3031
ContentDelivery: string[] | string
31-
ContentModel: string[]
32+
ContentModel: string[] | string
3233
EnvironmentAliases: string[] | string
3334
Environments: string[] | string
3435
Settings: string[] | string
3536
Tags: string[] | string
3637
}
3738
policies: {
3839
effect: string
39-
actions: ActionType[] | 'all'
40+
actions: RoleActionType[] | 'all'
4041
constraint: ConstraintType
4142
}[]
4243
}

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)