mirror of
https://github.com/bitwarden/browser
synced 2025-01-30 13:05:28 +01:00
put collection users apis
This commit is contained in:
parent
d49182597e
commit
2b8ffea494
@ -31,6 +31,7 @@ import { PaymentRequest } from '../models/request/paymentRequest';
|
||||
import { PreloginRequest } from '../models/request/preloginRequest';
|
||||
import { RegisterRequest } from '../models/request/registerRequest';
|
||||
import { SeatRequest } from '../models/request/seatRequest';
|
||||
import { SelectionReadOnlyRequest } from '../models/request/selectionReadOnlyRequest';
|
||||
import { StorageRequest } from '../models/request/storageRequest';
|
||||
import { TokenRequest } from '../models/request/tokenRequest';
|
||||
import { TwoFactorEmailRequest } from '../models/request/twoFactorEmailRequest';
|
||||
@ -159,6 +160,7 @@ export abstract class ApiService {
|
||||
getCollections: (organizationId: string) => Promise<ListResponse<CollectionResponse>>;
|
||||
getCollectionUsers: (organizationId: string, id: string) => Promise<ListResponse<SelectionReadOnlyResponse>>;
|
||||
postCollection: (organizationId: string, request: CollectionRequest) => Promise<CollectionResponse>;
|
||||
putCollectionUsers: (organizationId: string, id: string, request: SelectionReadOnlyRequest[]) => Promise<any>;
|
||||
putCollection: (organizationId: string, id: string, request: CollectionRequest) => Promise<CollectionResponse>;
|
||||
deleteCollection: (organizationId: string, id: string) => Promise<any>;
|
||||
deleteCollectionUser: (organizationId: string, id: string, organizationUserId: string) => Promise<any>;
|
||||
|
@ -37,6 +37,7 @@ import { PaymentRequest } from '../models/request/paymentRequest';
|
||||
import { PreloginRequest } from '../models/request/preloginRequest';
|
||||
import { RegisterRequest } from '../models/request/registerRequest';
|
||||
import { SeatRequest } from '../models/request/seatRequest';
|
||||
import { SelectionReadOnlyRequest } from '../models/request/selectionReadOnlyRequest';
|
||||
import { StorageRequest } from '../models/request/storageRequest';
|
||||
import { TokenRequest } from '../models/request/tokenRequest';
|
||||
import { TwoFactorEmailRequest } from '../models/request/twoFactorEmailRequest';
|
||||
@ -461,6 +462,11 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return new CollectionResponse(r);
|
||||
}
|
||||
|
||||
async putCollectionUsers(organizationId: string, id: string, request: SelectionReadOnlyRequest[]): Promise<any> {
|
||||
await this.send('PUT', '/organizations/' + organizationId + '/collections/' + id + '/users',
|
||||
request, true, false);
|
||||
}
|
||||
|
||||
deleteCollection(organizationId: string, id: string): Promise<any> {
|
||||
return this.send('DELETE', '/organizations/' + organizationId + '/collections/' + id, null, true, false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user