mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-05 09:10:53 +01:00
new collection user api endpoint
This commit is contained in:
parent
0d8e09b3f1
commit
d49182597e
@ -55,7 +55,6 @@ import {
|
||||
CollectionGroupDetailsResponse,
|
||||
CollectionResponse,
|
||||
} from '../models/response/collectionResponse';
|
||||
import { CollectionUserResponse } from '../models/response/collectionUserResponse';
|
||||
import { DomainsResponse } from '../models/response/domainsResponse';
|
||||
import { EventResponse } from '../models/response/eventResponse';
|
||||
import { FolderResponse } from '../models/response/folderResponse';
|
||||
@ -75,6 +74,7 @@ import {
|
||||
} from '../models/response/organizationUserResponse';
|
||||
import { PreloginResponse } from '../models/response/preloginResponse';
|
||||
import { ProfileResponse } from '../models/response/profileResponse';
|
||||
import { SelectionReadOnlyResponse } from '../models/response/selectionReadOnlyResponse';
|
||||
import { SyncResponse } from '../models/response/syncResponse';
|
||||
import { TwoFactorAuthenticatorResponse } from '../models/response/twoFactorAuthenticatorResponse';
|
||||
import { TwoFactorDuoResponse } from '../models/response/twoFactorDuoResponse';
|
||||
@ -157,7 +157,7 @@ export abstract class ApiService {
|
||||
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>>;
|
||||
getCollectionUsers: (organizationId: string, id: string) => Promise<ListResponse<SelectionReadOnlyResponse>>;
|
||||
postCollection: (organizationId: string, request: CollectionRequest) => Promise<CollectionResponse>;
|
||||
putCollection: (organizationId: string, id: string, request: CollectionRequest) => Promise<CollectionResponse>;
|
||||
deleteCollection: (organizationId: string, id: string) => Promise<any>;
|
||||
|
@ -1,22 +0,0 @@
|
||||
import { OrganizationUserStatusType } from '../../enums/organizationUserStatusType';
|
||||
import { OrganizationUserType } from '../../enums/organizationUserType';
|
||||
|
||||
export class CollectionUserResponse {
|
||||
organizationUserId: string;
|
||||
accessAll: boolean;
|
||||
name: string;
|
||||
email: string;
|
||||
type: OrganizationUserType;
|
||||
status: OrganizationUserStatusType;
|
||||
readOnly: boolean;
|
||||
|
||||
constructor(response: any) {
|
||||
this.organizationUserId = response.OrganizationUserId;
|
||||
this.accessAll = response.AccessAll;
|
||||
this.name = response.Name;
|
||||
this.email = response.Email;
|
||||
this.type = response.Type;
|
||||
this.status = response.Status;
|
||||
this.readOnly = response.ReadOnly;
|
||||
}
|
||||
}
|
@ -61,7 +61,6 @@ import {
|
||||
CollectionGroupDetailsResponse,
|
||||
CollectionResponse,
|
||||
} from '../models/response/collectionResponse';
|
||||
import { CollectionUserResponse } from '../models/response/collectionUserResponse';
|
||||
import { DomainsResponse } from '../models/response/domainsResponse';
|
||||
import { ErrorResponse } from '../models/response/errorResponse';
|
||||
import { EventResponse } from '../models/response/eventResponse';
|
||||
@ -82,6 +81,7 @@ import {
|
||||
} from '../models/response/organizationUserResponse';
|
||||
import { PreloginResponse } from '../models/response/preloginResponse';
|
||||
import { ProfileResponse } from '../models/response/profileResponse';
|
||||
import { SelectionReadOnlyResponse } from '../models/response/selectionReadOnlyResponse';
|
||||
import { SyncResponse } from '../models/response/syncResponse';
|
||||
import { TwoFactorAuthenticatorResponse } from '../models/response/twoFactorAuthenticatorResponse';
|
||||
import { TwoFactorDuoResponse } from '../models/response/twoFactorDuoResponse';
|
||||
@ -444,10 +444,10 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return new ListResponse(r, CollectionResponse);
|
||||
}
|
||||
|
||||
async getCollectionUsers(organizationId: string, id: string): Promise<ListResponse<CollectionUserResponse>> {
|
||||
async getCollectionUsers(organizationId: string, id: string): Promise<ListResponse<SelectionReadOnlyResponse>> {
|
||||
const r = await this.send('GET', '/organizations/' + organizationId + '/collections/' + id + '/users',
|
||||
null, true, true);
|
||||
return new ListResponse(r, CollectionUserResponse);
|
||||
return new ListResponse(r, SelectionReadOnlyResponse);
|
||||
}
|
||||
|
||||
async postCollection(organizationId: string, request: CollectionRequest): Promise<CollectionResponse> {
|
||||
|
Loading…
Reference in New Issue
Block a user