@webex/plugin-meetings 3.0.0-stream-classes.4 → 3.0.0
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/.eslintrc.js +6 -0
- package/README.md +12 -0
- package/babel.config.js +3 -0
- package/dist/annotation/constants.js +12 -20
- package/dist/annotation/constants.js.map +1 -1
- package/dist/annotation/index.js +25 -10
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +2 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/collection.js +1 -2
- package/dist/breakouts/collection.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +1 -2
- package/dist/breakouts/edit-lock-error.js.map +1 -1
- package/dist/breakouts/events.js +1 -2
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +13 -14
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +1 -2
- package/dist/breakouts/request.js.map +1 -1
- package/dist/breakouts/utils.js +3 -6
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/browser-detection.js +2 -3
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +3 -4
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +1 -2
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +1 -2
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +1 -2
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +1 -2
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +1 -2
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/common/errors/no-meeting-info.js +50 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +3 -4
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +1 -2
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +1 -2
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/common/errors/reclaim-host-role-errors.js +154 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +1 -2
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +1 -2
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +1 -2
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/{types/common → common}/errors/webex-errors.d.ts +13 -1
- package/dist/common/errors/webex-errors.js +35 -16
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -2
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +1 -2
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +1 -2
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +1 -2
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +1 -2
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +1 -2
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -2
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/{types/common → common}/logs/request.d.ts +3 -1
- package/dist/common/logs/request.js +8 -5
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +2 -4
- package/dist/common/queue.js.map +1 -1
- package/dist/{types/config.d.ts → config.d.ts} +1 -1
- package/dist/config.js +3 -3
- package/dist/config.js.map +1 -1
- package/dist/{types/constants.d.ts → constants.d.ts} +72 -15
- package/dist/constants.js +254 -371
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +3 -6
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +7 -10
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +27 -32
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +1 -2
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.d.ts +2 -0
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/locusRetry.d.ts +27 -0
- package/dist/interceptors/locusRetry.js +94 -0
- package/dist/interceptors/locusRetry.js.map +1 -0
- package/dist/interpretation/collection.js +1 -2
- package/dist/interpretation/collection.js.map +1 -1
- package/dist/interpretation/index.js +2 -3
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +2 -3
- package/dist/interpretation/siLanguage.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +12 -13
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -4
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +1 -2
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +1 -2
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/{types/locus-info → locus-info}/index.d.ts +1 -1
- package/dist/locus-info/index.js +63 -38
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +3 -4
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +16 -3
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/{types/locus-info → locus-info}/parser.d.ts +3 -2
- package/dist/locus-info/parser.js +48 -31
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +7 -6
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +15 -10
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +16 -7
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +1 -2
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.d.ts +241 -0
- package/dist/mediaQualityMetrics/config.js +135 -339
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/{types/meeting → meeting}/in-meeting-actions.d.ts +4 -0
- package/dist/meeting/in-meeting-actions.js +18 -2
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/{types/meeting → meeting}/index.d.ts +331 -44
- package/dist/meeting/index.js +2639 -1367
- package/dist/meeting/index.js.map +1 -1
- package/dist/{types/meeting → meeting}/locusMediaRequest.d.ts +1 -2
- package/dist/meeting/locusMediaRequest.js +4 -5
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +2 -4
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/{types/meeting → meeting}/request.d.ts +4 -1
- package/dist/meeting/request.js +47 -32
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/state.js +1 -2
- package/dist/meeting/state.js.map +1 -1
- package/dist/{types/meeting → meeting}/util.d.ts +26 -1
- package/dist/meeting/util.js +83 -10
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.d.ts +16 -0
- package/dist/meeting/voicea-meeting.js +169 -0
- package/dist/meeting/voicea-meeting.js.map +1 -0
- package/dist/meeting-info/collection.js +3 -4
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/{types/meeting-info → meeting-info}/index.d.ts +7 -0
- package/dist/meeting-info/index.js +53 -27
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/{types/meeting-info → meeting-info}/meeting-info-v2.d.ts +1 -0
- package/dist/meeting-info/meeting-info-v2.js +52 -33
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +8 -8
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +12 -9
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/{types/meetings → meetings}/collection.d.ts +9 -0
- package/dist/meetings/collection.js +21 -5
- package/dist/meetings/collection.js.map +1 -1
- package/dist/{types/meetings → meetings}/index.d.ts +45 -16
- package/dist/meetings/index.js +166 -74
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +2 -3
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +3 -10
- package/dist/meetings/util.js.map +1 -1
- package/dist/{types/member → member}/index.d.ts +1 -0
- package/dist/member/index.js +10 -3
- package/dist/member/index.js.map +1 -1
- package/dist/member/member.types.d.ts +11 -0
- package/dist/member/member.types.js +17 -0
- package/dist/member/member.types.js.map +1 -0
- package/dist/member/types.js +6 -8
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +12 -2
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +25 -8
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +2 -3
- package/dist/members/request.js.map +1 -1
- package/dist/{types/members → members}/types.d.ts +1 -0
- package/dist/members/types.js +3 -4
- package/dist/members/types.js.map +1 -1
- package/dist/{types/members → members}/util.d.ts +6 -1
- package/dist/members/util.js +18 -8
- package/dist/members/util.js.map +1 -1
- package/dist/{types/metrics → metrics}/constants.d.ts +15 -0
- package/dist/metrics/constants.js +16 -3
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +3 -2
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +9 -11
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +3 -5
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +7 -9
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +3 -5
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +7 -6
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/{types/multistream → multistream}/remoteMediaManager.d.ts +9 -1
- package/dist/multistream/remoteMediaManager.js +74 -36
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +9 -6
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +1 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +2 -3
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -3
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +1 -2
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.d.ts +109 -0
- package/dist/reachability/clusterReachability.js +357 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.d.ts +105 -0
- package/dist/reachability/index.js +279 -436
- package/dist/reachability/index.js.map +1 -1
- package/dist/{types/reachability → reachability}/request.d.ts +1 -1
- package/dist/reachability/request.js +14 -11
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.d.ts +8 -0
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/reactions/constants.js +1 -2
- package/dist/reactions/constants.js.map +1 -1
- package/dist/reactions/reactions.js +2 -4
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +6 -8
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/{types/reconnection-manager → reconnection-manager}/index.d.ts +10 -0
- package/dist/reconnection-manager/index.js +129 -106
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +4 -5
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +43 -51
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +1 -2
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/{types/roap → roap}/index.d.ts +2 -1
- package/dist/roap/index.js +59 -28
- package/dist/roap/index.js.map +1 -1
- package/dist/{types/roap → roap}/request.d.ts +2 -1
- package/dist/roap/request.js +14 -22
- package/dist/roap/request.js.map +1 -1
- package/dist/{types/roap → roap}/turnDiscovery.d.ts +21 -4
- package/dist/roap/turnDiscovery.js +182 -89
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +1 -2
- package/dist/rtcMetrics/constants.js.map +1 -1
- package/dist/{types/rtcMetrics → rtcMetrics}/index.d.ts +15 -1
- package/dist/rtcMetrics/index.js +72 -12
- package/dist/rtcMetrics/index.js.map +1 -1
- package/dist/statsAnalyzer/global.js +1 -2
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/{types/statsAnalyzer → statsAnalyzer}/index.d.ts +28 -11
- package/dist/statsAnalyzer/index.js +371 -318
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/statsAnalyzer/mqaUtil.js +295 -162
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +1 -2
- package/dist/transcription/index.js.map +1 -1
- package/dist/webinar/collection.d.ts +16 -0
- package/dist/webinar/collection.js +43 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.d.ts +5 -0
- package/dist/webinar/index.js +68 -0
- package/dist/webinar/index.js.map +1 -0
- package/jest.config.js +3 -0
- package/package.json +44 -24
- package/process +1 -0
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/webex-errors.ts +19 -2
- package/src/common/logs/request.ts +5 -1
- package/src/config.ts +3 -5
- package/src/constants.ts +78 -8
- package/src/index.ts +4 -0
- package/src/interceptors/index.ts +3 -0
- package/src/interceptors/locusRetry.ts +67 -0
- package/src/locus-info/index.ts +52 -16
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/parser.ts +47 -21
- package/src/media/index.ts +8 -6
- package/src/media/properties.ts +17 -2
- package/src/mediaQualityMetrics/config.ts +103 -238
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +1692 -627
- package/src/meeting/request.ts +19 -1
- package/src/meeting/util.ts +102 -1
- package/src/meeting/voicea-meeting.ts +122 -0
- package/src/meeting-info/index.ts +47 -20
- package/src/meeting-info/meeting-info-v2.ts +32 -16
- package/src/meeting-info/util.ts +12 -9
- package/src/meeting-info/utilv2.ts +25 -15
- package/src/meetings/collection.ts +13 -0
- package/src/meetings/index.ts +112 -31
- package/src/meetings/util.ts +2 -8
- package/src/member/index.ts +9 -1
- package/src/member/member.types.ts +13 -0
- package/src/member/util.ts +14 -0
- package/src/members/index.ts +29 -2
- package/src/members/types.ts +1 -0
- package/src/members/util.ts +15 -1
- package/src/metrics/constants.ts +14 -0
- package/src/multistream/remoteMediaManager.ts +41 -4
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +221 -382
- package/src/reachability/request.ts +1 -1
- package/src/reachability/util.ts +24 -0
- package/src/reconnection-manager/index.ts +87 -83
- package/src/roap/index.ts +60 -24
- package/src/roap/request.ts +4 -17
- package/src/roap/turnDiscovery.ts +112 -39
- package/src/rtcMetrics/index.ts +71 -5
- package/src/statsAnalyzer/index.ts +430 -427
- package/src/statsAnalyzer/mqaUtil.ts +317 -168
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +7 -7
- package/test/integration/spec/journey.js +88 -106
- package/test/integration/spec/space-meeting.js +10 -10
- package/test/unit/spec/breakouts/breakout.ts +2 -1
- package/test/unit/spec/breakouts/index.ts +7 -4
- package/test/unit/spec/interceptors/locusRetry.ts +131 -0
- package/test/unit/spec/locus-info/index.js +206 -13
- package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +10 -0
- package/test/unit/spec/locus-info/parser.js +54 -13
- package/test/unit/spec/locus-info/selfUtils.js +1 -1
- package/test/unit/spec/media/index.ts +25 -4
- package/test/unit/spec/media/properties.ts +2 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +4354 -1285
- package/test/unit/spec/meeting/request.js +63 -12
- package/test/unit/spec/meeting/utils.js +145 -10
- package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
- package/test/unit/spec/meeting-info/index.js +180 -61
- package/test/unit/spec/meeting-info/meetinginfov2.js +216 -68
- package/test/unit/spec/meetings/collection.js +12 -0
- package/test/unit/spec/meetings/index.js +676 -195
- package/test/unit/spec/meetings/utils.js +35 -12
- package/test/unit/spec/member/index.js +8 -7
- package/test/unit/spec/member/util.js +32 -0
- package/test/unit/spec/members/index.js +130 -17
- package/test/unit/spec/members/utils.js +26 -0
- package/test/unit/spec/metrics/index.js +1 -2
- package/test/unit/spec/multistream/mediaRequestManager.ts +1 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +10 -2
- package/test/unit/spec/reachability/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +505 -135
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/reconnection-manager/index.js +74 -17
- package/test/unit/spec/recording-controller/index.js +0 -1
- package/test/unit/spec/roap/index.ts +181 -61
- package/test/unit/spec/roap/request.ts +27 -3
- package/test/unit/spec/roap/turnDiscovery.ts +363 -102
- package/test/unit/spec/rtcMetrics/index.ts +57 -3
- package/test/unit/spec/stats-analyzer/index.js +1225 -12
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/integrationTestUtils.js +4 -4
- package/test/utils/webex-test-users.js +12 -4
- package/dist/types/mediaQualityMetrics/config.d.ts +0 -365
- package/dist/types/reachability/index.d.ts +0 -158
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -24
- /package/dist/{types/annotation → annotation}/annotation.types.d.ts +0 -0
- /package/dist/{types/annotation → annotation}/constants.d.ts +0 -0
- /package/dist/{types/annotation → annotation}/index.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/breakout.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/collection.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/edit-lock-error.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/events.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/index.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/request.d.ts +0 -0
- /package/dist/{types/breakouts → breakouts}/utils.d.ts +0 -0
- /package/dist/{types/common → common}/browser-detection.d.ts +0 -0
- /package/dist/{types/common → common}/collection.d.ts +0 -0
- /package/dist/{types/common → common}/config.d.ts +0 -0
- /package/dist/{types/common → common}/errors/captcha-error.d.ts +0 -0
- /package/dist/{types/common → common}/errors/intent-to-join.d.ts +0 -0
- /package/dist/{types/common → common}/errors/join-meeting.d.ts +0 -0
- /package/dist/{types/common → common}/errors/media.d.ts +0 -0
- /package/dist/{types/common → common}/errors/parameter.d.ts +0 -0
- /package/dist/{types/common → common}/errors/password-error.d.ts +0 -0
- /package/dist/{types/common → common}/errors/permission.d.ts +0 -0
- /package/dist/{types/common → common}/errors/reconnection-in-progress.d.ts +0 -0
- /package/dist/{types/common → common}/errors/reconnection.d.ts +0 -0
- /package/dist/{types/common → common}/errors/stats.d.ts +0 -0
- /package/dist/{types/common → common}/errors/webex-meetings-error.d.ts +0 -0
- /package/dist/{types/common → common}/events/events-scope.d.ts +0 -0
- /package/dist/{types/common → common}/events/events.d.ts +0 -0
- /package/dist/{types/common → common}/events/trigger-proxy.d.ts +0 -0
- /package/dist/{types/common → common}/events/util.d.ts +0 -0
- /package/dist/{types/common → common}/logs/logger-config.d.ts +0 -0
- /package/dist/{types/common → common}/logs/logger-proxy.d.ts +0 -0
- /package/dist/{types/common → common}/queue.d.ts +0 -0
- /package/dist/{types/controls-options-manager → controls-options-manager}/constants.d.ts +0 -0
- /package/dist/{types/controls-options-manager → controls-options-manager}/enums.d.ts +0 -0
- /package/dist/{types/controls-options-manager → controls-options-manager}/index.d.ts +0 -0
- /package/dist/{types/controls-options-manager → controls-options-manager}/types.d.ts +0 -0
- /package/dist/{types/controls-options-manager → controls-options-manager}/util.d.ts +0 -0
- /package/dist/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/interpretation → interpretation}/collection.d.ts +0 -0
- /package/dist/{types/interpretation → interpretation}/index.d.ts +0 -0
- /package/dist/{types/interpretation → interpretation}/siLanguage.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/controlsUtils.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/embeddedAppsUtils.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/fullState.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/hostUtils.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/infoUtils.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/mediaSharesUtils.d.ts +0 -0
- /package/dist/{types/locus-info → locus-info}/selfUtils.d.ts +0 -0
- /package/dist/{types/media → media}/index.d.ts +0 -0
- /package/dist/{types/media → media}/properties.d.ts +0 -0
- /package/dist/{types/media → media}/util.d.ts +0 -0
- /package/dist/{types/meeting → meeting}/muteState.d.ts +0 -0
- /package/dist/{types/meeting → meeting}/request.type.d.ts +0 -0
- /package/dist/{types/meeting → meeting}/state.d.ts +0 -0
- /package/dist/{types/meeting-info → meeting-info}/collection.d.ts +0 -0
- /package/dist/{types/meeting-info → meeting-info}/request.d.ts +0 -0
- /package/dist/{types/meeting-info → meeting-info}/util.d.ts +0 -0
- /package/dist/{types/meeting-info → meeting-info}/utilv2.d.ts +0 -0
- /package/dist/{types/meetings → meetings}/meetings.types.d.ts +0 -0
- /package/dist/{types/meetings → meetings}/request.d.ts +0 -0
- /package/dist/{types/meetings → meetings}/util.d.ts +0 -0
- /package/dist/{types/member → member}/types.d.ts +0 -0
- /package/dist/{types/member → member}/util.d.ts +0 -0
- /package/dist/{types/members → members}/collection.d.ts +0 -0
- /package/dist/{types/members → members}/index.d.ts +0 -0
- /package/dist/{types/members → members}/request.d.ts +0 -0
- /package/dist/{types/metrics → metrics}/index.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/mediaRequestManager.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/receiveSlot.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/receiveSlotManager.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/remoteMedia.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/remoteMediaGroup.d.ts +0 -0
- /package/dist/{types/multistream → multistream}/sendSlotManager.d.ts +0 -0
- /package/dist/{types/networkQualityMonitor → networkQualityMonitor}/index.d.ts +0 -0
- /package/dist/{types/personal-meeting-room → personal-meeting-room}/index.d.ts +0 -0
- /package/dist/{types/personal-meeting-room → personal-meeting-room}/request.d.ts +0 -0
- /package/dist/{types/personal-meeting-room → personal-meeting-room}/util.d.ts +0 -0
- /package/dist/{types/reactions → reactions}/constants.d.ts +0 -0
- /package/dist/{types/reactions → reactions}/reactions.d.ts +0 -0
- /package/dist/{types/reactions → reactions}/reactions.type.d.ts +0 -0
- /package/dist/{types/recording-controller → recording-controller}/enums.d.ts +0 -0
- /package/dist/{types/recording-controller → recording-controller}/index.d.ts +0 -0
- /package/dist/{types/recording-controller → recording-controller}/util.d.ts +0 -0
- /package/dist/{types/rtcMetrics → rtcMetrics}/constants.d.ts +0 -0
- /package/dist/{types/statsAnalyzer → statsAnalyzer}/global.d.ts +0 -0
- /package/dist/{types/transcription → transcription}/index.d.ts +0 -0
- /package/test/unit/spec/locus-info/{selfConstant.js → lib/selfConstant.js} +0 -0
|
@@ -15,6 +15,8 @@ var _common = require("@webex/common");
|
|
|
15
15
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
16
16
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
17
17
|
var _constants = require("../constants");
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
|
|
18
20
|
var MeetingInfoUtil = {};
|
|
19
21
|
MeetingInfoUtil.extractDestination = function (destination, type) {
|
|
20
22
|
var dest = destination;
|
|
@@ -131,7 +133,7 @@ MeetingInfoUtil.getSipUriFromHydraPersonId = function (destination, webex) {
|
|
|
131
133
|
};
|
|
132
134
|
MeetingInfoUtil.generateOptions = /*#__PURE__*/function () {
|
|
133
135
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(from) {
|
|
134
|
-
var destination, type, webex, options, hydraId,
|
|
136
|
+
var destination, type, webex, options, hydraId, serviceUrl;
|
|
135
137
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
136
138
|
while (1) switch (_context.prev = _context.next) {
|
|
137
139
|
case 0:
|
|
@@ -208,11 +210,10 @@ MeetingInfoUtil.generateOptions = /*#__PURE__*/function () {
|
|
|
208
210
|
_context.next = 36;
|
|
209
211
|
return webex.internal.services.waitForCatalog('postauth');
|
|
210
212
|
case 36:
|
|
211
|
-
|
|
212
|
-
cluster: hydraId.cluster
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
options.destination = conversationUrl;
|
|
213
|
+
serviceUrl = webex.internal.services.getServiceUrlFromClusterId({
|
|
214
|
+
cluster: hydraId.cluster
|
|
215
|
+
}, webex);
|
|
216
|
+
options.destination = hydraId.destination ? "".concat(serviceUrl, "/conversations/").concat(hydraId.destination) : serviceUrl;
|
|
216
217
|
_context.next = 44;
|
|
217
218
|
break;
|
|
218
219
|
case 40:
|
|
@@ -296,6 +297,5 @@ MeetingInfoUtil.getRequestParams = function (resourceOptions, type, value, api)
|
|
|
296
297
|
}
|
|
297
298
|
return requestParams;
|
|
298
299
|
};
|
|
299
|
-
var _default = MeetingInfoUtil;
|
|
300
|
-
exports.default = _default;
|
|
300
|
+
var _default = exports.default = MeetingInfoUtil;
|
|
301
301
|
//# sourceMappingURL=util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingInfoUtil","extractDestination","destination","type","dest","_LOCUS_ID_","url","ParameterError","getParsedUrl","link","parsedUrl","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","convertLinkToSip","user","userIndex","lastIndexOf","substring","company","companyIndex","replace","WWW_DOT","isSipUri","sipString","sipUri","DIALER_REGEX","SIP_ADDRESS","exec","isPhoneNumber","phoneNumber","isValidNumber","PHONE_NUMBER","test","getHydraId","deconstructHydraId","id","cluster","UUID_REG","_ROOM_","room","_PEOPLE_","people","getSipUriFromHydraPersonId","get","then","res","emails","length","catch","err","generateOptions","from","options","hydraId","_MEETING_LINK_","_SIP_URI_","_CONVERSATION_URL_","wasHydraPerson","resolve","waitForCatalog","conversationUrl","conversation","getUrlFromClusterId","getResourceUrl","resource","LOCI","MEETINGINFO","method","HTTP_VERBS","GET","uri","_PERSONAL_ROOM_","_MEETING_ID_","encodeURIComponent","TYPE","USE_URI_LOOKUP_FALSE","PUT","btoa","getRequestParams","resourceOptions","api","requestParams","concat","ALTERNATE_REDIRECT_TRUE","body","lookupType"],"sources":["util.ts"],"sourcesContent":["import url from 'url';\n\nimport btoa from 'btoa';\nimport {\n // @ts-ignore\n deconstructHydraId,\n} from '@webex/common';\n\nimport ParameterError from '../common/errors/parameter';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n _SIP_URI_,\n _PERSONAL_ROOM_,\n _MEETING_ID_,\n _CONVERSATION_URL_,\n _LOCUS_ID_,\n _MEETING_LINK_,\n _PEOPLE_,\n _ROOM_,\n HTTP_VERBS,\n USE_URI_LOOKUP_FALSE,\n TYPE,\n LOCI,\n MEETINGINFO,\n ALTERNATE_REDIRECT_TRUE,\n DIALER_REGEX,\n WEBEX_DOT_COM,\n CONVERSATION_SERVICE,\n WWW_DOT,\n JOIN,\n MEET,\n MEET_M,\n HTTPS_PROTOCOL,\n UUID_REG,\n} from '../constants';\n\nconst MeetingInfoUtil: any = {};\n\nMeetingInfoUtil.extractDestination = (destination, type) => {\n let dest = destination;\n\n if (type === _LOCUS_ID_) {\n if (!(destination && destination.url)) {\n throw new ParameterError('You cannot create a meeting by locus without a locus.url defined');\n }\n dest = destination.url;\n }\n\n return dest;\n};\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.convertLinkToSip = (value) => {\n const parsedUrl = MeetingInfoUtil.getParsedUrl(value);\n\n if (!parsedUrl) {\n return null;\n }\n let user;\n\n if (parsedUrl.pathname) {\n const userIndex = parsedUrl.pathname.lastIndexOf('/');\n\n user = parsedUrl.pathname.substring(userIndex + 1);\n }\n if (!user) {\n return null;\n }\n let company;\n\n if (parsedUrl.hostname) {\n const companyIndex = parsedUrl.hostname.lastIndexOf(`.${WEBEX_DOT_COM}`);\n\n company = parsedUrl.hostname.substring(0, companyIndex).replace(WWW_DOT, '');\n }\n if (!company) {\n return null;\n }\n\n return `${user}@${company}.${WEBEX_DOT_COM}`;\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.generateOptions = async (from) => {\n const {destination, type, webex} = from;\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#generateOptions --> ${e}`);\n throw e;\n }\n } else {\n throw new ParameterError(\n 'MeetingInfo is fetched with the meeting link, SIP URI, phone number, 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 {String} type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]\n * @param {Object} value ?? value.value\n * @returns {Object} returns an object with {resource, method}\n */\nMeetingInfoUtil.getResourceUrl = (type: string, value: any) => {\n let resource = `/${LOCI}/${MEETINGINFO}`;\n let method = HTTP_VERBS.GET;\n let uri = null;\n\n switch (type) {\n case _SIP_URI_:\n case _PERSONAL_ROOM_:\n case _MEETING_ID_:\n resource = `/${LOCI}/${MEETINGINFO}/${encodeURIComponent(\n value\n )}?${TYPE}=${type}&${USE_URI_LOOKUP_FALSE}`;\n break;\n case _CONVERSATION_URL_:\n method = HTTP_VERBS.PUT;\n break;\n case _LOCUS_ID_:\n uri = `${value}/${MEETINGINFO}`;\n method = HTTP_VERBS.PUT;\n break;\n case _MEETING_LINK_:\n resource = `$/${LOCI}/${MEETINGINFO}/${btoa(\n value\n )}?${TYPE}=${_MEETING_LINK_}&${USE_URI_LOOKUP_FALSE}`;\n break;\n default:\n }\n\n return {\n uri,\n resource,\n method,\n };\n};\n\nMeetingInfoUtil.getRequestParams = (resourceOptions, type, value, api) => {\n let requestParams: any = {\n method: resourceOptions.method,\n api,\n resource: resourceOptions.resource,\n };\n\n if (resourceOptions.method === HTTP_VERBS.GET) {\n // for handling URL redirections\n requestParams.resource = requestParams.resource.concat(`&${ALTERNATE_REDIRECT_TRUE}`);\n } else if (type !== _LOCUS_ID_) {\n // locus id check is a PUT not sure why\n requestParams.resource = requestParams.resource.concat(`?${ALTERNATE_REDIRECT_TRUE}`);\n requestParams.body = {\n value,\n lookupType: type,\n };\n } else if (type === _LOCUS_ID_) {\n requestParams = {\n method: resourceOptions.method,\n uri: resourceOptions.uri,\n };\n }\n\n return requestParams;\n};\n\nexport default MeetingInfoUtil;\n"],"mappings":";;;;;;;;;;;AAAA;AAEA;AACA;AAKA;AACA;AACA;AA0BA,IAAMA,eAAoB,GAAG,CAAC,CAAC;AAE/BA,eAAe,CAACC,kBAAkB,GAAG,UAACC,WAAW,EAAEC,IAAI,EAAK;EAC1D,IAAIC,IAAI,GAAGF,WAAW;EAEtB,IAAIC,IAAI,KAAKE,qBAAU,EAAE;IACvB,IAAI,EAAEH,WAAW,IAAIA,WAAW,CAACI,GAAG,CAAC,EAAE;MACrC,MAAM,IAAIC,kBAAc,CAAC,kEAAkE,CAAC;IAC9F;IACAH,IAAI,GAAGF,WAAW,CAACI,GAAG;EACxB;EAEA,OAAOF,IAAI;AACb,CAAC;AAEDJ,eAAe,CAACQ,YAAY,GAAG,UAACC,IAAI,EAAK;EACvC,IAAI;IACF,IAAIC,SAAS,GAAGJ,YAAG,CAACK,KAAK,CAACF,IAAI,CAAC;IAE/B,IAAI,CAACC,SAAS,EAAE;MACd,OAAO,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
1
|
+
{"version":3,"names":["_url","_interopRequireDefault","require","_btoa","_common","_parameter","_loggerProxy","_constants","MeetingInfoUtil","extractDestination","destination","type","dest","_LOCUS_ID_","url","ParameterError","getParsedUrl","link","parsedUrl","parse","protocol","concat","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","convertLinkToSip","user","userIndex","lastIndexOf","substring","company","companyIndex","replace","WWW_DOT","isSipUri","sipString","sipUri","DIALER_REGEX","SIP_ADDRESS","exec","isPhoneNumber","phoneNumber","isValidNumber","PHONE_NUMBER","test","getHydraId","_deconstructHydraId","deconstructHydraId","id","cluster","UUID_REG","_ROOM_","room","_PEOPLE_","people","getSipUriFromHydraPersonId","get","then","res","emails","length","catch","err","generateOptions","_ref","_asyncToGenerator2","default","_regenerator","mark","_callee","from","options","hydraId","serviceUrl","wrap","_callee$","_context","prev","next","abrupt","_MEETING_LINK_","_SIP_URI_","_CONVERSATION_URL_","wasHydraPerson","_promise","resolve","waitForCatalog","getServiceUrlFromClusterId","t0","stop","_x","apply","arguments","getResourceUrl","resource","LOCI","MEETINGINFO","method","HTTP_VERBS","GET","uri","_PERSONAL_ROOM_","_MEETING_ID_","encodeURIComponent","TYPE","USE_URI_LOOKUP_FALSE","PUT","btoa","getRequestParams","resourceOptions","api","requestParams","ALTERNATE_REDIRECT_TRUE","body","lookupType","_default","exports"],"sources":["util.ts"],"sourcesContent":["import url from 'url';\n\nimport btoa from 'btoa';\n// @ts-ignore\nimport {deconstructHydraId} from '@webex/common';\n\nimport ParameterError from '../common/errors/parameter';\nimport LoggerProxy from '../common/logs/logger-proxy';\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 HTTP_VERBS,\n USE_URI_LOOKUP_FALSE,\n TYPE,\n LOCI,\n MEETINGINFO,\n ALTERNATE_REDIRECT_TRUE,\n DIALER_REGEX,\n WEBEX_DOT_COM,\n CONVERSATION_SERVICE,\n WWW_DOT,\n JOIN,\n MEET,\n MEET_M,\n HTTPS_PROTOCOL,\n UUID_REG,\n} from '../constants';\n\nconst MeetingInfoUtil: any = {};\n\nMeetingInfoUtil.extractDestination = (destination, type) => {\n let dest = destination;\n\n if (type === _LOCUS_ID_) {\n if (!(destination && destination.url)) {\n throw new ParameterError('You cannot create a meeting by locus without a locus.url defined');\n }\n dest = destination.url;\n }\n\n return dest;\n};\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.convertLinkToSip = (value) => {\n const parsedUrl = MeetingInfoUtil.getParsedUrl(value);\n\n if (!parsedUrl) {\n return null;\n }\n let user;\n\n if (parsedUrl.pathname) {\n const userIndex = parsedUrl.pathname.lastIndexOf('/');\n\n user = parsedUrl.pathname.substring(userIndex + 1);\n }\n if (!user) {\n return null;\n }\n let company;\n\n if (parsedUrl.hostname) {\n const companyIndex = parsedUrl.hostname.lastIndexOf(`.${WEBEX_DOT_COM}`);\n\n company = parsedUrl.hostname.substring(0, companyIndex).replace(WWW_DOT, '');\n }\n if (!company) {\n return null;\n }\n\n return `${user}@${company}.${WEBEX_DOT_COM}`;\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.generateOptions = async (from) => {\n const {destination, type, webex} = from;\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 serviceUrl = webex.internal.services.getServiceUrlFromClusterId(\n {\n cluster: hydraId.cluster,\n },\n webex\n );\n\n options.destination = hydraId.destination\n ? `${serviceUrl}/conversations/${hydraId.destination}`\n : serviceUrl;\n } catch (e) {\n LoggerProxy.logger.error(`Meeting-info:util#generateOptions --> ${e}`);\n throw e;\n }\n } else {\n throw new ParameterError(\n 'MeetingInfo is fetched with the meeting link, SIP URI, phone number, 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 {String} type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]\n * @param {Object} value ?? value.value\n * @returns {Object} returns an object with {resource, method}\n */\nMeetingInfoUtil.getResourceUrl = (type: string, value: any) => {\n let resource = `/${LOCI}/${MEETINGINFO}`;\n let method = HTTP_VERBS.GET;\n let uri = null;\n\n switch (type) {\n case _SIP_URI_:\n case _PERSONAL_ROOM_:\n case _MEETING_ID_:\n resource = `/${LOCI}/${MEETINGINFO}/${encodeURIComponent(\n value\n )}?${TYPE}=${type}&${USE_URI_LOOKUP_FALSE}`;\n break;\n case _CONVERSATION_URL_:\n method = HTTP_VERBS.PUT;\n break;\n case _LOCUS_ID_:\n uri = `${value}/${MEETINGINFO}`;\n method = HTTP_VERBS.PUT;\n break;\n case _MEETING_LINK_:\n resource = `$/${LOCI}/${MEETINGINFO}/${btoa(\n value\n )}?${TYPE}=${_MEETING_LINK_}&${USE_URI_LOOKUP_FALSE}`;\n break;\n default:\n }\n\n return {\n uri,\n resource,\n method,\n };\n};\n\nMeetingInfoUtil.getRequestParams = (resourceOptions, type, value, api) => {\n let requestParams: any = {\n method: resourceOptions.method,\n api,\n resource: resourceOptions.resource,\n };\n\n if (resourceOptions.method === HTTP_VERBS.GET) {\n // for handling URL redirections\n requestParams.resource = requestParams.resource.concat(`&${ALTERNATE_REDIRECT_TRUE}`);\n } else if (type !== _LOCUS_ID_) {\n // locus id check is a PUT not sure why\n requestParams.resource = requestParams.resource.concat(`?${ALTERNATE_REDIRECT_TRUE}`);\n requestParams.body = {\n value,\n lookupType: type,\n };\n } else if (type === _LOCUS_ID_) {\n requestParams = {\n method: resourceOptions.method,\n uri: resourceOptions.uri,\n };\n }\n\n return requestParams;\n};\n\nexport default MeetingInfoUtil;\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,UAAA,GAAAL,OAAA;AANA;;AAgCA,IAAMM,eAAoB,GAAG,CAAC,CAAC;AAE/BA,eAAe,CAACC,kBAAkB,GAA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Bd,MAAM,EAAEY,eAAe,CAACZ,MAAM;IAC9Ba,GAAG,EAAHA,GAAG;IACHhB,QAAQ,EAAEe,eAAe,CAACf;EAC5B,CAAC;EAED,IAAIe,eAAe,CAACZ,MAAM,KAAKC,qBAAU,CAACC,GAAG,EAAE;IAC7C;IACAY,aAAa,CAACjB,QAAQ,GAAGiB,aAAa,CAACjB,QAAQ,CAAC9F,MAAM,KAAAA,MAAA,CAAKgH,kCAAuB,CAAE,CAAC;EACvF,CAAC,MAAM,IAAI1H,IAAI,KAAKE,qBAAU,EAAE;IAC9B;IACAuH,aAAa,CAACjB,QAAQ,GAAGiB,aAAa,CAACjB,QAAQ,CAAC9F,MAAM,KAAAA,MAAA,CAAKgH,kCAAuB,CAAE,CAAC;IACrFD,aAAa,CAACE,IAAI,GAAG;MACnB1G,KAAK,EAALA,KAAK;MACL2G,UAAU,EAAE5H;IACd,CAAC;EACH,CAAC,MAAM,IAAIA,IAAI,KAAKE,qBAAU,EAAE;IAC9BuH,aAAa,GAAG;MACdd,MAAM,EAAEY,eAAe,CAACZ,MAAM;MAC9BG,GAAG,EAAES,eAAe,CAACT;IACvB,CAAC;EACH;EAEA,OAAOW,aAAa;AACtB,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAlD,OAAA,GAEa/E,eAAe"}
|
|
@@ -21,8 +21,8 @@ var _constants = require("../constants");
|
|
|
21
21
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
22
22
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
23
23
|
var _webexErrors = require("../common/errors/webex-errors");
|
|
24
|
-
function ownKeys(
|
|
25
|
-
function _objectSpread(
|
|
24
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } // @ts-ignore
|
|
26
26
|
var MeetingInfoUtil = {};
|
|
27
27
|
var meetingInfoError = 'MeetingInfo is fetched with the meeting link, SIP URI, phone number, Hydra people ID, or a conversation URL.';
|
|
28
28
|
MeetingInfoUtil.getParsedUrl = function (link) {
|
|
@@ -50,7 +50,7 @@ MeetingInfoUtil.getParsedUrl = function (link) {
|
|
|
50
50
|
MeetingInfoUtil.isMeetingLink = function (value) {
|
|
51
51
|
var parsedUrl = MeetingInfoUtil.getParsedUrl(value);
|
|
52
52
|
var hostNameBool = parsedUrl.hostname && parsedUrl.hostname.includes(_constants.WEBEX_DOT_COM);
|
|
53
|
-
var pathNameBool = parsedUrl.pathname && (parsedUrl.pathname.includes("/".concat(_constants.MEET)) || parsedUrl.pathname.includes("/".concat(_constants.MEET_M)) || parsedUrl.pathname.includes("/".concat(_constants.JOIN)));
|
|
53
|
+
var pathNameBool = parsedUrl.pathname && (parsedUrl.pathname.includes("/".concat(_constants.MEET)) || parsedUrl.pathname.includes("/".concat(_constants.MEET_M)) || parsedUrl.pathname.includes("/".concat(_constants.MEET_CISCO)) || parsedUrl.pathname.includes("/".concat(_constants.MEET_CO)) || parsedUrl.pathname.includes("/".concat(_constants.JOIN)));
|
|
54
54
|
return hostNameBool && pathNameBool;
|
|
55
55
|
};
|
|
56
56
|
MeetingInfoUtil.isConversationUrl = function (value, webex) {
|
|
@@ -156,7 +156,11 @@ MeetingInfoUtil.getDestinationType = /*#__PURE__*/function () {
|
|
|
156
156
|
});
|
|
157
157
|
case 17:
|
|
158
158
|
options = {};
|
|
159
|
-
|
|
159
|
+
if (webex && webex.config && webex.config.meetings && webex.config.meetings.disableHydraId) {
|
|
160
|
+
hydraId = null;
|
|
161
|
+
} else {
|
|
162
|
+
hydraId = MeetingInfoUtil.getHydraId(destination);
|
|
163
|
+
}
|
|
160
164
|
if (!MeetingInfoUtil.isMeetingLink(destination)) {
|
|
161
165
|
_context.next = 25;
|
|
162
166
|
break;
|
|
@@ -194,12 +198,12 @@ MeetingInfoUtil.getDestinationType = /*#__PURE__*/function () {
|
|
|
194
198
|
_context.next = 52;
|
|
195
199
|
break;
|
|
196
200
|
case 40:
|
|
197
|
-
if (!hydraId.people) {
|
|
201
|
+
if (!(hydraId && hydraId.people)) {
|
|
198
202
|
_context.next = 45;
|
|
199
203
|
break;
|
|
200
204
|
}
|
|
201
205
|
options.type = _constants._SIP_URI_;
|
|
202
|
-
return _context.abrupt("return", MeetingInfoUtil.getSipUriFromHydraPersonId(hydraId.destination, webex).then(function (res) {
|
|
206
|
+
return _context.abrupt("return", MeetingInfoUtil.getSipUriFromHydraPersonId(hydraId && hydraId.destination, webex).then(function (res) {
|
|
203
207
|
options.destination = res;
|
|
204
208
|
|
|
205
209
|
// Since hydra person ids require a unique case in which they are
|
|
@@ -213,7 +217,7 @@ MeetingInfoUtil.getDestinationType = /*#__PURE__*/function () {
|
|
|
213
217
|
_context.next = 50;
|
|
214
218
|
break;
|
|
215
219
|
}
|
|
216
|
-
_loggerProxy.default.logger.error("Meeting-info:util#getDestinationType --> Using the space ID as a destination is no longer supported. Please refer to the [migration guide](https://github.com/webex/webex-js-sdk/wiki/Migration-
|
|
220
|
+
_loggerProxy.default.logger.error("Meeting-info:util#getDestinationType --> Using the space ID as a destination is no longer supported. Please refer to the [migration guide](https://github.com/webex/webex-js-sdk/wiki/Migration-to-Unified-Space-Meetings) to migrate to use the meeting ID or SIP address.");
|
|
217
221
|
// Error code 30105 added as Space ID deprecated as of beta, Please refer migration guide.
|
|
218
222
|
throw new _webexErrors.SpaceIDDeprecatedError();
|
|
219
223
|
case 50:
|
|
@@ -333,6 +337,5 @@ MeetingInfoUtil.getDirectMeetingInfoURI = function (options) {
|
|
|
333
337
|
}
|
|
334
338
|
return preferredWebexSite ? "https://".concat(preferredWebexSite, "/wbxappapi/v1/meetingInfo") : null;
|
|
335
339
|
};
|
|
336
|
-
var _default = MeetingInfoUtil;
|
|
337
|
-
exports.default = _default;
|
|
340
|
+
var _default = exports.default = MeetingInfoUtil;
|
|
338
341
|
//# sourceMappingURL=utilv2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingInfoUtil","meetingInfoError","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","SpaceIDDeprecatedError","getRequestBody","password","captchaInfo","installedOrgID","locusId","extraParams","body","DEFAULT_MEETING_INFO_REQUEST_BODY","sipUrl","_MEETING_ID_","meetingKey","conversationUrl","_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';\nimport {SpaceIDDeprecatedError} from '../common/errors/webex-errors';\n\nconst MeetingInfoUtil: any = {};\nconst meetingInfoError =\n 'MeetingInfo is fetched with the meeting link, SIP URI, phone number, Hydra people ID, or a conversation URL.';\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 LoggerProxy.logger.error(\n `Meeting-info:util#getDestinationType --> Using the space ID as a destination is no longer supported. Please refer to the [migration guide](https://github.com/webex/webex-js-sdk/wiki/Migration-guide-for-USM-meeting) to migrate to use the meeting ID or SIP address.`\n );\n // Error code 30105 added as Space ID deprecated as of beta, Please refer migration guide.\n throw new SpaceIDDeprecatedError();\n } else {\n LoggerProxy.logger.warn(`Meeting-info:util#getDestinationType --> ${meetingInfoError}`);\n throw new ParameterError(`${meetingInfoError}`);\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 {String} options.installedOrgID org ID of user's machine\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, locusId, extraParams} = options;\n const body: any = {\n ...DEFAULT_MEETING_INFO_REQUEST_BODY,\n ...extraParams,\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 if (locusId) {\n body.locusId = locusId;\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;AACA;AAAqE;AAAA;AAErE,IAAMA,eAAoB,GAAG,CAAC,CAAC;AAC/B,IAAMC,gBAAgB,GACpB,8GAA8G;AAEhHD,eAAe,CAACE,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;IACdC,oBAAW,CAACC,MAAM,CAACC,IAAI,8EACiDH,KAAK,EAC5E;IAED,OAAO,IAAI;EACb;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACAT,eAAe,CAACa,aAAa,GAAG,UAACC,KAAa,EAAK;EACjD,IAAMV,SAAS,GAAGJ,eAAe,CAACE,YAAY,CAACY,KAAK,CAAC;EACrD,IAAMC,YAAY,GAAGX,SAAS,CAACY,QAAQ,IAAIZ,SAAS,CAACY,QAAQ,CAACC,QAAQ,CAACC,wBAAa,CAAC;EACrF,IAAMC,YAAY,GAChBf,SAAS,CAACgB,QAAQ,KACjBhB,SAAS,CAACgB,QAAQ,CAACH,QAAQ,YAAKI,eAAI,EAAG,IACtCjB,SA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,IAAIjB,cAAc,EAAE;IAClBG,IAAI,CAACH,cAAc,GAAGA,cAAc;EACtC;EAEA,IAAIC,OAAO,EAAE;IACXE,IAAI,CAACF,OAAO,GAAGA,OAAO;EACxB;EAEA,OAAOE,IAAI;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,CAACvF,QAAQ,CAACwF,IAAI,CAAC,GAAG,IAAI,GAAGA,IAAI;AACrD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACAzG,eAAe,CAAC2G,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,GAAG5G,eAAe,CAACsG,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,eAEa5G,eAAe;AAAA"}
|
|
1
|
+
{"version":3,"names":["_url","_interopRequireDefault","require","_common","_constants","_parameter","_loggerProxy","_webexErrors","ownKeys","e","r","t","_Object$keys","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","MeetingInfoUtil","meetingInfoError","getParsedUrl","link","parsedUrl","url","parse","protocol","concat","HTTPS_PROTOCOL","error","LoggerProxy","logger","warn","isMeetingLink","value","hostNameBool","hostname","includes","WEBEX_DOT_COM","pathNameBool","pathname","MEET","MEET_M","MEET_CISCO","MEET_CO","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","deconstructHydraId","type","id","cluster","UUID_REG","_ROOM_","room","_PEOPLE_","people","getSipUriFromHydraPersonId","get","then","res","emails","ParameterError","catch","err","getDestinationType","_ref","_asyncToGenerator2","_regenerator","mark","_callee","from","_options","_res$items$","orgId","userId","options","hydraId","wrap","_callee$","_context","prev","next","_PERSONAL_ROOM_","device","VALID_EMAIL_ADDRESS","email","list","sent","items","abrupt","config","meetings","disableHydraId","_MEETING_LINK_","_SIP_URI_","_CONVERSATION_URL_","wasHydraPerson","_promise","resolve","SpaceIDDeprecatedError","stop","_x","getRequestBody","_destination$info","_destination$info2","password","captchaInfo","installedOrgID","locusId","extraParams","body","DEFAULT_MEETING_INFO_REQUEST_BODY","sipUrl","_MEETING_ID_","meetingKey","conversationUrl","_LOCUS_ID_","info","webExMeetingId","meetingUrl","_MEETING_UUID_","meetingUUID","captchaID","captchaVerifyCode","code","getWebexSite","uri","_uri$match","exceptedDomains","site","match","getDirectMeetingInfoURI","_destination$info3","preferredWebexSite","webExSite","_default","exports"],"sources":["utilv2.ts"],"sourcesContent":["import url from 'url';\n\n// @ts-ignore\nimport {deconstructHydraId} 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 MEET_CISCO,\n MEET_CO,\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';\nimport {SpaceIDDeprecatedError} from '../common/errors/webex-errors';\n\nconst MeetingInfoUtil: any = {};\nconst meetingInfoError =\n 'MeetingInfo is fetched with the meeting link, SIP URI, phone number, Hydra people ID, or a conversation URL.';\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(`/${MEET_CISCO}`) ||\n parsedUrl.pathname.includes(`/${MEET_CO}`) ||\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 let hydraId;\n\n if (webex && webex.config && webex.config.meetings && webex.config.meetings.disableHydraId) {\n hydraId = null;\n } else {\n hydraId = MeetingInfoUtil.getHydraId(destination);\n }\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 && hydraId.people) {\n options.type = _SIP_URI_;\n\n return MeetingInfoUtil.getSipUriFromHydraPersonId(hydraId && hydraId.destination, webex).then(\n (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 );\n } else if (hydraId.room) {\n LoggerProxy.logger.error(\n `Meeting-info:util#getDestinationType --> Using the space ID as a destination is no longer supported. Please refer to the [migration guide](https://github.com/webex/webex-js-sdk/wiki/Migration-to-Unified-Space-Meetings) to migrate to use the meeting ID or SIP address.`\n );\n // Error code 30105 added as Space ID deprecated as of beta, Please refer migration guide.\n throw new SpaceIDDeprecatedError();\n } else {\n LoggerProxy.logger.warn(`Meeting-info:util#getDestinationType --> ${meetingInfoError}`);\n throw new ParameterError(`${meetingInfoError}`);\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 {String} options.installedOrgID org ID of user's machine\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, locusId, extraParams} = options;\n const body: any = {\n ...DEFAULT_MEETING_INFO_REQUEST_BODY,\n ...extraParams,\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 if (locusId) {\n body.locusId = locusId;\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,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAuBA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAAqE,SAAAM,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAH,CAAA,OAAAI,6BAAA,QAAAC,CAAA,GAAAD,6BAAA,CAAAJ,CAAA,GAAAC,CAAA,KAAAI,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAL,CAAA,WAAAM,gCAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAAA,CAAAR,CAAA,EAAAG,CAAA,YAAAH,CAAA;AAAA,SAAAS,cAAAX,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAW,SAAA,CAAAC,MAAA,EAAAZ,CAAA,UAAAC,CAAA,WAAAU,SAAA,CAAAX,CAAA,IAAAW,SAAA,CAAAX,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAe,MAAA,CAAAZ,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,CAAAC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OAAO,CAAtB9B,WAAW;EAExB,IAAIwF,kBAAkB,GAAG,IAAI;EAE7B,QAAQrF,IAAI;IACV,KAAK8C,oBAAS;MACZuC,kBAAkB,GAAGvI,eAAe,CAAC+H,YAAY,CAAChF,WAAW,CAAC;MAC9D;IACF,KAAKuE,qBAAU;MACbiB,kBAAkB,IAAAD,kBAAA,GAAGvF,WAAW,CAACwE,IAAI,cAAAe,kBAAA,uBAAhBA,kBAAA,CAAkBE,SAAS;MAChD;IACF;EACF;EAEA,OAAOD,kBAAkB,cAAA/H,MAAA,CAAc+H,kBAAkB,iCAA8B,IAAI;AAC7F,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAA9I,OAAA,GAEaI,eAAe"}
|
|
@@ -28,4 +28,13 @@ export default class MeetingCollection extends Collection {
|
|
|
28
28
|
* @memberof MeetingCollection
|
|
29
29
|
*/
|
|
30
30
|
getActiveBreakoutLocus(breakoutUrl: string): any;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the meeting that has a webrtc media connection
|
|
33
|
+
* NOTE: this function assumes there is no more than 1 such meeting
|
|
34
|
+
*
|
|
35
|
+
* @returns {Meeting} first meeting found, else undefined
|
|
36
|
+
* @public
|
|
37
|
+
* @memberof MeetingCollection
|
|
38
|
+
*/
|
|
39
|
+
getActiveWebrtcMeeting(): any;
|
|
31
40
|
}
|
|
@@ -12,7 +12,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpe
|
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
13
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
14
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
15
|
-
var
|
|
15
|
+
var _lodash = require("lodash");
|
|
16
16
|
var _collection = _interopRequireDefault(require("../common/collection"));
|
|
17
17
|
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); }; }
|
|
18
18
|
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; } }
|
|
@@ -20,7 +20,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
20
20
|
* @export
|
|
21
21
|
* @class MeetingCollection
|
|
22
22
|
*/
|
|
23
|
-
var MeetingCollection = /*#__PURE__*/function (_Collection) {
|
|
23
|
+
var MeetingCollection = exports.default = /*#__PURE__*/function (_Collection) {
|
|
24
24
|
(0, _inherits2.default)(MeetingCollection, _Collection);
|
|
25
25
|
var _super = _createSuper(MeetingCollection);
|
|
26
26
|
/**
|
|
@@ -55,7 +55,7 @@ var MeetingCollection = /*#__PURE__*/function (_Collection) {
|
|
|
55
55
|
value: function getByKey(key, value) {
|
|
56
56
|
if (key && value) {
|
|
57
57
|
// @ts-ignore
|
|
58
|
-
return (0,
|
|
58
|
+
return (0, _lodash.find)(this.meetings, function (meeting) {
|
|
59
59
|
return meeting[key] === value;
|
|
60
60
|
});
|
|
61
61
|
}
|
|
@@ -74,7 +74,7 @@ var MeetingCollection = /*#__PURE__*/function (_Collection) {
|
|
|
74
74
|
value: function getActiveBreakoutLocus(breakoutUrl) {
|
|
75
75
|
if (breakoutUrl) {
|
|
76
76
|
// @ts-ignore
|
|
77
|
-
return (0,
|
|
77
|
+
return (0, _lodash.find)(
|
|
78
78
|
// @ts-ignore
|
|
79
79
|
this.meetings, function (meeting) {
|
|
80
80
|
var _meeting$breakouts, _meeting$breakouts2;
|
|
@@ -83,8 +83,24 @@ var MeetingCollection = /*#__PURE__*/function (_Collection) {
|
|
|
83
83
|
}
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Gets the meeting that has a webrtc media connection
|
|
89
|
+
* NOTE: this function assumes there is no more than 1 such meeting
|
|
90
|
+
*
|
|
91
|
+
* @returns {Meeting} first meeting found, else undefined
|
|
92
|
+
* @public
|
|
93
|
+
* @memberof MeetingCollection
|
|
94
|
+
*/
|
|
95
|
+
}, {
|
|
96
|
+
key: "getActiveWebrtcMeeting",
|
|
97
|
+
value: function getActiveWebrtcMeeting() {
|
|
98
|
+
// @ts-ignore
|
|
99
|
+
return (0, _lodash.find)(this.meetings, function (meeting) {
|
|
100
|
+
return meeting.mediaProperties.webrtcMediaConnection;
|
|
101
|
+
});
|
|
102
|
+
}
|
|
86
103
|
}]);
|
|
87
104
|
return MeetingCollection;
|
|
88
105
|
}(_collection.default);
|
|
89
|
-
exports.default = MeetingCollection;
|
|
90
106
|
//# sourceMappingURL=collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingCollection","meeting","meetings","id","
|
|
1
|
+
{"version":3,"names":["_lodash","require","_collection","_interopRequireDefault","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","MeetingCollection","exports","_Collection","_inherits2","_super","_classCallCheck2","_createClass2","key","value","set","meeting","meetings","id","getByKey","find","getActiveBreakoutLocus","breakoutUrl","_meeting$breakouts","_meeting$breakouts2","breakouts","url","isActiveBreakout","getActiveWebrtcMeeting","mediaProperties","webrtcMediaConnection","Collection"],"sources":["collection.ts"],"sourcesContent":["import {find} from 'lodash';\n\nimport Collection from '../common/collection';\n\n/**\n * @export\n * @class MeetingCollection\n */\nexport default class MeetingCollection extends Collection {\n /**\n * @constructor\n * @public\n * @memberof MeetingCollection\n */\n constructor() {\n super('meetings');\n }\n\n set(meeting) {\n // @ts-ignore\n this.meetings[meeting.id] = meeting;\n\n // @ts-ignore\n return this.meetings[meeting.id];\n }\n\n /**\n * get a specific meeting searching for key\n * @param {String} key\n * @param {Any} value\n * @returns {Meeting} if found, else returns null\n * @public\n * @memberof MeetingCollection\n */\n public getByKey(key: string, value: any) {\n if (key && value) {\n // @ts-ignore\n return find(this.meetings, (meeting) => meeting[key] === value);\n }\n\n return null;\n }\n\n /**\n * get a specific meeting searching for key\n * @param {String} breakoutUrl\n * @returns {Meeting} if found, else returns null\n * @public\n * @memberof MeetingCollection\n */\n public getActiveBreakoutLocus(breakoutUrl: string) {\n if (breakoutUrl) {\n // @ts-ignore\n return find(\n // @ts-ignore\n this.meetings,\n (meeting) => meeting.breakouts?.url === breakoutUrl && meeting.breakouts?.isActiveBreakout\n );\n }\n\n return null;\n }\n\n /**\n * Gets the meeting that has a webrtc media connection\n * NOTE: this function assumes there is no more than 1 such meeting\n *\n * @returns {Meeting} first meeting found, else undefined\n * @public\n * @memberof MeetingCollection\n */\n public getActiveWebrtcMeeting() {\n // @ts-ignore\n return find(this.meetings, (meeting) => meeting.mediaProperties.webrtcMediaConnection);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8C,SAAAG,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAA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EANE;IAAAD,GAAA;IAAAC,KAAA,EAOA,SAAAO,uBAA8BC,WAAmB,EAAE;MACjD,IAAIA,WAAW,EAAE;QACf;QACA,OAAO,IAAAF,YAAI;QACT;QACA,IAAI,CAACH,QAAQ,EACb,UAACD,OAAO;UAAA,IAAAO,kBAAA,EAAAC,mBAAA;UAAA,OAAK,EAAAD,kBAAA,GAAAP,OAAO,CAACS,SAAS,cAAAF,kBAAA,uBAAjBA,kBAAA,CAAmBG,GAAG,MAAKJ,WAAW,MAAAE,mBAAA,GAAIR,OAAO,CAACS,SAAS,cAAAD,mBAAA,uBAAjBA,mBAAA,CAAmBG,gBAAgB;QAAA,CAC5F,CAAC;MACH;MAEA,OAAO,IAAI;IACb;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE;IAAAd,GAAA;IAAAC,KAAA,EAQA,SAAAc,uBAAA,EAAgC;MAC9B;MACA,OAAO,IAAAR,YAAI,EAAC,IAAI,CAACH,QAAQ,EAAE,UAACD,OAAO;QAAA,OAAKA,OAAO,CAACa,eAAe,CAACC,qBAAqB;MAAA,EAAC;IACxF;EAAC;EAAA,OAAAxB,iBAAA;AAAA,EAlE4CyB,mBAAU"}
|
|
@@ -2,7 +2,9 @@ import '@webex/internal-plugin-mercury';
|
|
|
2
2
|
import '@webex/internal-plugin-conversation';
|
|
3
3
|
import '@webex/internal-plugin-metrics';
|
|
4
4
|
import { WebexPlugin } from '@webex/webex-core';
|
|
5
|
+
import * as mediaHelpersModule from '@webex/media-helpers';
|
|
5
6
|
import 'webrtc-adapter';
|
|
7
|
+
import { CallStateForMetrics } from '../meeting';
|
|
6
8
|
import Reachability from '../reachability';
|
|
7
9
|
import { INoiseReductionEffect, IVirtualBackgroundEffect } from './meetings.types';
|
|
8
10
|
/**
|
|
@@ -159,21 +161,21 @@ export default class Meetings extends WebexPlugin {
|
|
|
159
161
|
*/
|
|
160
162
|
private _toggleUnifiedMeetings;
|
|
161
163
|
/**
|
|
162
|
-
* API to
|
|
163
|
-
* @param {Boolean}
|
|
164
|
+
* API to toggle starting adhoc meeting
|
|
165
|
+
* @param {Boolean} changeState
|
|
164
166
|
* @private
|
|
165
167
|
* @memberof Meetings
|
|
166
168
|
* @returns {undefined}
|
|
167
169
|
*/
|
|
168
|
-
private
|
|
170
|
+
private _toggleAdhocMeetings;
|
|
169
171
|
/**
|
|
170
|
-
* API to toggle
|
|
171
|
-
* @param {Boolean}
|
|
172
|
+
* API to toggle TCP reachability, needs to be called before webex.meetings.register()
|
|
173
|
+
* @param {Boolean} newValue
|
|
172
174
|
* @private
|
|
173
175
|
* @memberof Meetings
|
|
174
176
|
* @returns {undefined}
|
|
175
177
|
*/
|
|
176
|
-
private
|
|
178
|
+
private _toggleTcpReachability;
|
|
177
179
|
/**
|
|
178
180
|
* Explicitly sets up the meetings plugin by registering
|
|
179
181
|
* the device, connecting to mercury, and listening for locus events.
|
|
@@ -200,7 +202,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
200
202
|
* @public
|
|
201
203
|
* @memberof Meetings
|
|
202
204
|
*/
|
|
203
|
-
createNoiseReductionEffect: (options?: INoiseReductionEffect) => Promise<
|
|
205
|
+
createNoiseReductionEffect: (options?: INoiseReductionEffect) => Promise<mediaHelpersModule.NoiseReductionEffect>;
|
|
204
206
|
/**
|
|
205
207
|
* Creates a virtual background effect
|
|
206
208
|
*
|
|
@@ -209,7 +211,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
209
211
|
* @public
|
|
210
212
|
* @memberof Meetings
|
|
211
213
|
*/
|
|
212
|
-
createVirtualBackgroundEffect: (options?: IVirtualBackgroundEffect) => Promise<
|
|
214
|
+
createVirtualBackgroundEffect: (options?: IVirtualBackgroundEffect) => Promise<mediaHelpersModule.VirtualBackgroundEffect>;
|
|
213
215
|
/**
|
|
214
216
|
* Uploads logs to the webex services for tracking
|
|
215
217
|
* @param {Object} [options={}]
|
|
@@ -223,8 +225,10 @@ export default class Meetings extends WebexPlugin {
|
|
|
223
225
|
* @returns {String} feedback ID logs were submitted under
|
|
224
226
|
*/
|
|
225
227
|
uploadLogs(options?: {
|
|
228
|
+
autoupload?: boolean;
|
|
226
229
|
callStart?: string;
|
|
227
230
|
feedbackId?: string;
|
|
231
|
+
locussessionid?: string;
|
|
228
232
|
locusId?: string;
|
|
229
233
|
correlationId?: string;
|
|
230
234
|
meetingId?: string;
|
|
@@ -244,7 +248,7 @@ export default class Meetings extends WebexPlugin {
|
|
|
244
248
|
* @public
|
|
245
249
|
* @memberof Meetings
|
|
246
250
|
*/
|
|
247
|
-
startReachability(): Promise<
|
|
251
|
+
startReachability(): Promise<import("../reachability").ReachabilityResults>;
|
|
248
252
|
/**
|
|
249
253
|
* Get geoHint for info for meetings
|
|
250
254
|
* @returns {Promise}
|
|
@@ -277,23 +281,37 @@ export default class Meetings extends WebexPlugin {
|
|
|
277
281
|
*/
|
|
278
282
|
private destroy;
|
|
279
283
|
/**
|
|
280
|
-
* Create a meeting.
|
|
284
|
+
* Create a meeting or return an existing meeting.
|
|
285
|
+
*
|
|
286
|
+
* When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
|
|
287
|
+
*
|
|
281
288
|
* @param {string} destination - sipURL, phonenumber, or locus object}
|
|
282
289
|
* @param {string} [type] - the optional specified type, such as locusId
|
|
283
290
|
* @param {Boolean} useRandomDelayForInfo - whether a random delay should be added to fetching meeting info
|
|
284
291
|
* @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
|
|
285
|
-
* @param {string} correlationId - the optional specified correlationId
|
|
292
|
+
* @param {string} correlationId - the optional specified correlationId (callStateForMetrics.correlationId can be provided instead)
|
|
293
|
+
* @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
|
|
294
|
+
* @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
|
|
295
|
+
* @param {Object} [meetingInfo] - Pre-fetched complete meeting info
|
|
296
|
+
* @param {String} [meetingLookupUrl] - meeting info prefetch url
|
|
286
297
|
* @returns {Promise<Meeting>} A new Meeting.
|
|
287
298
|
* @public
|
|
288
299
|
* @memberof Meetings
|
|
289
300
|
*/
|
|
290
|
-
create(destination: string, type?: string, useRandomDelayForInfo?: boolean, infoExtraParams?: {}, correlationId?: string): any;
|
|
301
|
+
create(destination: string, type?: string, useRandomDelayForInfo?: boolean, infoExtraParams?: {}, correlationId?: string, failOnMissingMeetingInfo?: boolean, callStateForMetrics?: CallStateForMetrics, meetingInfo?: any, meetingLookupUrl?: any): any;
|
|
291
302
|
/**
|
|
303
|
+
* Create meeting
|
|
304
|
+
*
|
|
305
|
+
* When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
|
|
306
|
+
*
|
|
292
307
|
* @param {String} destination see create()
|
|
293
308
|
* @param {String} type see create()
|
|
294
309
|
* @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
|
|
295
310
|
* @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
|
|
296
|
-
* @param {
|
|
311
|
+
* @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
|
|
312
|
+
* @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
|
|
313
|
+
* @param {Object} [meetingInfo] - Pre-fetched complete meeting info
|
|
314
|
+
* @param {String} [meetingLookupUrl] - meeting info prefetch url
|
|
297
315
|
* @returns {Promise} a new meeting instance complete with meeting info and destination
|
|
298
316
|
* @private
|
|
299
317
|
* @memberof Meetings
|
|
@@ -322,12 +340,15 @@ export default class Meetings extends WebexPlugin {
|
|
|
322
340
|
endDate: object;
|
|
323
341
|
}): any;
|
|
324
342
|
/**
|
|
325
|
-
*
|
|
326
|
-
* @
|
|
343
|
+
* Syncs all the meetings from server. Does nothing and returns immediately if unverified guest.
|
|
344
|
+
* @param {boolean} keepOnlyLocusMeetings - whether the sync should keep only locus meetings or any other meeting in meetingCollection
|
|
345
|
+
* @returns {Promise<void>}
|
|
327
346
|
* @public
|
|
328
347
|
* @memberof Meetings
|
|
329
348
|
*/
|
|
330
|
-
syncMeetings(
|
|
349
|
+
syncMeetings({ keepOnlyLocusMeetings }?: {
|
|
350
|
+
keepOnlyLocusMeetings?: boolean;
|
|
351
|
+
}): Promise<void>;
|
|
331
352
|
/**
|
|
332
353
|
* sort out locus array for initial creating
|
|
333
354
|
* @param {Array} loci original locus array
|
|
@@ -358,4 +379,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
358
379
|
* @returns {Logger}
|
|
359
380
|
*/
|
|
360
381
|
getLogger(): any;
|
|
382
|
+
/**
|
|
383
|
+
* Returns the first meeting it finds that has the webrtc media connection created.
|
|
384
|
+
* Useful for debugging in the console.
|
|
385
|
+
*
|
|
386
|
+
* @private
|
|
387
|
+
* @returns {Meeting} Meeting object that has a webrtc media connection, else undefined
|
|
388
|
+
*/
|
|
389
|
+
getActiveWebrtcMeeting(): any;
|
|
361
390
|
}
|