1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

api support for sharing

This commit is contained in:
Kyle Spearrin
2018-06-12 11:45:02 -04:00
parent 5db55496c2
commit b3f71ed8e4
27 changed files with 371 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
import { EnvironmentUrls } from '../models/domain/environmentUrls';
import { CipherRequest } from '../models/request/cipherRequest';
import { CipherShareRequest } from '../models/request/cipherShareRequest';
import { FolderRequest } from '../models/request/folderRequest';
import { ImportDirectoryRequest } from '../models/request/importDirectoryRequest';
import { PasswordHintRequest } from '../models/request/passwordHintRequest';
@@ -15,6 +16,8 @@ import { IdentityTwoFactorResponse } from '../models/response/identityTwoFactorR
import { ProfileResponse } from '../models/response/profileResponse';
import { SyncResponse } from '../models/response/syncResponse';
import { AttachmentView } from '../models/view/attachmentView';
export abstract class ApiService {
urlsSet: boolean;
baseUrl: string;
@@ -34,8 +37,10 @@ export abstract class ApiService {
deleteFolder: (id: string) => Promise<any>;
postCipher: (request: CipherRequest) => Promise<CipherResponse>;
putCipher: (id: string, request: CipherRequest) => Promise<CipherResponse>;
shareCipher: (id: string, request: CipherShareRequest) => Promise<any>;
deleteCipher: (id: string) => Promise<any>;
postCipherAttachment: (id: string, data: FormData) => Promise<CipherResponse>;
shareCipherAttachment: (id: string, attachmentId: string, data: FormData, organizationId: string) => Promise<any>;
deleteCipherAttachment: (id: string, attachmentId: string) => Promise<any>;
getSync: () => Promise<SyncResponse>;
postImportDirectory: (organizationId: string, request: ImportDirectoryRequest) => Promise<any>;