@webex/plugin-meetings 1.144.2 → 1.146.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -667,6 +667,28 @@ var Members = /*#__PURE__*/function (_StatelessWebexPlugin) {
667
667
 
668
668
  return this.membersRequest.addMembers(options);
669
669
  }
670
+ /**
671
+ * Cancels an outgoing PSTN call to the associated meeting
672
+ * @param {String} invitee
673
+ * @returns {Promise}
674
+ * @memberof Members
675
+ */
676
+
677
+ }, {
678
+ key: "cancelPhoneInvite",
679
+ value: function cancelPhoneInvite(invitee) {
680
+ if (!this.locusUrl) {
681
+ return _promise.default.reject(new _parameter.default('The associated locus url for this meeting object must be defined.'));
682
+ }
683
+
684
+ if (_util.default.isInvalidInvitee(invitee)) {
685
+ return _promise.default.reject(new _parameter.default('The invitee must be defined with a valid phoneNumber property.'));
686
+ }
687
+
688
+ var options = _util.default.cancelPhoneInviteOptions(invitee, this.locusUrl);
689
+
690
+ return this.membersRequest.cancelPhoneInvite(options);
691
+ }
670
692
  /**
671
693
  * Admits waiting members (invited guests to meeting)
672
694
  * @param {Array} memberIds
@@ -761,6 +783,47 @@ var Members = /*#__PURE__*/function (_StatelessWebexPlugin) {
761
783
 
762
784
  return this.membersRequest.transferHostToMember(options);
763
785
  }
786
+ /**
787
+ * Sends DTMF tones for the PSTN member of a meeting
788
+ * @param {String} tones a string of one or more DTMF tones to send
789
+ * @param {String} memberId member id
790
+ * @returns {Promise}
791
+ * @public
792
+ * @memberof Members
793
+ */
794
+
795
+ }, {
796
+ key: "sendDialPadKey",
797
+ value: function sendDialPadKey() {
798
+ var tones = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
799
+ var memberId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
800
+
801
+ if (!tones && tones !== 0) {
802
+ return _promise.default.reject(new _parameter.default('DMTF tones must be passed in'));
803
+ }
804
+
805
+ var member = this.membersCollection.get(memberId);
806
+
807
+ if (!member) {
808
+ return _promise.default.reject(new _parameter.default('there is no member associated with that Id'));
809
+ }
810
+
811
+ var locusUrl = this.locusUrl;
812
+ var deviceArray = member.participant.devices;
813
+ var device = deviceArray.find(function (_ref) {
814
+ var deviceType = _ref.deviceType;
815
+ return deviceType === 'SIP';
816
+ });
817
+ var url = device === null || device === void 0 ? void 0 : device.url;
818
+
819
+ if (locusUrl && url) {
820
+ var options = _util.default.genderateSendDTMFOptions(url, tones, memberId, locusUrl);
821
+
822
+ return this.membersRequest.sendDialPadKey(options);
823
+ }
824
+
825
+ return _promise.default.reject(new Error('Members:index#sendDialPadKey --> cannot send DTMF, meeting does not have a connection to the "locus" call control service.'));
826
+ }
764
827
  }]);
765
828
  return Members;
