33 lines
1.1 KiB
Python
33 lines
1.1 KiB
Python
"""Analytics API stubs (deal summary and funnel)."""
|
|
from __future__ import annotations
|
|
|
|
from fastapi import APIRouter, Depends, Query, status
|
|
|
|
from app.api.deps import get_organization_context
|
|
from app.services.organization_service import OrganizationContext
|
|
|
|
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),
|
|
context: OrganizationContext = Depends(get_organization_context),
|
|
) -> dict[str, str]:
|
|
"""Placeholder for aggregated deal statistics."""
|
|
_ = (days, context)
|
|
return _stub("GET /analytics/deals/summary")
|
|
|
|
|
|
@router.get("/deals/funnel", status_code=status.HTTP_501_NOT_IMPLEMENTED)
|
|
async def deals_funnel(
|
|
context: OrganizationContext = Depends(get_organization_context),
|
|
) -> dict[str, str]:
|
|
"""Placeholder for funnel analytics."""
|
|
_ = context
|
|
return _stub("GET /analytics/deals/funnel")
|