Skip to content

js-bao-wss-client


js-bao-wss-client / FunctionRun

Interface: FunctionRun ​

A function run's row, with only the fields a function row has.

workflowId, workflowKey, revisionId, skipReason and the three failedStep* fields are DSL vocabulary the server never sets for a function row; they are not declared here and the reader does not pass them through, so this block is the same on both clients (Swift can only decode what it declares). The row's execution mode is left out for a different reason: it still stores the vocabulary that was retired when the caller became the one who picks a runtime, and renaming it belongs to the retirement phase.

Properties ​

contextDocId? ​

optional contextDocId?: string


createCallDurationMs? ​

optional createCallDurationMs?: number | null


endedAt? ​

optional endedAt?: string


errorCode? ​

optional errorCode?: FunctionRunErrorCode | null


errorMessage? ​

optional errorMessage?: string | null


errorTitle? ​

optional errorTitle?: string | null


executionPrincipal ​

executionPrincipal: string | null

Who the run executed AS — sys:<appId> for a trigger-fired root.


executionStartedAt? ​

optional executionStartedAt?: string | null


functionId ​

functionId: string | null

The function this run belongs to. null for a DSL run read through this surface.


functionKey ​

functionKey: string | null


instanceId? ​

optional instanceId?: string


meta? ​

optional meta?: Record<string, unknown>


nestDepth ​

nestDepth: number

How deep in a nested-start tree this run is. 0 for a root.


parentFunctionKey ​

parentFunctionKey: string | null

The function that started this one, for a nested start.


parentRunId ​

parentRunId: string | null


queueDelayMs? ​

optional queueDelayMs?: number | null


runId ​

runId: string


runKey ​

runKey: string


startedAt? ​

optional startedAt?: string


status ​

status: FunctionRunStatusValue

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30