"use strict";
import {addDaysToDate, isDefined, toBoolean, updatePropertyToObj} from "../Utils";
export {};
const MD5 = require("md5");
import {config} from "../../config/config";
//const config = require("../../config/config");
/*************************************************************/
/* STATIC ENUM */
/*************************************************************/
/**
* Type of Admin.
* @public
* @enum {string}
* @readonly
*/
const AdminType = {
/** Organization administrator */
'ORGANIZATION_ADMIN': "organization_admin",
/** Company administrator */
'COMPANY_ADMIN': "company_admin",
/** Site administrator */
'SITE_ADMIN': "site_admin",
/** No administrator right */
'UNDEFINED': "undefined"
};
/**
* NameUpdatePrio
* @public
* @enum {number}
* @readonly
*/
const NameUpdatePrio = {
/** no update prio then could be updated */
'NO_UPDATE_PRIO': 0,
/** prio associated to outlook name resolution update */
'OUTLOOK_UPDATE_PRIO': 1,
/** prio associated to server name resolution (phonebook or office365AD ...) update */
'SERVER_UPDATE_PRIO': 2,
/** max prio : no update could overwrite */
'MAX_UPDATE_PRIO': 99
};
const textAvatarColor = ["#ff4500", "#d38700", "#348833", "#007356", "#00b2a9", "#00b0e5", "#0085ca", "#6639b7", "#91278a", "#cf0072", "#a50034", "#d20000"];
/**
* @class
* @name Contact
* @public
* @description
* This class is used to represent a contact or the connected user
* A contact is defined by a set of public information (name, firstName, avatar...) and a set of private information that are only shared with contacts that are in the user's network or in the same company (email, phone numbers...)
*/
class Contact {
public id: any;
public _displayName: any;
public name: any;
public displayNameMD5: any;
public companyName: any;
public loginEmail: any;
public nickName: any;
public title: any;
public jobTitle: any;
public country: any;
public timezone: any;
public organisationId: any;
public siteId: any;
public companyId: any;
public jid_im: any;
public jid: any;
public jid_tel: any;
public jidtel: any;
public avatar: any;
public lastAvatarUpdateDate: any;
public lastUpdateDate: any;
public adminType: any;
public roles: any;
public phoneNumbers: any;
public phonePro: any;
public phoneProCan: any;
public phonePbx: any;
public phoneInternalNumber: any;
public pbxId: any;
public mobilePro: any;
public mobileProCan: any;
public phonePerso: any;
public phonePersoCan: any;
public mobilePerso: any;
public mobilePersoCan: any;
public voicemailNumber: any;
public emails: any;
public emailPro: any;
public emailPerso: any;
public lastName: any;
public firstName: any;
public isTerminated: any;
public language: any;
public presence: string;
public status: any;
public resources: any;
public nameUpdatePrio: any;
public initials: any;
public nickname: any;
public roster: any;
public initialized: any;
public colorIndex: any;
public color: any;
public _id: any;
//public isBot: any;
public isInDefaultCompany: boolean;
public company: any;
public hasPhoneNumber: any;
public guestMode: any;
public openInviteId: any;
public userInfo1: null;
public userInfo2: null;
public ask: string;
public subscription: string;
public temp: boolean;
public invitation: any;
public selectedTheme: string;
public customData: any;
public isVirtualTerm: boolean;
public tags: Array;
private _lastContactCacheUpdate: Date;
public isActive : boolean;
public accountType : string;
public systemId : string;
public isInitialized : boolean;
public initializationDate : string;
public createdBySelfRegister : boolean;
public createdByAdmin : any;
public createdByAppId : string;
public firstLoginDate : string;
public lastLoginDate : string;
public loggedSince: string;
public failedLoginAttempts : number;
public lastLoginFailureDate : string;
public lastExpiredTokenRenewedDate : string;
public lastPasswordUpdateDate : string;
public timeToLive : number;
public timeToLiveDate : string;
public terminatedDate : string;
public fileSharingCustomisation : string;
public userTitleNameCustomisation : string;
public softphoneOnlyCustomisation : string;
public useRoomCustomisation : string;
public phoneMeetingCustomisation : string;
public useChannelCustomisation : string;
public useScreenSharingCustomisation : string;
public useWebRTCAudioCustomisation : string;
public useWebRTCVideoCustomisation : string;
public instantMessagesCustomisation : string;
public userProfileCustomisation : string;
public fileStorageCustomisation : string;
public overridePresenceCustomisation : string;
public changeTelephonyCustomisation : string;
public changeSettingsCustomisation : string;
public recordingConversationCustomisation : string;
public useGifCustomisation : string;
public useDialOutCustomisation : string;
public fileCopyCustomisation : string;
public fileTransferCustomisation : string;
public forbidFileOwnerChangeCustomisation : string;
public readReceiptsCustomisation : string;
public useSpeakingTimeStatistics : string;
public selectedAppCustomisationTemplate : string;
public alertNotificationReception : string;
public selectedDeviceFirmware : string;
public visibility : string;
public jid_password : string;
public creationDate : string;
public profiles : Array;
public activationDate : string;
public lastOfflineMailReceivedDate : string;
public state : string;
public authenticationType : string;
public department : string;
public isADSearchAvailable : boolean;
public isTv : boolean;
public calendars : Array;
public openInvites : any;
public isAlertNotificationEnabled : boolean;
public outOfOffice : any;
public lastSeenDate : string;
public eLearningCustomisation : string;
public eLearningGamificationCustomisation : string;
public useRoomAsRBVoiceUser : string;
public useWebRTCAudioAsRBVoiceUser : string;
public msTeamsPresence : any;
public useWebRTCOnlyIfMobileLoggedCustomisation : string;
public meetingRecordingCustomisation : string;
public useOtherPhoneMode : string;
public useComputerMode : string;
public useSoftPhoneMode : string;
public imPopupDuration : number;
public canAccessWhatsNew : string;
public canAccessFaqCustomisation : string;
public canAccessHelpCenterCustomisation : string;
public canAccessStoreCustomisation : string;
public canDownloadAppCustomisation : string;
public canCallParticipantPbxNumberCustomisation : string;
public useExternalStorage : string;
public useRainbowStorage : string;
public mainStorage : string;
public nextRosterAutoCleanup : string;
public mfaRainbowAuth : any;
public searchTagsOnly : Array;
public canSetInvisiblePresenceCustomisation : string;
public canUseSendReportCustomisation : string;
public canUseTaskCustomisation : string;
public canUseTestConfigCustomisation : string;
public useTeamsMode : boolean;
public selectedProgKeysGroupId : string;
public companyNameOfGuest : string;
constructor() {
this._lastContactCacheUpdate = new Date();
/**
* @public
* @readonly
* @property {string} id The ID of the Contact
* @instance
*/
this.id = "";
/**
* @private
* @readonly
*/
this._displayName = "";
/**
* @public
* @property {Object} name The display name of the contact
* @readonly
*/
this.name = {value: this._displayName};
this.displayNameMD5 = "";
/**
* @public
* @readonly
* @property {string} companyName The company name of the Contact
* @instance
*/
this.companyName = "";
this.company = null;
/**
* @public
* @readonly
* @property {string} loginEmail The login email of the Contact
* @instance
* @description
* This field will soon become unavailable if the user is not allowed to view it, to follow the GPRD law.
*/
this.loginEmail = "";
/**
* @public
* @readonly
* @property {string} nickName The nickname of the Contact
* @instance
*/
this.nickName = "";
/**
* @public
* @readonly
* @property {string} title The title of the Contact
* @instance
*/
this.title = "";
/**
* @public
* @readonly
* @property {string} jobTitle The job title of the Contact
* @instance
*/
this.jobTitle = "";
/**
* @public
* @readonly
* @property {string} country The country of the Contact
* @instance
*/
this.country = "";
/**
* @public
* @readonly
* @property {string} timezone The timezone of the Contact
* @instance
*/
this.timezone = "Europe/Paris";
/**
* @public
* @readonly
* @property {string} organisationId The organisation ID of the Contact
* @instance
*/
this.organisationId = "";
/**
* @public
* @readonly
* @property {string} siteId The site ID of the Contact
* @instance
*/
this.siteId = "";
/**
* @public
* @readonly
* @property {string} companyId The company ID of the Contact
* @instance
*/
this.companyId = "";
/**
* @public
* @readonly
* @property {string} jid_im The JID of the Contact
* @instance
*/
this.jid_im = "";
/**
* @public
* @readonly
* @property {string} jid The JID of the Contact (same as jid_im, for compatibility)
* @instance
*/
this.jid = "";
/**
* @public
* @readonly
* @property {string} jid_tel The JID_TEL of the Contact
* @instance
*/
this.jid_tel = "";
/**
* @public
* @readonly
* @property {string} jidtel The JID_TEL of the Contact (same as jidtel, for compatibility)
* @instance
*/
this.jidtel = "";
/**
* @public
* @readonly
* @property {string} avatar The Contact avatar, if an avatar exist will return an Url, either a local file.
* @instance
*/
this.avatar = "";
/**
* @public
* @readonly
* @property {string} lastAvatarUpdateDate The date of the last avatar update
* @instance
*/
this.lastAvatarUpdateDate = null;
/**
* @public
* @readonly
* @property {string} lastUpdateDate The date of the last time information about the contact changed
* @instance
*/
this.lastUpdateDate = "Z";
/**
* @public
* @readonly
* @property {string} adminType The type of admin role. Can be `organization_admin`, `company_admin`, `site_admin`
* @instance
*/
this.adminType = "undefined";
/**
* @public
* @readonly
* @property {string[]} roles (For the connected user only). The associated roles of the connected user. Can be `guest`, `user`, `admin`
* @instance
* @description
* This field will soon become unavailable if the user is not allowed to view it, to follow the GPRD law.
*/
this.roles = ["user"];
/**
* @public
* @readonly
* @property {Object[]} phoneNumbers The list of phone numbers associated to the Contact
* @instance
*/
this.phoneNumbers = [];
/**
* @public
* @property {string} phonePro The professional phone number of the contact
* @readonly
*/
this.phonePro = "";
/**
* @public
* @property {string} phoneProCan The professional phone number of the contact (canonical format)
* @readonly
*/
this.phoneProCan = "";
/**
* @public
* @property {string} phonePbx The phone number if exists associated to the user and monitored by Rainbow
* @readonly
*/
this.phonePbx = "";
/**
* @public
* @property {string} phoneInternalNumber The internal number if exists associated to the user and monitored by Rainbow
* @readonly
*/
this.phoneInternalNumber = "";
/**
* @public
* @property {string} pbxId The ID of the PBX monitored by Rainbow where the user's phone is associated
* @readonly
*/
this.pbxId = "";
/**
* @public
* @property {string} mobilePro The professional mobile phone of the contact
* @readonly
*/
this.mobilePro = "";
/**
* @public
* @property {string} mobileProCan The professional mobile phone of the contact (canonical format)
* @readonly
*/
this.mobileProCan = "";
/**
* @public
* @property {string} phonePerso The personal phone of the contact
* @readonly
*/
this.phonePerso = "";
/**
* @public
* @property {string} phonePersoCan The personal phone of the contact (canonical format)
* @readonly
*/
this.phonePersoCan = "";
/**
* @public
* @property {string} mobilePerso The personal mobile phone of the contact
* @readonly
*/
this.mobilePerso = "";
/**
* @public
* @property {string} mobilePersoCan The personal mobile phone of the contact (canonical format)
* @readonly
*/
this.mobilePersoCan = "";
/**
* @public
* @readonly
* @property {String} voicemailNumber The number of the voicemail associated to the Contact
* @instance
*/
this.voicemailNumber = "";
/**
* @public
* @readonly
* @property {Object[]} emails The list of email addresses associated to the Contact
* @instance
*/
this.emails = [];
/**
* @public
* @property {string} emailPro The professional email of the contact
* @readonly
*/
this.emailPro = "";
/**
* @public
* @property {string} emailPerso The personal email of the contact
* @readonly
*/
this.emailPerso = "";
/**
* @public
* @readonly
* @property {string} lastName The lastname of the Contact
* @instance
*/
this.lastName = "";
/**
* @public
* @readonly
* @property {string} firstName The firstname of the Contact
* @instance
*/
this.firstName = "";
/**
* @public
* @readonly
* @property {Boolean} isTerminated True if the Contact has been removed
* @instance
*/
this.isTerminated = false;
/**
* @public
* @readonly
* @property {string} language The language of the Contact
* @instance
*/
this.language = "en";
/**
* @public
* @readonly
* @property {string} presence The presence of the contact. Can be `offline`, `busy`, `away`, `online`, `unknown`
* @instance
*/
this.presence = "";
/**
* @public
* @readonly
* @property {string} status An additional status information for the presence. Can be `phone`, `presentation`, `mobile` or ``
* @instance
*/
this.status = "";
/**
* @public
* @readonly
* @property {Object} resources The list of resources of the Contact
* @instance
*/
this.resources = {};
/**
* @public
* @property {number} nameUpdatePrio Prio of the service having made an update
* @readonly
*/
this.nameUpdatePrio = NameUpdatePrio.MAX_UPDATE_PRIO;//default Max prio
/**
* @public
* @property {string} initials The initials of the contact
* @readonly
*/
this.initials = "";
/**
* @public
* @property {string} nickname The nickname of the contact
* @readonly
*/
this.nickname = "";
/**
* @public
* @property {boolean} roster True if the contact is part of the favorized contact's list of the connected user
* @readonly
*/
this.roster = false;
/**
* @private
* @readonly
*/
this.initialized = false;
/**
* @public
* @property {boolean} guestMode Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration.
* @readonly
*/
this.guestMode = false;
/**
* @public
* @property {string} id The open invite ID of the user
* @readonly
*/
this.openInviteId = null;
/**
* @public
* @property {string} ask (Contact Only) The subscription progress
* @readonly
*/
this.ask = "none";
/**
* @public
* @property {string} subscription (Contact only) The subscription state for this contact (none or both)
* @readonly
*/
this.subscription = "none";
// Status
/**
* @public
* @readonly
*/
this.temp = false;
/**
* @public
* @property {string} userInfo1 Free field that admin can use to link their users to their IS/IT tools / to perform analytics (this field is output in the CDR file)
* @readonly
*/
this.userInfo1 = null;
/**
* @public
* @property {string} userInfo2 2nd Free field that admin can use to link their users to their IS/IT tools / to perform analytics (this field is output in the CDR file)
* @readonly
*/
this.userInfo2 = null;
/**
* @public
* @property {Object} customData User's custom data. Object with free keys/values.
* It is up to the client to manage the user's customData (new customData provided overwrite the existing one).
* Restrictions on customData Object:
* * max 20 keys,
* * max key length: 64 characters,
* * max value length: 4096 characters.
* @readonly
*/
this.customData = [];
/**
* @public
* @property {string} selectedTheme Theme to be used by the user.
* If the user is allowed to (company has 'allowUserSelectTheme' set to true), he can choose his preferred theme among the list of supported themes (see https://openrainbow.com/api/rainbow/enduser/v1.0/themes).
* @readonly
*/
this.selectedTheme = null;
/**
* @public
* @property {Array} tags An Array of free tags associated to the user.
* A maximum of 5 tags is allowed, each tag can have a maximum length of 64 characters.
* tags can only be set by users who have administrator rights on the user. The user can't modify the tags.
* The tags are visible by the user and all users belonging to his organisation/company, and can be used with the search API to search the user based on his tags.
* @readonly
*/
this.tags = [];
/**
* @public
* @property {boolean} isActive Is user active
* @readonly
*/
this.isActive = false;
/**
* @public
* @property {string} accountType
* @readonly
*/
this.accountType = null;
/**
* @public
* @property {string} systemId If phone is linked to a system (pbx), unique identifier of that system in Rainbow database. [Only for phone numbers linked to a system (pbx)]
* @readonly
*/
this.systemId = null;
/**
* @public
* @property {boolean} isInitialized Is user initialized
* @readonly
*/
this.isInitialized = false;
/**
* @public
* @property {string} initializationDate User initialization date
* @readonly
*/
this.initializationDate = null;
/**
* @public
* @property {boolean} createdBySelfRegister true if user has been created using self register
* @readonly
*/
this.createdBySelfRegister = false;
/**
* @public
* @property {Object} createdByAdmin If user has been created by an admin or superadmin, contain userId and loginEmail of the admin who created this user
* @readonly
*/
this.createdByAdmin = null;
/**
* @private
* @property {string} createdByAppId
* @readonly
*/
this.createdByAppId = null;
/**
* @public
* @property {string} firstLoginDate Date of first user login (only set the first time user logs in, null if user never logged in)
* @readonly
*/
this.firstLoginDate = null;
/**
* @public
* @property {string} lastLoginDate Date of last user login (defined even if user is logged out)
* @readonly
*/
this.lastLoginDate = null;
/**
* @public
* @property {string} loggedSince Date of last user login (null if user is logged out)
* @readonly
*/
this.loggedSince = null;
/**
* @private
* @property {number} failedLoginAttempts
* @readonly
*/
this.failedLoginAttempts = 0;
/**
* @private
* @property {string} lastLoginFailureDate
* @readonly
*/
this.lastLoginFailureDate = null;
/**
* @private
* @property {string} lastExpiredTokenRenewedDate
* @readonly
*/
this.lastExpiredTokenRenewedDate = null;
/**
* @private
* @property {string} lastPasswordUpdateDate
* @readonly
*/
this.lastPasswordUpdateDate = null;
/**
* @public
* @property {number} timeToLive Duration in second to wait before automatically starting a user deletion from the creation date.
* Once the timeToLive has been reached, the user won't be usable to use APIs anymore (error 401523). His account may then be deleted from the database at any moment.
* Value -1 means timeToLive is disable (i.e. user account will not expire).
* @readonly
*/
this.timeToLive = -1;
/**
* @private
* @property {string} timeToLiveDate
* @readonly
*/
this.timeToLiveDate = null;
/**
* @private
* @property {string} terminatedDate
* @readonly
*/
this.terminatedDate = null;
/**
* @public
* @property {string} fileSharingCustomisation Activate/Deactivate file sharing capability per user
* Define if the user can use the file sharing service then, allowed to download and share file.
* FileSharingCustomisation can be:
*
* * same_than_company: The same fileSharingCustomisation setting than the user's company's is applied to the user. if the fileSharingCustomisation of the company is changed the user's fileSharingCustomisation will use this company new setting.
* * enabled: Whatever the fileSharingCustomisation of the company setting, the user can use the file sharing service.
* * disabled: Whatever the fileSharingCustomisation of the company setting, the user can't use the file sharing service.
*
* @readonly
*/
this.fileSharingCustomisation = null;
/**
* @public
* @property {string} userTitleNameCustomisation Activate/Deactivate the capability for a user to modify his profile (title, firstName, lastName)
* Define if the user can change some profile data.
* userTitleNameCustomisation can be:
* * same_than_company: The same userTitleNameCustomisation setting than the user's company's is applied to the user. if the userTitleNameCustomisation of the company is changed the user's userTitleNameCustomisation will use this company new setting.
* * enabled: Whatever the userTitleNameCustomisation of the company setting, the user can change some profile data.
* * disabled: Whatever the userTitleNameCustomisation of the company setting, the user can't change some profile data.
* @readonly
*/
this.userTitleNameCustomisation = null;
/**
* @public
* @property {string} softphoneOnlyCustomisation Activate/Deactivate the capability for an UCaas application not to offer all Rainbow services but to focus to telephony services
* Define if UCaas apps used by a user of this company must provide Softphone functions, i.e. no chat, no bubbles, no meetings, no channels, and so on.
* softphoneOnlyCustomisation can be:
* * same_than_company: The same softphoneOnlyCustomisation setting than the user's company's is applied to the user. if the softphoneOnlyCustomisation of the company is changed the user's softphoneOnlyCustomisation will use this company new setting.
* * enabled: The user switch to a softphone mode only.
* * disabled: The user can use telephony services, chat, bubbles, channels meeting services and so on.
* @readonly
*/
this.softphoneOnlyCustomisation = null;
/**
* @public
* @property {string} useRoomCustomisation Activate/Deactivate the capability for a user to use bubbles.
* Define if a user can create bubbles or participate in bubbles (chat and web conference).
* useRoomCustomisation can be:
* * same_than_company: The same useRoomCustomisation setting than the user's company's is applied to the user. if the useRoomCustomisation of the company is changed the user's useRoomCustomisation will use this company new setting.
* * enabled: The user can use bubbles.
* * disabled: The user can't use bubbles.
* @readonly
*/
this.useRoomCustomisation = null;
/**
* @public
* @property {string} phoneMeetingCustomisation Activate/Deactivate the capability for a user to use phone meetings (PSTN conference).
* Define if a user has the right to join phone meetings.
* phoneMeetingCustomisation can be:
* * same_than_company: The same phoneMeetingCustomisation setting than the user's company's is applied to the user. if the phoneMeetingCustomisation of the company is changed the user's phoneMeetingCustomisation will use this company new setting.
* * enabled: The user can join phone meetings.
* * disabled: The user can't join phone meetings.
* @readonly
*/
this.phoneMeetingCustomisation = null;
/**
* @public
* @property {string} useChannelCustomisation Activate/Deactivate the capability for a user to use a channel.
* Define if a user has the right to create channels or be a member of channels.
* useChannelCustomisation can be:
* * same_than_company: The same useChannelCustomisation setting than the user's company's is applied to the user. if the useChannelCustomisation of the company is changed the user's useChannelCustomisation will use this company new setting.
* * enabled: The user can use some channels.
* * disabled: The user can't use some channel.
* @readonly
*/
this.useChannelCustomisation = null;
/**
* @public
* @property {string} useScreenSharingCustomisation Activate/Deactivate the capability for a user to share a screen.
* Define if a user has the right to share his screen.
* useScreenSharingCustomisation can be:
* * same_than_company: The same useScreenSharingCustomisation setting than the user's company's is applied to the user. if the useScreenSharingCustomisation of the company is changed the user's useScreenSharingCustomisation will use this company new setting.
* * enabled: Each user of the company can share his screen.
* * disabled: No user of the company can share his screen.
* @readonly
*/
this.useScreenSharingCustomisation = null;
/**
* @public
* @property {string} useWebRTCAudioCustomisation Activate/Deactivate the capability for a user to switch to a Web RTC audio conversation.
* Define if a user has the right to be joined via audio (WebRTC) and to use Rainbow audio (WebRTC) (start a P2P audio call, start a web conference call).
* useWebRTCAudioCustomisation can be:
* * same_than_company: The same useWebRTCAudioCustomisation setting than the user's company's is applied to the user. if the useWebRTCAudioCustomisation of the company is changed the user's useWebRTCAudioCustomisation will use this company new setting.
* * enabled: The user can switch to a Web RTC audio conversation.
* * disabled: The user can't switch to a Web RTC audio conversation.
* @readonly
*/
this.useWebRTCAudioCustomisation = null;
/**
* @public
* @property {string} useWebRTCVideoCustomisation Activate/Deactivate the capability for a user to switch to a Web RTC video conversation.
* Define if a user has the right to be joined via video and to use video (start a P2P video call, add video in a P2P call, add video in a web conference call).
* useWebRTCVideoCustomisation can be:
* * same_than_company: The same useWebRTCVideoCustomisation setting than the user's company's is applied to the user. if the useWebRTCVideoCustomisation of the company is changed the user's useWebRTCVideoCustomisation will use this company new setting.
* * enabled: The user can switch to a Web RTC video conversation.
* * disabled: The user can't switch to a Web RTC video conversation.
* @readonly
*/
this.useWebRTCVideoCustomisation = null;
/**
* @public
* @property {string} instantMessagesCustomisation Activate/Deactivate the capability for a user to use instant messages.
* Define if a user has the right to use IM, then to start a chat (P2P ou group chat) or receive chat messages and chat notifications.
* instantMessagesCustomisation can be:
* * same_than_company: The same instantMessagesCustomisation setting than the user's company's is applied to the user. if the instantMessagesCustomisation of the company is changed the user's instantMessagesCustomisation will use this company new setting.
* * enabled: The user can use instant messages.
* * disabled: The user can't use instant messages.
* @readonly
*/
this.instantMessagesCustomisation = null;
/**
* @public
* @property {string} userProfileCustomisation Activate/Deactivate the capability for a user to modify his profile.
* Define if a user has the right to modify the globality of his profile and not only (title, firstName, lastName).
* userProfileCustomisation can be:
* * same_than_company: The same userProfileCustomisation setting than the user's company's is applied to the user. if the userProfileCustomisation of the company is changed the user's userProfileCustomisation will use this company new setting.
* * enabled: The user can modify his profile.
* * disabled: The user can't modify his profile.
* @readonly
*/
this.userProfileCustomisation = null;
/**
* @public
* @property {string} fileStorageCustomisation Activate/Deactivate the capability for a user to access to Rainbow file storage.
* Define if a user has the right to upload/download/copy or share documents.
* fileStorageCustomisation can be:
* * same_than_company: The same fileStorageCustomisation setting than the user's company's is applied to the user. if the fileStorageCustomisation of the company is changed the user's fileStorageCustomisation will use this company new setting.
* * enabled: The user can manage and share files.
* * disabled: The user can't manage and share files.
* @readonly
*/
this.fileStorageCustomisation = null;
/**
* @public
* @property {string} overridePresenceCustomisation Activate/Deactivate the capability for a user to use instant messages.
* Define if a user has the right to change his presence manually or only use automatic states.
* overridePresenceCustomisation can be:
* * same_than_company: The same overridePresenceCustomisation setting than the user's company's is applied to the user. if the overridePresenceCustomisation of the company is changed the user's overridePresenceCustomisation will use this company new setting.
* * enabled: The user can change his presence.
* * disabled: The user can't change his presence.
* @readonly
*/
this.overridePresenceCustomisation = null;
/**
* @public
* @property {string} changeTelephonyCustomisation Activate/Deactivate the ability for a user to modify telephony settings.
* Define if a user has the right to modify some telephony settigs like forward activation...
* changeTelephonyCustomisation can be:
* * same_than_company: The same changeTelephonyCustomisation setting than the user's company's is applied to the user. if the changeTelephonyCustomisation of the company is changed the user's changeTelephonyCustomisation will use this company new setting.
* * enabled: The user can modify telephony settings.
* * disabled: The user can't modify telephony settings.
* @readonly
*/
this.changeTelephonyCustomisation = null;
/**
* @public
* @property {string} changeSettingsCustomisation Activate/Deactivate the ability for a user to change all client general settings.
* changeSettingsCustomisation can be:
* * same_than_company: The same changeSettingsCustomisation setting than the user's company's is applied to the user. if the changeSettingsCustomisation of the company is changed the user's changeSettingsCustomisation will use this company new setting.
* * enabled: The user can change all client general settings.
* * disabled: The user can't change any client general setting.
* @readonly
*/
this.changeSettingsCustomisation = null;
/**
* @public
* @property {string} recordingConversationCustomisation Activate/Deactivate the capability for a user to record a conversation.
* Define if a user has the right to record a conversation (for P2P and multi-party calls).
* recordingConversationCustomisation can be:
* * same_than_company: The same recordingConversationCustomisation setting than the user's company's is applied to the user. if the recordingConversationCustomisation of the company is changed the user's recordingConversationCustomisation will use this company new setting.
* * enabled: The user can record a peer to peer or a multi-party call.
* * disabled: The user can't record a peer to peer or a multi-party call.
* @readonly
*/
this.recordingConversationCustomisation = null;
/**
* @public
* @property {string} useGifCustomisation Activate/Deactivate the ability for a user to Use GIFs in conversations.
* Define if a user has the is allowed to send animated GIFs in conversations
* useGifCustomisation can be:
* * same_than_company: The same useGifCustomisation setting than the user's company's is applied to the user. if the useGifCustomisation of the company is changed the user's useGifCustomisation will use this company new setting.
* * enabled: The user can send animated GIFs in conversations.
* * disabled: The user can't send animated GIFs in conversations.
* @readonly
*/
this.useGifCustomisation = null;
/**
* @public
* @property {string} useDialOutCustomisation Activate/Deactivate the capability for a user to use dial out in phone meetings.
* Define if a user is allowed to be called by the Rainbow conference bridge.
* useDialOutCustomisation can be:
* * same_than_company: The same useDialOutCustomisation setting than the user's company's is applied to the user. if the useDialOutCustomisation of the company is changed the user's useDialOutCustomisation will use this company new setting.
* * enabled: The user can be called by the Rainbow conference bridge.
* * disabled: The user can't be called by the Rainbow conference bridge.
* @readonly
*/
this.useDialOutCustomisation = null;
/**
* @public
* @property {string} fileCopyCustomisation Activate/Deactivate the capability for one user to copy any file he receives in his personal cloud space
* fileCopyCustomisation can be:
* * same_than_company: The same fileCopyCustomisation setting than the user's company's is applied to the user. if the fileCopyCustomisation of the company is changed the user's fileCopyCustomisation will use this company new setting.
* * enabled: The user can make a copy of a file to his personal cloud space.
* * disabled: The user can't make a copy of a file to his personal cloud space.
* @readonly
*/
this.fileCopyCustomisation = null;
/**
* @public
* @property {string} fileTransferCustomisation Activate/Deactivate the capability for a user to copy a file from a conversation then share it inside another conversation.
* The file cannot be re-shared.
* fileTransferCustomisation can be:
* * same_than_company: The same fileTransferCustomisation setting than the user's company's is applied to the user. if the fileTransferCustomisation of the company is changed the user's fileTransferCustomisation will use this company new setting.
* * enabled: The user can transfer a file doesn't belong to him.
* * disabled: The user can't transfer a file doesn't belong to him.
* @readonly
*/
this.fileTransferCustomisation = null;
/**
* @public
* @property {string} forbidFileOwnerChangeCustomisation Activate/Deactivate the capability for a user to loose the ownership on one file.
* One user can drop the ownership to another Rainbow user of the same company.
* forbidFileOwnerChangeCustomisation can be:
* * same_than_company: The same forbidFileOwnerChangeCustomisation setting than the user's company's is applied to the user. if the forbidFileOwnerChangeCustomisation of the company is changed the user's forbidFileOwnerChangeCustomisation will use this company new setting.
* * enabled: The user can't give the ownership of his file.
* * disabled: The user can give the ownership of his file.
* @readonly
*/
this.forbidFileOwnerChangeCustomisation = null;
/**
* @public
* @property {string} readReceiptsCustomisation Activate/Deactivate the capability for a user to allow a sender to check if a chat message is read.
* Defines whether a peer user in a conversation allows the sender of a chat message to see if this IM is acknowledged by the peer.
* This right is used by Ucaas or Cpaas application to show either or not a message is acknowledged. No check is done on backend side.
* readReceiptsCustomisation can be:
* * same_than_company: The same readReceiptsCustomisation setting than the user's company's is applied to the user. if the readReceiptsCustomisation of the company is changed the user's readReceiptsCustomisation will use this company new setting.
* * enabled: The user allows the sender to check if an IM is read.
* * disabled: The user doesn't allow the sender to check if an IM is read.
* @readonly
*/
this.readReceiptsCustomisation = null;
/**
* @public
* @property {string} useSpeakingTimeStatistics Activate/Deactivate the capability for a user to see speaking time statistics.
* Defines whether a user has the right to see for a given meeting the speaking time for each attendee of this meeting.
* useSpeakingTimeStatistics can be:
* * same_than_company: The same useSpeakingTimeStatistics setting than the user's company's is applied to the user. if the useSpeakingTimeStatistics of the company is changed the user's useSpeakingTimeStatistics will use this company new setting.
* * enabled: The user can use meeting speaking time statistics.
* * disabled: The user can't use meeting speaking time statistics.
* @readonly
*/
this.useSpeakingTimeStatistics = null;
/**
* @public
* @property {string} selectedAppCustomisationTemplate To log the last template applied to the user.
* @readonly
*/
this.selectedAppCustomisationTemplate = null;
/**
* @public
* @property {string} alertNotificationReception Activate/Deactivate the capability for a user to receive alert notification.
* Define if a user has the right to receive alert notification
* alertNotificationReception can be:
* enabled: Each user of the company can receive alert notification.
* disabled: No user of the company can receive alert notification.
* @readonly
*/
this.alertNotificationReception = null;
/**
* @private
* @property {string} selectedDeviceFirmware
* @readonly
*/
this.selectedDeviceFirmware = null;
/**
* @public
* @property {string} visibility Company visibility (define if users being in this company can be searched by users being in other companies and if the user can search users being in other companies).
*
* * public: User can be searched by external users / can search external users. User can invite external users / can be invited by external users
* * private: User can't be searched by external users (even within his organisation) / can search external users. User can invite external users / can be invited by external users
* * organisation: User can't be searched by external users / can search external users. User can invite external users / can be invited by external users
* * closed: User can't be searched by external users / can't search external users. User can invite external users / can be invited by external users
* * isolated: User can't be searched by external users / can't search external users. User can't invite external users / can't be invited by external users
* * none: Default value reserved for guest. User can't be searched by any users (even within the same company) / can search external users. User can invite external users / can be invited by external users
*
* External users mean public user not being in user's company nor user's organisation nor a company visible by user's company.
*
* Note related to organisation visibility:
*
* * Under the same organisation, a company can choose the visibility=organisation. That means users belonging to this company are visible for users of foreign companies inside the same organisation.
* * The visibility=organisation is same as visibility=private outside the organisation. That is to say users can't be searched outside the organisation's companies.
*
* Default value : private. Possible values : public, private, organisation, closed, isolated
* @readonly
*/
this.visibility = null;
/**
* @public
* @property {string} jid_password User Jabber IM and TEL password
* @readonly
*/
this.jid_password = null;
/**
* @public
* @property {string} creationDate Date when the theme has been created.
* @readonly
*/
this.creationDate = null;
/**
* @public
* @property {Array