Sanity Library Reference Docs
    Preparing search index...
    interface WorkflowPluginConfig {
        effectHandlers?: Record<string, EffectHandler<SanityClient>>;
        mappings?: readonly WorkflowMapping[];
        previewHydration?: { interPageDelayMs?: number; pageSize?: number };
        resourceClients?: ResourceClientResolver;
        tag: string;
        workflowDataset?: string;
    }
    Index

    Properties

    effectHandlers?: Record<string, EffectHandler<SanityClient>>

    Browser-side effect handlers keyed by effect name (the engine's EffectHandler). Registered handlers drain in the Studio after each committed action; anything unregistered stays pending for another runtime to claim.

    mappings?: readonly WorkflowMapping[]

    Studio-specific bindings. Rows customize discovered first-class subjects or explicitly register definitions that use the doc.ref subject convention.

    previewHydration?: { interPageDelayMs?: number; pageSize?: number }

    Tuning for the Workflows tool's progressive run hydration — page size, and a development-only pause between pages for watching the hydration land. Defaults suit production; set these in a dev harness to simulate small pages and slow reads.

    resourceClients?: ResourceClientResolver

    Routing override for cross-resource reads, replacing the Studio's default per-dataset routing — see useWorkflowEngine. A served resource is also part of the declared surface for written refs, so this is how a plugin setup admits runtime-supplied doc.ref values to a foreign resource (media-library, canvas, another dataset). Keep the value stable (module scope or memoized).

    tag: string

    Engine tag partition — scopes every workflow read and write.

    workflowDataset?: string

    Dataset holding workflow definitions + instances. Defaults to the workspace's own dataset (single-dataset setup).