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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class SourceSyncLaserficheSettings(UncheckedBaseModel):
    source_archetype_id: typing.Literal["com.laserfiche.repository"] = "com.laserfiche.repository"
    repository_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The Laserfiche repository ID to sync from (e.g., 'r-7144d39a'). If not provided, uses the first available repository.
    """

    filter_options: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Folder IDs to sync from. If empty, syncs from repository root.
    """

    template_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Laserfiche template name(s) to filter by. Use | for multiple: 'Com Dev Building | Email | Com Dev Planning Applications'
    """

    date_after: typing.Optional[str] = pydantic.Field(default=None)
    """
    Only sync documents dated on or after this date (format: M/D/YYYY, e.g., '1/1/2020'). Searches template date fields like Issue Date, Meeting Date, etc.
    """

    include_fields: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Template field names to include in search results. Eliminates extra API calls. Common fields: 'Issue Date', 'Permit No.', 'Street No.', 'Street', 'APN', 'Project Description'.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
