1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-27 21:53:57 +00:00

change login to cipher apis

This commit is contained in:
Kyle Spearrin
2017-09-20 17:37:09 -04:00
parent 15f074a45b
commit e8486abccf
14 changed files with 17 additions and 201 deletions

View File

@@ -4,10 +4,8 @@ using Bit.App.Models.Api;
namespace Bit.App.Abstractions
{
public interface ICipherApiRepository
public interface ICipherApiRepository : IApiRepository<CipherRequest, CipherResponse, string>
{
Task<ApiResult<CipherResponse>> GetByIdAsync(string id);
Task<ApiResult<ListResponse<CipherResponse>>> GetAsync();
Task<ApiResult<CipherResponse>> PostAttachmentAsync(string cipherId, byte[] data, string fileName);
Task<ApiResult> DeleteAttachmentAsync(string cipherId, string attachmentId);
}

View File

@@ -1,11 +0,0 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Bit.App.Models.Api;
namespace Bit.App.Abstractions
{
public interface ILoginApiRepository : IApiRepository<LoginRequest, LoginResponse, string>
{
}
}

View File

@@ -12,7 +12,7 @@ namespace Bit.App.Abstractions
Task<IEnumerable<Login>> GetAllAsync();
Task<IEnumerable<Login>> GetAllAsync(bool favorites);
Task<Tuple<IEnumerable<Login>, IEnumerable<Login>>> GetAllAsync(string uriString);
Task<ApiResult<LoginResponse>> SaveAsync(Login login);
Task<ApiResult<CipherResponse>> SaveAsync(Login login);
Task<ApiResult> DeleteAsync(string id);
Task<byte[]> DownloadAndDecryptAttachmentAsync(string url, string orgId = null);
Task<ApiResult<CipherResponse>> EncryptAndSaveAttachmentAsync(Login login, byte[] data, string fileName);