class InviteUserServiceImpl extends BaseTransactionalService implements InviteUserService {

    @Override
    public ServiceResult<RoleInvitePageResource> findPendingInternalUserInvites(String filter, Pageable pageable) {
        Page<RoleInvite> pagedResult = roleInviteRepository.findByEmailContainsAndStatus(filter, InviteStatus.SENT, pageable);

        List<RoleInviteResource> roleInviteResources = pagedResult.getContent()
                .stream()
                .map(roleInviteMapper::mapToResource)
                .collect(Collectors.toList());
        return serviceSuccess(new RoleInvitePageResource(pagedResult.getTotalElements(), pagedResult.getTotalPages(), roleInviteResources, pagedResult.getNumber(), pagedResult.getSize()));
    }

}