Skip to content

js-bao-wss-client


js-bao-wss-client / ListWorkflowRunsResult

Interface: ListWorkflowRunsResult ​

Result from listing workflow runs

Properties ​

cursor? ​

optional cursor?: string

Deprecated ​

Alias of nextCursor kept for one deprecation window.


hasMore? ​

optional hasMore?: boolean

True when a next page exists.


items ​

items: WorkflowRun[]


nextCursor? ​

optional nextCursor?: string

Continuation token for the next page.


scanned? ​

optional scanned?: number

How many runs the server examined to produce this page.

A listing filtered by status cannot be served by the index directly, so the server walks recent runs and filters them, stopping at a fixed budget. scanned is how many runs that walk looked at, which is what tells an empty page apart from a complete answer:

  • no nextCursor — the walk reached the end of the run history, so the result is everything there is;
  • a nextCursor with fewer than limit items — the walk stopped at its budget after scanned runs, and more history remains. Pass nextCursor back as cursor to keep searching.

Present only on a status-filtered listing of the caller's own runs. An unfiltered listing reads a single page and omits the field, and a contextDocId listing omits it too — that view spans every user's runs against the document, so its row count is not the caller's to see. Also absent when talking to a server older than this field — treat undefined as "unknown", never as zero.

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