-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(backend): Introduce OrganizationRoleAPI #2177
Conversation
🦋 Changeset detectedLatest commit: 16d9e5d The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
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 |
|
||
const basePath = '/organizations_roles'; | ||
|
||
type GetOrganizationRoleListParams = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 We also support query
& order_by
parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chanioxaris is order_by a string or can i provide a stricter type ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a string
name: string; | ||
key: string; | ||
description: string; | ||
permissions: string[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 The permissions are an array of permission objects
34ae2ba
to
8e0587b
Compare
name?: string; | ||
description?: string; | ||
//TODO(@pantelis): Will this override or union ? | ||
permissions?: string[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chanioxaris when updating permissions, is it an addition or override ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an override. For additions, you have to use the dedicated endpoint. Of course, if you don't specify any property, we won't update them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ permissions: undefined } // will not override
{ permissions: [] } // will assign no perms to a role
@chanioxaris is the above correct ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct!
04b8d3a
to
cedf75b
Compare
cedf75b
to
16d9e5d
Compare
* feat(backend): Introduce OrganizationRoleAPI * test(backend): Update exports.test.ts * test(clerk-sdk-node): Update exports * test(nextjs): Update exports.test.ts.snap * feat(backend): Address PR comments * chore(backend): Rename OrganizationRole to Role
This reverts commit b3a3dcd
Description
Add OrganizationRoleAPI for CRUD operations regarding instance level organization roles.
This will be backported
Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change
Packages affected
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/clerk-expo
@clerk/fastify
gatsby-plugin-clerk
@clerk/localizations
@clerk/nextjs
@clerk/clerk-react
@clerk/remix
@clerk/clerk-sdk-node
@clerk/shared
@clerk/themes
@clerk/types
build/tooling/chore