Sanity Library Reference Docs
    Preparing search index...
    AuthoringAction: {
        description?: string;
        effects?: {
            bindings?: { [key: string]: string };
            description?: string;
            input?: { [key: string]: unknown };
            name: string;
            outputs?: FieldShape[];
            title?: string;
        }[];
        filter?: string;
        group?: GroupMembership;
        name: string;
        ops?: AuthoringOp[];
        params?: {
            description?: string;
            name: string;
            options?: ChoiceOptions;
            required?: boolean;
            title?: string;
            type: | "string"
            | "number"
            | "boolean"
            | "actor"
            | "url"
            | "doc.ref"
            | "doc.refs"
            | "dateTime"
            | "json";
            validation?: ScalarValidation;
        }[];
        semantics?: ActionSemantic[];
        spawn?: {
            context?: { [key: string]: string };
            definition: { name: string; version?: number | "latest" };
            forEach: string;
            onExit?: "detach" | "abort";
            with?: { [key: string]: string };
        };
        title?: string;
        when?: string;
    } & { roles?: string[]; status?: TerminalActivityStatus }

    The stored action fields plus authoring sugar. roles: on a fireAction-fired action (no when) it desugars into a count($actor.roles[@ in [...]]) > 0 condition ANDed with filter; on a CASCADE-FIRED action it stores VERBATIM instead — the pin on which identities may execute the trigger, since folding it into filter would make the action's existence depend on whose token cascades. roleAliases widens the membership either way. status compiles to a status.set op on the firing activity, appended AFTER the authored ops — deliberately never implied, so a forgotten status is a visible stall rather than a silently completed action.