MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / listOptions

Function listOptions

packages/core/api/src/admin/handlers.ts:31–44  ·  view source on GitHub ↗
(query: {
  readonly limit?: number | undefined;
  readonly offset?: number | undefined;
  readonly email?: string | undefined;
  readonly search?: string | undefined;
})

Source from the content-addressed store, hash-verified

29// trim + lower-case, and a blank term is no filter at all — dropped here so a
30// provider never sees `search: ""`).
31const listOptions = (query: {
32 readonly limit?: number | undefined;
33 readonly offset?: number | undefined;
34 readonly email?: string | undefined;
35 readonly search?: string | undefined;
36}): AdminUsersListOptions => {
37 const search = normalizeMemberSearch(query.search);
38 return {
39 ...(query.limit === undefined ? {} : { limit: query.limit }),
40 ...(query.offset === undefined ? {} : { offset: query.offset }),
41 ...(query.email === undefined ? {} : { email: normalizeEmail(query.email) }),
42 ...(search === undefined ? {} : { search }),
43 };
44};
45
46export const AdminUsersHandlers = HttpApiBuilder.group(
47 AdminUsersHttpApi,

Callers 1

handlers.tsFile · 0.85

Calls 2

normalizeMemberSearchFunction · 0.90
normalizeEmailFunction · 0.90

Tested by

no test coverage detected