New getInvitations in clerk-js and invitations from useOrganization#1766
New getInvitations in clerk-js and invitations from useOrganization#1766panteliselef merged 5 commits intomainfrom
getInvitations in clerk-js and invitations from useOrganization#1766Conversation
🦋 Changeset detectedLatest commit: 27448be The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 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 |
| data: requests.map(request => new OrganizationInvitation(request)), | ||
| }; | ||
| }) | ||
| .catch(() => ({ |
There was a problem hiding this comment.
🔧 Catching the error at this point prevents the global error handler of the FAPI client to kick-in. Is there a specific reason we want to do this?
There was a problem hiding this comment.
It seems we used it previously for any method that was fetching arrays
There was a problem hiding this comment.
I see. I am not sure if it's correct thought. We should the error bubble up.
There was a problem hiding this comment.
Wouldn't be breaking change to change it now ? Shall we aim to fix for v5 ?
| isLoaded: boolean; | ||
| organization: OrganizationResource | null; | ||
| /** | ||
| * @deprecated Use `invitations` instead |
There was a problem hiding this comment.
@dimkl Introduced a deprecated utility function that logs a deprecation message for our customers. You should use it.
8278439 to
1f64b5b
Compare
1f64b5b to
1fab907
Compare
… `getPendingInvitations`
…from useOrganization
1fab907 to
27448be
Compare
| data: requests.map(request => new OrganizationInvitation(request)), | ||
| }; | ||
| }) | ||
| .catch(() => ({ |
There was a problem hiding this comment.
I see. I am not sure if it's correct thought. We should the error bubble up.
| : () => clerk.organization?.getMemberships(membershipListParams); | ||
|
|
||
| if (invitationListParams) { | ||
| deprecated('invitationList in useOrganization', 'Use the `invitations` property and return value instead.'); |
|
This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This PR
getPendingInvitationswhich did not allow for filtering by statusgetInvitationswhich support the new pagination params and filteringinvitationListas params and return value of useOrganizationinvitationswhich support paginated responces, build-in pagination, and infinite loading.It was the missing part that brings our organization hooks in harmony between their APIs
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/clerk-js@clerk/clerk-react@clerk/nextjs@clerk/remix@clerk/types@clerk/themes@clerk/localizations@clerk/clerk-expo@clerk/backend@clerk/clerk-sdk-node@clerk/shared@clerk/fastify@clerk/chrome-extensiongatsby-plugin-clerkbuild/tooling/chore