Skip to content

Function: findUsersForPicker() ​

ts
function findUsersForPicker(
   client, 
   parameters?, 
   options?
): Promise<{
[key: string]: unknown;
  header?: string;
  total?: number;
  users?: object[];
}>;

Defined in: src/server/api/users.ts:655

Returns a list of users matching query with highlighting.

Parameters ​

ParameterTypeDescription
clientClient-
parameters?{ exclude?: string[]; maxResults?: number; query?: string; showAvatar?: boolean; }-
parameters.exclude?string[]List of users to be excluded from the search results
parameters.maxResults?numberThe maximum number of users to return (defaults to 50). The maximum allowed value is 100 (The combination of maxResults and startAt is limited to the first 100 results). If you specify a value that is higher than this number, your search results will be truncated. If you send a request with startAt=98 and maxResults=20, it will only return 2 users.
parameters.query?stringA string used to search username, Name or e-mail address
parameters.showAvatar?booleanIf true, then avatars are included in the results
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; header?: string; total?: number; users?: object[]; }>