Sanity Library Reference Docs
    Preparing search index...

    A nested field shape inside an object's fields, an array's of, or an effect's outputs. It has no initialization, direct editability, or required setting; those belong to FieldEntry.

    An object requires nonempty fields and no of. An array requires nonempty of and no fields. Other types accept neither. Sibling names must be unique. Use ordinary date and datetime here; dueDate and dueDatetime are not valid nested fields or effect outputs. ChoiceOptions and ScalarValidation constrain supported scalar types. roles is valid only on assignee and assignees shapes.

    interface FieldShape {
        description?: string;
        fields?: FieldShape[];
        name: string;
        of?: FieldShape[];
        options?: ChoiceOptions;
        roles?: string[];
        title?: string;
        type:
            | "string"
            | "number"
            | "boolean"
            | "object"
            | "actor"
            | "datetime"
            | "array"
            | "text"
            | "url"
            | "doc.ref"
            | "doc.refs"
            | "subject"
            | "release.ref"
            | "progress"
            | "date"
            | "dueDate"
            | "dueDatetime"
            | "assignee"
            | "assignees";
        validation?: ScalarValidation;
    }
    Index

    Properties

    description?: string
    fields?: FieldShape[]
    name: string
    of?: FieldShape[]
    options?: ChoiceOptions
    roles?: string[]

    Non-empty assignment eligibility constraint. User roles apply aliases; collective roles match literally.

    title?: string
    type:
        | "string"
        | "number"
        | "boolean"
        | "object"
        | "actor"
        | "datetime"
        | "array"
        | "text"
        | "url"
        | "doc.ref"
        | "doc.refs"
        | "subject"
        | "release.ref"
        | "progress"
        | "date"
        | "dueDate"
        | "dueDatetime"
        | "assignee"
        | "assignees"
    validation?: ScalarValidation