class ProjectPartnerInviteServiceImpl extends BaseTransactionalService implements ProjectPartnerInviteService {

    @Override
    public ServiceResult<List<SentProjectPartnerInviteResource>> getPartnerInvites(long projectId) {
        return serviceSuccess(projectPartnerInviteRepository.findByProjectId(projectId).stream()
                .filter(invite -> invite.getStatus() == InviteStatus.SENT)
                .map(this::mapToSentResource)
                .collect(toList()));
    }

}