using System; using System.Collections.Generic; using System.Threading.Tasks; using Bit.Core.Models.Table; using Core.Models.Data; using Bit.Core.Models.Data; namespace Bit.Core.Repositories { public interface ICipherRepository : IRepository { Task GetByIdAsync(Guid id, Guid userId); Task GetDetailsByIdAsync(Guid id); 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 UpdateAttachmentAsync(CipherAttachment attachment); Task DeleteAttachmentAsync(Guid cipherId, string attachmentId); Task DeleteAsync(IEnumerable ids, Guid userId); Task MoveAsync(IEnumerable ids, Guid? folderId, Guid userId); Task DeleteByUserIdAsync(Guid userId); Task UpdateUserKeysAndCiphersAsync(User user, IEnumerable ciphers, IEnumerable folders); Task CreateAsync(IEnumerable ciphers, IEnumerable folders); Task CreateAsync(IEnumerable ciphers, IEnumerable collections, IEnumerable collectionCiphers); } }