feat: add visibility filter param and author_name to tree list endpoint

GET /trees now accepts ?visibility=private|team|link|public to scope results.
TreeListResponse includes author_name (full_name or email) and visibility.
Author names fetched in single query to avoid N+1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-24 03:25:26 -05:00
parent 8c982a95ec
commit 29c3d5eed6
3 changed files with 77 additions and 2 deletions

View File

@@ -176,10 +176,12 @@ class TreeListResponse(BaseModel):
category_info: Optional[CategoryInfo] = None
tags: list[str] = [] # List of tag names
author_id: Optional[UUID] = None
author_name: Optional[str] = None # Display name or email of author
account_id: Optional[UUID] = None
is_active: bool
is_public: bool
is_default: bool
visibility: str = 'team'
status: str # draft or published
version: int
usage_count: int