MCPcopy Index your code
hub / github.com/SecureAI-Tools/SecureAI-Tools / getOrgMembershipsApiPath

Function getOrgMembershipsApiPath

apps/web/lib/fe/api-paths.ts:230–258  ·  view source on GitHub ↗
(
  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;
  },
)

Source from the content-addressed store, hash-verified

228};
229
230export 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
260export const postOrgMembershipsApiPath = (
261 orgId: Id<OrganizationResponse>,

Callers 5

NewChatFunction · 0.90
OrgAISettingsFunction · 0.90
OrgGeneralSettingsFunction · 0.90
getOrgMembershipsFunction · 0.90

Calls 1

isEmptyFunction · 0.90

Tested by

no test coverage detected