Skip to content

feat(types): add roleIds to user response - #783

Open
yosiharan wants to merge 2 commits into
mainfrom
feat/user-response-roleids
Open

feat(types): add roleIds to user response#783
yosiharan wants to merge 2 commits into
mainfrom
feat/user-response-roleids

Conversation

@yosiharan

@yosiharan yosiharan commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Related Issues

Required for:
https://github.com/descope/etc/issues/16542

Related PRs

Downstream PRs

  • descope/integrationtests#14404

Related PRs

  • descope/backend#1599

In a Nutshell

  • Parse new roleIds on user-load responses
  • Top-level on UserResponse, per-tenant on UserResponseAssociatedTenant
  • Additive, backwards compatible
  • Covers both Load and SearchAll responses (same UserResponse struct)

Description

The backend now returns a roleIds field alongside roleNames on user-load responses (top-level and per-tenant). This adds matching RoleIDs []string fields to the SDK response structs so consumers can parse them. Order is not guaranteed to match roleNames — consume one field or the other.

Must

  • Tests
  • Documentation (if applicable)

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>
@shuni-bot-dev

shuni-bot-dev Bot commented Jun 28, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot-dev

shuni-bot-dev Bot commented Jun 28, 2026

Copy link
Copy Markdown

🐕 Suggested Reviewers

The 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.

Reviewer Reason
aviald Recent contributor with 4 commits across both modified files, indicating ongoing familiarity with the codebase and recent activity that aligns with this change.
dorsha Most commits (6) among contributors across the changed files, suggesting strong familiarity with the testing and implementation details.
shilgapira Contributed 2 commits to both files, providing relevant recent changes and understanding of the modifications.
asafshen Recent activity with 2 commits on the files, offering a good perspective on the recent code and potential impact.
davidbemer Contributed to 'types.go', the core file where the new roleIds field is added, making them well-positioned to review type-related modifications.

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.

@shuni-bot-dev shuni-bot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐕 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 yosiharan left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review done. RoleIds only added to response objects, which is correct

@yosiharan
yosiharan enabled auto-merge (squash) June 28, 2026 12:41
@yosiharan
yosiharan requested a review from aviadl June 28, 2026 12:41
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