Sanity Library Reference Docs
    Preparing search index...

    The instance list projection — a reduced WorkflowInstance for surfaces that render many runs at once, fetched by instancePreviewsQuery.

    The reduction keeps the full instance's field names and member shapes so instance helpers (terminalState, findOpenStageEntry, parentRef, the identity normalizer) read a preview unchanged; what shrinks is the content: stages holds the open entry alone, every fields list keeps only the identity, date, document-reference, and release-reference kinds, and the unbounded audit trails are gone — claimedEffects and failedEffects hold the two facts a stuck classifier reads in their place. There is deliberately no definitionSnapshot: a consumer titles what it shows from the deployed catalog, falling back to raw names.

    interface WorkflowInstancePreview {
        _id: string;
        _type: "sanity.workflow.instance";
        abortedAt?: string;
        ancestors: GlobalDocumentReference<string>[];
        claimedEffects: WorkflowInstancePreviewEffect[];
        completedAt?: string;
        currentStage: string;
        definition: string;
        failedEffects: WorkflowInstancePreviewEffect[];
        fields: ResolvedFieldEntry[];
        minReaderModel?: number;
        modelVersion?: number;
        perspective?: WorkflowPerspective;
        pinnedVersion: number;
        stages: StageEntry[];
        startedAt: string;
        workflowResource: WorkflowResource;
    }
    Index

    Properties

    _id: string
    _type: "sanity.workflow.instance"
    abortedAt?: string
    ancestors: GlobalDocumentReference<string>[]

    Pending effects a drainer has claimed — the hung-automation fact.

    completedAt?: string
    currentStage: string
    definition: string

    Effect-history rows that reported failure — the failed-automation fact.

    Identity, date, document-reference, and release-reference entries only — the kinds list surfaces read. Composite (object/array) entries are dropped, so identities nested inside them are invisible to a preview.

    minReaderModel?: number
    modelVersion?: number
    perspective?: WorkflowPerspective
    pinnedVersion: number
    stages: StageEntry[]

    The open stage entry alone, its activities' fields reduced like fields. A completed run keeps its terminal entry open, so this is empty only for an aborted run (whose entries closed in place) or before the run primes.

    startedAt: string
    workflowResource: WorkflowResource