766
829
  }(_webexCore.StatelessWebexPlugin);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"names":["Members","attrs","options","MEETINGS","membersRequest","MembersRequest","membersCollection","MembersCollection","locusUrl","hostId","type","selfId","mediaShareContentId","recordingId","payload","newSelfId","oldSelfId","newSelf","id","oldSelf","theSelf","get","setIsSelf","notSelf","Trigger","trigger","file","function","EVENT_TRIGGERS","MEMBERS_SELF_UPDATE","activeSelfId","endedSelfId","newHostId","oldHostId","newHost","oldHost","theHost","setIsHost","notHost","MEMBERS_HOST_UPDATE","activeHostId","endedHostId","delta","handleLocusInfoUpdatedParticipants","full","handleMembersUpdate","MEMBERS_UPDATE","currentContent","current","previousContent","previous","whoSharing","whoStopped","contentId","disposition","FLOOR_ACTION","GRANTED","RELEASED","shareMember","setIsContentSharing","stopMember","MEMBERS_CONTENT_UPDATE","activeContentSharingId","endedContentSharingId","setLocusUrl","setType","membersUpdate","updated","constructMembers","added","getAll","list","forEach","member","set","participants","LoggerProxy","logger","warn","memberUpdate","update","locus","url","ParameterError","owner","info","fullState","self","person","contentMediaShare","mediaShares","length","find","mediaShare","name","CONTENT","floor","beneficiary","participant","hideInRoster","existing","push","Member","contentSharingId","invitee","alertIfActive","reject","MembersUtil","isInvalidInvitee","generateAddMemberOptions","addMembers","memberIds","generateAdmitMemberOptions","admitMember","memberId","generateRemoveMemberOptions","removeMember","mute","generateMuteMemberOptions","muteMember","moderator","generateTransferHostMemberOptions","transferHostToMember","StatelessWebexPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;IACqBA,O;;;;;AAGnB;AACF;AACA;AACA;AACA;AACA;AACE,mBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA;AAC1B,8BAAM,EAAN,EAAUA,OAAV;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AAR8B,4FARhBC,mBAQgB;AAS1B,UAAKC,cAAL,GAAsB,IAAIC,gBAAJ,CAAmB,EAAnB,EAAuBH,OAAvB,CAAtB;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKI,iBAAL,GAAyB,IAAIC,mBAAJ,EAAzB;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,QAAL,GAAgBP,KAAK,CAACO,QAAN,IAAkB,IAAlC;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,MAAL,GAAc,IAAd;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,IAAL,GAAY,IAAZ;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,MAAL,GAAc,IAAd;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,mBAAL,GAA2B,IAA3B;AACA;AACJ;AACA;AAC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AP;AACD;;;EAhmBkCyH,+B","sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nimport {isEmpty} from 'lodash';\nimport {StatelessWebexPlugin} from '@webex/webex-core';\n\nimport {MEETINGS, EVENT_TRIGGERS, FLOOR_ACTION, CONTENT} from '../constants';\nimport Trigger from '../common/events/trigger-proxy';\nimport Member from '../member';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport ParameterError from '../common/errors/parameter';\n\nimport MembersCollection from './collection';\nimport MembersRequest from './request';\nimport MembersUtil from './util';\n\n/**\n * Members Update Event\n * Emitted when something in the roster list needs to be updated\n * @event members:update\n * @instance\n * @property {Object} delta the changes to the members list\n * @property {Array} delta.updated array only the updates, includes removals, as they will have updated status and member properties\n * @property {Array} delta.added array added members to the meeting\n * @property {Array} full array the full members collection\n * @memberof Members\n */\n\n/**\n * Members Content Update Event\n * Emitted when who is sharing changes\n * @event members:content:update\n * @instance\n * @property {String} activeContentSharingId\n * @property {String} endedContentSharingId\n * @memberof Members\n */\n\n/**\n * Members Host Update Event\n * Emitted when who is the host changes\n * @event members:host:update\n * @instance\n * @property {String} activeHostId\n * @property {String} endedHostId\n * @memberof Members\n */\n\n/**\n * Members Self Update Event\n * Emitted when who is the self changes\n * @event members:self:update\n * @instance\n * @property {String} activeSelfId\n * @property {String} endedSelfId\n * @memberof Members\n */\n\n/**\n * @class Members\n */\nexport default class Members extends StatelessWebexPlugin {\n namespace = MEETINGS;\n\n /**\n *\n * @param {Object} attrs\n * @param {Object} options\n * @memberof Members\n */\n constructor(attrs, options) {\n super({}, options);\n /**\n * The Members Request object to interact with server\n * @instance\n * @type {MembersRequest}\n * @private\n * @memberof Members\n */\n this.membersRequest = new MembersRequest({}, options);\n /**\n * The Members Collection cache\n * @instance\n * @type {MembersCollection}\n * @private\n * @memberof Members\n */\n this.membersCollection = new MembersCollection();\n /**\n * The current locus url for the active meeting\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.locusUrl = attrs.locusUrl || null;\n /**\n * The current hostId for the meeting\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.hostId = null;\n /**\n * The current type for the meeting, could be MEETING or CALL\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.type = null;\n /**\n * Locus has a self object, sent individually to the client\n * i.e., each person in the call gets their own self object from locus.\n * We need to maintain that self object, because we also get information about all the participants\n * and differentiate those participants from self.\n * The self id shouldnt ever change, but it does have properties that will change\n * and we use values in locus-info, such as to determine if i am admitted to the meeting or not as guest.\n * The current selfId for the meeting\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.selfId = null;\n /**\n * The current mediaShareContentId for the meeting\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.mediaShareContentId = null;\n /**\n * The current recordingId for the meeting, if it exists\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.recordingId = null;\n }\n\n /**\n * Internal update the self Id value\n * @param {Object} payload\n * @param {Object} payload.newSelf\n * @param {Object} payload.oldSelf\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusSelfUpdate(payload) {\n let newSelfId = null;\n let oldSelfId = null;\n\n if (payload) {\n if (payload.newSelf) {\n newSelfId = payload.newSelf.id;\n }\n if (payload.oldSelf) {\n oldSelfId = payload.oldSelf.id;\n }\n }\n if (newSelfId) {\n const theSelf = this.membersCollection.get(newSelfId);\n\n if (theSelf) {\n theSelf.setIsSelf(true);\n }\n }\n if (oldSelfId) {\n const notSelf = this.membersCollection.get(oldSelfId);\n\n if (notSelf) {\n notSelf.setIsSelf(false);\n }\n }\n this.selfId = newSelfId;\n Trigger.trigger(\n this,\n {\n file: 'members',\n function: 'locusSelfUpdate'\n },\n EVENT_TRIGGERS.MEMBERS_SELF_UPDATE,\n {\n activeSelfId: newSelfId,\n endedSelfId: oldSelfId\n }\n );\n }\n\n /**\n * Internal update the hostId value\n * @param {Object} payload\n * @param {Object} payload.newHost\n * @param {Object} payload.oldHost\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusHostUpdate(payload) {\n let newHostId = null;\n let oldHostId = null;\n\n if (payload) {\n if (payload.newHost) {\n newHostId = payload.newHost.id;\n }\n if (payload.oldHost) {\n oldHostId = payload.oldHost.id;\n }\n }\n if (newHostId) {\n const theHost = this.membersCollection.get(newHostId);\n\n if (theHost) {\n theHost.setIsHost(true);\n }\n }\n if (oldHostId) {\n const notHost = this.membersCollection.get(oldHostId);\n\n if (notHost) {\n notHost.setIsHost(false);\n }\n }\n this.hostId = newHostId;\n Trigger.trigger(\n this,\n {\n file: 'members',\n function: 'locusHostUpdate'\n },\n EVENT_TRIGGERS.MEMBERS_HOST_UPDATE,\n {\n activeHostId: newHostId,\n endedHostId: oldHostId\n }\n );\n }\n\n /**\n * when new participant updates come in, both delta and full participants, update them in members collection\n * delta object in the event will have {updated, added} and full will be the full membersCollection\n * @param {Object} payload\n * @param {Object} payload.participants\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusParticipantsUpdate(payload) {\n if (payload) {\n const delta = this.handleLocusInfoUpdatedParticipants(payload);\n const full = this.handleMembersUpdate(delta); // SDK should propagate the full list for both delta and non delta updates\n\n Trigger.trigger(\n this,\n {\n file: 'members',\n function: 'locusParticipantsUpdate'\n },\n EVENT_TRIGGERS.MEMBERS_UPDATE,\n {\n delta,\n full\n }\n );\n }\n }\n\n /**\n * Internal update the content id\n * @param {Object} payload\n * @param {Object} payload.current\n * @param {Object} payload.previous\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusMediaSharesUpdate(payload) {\n const currentContent = payload.current;\n const previousContent = payload.previous;\n let whoSharing = null;\n let whoStopped = null;\n\n if (currentContent && currentContent.contentId) {\n if (currentContent.disposition === FLOOR_ACTION.GRANTED) {\n whoSharing = currentContent.contentId;\n whoStopped = previousContent && previousContent.contentId;\n }\n else if (currentContent.disposition === FLOOR_ACTION.RELEASED) {\n whoStopped = currentContent.contentId;\n }\n }\n if (whoSharing) {\n const shareMember = this.membersCollection.get(whoSharing);\n\n if (shareMember) {\n shareMember.setIsContentSharing(true);\n }\n }\n if (whoStopped) {\n const stopMember = this.membersCollection.get(whoStopped);\n\n if (stopMember) {\n stopMember.setIsContentSharing(false);\n }\n }\n this.mediaShareContentId = whoSharing;\n Trigger.trigger(\n this,\n {\n file: 'members',\n function: 'locusMediaSharesUpdate'\n },\n EVENT_TRIGGERS.MEMBERS_CONTENT_UPDATE,\n {\n activeContentSharingId: whoSharing,\n endedContentSharingId: whoStopped\n }\n );\n }\n\n\n /**\n * Internal update the locus url value\n * @param {Object} payload\n * @param {String} payload.locusUrl\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusUrlUpdate(payload) {\n if (payload) {\n this.setLocusUrl(null, payload);\n }\n }\n\n /**\n * Internal update the type of meeting\n * @param {Object} payload\n * @param {String} payload.type\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusFullStateTypeUpdate(payload) {\n // TODO: at some point there could be a timing issue here, for updating each member\n // ie., if the type changes AND there is no locus update, then each member will not know the type of call\n // which means they cannot determine isMutable && isRemovable\n // for now this scenario is impossible to occur since we always get a locus update when the type changes\n // except for in delta locus meetings, but in that case, the type will always have been set differently\n // from the outset anyway\n if (payload) {\n this.setType(payload);\n }\n }\n\n /**\n * sets values in the members collection for updated and added properties from delta\n * @param {Object} membersUpdate {updated: [], added: []}\n * @returns {Object} membersCollection\n * @private\n * @memberof Members\n */\n handleMembersUpdate(membersUpdate) {\n if (membersUpdate) {\n if (membersUpdate.updated) {\n this.constructMembers(membersUpdate.updated);\n }\n if (membersUpdate.added) {\n this.constructMembers(membersUpdate.added);\n }\n }\n\n return this.membersCollection.getAll();\n }\n\n /**\n * set members to the member collection from each updated/added lists as passed in\n * @param {Array} list\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n constructMembers(list) {\n list.forEach((member) => {\n this.membersCollection.set(member.id, member);\n });\n }\n\n /**\n * Internal update the participants value\n * @param {Object} payload\n * @returns {Object}\n * @private\n * @memberof Members\n */\n handleLocusInfoUpdatedParticipants(payload) {\n this.hostId = payload.hostId || this.hostId;\n this.selfId = payload.selfId || this.selfId;\n this.recordingId = payload.recordingId;\n if (!payload.participants) {\n LoggerProxy.logger.warn('Members:index#handleLocusInfoUpdatedParticipants --> participants payload is missing.');\n }\n const memberUpdate = this.update(payload.participants);\n\n return memberUpdate;\n }\n\n /**\n * Update the locus Url\n * @param {Object} locus\n * @param {String} [locusUrl] optional, takes precedence\n * @throws {ParameterError}\n * @returns {undefined}\n * @public\n * @memberof Members\n */\n setLocusUrl(locus, locusUrl = null) {\n if (locusUrl) {\n this.locusUrl = locusUrl;\n }\n else if (locus && (locus.locusUrl || locus.url)) {\n this.locusUrl = locus.locusUrl || locus.url;\n }\n else {\n throw new ParameterError('Setting locusUrl for the Members module should be done with a locus object or locusUrl');\n }\n }\n\n /**\n * Update the host id\n * @param {Object} locus\n * @param {String} [hostId] optional, takes precedence\n * @throws {ParameterError}\n * @returns {undefined}\n * @public\n * @memberof Members\n */\n setHostId(locus, hostId = null) {\n if (hostId) {\n this.hostId = hostId;\n }\n else if (locus) {\n this.hostId = locus && locus.owner && locus.owner.info ? locus.owner.info : null;\n }\n else {\n throw new ParameterError('Setting hostid for the Members module should be done with a locus object or hostId');\n }\n }\n\n /**\n * Update the type\n * @param {Object} fullState\n * @param {String} [type] optional, takes precedence\n * @throws {ParameterError}\n * @returns {undefined}\n * @public\n * @memberof Members\n */\n setType(fullState, type = null) {\n if (type) {\n this.type = type;\n }\n else if (fullState) {\n this.type = (fullState && fullState.type) || null;\n }\n else {\n throw new ParameterError('Setting type for the Members module should be done with a fullstate object or type string');\n }\n }\n\n /**\n * Update the self Id\n * @param {Object} locus\n * @param {String} [selfId] optional, takes precedence\n * @throws {Error}\n * @returns {undefined}\n * @memberof Members\n */\n setSelfId(locus, selfId = null) {\n if (selfId) {\n this.selfId = selfId;\n }\n else if (locus) {\n this.selfId = locus && locus.self && locus.self.person && locus.self.person.id ? locus.self.person.id : null;\n }\n else {\n throw new ParameterError('Setting selfid for the Members module should be done with a locus object or selfId');\n }\n }\n\n /**\n * Update the media share content id\n * @param {Object} locus\n * @param {String} [contentId] optional, takes precedence\n * @throws {Error}\n * @returns {undefined}\n * @memberof Members\n */\n setMediaShareContentId(locus, contentId) {\n if (contentId) {\n this.mediaShareContentId = contentId;\n }\n else if (locus) {\n const contentMediaShare =\n locus.mediaShares &&\n locus.mediaShares.length &&\n locus.mediaShares.find((mediaShare) => mediaShare.name === CONTENT);\n\n this.mediaShareContentId =\n (contentMediaShare &&\n contentMediaShare.floor &&\n contentMediaShare.floor.beneficiary &&\n contentMediaShare.floor.beneficiary.id) ||\n null;\n }\n else {\n throw new ParameterError('Setting hostid for the Members module should be done with a locus object or hostId');\n }\n }\n\n /**\n * Find all the updates, and added members\n * Removed/left members will end up in updates\n * Each array contains only members\n * @param {Array} participants the locus participants\n * @returns {Object} {added: {Array}, updated: {Array}}\n * @private\n * @memberof Members\n */\n update(participants) {\n const membersUpdate = {added: [], updated: []};\n\n if (participants) {\n participants.forEach((participant) => {\n if (participant.hideInRoster) {\n return;\n }\n const existing = this.membersCollection.get(participant.id);\n\n if (existing) {\n // TODO: compare existing member to new participant coming in properties and determine if updated (this helps for non delta events)\n // on client re renders, but we will have to determine what values to compare to determine difference, premature optimization\n membersUpdate.updated.push(\n new Member(participant, {\n recordingId: this.recordingId,\n selfId: this.selfId,\n hostId: this.hostId,\n contentSharingId: this.mediaShareContentId,\n type: this.type\n })\n );\n }\n else {\n membersUpdate.added.push(\n new Member(participant, {\n recordingId: this.recordingId,\n selfId: this.selfId,\n hostId: this.hostId,\n contentSharingId: this.mediaShareContentId,\n type: this.type\n })\n );\n }\n });\n }\n\n return membersUpdate;\n }\n\n /**\n * Adds a guest Member to the associated meeting\n * @param {String} invitee\n * @param {Boolean} [alertIfActive]\n * @returns {Promise}\n * @memberof Members\n */\n addMember(invitee, alertIfActive) {\n if (!this.locusUrl) {\n return Promise.reject(new ParameterError('The associated locus url for this meeting object must be defined.'));\n }\n if (MembersUtil.isInvalidInvitee(invitee)) {\n return Promise.reject(\n new ParameterError('The invitee must be defined with either a valid email, emailAddress or phoneNumber property.')\n );\n }\n const options = MembersUtil.generateAddMemberOptions(invitee, this.locusUrl, alertIfActive);\n\n return this.membersRequest.addMembers(options);\n }\n\n /**\n * Admits waiting members (invited guests to meeting)\n * @param {Array} memberIds\n * @returns {Promise}\n * @public\n * @memberof Members\n */\n admitMembers(memberIds) {\n if (isEmpty(memberIds)) {\n return Promise.reject(new ParameterError('No member ids provided to admit.'));\n }\n const options = MembersUtil.generateAdmitMemberOptions(memberIds, this.locusUrl);\n\n return this.membersRequest.admitMember(options);\n }\n\n /**\n * Removes a member from the meeting\n * @param {String} memberId\n * @returns {Promise}\n * @public\n * @memberof Members\n */\n removeMember(memberId) {\n if (!this.locusUrl) {\n return Promise.reject(new ParameterError('The associated locus url for this meeting object must be defined.'));\n }\n if (!memberId) {\n return Promise.reject(new ParameterError('The member id must be defined to remove the member.'));\n }\n const options = MembersUtil.generateRemoveMemberOptions(memberId, this.locusUrl);\n\n return this.membersRequest.removeMember(options);\n }\n\n /**\n * Audio mutes another member in a meeting\n * @param {String} memberId\n * @param {boolean} [mute] default true\n * @returns {Promise}\n * @public\n * @memberof Members\n */\n muteMember(memberId, mute = true) {\n if (!this.locusUrl) {\n return Promise.reject(new ParameterError('The associated locus url for this meetings members object must be defined.'));\n }\n if (!memberId) {\n return Promise.reject(new ParameterError('The member id must be defined to mute the member.'));\n }\n const options = MembersUtil.generateMuteMemberOptions(memberId, mute, this.locusUrl);\n\n return this.membersRequest.muteMember(options);\n }\n\n /**\n * Transfers the host to another member\n * @param {String} memberId\n * @param {boolean} [moderator] default true\n * @returns {Promise}\n * @public\n * @memberof Members\n */\n transferHostToMember(memberId, moderator = true) {\n if (!this.locusUrl) {\n return Promise.reject(new ParameterError('The associated locus url for this meetings members object must be defined.'));\n }\n if (!memberId) {\n return Promise.reject(new ParameterError('The member id must be defined to transfer host to the member.'));\n }\n const options = MembersUtil.generateTransferHostMemberOptions(memberId, moderator, this.locusUrl);\n\n return this.membersRequest.transferHostToMember(options);\n }\n}\n"]}
