1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 23:33:31 +00:00
Files
browser/libs/common/src/admin-console/models/data/policy.data.ts
Thomas Rittson eedd6f0881 [AC-2008] [AC-2123] [Pt 2] Transition PolicyService to use StateProvider (#7977)
* fully wire up StateProvider within PolicyService
* migrate old policy data to new location
* minor update to existing interfaces
2024-03-08 10:26:00 +10:00

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;
}
}