feat(l1): account L1 category settings API (owner/admin write)
GET /accounts/me/l1-categories (require_l1_or_above) returns enabled + available + hard_floor; PATCH (require_account_owner_or_admin) sets the enabled set, dropping unknown/hard-floored keys via l1_category_service. New L1CategoriesResponse/Update schemas. 6 API tests green (incl. engineer + l1_tech write both 403); test_accounts regression 36 passed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
14
backend/app/schemas/l1_categories.py
Normal file
14
backend/app/schemas/l1_categories.py
Normal file
@@ -0,0 +1,14 @@
|
||||
"""Schemas for the account L1 AI-build category settings surface (Phase 2A)."""
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class L1CategoriesResponse(BaseModel):
|
||||
"""Current enabled set + the full available list + the read-only hard floor."""
|
||||
enabled: list[str]
|
||||
available: list[str]
|
||||
hard_floor: list[str]
|
||||
|
||||
|
||||
class L1CategoriesUpdate(BaseModel):
|
||||
"""Owner/admin write: the new enabled set (unknown/hard-floored keys dropped)."""
|
||||
enabled: list[str]
|
||||
Reference in New Issue
Block a user