"""
DSFA RAG API Endpoints — Barrel Re-export.

Split into submodules:
- dsfa_rag_models.py    — Pydantic request/response models
- dsfa_rag_embedding.py — Embedding service integration & text extraction
- dsfa_rag_routes.py    — Route handlers (search, sources, ingest, stats)

Endpoints:
- GET  /api/v1/dsfa-rag/search         - Semantic search with attribution
- GET  /api/v1/dsfa-rag/sources        - List all registered sources
- POST /api/v1/dsfa-rag/sources/{code}/ingest - Trigger source ingestion
- GET  /api/v1/dsfa-rag/chunks/{id}    - Get single chunk with attribution
- GET  /api/v1/dsfa-rag/stats          - Get corpus statistics
"""

# Models
from dsfa_rag_models import (
    DSFASourceResponse,
    DSFAChunkResponse,
    DSFASearchResultResponse,
    DSFASearchResponse,
    DSFASourceStatsResponse,
    DSFACorpusStatsResponse,
    IngestRequest,
    IngestResponse,
    LicenseInfo,
)

# Embedding utilities
from dsfa_rag_embedding import (
    get_embedding,
    get_embeddings_batch,
    extract_text_from_url,
    EMBEDDING_SERVICE_URL,
)

# Routes (router + set_db_pool)
from dsfa_rag_routes import (
    router,
    set_db_pool,
    get_store,
    get_qdrant,
)

__all__ = [
    # Router
    "router",
    "set_db_pool",
    "get_store",
    "get_qdrant",
    # Models
    "DSFASourceResponse",
    "DSFAChunkResponse",
    "DSFASearchResultResponse",
    "DSFASearchResponse",
    "DSFASourceStatsResponse",
    "DSFACorpusStatsResponse",
    "IngestRequest",
    "IngestResponse",
    "LicenseInfo",
    # Embedding
    "get_embedding",
    "get_embeddings_batch",
    "extract_text_from_url",
    "EMBEDDING_SERVICE_URL",
]
