Skip to content

ReadRuntimeInstance

Defined in: runtime/runtime.ts:37

readonly apps: Record<string, ReadAppInstance>

Defined in: runtime/runtime.ts:38


readonly now: DateTime

Defined in: runtime/runtime.ts:39


readonly principalId: string

Defined in: runtime/runtime.ts:40


readonly root: ReadAppInstance

Defined in: runtime/runtime.ts:41


readonly workspaceId: string

Defined in: runtime/index.ts:39

BaseInstance.workspaceId

getItem(id): Promise<ReadItem | undefined>

Defined in: runtime/runtime.ts:42

string

Promise<ReadItem | undefined>


getItemByKeyPath(…parts): Promise<ReadItem | undefined>

Defined in: runtime/runtime.ts:43

…[string, ...string[]]

Promise<ReadItem | undefined>


getWorkspaceItem(): Promise<ReadWorkspaceItem | undefined>

Defined in: runtime/runtime.ts:44

Promise<ReadWorkspaceItem | undefined>


getWorkspaceTemplate(): ReadTemplate

Defined in: runtime/runtime.ts:45

ReadTemplate


hashKey(source): Promise<string>

Defined in: runtime/runtime.ts:52

Creates a key by hashing the provided value. The source can be up to 1,024 characters.

string

Promise<string>


log(message, …optional): void

Defined in: runtime/runtime.ts:46

any

any[]

void


selectItems(): ItemCursorSelector<ReadItem>

Defined in: runtime/runtime.ts:58

Returns an item selection builder that allows retrieving items that are in this workspace

ItemCursorSelector<ReadItem>


sudo<TResult>(fn): Promise<TResult>

Defined in: runtime/runtime.ts:65

Moves into a readonly sudo role: This is effectively system, but tracked against the existing principal (if any). Calling this from system does nothing. If you are already sudo, the existing sudo is retained.

TResult

(ctx) => Promise<TResult>

Promise<TResult>


template(prn): Promise<ReadTemplate<ReadItem> | undefined>

Defined in: runtime/runtime.ts:70

Return the template matching the supplied prn.

string

Promise<ReadTemplate<ReadItem> | undefined>