Skip to content

feat(backend): add RoleSet JSON types and missing OrganizationJSON fields - #8502

Merged
jacekradko merged 1 commit into
mainfrom
jacek/backend-role-set-json-types
May 7, 2026
Merged

feat(backend): add RoleSet JSON types and missing OrganizationJSON fields#8502
jacekradko merged 1 commit into
mainfrom
jacek/backend-role-set-json-types

Conversation

@jacekradko

Copy link
Copy Markdown
Contributor

The backend SDK was missing types for the BAPI /v1/role_sets endpoints and several documented fields on OrganizationJSON, forcing consumers to write local augmentations. This adds them, matching the public BAPI OpenAPI schema (2021-02-05, surfaced through 2024-10-01 and 2025-11-10).

New: RoleSetJSON, RoleSetItemJSON, RoleSetMigrationJSON, plus the corresponding ObjectType entries. Added to OrganizationJSON: role_set_key, last_active_at, missing_member_with_elevated_permissions. All additive — no breaking changes.

@vercel

vercelBot commented May 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreview, CommentMay 7, 2026 7:41pm

Request Review

@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 570bcc5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
NameType
@clerk/backendPatch
@clerk/astroPatch
@clerk/expressPatch
@clerk/fastifyPatch
@clerk/honoPatch
@clerk/nextjsPatch
@clerk/nuxtPatch
@clerk/react-routerPatch
@clerk/tanstack-react-startPatch
@clerk/testingPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-newBot commented May 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8502

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8502

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8502

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8502

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8502

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8502

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8502

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8502

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8502

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8502

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8502

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8502

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8502

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8502

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8502

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8502

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8502

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8502

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8502

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8502

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8502

commit: 570bcc5

@coderabbitai

Copy link
Copy Markdown
Contributor

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 097cce59-6b7a-46fe-a51f-d67584ceb992

📥 Commits

Reviewing files that changed from the base of the PR and between 888a68c and 570bcc5.

📒 Files selected for processing (3)
  • .changeset/role-set-json-types.md
  • packages/backend/src/api/resources/JSON.ts
  • packages/backend/src/index.ts

📝 Walkthrough

Walkthrough

This PR adds JSON type definitions for role set resources to the Clerk backend package. Three new ObjectType constants (RoleSet, RoleSetItem, RoleSetMigration) are registered, accompanied by corresponding JSON interface definitions describing their payload shapes. These types are re-exported from the package root to expose them in the public API. The OrganizationJSON type is also extended with three new optional fields: role_set_key, last_active_at, and missing_member_with_elevated_permissions. A changeset documents the patch-level release.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe PR title clearly summarizes the main changes: adding RoleSet JSON types and missing OrganizationJSON fields to the backend SDK.
Description check✅ PassedThe PR description is directly related to the changeset, explaining the motivation for adding RoleSet types and OrganizationJSON fields with specific details about schema alignment and non-breaking changes.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@jacekradko
jacekradko merged commit 6408ab6 into mainMay 7, 2026
43 checks passed
@jacekradko
jacekradko deleted the jacek/backend-role-set-json-types branch May 7, 2026 20:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@jacekradko@tmilewski@iagodahlem@wobsoriano