# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

import typing_extensions
from ..types.legacy_extraction_field_type import LegacyExtractionFieldType
from .enum import EnumParams


class LegacyExtractionFieldParams(typing_extensions.TypedDict):
    id: str
    """
    Unique identifier for the field.
    """

    name: str
    """
    Human-readable name for the field.
    """

    type: LegacyExtractionFieldType
    """
    The type of the field.
    """

    description: str
    """
    Detailed description of the field, including expected content and format.
    """

    schema: typing_extensions.NotRequired[typing.Sequence["LegacyExtractionFieldParams"]]
    """
    Required when type is "array" or "object". Contains nested field definitions.
    """

    enum: typing_extensions.NotRequired[typing.Sequence[EnumParams]]
    """
    Required when type is "enum". List of allowed values.
    """
