Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/beige-eyes-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/backend': patch
---

`OrganizationMembershipRole` should respect authorization types provided by the developer if those exist.
4 changes: 3 additions & 1 deletion packages/backend/src/api/resources/Enums.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { OrganizationCustomRoleKey } from '@clerk/types';

export type OAuthProvider =
| 'facebook'
| 'google'
Expand All @@ -20,7 +22,7 @@ export type OAuthStrategy = `oauth_${OAuthProvider}`;

export type OrganizationInvitationStatus = 'pending' | 'accepted' | 'revoked';

export type OrganizationMembershipRole = 'basic_member' | 'guest_member' | 'admin';
export type OrganizationMembershipRole = OrganizationCustomRoleKey;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please forgive my ignorance but would we not want to include the default roles 'org:member' | 'org:admin' here as well? We had a customer reach out to support regarding this TS error.
Screenshot 2023-12-19 at 11 14 19 PM

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.

As discussed we will not add the default roles in types for the time being, customers will be unblocked with the fix from this PR


export type SignInStatus = 'needs_identifier' | 'needs_factor_one' | 'needs_factor_two' | 'complete';

Expand Down