2017-03-07 23:06:14 -05:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Threading.Tasks;
|
2017-03-08 21:45:08 -05:00
|
|
|
|
using Bit.Core.Models.Table;
|
2017-03-07 23:06:14 -05:00
|
|
|
|
using System.Collections.Generic;
|
2017-05-11 12:22:14 -04:00
|
|
|
|
using Bit.Core.Models.Data;
|
2017-03-07 23:06:14 -05:00
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Repositories
|
|
|
|
|
|
{
|
2017-04-27 09:19:30 -04:00
|
|
|
|
public interface ICollectionRepository : IRepository<Collection, Guid>
|
2017-03-07 23:06:14 -05:00
|
|
|
|
{
|
2017-04-07 16:41:04 -04:00
|
|
|
|
Task<int> GetCountByOrganizationIdAsync(Guid organizationId);
|
2017-05-11 12:22:14 -04:00
|
|
|
|
Task<Tuple<Collection, ICollection<SelectionReadOnly>>> GetByIdWithGroupsAsync(Guid id);
|
2017-04-27 09:19:30 -04:00
|
|
|
|
Task<ICollection<Collection>> GetManyByOrganizationIdAsync(Guid organizationId);
|
2017-08-30 15:57:17 -04:00
|
|
|
|
Task<ICollection<Collection>> GetManyByUserIdAsync(Guid userId, bool writeOnly);
|
2017-05-11 14:52:35 -04:00
|
|
|
|
Task<ICollection<CollectionUserDetails>> GetManyUserDetailsByIdAsync(Guid organizationId, Guid collectionId);
|
2017-05-11 12:22:14 -04:00
|
|
|
|
Task CreateAsync(Collection obj, IEnumerable<SelectionReadOnly> groups);
|
|
|
|
|
|
Task ReplaceAsync(Collection obj, IEnumerable<SelectionReadOnly> groups);
|
2017-05-11 14:52:35 -04:00
|
|
|
|
Task DeleteUserAsync(Guid collectionId, Guid organizationUserId);
|
2017-03-07 23:06:14 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|