Files
server/src/Core/Repositories/ICollectionCipherRepository.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
1.5 KiB
C#
Raw Normal View History

using Bit.Core.Entities;
2017-03-23 17:43:12 -04:00
#nullable enable
2017-03-23 17:43:12 -04:00
namespace Bit.Core.Repositories;
2022-08-29 16:06:55 -04:00
2017-04-27 09:19:30 -04:00
public interface ICollectionCipherRepository
2017-03-23 17:43:12 -04:00
{
Task<ICollection<CollectionCipher>> GetManyByUserIdAsync(Guid userId);
2017-04-27 09:19:30 -04:00
Task<ICollection<CollectionCipher>> GetManyByOrganizationIdAsync(Guid organizationId);
Task<ICollection<CollectionCipher>> GetManyByUserIdCipherIdAsync(Guid userId, Guid cipherId);
Task UpdateCollectionsAsync(Guid cipherId, Guid userId, IEnumerable<Guid> collectionIds);
2017-04-27 09:19:30 -04:00
Task UpdateCollectionsForAdminAsync(Guid cipherId, Guid organizationId, IEnumerable<Guid> collectionIds);
2018-06-13 14:03:44 -04:00
Task UpdateCollectionsForCiphersAsync(IEnumerable<Guid> cipherIds, Guid userId, Guid organizationId,
IEnumerable<Guid> collectionIds);
/// <summary>
/// Add the specified collections to the specified ciphers. If a cipher already belongs to a requested collection,
/// no action is taken.
/// </summary>
/// <remarks>
/// This method does not perform any authorization checks.
/// </remarks>
Task AddCollectionsForManyCiphersAsync(Guid organizationId, IEnumerable<Guid> cipherIds, IEnumerable<Guid> collectionIds);
/// <summary>
/// Remove the specified collections from the specified ciphers. If a cipher does not belong to a requested collection,
/// no action is taken.
/// </summary>
/// <remarks>
/// This method does not perform any authorization checks.
/// </remarks>
Task RemoveCollectionsForManyCiphersAsync(Guid organizationId, IEnumerable<Guid> cipherIds, IEnumerable<Guid> collectionIds);
2017-03-23 17:43:12 -04:00
}