# 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
from .response_filter_mode import ResponseFilterMode


class ResponseFilter(UncheckedBaseModel):
    """
    Configuration for filtering tool responses before they are visible to the agent.
    """

    mode: typing.Optional[ResponseFilterMode] = pydantic.Field(default=None)
    """
    Controls how tool responses are filtered. 'all' returns entire response, 'allow' returns only specified paths, 'hide_all' hides the entire response.
    """

    filters: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Dot notation paths to include when mode is 'allow' (e.g., ['ticket.id', 'ticket.status']).
    """

    content_type: typing.Optional[typing.Literal["application/json"]] = pydantic.Field(default=None)
    """
    Content type for response filtering. Only 'application/json' responses are filtered.
    """

    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
