# 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 ActivitySchema(UncheckedBaseModel):
    """
    Schema for an activity type.
    """

    title: str
    icon: str
    applies_to: typing.List[str] = pydantic.Field()
    """
    Object types this activity can be performed on
    """

    primary_object: typing.Optional[str] = pydantic.Field(default=None)
    """
    Main object type for this activity
    """

    properties: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
    """
    JSON Schema properties for activity fields
    """

    relationships: typing.Optional[typing.Dict[str, typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(
        default=None
    )
    """
    How this activity relates to objects
    """

    quick_action: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Show in quick action bar
    """

    context_hints: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    UI hints based on context
    """

    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
