Skip to content

BaseReadItem

Defined in: runtime/item.ts:26

readonly createdAt: Date

Defined in: runtime/item.ts:28


readonly definition: TemplateDefinition

Defined in: runtime/item.ts:29


readonly id: string

Defined in: runtime/item.ts:27


readonly properties: PropertyMap

Defined in: runtime/item.ts:30


readonly propertyValues: PropertyValueMap

Defined in: runtime/item.ts:31


readonly relations: Record<string, ReadRelationInstance>

Defined in: runtime/item.ts:33


readonly state: ReadStateInstance<string | null> | null

Defined in: runtime/item.ts:34


readonly templatePrn: string

Defined in: runtime/item.ts:32


readonly workspaceId: string

Defined in: runtime/item.ts:35

assertRole(role): Promise<true>

Defined in: runtime/item.ts:41

Asserts that the current, active item instance has the current role. If successful, this will return true. Otherwise it will throw an Error.

TemplateRoleInstance

Promise<true>


checkRole(role): Promise<boolean>

Defined in: runtime/item.ts:47

Checks that the current, active item instance has the current role; returning true/false if that role is present.

TemplateRoleInstance

Promise<boolean>


currentRoles(): Promise<BaseRoleInstance[]>

Defined in: runtime/item.ts:57

Returns the roles that the current user has available on this item. Note that for sudo/system users this will be all available roles.

MATT: This is currently async. Maybe we can revisit that later.

Promise<BaseRoleInstance[]>


getChildByKey(key): Promise<ReadItem | undefined>

Defined in: runtime/item.ts:59

string

Promise<ReadItem | undefined>


getParent(): Promise<ReadItem | undefined>

Defined in: runtime/item.ts:60

Promise<ReadItem | undefined>