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

import typing_extensions
from ..core.serialization import FieldMetadata
from ..types.split_advanced_options_split_method import SplitAdvancedOptionsSplitMethod
from .page_ranges import PageRangesParams


class SplitAdvancedOptionsParams(typing_extensions.TypedDict):
    split_identifier_rules: typing_extensions.NotRequired[
        typing_extensions.Annotated[str, FieldMetadata(alias="splitIdentifierRules")]
    ]
    """
    Custom rules for identifying split points.
    
    **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, use the `identifierKey` field on each classification in `splitClassifications` instead. This provides per-type identifier extraction rules rather than a single global rule. On those versions, this field is accepted but ignored if provided.
    """

    split_method: typing_extensions.NotRequired[
        typing_extensions.Annotated[SplitAdvancedOptionsSplitMethod, FieldMetadata(alias="splitMethod")]
    ]
    """
    The method to use for splitting documents. `high_precision` is more accurate but slower, while `basic_precision` is faster but less precise.
    
    **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
    """

    split_excel_documents_by_sheet_enabled: typing_extensions.NotRequired[
        typing_extensions.Annotated[bool, FieldMetadata(alias="splitExcelDocumentsBySheetEnabled")]
    ]
    """
    For Excel documents, split by worksheet.
    """

    page_ranges: typing_extensions.NotRequired[
        typing_extensions.Annotated[PageRangesParams, FieldMetadata(alias="pageRanges")]
    ]
    page_overlap_enabled: typing_extensions.NotRequired[
        typing_extensions.Annotated[bool, FieldMetadata(alias="pageOverlapEnabled")]
    ]
    """
    When enabled, the splitter will allow for page overlap when splitting a document such that a page can occur in multiple adjacent splits when context from the previous split is on the page and context from the next split is on the page.
    """
