Skip to content

WriteTemplate

Defined in: runtime/template.ts:64

The write version of ReadTemplate that allows updates of the template.

TWriteItem extends WriteItem = WriteItem

readonly definition: TemplateDefinition

Defined in: runtime/template.ts:32

ReadTemplate.definition


readonly grants: TemplateGrantInstance[]

Defined in: runtime/template.ts:33

ReadTemplate.grants


readonly isExtensible: boolean

Defined in: runtime/template.ts:34

ReadTemplate.isExtensible


readonly prn: string

Defined in: runtime/template.ts:35

ReadTemplate.prn


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

Defined in: runtime/template.ts:36

ReadTemplate.properties


readonly relations: Record<string, RelationDefinition>

Defined in: runtime/template.ts:37

ReadTemplate.relations


readonly roles: Record<string, TemplateRoleInstance>

Defined in: runtime/template.ts:38

ReadTemplate.roles

assertType(value): asserts value is TWriteItem

Defined in: runtime/template.ts:70

Same as isType, but will throw an error and not proceed if isType returns false.

unknown

asserts value is TWriteItem

isType


createItem(parent, options): Promise<TWriteItem>

Defined in: runtime/template.ts:75

Creates an item against this template.

BaseWriteItem

CreateChildOptions

Promise<TWriteItem>


getItem(id): Promise<TWriteItem | undefined>

Defined in: runtime/template.ts:82

Returns the item of the given identifier if it is of the type of this template. If the item does not exist, there are insufficient permissions, or the template does not match; will result in undefined.

string

Promise<TWriteItem | undefined>

ReadTemplate.getItem


isType(value): value is TWriteItem

Defined in: runtime/template.ts:88

Returns true if the supplied item is of the type of this template.

unknown

value is TWriteItem

ReadTemplate.isType


selectItems(): TemplateItemCursorSelector<TWriteItem>

Defined in: runtime/template.ts:95

Returns an item selection builder that allows retrieving items that match this template. This will be all items, irrespective of parent-child hierarchy. See the ItemSelector documentation for more.

TemplateItemCursorSelector<TWriteItem>

ReadTemplate.selectItems