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;
|
2017-03-08 21:45:08 -05:00
|
|
|
|
using Bit.Core.Models.Table;
|
2017-03-18 00:02:06 -04:00
|
|
|
|
using 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
|
|
|
|
{
|
2017-03-18 11:58:02 -04:00
|
|
|
|
Task<CipherDetails> GetByIdAsync(Guid id, Guid userId);
|
2017-03-18 00:02:06 -04:00
|
|
|
|
Task<ICollection<CipherDetails>> GetManyByUserIdAsync(Guid userId);
|
|
|
|
|
|
Task<ICollection<CipherDetails>> GetManyByTypeAndUserIdAsync(Enums.CipherType type, Guid userId);
|
|
|
|
|
|
Task<Tuple<ICollection<CipherDetails>, ICollection<Guid>>> GetManySinceRevisionDateAndUserIdWithDeleteHistoryAsync(
|
2017-02-28 22:51:29 -05:00
|
|
|
|
DateTime sinceRevisionDate, Guid userId);
|
2017-03-18 23:41:46 -04:00
|
|
|
|
Task CreateAsync(CipherDetails cipher);
|
|
|
|
|
|
Task ReplaceAsync(CipherDetails cipher);
|
|
|
|
|
|
Task UpsertAsync(CipherDetails cipher);
|
2017-03-21 00:04:39 -04:00
|
|
|
|
Task ReplaceAsync(Cipher obj, IEnumerable<Guid> subvaultIds);
|
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
|
|
|
|
}
|
|
|
|
|
|
}
|