mirror of
https://github.com/bitwarden/browser
synced 2026-03-01 11:01:17 +00:00
* PM-16947 - JsLibServices - register default DefaultLoginApprovalComponentService * PM-16947 - DeviceResponse - add interface for DevicePendingAuthRequest * PM-16947 - Web translations - migrate all LoginApprovalComponent translations from desktop to web * PM-16947 - LoginApprovalComp - (1) Add loading state (2) Refactor to return proper boolean results (3) Don't create race condition by trying to respond to the close event in the dialog and re-sending responses upon approve or deny click * PM-16947 - DeviceManagementComponent - added support for approving and denying auth requests. * PM-16947 - LoginApprovalComp - Add validation error * PM-16947 - LoginApprovalComponent - remove validation service for now. * PM-16947 - Re add validation * PM-16947 - Fix LoginApprovalComponent tests
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { DeviceType } from "../../../../enums";
|
|
import { BaseResponse } from "../../../../models/response/base.response";
|
|
|
|
export interface DevicePendingAuthRequest {
|
|
id: string;
|
|
creationDate: string;
|
|
}
|
|
|
|
export class DeviceResponse extends BaseResponse {
|
|
id: string;
|
|
userId: string;
|
|
name: string;
|
|
identifier: string;
|
|
type: DeviceType;
|
|
creationDate: string;
|
|
revisionDate: string;
|
|
isTrusted: boolean;
|
|
devicePendingAuthRequest: DevicePendingAuthRequest | null;
|
|
|
|
constructor(response: any) {
|
|
super(response);
|
|
this.id = this.getResponseProperty("Id");
|
|
this.userId = this.getResponseProperty("UserId");
|
|
this.name = this.getResponseProperty("Name");
|
|
this.identifier = this.getResponseProperty("Identifier");
|
|
this.type = this.getResponseProperty("Type");
|
|
this.creationDate = this.getResponseProperty("CreationDate");
|
|
this.revisionDate = this.getResponseProperty("RevisionDate");
|
|
this.isTrusted = this.getResponseProperty("IsTrusted");
|
|
this.devicePendingAuthRequest = this.getResponseProperty("DevicePendingAuthRequest");
|
|
}
|
|
}
|