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

import typing_extensions
from ..core.serialization import FieldMetadata
from ..types.extract_config_json_base_processor import ExtractConfigJsonBaseProcessor
from ..types.json_object import JsonObject
from .extract_advanced_options import ExtractAdvancedOptionsParams
from .parse_config import ParseConfigParams


class ExtractConfigJsonParams(typing_extensions.TypedDict):
    base_processor: typing_extensions.NotRequired[
        typing_extensions.Annotated[ExtractConfigJsonBaseProcessor, FieldMetadata(alias="baseProcessor")]
    ]
    """
    The base processor to use. For extractors, this can be either `"extraction_performance"` or `"extraction_light"`. Defaults to `"extraction_performance"` if not provided. See [Extraction Changelog](https://docs.extend.ai/2026-02-09/changelog/extraction/extraction-performance) for more details.
    """

    base_version: typing_extensions.NotRequired[typing_extensions.Annotated[str, FieldMetadata(alias="baseVersion")]]
    """
    The version of the `"extraction_performance"` or `"extraction_light"` processor to use. If not provided, the latest stable version for the selected `baseProcessor` will be used automatically. See [Extraction Changelog](https://docs.extend.ai/2026-02-09/changelog/extraction/extraction-performance) for more details.
    """

    extraction_rules: typing_extensions.NotRequired[
        typing_extensions.Annotated[str, FieldMetadata(alias="extractionRules")]
    ]
    """
    Custom rules to guide the extraction process in natural language.
    """

    schema: JsonObject
    """
    JSON Schema definition of the data to extract.
    
    See the [JSON Schema guide](https://docs.extend.ai/2026-02-09/product/extraction/schema/json-schema) for details and examples of schema configuration.
    """

    advanced_options: typing_extensions.NotRequired[
        typing_extensions.Annotated[ExtractAdvancedOptionsParams, FieldMetadata(alias="advancedOptions")]
    ]
    """
    Advanced configuration options.
    """

    parse_config: typing_extensions.NotRequired[
        typing_extensions.Annotated[ParseConfigParams, FieldMetadata(alias="parseConfig")]
    ]
    """
    Configuration options for the parsing process.
    """
