searchUsers method

Future<UserSearchResult> searchUsers({
  1. Map<String, dynamic> query = const {},
  2. int? from,
  3. int? size,
  4. String? scroll,
  5. String? lang,
})

Searches security profiles, optionally returning only those linked to the provided list of security roles.

Implementation

Future<UserSearchResult> searchUsers(
    {Map<String, dynamic> query = const {},
    int? from,
    int? size,
    String? scroll,
    String? lang}) async {
  final request = KuzzleRequest(
    controller: name,
    action: 'searchUsers',
    body: query,
    from: from,
    size: size,
    scroll: scroll,
    lang: lang,
  );
  final response = await kuzzle.query(request);

  return UserSearchResult(kuzzle, request: request, response: response);
}