feat: fetchAllUsersV2 added with search-sort-offset pagination

This commit is contained in:
mirarifhasan
2024-01-25 17:50:25 +06:00
committed by Andrew Bastin
parent 88bca2057a
commit abaddd94a5
3 changed files with 76 additions and 0 deletions

View File

@@ -56,6 +56,23 @@ export class AdminService {
return allUsers;
}
/**
* Fetch all the users in the infra.
* @param searchString search on users displayName or email
* @param paginationOption pagination options
* @returns an Either of array of user or error
*/
async fetchUsersV2(
searchString: string,
paginationOption: OffsetPaginationArgs,
) {
const allUsers = await this.userService.fetchAllUsersV2(
searchString,
paginationOption,
);
return allUsers;
}
/**
* Invite a user to join the infra.
* @param adminUID Admin's UID