mirror of
https://github.com/bitwarden/jslib
synced 2025-12-17 16:53:20 +00:00
* Families for enterprise/account settings (#541) * Add node tests to pipeline (#525) * Add support for crypto agent (#520) * feat: add an importer for Safari (CSV) (#512) * feat(importers/safariCsvImporter): add the importer for Safari (CSV) * Revert changes to package-lock.json Co-authored-by: Thomas Rittson <trittson@bitwarden.com> * Dynamically set electron user agent (#524) * Dynamically set electron user agent * PR review * linter fixes * Test agent static version does not change * Fix formatting * Add role="alert" to callouts only when enforceAlert is passed (#528) * Add role="alert" to callouts when enforceAlert is passed * Remove ElementRef and do a different way * Rename input variable * Add PR template (#529) * Allow managers to create collections (#530) * Pass in null for sso organziation for now. (#531) This will bypass cryptoagent * Add Linked Field as custom field type (#431) * Basic proof of concept of Linked custom fields * Linked Fields for all cipher types, use dropdown * Move linkedFieldOptions to view models * Move add-edit custom fields to own component * Fix change handling if cipherType changes * Use Field.LinkedId to store linked field info * Refactor accessors in cipherView for type safety * Use map for linkedFieldOptions * Refactor: use decorators to record linkable info * Add ItemView * Use enums for linked field ids * Add union type for linkedId enums, add jsdoc comment * Use parameter properties for linkedFieldOption Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Fix type casting Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Update electron to 14.2.0 (#534) * Update electron to 14.1.1 * Update electron to 14.2.0 and fix it to this version * Removed ^ from electron in electron/package-lock.json * [Linked fields] Reset linkedIds if cipher type changes (#535) * Reset linkedIds if cipher type changes * Only reset linkedId if !editmode * Add call to server * Fix linting * Add call to server * Fix linting * Run linting * Add new properties to organization * Remove organizationUserId from request model * Added in org sponsorship calls * Sponsorship redeem existing org flow Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: Oscar Hinton <oscar@oscarhinton.com> Co-authored-by: pan93412 <pan93412@gmail.com> Co-authored-by: Thomas Rittson <trittson@bitwarden.com> Co-authored-by: Robyn MacCallum <nickersthecat@gmail.com> Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> * Revoke sponsorship uses organization id * Expect information in billing items on whether the item is sponsored * Families for enterprise/redeem card (#546) * Add userservice helper * Run linter * Add resend email to api service (#548) * Remove unneeded imports * Remove unneeded files * Add newline * Reorder import * Remove accidental newline * Fix lint issue Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: Oscar Hinton <oscar@oscarhinton.com> Co-authored-by: pan93412 <pan93412@gmail.com> Co-authored-by: Thomas Rittson <trittson@bitwarden.com> Co-authored-by: Robyn MacCallum <nickersthecat@gmail.com> Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
81 lines
3.0 KiB
TypeScript
81 lines
3.0 KiB
TypeScript
import { ProfileOrganizationResponse } from '../response/profileOrganizationResponse';
|
|
|
|
import { OrganizationUserStatusType } from '../../enums/organizationUserStatusType';
|
|
import { OrganizationUserType } from '../../enums/organizationUserType';
|
|
import { ProductType } from '../../enums/productType';
|
|
|
|
import { PermissionsApi } from '../api/permissionsApi';
|
|
|
|
export class OrganizationData {
|
|
id: string;
|
|
name: string;
|
|
status: OrganizationUserStatusType;
|
|
type: OrganizationUserType;
|
|
enabled: boolean;
|
|
usePolicies: boolean;
|
|
useGroups: boolean;
|
|
useDirectory: boolean;
|
|
useEvents: boolean;
|
|
useTotp: boolean;
|
|
use2fa: boolean;
|
|
useApi: boolean;
|
|
useSso: boolean;
|
|
useKeyConnector: boolean;
|
|
useResetPassword: boolean;
|
|
selfHost: boolean;
|
|
usersGetPremium: boolean;
|
|
seats: number;
|
|
maxCollections: number;
|
|
maxStorageGb?: number;
|
|
ssoBound: boolean;
|
|
identifier: string;
|
|
permissions: PermissionsApi;
|
|
resetPasswordEnrolled: boolean;
|
|
userId: string;
|
|
hasPublicAndPrivateKeys: boolean;
|
|
providerId: string;
|
|
providerName: string;
|
|
isProviderUser: boolean;
|
|
familySponsorshipFriendlyName: string;
|
|
familySponsorshipAvailable: boolean;
|
|
planProductType: ProductType;
|
|
keyConnectorEnabled: boolean;
|
|
keyConnectorUrl: string;
|
|
|
|
constructor(response: ProfileOrganizationResponse) {
|
|
this.id = response.id;
|
|
this.name = response.name;
|
|
this.status = response.status;
|
|
this.type = response.type;
|
|
this.enabled = response.enabled;
|
|
this.usePolicies = response.usePolicies;
|
|
this.useGroups = response.useGroups;
|
|
this.useDirectory = response.useDirectory;
|
|
this.useEvents = response.useEvents;
|
|
this.useTotp = response.useTotp;
|
|
this.use2fa = response.use2fa;
|
|
this.useApi = response.useApi;
|
|
this.useSso = response.useSso;
|
|
this.useKeyConnector = response.useKeyConnector;
|
|
this.useResetPassword = response.useResetPassword;
|
|
this.selfHost = response.selfHost;
|
|
this.usersGetPremium = response.usersGetPremium;
|
|
this.seats = response.seats;
|
|
this.maxCollections = response.maxCollections;
|
|
this.maxStorageGb = response.maxStorageGb;
|
|
this.ssoBound = response.ssoBound;
|
|
this.identifier = response.identifier;
|
|
this.permissions = response.permissions;
|
|
this.resetPasswordEnrolled = response.resetPasswordEnrolled;
|
|
this.userId = response.userId;
|
|
this.hasPublicAndPrivateKeys = response.hasPublicAndPrivateKeys;
|
|
this.providerId = response.providerId;
|
|
this.providerName = response.providerName;
|
|
this.familySponsorshipFriendlyName = response.familySponsorshipFriendlyName;
|
|
this.familySponsorshipAvailable = response.familySponsorshipAvailable;
|
|
this.planProductType = response.planProductType;
|
|
this.keyConnectorEnabled = response.keyConnectorEnabled;
|
|
this.keyConnectorUrl = response.keyConnectorUrl;
|
|
}
|
|
}
|