mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
org user apis, sort function utils
This commit is contained in:
41
src/models/response/organizationUserResponse.ts
Normal file
41
src/models/response/organizationUserResponse.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { OrganizationUserStatusType } from '../../enums/organizationUserStatusType';
|
||||
import { OrganizationUserType } from '../../enums/organizationUserType';
|
||||
import { SelectionReadOnlyResponse } from './selectionReadOnlyResponse';
|
||||
|
||||
export class OrganizationUserResponse {
|
||||
id: string;
|
||||
userId: string;
|
||||
type: OrganizationUserType;
|
||||
status: OrganizationUserStatusType;
|
||||
accessAll: boolean;
|
||||
|
||||
constructor(response: any) {
|
||||
this.id = response.Id;
|
||||
this.userId = response.UserId;
|
||||
this.type = response.Type;
|
||||
this.status = response.Status;
|
||||
this.accessAll = response.AccessAll;
|
||||
}
|
||||
}
|
||||
|
||||
export class OrganizationUserUserDetailsResponse extends OrganizationUserResponse {
|
||||
name: string;
|
||||
email: string;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.name = response.Name;
|
||||
this.email = response.Email;
|
||||
}
|
||||
}
|
||||
|
||||
export class OrganizationUserDetailsResponse extends OrganizationUserResponse {
|
||||
collections: SelectionReadOnlyResponse;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
if (response.Collections != null) {
|
||||
this.collections = response.Collections.map((c: any) => new SelectionReadOnlyResponse(c));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user