Sanity Library Reference Docs
    Preparing search index...
    AuthoringFieldEntry:
        | {
            description?: string;
            editable?: AuthoringEditable;
            group?: GroupMembership;
            initialValue?: | { type: "input" }
            | { query: string; type: "query" }
            | { type: "literal"; value: unknown }
            | {
                field: string;
                path?: string;
                scope?: "workflow" | "stage";
                type: "fieldRead";
            };
            name: string;
            required?: boolean;
            title?: string;
        } & {
            fields?: FieldShape[];
            of?: FieldShape[];
            options?: ChoiceOptions;
            roles?: string[];
            type: | "string"
            | "number"
            | "boolean"
            | "object"
            | "actor"
            | "datetime"
            | "array"
            | "text"
            | "url"
            | "doc.ref"
            | "doc.refs"
            | "subject"
            | "release.ref"
            | "progress"
            | "date"
            | "dueDate"
            | "dueDatetime"
            | "assignee"
            | "assignees";
            types?: string[];
            validation?: ScalarValidation;
        }
        | {
            description?: string;
            editable?: AuthoringEditable;
            group?: GroupMembership;
            initialValue?: | { type: "input" }
            | { query: string; type: "query" }
            | { type: "literal"; value: unknown }
            | {
                field: string;
                path?: string;
                scope?: "workflow" | "stage";
                type: "fieldRead";
            };
            name: string;
            required?: boolean;
            title?: string;
        } & { type: "todoList" }
        | {
            description?: string;
            editable?: AuthoringEditable;
            group?: GroupMembership;
            initialValue?:
                | { type: "input" }
                | { query: string; type: "query" }
                | { type: "literal"; value: unknown }
                | {
                    field: string;
                    path?: string;
                    scope?: "workflow" | "stage";
                    type: "fieldRead";
                };
            name: string;
            required?: boolean;
            title?: string;
        } & { type: "notes" }

    A raw field entry or one of the authoring-only field sugars. todoList expands to an array of objects with label, status, optional assignee, and optional dueDate; that due date remains an ordinary date field. notes expands to an array of audit-shaped objects with body, actor, and at fields. Sugar type names are compiled away and never become stored field kinds.

    Type declaration

    • {
          description?: string;
          editable?: AuthoringEditable;
          group?: GroupMembership;
          initialValue?:
              | { type: "input" }
              | { query: string; type: "query" }
              | { type: "literal"; value: unknown }
              | {
                  field: string;
                  path?: string;
                  scope?: "workflow" | "stage";
                  type: "fieldRead";
              };
          name: string;
          required?: boolean;
          title?: string;
      } & {
          fields?: FieldShape[];
          of?: FieldShape[];
          options?: ChoiceOptions;
          roles?: string[];
          type: | "string"
          | "number"
          | "boolean"
          | "object"
          | "actor"
          | "datetime"
          | "array"
          | "text"
          | "url"
          | "doc.ref"
          | "doc.refs"
          | "subject"
          | "release.ref"
          | "progress"
          | "date"
          | "dueDate"
          | "dueDatetime"
          | "assignee"
          | "assignees";
          types?: string[];
          validation?: ScalarValidation;
      }
      • Optionaldescription?: string
      • Optionaleditable?: AuthoringEditable
      • Optionalgroup?: GroupMembership
      • OptionalinitialValue?:
            | { type: "input" }
            | { query: string; type: "query" }
            | { type: "literal"; value: unknown }
            | {
                field: string;
                path?: string;
                scope?: "workflow" | "stage";
                type: "fieldRead";
            }
      • name: string
      • Optionalrequired?: boolean
      • Optionaltitle?: string
      • Optionalfields?: FieldShape[]
      • Optionalof?: FieldShape[]
      • Optionaloptions?: ChoiceOptions
      • Optionalroles?: string[]

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

      • type:
            | "string"
            | "number"
            | "boolean"
            | "object"
            | "actor"
            | "datetime"
            | "array"
            | "text"
            | "url"
            | "doc.ref"
            | "doc.refs"
            | "subject"
            | "release.ref"
            | "progress"
            | "date"
            | "dueDate"
            | "dueDatetime"
            | "assignee"
            | "assignees"
      • Optionaltypes?: string[]
      • Optionalvalidation?: ScalarValidation
    • {
          description?: string;
          editable?: AuthoringEditable;
          group?: GroupMembership;
          initialValue?:
              | { type: "input" }
              | { query: string; type: "query" }
              | { type: "literal"; value: unknown }
              | {
                  field: string;
                  path?: string;
                  scope?: "workflow" | "stage";
                  type: "fieldRead";
              };
          name: string;
          required?: boolean;
          title?: string;
      } & { type: "todoList" }
    • {
          description?: string;
          editable?: AuthoringEditable;
          group?: GroupMembership;
          initialValue?:
              | { type: "input" }
              | { query: string; type: "query" }
              | { type: "literal"; value: unknown }
              | {
                  field: string;
                  path?: string;
                  scope?: "workflow" | "stage";
                  type: "fieldRead";
              };
          name: string;
          required?: boolean;
          title?: string;
      } & { type: "notes" }