Repository navigation
feat: add team member removal and a project filter for the member list - #42
Merged
Merged
Conversation
- New team.members.remove(user_id) removes a non-Owner member from the team and returns a MessageResponse. It uses the team token and sends no Idempotency-Key header. A 409 raises ConflictError with the error code. - team.members.list() and team.members.iterate() pass the new filter[project_id] query, which returns only the members who can access that project: members with access to all projects and members selected for it. - Remove the pending list, so the coverage test checks every operation again. - Document both in the README and test the request, the token, the user ID checks, the 409 and the filter on every page. Co-Authored-By: Claude <noreply@anthropic.com>
bjarn
added this pull request to stack #43
October 20, 2026 20:47
bjornftw
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Non-breaking. Adds team member removal and documents the new project filter on the member list. Stacked on the team role management PR.
team.members.remove(user_id)removes a non-Owner member from the team and returns aMessageResponse. It uses the team token and sends no Idempotency-Key header. A409raisesConflictErrorwith the error code (for exampleowner_protected). Empty or..user IDs raiseLettermintConfigErrorbefore any request.team.members.list()andteam.members.iterate()already take the generatedListTeamMembersQuery, so the newfilter[project_id]works without a code change:{"filter": {"project_id": ...}}returns only the members who can access that project (members with access to all projects plus members selected for it). Tests cover it onlistand on every page ofiterate.tests/test_surface.pyis strict again: every generated operation must be reachable from both clients.Usage
Checks
Run locally at the top of the stack:
python -m ruff check src tests scripts: all checks passedpython -m ruff format --check src tests scripts: 28 files already formattedpython -m mypy: no issues in 35 source filespython scripts/unasync.py --check: up to datepython scripts/generate.py --check: the generated files match the pinned spec, and the headers check that CI runs passespython -m pytest tests/ -qon Python 3.10, 3.11, 3.12, 3.13 and 3.14: 305 passed on eachpython -m build,python -m twine check --strict dist/*: passed; the wheel installs in a clean venv and the smoke import passesNot run locally
Nothing.
🤖 Generated with Claude Code