bitwarden-estensione-browser/src/models/data/organizationData.ts

45 lines
1.5 KiB
TypeScript
Raw Normal View History

2018-05-18 21:26:46 +02:00
import { ProfileOrganizationResponse } from '../response/profileOrganizationResponse';
import { OrganizationUserStatusType } from '../../enums/organizationUserStatusType';
import { OrganizationUserType } from '../../enums/organizationUserType';
export class OrganizationData {
id: string;
name: string;
status: OrganizationUserStatusType;
type: OrganizationUserType;
enabled: boolean;
2020-01-15 21:25:06 +01:00
usePolicies: boolean;
useGroups: boolean;
useDirectory: boolean;
useEvents: boolean;
useTotp: boolean;
use2fa: boolean;
2019-03-02 18:22:51 +01:00
useApi: boolean;
selfHost: boolean;
usersGetPremium: boolean;
seats: number;
maxCollections: number;
2018-07-18 15:21:34 +02:00
maxStorageGb?: number;
2018-05-18 21:26:46 +02:00
constructor(response: ProfileOrganizationResponse) {
this.id = response.id;
this.name = response.name;
this.status = response.status;
this.type = response.type;
this.enabled = response.enabled;
2020-01-15 21:25:06 +01:00
this.usePolicies = response.usePolicies;
this.useGroups = response.useGroups;
this.useDirectory = response.useDirectory;
this.useEvents = response.useEvents;
this.useTotp = response.useTotp;
this.use2fa = response.use2fa;
2019-03-02 18:22:51 +01:00
this.useApi = response.useApi;
this.selfHost = response.selfHost;
this.usersGetPremium = response.usersGetPremium;
this.seats = response.seats;
this.maxCollections = response.maxCollections;
2018-07-18 15:21:34 +02:00
this.maxStorageGb = response.maxStorageGb;
2018-05-18 21:26:46 +02:00
}
}