Skip to content

ReadUnionInstance

Presents a Union of Templates as resolved for the active execution, with membership checks and selection of Items across its member Templates.

An Item belongs to the Union when its Template is a member. The Workspace Item is never a Union member.

TReadItem extends ReadItem = ReadItem

The Item type generated for this Union’s members.

readonly prn: string

The PRN of the resource, for example prn::identity:template/user.

PrnInstance.prn

getItem(id): Promise<TReadItem | undefined>

Loads an Item by identifier when it belongs to a member Template.

string

The Item identifier.

Promise<TReadItem | undefined>

The Item, or undefined when the active principal cannot read it or its Template is not a member.


isMember(template): boolean

Reports whether a Template belongs to this Union.

PrnInstance

The Template, or anything carrying its PRN.

boolean


isType(value): value is TReadItem

Reports whether a value is an Item of one of the member Templates, narrowing its type when it is.

unknown

The value to test.

value is TReadItem


memberPrns(): string[]

Lists the PRNs of the member Templates.

string[]


selectItems(): UnionCursorSelector<ReadItem>

Starts a selection over the Items of every member Template.

UnionCursorSelector<ReadItem>

UnionCursorSelector