Sanity Library Reference Docs
    Preparing search index...

    A pure container — name, fields, guards, activities, transitions, no behaviour of its own. Activities own enter, transitions own exit and arrival; a stage with no transitions IS terminal (structural, nothing to declare or mis-declare). guards are lake mutation guards active while the stage holds, each compiling to a persisted guard document deployed on stage entry and retracted on exit. editable is a tighten-only override for the time the stage holds, keyed by an in-scope field name: the field's own editable is the ceiling, ANDed with the stage value at runtime, so an override can only NARROW — never open a field the baseline left closed. An unlisted field inherits its baseline.

    interface Stage {
        activities?: Activity[];
        description?: string;
        editable?: Record<string, Editable>;
        fields?: FieldEntry[];
        groups?: Group[];
        guards?: {
            description?: string;
            match: {
                actions: ("create" | "update" | "delete" | "publish" | "unpublish")[];
                idPatterns?: string[];
                idRefs?: string[];
                types?: string[];
            };
            metadata?: { [key: string]: string };
            name: string;
            predicate?: string;
            title?: string;
        }[];
        name: string;
        semantics?: Semantic[];
        title?: string;
        transitions?: Transition[];
    }
    Index

    Properties

    activities?: Activity[]
    description?: string
    editable?: Record<string, Editable>
    fields?: FieldEntry[]
    groups?: Group[]
    guards?: {
        description?: string;
        match: {
            actions: ("create" | "update" | "delete" | "publish" | "unpublish")[];
            idPatterns?: string[];
            idRefs?: string[];
            types?: string[];
        };
        metadata?: { [key: string]: string };
        name: string;
        predicate?: string;
        title?: string;
    }[]
    name: string
    semantics?: Semantic[]
    title?: string
    transitions?: Transition[]