mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
add API for user collections
This commit is contained in:
parent
00efae2616
commit
0d8e09b3f1
@ -155,6 +155,7 @@ export abstract class ApiService {
|
||||
organizationId: string) => Promise<any>;
|
||||
|
||||
getCollectionDetails: (organizationId: string, id: string) => Promise<CollectionGroupDetailsResponse>;
|
||||
getUserCollections: () => Promise<ListResponse<CollectionResponse>>;
|
||||
getCollections: (organizationId: string) => Promise<ListResponse<CollectionResponse>>;
|
||||
getCollectionUsers: (organizationId: string, id: string) => Promise<ListResponse<CollectionUserResponse>>;
|
||||
postCollection: (organizationId: string, request: CollectionRequest) => Promise<CollectionResponse>;
|
||||
|
@ -434,6 +434,11 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return new CollectionGroupDetailsResponse(r);
|
||||
}
|
||||
|
||||
async getUserCollections(): Promise<ListResponse<CollectionResponse>> {
|
||||
const r = await this.send('GET', '/collections', null, true, true);
|
||||
return new ListResponse(r, CollectionResponse);
|
||||
}
|
||||
|
||||
async getCollections(organizationId: string): Promise<ListResponse<CollectionResponse>> {
|
||||
const r = await this.send('GET', '/organizations/' + organizationId + '/collections', null, true, true);
|
||||
return new ListResponse(r, CollectionResponse);
|
||||
|
Loading…
Reference in New Issue
Block a user