feat(types): add roleIds to user response - #783
Conversation
Parse the new backwards-compatible roleIds fields returned by the backend on user-load responses: top-level on UserResponse and per-tenant on UserResponseAssociatedTenant. Order is not guaranteed to match roleNames. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
🐕 Review complete — View session on Shuni Portal 🐾 |
🐕 Suggested ReviewersThe review assignment prioritizes recent contributors to the changed files, ensuring reviewers are familiar with recent code changes and testing details, with broad coverage across the impacted files.
Suggested by Shuni based on git history and PR context. Names are not @-mentioned to avoid notifying anyone — request a review from whoever fits best. |
There was a problem hiding this comment.
🐕 Shuni's Review
Adds RoleIDs []string to UserResponse and UserResponseAssociatedTenant, parsed from the new roleIds field on user-load responses, with a test covering both levels.
No issues found — good bones! Additive, backwards compatible, JSON tags and omitempty match the sibling RoleNames field, and the test verifies both top-level and per-tenant parsing. Woof!
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
yosiharan
left a comment
There was a problem hiding this comment.
Self review done. RoleIds only added to response objects, which is correct
Related Issues
Required for:
https://github.com/descope/etc/issues/16542
Related PRs
Downstream PRs
Related PRs
In a Nutshell
roleIdson user-load responsesUserResponse, per-tenant onUserResponseAssociatedTenantLoadandSearchAllresponses (sameUserResponsestruct)Description
The backend now returns a
roleIdsfield alongsideroleNameson user-load responses (top-level and per-tenant). This adds matchingRoleIDs []stringfields to the SDK response structs so consumers can parse them. Order is not guaranteed to matchroleNames— consume one field or the other.Must