@webex/plugin-meetings 3.0.0-beta.72 → 3.0.0-beta.74
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.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +11 -2
- package/dist/constants.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +5 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +3 -1
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +6 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +23 -5
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +9 -4
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/members/index.js +23 -0
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +19 -0
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +33 -0
- package/dist/members/util.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +12 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/reconnection-manager/index.js +2 -4
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/types/constants.d.ts +7 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
- package/dist/types/members/index.d.ts +10 -0
- package/dist/types/members/request.d.ts +11 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +6 -0
- package/package.json +18 -18
- package/src/constants.ts +8 -0
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +4 -0
- package/src/meeting/util.ts +5 -0
- package/src/meeting-info/meeting-info-v2.ts +23 -1
- package/src/meeting-info/utilv2.ts +2 -4
- package/src/members/index.ts +35 -0
- package/src/members/request.ts +20 -0
- package/src/members/util.ts +38 -0
- package/src/multistream/mediaRequestManager.ts +10 -1
- package/src/reconnection-manager/index.ts +6 -3
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -2
- package/test/unit/spec/meeting/index.js +11 -2
- package/test/unit/spec/meeting/utils.js +41 -9
- package/test/unit/spec/meeting-info/meetinginfov2.js +40 -1
- package/test/unit/spec/members/index.js +123 -15
- package/test/unit/spec/members/request.js +27 -1
- package/test/unit/spec/members/utils.js +54 -10
- package/test/unit/spec/multistream/mediaRequestManager.ts +36 -11
- package/test/unit/spec/reconnection-manager/index.js +8 -4
package/dist/meeting/util.js
CHANGED
|
@@ -480,6 +480,12 @@ MeetingUtil.canSendReactions = function (originalValue, displayHints) {
|
|
|
480
480
|
}
|
|
481
481
|
return originalValue;
|
|
482
482
|
};
|
|
483
|
+
MeetingUtil.canUserRenameSelfAndObserved = function (displayHints) {
|
|
484
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAN_RENAME_SELF_AND_OBSERVED);
|
|
485
|
+
};
|
|
486
|
+
MeetingUtil.canUserRenameOthers = function (displayHints) {
|
|
487
|
+
return displayHints.includes(_constants.DISPLAY_HINTS.CAN_RENAME_OTHERS);
|
|
488
|
+
};
|
|
483
489
|
var _default = MeetingUtil;
|
|
484
490
|
exports.default = _default;
|
|
485
491
|
//# sourceMappingURL=util.js.map
|
package/dist/meeting/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingUtil","parseLocusJoin","response","parsed","locus","body","mediaConnections","locusUrl","url","locusId","split","pop","selfId","self","id","forEach","mediaConnection","mediaId","remoteUpdateAudioVideo","audioMuted","videoMuted","meeting","reject","ParameterError","localMedias","Media","generateLocalMedias","Metrics","postEvent","event","eventType","MEDIA_REQUEST","meetingRequest","remoteAudioVideoToggle","deviceUrl","correlationId","preferTranscoding","isMultistream","then","MEDIA_RESPONSE","hasOwner","info","owner","isOwnerSelf","isPinOrGuest","err","errorCode","INTENT_TO_JOIN","includes","joinMeeting","options","LOCUS_JOIN_REQUEST","inviteeAddress","meetingJoinUrl","sipUri","meetingNumber","roapMessage","permissionToken","resourceId","moderator","pin","moveToResource","asResourceOccupant","breakoutsSupported","res","LOCUS_JOIN_RESPONSE","data","trigger","LOCI_UPDATE","trackingId","headers","trackingid","cleanUp","breakouts","stopStatsAnalyzer","statsAnalyzer","stopAnalyzer","resolve","closeLocalStream","closeLocalShare","closeRemoteTracks","closePeerConnections","unsetLocalVideoTrack","unsetLocalShareTrack","unsetRemoteTracks","unsetPeerConnections","reconnectionManager","stopKeepAlive","updateLLMConnection","disconnectPhoneAudio","phoneUrl","meetingState","FULL_STATE","INACTIVE","MeetingNotActiveError","locusInfo","onFullLocus","catch","LoggerProxy","logger","error","leaveMeeting","isUserInLeftState","UserNotJoinedError","defaultOptions","leaveOptions","moveMeeting","declineMeeting","reason","parsedLocus","state","_LEFT_","isUserInIdleState","_IDLE_","isUserInJoinedState","_JOINED_","isMediaEstablished","currentMediaStatus","audio","video","share","joinMeetingOptions","requiredCaptcha","CaptchaError","passwordStatus","PASSWORD_STATUS","REQUIRED","PasswordError","PIN_COLLECTED","setLocus","PIN_PROMPT","IntentToJoinError","JoinMeetingError","validateOptions","sendVideo","sendAudio","sendShare","localStream","localShare","getTrack","videoTrack","audioTrack","stream","audioTracks","videoTracks","getAudioTracks","getVideoTracks","length","getModeratorFromLocusInfo","getPolicyFromLocusInfo","policy","getUserDisplayHintsFromLocusInfo","userDisplayHints","canInviteNewParticipants","displayHints","DISPLAY_HINTS","ADD_GUEST","canAdmitParticipant","ROSTER_WAITING_TO_JOIN","canUserLock","LOCK_CONTROL_LOCK","LOCK_STATUS_UNLOCKED","canUserUnlock","LOCK_CONTROL_UNLOCK","LOCK_STATUS_LOCKED","canUserRaiseHand","RAISE_HAND","canUserLowerAllHands","LOWER_ALL_HANDS","canUserLowerSomeoneElsesHand","LOWER_SOMEONE_ELSES_HAND","bothLeaveAndEndMeetingAvailable","LEAVE_TRANSFER_HOST_END_MEETING","LEAVE_END_MEETING","canManageBreakout","BREAKOUT_MANAGEMENT","isSuppressBreakoutSupport","UCF_SUPPRESS_BREAKOUTS_SUPPORT","canAdmitLobbyToBreakout","DISABLE_LOBBY_TO_BREAKOUT","isBreakoutPreassignmentsEnabled","DISABLE_BREAKOUT_PREASSIGNMENTS","canUserAskForHelp","DISABLE_ASK_FOR_HELP","lockMeeting","actions","request","canLock","lock","PermissionError","unlockMeeting","canUnlock","handleAudioLogging","LOG_HEADER","settings","underlyingTrack","getSettings","deviceId","log","handleVideoLogging","handleDeviceLogging","devices","device","endMeetingForAll","endOptions","canEnableClosedCaption","CAPTION_START","isSaveTranscriptsEnabled","SAVE_TRANSCRIPTS_ENABLED","canStartTranscribing","TRANSCRIPTION_CONTROL_START","canStopTranscribing","TRANSCRIPTION_CONTROL_STOP","isClosedCaptionActive","CAPTION_STATUS_ACTIVE","isWebexAssistantActive","WEBEX_ASSISTANT_STATUS_ACTIVE","canViewCaptionPanel","ENABLE_CAPTION_PANEL","isRealTimeTranslationEnabled","DISPLAY_REAL_TIME_TRANSLATION","canSelectSpokenLanguages","DISPLAY_NON_ENGLISH_ASR","waitingForOthersToJoin","WAITING_FOR_OTHERS","canEnableReactions","originalValue","ENABLE_REACTIONS","DISABLE_REACTIONS","canSendReactions","REACTIONS_ACTIVE","REACTIONS_INACTIVE"],"sources":["util.ts"],"sourcesContent":["import {isEmpty} from 'lodash';\nimport {LocalCameraTrack, LocalMicrophoneTrack} from '@webex/internal-media-core';\n\nimport {MeetingNotActiveError, UserNotJoinedError} from '../common/errors/webex-errors';\nimport Metrics from '../metrics';\nimport {eventType, trigger} from '../metrics/config';\nimport Media from '../media';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n INTENT_TO_JOIN,\n _LEFT_,\n _IDLE_,\n _JOINED_,\n PASSWORD_STATUS,\n DISPLAY_HINTS,\n FULL_STATE,\n} from '../constants';\nimport IntentToJoinError from '../common/errors/intent-to-join';\nimport JoinMeetingError from '../common/errors/join-meeting';\nimport ParameterError from '../common/errors/parameter';\nimport PermissionError from '../common/errors/permission';\nimport PasswordError from '../common/errors/password-error';\nimport CaptchaError from '../common/errors/captcha-error';\n\nconst MeetingUtil: any = {};\n\nMeetingUtil.parseLocusJoin = (response) => {\n const parsed: any = {};\n\n // First todo: add check for existance\n parsed.locus = response.body.locus;\n parsed.mediaConnections = response.body.mediaConnections;\n parsed.locusUrl = parsed.locus.url;\n parsed.locusId = parsed.locus.url.split('/').pop();\n parsed.selfId = parsed.locus.self.id;\n\n // we need mediaId before making roap calls\n parsed.mediaConnections.forEach((mediaConnection) => {\n if (mediaConnection.mediaId) {\n parsed.mediaId = mediaConnection.mediaId;\n }\n });\n\n return parsed;\n};\n\nMeetingUtil.remoteUpdateAudioVideo = (audioMuted, videoMuted, meeting) => {\n if (!meeting) {\n return Promise.reject(new ParameterError('You need a meeting object.'));\n }\n const localMedias = Media.generateLocalMedias(meeting.mediaId, audioMuted, videoMuted);\n\n if (isEmpty(localMedias)) {\n return Promise.reject(\n new ParameterError('You need a media id on the meeting to change remote audio.')\n );\n }\n\n Metrics.postEvent({event: eventType.MEDIA_REQUEST, meeting});\n\n return meeting.meetingRequest\n .remoteAudioVideoToggle({\n locusUrl: meeting.locusUrl,\n selfId: meeting.selfId,\n localMedias,\n deviceUrl: meeting.deviceUrl,\n correlationId: meeting.correlationId,\n preferTranscoding: !meeting.isMultistream,\n })\n .then((response) => {\n Metrics.postEvent({event: eventType.MEDIA_RESPONSE, meeting});\n\n return response.body.locus;\n });\n};\n\nMeetingUtil.hasOwner = (info) => info && info.owner;\n\nMeetingUtil.isOwnerSelf = (owner, selfId) => owner === selfId;\n\nMeetingUtil.isPinOrGuest = (err) =>\n err?.body?.errorCode && INTENT_TO_JOIN.includes(err.body.errorCode);\n\nMeetingUtil.joinMeeting = (meeting, options) => {\n if (!meeting) {\n return Promise.reject(new ParameterError('You need a meeting object.'));\n }\n\n Metrics.postEvent({event: eventType.LOCUS_JOIN_REQUEST, meeting});\n\n // eslint-disable-next-line no-warning-comments\n // TODO: check if the meeting is in JOINING state\n // if Joining state termintate the request as user might click multiple times\n return meeting.meetingRequest\n .joinMeeting({\n inviteeAddress: meeting.meetingJoinUrl || meeting.sipUri,\n meetingNumber: meeting.meetingNumber,\n deviceUrl: meeting.deviceUrl,\n locusUrl: meeting.locusUrl,\n correlationId: meeting.correlationId,\n roapMessage: options.roapMessage,\n permissionToken: meeting.permissionToken,\n resourceId: options.resourceId || null,\n moderator: options.moderator,\n pin: options.pin,\n moveToResource: options.moveToResource,\n preferTranscoding: !meeting.isMultistream,\n asResourceOccupant: options.asResourceOccupant,\n breakoutsSupported: options.breakoutsSupported,\n })\n .then((res) => {\n Metrics.postEvent({\n event: eventType.LOCUS_JOIN_RESPONSE,\n meeting,\n data: {\n trigger: trigger.LOCI_UPDATE,\n locus: res.body.locus,\n mediaConnections: res.body.mediaConnections,\n trackingId: res.headers.trackingid,\n },\n });\n\n return MeetingUtil.parseLocusJoin(res);\n });\n};\n\nMeetingUtil.cleanUp = (meeting) => {\n meeting.breakouts.cleanUp();\n\n // make sure we send last metrics before we close the peerconnection\n const stopStatsAnalyzer = meeting.statsAnalyzer\n ? meeting.statsAnalyzer.stopAnalyzer()\n : Promise.resolve();\n\n return stopStatsAnalyzer\n .then(() => meeting.closeLocalStream())\n .then(() => meeting.closeLocalShare())\n .then(() => meeting.closeRemoteTracks())\n .then(() => meeting.closePeerConnections())\n .then(() => {\n meeting.unsetLocalVideoTrack();\n meeting.unsetLocalShareTrack();\n meeting.unsetRemoteTracks();\n meeting.unsetPeerConnections();\n meeting.reconnectionManager.cleanUp();\n })\n .then(() => meeting.stopKeepAlive())\n .then(() => meeting.updateLLMConnection());\n};\n\nMeetingUtil.disconnectPhoneAudio = (meeting, phoneUrl) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n return Promise.reject(new MeetingNotActiveError());\n }\n\n const options = {\n locusUrl: meeting.locusUrl,\n selfId: meeting.selfId,\n correlationId: meeting.correlationId,\n phoneUrl,\n };\n\n return meeting.meetingRequest\n .disconnectPhoneAudio(options)\n .then((response) => {\n if (response?.body?.locus) {\n meeting.locusInfo.onFullLocus(response.body.locus);\n }\n })\n .catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n};\n\n// by default will leave on meeting's resourceId\n// if you explicity want it not to leave on resource id, pass\n// {resourceId: null}\n// TODO: chris, you can modify this however you want\nMeetingUtil.leaveMeeting = (meeting, options: any = {}) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n // TODO: clean up if the meeting is already inactive\n return Promise.reject(new MeetingNotActiveError());\n }\n\n if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {\n return Promise.reject(new UserNotJoinedError());\n }\n\n const defaultOptions = {\n locusUrl: meeting.locusUrl,\n selfId: meeting.selfId,\n correlationId: meeting.correlationId,\n resourceId: meeting.resourceId,\n deviceUrl: meeting.deviceUrl,\n };\n\n const leaveOptions = {...defaultOptions, ...options};\n\n return meeting.meetingRequest\n .leaveMeeting(leaveOptions)\n .then((response) => {\n if (response && response.body && response.body.locus) {\n // && !options.moveMeeting) {\n meeting.locusInfo.onFullLocus(response.body.locus);\n }\n\n return Promise.resolve();\n })\n .then(() => {\n if (options.moveMeeting) {\n return Promise.resolve();\n }\n\n return MeetingUtil.cleanUp(meeting);\n })\n .catch((err) => {\n // TODO: If the meeting state comes as LEFT or INACTIVE as response then\n // 1) on leave clean up the meeting or simply do a sync on the meeting\n // 2) If the error says meeting is inactive then destroy the meeting object\n LoggerProxy.logger.error(\n `Meeting:util#leaveMeeting --> An error occured while trying to leave meeting with an id of ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n};\nMeetingUtil.declineMeeting = (meeting, reason) =>\n meeting.meetingRequest.declineMeeting({\n locusUrl: meeting.locusUrl,\n deviceUrl: meeting.deviceUrl,\n reason,\n });\n\nMeetingUtil.isUserInLeftState = (locusInfo) => locusInfo.parsedLocus?.self?.state === _LEFT_;\n\nMeetingUtil.isUserInIdleState = (locusInfo) => locusInfo.parsedLocus?.self?.state === _IDLE_;\n\nMeetingUtil.isUserInJoinedState = (locusInfo) => locusInfo.parsedLocus?.self?.state === _JOINED_;\n\nMeetingUtil.isMediaEstablished = (currentMediaStatus) =>\n currentMediaStatus &&\n (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share);\n\nMeetingUtil.joinMeetingOptions = (meeting, options: any = {}) => {\n meeting.resourceId = meeting.resourceId || options.resourceId;\n\n if (meeting.requiredCaptcha) {\n return Promise.reject(new CaptchaError());\n }\n if (meeting.passwordStatus === PASSWORD_STATUS.REQUIRED) {\n return Promise.reject(new PasswordError());\n }\n\n if (options.pin) {\n Metrics.postEvent({\n event: eventType.PIN_COLLECTED,\n meeting,\n });\n }\n\n // normal join meeting, scenario A, D\n return MeetingUtil.joinMeeting(meeting, options)\n .then((response) => {\n meeting.setLocus(response);\n\n return Promise.resolve(response);\n })\n .catch((err) => {\n // joining a claimed PMR that is not my own, scenario B\n if (MeetingUtil.isPinOrGuest(err)) {\n Metrics.postEvent({\n event: eventType.PIN_PROMPT,\n meeting,\n });\n\n // request host pin or non host for unclaimed PMR, start of Scenario C\n // see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature\n return Promise.reject(new IntentToJoinError('Error Joining Meeting', err));\n }\n LoggerProxy.logger.error('Meeting:util#joinMeetingOptions --> Error joining the call, ', err);\n\n return Promise.reject(new JoinMeetingError(options, 'Error Joining Meeting', err));\n });\n};\n\nMeetingUtil.validateOptions = (options) => {\n const {sendVideo, sendAudio, sendShare, localStream, localShare} = options;\n\n if (sendVideo && !MeetingUtil.getTrack(localStream).videoTrack) {\n return Promise.reject(new ParameterError('please pass valid video streams'));\n }\n\n if (sendAudio && !MeetingUtil.getTrack(localStream).audioTrack) {\n return Promise.reject(new ParameterError('please pass valid audio streams'));\n }\n\n if (sendShare && !MeetingUtil.getTrack(localShare).videoTrack) {\n return Promise.reject(new ParameterError('please pass valid share streams'));\n }\n\n return Promise.resolve();\n};\n\nMeetingUtil.getTrack = (stream) => {\n let audioTrack = null;\n let videoTrack = null;\n let audioTracks = null;\n let videoTracks = null;\n\n if (!stream) {\n return {audioTrack: null, videoTrack: null};\n }\n if (stream.getAudioTracks) {\n audioTracks = stream.getAudioTracks();\n }\n if (stream.getVideoTracks) {\n videoTracks = stream.getVideoTracks();\n }\n\n if (audioTracks && audioTracks.length > 0) {\n [audioTrack] = audioTracks;\n }\n\n if (videoTracks && videoTracks.length > 0) {\n [videoTrack] = videoTracks;\n }\n\n return {audioTrack, videoTrack};\n};\n\nMeetingUtil.getModeratorFromLocusInfo = (locusInfo) =>\n locusInfo &&\n locusInfo.parsedLocus &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info.moderator;\n\nMeetingUtil.getPolicyFromLocusInfo = (locusInfo) =>\n locusInfo &&\n locusInfo.parsedLocus &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info.policy;\n\nMeetingUtil.getUserDisplayHintsFromLocusInfo = (locusInfo) =>\n locusInfo?.parsedLocus?.info?.userDisplayHints || [];\n\nMeetingUtil.canInviteNewParticipants = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.ADD_GUEST);\n\nMeetingUtil.canAdmitParticipant = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN);\n\nMeetingUtil.canUserLock = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOCK_CONTROL_LOCK) &&\n displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_UNLOCKED);\n\nMeetingUtil.canUserUnlock = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) &&\n displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_LOCKED);\n\nMeetingUtil.canUserRaiseHand = (displayHints) => displayHints.includes(DISPLAY_HINTS.RAISE_HAND);\n\nMeetingUtil.canUserLowerAllHands = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOWER_ALL_HANDS);\n\nMeetingUtil.canUserLowerSomeoneElsesHand = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND);\n\nMeetingUtil.bothLeaveAndEndMeetingAvailable = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LEAVE_TRANSFER_HOST_END_MEETING) ||\n displayHints.includes(DISPLAY_HINTS.LEAVE_END_MEETING);\n\nMeetingUtil.canManageBreakout = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.BREAKOUT_MANAGEMENT);\n\nMeetingUtil.isSuppressBreakoutSupport = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.UCF_SUPPRESS_BREAKOUTS_SUPPORT);\n\nMeetingUtil.canAdmitLobbyToBreakout = (displayHints) =>\n !displayHints.includes(DISPLAY_HINTS.DISABLE_LOBBY_TO_BREAKOUT);\n\nMeetingUtil.isBreakoutPreassignmentsEnabled = (displayHints) =>\n !displayHints.includes(DISPLAY_HINTS.DISABLE_BREAKOUT_PREASSIGNMENTS);\n\nMeetingUtil.canUserAskForHelp = (displayHints) =>\n !displayHints.includes(DISPLAY_HINTS.DISABLE_ASK_FOR_HELP);\n\nMeetingUtil.lockMeeting = (actions, request, locusUrl) => {\n if (actions && actions.canLock) {\n return request.lockMeeting({locusUrl, lock: true});\n }\n\n return Promise.reject(new PermissionError('Lock not allowed, due to joined property.'));\n};\n\nMeetingUtil.unlockMeeting = (actions, request, locusUrl) => {\n if (actions && actions.canUnlock) {\n return request.lockMeeting({locusUrl, lock: false});\n }\n\n return Promise.reject(new PermissionError('Unlock not allowed, due to joined property.'));\n};\n\nMeetingUtil.handleAudioLogging = (audioTrack: LocalMicrophoneTrack | null) => {\n const LOG_HEADER = 'MeetingUtil#handleAudioLogging -->';\n\n if (audioTrack) {\n const settings = audioTrack.underlyingTrack.getSettings();\n const {deviceId} = settings;\n\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings =', JSON.stringify(settings));\n }\n};\n\nMeetingUtil.handleVideoLogging = (videoTrack: LocalCameraTrack | null) => {\n const LOG_HEADER = 'MeetingUtil#handleVideoLogging -->';\n\n if (videoTrack) {\n const settings = videoTrack.underlyingTrack.getSettings();\n const {deviceId} = settings;\n\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings =', JSON.stringify(settings));\n }\n};\n\nMeetingUtil.handleDeviceLogging = (devices = []) => {\n const LOG_HEADER = 'MeetingUtil#handleDeviceLogging -->';\n\n devices.forEach((device) => {\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${device.deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings', JSON.stringify(device));\n });\n};\n\nMeetingUtil.endMeetingForAll = (meeting) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n return Promise.reject(new MeetingNotActiveError());\n }\n\n const endOptions = {\n locusUrl: meeting.locusUrl,\n };\n\n return meeting.meetingRequest\n .endMeetingForAll(endOptions)\n .then((response) => {\n if (response && response.body && response.body.locus) {\n meeting.locusInfo.onFullLocus(response.body.locus);\n }\n\n return Promise.resolve();\n })\n .then(() => MeetingUtil.cleanUp(meeting))\n .catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:util#endMeetingForAll An error occured while trying to end meeting for all with an id of ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n};\n\nMeetingUtil.canEnableClosedCaption = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.CAPTION_START);\n\nMeetingUtil.isSaveTranscriptsEnabled = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.SAVE_TRANSCRIPTS_ENABLED);\n\nMeetingUtil.canStartTranscribing = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_START);\n\nMeetingUtil.canStopTranscribing = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP);\n\nMeetingUtil.isClosedCaptionActive = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.CAPTION_STATUS_ACTIVE);\n\nMeetingUtil.isWebexAssistantActive = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.WEBEX_ASSISTANT_STATUS_ACTIVE);\n\nMeetingUtil.canViewCaptionPanel = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.ENABLE_CAPTION_PANEL);\n\nMeetingUtil.isRealTimeTranslationEnabled = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.DISPLAY_REAL_TIME_TRANSLATION);\n\nMeetingUtil.canSelectSpokenLanguages = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.DISPLAY_NON_ENGLISH_ASR);\n\nMeetingUtil.waitingForOthersToJoin = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.WAITING_FOR_OTHERS);\n\nMeetingUtil.canEnableReactions = (originalValue, displayHints) => {\n if (displayHints.includes(DISPLAY_HINTS.ENABLE_REACTIONS)) {\n return true;\n }\n if (displayHints.includes(DISPLAY_HINTS.DISABLE_REACTIONS)) {\n return false;\n }\n\n return originalValue;\n};\n\nMeetingUtil.canSendReactions = (originalValue, displayHints) => {\n if (displayHints.includes(DISPLAY_HINTS.REACTIONS_ACTIVE)) {\n return true;\n }\n if (displayHints.includes(DISPLAY_HINTS.REACTIONS_INACTIVE)) {\n return false;\n }\n\n return originalValue;\n};\n\nexport default MeetingUtil;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AAA0D;AAAA;AAE1D,IAAMA,WAAgB,GAAG,CAAC,CAAC;AAE3BA,WAAW,CAACC,cAAc,GAAG,UAACC,QAAQ,EAAK;EACzC,IAAMC,MAAW,GAAG,CAAC,CAAC;;EAEtB;EACAA,MAAM,CAACC,KAAK,GAAGF,QAAQ,CAACG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AkB,CAAC;AAAA;AAEzDhO,WAAW,CAACiO,kBAAkB,GAAG,UAACC,aAAa,EAAExE,YAAY,EAAK;EAChE,IAAIA,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAACwE,gBAAgB,CAAC,EAAE;IACzD,OAAO,IAAI;EACb;EACA,IAAIzE,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAACyE,iBAAiB,CAAC,EAAE;IAC1D,OAAO,KAAK;EACd;EAEA,OAAOF,aAAa;AACtB,CAAC;AAEDlO,WAAW,CAACqO,gBAAgB,GAAG,UAACH,aAAa,EAAExE,YAAY,EAAK;EAC9D,IAAIA,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAAC2E,gBAAgB,CAAC,EAAE;IACzD,OAAO,IAAI;EACb;EACA,IAAI5E,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAAC4E,kBAAkB,CAAC,EAAE;IAC3D,OAAO,KAAK;EACd;EAEA,OAAOL,aAAa;AACtB,CAAC;AAAC,eAEalO,WAAW;AAAA"}
|
|
1
|
+
{"version":3,"names":["MeetingUtil","parseLocusJoin","response","parsed","locus","body","mediaConnections","locusUrl","url","locusId","split","pop","selfId","self","id","forEach","mediaConnection","mediaId","remoteUpdateAudioVideo","audioMuted","videoMuted","meeting","reject","ParameterError","localMedias","Media","generateLocalMedias","Metrics","postEvent","event","eventType","MEDIA_REQUEST","meetingRequest","remoteAudioVideoToggle","deviceUrl","correlationId","preferTranscoding","isMultistream","then","MEDIA_RESPONSE","hasOwner","info","owner","isOwnerSelf","isPinOrGuest","err","errorCode","INTENT_TO_JOIN","includes","joinMeeting","options","LOCUS_JOIN_REQUEST","inviteeAddress","meetingJoinUrl","sipUri","meetingNumber","roapMessage","permissionToken","resourceId","moderator","pin","moveToResource","asResourceOccupant","breakoutsSupported","res","LOCUS_JOIN_RESPONSE","data","trigger","LOCI_UPDATE","trackingId","headers","trackingid","cleanUp","breakouts","stopStatsAnalyzer","statsAnalyzer","stopAnalyzer","resolve","closeLocalStream","closeLocalShare","closeRemoteTracks","closePeerConnections","unsetLocalVideoTrack","unsetLocalShareTrack","unsetRemoteTracks","unsetPeerConnections","reconnectionManager","stopKeepAlive","updateLLMConnection","disconnectPhoneAudio","phoneUrl","meetingState","FULL_STATE","INACTIVE","MeetingNotActiveError","locusInfo","onFullLocus","catch","LoggerProxy","logger","error","leaveMeeting","isUserInLeftState","UserNotJoinedError","defaultOptions","leaveOptions","moveMeeting","declineMeeting","reason","parsedLocus","state","_LEFT_","isUserInIdleState","_IDLE_","isUserInJoinedState","_JOINED_","isMediaEstablished","currentMediaStatus","audio","video","share","joinMeetingOptions","requiredCaptcha","CaptchaError","passwordStatus","PASSWORD_STATUS","REQUIRED","PasswordError","PIN_COLLECTED","setLocus","PIN_PROMPT","IntentToJoinError","JoinMeetingError","validateOptions","sendVideo","sendAudio","sendShare","localStream","localShare","getTrack","videoTrack","audioTrack","stream","audioTracks","videoTracks","getAudioTracks","getVideoTracks","length","getModeratorFromLocusInfo","getPolicyFromLocusInfo","policy","getUserDisplayHintsFromLocusInfo","userDisplayHints","canInviteNewParticipants","displayHints","DISPLAY_HINTS","ADD_GUEST","canAdmitParticipant","ROSTER_WAITING_TO_JOIN","canUserLock","LOCK_CONTROL_LOCK","LOCK_STATUS_UNLOCKED","canUserUnlock","LOCK_CONTROL_UNLOCK","LOCK_STATUS_LOCKED","canUserRaiseHand","RAISE_HAND","canUserLowerAllHands","LOWER_ALL_HANDS","canUserLowerSomeoneElsesHand","LOWER_SOMEONE_ELSES_HAND","bothLeaveAndEndMeetingAvailable","LEAVE_TRANSFER_HOST_END_MEETING","LEAVE_END_MEETING","canManageBreakout","BREAKOUT_MANAGEMENT","isSuppressBreakoutSupport","UCF_SUPPRESS_BREAKOUTS_SUPPORT","canAdmitLobbyToBreakout","DISABLE_LOBBY_TO_BREAKOUT","isBreakoutPreassignmentsEnabled","DISABLE_BREAKOUT_PREASSIGNMENTS","canUserAskForHelp","DISABLE_ASK_FOR_HELP","lockMeeting","actions","request","canLock","lock","PermissionError","unlockMeeting","canUnlock","handleAudioLogging","LOG_HEADER","settings","underlyingTrack","getSettings","deviceId","log","handleVideoLogging","handleDeviceLogging","devices","device","endMeetingForAll","endOptions","canEnableClosedCaption","CAPTION_START","isSaveTranscriptsEnabled","SAVE_TRANSCRIPTS_ENABLED","canStartTranscribing","TRANSCRIPTION_CONTROL_START","canStopTranscribing","TRANSCRIPTION_CONTROL_STOP","isClosedCaptionActive","CAPTION_STATUS_ACTIVE","isWebexAssistantActive","WEBEX_ASSISTANT_STATUS_ACTIVE","canViewCaptionPanel","ENABLE_CAPTION_PANEL","isRealTimeTranslationEnabled","DISPLAY_REAL_TIME_TRANSLATION","canSelectSpokenLanguages","DISPLAY_NON_ENGLISH_ASR","waitingForOthersToJoin","WAITING_FOR_OTHERS","canEnableReactions","originalValue","ENABLE_REACTIONS","DISABLE_REACTIONS","canSendReactions","REACTIONS_ACTIVE","REACTIONS_INACTIVE","canUserRenameSelfAndObserved","CAN_RENAME_SELF_AND_OBSERVED","canUserRenameOthers","CAN_RENAME_OTHERS"],"sources":["util.ts"],"sourcesContent":["import {isEmpty} from 'lodash';\nimport {LocalCameraTrack, LocalMicrophoneTrack} from '@webex/internal-media-core';\n\nimport {MeetingNotActiveError, UserNotJoinedError} from '../common/errors/webex-errors';\nimport Metrics from '../metrics';\nimport {eventType, trigger} from '../metrics/config';\nimport Media from '../media';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n INTENT_TO_JOIN,\n _LEFT_,\n _IDLE_,\n _JOINED_,\n PASSWORD_STATUS,\n DISPLAY_HINTS,\n FULL_STATE,\n} from '../constants';\nimport IntentToJoinError from '../common/errors/intent-to-join';\nimport JoinMeetingError from '../common/errors/join-meeting';\nimport ParameterError from '../common/errors/parameter';\nimport PermissionError from '../common/errors/permission';\nimport PasswordError from '../common/errors/password-error';\nimport CaptchaError from '../common/errors/captcha-error';\n\nconst MeetingUtil: any = {};\n\nMeetingUtil.parseLocusJoin = (response) => {\n const parsed: any = {};\n\n // First todo: add check for existance\n parsed.locus = response.body.locus;\n parsed.mediaConnections = response.body.mediaConnections;\n parsed.locusUrl = parsed.locus.url;\n parsed.locusId = parsed.locus.url.split('/').pop();\n parsed.selfId = parsed.locus.self.id;\n\n // we need mediaId before making roap calls\n parsed.mediaConnections.forEach((mediaConnection) => {\n if (mediaConnection.mediaId) {\n parsed.mediaId = mediaConnection.mediaId;\n }\n });\n\n return parsed;\n};\n\nMeetingUtil.remoteUpdateAudioVideo = (audioMuted, videoMuted, meeting) => {\n if (!meeting) {\n return Promise.reject(new ParameterError('You need a meeting object.'));\n }\n const localMedias = Media.generateLocalMedias(meeting.mediaId, audioMuted, videoMuted);\n\n if (isEmpty(localMedias)) {\n return Promise.reject(\n new ParameterError('You need a media id on the meeting to change remote audio.')\n );\n }\n\n Metrics.postEvent({event: eventType.MEDIA_REQUEST, meeting});\n\n return meeting.meetingRequest\n .remoteAudioVideoToggle({\n locusUrl: meeting.locusUrl,\n selfId: meeting.selfId,\n localMedias,\n deviceUrl: meeting.deviceUrl,\n correlationId: meeting.correlationId,\n preferTranscoding: !meeting.isMultistream,\n })\n .then((response) => {\n Metrics.postEvent({event: eventType.MEDIA_RESPONSE, meeting});\n\n return response.body.locus;\n });\n};\n\nMeetingUtil.hasOwner = (info) => info && info.owner;\n\nMeetingUtil.isOwnerSelf = (owner, selfId) => owner === selfId;\n\nMeetingUtil.isPinOrGuest = (err) =>\n err?.body?.errorCode && INTENT_TO_JOIN.includes(err.body.errorCode);\n\nMeetingUtil.joinMeeting = (meeting, options) => {\n if (!meeting) {\n return Promise.reject(new ParameterError('You need a meeting object.'));\n }\n\n Metrics.postEvent({event: eventType.LOCUS_JOIN_REQUEST, meeting});\n\n // eslint-disable-next-line no-warning-comments\n // TODO: check if the meeting is in JOINING state\n // if Joining state termintate the request as user might click multiple times\n return meeting.meetingRequest\n .joinMeeting({\n inviteeAddress: meeting.meetingJoinUrl || meeting.sipUri,\n meetingNumber: meeting.meetingNumber,\n deviceUrl: meeting.deviceUrl,\n locusUrl: meeting.locusUrl,\n correlationId: meeting.correlationId,\n roapMessage: options.roapMessage,\n permissionToken: meeting.permissionToken,\n resourceId: options.resourceId || null,\n moderator: options.moderator,\n pin: options.pin,\n moveToResource: options.moveToResource,\n preferTranscoding: !meeting.isMultistream,\n asResourceOccupant: options.asResourceOccupant,\n breakoutsSupported: options.breakoutsSupported,\n })\n .then((res) => {\n Metrics.postEvent({\n event: eventType.LOCUS_JOIN_RESPONSE,\n meeting,\n data: {\n trigger: trigger.LOCI_UPDATE,\n locus: res.body.locus,\n mediaConnections: res.body.mediaConnections,\n trackingId: res.headers.trackingid,\n },\n });\n\n return MeetingUtil.parseLocusJoin(res);\n });\n};\n\nMeetingUtil.cleanUp = (meeting) => {\n meeting.breakouts.cleanUp();\n\n // make sure we send last metrics before we close the peerconnection\n const stopStatsAnalyzer = meeting.statsAnalyzer\n ? meeting.statsAnalyzer.stopAnalyzer()\n : Promise.resolve();\n\n return stopStatsAnalyzer\n .then(() => meeting.closeLocalStream())\n .then(() => meeting.closeLocalShare())\n .then(() => meeting.closeRemoteTracks())\n .then(() => meeting.closePeerConnections())\n .then(() => {\n meeting.unsetLocalVideoTrack();\n meeting.unsetLocalShareTrack();\n meeting.unsetRemoteTracks();\n meeting.unsetPeerConnections();\n meeting.reconnectionManager.cleanUp();\n })\n .then(() => meeting.stopKeepAlive())\n .then(() => meeting.updateLLMConnection());\n};\n\nMeetingUtil.disconnectPhoneAudio = (meeting, phoneUrl) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n return Promise.reject(new MeetingNotActiveError());\n }\n\n const options = {\n locusUrl: meeting.locusUrl,\n selfId: meeting.selfId,\n correlationId: meeting.correlationId,\n phoneUrl,\n };\n\n return meeting.meetingRequest\n .disconnectPhoneAudio(options)\n .then((response) => {\n if (response?.body?.locus) {\n meeting.locusInfo.onFullLocus(response.body.locus);\n }\n })\n .catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n};\n\n// by default will leave on meeting's resourceId\n// if you explicity want it not to leave on resource id, pass\n// {resourceId: null}\n// TODO: chris, you can modify this however you want\nMeetingUtil.leaveMeeting = (meeting, options: any = {}) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n // TODO: clean up if the meeting is already inactive\n return Promise.reject(new MeetingNotActiveError());\n }\n\n if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {\n return Promise.reject(new UserNotJoinedError());\n }\n\n const defaultOptions = {\n locusUrl: meeting.locusUrl,\n selfId: meeting.selfId,\n correlationId: meeting.correlationId,\n resourceId: meeting.resourceId,\n deviceUrl: meeting.deviceUrl,\n };\n\n const leaveOptions = {...defaultOptions, ...options};\n\n return meeting.meetingRequest\n .leaveMeeting(leaveOptions)\n .then((response) => {\n if (response && response.body && response.body.locus) {\n // && !options.moveMeeting) {\n meeting.locusInfo.onFullLocus(response.body.locus);\n }\n\n return Promise.resolve();\n })\n .then(() => {\n if (options.moveMeeting) {\n return Promise.resolve();\n }\n\n return MeetingUtil.cleanUp(meeting);\n })\n .catch((err) => {\n // TODO: If the meeting state comes as LEFT or INACTIVE as response then\n // 1) on leave clean up the meeting or simply do a sync on the meeting\n // 2) If the error says meeting is inactive then destroy the meeting object\n LoggerProxy.logger.error(\n `Meeting:util#leaveMeeting --> An error occured while trying to leave meeting with an id of ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n};\nMeetingUtil.declineMeeting = (meeting, reason) =>\n meeting.meetingRequest.declineMeeting({\n locusUrl: meeting.locusUrl,\n deviceUrl: meeting.deviceUrl,\n reason,\n });\n\nMeetingUtil.isUserInLeftState = (locusInfo) => locusInfo.parsedLocus?.self?.state === _LEFT_;\n\nMeetingUtil.isUserInIdleState = (locusInfo) => locusInfo.parsedLocus?.self?.state === _IDLE_;\n\nMeetingUtil.isUserInJoinedState = (locusInfo) => locusInfo.parsedLocus?.self?.state === _JOINED_;\n\nMeetingUtil.isMediaEstablished = (currentMediaStatus) =>\n currentMediaStatus &&\n (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share);\n\nMeetingUtil.joinMeetingOptions = (meeting, options: any = {}) => {\n meeting.resourceId = meeting.resourceId || options.resourceId;\n\n if (meeting.requiredCaptcha) {\n return Promise.reject(new CaptchaError());\n }\n if (meeting.passwordStatus === PASSWORD_STATUS.REQUIRED) {\n return Promise.reject(new PasswordError());\n }\n\n if (options.pin) {\n Metrics.postEvent({\n event: eventType.PIN_COLLECTED,\n meeting,\n });\n }\n\n // normal join meeting, scenario A, D\n return MeetingUtil.joinMeeting(meeting, options)\n .then((response) => {\n meeting.setLocus(response);\n\n return Promise.resolve(response);\n })\n .catch((err) => {\n // joining a claimed PMR that is not my own, scenario B\n if (MeetingUtil.isPinOrGuest(err)) {\n Metrics.postEvent({\n event: eventType.PIN_PROMPT,\n meeting,\n });\n\n // request host pin or non host for unclaimed PMR, start of Scenario C\n // see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature\n return Promise.reject(new IntentToJoinError('Error Joining Meeting', err));\n }\n LoggerProxy.logger.error('Meeting:util#joinMeetingOptions --> Error joining the call, ', err);\n\n return Promise.reject(new JoinMeetingError(options, 'Error Joining Meeting', err));\n });\n};\n\nMeetingUtil.validateOptions = (options) => {\n const {sendVideo, sendAudio, sendShare, localStream, localShare} = options;\n\n if (sendVideo && !MeetingUtil.getTrack(localStream).videoTrack) {\n return Promise.reject(new ParameterError('please pass valid video streams'));\n }\n\n if (sendAudio && !MeetingUtil.getTrack(localStream).audioTrack) {\n return Promise.reject(new ParameterError('please pass valid audio streams'));\n }\n\n if (sendShare && !MeetingUtil.getTrack(localShare).videoTrack) {\n return Promise.reject(new ParameterError('please pass valid share streams'));\n }\n\n return Promise.resolve();\n};\n\nMeetingUtil.getTrack = (stream) => {\n let audioTrack = null;\n let videoTrack = null;\n let audioTracks = null;\n let videoTracks = null;\n\n if (!stream) {\n return {audioTrack: null, videoTrack: null};\n }\n if (stream.getAudioTracks) {\n audioTracks = stream.getAudioTracks();\n }\n if (stream.getVideoTracks) {\n videoTracks = stream.getVideoTracks();\n }\n\n if (audioTracks && audioTracks.length > 0) {\n [audioTrack] = audioTracks;\n }\n\n if (videoTracks && videoTracks.length > 0) {\n [videoTrack] = videoTracks;\n }\n\n return {audioTrack, videoTrack};\n};\n\nMeetingUtil.getModeratorFromLocusInfo = (locusInfo) =>\n locusInfo &&\n locusInfo.parsedLocus &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info.moderator;\n\nMeetingUtil.getPolicyFromLocusInfo = (locusInfo) =>\n locusInfo &&\n locusInfo.parsedLocus &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info.policy;\n\nMeetingUtil.getUserDisplayHintsFromLocusInfo = (locusInfo) =>\n locusInfo?.parsedLocus?.info?.userDisplayHints || [];\n\nMeetingUtil.canInviteNewParticipants = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.ADD_GUEST);\n\nMeetingUtil.canAdmitParticipant = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN);\n\nMeetingUtil.canUserLock = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOCK_CONTROL_LOCK) &&\n displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_UNLOCKED);\n\nMeetingUtil.canUserUnlock = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) &&\n displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_LOCKED);\n\nMeetingUtil.canUserRaiseHand = (displayHints) => displayHints.includes(DISPLAY_HINTS.RAISE_HAND);\n\nMeetingUtil.canUserLowerAllHands = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOWER_ALL_HANDS);\n\nMeetingUtil.canUserLowerSomeoneElsesHand = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND);\n\nMeetingUtil.bothLeaveAndEndMeetingAvailable = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LEAVE_TRANSFER_HOST_END_MEETING) ||\n displayHints.includes(DISPLAY_HINTS.LEAVE_END_MEETING);\n\nMeetingUtil.canManageBreakout = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.BREAKOUT_MANAGEMENT);\n\nMeetingUtil.isSuppressBreakoutSupport = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.UCF_SUPPRESS_BREAKOUTS_SUPPORT);\n\nMeetingUtil.canAdmitLobbyToBreakout = (displayHints) =>\n !displayHints.includes(DISPLAY_HINTS.DISABLE_LOBBY_TO_BREAKOUT);\n\nMeetingUtil.isBreakoutPreassignmentsEnabled = (displayHints) =>\n !displayHints.includes(DISPLAY_HINTS.DISABLE_BREAKOUT_PREASSIGNMENTS);\n\nMeetingUtil.canUserAskForHelp = (displayHints) =>\n !displayHints.includes(DISPLAY_HINTS.DISABLE_ASK_FOR_HELP);\n\nMeetingUtil.lockMeeting = (actions, request, locusUrl) => {\n if (actions && actions.canLock) {\n return request.lockMeeting({locusUrl, lock: true});\n }\n\n return Promise.reject(new PermissionError('Lock not allowed, due to joined property.'));\n};\n\nMeetingUtil.unlockMeeting = (actions, request, locusUrl) => {\n if (actions && actions.canUnlock) {\n return request.lockMeeting({locusUrl, lock: false});\n }\n\n return Promise.reject(new PermissionError('Unlock not allowed, due to joined property.'));\n};\n\nMeetingUtil.handleAudioLogging = (audioTrack: LocalMicrophoneTrack | null) => {\n const LOG_HEADER = 'MeetingUtil#handleAudioLogging -->';\n\n if (audioTrack) {\n const settings = audioTrack.underlyingTrack.getSettings();\n const {deviceId} = settings;\n\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings =', JSON.stringify(settings));\n }\n};\n\nMeetingUtil.handleVideoLogging = (videoTrack: LocalCameraTrack | null) => {\n const LOG_HEADER = 'MeetingUtil#handleVideoLogging -->';\n\n if (videoTrack) {\n const settings = videoTrack.underlyingTrack.getSettings();\n const {deviceId} = settings;\n\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings =', JSON.stringify(settings));\n }\n};\n\nMeetingUtil.handleDeviceLogging = (devices = []) => {\n const LOG_HEADER = 'MeetingUtil#handleDeviceLogging -->';\n\n devices.forEach((device) => {\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${device.deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings', JSON.stringify(device));\n });\n};\n\nMeetingUtil.endMeetingForAll = (meeting) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n return Promise.reject(new MeetingNotActiveError());\n }\n\n const endOptions = {\n locusUrl: meeting.locusUrl,\n };\n\n return meeting.meetingRequest\n .endMeetingForAll(endOptions)\n .then((response) => {\n if (response && response.body && response.body.locus) {\n meeting.locusInfo.onFullLocus(response.body.locus);\n }\n\n return Promise.resolve();\n })\n .then(() => MeetingUtil.cleanUp(meeting))\n .catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:util#endMeetingForAll An error occured while trying to end meeting for all with an id of ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n};\n\nMeetingUtil.canEnableClosedCaption = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.CAPTION_START);\n\nMeetingUtil.isSaveTranscriptsEnabled = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.SAVE_TRANSCRIPTS_ENABLED);\n\nMeetingUtil.canStartTranscribing = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_START);\n\nMeetingUtil.canStopTranscribing = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP);\n\nMeetingUtil.isClosedCaptionActive = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.CAPTION_STATUS_ACTIVE);\n\nMeetingUtil.isWebexAssistantActive = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.WEBEX_ASSISTANT_STATUS_ACTIVE);\n\nMeetingUtil.canViewCaptionPanel = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.ENABLE_CAPTION_PANEL);\n\nMeetingUtil.isRealTimeTranslationEnabled = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.DISPLAY_REAL_TIME_TRANSLATION);\n\nMeetingUtil.canSelectSpokenLanguages = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.DISPLAY_NON_ENGLISH_ASR);\n\nMeetingUtil.waitingForOthersToJoin = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.WAITING_FOR_OTHERS);\n\nMeetingUtil.canEnableReactions = (originalValue, displayHints) => {\n if (displayHints.includes(DISPLAY_HINTS.ENABLE_REACTIONS)) {\n return true;\n }\n if (displayHints.includes(DISPLAY_HINTS.DISABLE_REACTIONS)) {\n return false;\n }\n\n return originalValue;\n};\n\nMeetingUtil.canSendReactions = (originalValue, displayHints) => {\n if (displayHints.includes(DISPLAY_HINTS.REACTIONS_ACTIVE)) {\n return true;\n }\n if (displayHints.includes(DISPLAY_HINTS.REACTIONS_INACTIVE)) {\n return false;\n }\n\n return originalValue;\n};\nMeetingUtil.canUserRenameSelfAndObserved = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.CAN_RENAME_SELF_AND_OBSERVED);\n\nMeetingUtil.canUserRenameOthers = (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.CAN_RENAME_OTHERS);\n\nexport default MeetingUtil;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AAA0D;AAAA;AAE1D,IAAMA,WAAgB,GAAG,CAAC,CAAC;AAE3BA,WAAW,CAACC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C;AAAA;AAE9D9N,WAAW,CAAC+N,sBAAsB,GAAG,UAACrE,YAAY;EAAA,OAChDA,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAACqE,kBAAkB,CAAC;AAAA;AAEzDhO,WAAW,CAACiO,kBAAkB,GAAG,UAACC,aAAa,EAAExE,YAAY,EAAK;EAChE,IAAIA,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAACwE,gBAAgB,CAAC,EAAE;IACzD,OAAO,IAAI;EACb;EACA,IAAIzE,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAACyE,iBAAiB,CAAC,EAAE;IAC1D,OAAO,KAAK;EACd;EAEA,OAAOF,aAAa;AACtB,CAAC;AAEDlO,WAAW,CAACqO,gBAAgB,GAAG,UAACH,aAAa,EAAExE,YAAY,EAAK;EAC9D,IAAIA,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAAC2E,gBAAgB,CAAC,EAAE;IACzD,OAAO,IAAI;EACb;EACA,IAAI5E,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAAC4E,kBAAkB,CAAC,EAAE;IAC3D,OAAO,KAAK;EACd;EAEA,OAAOL,aAAa;AACtB,CAAC;AACDlO,WAAW,CAACwO,4BAA4B,GAAG,UAAC9E,YAAY;EAAA,OACtDA,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAAC8E,4BAA4B,CAAC;AAAA;AAEnEzO,WAAW,CAAC0O,mBAAmB,GAAG,UAAChF,YAAY;EAAA,OAC7CA,YAAY,CAAC1G,QAAQ,CAAC2G,wBAAa,CAACgF,iBAAiB,CAAC;AAAA;AAAC,eAE1C3O,WAAW;AAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
|
4
|
-
var _Object$
|
|
4
|
+
var _Object$keys2 = require("@babel/runtime-corejs2/core-js/object/keys");
|
|
5
5
|
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
|
|
6
6
|
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
7
7
|
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
@@ -12,6 +12,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
12
12
|
value: true
|
|
13
13
|
});
|
|
14
14
|
exports.default = exports.MeetingInfoV2PasswordError = exports.MeetingInfoV2CaptchaError = exports.MeetingInfoV2AdhocMeetingError = void 0;
|
|
15
|
+
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
15
16
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
16
17
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
17
18
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
@@ -22,11 +23,12 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
22
23
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
23
24
|
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/wrapNativeSuper"));
|
|
24
25
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
26
|
+
var _difference2 = _interopRequireDefault(require("lodash/difference"));
|
|
25
27
|
var _constants = require("../constants");
|
|
26
28
|
var _metrics = _interopRequireDefault(require("../metrics"));
|
|
27
29
|
var _constants2 = _interopRequireDefault(require("../metrics/constants"));
|
|
28
30
|
var _utilv = _interopRequireDefault(require("./utilv2"));
|
|
29
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$
|
|
31
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
30
32
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
33
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
32
34
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -260,6 +262,9 @@ var MeetingInfoV2 = /*#__PURE__*/function () {
|
|
|
260
262
|
installedOrgID,
|
|
261
263
|
destinationType,
|
|
262
264
|
body,
|
|
265
|
+
_destinationType$info,
|
|
266
|
+
_destinationType$info2,
|
|
267
|
+
err,
|
|
263
268
|
options,
|
|
264
269
|
directURI,
|
|
265
270
|
_args2 = arguments;
|
|
@@ -292,13 +297,26 @@ var MeetingInfoV2 = /*#__PURE__*/function () {
|
|
|
292
297
|
}));
|
|
293
298
|
case 11:
|
|
294
299
|
body = _context2.sent;
|
|
300
|
+
if ((0, _difference2.default)((0, _keys.default)(body), (0, _keys.default)(_constants.DEFAULT_MEETING_INFO_REQUEST_BODY)).length) {
|
|
301
|
+
_context2.next = 16;
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
err = new Error('Not enough information to fetch meeting info');
|
|
305
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.FETCH_MEETING_INFO_V1_FAILURE, {
|
|
306
|
+
reason: err.message,
|
|
307
|
+
destinationType: destinationType === null || destinationType === void 0 ? void 0 : destinationType.type,
|
|
308
|
+
webExMeetingId: destinationType === null || destinationType === void 0 ? void 0 : (_destinationType$info = destinationType.info) === null || _destinationType$info === void 0 ? void 0 : _destinationType$info.webExMeetingId,
|
|
309
|
+
sipUri: destinationType === null || destinationType === void 0 ? void 0 : (_destinationType$info2 = destinationType.info) === null || _destinationType$info2 === void 0 ? void 0 : _destinationType$info2.sipUri
|
|
310
|
+
});
|
|
311
|
+
throw err;
|
|
312
|
+
case 16:
|
|
295
313
|
options = {
|
|
296
314
|
method: _constants.HTTP_VERBS.POST,
|
|
297
315
|
body: body
|
|
298
316
|
};
|
|
299
|
-
_context2.next =
|
|
317
|
+
_context2.next = 19;
|
|
300
318
|
return _utilv.default.getDirectMeetingInfoURI(destinationType);
|
|
301
|
-
case
|
|
319
|
+
case 19:
|
|
302
320
|
directURI = _context2.sent;
|
|
303
321
|
if (directURI) {
|
|
304
322
|
options.uri = directURI;
|
|
@@ -337,7 +355,7 @@ var MeetingInfoV2 = /*#__PURE__*/function () {
|
|
|
337
355
|
});
|
|
338
356
|
throw err;
|
|
339
357
|
}));
|
|
340
|
-
case
|
|
358
|
+
case 22:
|
|
341
359
|
case "end":
|
|
342
360
|
return _context2.stop();
|
|
343
361
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PASSWORD_ERROR_DEFAULT_MESSAGE","CAPTCHA_ERROR_DEFAULT_MESSAGE","ADHOC_MEETING_DEFAULT_ERROR","CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES","MeetingInfoV2PasswordError","wbxAppApiErrorCode","meetingInfo","message","name","sdkMessage","stack","Error","wbxAppApiCode","MeetingInfoV2AdhocMeetingError","MeetingInfoV2CaptchaError","captchaInfo","isPasswordRequired","includes","MeetingInfoV2","webex","destination","type","MeetingInfoUtil","getDestinationType","conversationUrl","meetings","preferredWebexSite","getInvitees","particpants","invitees","forEach","participant","push","email","emailAddress","ciUserUuid","entryUUID","internal","conversation","get","url","includeParticipants","disableTransform","then","body","title","displayName","spaceUrl","keyUrl","encryptionKeyUrl","kroUrl","kmsResourceObjectUrl","participants","items","uri","Metrics","sendBehavioralMetric","BEHAVIORAL_METRICS","ADHOC_MEETING_SUCCESS","request","method","HTTP_VERBS","POST","catch","err","ADHOC_MEETING_FAILURE","reason","code","password","installedOrgID","destinationType","_CONVERSATION_URL_","config","experimental","enableAdhocMeetings","createAdhocSpaceMeeting","getRequestBody","options","getDirectMeetingInfoURI","directURI","service","WBXAPPAPI_SERVICE","resource","response","FETCH_MEETING_INFO_V1_SUCCESS","statusCode","VERIFY_PASSWORD_ERROR","data","VERIFY_CAPTCHA_ERROR","captchaId","captchaID","verificationImageURL","verificationAudioURL","refreshURL","FETCH_MEETING_INFO_V1_FAILURE"],"sources":["meeting-info-v2.ts"],"sourcesContent":["import {HTTP_VERBS, _CONVERSATION_URL_, WBXAPPAPI_SERVICE} from '../constants';\nimport Metrics from '../metrics';\nimport BEHAVIORAL_METRICS from '../metrics/constants';\n\nimport MeetingInfoUtil from './utilv2';\n\nconst PASSWORD_ERROR_DEFAULT_MESSAGE =\n 'Password required. Call fetchMeetingInfo() with password argument';\nconst CAPTCHA_ERROR_DEFAULT_MESSAGE =\n 'Captcha required. Call fetchMeetingInfo() with captchaInfo argument';\nconst ADHOC_MEETING_DEFAULT_ERROR =\n 'Failed starting the adhoc meeting, Please contact support team ';\nconst CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006];\n\n/**\n * Error to indicate that wbxappapi requires a password\n */\nexport class MeetingInfoV2PasswordError extends Error {\n meetingInfo: any;\n sdkMessage: any;\n wbxAppApiCode: any;\n body: any;\n\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [meetingInfo]\n * @param {String} [message]\n */\n constructor(\n wbxAppApiErrorCode?: number,\n meetingInfo?: object,\n message: string = PASSWORD_ERROR_DEFAULT_MESSAGE\n ) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = new Error().stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.meetingInfo = meetingInfo;\n }\n}\n\n/**\n * Error generating a adhoc space meeting\n */\nexport class MeetingInfoV2AdhocMeetingError extends Error {\n sdkMessage: any;\n wbxAppApiCode: any;\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode?: number, message: string = ADHOC_MEETING_DEFAULT_ERROR) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2AdhocMeetingError';\n this.sdkMessage = message;\n this.stack = new Error().stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n }\n}\n\n/**\n * Error to indicate that preferred webex site not present to start adhoc meeting\n */\nexport class MeetingInfoV2CaptchaError extends Error {\n captchaInfo: any;\n isPasswordRequired: any;\n sdkMessage: any;\n wbxAppApiCode: any;\n body: any;\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [captchaInfo]\n * @param {String} [message]\n */\n constructor(\n wbxAppApiErrorCode?: number,\n captchaInfo?: object,\n message: string = CAPTCHA_ERROR_DEFAULT_MESSAGE\n ) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = new Error().stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.isPasswordRequired = CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES.includes(wbxAppApiErrorCode);\n this.captchaInfo = captchaInfo;\n }\n}\n\n/**\n * @class MeetingInfo\n */\nexport default class MeetingInfoV2 {\n webex: any;\n\n /**\n *\n * @param {WebexSDK} webex\n */\n constructor(webex) {\n this.webex = webex;\n }\n\n /**\n * converts hydra id into conversation url and persons Id\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @returns {Promise} destination and type\n * @public\n * @memberof MeetingInfo\n */\n fetchInfoOptions(destination: string, type: string = null) {\n return MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex,\n });\n }\n\n /**\n * Creates adhoc space meetings for a space by fetching the conversation infomation\n * @param {String} conversationUrl conversationUrl to start adhoc meeting on\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async createAdhocSpaceMeeting(conversationUrl: string) {\n if (!this.webex.meetings.preferredWebexSite) {\n throw Error('No preferred webex site found');\n }\n const getInvitees = (particpants = []) => {\n const invitees = [];\n\n if (particpants) {\n particpants.forEach((participant) => {\n invitees.push({\n email: participant.emailAddress,\n ciUserUuid: participant.entryUUID,\n });\n });\n }\n\n return invitees;\n };\n\n return this.webex.internal.conversation\n .get({url: conversationUrl}, {includeParticipants: true, disableTransform: true})\n .then((conversation) => {\n const body = {\n title: conversation.displayName,\n spaceUrl: conversation.url,\n keyUrl: conversation.encryptionKeyUrl,\n kroUrl: conversation.kmsResourceObjectUrl,\n invitees: getInvitees(conversation.participants?.items),\n };\n\n const uri = this.webex.meetings.preferredWebexSite\n ? `https://${this.webex.meetings.preferredWebexSite}/wbxappapi/v2/meetings/spaceInstant`\n : '';\n\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ADHOC_MEETING_SUCCESS);\n\n return this.webex.request({\n method: HTTP_VERBS.POST,\n uri,\n body,\n });\n })\n .catch((err) => {\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ADHOC_MEETING_FAILURE, {\n reason: err.message,\n stack: err.stack,\n });\n throw new MeetingInfoV2AdhocMeetingError(err.body?.code, err.body?.message);\n });\n }\n\n /**\n * Fetches meeting info from the server\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @param {String} password\n * @param {Object} captchaInfo\n * @param {String} captchaInfo.code\n * @param {String} captchaInfo.id\n * @param {String} installedOrgID\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async fetchMeetingInfo(\n destination: string,\n type: string = null,\n password: string = null,\n captchaInfo: {\n code: string;\n id: string;\n } = null,\n installedOrgID = null\n ) {\n const destinationType = await MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex,\n });\n\n if (\n destinationType.type === _CONVERSATION_URL_ &&\n this.webex.config.meetings.experimental.enableAdhocMeetings &&\n this.webex.meetings.preferredWebexSite\n ) {\n return this.createAdhocSpaceMeeting(destinationType.destination);\n }\n\n const body = await MeetingInfoUtil.getRequestBody({\n ...destinationType,\n password,\n captchaInfo,\n installedOrgID,\n });\n\n const options: any = {\n method: HTTP_VERBS.POST,\n body,\n };\n\n const directURI = await MeetingInfoUtil.getDirectMeetingInfoURI(destinationType);\n\n if (directURI) {\n options.uri = directURI;\n } else {\n options.service = WBXAPPAPI_SERVICE;\n options.resource = 'meetingInfo';\n }\n\n return this.webex\n .request(options)\n .then((response) => {\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_SUCCESS);\n\n return response;\n })\n .catch((err) => {\n if (err?.statusCode === 403) {\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.VERIFY_PASSWORD_ERROR, {\n reason: err.message,\n stack: err.stack,\n });\n\n throw new MeetingInfoV2PasswordError(err.body?.code, err.body?.data?.meetingInfo);\n }\n if (err?.statusCode === 423) {\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.VERIFY_CAPTCHA_ERROR, {\n reason: err.message,\n stack: err.stack,\n });\n\n throw new MeetingInfoV2CaptchaError(err.body?.code, {\n captchaId: err.body.captchaID,\n verificationImageURL: err.body.verificationImageURL,\n verificationAudioURL: err.body.verificationAudioURL,\n refreshURL: err.body.refreshURL,\n });\n }\n\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_FAILURE, {\n reason: err.message,\n stack: err.stack,\n });\n throw err;\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAEA;AAAuC;AAAA;AAAA;AAAA;AAEvC,IAAMA,8BAA8B,GAClC,mEAAmE;AACrE,IAAMC,6BAA6B,GACjC,qEAAqE;AACvE,IAAMC,2BAA2B,GAC/B,iEAAiE;AACnE,IAAMC,qCAAqC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;;AAE9D;AACA;AACA;AAFA,IAGaC,0BAA0B;EAAA;EAAA;EAMrC;AACF;AACA;AACA;AACA;AACA;AACA;EACE,oCACEC,kBAA2B,EAC3BC,WAAoB,EAEpB;IAAA;IAAA,IADAC,OAAe,uEAAGP,8BAA8B;IAAA;IAEhD,oCAASO,OAAO,oBAAUF,kBAAkB;IAAI;IAAA;IAAA;IAAA;IAChD,MAAKG,IAAI,GAAG,4BAA4B;IACxC,MAAKC,UAAU,GAAGF,OAAO;IACzB,MAAKG,KAAK,GAAG,IAAIC,KAAK,EAAE,CAACD,KAAK;IAC9B,MAAKE,aAAa,GAAGP,kBAAkB;IACvC,MAAKC,WAAW,GAAGA,WAAW;IAAC;EACjC;EAAC;AAAA,+CAxB6CK,KAAK;AA2BrD;AACA;AACA;AAFA;AAAA,IAGaE,8BAA8B;EAAA;EAAA;EAGzC;AACF;AACA;AACA;AACA;AACA;EACE,wCAAYR,kBAA2B,EAAiD;IAAA;IAAA,IAA/CE,OAAe,uEAAGL,2BAA2B;IAAA;IACpF,sCAASK,OAAO,oBAAUF,kBAAkB;IAAI;IAAA;IAChD,OAAKG,IAAI,GAAG,gCAAgC;IAC5C,OAAKC,UAAU,GAAGF,OA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U2C,IAAI,oDAAd,gBAAgBjF,WAAW,CAAC;gBACnF;gBACA,IAAI,CAAA0D,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEqB,UAAU,MAAK,GAAG,EAAE;kBAAA;kBAC3B9B,gBAAO,CAACC,oBAAoB,CAACC,mBAAkB,CAAC+B,oBAAoB,EAAE;oBACpEtB,MAAM,EAAEF,GAAG,CAACzD,OAAO;oBACnBG,KAAK,EAAEsD,GAAG,CAACtD;kBACb,CAAC,CAAC;kBAEF,MAAM,IAAII,yBAAyB,eAACkD,GAAG,CAACpB,IAAI,+CAAR,WAAUuB,IAAI,EAAE;oBAClDsB,SAAS,EAAEzB,GAAG,CAACpB,IAAI,CAAC8C,SAAS;oBAC7BC,oBAAoB,EAAE3B,GAAG,CAACpB,IAAI,CAAC+C,oBAAoB;oBACnDC,oBAAoB,EAAE5B,GAAG,CAACpB,IAAI,CAACgD,oBAAoB;oBACnDC,UAAU,EAAE7B,GAAG,CAACpB,IAAI,CAACiD;kBACvB,CAAC,CAAC;gBACJ;gBAEAtC,gBAAO,CAACC,oBAAoB,CAACC,mBAAkB,CAACqC,6BAA6B,EAAE;kBAC7E5B,MAAM,EAAEF,GAAG,CAACzD,OAAO;kBACnBG,KAAK,EAAEsD,GAAG,CAACtD;gBACb,CAAC,CAAC;gBACF,MAAMsD,GAAG;cACX,CAAC,CAAC;YAAA;YAAA;cAAA;UAAA;QAAA;MAAA,CACL;MAAA;QAAA;MAAA;MAAA;IAAA;EAAA;EAAA;AAAA;AAAA"}
|
|
1
|
+
{"version":3,"names":["PASSWORD_ERROR_DEFAULT_MESSAGE","CAPTCHA_ERROR_DEFAULT_MESSAGE","ADHOC_MEETING_DEFAULT_ERROR","CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES","MeetingInfoV2PasswordError","wbxAppApiErrorCode","meetingInfo","message","name","sdkMessage","stack","Error","wbxAppApiCode","MeetingInfoV2AdhocMeetingError","MeetingInfoV2CaptchaError","captchaInfo","isPasswordRequired","includes","MeetingInfoV2","webex","destination","type","MeetingInfoUtil","getDestinationType","conversationUrl","meetings","preferredWebexSite","getInvitees","particpants","invitees","forEach","participant","push","email","emailAddress","ciUserUuid","entryUUID","internal","conversation","get","url","includeParticipants","disableTransform","then","body","title","displayName","spaceUrl","keyUrl","encryptionKeyUrl","kroUrl","kmsResourceObjectUrl","participants","items","uri","Metrics","sendBehavioralMetric","BEHAVIORAL_METRICS","ADHOC_MEETING_SUCCESS","request","method","HTTP_VERBS","POST","catch","err","ADHOC_MEETING_FAILURE","reason","code","password","installedOrgID","destinationType","_CONVERSATION_URL_","config","experimental","enableAdhocMeetings","createAdhocSpaceMeeting","getRequestBody","DEFAULT_MEETING_INFO_REQUEST_BODY","length","FETCH_MEETING_INFO_V1_FAILURE","webExMeetingId","info","sipUri","options","getDirectMeetingInfoURI","directURI","service","WBXAPPAPI_SERVICE","resource","response","FETCH_MEETING_INFO_V1_SUCCESS","statusCode","VERIFY_PASSWORD_ERROR","data","VERIFY_CAPTCHA_ERROR","captchaId","captchaID","verificationImageURL","verificationAudioURL","refreshURL"],"sources":["meeting-info-v2.ts"],"sourcesContent":["import lodash from 'lodash';\nimport {\n HTTP_VERBS,\n _CONVERSATION_URL_,\n WBXAPPAPI_SERVICE,\n DEFAULT_MEETING_INFO_REQUEST_BODY,\n} from '../constants';\nimport Metrics from '../metrics';\nimport BEHAVIORAL_METRICS from '../metrics/constants';\n\nimport MeetingInfoUtil from './utilv2';\n\nconst PASSWORD_ERROR_DEFAULT_MESSAGE =\n 'Password required. Call fetchMeetingInfo() with password argument';\nconst CAPTCHA_ERROR_DEFAULT_MESSAGE =\n 'Captcha required. Call fetchMeetingInfo() with captchaInfo argument';\nconst ADHOC_MEETING_DEFAULT_ERROR =\n 'Failed starting the adhoc meeting, Please contact support team ';\nconst CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006];\n\n/**\n * Error to indicate that wbxappapi requires a password\n */\nexport class MeetingInfoV2PasswordError extends Error {\n meetingInfo: any;\n sdkMessage: any;\n wbxAppApiCode: any;\n body: any;\n\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [meetingInfo]\n * @param {String} [message]\n */\n constructor(\n wbxAppApiErrorCode?: number,\n meetingInfo?: object,\n message: string = PASSWORD_ERROR_DEFAULT_MESSAGE\n ) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = new Error().stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.meetingInfo = meetingInfo;\n }\n}\n\n/**\n * Error generating a adhoc space meeting\n */\nexport class MeetingInfoV2AdhocMeetingError extends Error {\n sdkMessage: any;\n wbxAppApiCode: any;\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {String} [message]\n */\n constructor(wbxAppApiErrorCode?: number, message: string = ADHOC_MEETING_DEFAULT_ERROR) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2AdhocMeetingError';\n this.sdkMessage = message;\n this.stack = new Error().stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n }\n}\n\n/**\n * Error to indicate that preferred webex site not present to start adhoc meeting\n */\nexport class MeetingInfoV2CaptchaError extends Error {\n captchaInfo: any;\n isPasswordRequired: any;\n sdkMessage: any;\n wbxAppApiCode: any;\n body: any;\n /**\n *\n * @constructor\n * @param {Number} [wbxAppApiErrorCode]\n * @param {Object} [captchaInfo]\n * @param {String} [message]\n */\n constructor(\n wbxAppApiErrorCode?: number,\n captchaInfo?: object,\n message: string = CAPTCHA_ERROR_DEFAULT_MESSAGE\n ) {\n super(`${message}, code=${wbxAppApiErrorCode}`);\n this.name = 'MeetingInfoV2PasswordError';\n this.sdkMessage = message;\n this.stack = new Error().stack;\n this.wbxAppApiCode = wbxAppApiErrorCode;\n this.isPasswordRequired = CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES.includes(wbxAppApiErrorCode);\n this.captchaInfo = captchaInfo;\n }\n}\n\n/**\n * @class MeetingInfo\n */\nexport default class MeetingInfoV2 {\n webex: any;\n\n /**\n *\n * @param {WebexSDK} webex\n */\n constructor(webex) {\n this.webex = webex;\n }\n\n /**\n * converts hydra id into conversation url and persons Id\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @returns {Promise} destination and type\n * @public\n * @memberof MeetingInfo\n */\n fetchInfoOptions(destination: string, type: string = null) {\n return MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex,\n });\n }\n\n /**\n * Creates adhoc space meetings for a space by fetching the conversation infomation\n * @param {String} conversationUrl conversationUrl to start adhoc meeting on\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async createAdhocSpaceMeeting(conversationUrl: string) {\n if (!this.webex.meetings.preferredWebexSite) {\n throw Error('No preferred webex site found');\n }\n const getInvitees = (particpants = []) => {\n const invitees = [];\n\n if (particpants) {\n particpants.forEach((participant) => {\n invitees.push({\n email: participant.emailAddress,\n ciUserUuid: participant.entryUUID,\n });\n });\n }\n\n return invitees;\n };\n\n return this.webex.internal.conversation\n .get({url: conversationUrl}, {includeParticipants: true, disableTransform: true})\n .then((conversation) => {\n const body = {\n title: conversation.displayName,\n spaceUrl: conversation.url,\n keyUrl: conversation.encryptionKeyUrl,\n kroUrl: conversation.kmsResourceObjectUrl,\n invitees: getInvitees(conversation.participants?.items),\n };\n\n const uri = this.webex.meetings.preferredWebexSite\n ? `https://${this.webex.meetings.preferredWebexSite}/wbxappapi/v2/meetings/spaceInstant`\n : '';\n\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ADHOC_MEETING_SUCCESS);\n\n return this.webex.request({\n method: HTTP_VERBS.POST,\n uri,\n body,\n });\n })\n .catch((err) => {\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ADHOC_MEETING_FAILURE, {\n reason: err.message,\n stack: err.stack,\n });\n throw new MeetingInfoV2AdhocMeetingError(err.body?.code, err.body?.message);\n });\n }\n\n /**\n * Fetches meeting info from the server\n * @param {String} destination one of many different types of destinations to look up info for\n * @param {String} [type] to match up with the destination value\n * @param {String} password\n * @param {Object} captchaInfo\n * @param {String} captchaInfo.code\n * @param {String} captchaInfo.id\n * @param {String} installedOrgID\n * @returns {Promise} returns a meeting info object\n * @public\n * @memberof MeetingInfo\n */\n async fetchMeetingInfo(\n destination: string,\n type: string = null,\n password: string = null,\n captchaInfo: {\n code: string;\n id: string;\n } = null,\n installedOrgID = null\n ) {\n const destinationType = await MeetingInfoUtil.getDestinationType({\n destination,\n type,\n webex: this.webex,\n });\n\n if (\n destinationType.type === _CONVERSATION_URL_ &&\n this.webex.config.meetings.experimental.enableAdhocMeetings &&\n this.webex.meetings.preferredWebexSite\n ) {\n return this.createAdhocSpaceMeeting(destinationType.destination);\n }\n\n const body = await MeetingInfoUtil.getRequestBody({\n ...destinationType,\n password,\n captchaInfo,\n installedOrgID,\n });\n\n // If the body only contains the default properties, we don't have enough to\n // fetch the meeting info so don't bother trying.\n if (\n !lodash.difference(Object.keys(body), Object.keys(DEFAULT_MEETING_INFO_REQUEST_BODY)).length\n ) {\n const err = new Error('Not enough information to fetch meeting info');\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_FAILURE, {\n reason: err.message,\n destinationType: destinationType?.type,\n webExMeetingId: destinationType?.info?.webExMeetingId,\n sipUri: destinationType?.info?.sipUri,\n });\n\n throw err;\n }\n\n const options: any = {\n method: HTTP_VERBS.POST,\n body,\n };\n\n const directURI = await MeetingInfoUtil.getDirectMeetingInfoURI(destinationType);\n\n if (directURI) {\n options.uri = directURI;\n } else {\n options.service = WBXAPPAPI_SERVICE;\n options.resource = 'meetingInfo';\n }\n\n return this.webex\n .request(options)\n .then((response) => {\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_SUCCESS);\n\n return response;\n })\n .catch((err) => {\n if (err?.statusCode === 403) {\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.VERIFY_PASSWORD_ERROR, {\n reason: err.message,\n stack: err.stack,\n });\n\n throw new MeetingInfoV2PasswordError(err.body?.code, err.body?.data?.meetingInfo);\n }\n if (err?.statusCode === 423) {\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.VERIFY_CAPTCHA_ERROR, {\n reason: err.message,\n stack: err.stack,\n });\n\n throw new MeetingInfoV2CaptchaError(err.body?.code, {\n captchaId: err.body.captchaID,\n verificationImageURL: err.body.verificationImageURL,\n verificationAudioURL: err.body.verificationAudioURL,\n refreshURL: err.body.refreshURL,\n });\n }\n\n Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_FAILURE, {\n reason: err.message,\n stack: err.stack,\n });\n throw err;\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AAMA;AACA;AAEA;AAAuC;AAAA;AAAA;AAAA;AAEvC,IAAMA,8BAA8B,GAClC,mEAAmE;AACrE,IAAMC,6BAA6B,GACjC,qEAAqE;AACvE,IAAMC,2BAA2B,GAC/B,iEAAiE;AACnE,IAAMC,qCAAqC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;;AAE9D;AACA;AACA;AAFA,IAGaC,0BAA0B;EAAA;EAAA;EAMrC;AACF;AACA;AACA;AACA;AACA;AACA;EACE,oCACEC,kBAA2B,EAC3BC,WAAoB,EAEpB;IAAA;IAAA,IADAC,OAAe,uEAAGP,8BAA8B;IAAA;IAEhD,oCAASO,OAAO,oBAAUF,kBAAkB;IAAI;IAAA;IAAA;IAAA;IAChD,MAAKG,IAAI,GAAG,4BAA4B;IACxC,MAAKC,UAAU,GAAGF,OAAO;IACzB,MAAKG,KAAK,GAAG,IAAIC,KAAK,EAAE,CAACD,KAAK;IAC9B,MAAKE,aAAa,GAAGP,kBAAkB;IACvC,MAAKC,WAAW,GAAGA,WAAW;IAAC;EACjC;EAAC;AAAA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,CAACpB,IAAI,+CAAR,WAAUuB,IAAI,EAAE;oBAClD4B,SAAS,EAAE/B,GAAG,CAACpB,IAAI,CAACoD,SAAS;oBAC7BC,oBAAoB,EAAEjC,GAAG,CAACpB,IAAI,CAACqD,oBAAoB;oBACnDC,oBAAoB,EAAElC,GAAG,CAACpB,IAAI,CAACsD,oBAAoB;oBACnDC,UAAU,EAAEnC,GAAG,CAACpB,IAAI,CAACuD;kBACvB,CAAC,CAAC;gBACJ;gBAEA5C,gBAAO,CAACC,oBAAoB,CAACC,mBAAkB,CAACsB,6BAA6B,EAAE;kBAC7Eb,MAAM,EAAEF,GAAG,CAACzD,OAAO;kBACnBG,KAAK,EAAEsD,GAAG,CAACtD;gBACb,CAAC,CAAC;gBACF,MAAMsD,GAAG;cACX,CAAC,CAAC;YAAA;YAAA;cAAA;UAAA;QAAA;MAAA,CACL;MAAA;QAAA;MAAA;MAAA;IAAA;EAAA;EAAA;AAAA;AAAA"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _Object$keys = require("@babel/runtime-corejs2/core-js/object/keys");
|
|
4
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
|
|
5
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
6
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
7
|
+
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
3
8
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
9
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
5
10
|
_Object$defineProperty(exports, "__esModule", {
|
|
@@ -8,12 +13,15 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
8
13
|
exports.default = void 0;
|
|
9
14
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
10
15
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
16
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
11
17
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
12
18
|
var _url = _interopRequireDefault(require("url"));
|
|
13
19
|
var _common = require("@webex/common");
|
|
14
20
|
var _constants = require("../constants");
|
|
15
21
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
16
22
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
23
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
25
|
var MeetingInfoUtil = {};
|
|
18
26
|
MeetingInfoUtil.getParsedUrl = function (link) {
|
|
19
27
|
try {
|
|
@@ -253,10 +261,7 @@ MeetingInfoUtil.getRequestBody = function (options) {
|
|
|
253
261
|
password = options.password,
|
|
254
262
|
captchaInfo = options.captchaInfo,
|
|
255
263
|
installedOrgID = options.installedOrgID;
|
|
256
|
-
var body = {
|
|
257
|
-
supportHostKey: true,
|
|
258
|
-
supportCountryList: true
|
|
259
|
-
};
|
|
264
|
+
var body = _objectSpread({}, _constants.DEFAULT_MEETING_INFO_REQUEST_BODY);
|
|
260
265
|
switch (type) {
|
|
261
266
|
case _constants._SIP_URI_:
|
|
262
267
|
body.sipUrl = destination;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingInfoUtil","getParsedUrl","link","parsedUrl","url","parse","protocol","HTTPS_PROTOCOL","error","LoggerProxy","logger","warn","isMeetingLink","value","hostNameBool","hostname","includes","WEBEX_DOT_COM","pathNameBool","pathname","MEET","MEET_M","JOIN","isConversationUrl","webex","clusterId","internal","services","getClusterId","endsWith","CONVERSATION_SERVICE","isSipUri","sipString","sipUri","DIALER_REGEX","SIP_ADDRESS","exec","isPhoneNumber","phoneNumber","isValidNumber","PHONE_NUMBER","test","getHydraId","destination","deconstructHydraId","type","id","cluster","UUID_REG","_ROOM_","room","_PEOPLE_","people","getSipUriFromHydraPersonId","get","then","res","emails","length","ParameterError","catch","err","getDestinationType","from","_PERSONAL_ROOM_","userId","device","orgId","options","VALID_EMAIL_ADDRESS","email","list","items","hydraId","_MEETING_LINK_","_SIP_URI_","_CONVERSATION_URL_","wasHydraPerson","resolve","waitForCatalog","conversationUrl","conversation","getUrlFromClusterId","getRequestBody","password","captchaInfo","installedOrgID","body","supportHostKey","supportCountryList","sipUrl","_MEETING_ID_","meetingKey","_LOCUS_ID_","info","webExMeetingId","meetingUrl","_MEETING_UUID_","meetingUUID","captchaID","captchaVerifyCode","code","getWebexSite","uri","exceptedDomains","site","match","getDirectMeetingInfoURI","preferredWebexSite","webExSite"],"sources":["utilv2.ts"],"sourcesContent":["import url from 'url';\n\nimport {\n // @ts-ignore\n deconstructHydraId,\n} from '@webex/common';\n\nimport {\n _SIP_URI_,\n _PERSONAL_ROOM_,\n _MEETING_ID_,\n _CONVERSATION_URL_,\n _LOCUS_ID_,\n _MEETING_LINK_,\n _PEOPLE_,\n _ROOM_,\n _MEETING_UUID_,\n DIALER_REGEX,\n WEBEX_DOT_COM,\n CONVERSATION_SERVICE,\n JOIN,\n MEET,\n MEET_M,\n HTTPS_PROTOCOL,\n UUID_REG,\n VALID_EMAIL_ADDRESS,\n} from '../constants';\nimport ParameterError from '../common/errors/parameter';\nimport LoggerProxy from '../common/logs/logger-proxy';\n\nconst MeetingInfoUtil: any = {};\n\nMeetingInfoUtil.getParsedUrl = (link) => {\n try {\n let parsedUrl = url.parse(link);\n\n if (!parsedUrl) {\n return false;\n }\n // hack for links such as <company>.webex.com/meet/<user> without a protocol\n if (!parsedUrl.protocol) {\n parsedUrl = url.parse(`${HTTPS_PROTOCOL}${link}`);\n }\n\n return parsedUrl;\n } catch (error) {\n LoggerProxy.logger.warn(\n `Meeting-info:util#getParsedUrl --> unable to parse the URL, error: ${error}`\n );\n\n return null;\n }\n};\n\n/**\n * Helper function to check if a string matches a known meeting link pattern\n * @param {String} value string to parse and see if it matches a meeting link\n * @returns {Boolean}\n */\nMeetingInfoUtil.isMeetingLink = (value: string) => {\n const parsedUrl = MeetingInfoUtil.getParsedUrl(value);\n const hostNameBool = parsedUrl.hostname && parsedUrl.hostname.includes(WEBEX_DOT_COM);\n const pathNameBool =\n parsedUrl.pathname &&\n (parsedUrl.pathname.includes(`/${MEET}`) ||\n parsedUrl.pathname.includes(`/${MEET_M}`) ||\n parsedUrl.pathname.includes(`/${JOIN}`));\n\n return hostNameBool && pathNameBool;\n};\n\nMeetingInfoUtil.isConversationUrl = (value, webex) => {\n const clusterId = webex.internal.services.getClusterId(value);\n\n if (clusterId) {\n return clusterId.endsWith(CONVERSATION_SERVICE);\n }\n\n return false;\n};\n\nMeetingInfoUtil.isSipUri = (sipString) => {\n // TODO: lets remove regex from this equation and user URI matchers and such\n // have not found a great sip uri parser library as of now\n const sipUri = DIALER_REGEX.SIP_ADDRESS.exec(sipString);\n\n return sipUri;\n};\n\nMeetingInfoUtil.isPhoneNumber = (phoneNumber) => {\n const isValidNumber = DIALER_REGEX.PHONE_NUMBER.test(phoneNumber);\n\n return isValidNumber;\n};\n\nMeetingInfoUtil.getHydraId = (destination) => {\n const {type, id, cluster} = deconstructHydraId(destination);\n\n if (id && UUID_REG.test(id)) {\n if (type === _ROOM_) {\n return {room: true, destination: id, cluster};\n }\n if (type === _PEOPLE_) {\n return {people: true, destination: id, cluster};\n }\n\n return {};\n }\n\n return {};\n};\n\nMeetingInfoUtil.getSipUriFromHydraPersonId = (destination, webex) =>\n webex.people\n .get(destination)\n .then((res) => {\n if (res.emails && res.emails.length) {\n return res.emails[0];\n }\n throw new ParameterError('Hydra Id Lookup was an invalid hydra person id.');\n })\n .catch((err) => {\n LoggerProxy.logger.error(\n `Meeting-info:util#MeetingInfoUtil.getSipUriFromHydraPersonId --> getSipUriFromHydraPersonId ${err} `\n );\n throw err;\n });\n\nMeetingInfoUtil.getDestinationType = async (from) => {\n const {type, webex} = from;\n let {destination} = from;\n\n if (type === _PERSONAL_ROOM_) {\n // this case checks if your type is personal room\n if (!destination) {\n // if we are not getting anything in desination we fetch org and user ids from webex instance\n destination = {\n userId: webex.internal.device.userId,\n orgId: webex.internal.device.orgId,\n };\n } else {\n const options = VALID_EMAIL_ADDRESS.test(destination)\n ? {email: destination}\n : {id: destination}; // we are assuming userId as default\n const res = await webex.people.list(options);\n\n let {orgId, id: userId} = res.items[0];\n\n userId = deconstructHydraId(userId).id;\n orgId = deconstructHydraId(orgId).id;\n destination = {userId, orgId};\n }\n }\n if (type) {\n return {\n destination,\n type,\n };\n }\n const options: any = {};\n const hydraId = MeetingInfoUtil.getHydraId(destination);\n\n if (MeetingInfoUtil.isMeetingLink(destination)) {\n LoggerProxy.logger.warn(\n 'Meeting-info:util#generateOptions --> WARN, use of Meeting Link is deprecated, please use a SIP URI instead'\n );\n\n options.type = _MEETING_LINK_;\n options.destination = destination;\n } else if (MeetingInfoUtil.isSipUri(destination)) {\n options.type = _SIP_URI_;\n options.destination = destination;\n } else if (MeetingInfoUtil.isPhoneNumber(destination)) {\n options.type = _SIP_URI_;\n options.destination = destination;\n } else if (MeetingInfoUtil.isConversationUrl(destination, webex)) {\n options.type = _CONVERSATION_URL_;\n options.destination = destination;\n } else if (hydraId.people) {\n options.type = _SIP_URI_;\n\n return MeetingInfoUtil.getSipUriFromHydraPersonId(hydraId.destination, webex).then((res) => {\n options.destination = res;\n\n // Since hydra person ids require a unique case in which they are\n // entirely converted to a SIP URI, we need to set a flag for detecting\n // this type of destination.\n options.wasHydraPerson = true;\n\n return Promise.resolve(options);\n });\n } else if (hydraId.room) {\n options.type = _CONVERSATION_URL_;\n try {\n await webex.internal.services.waitForCatalog('postauth');\n\n const conversationUrl = webex.internal.conversation.getUrlFromClusterId({\n cluster: hydraId.cluster,\n id: hydraId.destination,\n });\n\n options.destination = conversationUrl;\n } catch (e) {\n LoggerProxy.logger.error(`Meeting-info:util#getDestinationType --> ${e}`);\n throw e;\n }\n } else {\n LoggerProxy.logger.warn(\n \"Meeting-info:util#getDestinationType --> ('MeetingInfo is fetched with meeting link, sip uri, phone number, hydra room id, hydra people id, or a conversation url.\"\n );\n throw new ParameterError(\n 'MeetingInfo is fetched with meeting link, sip uri, phone number, hydra room id, hydra people id, or a conversation url.'\n );\n }\n\n return Promise.resolve(options);\n};\n\n/**\n * Helper function to build up a correct locus url depending on the value passed\n * @param {Object} options type and value to fetch meeting info\n * @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]\n * @param {Object} options.destination ?? value.value\n * @returns {Object} returns an object with {resource, method}\n */\nMeetingInfoUtil.getRequestBody = (options: {type: string; destination: object} | any) => {\n const {type, destination, password, captchaInfo, installedOrgID} = options;\n const body: any = {\n supportHostKey: true,\n supportCountryList: true,\n };\n\n switch (type) {\n case _SIP_URI_:\n body.sipUrl = destination;\n break;\n case _PERSONAL_ROOM_:\n body.userId = destination.userId;\n body.orgId = destination.orgId;\n break;\n case _MEETING_ID_:\n body.meetingKey = destination;\n break;\n case _CONVERSATION_URL_:\n body.conversationUrl = destination;\n break;\n case _LOCUS_ID_:\n // use meetingID for the completer meeting info for the already started meeting\n if (destination.info?.webExMeetingId) {\n body.meetingKey = destination.info.webExMeetingId;\n } else if (destination.info?.sipUri) {\n body.sipUrl = destination.info.sipUri;\n }\n break;\n case _MEETING_LINK_:\n body.meetingUrl = destination;\n break;\n case _MEETING_UUID_: {\n body.meetingUUID = destination;\n break;\n }\n default:\n }\n\n if (password) {\n body.password = password;\n }\n\n if (captchaInfo) {\n body.captchaID = captchaInfo.id;\n body.captchaVerifyCode = captchaInfo.code;\n }\n\n if (installedOrgID) {\n body.installedOrgID = installedOrgID;\n }\n\n return body;\n};\n\n/**\n * Helper function to parse the webex site/host from a URI string.\n * @param {String} uri string (e.g. '10019857020@convergedats.webex.com')\n * @returns {String} the site/host part of the URI string (e.g. 'convergedats.webex.com')\n */\nMeetingInfoUtil.getWebexSite = (uri: string) => {\n const exceptedDomains = ['meet.webex.com', 'meetup.webex.com', 'ciscospark.com'];\n const site = uri?.match(/.+@([^.]+\\.[^.]+\\.[^.]+)$/)?.[1];\n\n return exceptedDomains.includes(site) ? null : site;\n};\n\n/**\n * Helper function to return the direct URI for fetching meeting info (to avoid a redirect).\n * @param {Object} options type and value to fetch meeting info\n * @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]\n * @param {Object} options.destination ?? value.value\n * @returns {String} returns a URI string or null of there is no direct URI\n */\nMeetingInfoUtil.getDirectMeetingInfoURI = (options: {type: string; destination: any}) => {\n const {type, destination} = options;\n\n let preferredWebexSite = null;\n\n switch (type) {\n case _SIP_URI_:\n preferredWebexSite = MeetingInfoUtil.getWebexSite(destination);\n break;\n case _LOCUS_ID_:\n preferredWebexSite = destination.info?.webExSite;\n break;\n default:\n }\n\n return preferredWebexSite ? `https://${preferredWebexSite}/wbxappapi/v1/meetingInfo` : null;\n};\n\nexport default MeetingInfoUtil;\n"],"mappings":";;;;;;;;;;;AAAA;AAEA;AAKA;AAoBA;AACA;AAEA,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AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACAvF,eAAe,CAACsG,YAAY,GAAG,UAACC,GAAW,EAAK;EAAA;EAC9C,IAAMC,eAAe,GAAG,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,CAAC;EAChF,IAAMC,IAAI,GAAGF,GAAG,aAAHA,GAAG,qCAAHA,GAAG,CAAEG,KAAK,CAAC,2BAA2B,CAAC,+CAAvC,WAA0C,CAAC,CAAC;EAEzD,OAAOF,eAAe,CAACxF,QAAQ,CAACyF,IAAI,CAAC,GAAG,IAAI,GAAGA,IAAI;AACrD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACAzG,eAAe,CAAC2G,uBAAuB,GAAG,UAACvC,OAAyC,EAAK;EAAA;EACvF,IAAOvB,IAAI,GAAiBuB,OAAO,CAA5BvB,IAAI;IAAEF,WAAW,GAAIyB,OAAO,CAAtBzB,WAAW;EAExB,IAAIiE,kBAAkB,GAAG,IAAI;EAE7B,QAAQ/D,IAAI;IACV,KAAK8B,oBAAS;MACZiC,kBAAkB,GAAG5G,eAAe,CAACsG,YAAY,CAAC3D,WAAW,CAAC;MAC9D;IACF,KAAKkD,qBAAU;MACbe,kBAAkB,yBAAGjE,WAAW,CAACmD,IAAI,uDAAhB,mBAAkBe,SAAS;MAChD;IACF;EAAQ;EAGV,OAAOD,kBAAkB,qBAAcA,kBAAkB,iCAA8B,IAAI;AAC7F,CAAC;AAAC,eAEa5G,eAAe;AAAA"}
|
|
1
|
+
{"version":3,"names":["MeetingInfoUtil","getParsedUrl","link","parsedUrl","url","parse","protocol","HTTPS_PROTOCOL","error","LoggerProxy","logger","warn","isMeetingLink","value","hostNameBool","hostname","includes","WEBEX_DOT_COM","pathNameBool","pathname","MEET","MEET_M","JOIN","isConversationUrl","webex","clusterId","internal","services","getClusterId","endsWith","CONVERSATION_SERVICE","isSipUri","sipString","sipUri","DIALER_REGEX","SIP_ADDRESS","exec","isPhoneNumber","phoneNumber","isValidNumber","PHONE_NUMBER","test","getHydraId","destination","deconstructHydraId","type","id","cluster","UUID_REG","_ROOM_","room","_PEOPLE_","people","getSipUriFromHydraPersonId","get","then","res","emails","length","ParameterError","catch","err","getDestinationType","from","_PERSONAL_ROOM_","userId","device","orgId","options","VALID_EMAIL_ADDRESS","email","list","items","hydraId","_MEETING_LINK_","_SIP_URI_","_CONVERSATION_URL_","wasHydraPerson","resolve","waitForCatalog","conversationUrl","conversation","getUrlFromClusterId","getRequestBody","password","captchaInfo","installedOrgID","body","DEFAULT_MEETING_INFO_REQUEST_BODY","sipUrl","_MEETING_ID_","meetingKey","_LOCUS_ID_","info","webExMeetingId","meetingUrl","_MEETING_UUID_","meetingUUID","captchaID","captchaVerifyCode","code","getWebexSite","uri","exceptedDomains","site","match","getDirectMeetingInfoURI","preferredWebexSite","webExSite"],"sources":["utilv2.ts"],"sourcesContent":["import url from 'url';\n\nimport {\n // @ts-ignore\n deconstructHydraId,\n} from '@webex/common';\n\nimport {\n _SIP_URI_,\n _PERSONAL_ROOM_,\n _MEETING_ID_,\n _CONVERSATION_URL_,\n _LOCUS_ID_,\n _MEETING_LINK_,\n _PEOPLE_,\n _ROOM_,\n _MEETING_UUID_,\n DIALER_REGEX,\n WEBEX_DOT_COM,\n CONVERSATION_SERVICE,\n JOIN,\n MEET,\n MEET_M,\n HTTPS_PROTOCOL,\n UUID_REG,\n VALID_EMAIL_ADDRESS,\n DEFAULT_MEETING_INFO_REQUEST_BODY,\n} from '../constants';\nimport ParameterError from '../common/errors/parameter';\nimport LoggerProxy from '../common/logs/logger-proxy';\n\nconst MeetingInfoUtil: any = {};\n\nMeetingInfoUtil.getParsedUrl = (link) => {\n try {\n let parsedUrl = url.parse(link);\n\n if (!parsedUrl) {\n return false;\n }\n // hack for links such as <company>.webex.com/meet/<user> without a protocol\n if (!parsedUrl.protocol) {\n parsedUrl = url.parse(`${HTTPS_PROTOCOL}${link}`);\n }\n\n return parsedUrl;\n } catch (error) {\n LoggerProxy.logger.warn(\n `Meeting-info:util#getParsedUrl --> unable to parse the URL, error: ${error}`\n );\n\n return null;\n }\n};\n\n/**\n * Helper function to check if a string matches a known meeting link pattern\n * @param {String} value string to parse and see if it matches a meeting link\n * @returns {Boolean}\n */\nMeetingInfoUtil.isMeetingLink = (value: string) => {\n const parsedUrl = MeetingInfoUtil.getParsedUrl(value);\n const hostNameBool = parsedUrl.hostname && parsedUrl.hostname.includes(WEBEX_DOT_COM);\n const pathNameBool =\n parsedUrl.pathname &&\n (parsedUrl.pathname.includes(`/${MEET}`) ||\n parsedUrl.pathname.includes(`/${MEET_M}`) ||\n parsedUrl.pathname.includes(`/${JOIN}`));\n\n return hostNameBool && pathNameBool;\n};\n\nMeetingInfoUtil.isConversationUrl = (value, webex) => {\n const clusterId = webex.internal.services.getClusterId(value);\n\n if (clusterId) {\n return clusterId.endsWith(CONVERSATION_SERVICE);\n }\n\n return false;\n};\n\nMeetingInfoUtil.isSipUri = (sipString) => {\n // TODO: lets remove regex from this equation and user URI matchers and such\n // have not found a great sip uri parser library as of now\n const sipUri = DIALER_REGEX.SIP_ADDRESS.exec(sipString);\n\n return sipUri;\n};\n\nMeetingInfoUtil.isPhoneNumber = (phoneNumber) => {\n const isValidNumber = DIALER_REGEX.PHONE_NUMBER.test(phoneNumber);\n\n return isValidNumber;\n};\n\nMeetingInfoUtil.getHydraId = (destination) => {\n const {type, id, cluster} = deconstructHydraId(destination);\n\n if (id && UUID_REG.test(id)) {\n if (type === _ROOM_) {\n return {room: true, destination: id, cluster};\n }\n if (type === _PEOPLE_) {\n return {people: true, destination: id, cluster};\n }\n\n return {};\n }\n\n return {};\n};\n\nMeetingInfoUtil.getSipUriFromHydraPersonId = (destination, webex) =>\n webex.people\n .get(destination)\n .then((res) => {\n if (res.emails && res.emails.length) {\n return res.emails[0];\n }\n throw new ParameterError('Hydra Id Lookup was an invalid hydra person id.');\n })\n .catch((err) => {\n LoggerProxy.logger.error(\n `Meeting-info:util#MeetingInfoUtil.getSipUriFromHydraPersonId --> getSipUriFromHydraPersonId ${err} `\n );\n throw err;\n });\n\nMeetingInfoUtil.getDestinationType = async (from) => {\n const {type, webex} = from;\n let {destination} = from;\n\n if (type === _PERSONAL_ROOM_) {\n // this case checks if your type is personal room\n if (!destination) {\n // if we are not getting anything in desination we fetch org and user ids from webex instance\n destination = {\n userId: webex.internal.device.userId,\n orgId: webex.internal.device.orgId,\n };\n } else {\n const options = VALID_EMAIL_ADDRESS.test(destination)\n ? {email: destination}\n : {id: destination}; // we are assuming userId as default\n const res = await webex.people.list(options);\n\n let {orgId, id: userId} = res.items[0];\n\n userId = deconstructHydraId(userId).id;\n orgId = deconstructHydraId(orgId).id;\n destination = {userId, orgId};\n }\n }\n if (type) {\n return {\n destination,\n type,\n };\n }\n const options: any = {};\n const hydraId = MeetingInfoUtil.getHydraId(destination);\n\n if (MeetingInfoUtil.isMeetingLink(destination)) {\n LoggerProxy.logger.warn(\n 'Meeting-info:util#generateOptions --> WARN, use of Meeting Link is deprecated, please use a SIP URI instead'\n );\n\n options.type = _MEETING_LINK_;\n options.destination = destination;\n } else if (MeetingInfoUtil.isSipUri(destination)) {\n options.type = _SIP_URI_;\n options.destination = destination;\n } else if (MeetingInfoUtil.isPhoneNumber(destination)) {\n options.type = _SIP_URI_;\n options.destination = destination;\n } else if (MeetingInfoUtil.isConversationUrl(destination, webex)) {\n options.type = _CONVERSATION_URL_;\n options.destination = destination;\n } else if (hydraId.people) {\n options.type = _SIP_URI_;\n\n return MeetingInfoUtil.getSipUriFromHydraPersonId(hydraId.destination, webex).then((res) => {\n options.destination = res;\n\n // Since hydra person ids require a unique case in which they are\n // entirely converted to a SIP URI, we need to set a flag for detecting\n // this type of destination.\n options.wasHydraPerson = true;\n\n return Promise.resolve(options);\n });\n } else if (hydraId.room) {\n options.type = _CONVERSATION_URL_;\n try {\n await webex.internal.services.waitForCatalog('postauth');\n\n const conversationUrl = webex.internal.conversation.getUrlFromClusterId({\n cluster: hydraId.cluster,\n id: hydraId.destination,\n });\n\n options.destination = conversationUrl;\n } catch (e) {\n LoggerProxy.logger.error(`Meeting-info:util#getDestinationType --> ${e}`);\n throw e;\n }\n } else {\n LoggerProxy.logger.warn(\n \"Meeting-info:util#getDestinationType --> ('MeetingInfo is fetched with meeting link, sip uri, phone number, hydra room id, hydra people id, or a conversation url.\"\n );\n throw new ParameterError(\n 'MeetingInfo is fetched with meeting link, sip uri, phone number, hydra room id, hydra people id, or a conversation url.'\n );\n }\n\n return Promise.resolve(options);\n};\n\n/**\n * Helper function to build up a correct locus url depending on the value passed\n * @param {Object} options type and value to fetch meeting info\n * @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]\n * @param {Object} options.destination ?? value.value\n * @returns {Object} returns an object with {resource, method}\n */\nMeetingInfoUtil.getRequestBody = (options: {type: string; destination: object} | any) => {\n const {type, destination, password, captchaInfo, installedOrgID} = options;\n const body: any = {...DEFAULT_MEETING_INFO_REQUEST_BODY};\n\n switch (type) {\n case _SIP_URI_:\n body.sipUrl = destination;\n break;\n case _PERSONAL_ROOM_:\n body.userId = destination.userId;\n body.orgId = destination.orgId;\n break;\n case _MEETING_ID_:\n body.meetingKey = destination;\n break;\n case _CONVERSATION_URL_:\n body.conversationUrl = destination;\n break;\n case _LOCUS_ID_:\n // use meetingID for the completer meeting info for the already started meeting\n if (destination.info?.webExMeetingId) {\n body.meetingKey = destination.info.webExMeetingId;\n } else if (destination.info?.sipUri) {\n body.sipUrl = destination.info.sipUri;\n }\n break;\n case _MEETING_LINK_:\n body.meetingUrl = destination;\n break;\n case _MEETING_UUID_: {\n body.meetingUUID = destination;\n break;\n }\n default:\n }\n\n if (password) {\n body.password = password;\n }\n\n if (captchaInfo) {\n body.captchaID = captchaInfo.id;\n body.captchaVerifyCode = captchaInfo.code;\n }\n\n if (installedOrgID) {\n body.installedOrgID = installedOrgID;\n }\n\n return body;\n};\n\n/**\n * Helper function to parse the webex site/host from a URI string.\n * @param {String} uri string (e.g. '10019857020@convergedats.webex.com')\n * @returns {String} the site/host part of the URI string (e.g. 'convergedats.webex.com')\n */\nMeetingInfoUtil.getWebexSite = (uri: string) => {\n const exceptedDomains = ['meet.webex.com', 'meetup.webex.com', 'ciscospark.com'];\n const site = uri?.match(/.+@([^.]+\\.[^.]+\\.[^.]+)$/)?.[1];\n\n return exceptedDomains.includes(site) ? null : site;\n};\n\n/**\n * Helper function to return the direct URI for fetching meeting info (to avoid a redirect).\n * @param {Object} options type and value to fetch meeting info\n * @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]\n * @param {Object} options.destination ?? value.value\n * @returns {String} returns a URI string or null of there is no direct URI\n */\nMeetingInfoUtil.getDirectMeetingInfoURI = (options: {type: string; destination: any}) => {\n const {type, destination} = options;\n\n let preferredWebexSite = null;\n\n switch (type) {\n case _SIP_URI_:\n preferredWebexSite = MeetingInfoUtil.getWebexSite(destination);\n break;\n case _LOCUS_ID_:\n preferredWebexSite = destination.info?.webExSite;\n break;\n default:\n }\n\n return preferredWebexSite ? `https://${preferredWebexSite}/wbxappapi/v1/meetingInfo` : null;\n};\n\nexport default MeetingInfoUtil;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAEA;AAKA;AAqBA;AACA;AAAsD;AAAA;AAEtD,IAAMA,eAAoB,GAAG,CAAC,CAAC;AAE/BA,eAAe,CAACC,YAAY,GAAG,UAACC,IAAI,EAAK;EACvC,IAAI;IACF,IAAIC,SAAS,GAAGC,YAAG,CAACC,KAAK,CAACH,IAAI,CAAC;IAE/B,IAAI,CAACC,SAAS,EAAE;MACd,OAAO,KAAK;IACd;IACA;IACA,IAAI,CAACA,SAAS,CAACG,QAAQ,EAAE;MACvBH,SAAS,GAAGC,YAAG,CAACC,KAAK,WAAIE,yBAAc,SAAGL,IAAI,EAAG;IACnD;IAEA,OAAOC,SAAS;EAClB,CAAC,CAAC,OAAOK,KAAK,EAAE;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G,uBAAuB,GAAG,UAACtC,OAAyC,EAAK;EAAA;EACvF,IAAOvB,IAAI,GAAiBuB,OAAO,CAA5BvB,IAAI;IAAEF,WAAW,GAAIyB,OAAO,CAAtBzB,WAAW;EAExB,IAAIgE,kBAAkB,GAAG,IAAI;EAE7B,QAAQ9D,IAAI;IACV,KAAK8B,oBAAS;MACZgC,kBAAkB,GAAG3G,eAAe,CAACqG,YAAY,CAAC1D,WAAW,CAAC;MAC9D;IACF,KAAKiD,qBAAU;MACbe,kBAAkB,yBAAGhE,WAAW,CAACkD,IAAI,uDAAhB,mBAAkBe,SAAS;MAChD;IACF;EAAQ;EAGV,OAAOD,kBAAkB,qBAAcA,kBAAkB,iCAA8B,IAAI;AAC7F,CAAC;AAAC,eAEa3G,eAAe;AAAA"}
|
package/dist/members/index.js
CHANGED
|
@@ -951,6 +951,29 @@ var Members = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
951
951
|
});
|
|
952
952
|
return csis;
|
|
953
953
|
}
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Edit display name of participants in a meeting
|
|
957
|
+
* @param {string} memberId - id of the participant who is receiving request
|
|
958
|
+
* @param {string} requestingParticipantId - id of the participant who is sending request (optional)
|
|
959
|
+
* @param {string} [alias] - alias name
|
|
960
|
+
* @returns {Promise}
|
|
961
|
+
* @public
|
|
962
|
+
* @memberof Members
|
|
963
|
+
*/
|
|
964
|
+
}, {
|
|
965
|
+
key: "editDisplayName",
|
|
966
|
+
value: function editDisplayName(memberId, requestingParticipantId, alias) {
|
|
967
|
+
if (!this.locusUrl) {
|
|
968
|
+
return _promise.default.reject(new _parameter.default('The associated locus url for this meetings members object must be defined.'));
|
|
969
|
+
}
|
|
970
|
+
if (!memberId) {
|
|
971
|
+
return _promise.default.reject(new _parameter.default('The member id must be defined to edit display name of the member.'));
|
|
972
|
+
}
|
|
973
|
+
var locusUrl = this.locusUrl;
|
|
974
|
+
var options = _util.default.generateEditDisplayNameMemberOptions(memberId, requestingParticipantId, alias, locusUrl);
|
|
975
|
+
return this.membersRequest.editDisplayNameMember(options);
|
|
976
|
+
}
|
|
954
977
|
}]);
|
|
955
978
|
return Members;
|
|
956
979
|
}(_webexCore.StatelessWebexPlugin);
|