ReadItem
Presents a read-only Item below the Workspace Item, with its hierarchy, archive and refresh state.
Extends
Section titled “Extends”BaseReadItem.StandardItem
Properties
Section titled “Properties”createdAt
Section titled “createdAt”
readonlycreatedAt:Date
When the Item was created, taken from the execution time of the execution that created it.
Inherited from
Section titled “Inherited from”definition
Section titled “definition”
readonlydefinition:TemplateDefinition
The Template definition the Item was created from, with any extension Properties of its parent merged in.
Inherited from
Section titled “Inherited from”
readonlyid:string
The Item identifier, a UUID.
Inherited from
Section titled “Inherited from”isArchived
Section titled “isArchived”
readonlyisArchived:boolean
Whether the Item is archived; archived Items are left out of selections unless archived asks for them.
Inherited from
Section titled “Inherited from”StandardItem.isArchived
isRefreshOverdue
Section titled “isRefreshOverdue”
readonlyisRefreshOverdue:boolean
Whether a scheduled refresh time has passed without the Item being refreshed since.
Inherited from
Section titled “Inherited from”StandardItem.isRefreshOverdue
isRefreshPending
Section titled “isRefreshPending”
readonlyisRefreshPending:boolean
Whether a refresh is scheduled for a time still in the future.
Inherited from
Section titled “Inherited from”StandardItem.isRefreshPending
readonlykey:string|undefined
The Item’s key relative to its parent, or undefined when it has none.
Inherited from
Section titled “Inherited from”StandardItem.key
parentId
Section titled “parentId”
readonlyparentId:string|undefined
The identifier of the Item’s parent.
Inherited from
Section titled “Inherited from”StandardItem.parentId
properties
Section titled “properties”
readonlyproperties:PropertyMap
Plain Property values keyed by Property key, ready for application logic.
Remarks
Section titled “Remarks”Select values are reduced to option keys: a single-select reads as its option key or null, a
multi-select as an array of option keys. instant and datetime values are Luxon DateTime objects. A
Property that is unset, invalid or not granted to the principal reads as undefined.
Inherited from
Section titled “Inherited from”propertyValues
Section titled “propertyValues”
readonlypropertyValues:PropertyValueMap
Property values keyed by Property key, each tagged with its data type.
Remarks
Section titled “Remarks”Use this form when the data type is significant, for example to tell an unset value from a stored value that has become invalid. Properties the principal is not granted are absent.
Inherited from
Section titled “Inherited from”refreshBy
Section titled “refreshBy”
readonlyrefreshBy:Date|undefined
When the next refresh is due, or undefined when none is scheduled.
Inherited from
Section titled “Inherited from”StandardItem.refreshBy
refreshedAt
Section titled “refreshedAt”
readonlyrefreshedAt:Date|undefined
When the Item was last refreshed, or undefined when it never has been.
Inherited from
Section titled “Inherited from”StandardItem.refreshedAt
relations
Section titled “relations”
readonlyrelations:Record<string,ReadRelationInstance>
Relations declared on the Item’s Template, keyed by Relation key and navigated from this Item’s side.
Inherited from
Section titled “Inherited from”
readonlystate:ReadStateInstance<string|null> |null
The Item’s current state, or null when its Template declares no states.
Inherited from
Section titled “Inherited from”templatePrn
Section titled “templatePrn”
readonlytemplatePrn:string
The PRN of the Template the Item was created from.
Inherited from
Section titled “Inherited from”workspaceId
Section titled “workspaceId”
readonlyworkspaceId:string
The identifier of the Workspace holding the Item.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”assertRole()
Section titled “assertRole()”assertRole(
role):Promise<true>
Confirms that the active principal holds a Template Role on this Item.
Parameters
Section titled “Parameters”A Role from the Template’s roles.
Returns
Section titled “Returns”Promise<true>
true when the Role is held.
Throws
Section titled “Throws”AssertRoleFailedError when the active principal does not hold the Role on this Item.
Inherited from
Section titled “Inherited from”checkRole()
Section titled “checkRole()”checkRole(
role):Promise<boolean>
Reports whether the active principal holds a Template Role on this Item.
Parameters
Section titled “Parameters”A Role from the Template’s roles.
Returns
Section titled “Returns”Promise<boolean>
Inherited from
Section titled “Inherited from”currentRoles()
Section titled “currentRoles()”currentRoles():
Promise<BaseRoleInstance[]>
Lists the Template Roles the active principal holds on this Item.
Returns
Section titled “Returns”Promise<BaseRoleInstance[]>
Remarks
Section titled “Remarks”Sudo and system contexts hold every Role the Template declares.
Inherited from
Section titled “Inherited from”extensions()
Section titled “extensions()”extensions<
TReadTemplate>(template):Promise<ReadTemplateExtension>
Reads the Property extensions in force for children of this Item created from an extensible Template.
Type Parameters
Section titled “Type Parameters”TReadTemplate
Section titled “TReadTemplate”TReadTemplate extends BaseReadTemplate & object
Parameters
Section titled “Parameters”template
Section titled “template”TReadTemplate
The extensible Template.
Returns
Section titled “Returns”Promise<ReadTemplateExtension>
Throws
Section titled “Throws”when the Template is not extensible or this is the Workspace Item.
getAncestors()
Section titled “getAncestors()”getAncestors():
Promise<ReadItem[]>
Loads the ancestors of this Item, nearest parent first, up to and including the Workspace Item.
Returns
Section titled “Returns”Promise<ReadItem[]>
The ancestors the active principal can read, stopping at the first unreadable one; the Workspace Item has none.
Inherited from
Section titled “Inherited from”getChildByKey()
Section titled “getChildByKey()”getChildByKey(
key):Promise<ReadItem|undefined>
Finds the child of this Item that carries a key.
Parameters
Section titled “Parameters”string
The child’s key, relative to this Item.
Returns
Section titled “Returns”Promise<ReadItem | undefined>
The child, or undefined when no child the active principal can read carries the key.
Inherited from
Section titled “Inherited from”getParent()
Section titled “getParent()”getParent():
Promise<ReadItem|undefined>
Loads the parent of this Item.
Returns
Section titled “Returns”Promise<ReadItem | undefined>
The parent, or undefined for the Workspace Item, which has no parent.
Inherited from
Section titled “Inherited from”selectChildren()
Section titled “selectChildren()”selectChildren():
ItemCursorSelector<ReadItem>
Starts a selection over the children of this Item.
Returns
Section titled “Returns”ItemCursorSelector<ReadItem>
Remarks
Section titled “Remarks”The selection leaves out archived children and returns children in creation order until narrowed, sorted or paginated.

