2020-01-06 14:27:16 -05:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Threading.Tasks;
|
2022-01-11 10:40:51 +01:00
|
|
|
|
using Bit.Core.Entities;
|
2020-01-20 08:53:09 -05:00
|
|
|
|
using Bit.Core.Enums;
|
2022-06-08 08:44:28 -05:00
|
|
|
|
using Bit.Core.Models.Data.Organizations.Policies;
|
2020-01-06 14:27:16 -05:00
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Repositories
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface IPolicyRepository : IRepository<Policy, Guid>
|
|
|
|
|
|
{
|
2020-01-20 08:53:09 -05:00
|
|
|
|
Task<Policy> GetByOrganizationIdTypeAsync(Guid organizationId, PolicyType type);
|
2020-01-06 14:27:16 -05:00
|
|
|
|
Task<ICollection<Policy>> GetManyByOrganizationIdAsync(Guid organizationId);
|
2020-01-28 15:33:32 -05:00
|
|
|
|
Task<ICollection<Policy>> GetManyByUserIdAsync(Guid userId);
|
2021-09-28 06:54:28 +10:00
|
|
|
|
Task<ICollection<Policy>> GetManyByTypeApplicableToUserIdAsync(Guid userId, PolicyType policyType,
|
|
|
|
|
|
OrganizationUserStatusType minStatus = OrganizationUserStatusType.Accepted);
|
|
|
|
|
|
Task<int> GetCountByTypeApplicableToUserIdAsync(Guid userId, PolicyType policyType,
|
|
|
|
|
|
OrganizationUserStatusType minStatus = OrganizationUserStatusType.Accepted);
|
2020-01-06 14:27:16 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|