"""
XCom Data Schemas for TextIQ Airflow DAGs.

These dataclasses define the structure of data passed between tasks
via XCom in the document extraction pipeline.
"""

from dataclasses import dataclass
from typing import Any, Optional
from uuid import UUID


@dataclass
class ValidatedEvent:
    """Output from ValidateEventOperator."""

    document_id: UUID
    file_path: str
    content_type: str
    size_bytes: int
    event_id: str
    bucket: str
    object_key: str


@dataclass
class FetchedDocument:
    """Output from FetchDocumentOperator."""

    local_path: str
    content_type: str
    original_filename: str
    file_extension: str


@dataclass
class ParsedDocument:
    """Output from ParseDocumentOperator."""

    doc_type: str
    html_content: Optional[str]
    markdown_content: Optional[str]
    tables: list[dict]
    local_path: str


@dataclass
class ContentChunks:
    """Output from ChunkContentOperator."""

    chunks: list[dict]
    chunk_count: int
    chunking_strategy: str


@dataclass
class ChunkEmbeddings:
    """Output from GenerateEmbeddingsOperator."""

    embeddings: list[dict]
    embedding_count: int
    model: str
    cached_count: int
