1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-02 13:53:23 +01:00
bitwarden-server/src/Core/Repositories/ICipherRepository.cs

25 lines
1.1 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
2015-12-09 04:57:38 +01:00
using System.Threading.Tasks;
2017-03-09 03:45:08 +01:00
using Bit.Core.Models.Table;
2017-03-18 05:02:06 +01:00
using Core.Models.Data;
2015-12-09 04:57:38 +01:00
namespace Bit.Core.Repositories
{
public interface ICipherRepository : IRepository<Cipher, Guid>
2015-12-09 04:57:38 +01:00
{
Task<CipherDetails> GetByIdAsync(Guid id, Guid userId);
Task<CipherFullDetails> GetFullDetailsByIdAsync(Guid id, Guid userId);
2017-03-18 05:02:06 +01:00
Task<ICollection<CipherDetails>> GetManyByUserIdAsync(Guid userId);
2017-03-23 22:43:12 +01:00
Task<ICollection<CipherDetails>> GetManyByUserIdHasSubvaultsAsync(Guid userId);
2017-03-18 05:02:06 +01:00
Task<ICollection<CipherDetails>> GetManyByTypeAndUserIdAsync(Enums.CipherType type, Guid userId);
2017-03-19 04:41:46 +01:00
Task CreateAsync(CipherDetails cipher);
Task ReplaceAsync(CipherDetails cipher);
Task UpsertAsync(CipherDetails cipher);
Task ReplaceAsync(Cipher obj, IEnumerable<Guid> subvaultIds);
Task UpdatePartialAsync(Guid id, Guid userId, Guid? folderId, bool favorite);
2017-04-17 20:53:07 +02:00
Task UpdateUserEmailPasswordAndCiphersAsync(User user, IEnumerable<Cipher> ciphers, IEnumerable<Folder> folders);
Task CreateAsync(IEnumerable<Cipher> ciphers, IEnumerable<Folder> folders);
2015-12-09 04:57:38 +01:00
}
}