mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Merge pull request #130 from bitwarden/Feature.Web.534.AllowMultiSelectInOrgVault
Set up API calls for bulk delete from within an org vault
This commit is contained in:
@@ -165,6 +165,7 @@ export abstract class ApiService {
|
|||||||
deleteCipher: (id: string) => Promise<any>;
|
deleteCipher: (id: string) => Promise<any>;
|
||||||
deleteCipherAdmin: (id: string) => Promise<any>;
|
deleteCipherAdmin: (id: string) => Promise<any>;
|
||||||
deleteManyCiphers: (request: CipherBulkDeleteRequest) => Promise<any>;
|
deleteManyCiphers: (request: CipherBulkDeleteRequest) => Promise<any>;
|
||||||
|
deleteManyCiphersAdmin: (request: CipherBulkDeleteRequest) => Promise<any>;
|
||||||
putMoveCiphers: (request: CipherBulkMoveRequest) => Promise<any>;
|
putMoveCiphers: (request: CipherBulkMoveRequest) => Promise<any>;
|
||||||
putShareCipher: (id: string, request: CipherShareRequest) => Promise<CipherResponse>;
|
putShareCipher: (id: string, request: CipherShareRequest) => Promise<CipherResponse>;
|
||||||
putShareCiphers: (request: CipherBulkShareRequest) => Promise<any>;
|
putShareCiphers: (request: CipherBulkShareRequest) => Promise<any>;
|
||||||
@@ -176,6 +177,7 @@ export abstract class ApiService {
|
|||||||
putDeleteCipher: (id: string) => Promise<any>;
|
putDeleteCipher: (id: string) => Promise<any>;
|
||||||
putDeleteCipherAdmin: (id: string) => Promise<any>;
|
putDeleteCipherAdmin: (id: string) => Promise<any>;
|
||||||
putDeleteManyCiphers: (request: CipherBulkDeleteRequest) => Promise<any>;
|
putDeleteManyCiphers: (request: CipherBulkDeleteRequest) => Promise<any>;
|
||||||
|
putDeleteManyCiphersAdmin: (request: CipherBulkDeleteRequest) => Promise<any>;
|
||||||
putRestoreCipher: (id: string) => Promise<any>;
|
putRestoreCipher: (id: string) => Promise<any>;
|
||||||
putRestoreCipherAdmin: (id: string) => Promise<any>;
|
putRestoreCipherAdmin: (id: string) => Promise<any>;
|
||||||
putRestoreManyCiphers: (request: CipherBulkRestoreRequest) => Promise<any>;
|
putRestoreManyCiphers: (request: CipherBulkRestoreRequest) => Promise<any>;
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
export class CipherBulkDeleteRequest {
|
export class CipherBulkDeleteRequest {
|
||||||
ids: string[];
|
ids: string[];
|
||||||
|
organizationId: string;
|
||||||
|
|
||||||
constructor(ids: string[]) {
|
constructor(ids: string[], organizationId?: string) {
|
||||||
this.ids = ids == null ? [] : ids;
|
this.ids = ids == null ? [] : ids;
|
||||||
|
this.organizationId = organizationId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -423,6 +423,10 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
return this.send('DELETE', '/ciphers', request, true, false);
|
return this.send('DELETE', '/ciphers', request, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteManyCiphersAdmin(request: CipherBulkDeleteRequest): Promise<any> {
|
||||||
|
return this.send('DELETE', '/ciphers/admin', request, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
putMoveCiphers(request: CipherBulkMoveRequest): Promise<any> {
|
putMoveCiphers(request: CipherBulkMoveRequest): Promise<any> {
|
||||||
return this.send('PUT', '/ciphers/move', request, true, false);
|
return this.send('PUT', '/ciphers/move', request, true, false);
|
||||||
}
|
}
|
||||||
@@ -472,6 +476,10 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
return this.send('PUT', '/ciphers/delete', request, true, false);
|
return this.send('PUT', '/ciphers/delete', request, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
putDeleteManyCiphersAdmin(request: CipherBulkDeleteRequest): Promise<any> {
|
||||||
|
return this.send('PUT', '/ciphers/delete-admin', request, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
putRestoreCipher(id: string): Promise<any> {
|
putRestoreCipher(id: string): Promise<any> {
|
||||||
return this.send('PUT', '/ciphers/' + id + '/restore', null, true, false);
|
return this.send('PUT', '/ciphers/' + id + '/restore', null, true, false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user