Sanity Library Reference Docs
    Preparing search index...

    Caller-supplied params declared on an action, validated before running ops or queuing effects: a missing required param throws ActionParamsInvalidError and the action does not commit. Resolved values feed ValueExpr.param lookups.

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

    Properties

    description?: string = ...
    name: string = NonEmpty
    options?: ChoiceOptions = ...
    required?: boolean = ...
    title?: string = ...
    type:
        | "string"
        | "number"
        | "boolean"
        | "actor"
        | "url"
        | "doc.ref"
        | "doc.refs"
        | "dateTime"
        | "json" = ...
    validation?: ScalarValidation = ...