24 lines
786 B
Python
24 lines
786 B
Python
"""Analytics API stubs (deal summary and funnel)."""
|
|
from __future__ import annotations
|
|
|
|
from fastapi import APIRouter, Query, status
|
|
|
|
router = APIRouter(prefix="/analytics", tags=["analytics"])
|
|
|
|
|
|
def _stub(endpoint: str) -> dict[str, str]:
|
|
return {"detail": f"{endpoint} is not implemented yet"}
|
|
|
|
|
|
@router.get("/deals/summary", status_code=status.HTTP_501_NOT_IMPLEMENTED)
|
|
async def deals_summary(days: int = Query(30, ge=1, le=180)) -> dict[str, str]:
|
|
"""Placeholder for aggregated deal statistics."""
|
|
_ = days
|
|
return _stub("GET /analytics/deals/summary")
|
|
|
|
|
|
@router.get("/deals/funnel", status_code=status.HTTP_501_NOT_IMPLEMENTED)
|
|
async def deals_funnel() -> dict[str, str]:
|
|
"""Placeholder for funnel analytics."""
|
|
return _stub("GET /analytics/deals/funnel")
|