|
1 |
| -import type { ClerkPaginatedResponse } from './api'; |
2 | 1 | import type { OrganizationDomainResource, OrganizationEnrollmentMode } from './organizationDomain';
|
3 | 2 | import type { OrganizationInvitationResource, OrganizationInvitationStatus } from './organizationInvitation';
|
4 | 3 | import type { MembershipRole, OrganizationMembershipResource } from './organizationMembership';
|
5 | 4 | import type { OrganizationMembershipRequestResource } from './organizationMembershipRequest';
|
| 5 | +import type { ClerkPaginatedResponse, ClerkPaginationParams } from './pagination'; |
6 | 6 | import type { ClerkResource } from './resource';
|
7 | 7 | import type { RoleResource } from './role';
|
8 | 8 |
|
@@ -64,68 +64,23 @@ export interface OrganizationResource extends ClerkResource {
|
64 | 64 | /**
|
65 | 65 | * @experimental
|
66 | 66 | */
|
67 |
| -export type GetRolesParams = { |
68 |
| - /** |
69 |
| - * This is the starting point for your fetched results. The initial value persists between re-renders |
70 |
| - */ |
71 |
| - initialPage?: number; |
72 |
| - /** |
73 |
| - * Maximum number of items returned per request. The initial value persists between re-renders |
74 |
| - */ |
75 |
| - pageSize?: number; |
76 |
| -}; |
77 |
| - |
78 |
| -export type GetMembersParams = { |
79 |
| - /** |
80 |
| - * This is the starting point for your fetched results. The initial value persists between re-renders |
81 |
| - */ |
82 |
| - initialPage?: number; |
83 |
| - /** |
84 |
| - * Maximum number of items returned per request. The initial value persists between re-renders |
85 |
| - */ |
86 |
| - pageSize?: number; |
| 67 | +export type GetRolesParams = ClerkPaginationParams; |
87 | 68 |
|
| 69 | +export type GetMembersParams = ClerkPaginationParams<{ |
88 | 70 | role?: MembershipRole[];
|
89 |
| -}; |
90 |
| - |
91 |
| -export type GetDomainsParams = { |
92 |
| - /** |
93 |
| - * This is the starting point for your fetched results. The initial value persists between re-renders |
94 |
| - */ |
95 |
| - initialPage?: number; |
96 |
| - /** |
97 |
| - * Maximum number of items returned per request. The initial value persists between re-renders |
98 |
| - */ |
99 |
| - pageSize?: number; |
| 71 | +}>; |
100 | 72 |
|
| 73 | +export type GetDomainsParams = ClerkPaginationParams<{ |
101 | 74 | enrollmentMode?: OrganizationEnrollmentMode;
|
102 |
| -}; |
103 |
| - |
104 |
| -export type GetInvitationsParams = { |
105 |
| - /** |
106 |
| - * This is the starting point for your fetched results. The initial value persists between re-renders |
107 |
| - */ |
108 |
| - initialPage?: number; |
109 |
| - /** |
110 |
| - * Maximum number of items returned per request. The initial value persists between re-renders |
111 |
| - */ |
112 |
| - pageSize?: number; |
| 75 | +}>; |
113 | 76 |
|
| 77 | +export type GetInvitationsParams = ClerkPaginationParams<{ |
114 | 78 | status?: OrganizationInvitationStatus[];
|
115 |
| -}; |
116 |
| - |
117 |
| -export type GetMembershipRequestParams = { |
118 |
| - /** |
119 |
| - * This is the starting point for your fetched results. The initial value persists between re-renders |
120 |
| - */ |
121 |
| - initialPage?: number; |
122 |
| - /** |
123 |
| - * Maximum number of items returned per request. The initial value persists between re-renders |
124 |
| - */ |
125 |
| - pageSize?: number; |
| 79 | +}>; |
126 | 80 |
|
| 81 | +export type GetMembershipRequestParams = ClerkPaginationParams<{ |
127 | 82 | status?: OrganizationInvitationStatus;
|
128 |
| -}; |
| 83 | +}>; |
129 | 84 |
|
130 | 85 | export interface AddMemberParams {
|
131 | 86 | userId: string;
|
|
0 commit comments