(
orgId: Id<OrganizationResponse>,
// filters and ordering
{
nameOrEmailLike,
userId,
orderingParams = {
orderBy: "createdAt",
order: "asc",
},
paginationParams = {
page: 1,
pageSize: 10,
},
}: {
nameOrEmailLike?: string;
userId?: string;
orderingParams?: OrderingParams;
paginationParams?: PaginationParams;
},
)
| 228 | }; |
| 229 | |
| 230 | export const getOrgMembershipsApiPath = ( |
| 231 | orgId: Id<OrganizationResponse>, |
| 232 | // filters and ordering |
| 233 | { |
| 234 | nameOrEmailLike, |
| 235 | userId, |
| 236 | orderingParams = { |
| 237 | orderBy: "createdAt", |
| 238 | order: "asc", |
| 239 | }, |
| 240 | paginationParams = { |
| 241 | page: 1, |
| 242 | pageSize: 10, |
| 243 | }, |
| 244 | }: { |
| 245 | nameOrEmailLike?: string; |
| 246 | userId?: string; |
| 247 | orderingParams?: OrderingParams; |
| 248 | paginationParams?: PaginationParams; |
| 249 | }, |
| 250 | ): string => { |
| 251 | return ( |
| 252 | `/api/organizations/${orgId}/memberships?orderBy=${orderingParams.orderBy}&order=${orderingParams.order}&page=${paginationParams.page}&pageSize=${paginationParams.pageSize}` + |
| 253 | (!isEmpty(nameOrEmailLike) |
| 254 | ? `&nameOrEmailLike=${encodeURIComponent(nameOrEmailLike!)}` |
| 255 | : "") + |
| 256 | (!isEmpty(userId) ? `&userId=${encodeURIComponent(userId!)}` : "") |
| 257 | ); |
| 258 | }; |
| 259 | |
| 260 | export const postOrgMembershipsApiPath = ( |
| 261 | orgId: Id<OrganizationResponse>, |
no test coverage detected