mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
* fully wire up StateProvider within PolicyService * migrate old policy data to new location * minor update to existing interfaces
24 lines
588 B
TypeScript
24 lines
588 B
TypeScript
import { PolicyId } from "../../../types/guid";
|
|
import { PolicyType } from "../../enums";
|
|
import { PolicyResponse } from "../response/policy.response";
|
|
|
|
export class PolicyData {
|
|
id: PolicyId;
|
|
organizationId: string;
|
|
type: PolicyType;
|
|
data: Record<string, string | number | boolean>;
|
|
enabled: boolean;
|
|
|
|
constructor(response?: PolicyResponse) {
|
|
if (response == null) {
|
|
return;
|
|
}
|
|
|
|
this.id = response.id;
|
|
this.organizationId = response.organizationId;
|
|
this.type = response.type;
|
|
this.data = response.data;
|
|
this.enabled = response.enabled;
|
|
}
|
|
}
|