# generated by datamodel-codegen:
#   filename:  sponsored_intelligence/si_capabilities.json
#   timestamp: 2026-02-23T01:56:40+00:00

from __future__ import annotations

from enum import Enum
from typing import Annotated, Any

from adcp.types.base import AdCPBaseModel
from pydantic import ConfigDict, Field


class A2ui(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    catalogs: Annotated[
        list[str] | None,
        Field(description="Supported A2UI component catalogs (e.g., 'si-standard', 'standard')"),
    ] = None
    supported: Annotated[bool | None, Field(description='Supports A2UI surface rendering')] = False


class Commerce(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    acp_checkout: Annotated[
        bool | None, Field(description='Supports ACP (Agentic Commerce Protocol) checkout handoff')
    ] = None


class StandardEnum(Enum):
    text = 'text'
    link = 'link'
    image = 'image'
    product_card = 'product_card'
    carousel = 'carousel'
    action_button = 'action_button'


class Components(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    extensions: Annotated[
        dict[str, Any] | None,
        Field(description='Platform-specific extensions (chatgpt_apps_sdk, maps, forms, etc.)'),
    ] = None
    standard: Annotated[
        list[StandardEnum] | None,
        Field(description='Standard components that all SI hosts must render'),
    ] = None


class Avatar(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    avatar_id: Annotated[str | None, Field(description='Brand avatar identifier')] = None
    provider: Annotated[
        str | None, Field(description='Avatar provider (d-id, heygen, synthesia, etc.)')
    ] = None


class Video(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    formats: Annotated[
        list[str] | None, Field(description='Supported video formats (mp4, webm, etc.)')
    ] = None
    max_duration_seconds: Annotated[int | None, Field(description='Maximum video duration')] = None


class Voice(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    provider: Annotated[
        str | None, Field(description='TTS provider (elevenlabs, openai, etc.)')
    ] = None
    voice_id: Annotated[str | None, Field(description='Brand voice identifier')] = None


class Modalities(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    avatar: Annotated[
        bool | Avatar | None, Field(description='Animated video presence with brand avatar')
    ] = None
    conversational: Annotated[
        bool | None, Field(description='Pure text exchange - the baseline modality')
    ] = True
    video: Annotated[bool | Video | None, Field(description='Brand video content playback')] = None
    voice: Annotated[
        bool | Voice | None, Field(description='Audio-based interaction using brand voice')
    ] = None


class SiCapabilities(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    a2ui: Annotated[A2ui | None, Field(description='A2UI (Agent-to-UI) capabilities')] = None
    commerce: Annotated[Commerce | None, Field(description='Commerce capabilities')] = None
    components: Annotated[Components | None, Field(description='Visual components supported')] = (
        None
    )
    mcp_apps: Annotated[
        bool | None, Field(description='Supports MCP Apps for rendering A2UI surfaces in iframes')
    ] = False
    modalities: Annotated[
        Modalities | None, Field(description='Interaction modalities supported')
    ] = None
