feat(chats): add role-based member management APIs
All checks were successful
CI / test (push) Successful in 32s

- add owner/admin/member permission checks

- implement member add/remove, role updates, and leave flow

- add chat title update endpoint for manageable chat types
This commit is contained in:
2026-03-08 00:04:54 +03:00
parent 16a584c6cb
commit a4d7294628
4 changed files with 246 additions and 6 deletions

View File

@@ -31,3 +31,15 @@ class ChatCreateRequest(BaseModel):
type: ChatType
title: str | None = Field(default=None, max_length=255)
member_ids: list[int] = Field(default_factory=list)
class ChatMemberAddRequest(BaseModel):
user_id: int
class ChatMemberRoleUpdateRequest(BaseModel):
role: ChatMemberRole
class ChatTitleUpdateRequest(BaseModel):
title: str = Field(min_length=1, max_length=255)