mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
Bulk remove organization users (#376)
* Add support for bulk deleeting org users * Rename to UserBulkDeleteRequest * Combine UserBulkReinviteRequest and DeleteRequest to OrganizationUserBulkRequest
This commit is contained in:
parent
8659d0975d
commit
6b9246c272
@ -35,6 +35,7 @@ import { OrganizationTaxInfoUpdateRequest } from '../models/request/organization
|
||||
import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest';
|
||||
import { OrganizationUpgradeRequest } from '../models/request/organizationUpgradeRequest';
|
||||
import { OrganizationUserAcceptRequest } from '../models/request/organizationUserAcceptRequest';
|
||||
import { OrganizationUserBulkRequest } from '../models/request/organizationUserBulkRequest';
|
||||
import { OrganizationUserConfirmRequest } from '../models/request/organizationUserConfirmRequest';
|
||||
import { OrganizationUserInviteRequest } from '../models/request/organizationUserInviteRequest';
|
||||
import { OrganizationUserResetPasswordEnrollmentRequest } from '../models/request/organizationUserResetPasswordEnrollmentRequest';
|
||||
@ -67,7 +68,6 @@ import { UpdateTwoFactorEmailRequest } from '../models/request/updateTwoFactorEm
|
||||
import { UpdateTwoFactorWebAuthnDeleteRequest } from '../models/request/updateTwoFactorWebAuthnDeleteRequest';
|
||||
import { UpdateTwoFactorWebAuthnRequest } from '../models/request/updateTwoFactorWebAuthnRequest';
|
||||
import { UpdateTwoFactorYubioOtpRequest } from '../models/request/updateTwoFactorYubioOtpRequest';
|
||||
import { UserBulkReinviteRequest } from '../models/request/userBulkReinviteRequest';
|
||||
import { VerifyBankRequest } from '../models/request/verifyBankRequest';
|
||||
import { VerifyDeleteRecoverRequest } from '../models/request/verifyDeleteRecoverRequest';
|
||||
import { VerifyEmailRequest } from '../models/request/verifyEmailRequest';
|
||||
@ -273,7 +273,7 @@ export abstract class ApiService {
|
||||
getOrganizationUsers: (organizationId: string) => Promise<ListResponse<OrganizationUserUserDetailsResponse>>;
|
||||
postOrganizationUserInvite: (organizationId: string, request: OrganizationUserInviteRequest) => Promise<any>;
|
||||
postOrganizationUserReinvite: (organizationId: string, id: string) => Promise<any>;
|
||||
postManyOrganizationUserReinvite: (organizationId: string, request: UserBulkReinviteRequest) => Promise<any>;
|
||||
postManyOrganizationUserReinvite: (organizationId: string, request: OrganizationUserBulkRequest) => Promise<any>;
|
||||
postOrganizationUserAccept: (organizationId: string, id: string,
|
||||
request: OrganizationUserAcceptRequest) => Promise<any>;
|
||||
postOrganizationUserConfirm: (organizationId: string, id: string,
|
||||
@ -284,6 +284,7 @@ export abstract class ApiService {
|
||||
putOrganizationUserResetPasswordEnrollment: (organizationId: string, userId: string,
|
||||
request: OrganizationUserResetPasswordEnrollmentRequest) => Promise<any>;
|
||||
deleteOrganizationUser: (organizationId: string, id: string) => Promise<any>;
|
||||
deleteManyOrganizationUsers: (organizationId: string, request: OrganizationUserBulkRequest) => Promise<any>;
|
||||
|
||||
getSync: () => Promise<SyncResponse>;
|
||||
postImportDirectory: (organizationId: string, request: ImportDirectoryRequest) => Promise<any>;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export class UserBulkReinviteRequest {
|
||||
export class OrganizationUserBulkRequest {
|
||||
ids: string[];
|
||||
|
||||
constructor(ids: string[]) {
|
@ -39,6 +39,7 @@ import { OrganizationTaxInfoUpdateRequest } from '../models/request/organization
|
||||
import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest';
|
||||
import { OrganizationUpgradeRequest } from '../models/request/organizationUpgradeRequest';
|
||||
import { OrganizationUserAcceptRequest } from '../models/request/organizationUserAcceptRequest';
|
||||
import { OrganizationUserBulkRequest } from '../models/request/organizationUserBulkRequest';
|
||||
import { OrganizationUserConfirmRequest } from '../models/request/organizationUserConfirmRequest';
|
||||
import { OrganizationUserInviteRequest } from '../models/request/organizationUserInviteRequest';
|
||||
import { OrganizationUserResetPasswordEnrollmentRequest } from '../models/request/organizationUserResetPasswordEnrollmentRequest';
|
||||
@ -71,7 +72,6 @@ import { UpdateTwoFactorEmailRequest } from '../models/request/updateTwoFactorEm
|
||||
import { UpdateTwoFactorWebAuthnDeleteRequest } from '../models/request/updateTwoFactorWebAuthnDeleteRequest';
|
||||
import { UpdateTwoFactorWebAuthnRequest } from '../models/request/updateTwoFactorWebAuthnRequest';
|
||||
import { UpdateTwoFactorYubioOtpRequest } from '../models/request/updateTwoFactorYubioOtpRequest';
|
||||
import { UserBulkReinviteRequest } from '../models/request/userBulkReinviteRequest';
|
||||
import { VerifyBankRequest } from '../models/request/verifyBankRequest';
|
||||
import { VerifyDeleteRecoverRequest } from '../models/request/verifyDeleteRecoverRequest';
|
||||
import { VerifyEmailRequest } from '../models/request/verifyEmailRequest';
|
||||
@ -802,7 +802,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return this.send('POST', '/organizations/' + organizationId + '/users/' + id + '/reinvite', null, true, false);
|
||||
}
|
||||
|
||||
postManyOrganizationUserReinvite(organizationId: string, request: UserBulkReinviteRequest): Promise<any> {
|
||||
postManyOrganizationUserReinvite(organizationId: string, request: OrganizationUserBulkRequest): Promise<any> {
|
||||
return this.send('POST', '/organizations/' + organizationId + '/users/reinvite', request, true, false);
|
||||
}
|
||||
|
||||
@ -836,6 +836,10 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return this.send('DELETE', '/organizations/' + organizationId + '/users/' + id, null, true, false);
|
||||
}
|
||||
|
||||
deleteManyOrganizationUsers(organizationId: string, request: OrganizationUserBulkRequest): Promise<any> {
|
||||
return this.send('DELETE', '/organizations/' + organizationId + '/users', request, true, false);
|
||||
}
|
||||
|
||||
// Plan APIs
|
||||
|
||||
async getPlans(): Promise<ListResponse<PlanResponse>> {
|
||||
|
Loading…
Reference in New Issue
Block a user