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-24 16:15:50 -04:00
|
|
|
|
Task<CipherFullDetails> GetFullDetailsByIdAsync(Guid id, Guid userId);
|
2017-03-18 00:02:06 -04:00
|
|
|
|
Task<ICollection<CipherDetails>> GetManyByUserIdAsync(Guid userId);
|
2017-03-23 17:43:12 -04:00
|
|
|
|
Task<ICollection<CipherDetails>> GetManyByUserIdHasSubvaultsAsync(Guid userId);
|
2017-03-18 00:02:06 -04:00
|
|
|
|
Task<ICollection<CipherDetails>> GetManyByTypeAndUserIdAsync(Enums.CipherType type, 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);
|
2017-03-24 16:15:50 -04:00
|
|
|
|
Task UpdatePartialAsync(Guid id, Guid userId, Guid? folderId, bool favorite);
|
2017-04-17 14:53:07 -04:00
|
|
|
|
Task UpdateUserEmailPasswordAndCiphersAsync(User user, IEnumerable<Cipher> ciphers, IEnumerable<Folder> folders);
|
2017-04-15 22:26:45 -04:00
|
|
|
|
Task CreateAsync(IEnumerable<Cipher> ciphers, IEnumerable<Folder> folders);
|
2015-12-08 22:57:38 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|