feat(user): add locale option to invite and invite-batch#735
Merged
Conversation
Plumb a locale string through both forms of invite() (options-object and positional) and through inviteBatch() so callers can override which message template variant the backend sends. - user.ts: add locale to the options-object overload, the positional overload, and both inviteBatch and invite request bodies - user.test.ts: assert the field reaches the wire on both paths
|
🐕 Review complete — View session on Shuni Portal 🐾 |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for specifying a per-invite locale in the Management User API so callers can control which localized invite message template the backend uses.
Changes:
- Added
locale?: stringto theuser.invite()options-object overload and to the positional overload, and forwarded it in the request body. - Added
locale?: stringtouser.inviteBatch()and forwarded it in the batch invite request body. - Extended tests to assert
localeis sent on the wire for the options-objectinvite()path and forinviteBatch().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/management/user.ts | Adds locale to invite/inviteBatch signatures and forwards it in request payloads. |
| lib/management/user.test.ts | Adds assertions that locale is included in request bodies (options-object invite + inviteBatch). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
dorsha
approved these changes
Jun 1, 2026
asafshen
added a commit
to descope/python-sdk
that referenced
this pull request
Jun 1, 2026
Adds an optional `locale` parameter to `user.invite` and `user.invite_batch` to control the language of the invite message, mirroring descope/node-sdk#735. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Related Issues
N/A
Description
Plumb a
localestring through both forms ofinvite()(options-object and positional) and throughinviteBatch()so callers can override which message-template variant the backend sends out with the invite. Mirrors patterns elsewhere in the SDK that already expose a per-calllocale.user.ts— addlocale?: stringto the options-object overload, the positional overload, and forward it in the body of bothinviteandinviteBatchuser.test.ts— assert the field reaches the wire on both pathsMust