2021-01-25 21:27:38 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Bit.Core.Models.Data;
|
|
|
|
using Bit.Core.Models.Domain;
|
|
|
|
using Bit.Core.Models.View;
|
|
|
|
|
|
|
|
namespace Bit.Core.Abstractions
|
|
|
|
{
|
|
|
|
public interface ISendService
|
|
|
|
{
|
|
|
|
void ClearCache();
|
2021-04-21 22:27:14 +02:00
|
|
|
Task<(Send send, EncByteArray encryptedFileData)> EncryptAsync(SendView model, byte[] fileData, string password,
|
2021-01-25 21:27:38 +01:00
|
|
|
SymmetricCryptoKey key = null);
|
|
|
|
Task<Send> GetAsync(string id);
|
|
|
|
Task<List<Send>> GetAllAsync();
|
|
|
|
Task<List<SendView>> GetAllDecryptedAsync();
|
2021-04-21 22:27:14 +02:00
|
|
|
Task<string> SaveWithServerAsync(Send sendData, EncByteArray encryptedFileData);
|
2021-01-25 21:27:38 +01:00
|
|
|
Task UpsertAsync(params SendData[] send);
|
|
|
|
Task ReplaceAsync(Dictionary<string, SendData> sends);
|
|
|
|
Task ClearAsync(string userId);
|
|
|
|
Task DeleteAsync(params string[] ids);
|
|
|
|
Task DeleteWithServerAsync(string id);
|
|
|
|
Task RemovePasswordWithServerAsync(string id);
|
|
|
|
}
|
|
|
|
}
|