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

import typing_extensions
from ..core.serialization import FieldMetadata
from ..types.legacy_splitter_advanced_options_split_method import LegacySplitterAdvancedOptionsSplitMethod
from .page_ranges import PageRangesParams


class LegacySplitterAdvancedOptionsParams(typing_extensions.TypedDict):
    split_identifier_rules: typing_extensions.NotRequired[
        typing_extensions.Annotated[str, FieldMetadata(alias="splitIdentifierRules")]
    ]
    """
    Custom rules for identifying split points.
    """

    split_method: typing_extensions.NotRequired[
        typing_extensions.Annotated[LegacySplitterAdvancedOptionsSplitMethod, FieldMetadata(alias="splitMethod")]
    ]
    """
    The method to use for splitting documents. `high_precision` is more accurate but slower, while `low_latency` 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.
    """

    fixed_page_limit: typing_extensions.NotRequired[
        typing_extensions.Annotated[int, FieldMetadata(alias="fixedPageLimit")]
    ]
    """
    Limit processing to a specific number of pages from the beginning of the document. See [Page Ranges](https://docs.extend.ai/2026-02-09/product/page-ranges).
    """

    page_ranges: typing_extensions.NotRequired[
        typing_extensions.Annotated[PageRangesParams, FieldMetadata(alias="pageRanges")]
    ]
