Skip to content

feat: add team member removal and a project filter for the member list - #45

Merged
bjarn merged 1 commit into
feat/team-rolesfrom
feat/team-member-removal
Oct 21, 2026
Merged

bjarn merged 1 commit into
feat/team-rolesfrom
feat/team-member-removal

Conversation

@bjarn

@bjarn bjarn commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Adds team.members.remove(userId, options?): DELETE /team/members/{userId}, returns MessageResponse (team token). The Owner can't be removed; that answers 409 and throws the existing ConflictError. An unknown member throws NotFoundError. Empty, . and .. user IDs are rejected before any request. No request body and no Idempotency-Key.
  • team.members.list and team.members.iterate accept filter: { project_id } (sent as filter[project_id]). The list then has only the members who can access that project: members with access to all projects plus the members selected for it. An unknown project returns an empty list. The methods already took the generated query type, so the filter needed only docs and tests, no signature change.
  • This PR makes the coverage test strict again: the pending list is gone, and every operation in the generated table must have an SDK method.
  • README: remove is in the Team API table, and the Team API example shows the project filter.

Non-breaking.

Usage

// The members who can access a project.
const page = await lettermint.team.members.list({ filter: { project_id: 'project-id' } });

for await (const member of lettermint.team.members.iterate({ filter: { project_id: 'project-id' } })) {
  console.log(member.email);
}

await lettermint.team.members.remove('user-id');

Checks

On this branch (top of the stack):

  • npm run lint: passed
  • npm run type-check: passed
  • npm run generate:check: generated files up to date with the pinned spec; the header-only mode that CI runs also passes
  • npm run test:coverage: 8 suites, 350 tests passed
  • npm run test:coverage on Node 20.18.0, 22.21.0 and 24.18.0: 350 passed each
  • npm run build: passed
  • npm run test:smoke: ESM import, CJS require and type declarations OK

Not run locally

Nothing; every CI step was run locally.

🤖 Generated with Claude Code

Add `team.members.remove(userId)` (team token). `team.members.list` and
`team.members.iterate` accept `filter: { project_id }`, which returns only
the members who can access that project.

The coverage test is strict again: every operation has an SDK method.

Co-Authored-By: Claude <noreply@anthropic.com>
@bjarn
bjarn requested a review from a team as a code owner October 20, 2026 20:46
@bjarn
bjarn added this pull request to stack #46 October 20, 2026 20:46
@bjarn
bjarn merged commit 6a92229 into main Oct 21, 2026
4 checks passed
@bjarn
bjarn deleted the feat/team-member-removal branch October 21, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants