using Bit.Core.Models.Domain; using Bit.Core.Models.Request; using Bit.Core.Models.Response; using System; using System.Net.Http; using System.Threading.Tasks; namespace Bit.Core.Abstractions { public interface IApiService { string ApiBaseUrl { get; set; } string IdentityBaseUrl { get; set; } bool UrlsSet { get; } Task DeleteCipherAsync(string id); Task DeleteCipherAttachmentAsync(string id, string attachmentId); Task DeleteFolderAsync(string id); Task DoRefreshTokenAsync(); Task GetAccountRevisionDateAsync(); Task GetActiveBearerTokenAsync(); Task GetCipherAsync(string id); Task GetFolderAsync(string id); Task GetProfileAsync(); Task GetSyncAsync(string id); Task PostAccountKeysAsync(KeysRequest request); Task PostCipherAsync(CipherRequest request); Task PostCipherCreateAsync(CipherCreateRequest request); Task PostFolderAsync(FolderRequest request); Task> PostIdentityTokenAsync(TokenRequest request); Task PostPasswordHintAsync(PasswordHintRequest request); Task PostPreloginAsync(PreloginRequest request); Task PostRegisterAsync(RegisterRequest request); Task PutCipherAsync(string id, CipherRequest request); Task PutCipherCollectionsAsync(string id, CipherCollectionsRequest request); Task PutFolderAsync(string id, FolderRequest request); Task PutShareCipherAsync(string id, CipherShareRequest request); Task RefreshIdentityTokenAsync(); Task SendAsync(HttpMethod method, string path, TRequest body, bool authed, bool hasResponse); void SetUrls(EnvironmentUrls urls); Task PostCipherAttachmentAsync(string id, MultipartFormDataContent data); Task PostShareCipherAttachmentAsync(string id, string attachmentId, MultipartFormDataContent data, string organizationId); } }