2017-03-02 00:15:05 -05:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Threading.Tasks;
|
2017-03-08 21:45:08 -05:00
|
|
|
|
using Bit.Core.Models.Table;
|
2017-03-04 21:28:41 -05:00
|
|
|
|
using Bit.Core.Models.Data;
|
2017-03-25 21:53:32 -04:00
|
|
|
|
using Bit.Core.Enums;
|
2017-03-02 00:15:05 -05:00
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Repositories
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface IOrganizationUserRepository : IRepository<OrganizationUser, Guid>
|
|
|
|
|
|
{
|
2017-04-07 16:41:04 -04:00
|
|
|
|
Task<int> GetCountByOrganizationIdAsync(Guid organizationId);
|
2017-04-07 14:52:31 -04:00
|
|
|
|
Task<int> GetCountByFreeOrganizationAdminUserAsync(Guid userId);
|
2017-04-27 17:28:39 -04:00
|
|
|
|
Task<int> GetCountByOrganizationOwnerUserAsync(Guid userId);
|
2017-04-05 15:31:33 -04:00
|
|
|
|
Task<ICollection<OrganizationUser>> GetManyByUserAsync(Guid userId);
|
2017-03-29 21:26:19 -04:00
|
|
|
|
Task<ICollection<OrganizationUser>> GetManyByOrganizationAsync(Guid organizationId, OrganizationUserType? type);
|
2017-03-28 21:16:19 -04:00
|
|
|
|
Task<OrganizationUser> GetByOrganizationAsync(Guid organizationId, string email);
|
2017-04-12 10:07:27 -04:00
|
|
|
|
Task<OrganizationUser> GetByOrganizationAsync(Guid organizationId, Guid userId);
|
2017-05-11 10:32:25 -04:00
|
|
|
|
Task<Tuple<OrganizationUser, ICollection<SelectionReadOnly>>> GetByIdWithCollectionsAsync(Guid id);
|
2017-03-06 20:51:13 -05:00
|
|
|
|
Task<ICollection<OrganizationUserUserDetails>> GetManyDetailsByOrganizationAsync(Guid organizationId);
|
2017-03-25 21:53:32 -04:00
|
|
|
|
Task<ICollection<OrganizationUserOrganizationDetails>> GetManyDetailsByUserAsync(Guid userId,
|
|
|
|
|
|
OrganizationUserStatusType? status = null);
|
2017-05-09 19:04:01 -04:00
|
|
|
|
Task UpdateGroupsAsync(Guid orgUserId, IEnumerable<Guid> groupIds);
|
2017-03-02 00:15:05 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|