2016-05-21 17:16:22 -04:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2015-12-08 22:57:38 -05:00
|
|
|
|
using System.Threading.Tasks;
|
2016-02-21 00:15:17 -05:00
|
|
|
|
using Bit.Core.Domains;
|
2017-02-21 22:52:02 -05:00
|
|
|
|
using Bit.Core.Models.Data;
|
2015-12-08 22:57:38 -05:00
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Repositories
|
|
|
|
|
|
{
|
2016-05-21 17:16:22 -04:00
|
|
|
|
public interface ICipherRepository : IRepository<Cipher, Guid>
|
2015-12-08 22:57:38 -05:00
|
|
|
|
{
|
2016-05-21 17:16:22 -04:00
|
|
|
|
Task<Cipher> GetByIdAsync(Guid id, Guid userId);
|
2017-02-21 22:52:02 -05:00
|
|
|
|
Task<CipherShare> GetShareByIdAsync(Guid id, Guid userId);
|
2016-05-21 17:16:22 -04:00
|
|
|
|
Task<ICollection<Cipher>> GetManyByUserIdAsync(Guid userId);
|
2017-02-21 22:52:02 -05:00
|
|
|
|
Task<ICollection<CipherShare>> GetManyShareByUserIdAsync(Guid userId);
|
2016-05-21 17:16:22 -04:00
|
|
|
|
Task<ICollection<Cipher>> GetManyByTypeAndUserIdAsync(Enums.CipherType type, Guid userId);
|
2017-02-27 22:58:01 -05:00
|
|
|
|
Task<ICollection<CipherShare>> GetManyShareByTypeAndUserIdAsync(Enums.CipherType type, Guid userId);
|
2016-06-08 20:40:20 -04:00
|
|
|
|
Task<Tuple<ICollection<Cipher>, ICollection<Guid>>>
|
|
|
|
|
|
GetManySinceRevisionDateAndUserIdWithDeleteHistoryAsync(DateTime sinceRevisionDate, Guid userId);
|
2016-05-21 17:16:22 -04:00
|
|
|
|
Task UpdateUserEmailPasswordAndCiphersAsync(User user, IEnumerable<Cipher> ciphers);
|
|
|
|
|
|
Task CreateAsync(IEnumerable<Cipher> ciphers);
|
2015-12-08 22:57:38 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|