Skip to content

ReadItem

Defined in: runtime/item.ts:101

readonly createdAt: Date

Defined in: runtime/item.ts:28

BaseReadItem.createdAt


readonly definition: TemplateDefinition

Defined in: runtime/item.ts:29

BaseReadItem.definition


readonly id: string

Defined in: runtime/item.ts:27

BaseReadItem.id


readonly isArchived: boolean

Defined in: runtime/item.ts:91

StandardItem.isArchived


readonly isRefreshOverdue: boolean

Defined in: runtime/item.ts:96

StandardItem.isRefreshOverdue


readonly isRefreshPending: boolean

Defined in: runtime/item.ts:95

StandardItem.isRefreshPending


readonly key: string | undefined

Defined in: runtime/item.ts:92

StandardItem.key


readonly parentId: string | undefined

Defined in: runtime/item.ts:93

StandardItem.parentId


readonly properties: PropertyMap

Defined in: runtime/item.ts:30

BaseReadItem.properties


readonly propertyValues: PropertyValueMap

Defined in: runtime/item.ts:31

BaseReadItem.propertyValues


readonly refreshBy: Date | undefined

Defined in: runtime/item.ts:97

StandardItem.refreshBy


readonly refreshedAt: Date | undefined

Defined in: runtime/item.ts:98

StandardItem.refreshedAt


readonly relations: Record<string, ReadRelationInstance>

Defined in: runtime/item.ts:33

BaseReadItem.relations


readonly state: ReadStateInstance<string | null> | null

Defined in: runtime/item.ts:34

BaseReadItem.state


readonly templatePrn: string

Defined in: runtime/item.ts:32

BaseReadItem.templatePrn


readonly workspaceId: string

Defined in: runtime/item.ts:35

BaseReadItem.workspaceId

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>

BaseReadItem.assertRole


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>

BaseReadItem.checkRole


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[]>

BaseReadItem.currentRoles


extensions<TReadTemplate>(template): Promise<ReadTemplateExtension>

Defined in: runtime/item.ts:108

Configure property extensions for children of this item. The provided template must be extensible or an error will be thrown.

TReadTemplate extends ReadTemplate<ReadItem> & object

TReadTemplate

Promise<ReadTemplateExtension>


getChildByKey(key): Promise<ReadItem | undefined>

Defined in: runtime/item.ts:59

string

Promise<ReadItem | undefined>

BaseReadItem.getChildByKey


getParent(): Promise<ReadItem | undefined>

Defined in: runtime/item.ts:60

Promise<ReadItem | undefined>

BaseReadItem.getParent


selectChildren(): ItemCursorSelector<ReadItem>

Defined in: runtime/item.ts:102

ItemCursorSelector<ReadItem>