WriteTemplate
Defined in: runtime/template.ts:64
The write version of ReadTemplate that allows updates of the template.
Extends
Section titled “Extends”ReadTemplate<TWriteItem>
Type Parameters
Section titled “Type Parameters”TWriteItem
Section titled “TWriteItem”TWriteItem extends WriteItem = WriteItem
Properties
Section titled “Properties”definition
Section titled “definition”
readonlydefinition:TemplateDefinition
Defined in: runtime/template.ts:32
Inherited from
Section titled “Inherited from”grants
Section titled “grants”
readonlygrants:TemplateGrantInstance[]
Defined in: runtime/template.ts:33
Inherited from
Section titled “Inherited from”isExtensible
Section titled “isExtensible”
readonlyisExtensible:boolean
Defined in: runtime/template.ts:34
Inherited from
Section titled “Inherited from”
readonlyprn:string
Defined in: runtime/template.ts:35
Inherited from
Section titled “Inherited from”properties
Section titled “properties”
readonlyproperties:Readonly<Record<string,PropertyDefinition>>
Defined in: runtime/template.ts:36
Inherited from
Section titled “Inherited from”relations
Section titled “relations”
readonlyrelations:Record<string,RelationDefinition>
Defined in: runtime/template.ts:37
Inherited from
Section titled “Inherited from”
readonlyroles:Record<string,TemplateRoleInstance>
Defined in: runtime/template.ts:38
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”assertType()
Section titled “assertType()”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.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”asserts value is TWriteItem
isType
createItem()
Section titled “createItem()”createItem(
parent,options):Promise<TWriteItem>
Defined in: runtime/template.ts:75
Creates an item against this template.
Parameters
Section titled “Parameters”parent
Section titled “parent”options
Section titled “options”Returns
Section titled “Returns”Promise<TWriteItem>
getItem()
Section titled “getItem()”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<TWriteItem | undefined>
Overrides
Section titled “Overrides”isType()
Section titled “isType()”isType(
value):value is TWriteItem
Defined in: runtime/template.ts:88
Returns true if the supplied item is of the type of this template.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”value is TWriteItem
Overrides
Section titled “Overrides”selectItems()
Section titled “selectItems()”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.
Returns
Section titled “Returns”TemplateItemCursorSelector<TWriteItem>