Sanity Library Reference Docs
    Preparing search index...

    A sub-field shape used inside an object's fields or an array's of — lighter than FieldEntry: no initialValue/editable/required, since a sub-field's value comes from the parent. An object kind requires non-empty fields and no of; an array kind requires non-empty of and no fields; every other kind requires neither — enforced at parse, not visible in this type.

    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