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