Sanity Library Reference Docs
    Preparing search index...

    Interface ProjectedActionVerdict

    One invocable (fireAction-fired) action. Two whole classes of action never appear here: an action whose filter scoped it out for this actor is ABSENT (filter is existence — it might as well not exist, never "disabled"), and a cascade-fired (when) action is projected as a ProjectedAutomation instead — the engine fires it, no caller can.

    interface ProjectedActionVerdict {
        action: string;
        allowed: boolean;
        disabledReason?: string;
        params?: {
            description?: string;
            name: string;
            options?: ChoiceOptions;
            required?: boolean;
            title?: string;
            type:
                | "string"
                | "number"
                | "boolean"
                | "doc.ref"
                | "doc.refs"
                | "url"
                | "actor"
                | "dateTime"
                | "json";
            validation?: ScalarValidation;
        }[];
        title?: string;
    }
    Index

    Properties

    action: string

    Action name — what to pass to workflows_fire_action as action.

    allowed: boolean

    Whether the action can currently be fired.

    disabledReason?: string

    When allowed is false, a short reason describing why.

    params?: {
        description?: string;
        name: string;
        options?: ChoiceOptions;
        required?: boolean;
        title?: string;
        type:
            | "string"
            | "number"
            | "boolean"
            | "doc.ref"
            | "doc.refs"
            | "url"
            | "actor"
            | "dateTime"
            | "json";
        validation?: ScalarValidation;
    }[]

    The action's declared params — what workflows_fire_action's params object must satisfy (each entry names the param and whether it is required). Absent when the action declares none.

    title?: string

    Human label for the action, if the definition provides one.