mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 02:03:39 +00:00
* [PM-27662] Add revision date to policy response * [PM-27662] Introduce vault item transfer service * [PM-27662] Add feature flag check * [PM-27662] Add tests * [PM-27662] Add basic implementation to Web vault * [PM-27662] Remove redundant for loop * [PM-27662] Remove unnecessary distinctUntilChanged * [PM-27662] Avoid subscribing to userMigrationInfo$ if feature flag disabled * [PM-27662] Make UserMigrationInfo type more strict * [PM-27662] Typo * [PM-27662] Fix missing i18n * [PM-27662] Fix tests * [PM-27662] Fix tests/types related to policy changes * [PM-27662] Use getById operator
33 lines
903 B
TypeScript
33 lines
903 B
TypeScript
// FIXME: Update this file to be type safe and remove this and next line
|
|
// @ts-strict-ignore
|
|
import { PolicyId } from "../../../types/guid";
|
|
import { PolicyType } from "../../enums";
|
|
import { Policy } from "../domain/policy";
|
|
import { PolicyResponse } from "../response/policy.response";
|
|
|
|
export class PolicyData {
|
|
id: PolicyId;
|
|
organizationId: string;
|
|
type: PolicyType;
|
|
data: Record<string, string | number | boolean>;
|
|
enabled: boolean;
|
|
revisionDate: string;
|
|
|
|
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;
|
|
this.revisionDate = response.revisionDate;
|
|
}
|
|
|
|
static fromPolicy(policy: Policy): PolicyData {
|
|
return Object.assign(new PolicyData(), policy);
|
|
}
|
|
}
|