# Generated by @typespec-fastapi/emitter
# Do not edit this file manually — regenerate with: tsp compile .
# This file contains FastAPI router definitions generated from TypeSpec.
"""FastAPI router generated from TypeSpec operations."""
from __future__ import annotations


from fastapi import APIRouter, Depends, HTTPException, Path, Query, status
from pydantic import BaseModel

from ..models.common import ValidationError
from ..models.session_hub import MessageSearchResult, SessionRow, SessionSearchResult


router = APIRouter(tags=["Search"])


@router.get("/api/search", response_model=list[MessageSearchResult] | ValidationError)
async def search_messages(query: str, tool: str | None = Query(None), host: str | None = Query(None), role: str | None = Query(None), limit: int | None = Query(None), mode: str | None = Query(None)) -> list[MessageSearchResult] | ValidationError:
    # TODO: Implement business logic (Phase 3 — service layer)
    raise NotImplementedError(
        "Endpoint GET /api/search not yet implemented"
    )


@router.get("/api/search/sessions", response_model=list[SessionRow] | ValidationError)
async def search_sessions(query: str, tool: str | None = Query(None), host: str | None = Query(None), limit: int | None = Query(None), mode: str | None = Query(None)) -> list[SessionRow] | ValidationError:
    # TODO: Implement business logic (Phase 3 — service layer)
    raise NotImplementedError(
        "Endpoint GET /api/search/sessions not yet implemented"
    )


@router.get("/api/search/similar/sessions", response_model=list[SessionSearchResult])
async def search_similar_sessions(query: str, tool: str | None = Query(None), host: str | None = Query(None), limit: int | None = Query(None)) -> list[SessionSearchResult]:
    # TODO: Implement business logic (Phase 3 — service layer)
    raise NotImplementedError(
        "Endpoint GET /api/search/similar/sessions not yet implemented"
    )


@router.get("/api/search/similar/messages", response_model=list[MessageSearchResult])
async def search_similar_messages(query: str, tool: str | None = Query(None), host: str | None = Query(None), role: str | None = Query(None), limit: int | None = Query(None)) -> list[MessageSearchResult]:
    # TODO: Implement business logic (Phase 3 — service layer)
    raise NotImplementedError(
        "Endpoint GET /api/search/similar/messages not yet implemented"
    )
