BaseReadItem
Defined in: runtime/item.ts:26
Extended by
Section titled “Extended by”Properties
Section titled “Properties”createdAt
Section titled “createdAt”
readonlycreatedAt:Date
Defined in: runtime/item.ts:28
definition
Section titled “definition”
readonlydefinition:TemplateDefinition
Defined in: runtime/item.ts:29
readonlyid:string
Defined in: runtime/item.ts:27
properties
Section titled “properties”
readonlyproperties:PropertyMap
Defined in: runtime/item.ts:30
propertyValues
Section titled “propertyValues”
readonlypropertyValues:PropertyValueMap
Defined in: runtime/item.ts:31
relations
Section titled “relations”
readonlyrelations:Record<string,ReadRelationInstance>
Defined in: runtime/item.ts:33
readonlystate:ReadStateInstance<string|null> |null
Defined in: runtime/item.ts:34
templatePrn
Section titled “templatePrn”
readonlytemplatePrn:string
Defined in: runtime/item.ts:32
workspaceId
Section titled “workspaceId”
readonlyworkspaceId:string
Defined in: runtime/item.ts:35
Methods
Section titled “Methods”assertRole()
Section titled “assertRole()”assertRole(
role):Promise<true>
Defined in: runtime/item.ts:41
Asserts that the current, active item instance has the current role. If successful, this will return true. Otherwise it will throw an Error.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<true>
checkRole()
Section titled “checkRole()”checkRole(
role):Promise<boolean>
Defined in: runtime/item.ts:47
Checks that the current, active item instance has the current role; returning true/false if that role is present.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<boolean>
currentRoles()
Section titled “currentRoles()”currentRoles():
Promise<BaseRoleInstance[]>
Defined in: runtime/item.ts:57
Returns the roles that the current user has available on this item. Note that for sudo/system users this will be all available roles.
MATT: This is currently async. Maybe we can revisit that later.
Returns
Section titled “Returns”Promise<BaseRoleInstance[]>
getChildByKey()
Section titled “getChildByKey()”getChildByKey(
key):Promise<ReadItem|undefined>
Defined in: runtime/item.ts:59
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<ReadItem | undefined>
getParent()
Section titled “getParent()”getParent():
Promise<ReadItem|undefined>
Defined in: runtime/item.ts:60
Returns
Section titled “Returns”Promise<ReadItem | undefined>