Sanity Library Reference Docs
    Preparing search index...

    One emitted start-watcher. A definition that watches updates has one to itself per watched dataset, wf-<tag>-start-<dataset>-<definition>, so it never fires on a path only a sibling reads; the definitions that watch creates alone share wf-<tag>-start-<dataset>-creates. Every 'function' or 'durableFunction' autonomous definition a document write can start gets one or the other. A 'selfHosted' one gets neither, and appears in SelfHostedNeeds.startInstances instead.

    interface StartWatcherSpec {
        dataset: string;
        definitions: string[];
        filter: string;
        name: string;
        projectId: string;
        subjectTypes: string[];
        updates: WatchedUpdates;
    }
    Index

    Properties

    dataset: string
    definitions: string[]
    filter: string
    name: string
    projectId: string
    subjectTypes: string[]

    The types the trigger narrows to. Empty when one of definitions accepts any document type, which leaves the trigger open to every document except the engine's own.

    The updates the trigger accepts: noUpdate for the watcher the creates-only definitions share, otherwise its one definition's own.