Skip to content

feat(user): add locale option to invite and invite-batch#735

Merged
asafshen merged 2 commits into
mainfrom
feat/locale-on-invite
Jun 1, 2026
Merged

feat(user): add locale option to invite and invite-batch#735
asafshen merged 2 commits into
mainfrom
feat/locale-on-invite

Conversation

@asafshen

@asafshen asafshen commented Jun 1, 2026

Copy link
Copy Markdown
Member

Related Issues

N/A

Description

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 out with the invite. Mirrors patterns elsewhere in the SDK that already expose a per-call locale.

  • user.ts — add locale?: string to the options-object overload, the positional overload, and forward it in the body of both invite and inviteBatch
  • user.test.ts — assert the field reaches the wire on both paths

Must

  • Tests
  • Documentation (if applicable)

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
Copilot AI review requested due to automatic review settings June 1, 2026 07:47
@shuni-bot-dev

shuni-bot-dev Bot commented Jun 1, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@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

Threads a new optional locale field through both invite overloads and inviteBatch, plus tests that confirm it reaches the wire body. Implementation mirrors existing param patterns (e.g. templateId).

No issues found — good bones! Woof! 🦴

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?: string to the user.invite() options-object overload and to the positional overload, and forwarded it in the request body.
  • Added locale?: string to user.inviteBatch() and forwarded it in the batch invite request body.
  • Extended tests to assert locale is sent on the wire for the options-object invite() path and for inviteBatch().

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.

Comment thread lib/management/user.test.ts
@asafshen asafshen requested a review from dorsha June 1, 2026 08:02
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@asafshen asafshen enabled auto-merge (squash) June 1, 2026 08:08
@asafshen asafshen merged commit 60c63e6 into main Jun 1, 2026
28 checks passed
@asafshen asafshen deleted the feat/locale-on-invite branch June 1, 2026 10:48
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>
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.

3 participants