Skip to content

ReadTemplate

Presents a Template as resolved for the active execution: its definition, Grants, Roles and Relations, plus lookup and selection of its Items.

TReadItem extends ReadItem = ReadItem

The Item type generated for this Template.

readonly definition: TemplateDefinition

The complete Template definition.

BaseReadTemplate.definition


readonly grants: TemplateGrantInstance[]

Grants declared on the Template, one per granted Role.

BaseReadTemplate.grants


readonly isExtensible: boolean

Whether parent Items may extend this Template’s Properties for their children; see ReadTemplateExtension.

BaseReadTemplate.isExtensible


readonly prn: string

The PRN identifying this Template, for example prn::identity:template/user.

BaseReadTemplate.prn


readonly properties: Readonly<Record<string, PropertyDefinition>>

Property definitions declared by the Template, keyed by Property key.

BaseReadTemplate.properties


readonly relations: Record<string, RelationDefinition>

Relations declared from and to this Template, keyed by Relation key.

BaseReadTemplate.relations


readonly roles: Record<string, TemplateRoleInstance>

Template Roles declared by the Template, keyed by Role key.

BaseReadTemplate.roles

getItem(id): Promise<TReadItem | undefined>

Loads an Item of this Template by identifier.

string

The Item identifier.

Promise<TReadItem | undefined>

The Item, or undefined when the active principal cannot read it or it is not of this Template.


isType(value): value is TReadItem

Reports whether a value is an Item of this Template, narrowing its type when it is.

unknown

The value to test.

value is TReadItem


selectItems(): TemplateItemCursorSelector<TReadItem>

Starts a selection over every Item of this Template in the Workspace, wherever it sits in the hierarchy.

TemplateItemCursorSelector<TReadItem>

The selection excludes archived Items and returns Items in creation order until narrowed or sorted.

TemplateItemCursorSelector