1
+ {"version":3,"sources":["index.js"],"names":["Members","attrs","options","MEETINGS","membersRequest","MembersRequest","membersCollection","MembersCollection","locusUrl","hostId","type","selfId","mediaShareContentId","recordingId","payload","newSelfId","oldSelfId","newSelf","id","oldSelf","theSelf","get","setIsSelf","notSelf","Trigger","trigger","file","function","EVENT_TRIGGERS","MEMBERS_SELF_UPDATE","activeSelfId","endedSelfId","newHostId","oldHostId","newHost","oldHost","theHost","setIsHost","notHost","MEMBERS_HOST_UPDATE","activeHostId","endedHostId","delta","handleLocusInfoUpdatedParticipants","full","handleMembersUpdate","MEMBERS_UPDATE","currentContent","current","previousContent","previous","whoSharing","whoStopped","contentId","disposition","FLOOR_ACTION","GRANTED","RELEASED","shareMember","setIsContentSharing","stopMember","MEMBERS_CONTENT_UPDATE","activeContentSharingId","endedContentSharingId","setLocusUrl","setType","membersUpdate","updated","constructMembers","added","getAll","list","forEach","member","set","participants","LoggerProxy","logger","warn","memberUpdate","update","locus","url","ParameterError","owner","info","fullState","self","person","contentMediaShare","mediaShares","length","find","mediaShare","name","CONTENT","floor","beneficiary","participant","hideInRoster","existing","push","Member","contentSharingId","invitee","alertIfActive","reject","MembersUtil","isInvalidInvitee","generateAddMemberOptions","addMembers","cancelPhoneInviteOptions","cancelPhoneInvite","memberIds","generateAdmitMemberOptions","admitMember","memberId","generateRemoveMemberOptions","removeMember","mute","generateMuteMemberOptions","muteMember","moderator","generateTransferHostMemberOptions","transferHostToMember","tones","deviceArray","devices","device","deviceType","genderateSendDTMFOptions","sendDialPadKey","Error","StatelessWebexPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;IACqBA,O;;;;;AAGnB;AACF;AACA;AACA;AACA;AACA;AACE,mBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA;AAC1B,8BAAM,EAAN,EAAUA,OAAV;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AAR8B,4FARhBC,mBAQgB;AAS1B,UAAKC,cAAL,GAAsB,IAAIC,gBAAJ,CAAmB,EAAnB,EAAuBH,OAAvB,CAAtB;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKI,iBAAL,GAAyB,IAAIC,mBAAJ,EAAzB;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,QAAL,GAAgBP,KAAK,CAACO,QAAN,IAAkB,IAAlC;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,MAAL,GAAc,IAAd;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,IAAL,GAAY,IAAZ;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,MAAL,GAAc,IAAd;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,mBAAL,GAA2B,IAA3B;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;;AACI,UAAKC,WAAL,GAAmB,IAAnB;AAvE0B;AAwE3B;AAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;WACE,yBAAgBC,OAAhB,EAAyB;AACvB,UAAIC,SAAS,GAAG,IAAhB;AACA,UAAIC,SAAS,GAAG,IAAhB;;AAEA,UAAIF,OAAJ,EAAa;AACX,YAAIA,OAAO,CAACG,OAAZ,EAAqB;AACnBF,UAAAA,SAAS,GAAGD,OAAO,CAACG,OAA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CAAe,IAAI0B,KAAJ,CAAU,4HAAV,CAAf,CAAP;AACD;;;EAxpBkCC,+B","sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nimport {isEmpty} from 'lodash';\nimport {StatelessWebexPlugin} from '@webex/webex-core';\n\nimport {MEETINGS, EVENT_TRIGGERS, FLOOR_ACTION, CONTENT} from '../constants';\nimport Trigger from '../common/events/trigger-proxy';\nimport Member from '../member';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport ParameterError from '../common/errors/parameter';\n\nimport MembersCollection from './collection';\nimport MembersRequest from './request';\nimport MembersUtil from './util';\n\n/**\n * Members Update Event\n * Emitted when something in the roster list needs to be updated\n * @event members:update\n * @instance\n * @property {Object} delta the changes to the members list\n * @property {Array} delta.updated array only the updates, includes removals, as they will have updated status and member properties\n * @property {Array} delta.added array added members to the meeting\n * @property {Array} full array the full members collection\n * @memberof Members\n */\n\n/**\n * Members Content Update Event\n * Emitted when who is sharing changes\n * @event members:content:update\n * @instance\n * @property {String} activeContentSharingId\n * @property {String} endedContentSharingId\n * @memberof Members\n */\n\n/**\n * Members Host Update Event\n * Emitted when who is the host changes\n * @event members:host:update\n * @instance\n * @property {String} activeHostId\n * @property {String} endedHostId\n * @memberof Members\n */\n\n/**\n * Members Self Update Event\n * Emitted when who is the self changes\n * @event members:self:update\n * @instance\n * @property {String} activeSelfId\n * @property {String} endedSelfId\n * @memberof Members\n */\n\n/**\n * @class Members\n */\nexport default class Members extends StatelessWebexPlugin {\n namespace = MEETINGS;\n\n /**\n *\n * @param {Object} attrs\n * @param {Object} options\n * @memberof Members\n */\n constructor(attrs, options) {\n super({}, options);\n /**\n * The Members Request object to interact with server\n * @instance\n * @type {MembersRequest}\n * @private\n * @memberof Members\n */\n this.membersRequest = new MembersRequest({}, options);\n /**\n * The Members Collection cache\n * @instance\n * @type {MembersCollection}\n * @private\n * @memberof Members\n */\n this.membersCollection = new MembersCollection();\n /**\n * The current locus url for the active meeting\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.locusUrl = attrs.locusUrl || null;\n /**\n * The current hostId for the meeting\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.hostId = null;\n /**\n * The current type for the meeting, could be MEETING or CALL\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.type = null;\n /**\n * Locus has a self object, sent individually to the client\n * i.e., each person in the call gets their own self object from locus.\n * We need to maintain that self object, because we also get information about all the participants\n * and differentiate those participants from self.\n * The self id shouldnt ever change, but it does have properties that will change\n * and we use values in locus-info, such as to determine if i am admitted to the meeting or not as guest.\n * The current selfId for the meeting\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.selfId = null;\n /**\n * The current mediaShareContentId for the meeting\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.mediaShareContentId = null;\n /**\n * The current recordingId for the meeting, if it exists\n * @instance\n * @type {String}\n * @private\n * @memberof Members\n */\n this.recordingId = null;\n }\n\n /**\n * Internal update the self Id value\n * @param {Object} payload\n * @param {Object} payload.newSelf\n * @param {Object} payload.oldSelf\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusSelfUpdate(payload) {\n let newSelfId = null;\n let oldSelfId = null;\n\n if (payload) {\n if (payload.newSelf) {\n newSelfId = payload.newSelf.id;\n }\n if (payload.oldSelf) {\n oldSelfId = payload.oldSelf.id;\n }\n }\n if (newSelfId) {\n const theSelf = this.membersCollection.get(newSelfId);\n\n if (theSelf) {\n theSelf.setIsSelf(true);\n }\n }\n if (oldSelfId) {\n const notSelf = this.membersCollection.get(oldSelfId);\n\n if (notSelf) {\n notSelf.setIsSelf(false);\n }\n }\n this.selfId = newSelfId;\n Trigger.trigger(\n this,\n {\n file: 'members',\n function: 'locusSelfUpdate'\n },\n EVENT_TRIGGERS.MEMBERS_SELF_UPDATE,\n {\n activeSelfId: newSelfId,\n endedSelfId: oldSelfId\n }\n );\n }\n\n /**\n * Internal update the hostId value\n * @param {Object} payload\n * @param {Object} payload.newHost\n * @param {Object} payload.oldHost\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusHostUpdate(payload) {\n let newHostId = null;\n let oldHostId = null;\n\n if (payload) {\n if (payload.newHost) {\n newHostId = payload.newHost.id;\n }\n if (payload.oldHost) {\n oldHostId = payload.oldHost.id;\n }\n }\n if (newHostId) {\n const theHost = this.membersCollection.get(newHostId);\n\n if (theHost) {\n theHost.setIsHost(true);\n }\n }\n if (oldHostId) {\n const notHost = this.membersCollection.get(oldHostId);\n\n if (notHost) {\n notHost.setIsHost(false);\n }\n }\n this.hostId = newHostId;\n Trigger.trigger(\n this,\n {\n file: 'members',\n function: 'locusHostUpdate'\n },\n EVENT_TRIGGERS.MEMBERS_HOST_UPDATE,\n {\n activeHostId: newHostId,\n endedHostId: oldHostId\n }\n );\n }\n\n /**\n * when new participant updates come in, both delta and full participants, update them in members collection\n * delta object in the event will have {updated, added} and full will be the full membersCollection\n * @param {Object} payload\n * @param {Object} payload.participants\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusParticipantsUpdate(payload) {\n if (payload) {\n const delta = this.handleLocusInfoUpdatedParticipants(payload);\n const full = this.handleMembersUpdate(delta); // SDK should propagate the full list for both delta and non delta updates\n\n Trigger.trigger(\n this,\n {\n file: 'members',\n function: 'locusParticipantsUpdate'\n },\n EVENT_TRIGGERS.MEMBERS_UPDATE,\n {\n delta,\n full\n }\n );\n }\n }\n\n /**\n * Internal update the content id\n * @param {Object} payload\n * @param {Object} payload.current\n * @param {Object} payload.previous\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusMediaSharesUpdate(payload) {\n const currentContent = payload.current;\n const previousContent = payload.previous;\n let whoSharing = null;\n let whoStopped = null;\n\n if (currentContent && currentContent.contentId) {\n if (currentContent.disposition === FLOOR_ACTION.GRANTED) {\n whoSharing = currentContent.contentId;\n whoStopped = previousContent && previousContent.contentId;\n }\n else if (currentContent.disposition === FLOOR_ACTION.RELEASED) {\n whoStopped = currentContent.contentId;\n }\n }\n if (whoSharing) {\n const shareMember = this.membersCollection.get(whoSharing);\n\n if (shareMember) {\n shareMember.setIsContentSharing(true);\n }\n }\n if (whoStopped) {\n const stopMember = this.membersCollection.get(whoStopped);\n\n if (stopMember) {\n stopMember.setIsContentSharing(false);\n }\n }\n this.mediaShareContentId = whoSharing;\n Trigger.trigger(\n this,\n {\n file: 'members',\n function: 'locusMediaSharesUpdate'\n },\n EVENT_TRIGGERS.MEMBERS_CONTENT_UPDATE,\n {\n activeContentSharingId: whoSharing,\n endedContentSharingId: whoStopped\n }\n );\n }\n\n\n /**\n * Internal update the locus url value\n * @param {Object} payload\n * @param {String} payload.locusUrl\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusUrlUpdate(payload) {\n if (payload) {\n this.setLocusUrl(null, payload);\n }\n }\n\n /**\n * Internal update the type of meeting\n * @param {Object} payload\n * @param {String} payload.type\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n locusFullStateTypeUpdate(payload) {\n // TODO: at some point there could be a timing issue here, for updating each member\n // ie., if the type changes AND there is no locus update, then each member will not know the type of call\n // which means they cannot determine isMutable && isRemovable\n // for now this scenario is impossible to occur since we always get a locus update when the type changes\n // except for in delta locus meetings, but in that case, the type will always have been set differently\n // from the outset anyway\n if (payload) {\n this.setType(payload);\n }\n }\n\n /**\n * sets values in the members collection for updated and added properties from delta\n * @param {Object} membersUpdate {updated: [], added: []}\n * @returns {Object} membersCollection\n * @private\n * @memberof Members\n */\n handleMembersUpdate(membersUpdate) {\n if (membersUpdate) {\n if (membersUpdate.updated) {\n this.constructMembers(membersUpdate.updated);\n }\n if (membersUpdate.added) {\n this.constructMembers(membersUpdate.added);\n }\n }\n\n return this.membersCollection.getAll();\n }\n\n /**\n * set members to the member collection from each updated/added lists as passed in\n * @param {Array} list\n * @returns {undefined}\n * @private\n * @memberof Members\n */\n constructMembers(list) {\n list.forEach((member) => {\n this.membersCollection.set(member.id, member);\n });\n }\n\n /**\n * Internal update the participants value\n * @param {Object} payload\n * @returns {Object}\n * @private\n * @memberof Members\n */\n handleLocusInfoUpdatedParticipants(payload) {\n this.hostId = payload.hostId || this.hostId;\n this.selfId = payload.selfId || this.selfId;\n this.recordingId = payload.recordingId;\n if (!payload.participants) {\n LoggerProxy.logger.warn('Members:index#handleLocusInfoUpdatedParticipants --> participants payload is missing.');\n }\n const memberUpdate = this.update(payload.participants);\n\n return memberUpdate;\n }\n\n /**\n * Update the locus Url\n * @param {Object} locus\n * @param {String} [locusUrl] optional, takes precedence\n * @throws {ParameterError}\n * @returns {undefined}\n * @public\n * @memberof Members\n */\n setLocusUrl(locus, locusUrl = null) {\n if (locusUrl) {\n this.locusUrl = locusUrl;\n }\n else if (locus && (locus.locusUrl || locus.url)) {\n this.locusUrl = locus.locusUrl || locus.url;\n }\n else {\n throw new ParameterError('Setting locusUrl for the Members module should be done with a locus object or locusUrl');\n }\n }\n\n /**\n * Update the host id\n * @param {Object} locus\n * @param {String} [hostId] optional, takes precedence\n * @throws {ParameterError}\n * @returns {undefined}\n * @public\n * @memberof Members\n */\n setHostId(locus, hostId = null) {\n if (hostId) {\n this.hostId = hostId;\n }\n else if (locus) {\n this.hostId = locus && locus.owner && locus.owner.info ? locus.owner.info : null;\n }\n else {\n throw new ParameterError('Setting hostid for the Members module should be done with a locus object or hostId');\n }\n }\n\n /**\n * Update the type\n * @param {Object} fullState\n * @param {String} [type] optional, takes precedence\n * @throws {ParameterError}\n * @returns {undefined}\n * @public\n * @memberof Members\n */\n setType(fullState, type = null) {\n if (type) {\n this.type = type;\n }\n else if (fullState) {\n this.type = (fullState && fullState.type) || null;\n }\n else {\n throw new ParameterError('Setting type for the Members module should be done with a fullstate object or type string');\n }\n }\n\n /**\n * Update the self Id\n * @param {Object} locus\n * @param {String} [selfId] optional, takes precedence\n * @throws {Error}\n * @returns {undefined}\n * @memberof Members\n */\n setSelfId(locus, selfId = null) {\n if (selfId) {\n this.selfId = selfId;\n }\n else if (locus) {\n this.selfId = locus && locus.self && locus.self.person && locus.self.person.id ? locus.self.person.id : null;\n }\n else {\n throw new ParameterError('Setting selfid for the Members module should be done with a locus object or selfId');\n }\n }\n\n /**\n * Update the media share content id\n * @param {Object} locus\n * @param {String} [contentId] optional, takes precedence\n * @throws {Error}\n * @returns {undefined}\n * @memberof Members\n */\n setMediaShareContentId(locus, contentId) {\n if (contentId) {\n this.mediaShareContentId = contentId;\n }\n else if (locus) {\n const contentMediaShare =\n locus.mediaShares &&\n locus.mediaShares.length &&\n locus.mediaShares.find((mediaShare) => mediaShare.name === CONTENT);\n\n this.mediaShareContentId =\n (contentMediaShare &&\n contentMediaShare.floor &&\n contentMediaShare.floor.beneficiary &&\n contentMediaShare.floor.beneficiary.id) ||\n null;\n }\n else {\n throw new ParameterError('Setting hostid for the Members module should be done with a locus object or hostId');\n }\n }\n\n /**\n * Find all the updates, and added members\n * Removed/left members will end up in updates\n * Each array contains only members\n * @param {Array} participants the locus participants\n * @returns {Object} {added: {Array}, updated: {Array}}\n * @private\n * @memberof Members\n */\n update(participants) {\n const membersUpdate = {added: [], updated: []};\n\n if (participants) {\n participants.forEach((participant) => {\n if (participant.hideInRoster) {\n return;\n }\n const existing = this.membersCollection.get(participant.id);\n\n if (existing) {\n // TODO: compare existing member to new participant coming in properties and determine if updated (this helps for non delta events)\n // on client re renders, but we will have to determine what values to compare to determine difference, premature optimization\n membersUpdate.updated.push(\n new Member(participant, {\n recordingId: this.recordingId,\n selfId: this.selfId,\n hostId: this.hostId,\n contentSharingId: this.mediaShareContentId,\n type: this.type\n })\n );\n }\n else {\n membersUpdate.added.push(\n new Member(participant, {\n recordingId: this.recordingId,\n selfId: this.selfId,\n hostId: this.hostId,\n contentSharingId: this.mediaShareContentId,\n type: this.type\n })\n );\n }\n });\n }\n\n return membersUpdate;\n }\n\n /**\n * Adds a guest Member to the associated meeting\n * @param {String} invitee\n * @param {Boolean} [alertIfActive]\n * @returns {Promise}\n * @memberof Members\n */\n addMember(invitee, alertIfActive) {\n if (!this.locusUrl) {\n return Promise.reject(new ParameterError('The associated locus url for this meeting object must be defined.'));\n }\n if (MembersUtil.isInvalidInvitee(invitee)) {\n return Promise.reject(\n new ParameterError('The invitee must be defined with either a valid email, emailAddress or phoneNumber property.')\n );\n }\n const options = MembersUtil.generateAddMemberOptions(invitee, this.locusUrl, alertIfActive);\n\n return this.membersRequest.addMembers(options);\n }\n\n /**\n * Cancels an outgoing PSTN call to the associated meeting\n * @param {String} invitee\n * @returns {Promise}\n * @memberof Members\n */\n cancelPhoneInvite(invitee) {\n if (!this.locusUrl) {\n return Promise.reject(new ParameterError('The associated locus url for this meeting object must be defined.'));\n }\n if (MembersUtil.isInvalidInvitee(invitee)) {\n return Promise.reject(\n new ParameterError('The invitee must be defined with a valid phoneNumber property.')\n );\n }\n const options = MembersUtil.cancelPhoneInviteOptions(invitee, this.locusUrl);\n\n\n return this.membersRequest.cancelPhoneInvite(options);\n }\n\n /**\n * Admits waiting members (invited guests to meeting)\n * @param {Array} memberIds\n * @returns {Promise}\n * @public\n * @memberof Members\n */\n admitMembers(memberIds) {\n if (isEmpty(memberIds)) {\n return Promise.reject(new ParameterError('No member ids provided to admit.'));\n }\n const options = MembersUtil.generateAdmitMemberOptions(memberIds, this.locusUrl);\n\n return this.membersRequest.admitMember(options);\n }\n\n /**\n * Removes a member from the meeting\n * @param {String} memberId\n * @returns {Promise}\n * @public\n * @memberof Members\n */\n removeMember(memberId) {\n if (!this.locusUrl) {\n return Promise.reject(new ParameterError('The associated locus url for this meeting object must be defined.'));\n }\n if (!memberId) {\n return Promise.reject(new ParameterError('The member id must be defined to remove the member.'));\n }\n const options = MembersUtil.generateRemoveMemberOptions(memberId, this.locusUrl);\n\n return this.membersRequest.removeMember(options);\n }\n\n /**\n * Audio mutes another member in a meeting\n * @param {String} memberId\n * @param {boolean} [mute] default true\n * @returns {Promise}\n * @public\n * @memberof Members\n */\n muteMember(memberId, mute = true) {\n if (!this.locusUrl) {\n return Promise.reject(new ParameterError('The associated locus url for this meetings members object must be defined.'));\n }\n if (!memberId) {\n return Promise.reject(new ParameterError('The member id must be defined to mute the member.'));\n }\n const options = MembersUtil.generateMuteMemberOptions(memberId, mute, this.locusUrl);\n\n return this.membersRequest.muteMember(options);\n }\n\n /**\n * Transfers the host to another member\n * @param {String} memberId\n * @param {boolean} [moderator] default true\n * @returns {Promise}\n * @public\n * @memberof Members\n */\n transferHostToMember(memberId, moderator = true) {\n if (!this.locusUrl) {\n return Promise.reject(new ParameterError('The associated locus url for this meetings members object must be defined.'));\n }\n if (!memberId) {\n return Promise.reject(new ParameterError('The member id must be defined to transfer host to the member.'));\n }\n const options = MembersUtil.generateTransferHostMemberOptions(memberId, moderator, this.locusUrl);\n\n return this.membersRequest.transferHostToMember(options);\n }\n\n\n /**\n * Sends DTMF tones for the PSTN member of a meeting\n * @param {String} tones a string of one or more DTMF tones to send\n * @param {String} memberId member id\n * @returns {Promise}\n * @public\n * @memberof Members\n */\n sendDialPadKey(tones = '', memberId = '') {\n if (!tones && tones !== 0) {\n return Promise.reject(new ParameterError('DMTF tones must be passed in'));\n }\n\n const member = this.membersCollection.get(memberId);\n\n if (!member) {\n return Promise.reject(new ParameterError('there is no member associated with that Id'));\n }\n\n const {locusUrl} = this;\n\n const deviceArray = member.participant.devices;\n const device = deviceArray.find(({deviceType}) => deviceType === 'SIP');\n const url = device?.url;\n\n if (locusUrl && url) {\n const options = MembersUtil.genderateSendDTMFOptions(url, tones, memberId, locusUrl);\n\n return this.membersRequest.sendDialPadKey(options);\n }\n\n return Promise.reject(new Error('Members:index#sendDialPadKey --> cannot send DTMF, meeting does not have a connection to the \"locus\" call control service.'));\n }\n}\n"]}
@@ -129,6 +129,47 @@ var MembersRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
129
129
 
