Merge branch 'organizations' (cherry-picked)

This commit is contained in:
Artem Kashaev
2025-11-27 15:38:47 +05:00
parent 4b45073bd3
commit 8c326501bf
9 changed files with 292 additions and 22 deletions
+11 -3
View File
@@ -1,7 +1,10 @@
"""Contact API stubs required by the spec."""
from __future__ import annotations
from fastapi import APIRouter, Query, status
from fastapi import APIRouter, Depends, Query, status
from app.api.deps import get_organization_context
from app.services.organization_service import OrganizationContext
from .models import ContactCreatePayload
@@ -18,13 +21,18 @@ async def list_contacts(
page_size: int = Query(20, ge=1, le=100),
search: str | None = None,
owner_id: int | None = None,
context: OrganizationContext = Depends(get_organization_context),
) -> dict[str, str]:
"""Placeholder list endpoint supporting the required filters."""
_ = context
return _stub("GET /contacts")
@router.post("/", status_code=status.HTTP_501_NOT_IMPLEMENTED)
async def create_contact(payload: ContactCreatePayload) -> dict[str, str]:
async def create_contact(
payload: ContactCreatePayload,
context: OrganizationContext = Depends(get_organization_context),
) -> dict[str, str]:
"""Placeholder for creating a contact within the current organization."""
_ = payload
_ = (payload, context)
return _stub("POST /contacts")