using System; using System.Collections.Generic; using System.Threading.Tasks; using Bit.Core.Models.Table; using Core.Models.Data; namespace Bit.Core.Repositories { public interface ICipherRepository : IRepository { Task GetByIdAsync(Guid id, Guid userId); Task GetCanEditByIdAsync(Guid userId, Guid cipherId); Task> GetManyByUserIdAsync(Guid userId); Task> GetManyByUserIdHasCollectionsAsync(Guid userId); Task> GetManyByOrganizationIdAsync(Guid organizationId); Task> GetManyByTypeAndUserIdAsync(Enums.CipherType type, Guid userId); Task CreateAsync(CipherDetails cipher); Task ReplaceAsync(CipherDetails cipher); Task UpsertAsync(CipherDetails cipher); Task ReplaceAsync(Cipher obj, IEnumerable collectionIds); Task UpdatePartialAsync(Guid id, Guid userId, Guid? folderId, bool favorite); Task UpdateUserEmailPasswordAndCiphersAsync(User user, IEnumerable ciphers, IEnumerable folders); Task CreateAsync(IEnumerable ciphers, IEnumerable folders); } }