130
130
  var requestParams = _util.default.getTransferHostToMemberRequestParams(options);
131
131
 
132
+ return this.request(requestParams);
133
+ }
134
+ /**
135
+ * Sends a request to the DTMF endpoint to send tones
136
+ * @param {Object} options
137
+ * @param {String} options.locusUrl
138
+ * @param {String} options.url device url SIP user
139
+ * @param {String} options.tones a string of one or more DTMF tones to send
140
+ * @param {String} options.memberId ID of PSTN user
141
+ * @returns {Promise}
142
+ */
143
+
144
+ }, {
145
+ key: "sendDialPadKey",
146
+ value: function sendDialPadKey(options) {
147
+ if (!options || !options.locusUrl || !options.memberId || !options.url || !options.tones && options.tones !== 0) {
148
+ throw new _parameter.default('memberId must be defined, the associated locus url, the device url and DTMF tones for this meeting object must be defined.');
149
+ }
150
+
151
+ var requestParams = _util.default.generateSendDTMFRequestParams(options);
152
+
153
+ return this.request(requestParams);
154
+ }
155
+ /**
156
+ * @param {Object} options with format of {invitee: string, locusUrl: string}
157
+ * @returns {Promise}
158
+ * @throws {Error} if the options are not valid and complete, must have invitee with emailAddress OR email AND locusUrl
159
+ * @memberof MembersRequest
160
+ */
161
+
162
+ }, {
163
+ key: "cancelPhoneInvite",
164
+ value: function cancelPhoneInvite(options) {
165
+ var _options$invitee;
166
+
167
+ if (!(options !== null && options !== void 0 && (_options$invitee = options.invitee) !== null && _options$invitee !== void 0 && _options$invitee.phoneNumber || options !== null && options !== void 0 && options.locusUrl)) {
168
+ throw new _parameter.default('invitee must be passed and the associated locus url for this meeting object must be defined.');
169
+ }
170
+
171
+ var requestParams = _util.default.generateCancelInviteRequestParams(options);
172
+
132
173
  return this.request(requestParams);
133
174
  }
134
175
  }]);
@@ -1 +1 @@
1
- {"version":3,"sources":["request.js"],"names":["MembersRequest","MEETINGS","options","invitee","emailAddress","email","phoneNumber","locusUrl","ParameterError","requestParams","MembersUtil","getAddMemberRequestParams","request","memberIds","getAdmitMemberRequestParams","memberId","getRemoveMemberRequestParams","getMuteMemberRequestParams","moderator","getTransferHostToMemberRequestParams","StatelessWebexPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AAEA;;;;;;AAGA;AACA;AACA;IACqBA,c;;;;;;;;;;;;;;;4FACPC,mB;;;;;;;AAEZ;AACF;AACA;A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AAJ,CAAmB,iGAAnB,CAAN;AACD;;AAED,UAAMC,aAAa,GAAGC,cAAYO,0BAAZ,CAAuCf,OAAvC,CAAtB;;AAEA,aAAO,KAAKU,OAAL,CAAaH,aAAb,CAAP;AACD;;;WAED,8BAAqBP,OAArB,EAA8B;AAC5B,UAAI,CAACA,OAAD,IAAY,CAACA,OAAO,CAACK,QAArB,IAAiC,CAACL,OAAO,CAACa,QAA1C,IAAsD,CAACb,OAAO,CAACgB,SAAnE,EAA8E;AAC5E,cAAM,IAAIV,kBAAJ,CAAmB,gHAAnB,CAAN;AACD;;AAED,UAAMC,aAAa,GAAGC,cAAYS,oCAAZ,CAAiDjB,OAAjD,CAAtB;;AAEA,aAAO,KAAKU,OAAL,CAAaH,aAAb,CAAP;AACD;;;EA/DyCW,+B","sourcesContent":["import {StatelessWebexPlugin} from '@webex/webex-core';\n\nimport {MEETINGS} from '../constants';\nimport ParameterError from '../common/errors/parameter';\n\nimport MembersUtil from './util';\n\n\n/**\n * @class MembersRequest\n */\nexport default class MembersRequest extends StatelessWebexPlugin {\n namespace = MEETINGS;\n\n /**\n *\n * @param {Object} options with format of {invitee: string, locusUrl: string}\n * @returns {Promise}\n * @throws {Error} if the options are not valid and complete, must have invitee with emailAddress OR email AND locusUrl\n * @memberof MembersRequest\n */\n addMembers(options) {\n if (!(!options || !options.invitee || (!options.invitee.emailAddress || !options.invitee.email || !options.invitee.phoneNumber) || !options.locusUrl)) {\n throw new ParameterError('invitee must be passed and the associated locus url for this meeting object must be defined.');\n }\n const requestParams = MembersUtil.getAddMemberRequestParams(options);\n\n return this.request(requestParams);\n }\n\n /**\n *\n * @param {Object} options\n * @returns {Promise}\n * @throws {Error} if the options are not valid and complete, must have memberIds AND locusUrl\n * @memberof MembersRequest\n */\n admitMember(options) {\n if (!options || !options.locusUrl || !options.memberIds) {\n throw new ParameterError('memberIds must be an array passed and the associated locus url for this meeting object must be defined.');\n }\n const requestParams = MembersUtil.getAdmitMemberRequestParams(options);\n\n return this.request(requestParams);\n }\n\n removeMember(options) {\n if (!options || !options.locusUrl || !options.memberId) {\n throw new ParameterError('memberId must be defined, and the associated locus url for this meeting object must be defined.');\n }\n\n const requestParams = MembersUtil.getRemoveMemberRequestParams(options);\n\n return this.request(requestParams);\n }\n\n muteMember(options) {\n if (!options || !options.locusUrl || !options.memberId) {\n throw new ParameterError('memberId must be defined, and the associated locus url for this meeting object must be defined.');\n }\n\n const requestParams = MembersUtil.getMuteMemberRequestParams(options);\n\n return this.request(requestParams);\n }\n\n transferHostToMember(options) {\n if (!options || !options.locusUrl || !options.memberId || !options.moderator) {\n throw new ParameterError('memberId must be defined, the associated locus url, and the moderator for this meeting object must be defined.');\n }\n\n const requestParams = MembersUtil.getTransferHostToMemberRequestParams(options);\n\n return this.request(requestParams);\n }\n}\n"]}
1
+ {"version":3,"sources":["request.js"],"names":["MembersRequest","MEETINGS","options","invitee","emailAddress","email","phoneNumber","locusUrl","ParameterError","requestParams","MembersUtil","getAddMemberRequestParams","request","memberIds","getAdmitMemberRequestParams","memberId","getRemoveMemberRequestParams","getMuteMemberRequestParams","moderator","getTransferHostToMemberRequestParams","url","tones","generateSendDTMFRequestParams","generateCancelInviteRequestParams","StatelessWebexPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AAEA;;;;;;AAGA;AACA;AACA;IACqBA,c;;;;;;;;;;;;;;;4FACPC,mB;;;;;;;AAEZ;AACF;AACA;AACA;AACA;AACA;AACA;AACE,wBAAWC,OAAX,EAAoB;AAClB,UAAI,EAAE,CAACA,OAAD,IAAY,CAACA,OAAO,CAACC,OAArB,IAAiC,CAACD,OAAO,CAACC,OAAR,CAAgBC,YAAjB,IAAiC,CAACF,OAAO,CAACC,OAAR,CAAgBE,KAAlD,IAA2D,CAACH,OAAO,CAACC,OAAR,CAAgBG,WAA7G,IAA6H,CAACJ,OAAO,CAACK,QAAxI,CAAJ,EAAuJ;AACrJ,cAAM,IAAIC,kBAAJ,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IV,kBAAJ,CAAmB,gHAAnB,CAAN;AACD;;AAED,UAAMC,aAAa,GAAGC,cAAYS,oCAAZ,CAAiDjB,OAAjD,CAAtB;;AAEA,aAAO,KAAKU,OAAL,CAAaH,aAAb,CAAP;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACE,wBAAeP,OAAf,EAAwB;AACtB,UAAI,CAACA,OAAD,IAAY,CAACA,OAAO,CAACK,QAArB,IAAiC,CAACL,OAAO,CAACa,QAA1C,IAAsD,CAACb,OAAO,CAACkB,GAA/D,IAAsE,CAAClB,OAAO,CAACmB,KAAT,IAAkBnB,OAAO,CAACmB,KAAR,KAAkB,CAA9G,EAAiH;AAC/G,cAAM,IAAIb,kBAAJ,CAAmB,4HAAnB,CAAN;AACD;;AAED,UAAMC,aAAa,GAAGC,cAAYY,6BAAZ,CAA0CpB,OAA1C,CAAtB;;AAEA,aAAO,KAAKU,OAAL,CAAaH,aAAb,CAAP;AACD;AAED;AACF;AACA;AACA;AACA;AACA;;;;WACE,2BAAkBP,OAAlB,EAA2B;AAAA;;AACzB,UAAI,EAAEA,OAAO,SAAP,IAAAA,OAAO,WAAP,wBAAAA,OAAO,CAAEC,OAAT,8DAAkBG,WAAlB,IAAiCJ,OAAjC,aAAiCA,OAAjC,eAAiCA,OAAO,CAAEK,QAA5C,CAAJ,EAA2D;AACzD,cAAM,IAAIC,kBAAJ,CAAmB,8FAAnB,CAAN;AACD;;AAED,UAAMC,aAAa,GAAGC,cAAYa,iCAAZ,CAA8CrB,OAA9C,CAAtB;;AAEA,aAAO,KAAKU,OAAL,CAAaH,aAAb,CAAP;AACD;;;EAlGyCe,+B","sourcesContent":["import {StatelessWebexPlugin} from '@webex/webex-core';\n\nimport {MEETINGS} from '../constants';\nimport ParameterError from '../common/errors/parameter';\n\nimport MembersUtil from './util';\n\n\n/**\n * @class MembersRequest\n */\nexport default class MembersRequest extends StatelessWebexPlugin {\n namespace = MEETINGS;\n\n /**\n *\n * @param {Object} options with format of {invitee: string, locusUrl: string}\n * @returns {Promise}\n * @throws {Error} if the options are not valid and complete, must have invitee with emailAddress OR email AND locusUrl\n * @memberof MembersRequest\n */\n addMembers(options) {\n if (!(!options || !options.invitee || (!options.invitee.emailAddress || !options.invitee.email || !options.invitee.phoneNumber) || !options.locusUrl)) {\n throw new ParameterError('invitee must be passed and the associated locus url for this meeting object must be defined.');\n }\n const requestParams = MembersUtil.getAddMemberRequestParams(options);\n\n return this.request(requestParams);\n }\n\n /**\n *\n * @param {Object} options\n * @returns {Promise}\n * @throws {Error} if the options are not valid and complete, must have memberIds AND locusUrl\n * @memberof MembersRequest\n */\n admitMember(options) {\n if (!options || !options.locusUrl || !options.memberIds) {\n throw new ParameterError('memberIds must be an array passed and the associated locus url for this meeting object must be defined.');\n }\n const requestParams = MembersUtil.getAdmitMemberRequestParams(options);\n\n return this.request(requestParams);\n }\n\n removeMember(options) {\n if (!options || !options.locusUrl || !options.memberId) {\n throw new ParameterError('memberId must be defined, and the associated locus url for this meeting object must be defined.');\n }\n\n const requestParams = MembersUtil.getRemoveMemberRequestParams(options);\n\n return this.request(requestParams);\n }\n\n muteMember(options) {\n if (!options || !options.locusUrl || !options.memberId) {\n throw new ParameterError('memberId must be defined, and the associated locus url for this meeting object must be defined.');\n }\n\n const requestParams = MembersUtil.getMuteMemberRequestParams(options);\n\n return this.request(requestParams);\n }\n\n transferHostToMember(options) {\n if (!options || !options.locusUrl || !options.memberId || !options.moderator) {\n throw new ParameterError('memberId must be defined, the associated locus url, and the moderator for this meeting object must be defined.');\n }\n\n const requestParams = MembersUtil.getTransferHostToMemberRequestParams(options);\n\n return this.request(requestParams);\n }\n\n /**\n * Sends a request to the DTMF endpoint to send tones\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.url device url SIP user\n * @param {String} options.tones a string of one or more DTMF tones to send\n * @param {String} options.memberId ID of PSTN user\n * @returns {Promise}\n */\n sendDialPadKey(options) {\n if (!options || !options.locusUrl || !options.memberId || !options.url || !options.tones && options.tones !== 0) {\n throw new ParameterError('memberId must be defined, the associated locus url, the device url and DTMF tones for this meeting object must be defined.');\n }\n\n const requestParams = MembersUtil.generateSendDTMFRequestParams(options);\n\n return this.request(requestParams);\n }\n\n /**\n * @param {Object} options with format of {invitee: string, locusUrl: string}\n * @returns {Promise}\n * @throws {Error} if the options are not valid and complete, must have invitee with emailAddress OR email AND locusUrl\n * @memberof MembersRequest\n */\n cancelPhoneInvite(options) {\n if (!(options?.invitee?.phoneNumber || options?.locusUrl)) {\n throw new ParameterError('invitee must be passed and the associated locus url for this meeting object must be defined.');\n }\n\n const requestParams = MembersUtil.generateCancelInviteRequestParams(options);\n\n return this.request(requestParams);\n }\n}\n"]}
@@ -2,12 +2,16 @@
2
2
 
3
3
  var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
4
 
5
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
6
+
5
7
  _Object$defineProperty(exports, "__esModule", {
6
8
  value: true
7
9
  });
8
10
 
9
11
  exports.default = void 0;
10
12
 
13
+ var _uuid = _interopRequireDefault(require("uuid"));
14
+
11
15
  var _constants = require("../constants");
12
16
 
13
17
  var MembersUtil = {};
@@ -172,6 +176,61 @@ MembersUtil.getTransferHostToMemberRequestParams = function (options) {
172
176
  };
173
177
  };
174
178
 
179
+ MembersUtil.genderateSendDTMFOptions = function (url, tones, memberId, locusUrl) {
180
+ return {
181
+ url: url,
182
+ tones: tones,
183
+ memberId: memberId,
184
+ locusUrl: locusUrl
185
+ };
186
+ };
187
+
188
+ MembersUtil.generateSendDTMFRequestParams = function (_ref) {
189
+ var url = _ref.url,
190
+ tones = _ref.tones,
191
+ memberId = _ref.memberId,
192
+ locusUrl = _ref.locusUrl;
193
+ var body = {
194
+ device: {
195
+ url: url
196
+ },
197
+ memberId: memberId,
198
+ dtmf: {
199
+ correlationId: _uuid.default.v4(),
200
+ tones: tones,
201
+ direction: 'transmit'
202
+ }
203
+ };
204
+ var uri = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT, "/").concat(memberId, "/").concat(_constants.SEND_DTMF_ENDPOINT);
205
+ return {
206
+ method: _constants.HTTP_VERBS.POST,
207
+ uri: uri,
208
+ body: body
209
+ };
210
+ };
211
+
212
+ MembersUtil.cancelPhoneInviteOptions = function (invitee, locusUrl) {
213
+ return {
214
+ invitee: invitee,
215
+ locusUrl: locusUrl
216
+ };
217
+ };
218
+
219
+ MembersUtil.generateCancelInviteRequestParams = function (options) {
220
+ var body = {
221
+ actionType: _constants._REMOVE_,
222
+ invitees: [{
223
+ address: options.invitee.phoneNumber
224
+ }]
225
+ };
226
+ var requestParams = {
227
+ method: _constants.HTTP_VERBS.PUT,
228
+ uri: options.locusUrl,
229
+ body: body
230
+ };
231
+ return requestParams;
232
+ };
233
+
175
234
  var _default = MembersUtil;
176
235
  exports.default = _default;
177
236
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["util.js"],"names":["MembersUtil","generateAddMemberOptions","invitee","locusUrl","alertIfActive","generateAdmitMemberOptions","memberIds","getAddMemberBody","options","invitees","address","emailAddress","email","phoneNumber","getAdmitMemberRequestBody","admit","participantIds","getAdmitMemberRequestParams","format","body","uri","CONTROLS","method","HTTP_VERBS","PUT","getAddMemberRequestParams","requestParams","isInvalidInvitee","DIALER_REGEX","E164_FORMAT","test","VALID_EMAIL_ADDRESS","getRemoveMemberRequestParams","reason","PARTICIPANT","memberId","LEAVE","generateTransferHostMemberOptions","transfer","moderator","generateRemoveMemberOptions","removal","_FORCED_","generateMuteMemberOptions","mute","status","muted","getMuteMemberRequestParams","audio","PATCH","getTransferHostToMemberRequestParams","role"],"mappings":";;;;;;;;;;AAAA;;AAUA,IAAMA,WAAW,GAAG,EAApB;AAEA;AACA;AACA;AACA;AACA;AACA;;AACAA,WAAW,CAACC,wBAAZ,GAAuC,UAACC,OAAD,EAAUC,QAAV,EAAoBC,aAApB;AAAA,SAAuC;AAC5EF,IAAAA,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,CAAT;AAEA,SAAO;AACLC,IAAAA,MAAM,EAAEC,sBAAW0B,KADd;AAEL7B,IAAAA,GAAG,EAAHA,GAFK;AAGLD,IAAAA,IAAI,EAAJA;AAHK,GAAP;AAKD,CAbD;;eAeenB,W","sourcesContent":["import {\n HTTP_VERBS,\n CONTROLS,\n _FORCED_,\n LEAVE,\n PARTICIPANT,\n VALID_EMAIL_ADDRESS,\n DIALER_REGEX\n} from '../constants';\n\nconst MembersUtil = {};\n\n/**\n * @param {Object} invitee with emailAddress, email or phoneNumber\n * @param {String} locusUrl\n * @param {Boolean} alertIfActive\n * @returns {Object} the format object\n */\nMembersUtil.generateAddMemberOptions = (invitee, locusUrl, alertIfActive) => ({\n invitee,\n locusUrl,\n alertIfActive\n});\n\n/**\n * @param {Array} memberIds\n * @param {String} locusUrl\n * @returns {Object} the format object\n */\nMembersUtil.generateAdmitMemberOptions = (memberIds, locusUrl) => ({\n locusUrl,\n memberIds\n});\n\n/**\n * @param {Object} options with {invitee: {emailAddress, email, phoneNumber}, alertIfActive}\n * @returns {Object} with {invitees: [{address}], alertIfActive}\n */\nMembersUtil.getAddMemberBody = (options) => ({\n invitees: [\n {\n address: options.invitee.emailAddress || options.invitee.email || options.invitee.phoneNumber\n }\n ],\n alertIfActive: options.alertIfActive\n});\n\n/**\n * @param {Object} options with {memberIds}\n * @returns {Object} admit with {memberIds}\n */\nMembersUtil.getAdmitMemberRequestBody = (options) => ({\n admit: {participantIds: options.memberIds}\n});\n\n/**\n * @param {Object} format with {memberIds, locusUrl}\n * @returns {Object} the request parameters (method, uri, body) needed to make a admitMember request\n */\nMembersUtil.getAdmitMemberRequestParams = (format) => {\n const body = MembersUtil.getAdmitMemberRequestBody(format);\n const uri = `${format.locusUrl}/${CONTROLS}`;\n\n return {\n method: HTTP_VERBS.PUT,\n uri,\n body\n };\n};\n\n/**\n * @param {Object} format with {invitee {emailAddress, email, phoneNumber}, locusUrl, alertIfActive}\n * @returns {Object} the request parameters (method, uri, body) needed to make a addMember request\n */\nMembersUtil.getAddMemberRequestParams = (format) => {\n const body = MembersUtil.getAddMemberBody(format);\n const requestParams = {\n method: HTTP_VERBS.PUT,\n uri: format.locusUrl,\n body\n };\n\n return requestParams;\n};\n\nMembersUtil.isInvalidInvitee = (invitee) => {\n if (!(invitee && (invitee.email || invitee.emailAddress || invitee.phoneNumber))) {\n return true;\n }\n\n if (invitee.phoneNumber) {\n return !DIALER_REGEX.E164_FORMAT.test(invitee.phoneNumber);\n }\n\n return !VALID_EMAIL_ADDRESS.test(invitee.email || invitee.emailAddress);\n};\n\nMembersUtil.getRemoveMemberRequestParams = (options) => {\n const body = {\n reason: options.reason\n };\n const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${LEAVE}`;\n\n return {\n method: HTTP_VERBS.PUT,\n uri,\n body\n };\n};\n\nMembersUtil.generateTransferHostMemberOptions = (transfer, moderator, locusUrl) => ({\n moderator,\n locusUrl,\n memberId: transfer\n});\n\nMembersUtil.generateRemoveMemberOptions = (removal, locusUrl) => ({\n reason: _FORCED_,\n memberId: removal,\n locusUrl\n});\n\nMembersUtil.generateMuteMemberOptions = (mute, status, locusUrl) => ({\n memberId: mute,\n muted: status,\n locusUrl\n});\n\nMembersUtil.getMuteMemberRequestParams = (options) => {\n const body = {\n audio: {\n muted: options.muted\n }\n };\n const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${CONTROLS}`;\n\n return {\n method: HTTP_VERBS.PATCH,\n uri,\n body\n };\n};\n\nMembersUtil.getTransferHostToMemberRequestParams = (options) => {\n const body = {\n role: {\n moderator: options.moderator\n }\n };\n const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${CONTROLS}`;\n\n return {\n method: HTTP_VERBS.PATCH,\n uri,\n body\n };\n};\n\nexport default MembersUtil;\n"]}
1
+ {"version":3,"sources":["util.js"],"names":["MembersUtil","generateAddMemberOptions","invitee","locusUrl","alertIfActive","generateAdmitMemberOptions","memberIds","getAddMemberBody","options","invitees","address","emailAddress","email","phoneNumber","getAdmitMemberRequestBody","admit","participantIds","getAdmitMemberRequestParams","format","body","uri","CONTROLS","method","HTTP_VERBS","PUT","getAddMemberRequestParams","requestParams","isInvalidInvitee","DIALER_REGEX","E164_FORMAT","test","VALID_EMAIL_ADDRESS","getRemoveMemberRequestParams","reason","PARTICIPANT","memberId","LEAVE","generateTransferHostMemberOptions","transfer","moderator","generateRemoveMemberOptions","removal","_FORCED_","generateMuteMemberOptions","mute","status","muted","getMuteMemberRequestParams","audio","PATCH","getTransferHostToMemberRequestParams","role","genderateSendDTMFOptions","url","tones","generateSendDTMFRequestParams","device","dtmf","correlationId","uuid","v4","direction","SEND_DTMF_ENDPOINT","POST","cancelPhoneInviteOptions","generateCancelInviteRequestParams","actionType","_REMOVE_"],"mappings":";;;;;;;;;;;;AAAA;;AAEA;;AAYA,IAAMA,WAAW,GAAG,EAApB;AAEA;AACA;AACA;AACA;AACA;AACA;;AACAA,WAAW,CAACC,wBAAZ,GAAuC,UAACC,OAAD,EAAUC,QAAV,EAAoBC,aAApB;AAAA,SAAuC;AAC5EF,IAAAA,OAAO,EAAPA,OAD4E;AAE5EC,IAAAA,QAAQ,EAARA,QAF4E;AAG5EC,IAAAA,aAAa,EAAbA;AAH4E,GAAvC;AAAA,CAAvC;AAMA;AACA;AACA;AACA;AACA;;;AACAJ,WAAW,CAACK,0BAAZ,GAAyC,UAACC,SAAD,EAAYH,QAAZ;AAAA,SAA0B;AACjEA,IAAAA,QAAQ,EAARA,QADiE;AAEjEG,IAAAA,SAAS,EAATA;AAFiE,GAA1B;AAAA,CAAzC;AAKA;AACA;AACA;AACA;;;AACAN,WAAW,CAACO,gBAAZ,GAA+B,UAACC,OAAD;AAAA,SAAc;AAC3CC,IAAAA,QAAQ,EAAE,CACR;AACEC,MAAAA,OAAO,EAAEF,OAAO,CAACN,OAAR,CAAgBS,YAAhB,IAAgCH,OAAO,CAACN,OAAR,CAAgBU,KAAhD,IAAyDJ,OAAO,CAACN,OAAR,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ICIPANT,\n VALID_EMAIL_ADDRESS,\n DIALER_REGEX,\n SEND_DTMF_ENDPOINT,\n _REMOVE_\n} from '../constants';\n\nconst MembersUtil = {};\n\n/**\n * @param {Object} invitee with emailAddress, email or phoneNumber\n * @param {String} locusUrl\n * @param {Boolean} alertIfActive\n * @returns {Object} the format object\n */\nMembersUtil.generateAddMemberOptions = (invitee, locusUrl, alertIfActive) => ({\n invitee,\n locusUrl,\n alertIfActive\n});\n\n/**\n * @param {Array} memberIds\n * @param {String} locusUrl\n * @returns {Object} the format object\n */\nMembersUtil.generateAdmitMemberOptions = (memberIds, locusUrl) => ({\n locusUrl,\n memberIds\n});\n\n/**\n * @param {Object} options with {invitee: {emailAddress, email, phoneNumber}, alertIfActive}\n * @returns {Object} with {invitees: [{address}], alertIfActive}\n */\nMembersUtil.getAddMemberBody = (options) => ({\n invitees: [\n {\n address: options.invitee.emailAddress || options.invitee.email || options.invitee.phoneNumber\n }\n ],\n alertIfActive: options.alertIfActive\n});\n\n/**\n * @param {Object} options with {memberIds}\n * @returns {Object} admit with {memberIds}\n */\nMembersUtil.getAdmitMemberRequestBody = (options) => ({\n admit: {participantIds: options.memberIds}\n});\n\n/**\n * @param {Object} format with {memberIds, locusUrl}\n * @returns {Object} the request parameters (method, uri, body) needed to make a admitMember request\n */\nMembersUtil.getAdmitMemberRequestParams = (format) => {\n const body = MembersUtil.getAdmitMemberRequestBody(format);\n const uri = `${format.locusUrl}/${CONTROLS}`;\n\n return {\n method: HTTP_VERBS.PUT,\n uri,\n body\n };\n};\n\n/**\n * @param {Object} format with {invitee {emailAddress, email, phoneNumber}, locusUrl, alertIfActive}\n * @returns {Object} the request parameters (method, uri, body) needed to make a addMember request\n */\nMembersUtil.getAddMemberRequestParams = (format) => {\n const body = MembersUtil.getAddMemberBody(format);\n const requestParams = {\n method: HTTP_VERBS.PUT,\n uri: format.locusUrl,\n body\n };\n\n return requestParams;\n};\n\nMembersUtil.isInvalidInvitee = (invitee) => {\n if (!(invitee && (invitee.email || invitee.emailAddress || invitee.phoneNumber))) {\n return true;\n }\n\n if (invitee.phoneNumber) {\n return !DIALER_REGEX.E164_FORMAT.test(invitee.phoneNumber);\n }\n\n return !VALID_EMAIL_ADDRESS.test(invitee.email || invitee.emailAddress);\n};\n\nMembersUtil.getRemoveMemberRequestParams = (options) => {\n const body = {\n reason: options.reason\n };\n const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${LEAVE}`;\n\n return {\n method: HTTP_VERBS.PUT,\n uri,\n body\n };\n};\n\nMembersUtil.generateTransferHostMemberOptions = (transfer, moderator, locusUrl) => ({\n moderator,\n locusUrl,\n memberId: transfer\n});\n\nMembersUtil.generateRemoveMemberOptions = (removal, locusUrl) => ({\n reason: _FORCED_,\n memberId: removal,\n locusUrl\n});\n\nMembersUtil.generateMuteMemberOptions = (mute, status, locusUrl) => ({\n memberId: mute,\n muted: status,\n locusUrl\n});\n\nMembersUtil.getMuteMemberRequestParams = (options) => {\n const body = {\n audio: {\n muted: options.muted\n }\n };\n const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${CONTROLS}`;\n\n return {\n method: HTTP_VERBS.PATCH,\n uri,\n body\n };\n};\n\nMembersUtil.getTransferHostToMemberRequestParams = (options) => {\n const body = {\n role: {\n moderator: options.moderator\n }\n };\n const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${CONTROLS}`;\n\n return {\n method: HTTP_VERBS.PATCH,\n uri,\n body\n };\n};\n\nMembersUtil.genderateSendDTMFOptions = (url, tones, memberId, locusUrl) => ({\n url,\n tones,\n memberId,\n locusUrl\n});\n\nMembersUtil.generateSendDTMFRequestParams = ({\n url, tones, memberId, locusUrl\n}) => {\n const body = {\n device: {\n url\n },\n memberId,\n dtmf: {\n correlationId: uuid.v4(),\n tones,\n direction: 'transmit'\n }\n };\n const uri = `${locusUrl}/${PARTICIPANT}/${memberId}/${SEND_DTMF_ENDPOINT}`;\n\n return {\n method: HTTP_VERBS.POST,\n uri,\n body\n };\n};\n\nMembersUtil.cancelPhoneInviteOptions = (invitee, locusUrl) => ({\n invitee,\n locusUrl\n});\n\nMembersUtil.generateCancelInviteRequestParams = (options) => {\n const body = {\n actionType: _REMOVE_,\n invitees: [\n {\n address: options.invitee.phoneNumber\n }\n ]\n };\n const requestParams = {\n method: HTTP_VERBS.PUT,\n uri: options.locusUrl,\n body\n };\n\n return requestParams;\n};\n\nexport default MembersUtil;\n"]}
@@ -226,7 +226,6 @@ var Metrics = /*#__PURE__*/function () {
226
226
  eventId: _uuid.default.v4(),
227
227
  version: 1,
228
228
  origin: {
229
- buildType: 'prod',
230
229
  name: 'endpoint',
231
230
  networkType: 'unknown',
232
231
  userAgent: this.userAgentToString(),
@@ -331,7 +330,6 @@ var Metrics = /*#__PURE__*/function () {
331
330
  origin: {
332
331
  audioSetupDelay: audioSetupDelay,
333
332
  videoSetupDelay: videoSetupDelay,
334
- buildType: 'prod',
335
333
  name: 'endpoint',
336
334
  networkType: options.networkType || _config2.UNKNOWN,
337
335
  userAgent: this.userAgentToString(),