# generated by datamodel-codegen:
#   filename:  e2a-openapi3.yaml

from __future__ import annotations

from pydantic import BaseModel, ConfigDict, Field


class AgentIdentity(BaseModel):
    model_config = ConfigDict(
        populate_by_name=True,
    )
    agent_mode: str | None = None
    created_at: str | None = None
    domain: str | None = None
    domain_verified: bool | None = None
    email: str | None = None
    hitl_enabled: bool | None = None
    hitl_expiration_action: str | None = None
    hitl_ttl_seconds: int | None = None
    id: str | None = None
    name: str | None = None
    public: bool | None = None
    user_id: str | None = None
    webhook_url: str | None = None


class Domain(BaseModel):
    model_config = ConfigDict(
        populate_by_name=True,
    )
    created_at: str | None = None
    domain: str | None = None
    user_id: str | None = None
    verification_token: str | None = None
    verified: bool | None = None
    verified_at: str | None = None


class Message(BaseModel):
    model_config = ConfigDict(
        populate_by_name=True,
    )
    agent_id: str | None = None
    approval_expires_at: str | None = None
    attachments: list[int] | None = None
    auth_headers: dict[str, str] | None = None
    bcc: list[str] | None = None
    body_html: str | None = None
    body_text: str | None = None
    cc: list[str] | None = None
    conversation_id: str | None = None
    created_at: str | None = None
    delivery_status: str | None = None
    direction: str | None = None
    edited: bool | None = None
    email_message_id: str | None = None
    expires_at: str | None = None
    id: str | None = None
    method: str | None = None
    provider_message_id: str | None = None
    raw_message: list[int] | None = None
    recipient: str | None = None
    rejection_reason: str | None = None
    reply_to: list[str] | None = Field(
        None,
        description='ReplyTo is the parsed Reply-To: header on inbound messages — empty\nwhen the header was absent. Distinct from Sender so consumers can\nrecover the original From: of forwarded / notification mail whose\nReply-To points at a different mailbox. Outbound-irrelevant.',
    )
    reviewed_at: str | None = None
    sender: str | None = None
    status: str | None = Field(
        None,
        description="HITL approval fields. Status defaults to 'sent'; body and attachments\nare populated only while a message is in 'pending_approval', and are\nscrubbed on any terminal transition.",
    )
    subject: str | None = None
    to_recipients: list[str] | None = Field(
        None,
        description='Multi-recipient fields. For outbound, these are the addressed\nTo/Cc/Bcc recipients of the send. For inbound, ToRecipients and CC\nare the parsed To: and Cc: headers of the original message (the\nper-delivery target for this row is in Recipient). BCC is\noutbound-only.',
    )
    type: str | None = None
    webhook_attempts: int | None = None
    webhook_error: str | None = None
    webhook_status: str | None = None
