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

23 lines
1.0 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
2015-12-09 04:57:38 +01:00
using System.Threading.Tasks;
using Bit.Core.Domains;
using Bit.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<Cipher> GetByIdAsync(Guid id, Guid userId);
Task<CipherShare> GetShareByIdAsync(Guid id, Guid userId);
Task<ICollection<Cipher>> GetManyByUserIdAsync(Guid userId);
Task<ICollection<CipherShare>> GetManyShareByUserIdAsync(Guid userId);
Task<ICollection<Cipher>> GetManyByTypeAndUserIdAsync(Enums.CipherType type, Guid userId);
2017-02-28 04:58:01 +01:00
Task<ICollection<CipherShare>> GetManyShareByTypeAndUserIdAsync(Enums.CipherType type, Guid userId);
Task<Tuple<ICollection<Cipher>, ICollection<Guid>>>
GetManySinceRevisionDateAndUserIdWithDeleteHistoryAsync(DateTime sinceRevisionDate, Guid userId);
Task UpdateUserEmailPasswordAndCiphersAsync(User user, IEnumerable<Cipher> ciphers);
Task CreateAsync(IEnumerable<Cipher> ciphers);
2015-12-09 04:57:38 +01:00
}
}