Skip to content

feat(authorization): Add group role assignment endpoints#1619

Draft
csrbarber wants to merge 1 commit into
mainfrom
feat/group-role-assignments
Draft

feat(authorization): Add group role assignment endpoints#1619
csrbarber wants to merge 1 commit into
mainfrom
feat/group-role-assignments

Conversation

@csrbarber

Copy link
Copy Markdown
Contributor

Summary

Adds SDK support for the group role assignment endpoints under /authorization/groups/:group_id/role_assignments, exposed on workos.authorization:

Method Endpoint
listGroupRoleAssignments GET .../role_assignments
getGroupRoleAssignment GET .../role_assignments/:id
createGroupRoleAssignment POST .../role_assignments
removeGroupRoleAssignment DELETE .../role_assignments/:id
removeGroupRoleAssignments DELETE .../role_assignments (by criteria)
replaceGroupRoleAssignments PUT .../role_assignments (bulk replace)

Resource targeting mirrors the existing role-assignment options: provide resourceId, or resourceExternalId + resourceTypeSlug, or omit all to target the organization itself. replaceGroupRoleAssignments returns the resulting set as a List<GroupRoleAssignment>; passing an empty roleAssignments array clears all.

Test plan

  • npx jest src/authorization/authorization.spec.ts — 147 pass (new tests cover list/get/create/remove/remove-by-criteria/replace, including resource-by-id, by-external-id, org-level, and clear-all cases).
  • npx tsc --noEmit, npx eslint src/authorization, and prettier all clean.

🤖 Generated with Claude Code

Adds SDK support for the group role assignment endpoints under
/authorization/groups/:group_id/role_assignments on workos.authorization:
list, get, create, remove (by id and by criteria), and bulk replace.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant