ReadTemplate
Presents a Template as resolved for the active execution: its definition, Grants, Roles and Relations, plus lookup and selection of its Items.
- Data model
- TemplateBuilder for declaring a Template
- !TemplateDefinition | TemplateDefinition for the emitted Definition
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”TReadItem
Section titled “TReadItem”TReadItem extends ReadItem = ReadItem
The Item type generated for this Template.
Properties
Section titled “Properties”definition
Section titled “definition”
readonlydefinition:TemplateDefinition
The complete Template definition.
Inherited from
Section titled “Inherited from”grants
Section titled “grants”
readonlygrants:TemplateGrantInstance[]
Grants declared on the Template, one per granted Role.
Inherited from
Section titled “Inherited from”isExtensible
Section titled “isExtensible”
readonlyisExtensible:boolean
Whether parent Items may extend this Template’s Properties for their children; see ReadTemplateExtension.
Inherited from
Section titled “Inherited from”
readonlyprn:string
The PRN identifying this Template, for example prn::identity:template/user.
Inherited from
Section titled “Inherited from”properties
Section titled “properties”
readonlyproperties:Readonly<Record<string,PropertyDefinition>>
Property definitions declared by the Template, keyed by Property key.
Inherited from
Section titled “Inherited from”relations
Section titled “relations”
readonlyrelations:Record<string,RelationDefinition>
Relations declared from and to this Template, keyed by Relation key.
Inherited from
Section titled “Inherited from”
readonlyroles:Record<string,TemplateRoleInstance>
Template Roles declared by the Template, keyed by Role key.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”getItem()
Section titled “getItem()”getItem(
id):Promise<TReadItem|undefined>
Loads an Item of this Template by identifier.
Parameters
Section titled “Parameters”string
The Item identifier.
Returns
Section titled “Returns”Promise<TReadItem | undefined>
The Item, or undefined when the active principal cannot read it or it is not of this Template.
isType()
Section titled “isType()”isType(
value):value is TReadItem
Reports whether a value is an Item of this Template, narrowing its type when it is.
Parameters
Section titled “Parameters”unknown
The value to test.
Returns
Section titled “Returns”value is TReadItem
selectItems()
Section titled “selectItems()”selectItems():
TemplateItemCursorSelector<TReadItem>
Starts a selection over every Item of this Template in the Workspace, wherever it sits in the hierarchy.
Returns
Section titled “Returns”TemplateItemCursorSelector<TReadItem>
Remarks
Section titled “Remarks”The selection excludes archived Items and returns Items in creation order until narrowed or sorted.

