mirror of
https://github.com/bitwarden/browser
synced 2026-01-08 19:43:45 +00:00
api support for sharing
This commit is contained in:
@@ -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>;
|
||||
|
||||
@@ -6,6 +6,7 @@ import { Cipher } from '../models/domain/cipher';
|
||||
import { Field } from '../models/domain/field';
|
||||
import { SymmetricCryptoKey } from '../models/domain/symmetricCryptoKey';
|
||||
|
||||
import { AttachmentView } from '../models/view/attachmentView';
|
||||
import { CipherView } from '../models/view/cipherView';
|
||||
import { FieldView } from '../models/view/fieldView';
|
||||
|
||||
@@ -25,6 +26,9 @@ export abstract class CipherService {
|
||||
updateLastUsedDate: (id: string) => Promise<void>;
|
||||
saveNeverDomain: (domain: string) => Promise<void>;
|
||||
saveWithServer: (cipher: Cipher) => Promise<any>;
|
||||
shareWithServer: (cipher: Cipher) => Promise<any>;
|
||||
shareAttachmentWithServer: (attachmentView: AttachmentView, cipherId: string,
|
||||
organizationId: string) => Promise<any>;
|
||||
saveAttachmentWithServer: (cipher: Cipher, unencryptedFile: any) => Promise<Cipher>;
|
||||
saveAttachmentRawWithServer: (cipher: Cipher, filename: string, data: ArrayBuffer) => Promise<Cipher>;
|
||||
upsert: (cipher: CipherData | CipherData[]) => Promise<any>;
|
||||
|
||||
Reference in New Issue
Block a user