mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
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));
|
|
}
|
|
}
|
|
}
|