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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class ExportRequest(UniversalBaseModel):
    """
    Schema for export request with filters.
    """

    search_term: typing.Optional[str] = pydantic.Field(default=None)
    """
    Search across full_name, email, and username
    """

    role_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Filter by role ID
    """

    status_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Filter by status ID
    """

    include_deleted: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Include soft-deleted members
    """

    sort_by: typing.Optional[str] = pydantic.Field(default=None)
    """
    Field to sort by (full_name, email, role_name, status_name, joined_at)
    """

    sort_order: typing.Optional[str] = pydantic.Field(default=None)
    """
    Sort order (asc or desc)
    """

    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
