Skip to content

Commit 142ded7

Browse files
authored
feat(backend): Add orderBy to GetOrganizationListParams (clerk#3164)
* feat(backend): Add orderBy to GetOrganizationListParams * chore(repo): Add changeset
1 parent 8fbe8ba commit 142ded7

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

.changeset/twelve-olives-repair.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/backend': minor
3+
---
4+
5+
Add support for the `orderBy` parameter to the `getOrganizationList()` function

packages/backend/src/api/endpoints/OrganizationApi.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ type MetadataParams<TPublic = OrganizationPublicMetadata, TPrivate = Organizatio
2222
type GetOrganizationListParams = ClerkPaginationRequest<{
2323
includeMembersCount?: boolean;
2424
query?: string;
25+
orderBy?:
26+
| 'name'
27+
| '+name'
28+
| '-name'
29+
| 'created_at'
30+
| '+created_at'
31+
| '-created_at'
32+
| 'members_count'
33+
| '+members_count'
34+
| '-members_count';
2535
}>;
2636

2737
type CreateParams = {

0 commit comments

Comments
 (0)