@webex/plugin-meetings 3.1.0 → 3.2.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/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/reconnection-not-started.js +46 -0
- package/dist/common/errors/reconnection-not-started.js.map +1 -0
- package/dist/constants.js +16 -5
- package/dist/constants.js.map +1 -1
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +7 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +10 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/media/properties.js +102 -57
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +10 -10
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +6 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +564 -475
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +27 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/util.js +9 -16
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +37 -49
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/util.js +304 -267
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +334 -298
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +12 -28
- package/dist/meetings/index.js.map +1 -1
- package/dist/reachability/index.js +88 -9
- package/dist/reachability/index.js.map +1 -1
- package/dist/reconnection-manager/index.js +138 -109
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/request.js +3 -27
- package/dist/roap/request.js.map +1 -1
- package/dist/statsAnalyzer/index.js +8 -2
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +17 -0
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +93 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +73 -0
- package/dist/types/constants.d.ts +1098 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +272 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +117 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +247 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +173 -0
- package/dist/types/meeting/index.d.ts +1832 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +75 -0
- package/dist/types/meeting/muteState.d.ts +178 -0
- package/dist/types/meeting/request.d.ts +295 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +122 -0
- package/dist/types/meeting/voicea-meeting.d.ts +17 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +49 -0
- package/dist/types/meeting-info/utilv2.d.ts +65 -0
- package/dist/types/meetings/collection.d.ts +40 -0
- package/dist/types/meetings/index.d.ts +383 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +160 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +70 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +119 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +49 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +300 -0
- package/dist/types/multistream/sendSlotManager.d.ts +69 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/clusterReachability.d.ts +110 -0
- package/dist/types/reachability/index.d.ts +120 -0
- package/dist/types/reachability/request.d.ts +39 -0
- package/dist/types/reachability/util.d.ts +15 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +86 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +155 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +61 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +217 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/common/errors/reconnection-not-started.ts +25 -0
- package/src/constants.ts +14 -5
- package/src/index.ts +30 -0
- package/src/locus-info/controlsUtils.ts +11 -0
- package/src/locus-info/index.ts +16 -0
- package/src/media/properties.ts +67 -15
- package/src/mediaQualityMetrics/config.ts +13 -7
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +144 -107
- package/src/meeting/locusMediaRequest.ts +31 -0
- package/src/meeting/util.ts +9 -16
- package/src/meeting/voicea-meeting.ts +44 -46
- package/src/meeting-info/util.ts +241 -233
- package/src/meeting-info/utilv2.ts +250 -244
- package/src/meetings/index.ts +15 -27
- package/src/reachability/index.ts +60 -0
- package/src/reconnection-manager/index.ts +128 -105
- package/src/roap/request.ts +1 -24
- package/src/statsAnalyzer/index.ts +10 -3
- package/src/statsAnalyzer/mqaUtil.ts +23 -0
- package/test/unit/spec/locus-info/controlsUtils.js +20 -0
- package/test/unit/spec/locus-info/index.js +21 -0
- package/test/unit/spec/media/properties.ts +145 -140
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +271 -105
- package/test/unit/spec/meeting/locusMediaRequest.ts +49 -0
- package/test/unit/spec/meeting/utils.js +3 -10
- package/test/unit/spec/meeting/voicea-meeting.ts +5 -14
- package/test/unit/spec/meetings/index.js +59 -17
- package/test/unit/spec/reachability/index.ts +266 -0
- package/test/unit/spec/reconnection-manager/index.js +127 -39
- package/test/unit/spec/roap/request.ts +0 -37
- package/test/unit/spec/stats-analyzer/index.js +100 -8
- package/src/common/errors/reconnection-in-progress.ts +0 -8
|
@@ -13,8 +13,10 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
13
13
|
exports.default = void 0;
|
|
14
14
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
15
15
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
17
16
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
17
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
18
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
19
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
18
20
|
var _url = _interopRequireDefault(require("url"));
|
|
19
21
|
var _common = require("@webex/common");
|
|
20
22
|
var _constants = require("../constants");
|
|
@@ -23,322 +25,356 @@ var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy")
|
|
|
23
25
|
var _webexErrors = require("../common/errors/webex-errors");
|
|
24
26
|
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
27
|
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
|
-
var MeetingInfoUtil = {};
|
|
27
|
-
var meetingInfoError = 'MeetingInfo is fetched with the meeting link, SIP URI, phone number, Hydra people ID, or a conversation URL.';
|
|
28
|
-
MeetingInfoUtil.getParsedUrl = function (link) {
|
|
29
|
-
try {
|
|
30
|
-
var parsedUrl = _url.default.parse(link);
|
|
31
|
-
if (!parsedUrl) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
// hack for links such as <company>.webex.com/meet/<user> without a protocol
|
|
35
|
-
if (!parsedUrl.protocol) {
|
|
36
|
-
parsedUrl = _url.default.parse("".concat(_constants.HTTPS_PROTOCOL).concat(link));
|
|
37
|
-
}
|
|
38
|
-
return parsedUrl;
|
|
39
|
-
} catch (error) {
|
|
40
|
-
_loggerProxy.default.logger.warn("Meeting-info:util#getParsedUrl --> unable to parse the URL, error: ".concat(error));
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
28
|
/**
|
|
46
|
-
*
|
|
47
|
-
* @param {String} value string to parse and see if it matches a meeting link
|
|
48
|
-
* @returns {Boolean}
|
|
29
|
+
* @class MeetingInfoUtil
|
|
49
30
|
*/
|
|
50
|
-
MeetingInfoUtil.
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
return hostNameBool && pathNameBool;
|
|
55
|
-
};
|
|
56
|
-
MeetingInfoUtil.isConversationUrl = function (value, webex) {
|
|
57
|
-
var clusterId = webex.internal.services.getClusterId(value);
|
|
58
|
-
if (clusterId) {
|
|
59
|
-
return clusterId.endsWith(_constants.CONVERSATION_SERVICE);
|
|
31
|
+
var MeetingInfoUtil = exports.default = /*#__PURE__*/function () {
|
|
32
|
+
function MeetingInfoUtil() {
|
|
33
|
+
(0, _classCallCheck2.default)(this, MeetingInfoUtil);
|
|
60
34
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (id && _constants.UUID_REG.test(id)) {
|
|
79
|
-
if (type === _constants._ROOM_) {
|
|
80
|
-
return {
|
|
81
|
-
room: true,
|
|
82
|
-
destination: id,
|
|
83
|
-
cluster: cluster
|
|
84
|
-
};
|
|
35
|
+
(0, _createClass2.default)(MeetingInfoUtil, null, [{
|
|
36
|
+
key: "getParsedUrl",
|
|
37
|
+
value: function getParsedUrl(link) {
|
|
38
|
+
try {
|
|
39
|
+
var parsedUrl = _url.default.parse(link);
|
|
40
|
+
if (!parsedUrl) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
// hack for links such as <company>.webex.com/meet/<user> without a protocol
|
|
44
|
+
if (!parsedUrl.protocol) {
|
|
45
|
+
parsedUrl = _url.default.parse("".concat(_constants.HTTPS_PROTOCOL).concat(link));
|
|
46
|
+
}
|
|
47
|
+
return parsedUrl;
|
|
48
|
+
} catch (error) {
|
|
49
|
+
_loggerProxy.default.logger.warn("Meeting-info:util#getParsedUrl --> unable to parse the URL, error: ".concat(error));
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
85
52
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Helper function to check if a string matches a known meeting link pattern
|
|
56
|
+
* @param {String} value string to parse and see if it matches a meeting link
|
|
57
|
+
* @returns {Boolean}
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "isMeetingLink",
|
|
61
|
+
value: function isMeetingLink(value) {
|
|
62
|
+
var hostNameBool;
|
|
63
|
+
var pathNameBool;
|
|
64
|
+
var parsedUrl = this.getParsedUrl(value);
|
|
65
|
+
if (parsedUrl) {
|
|
66
|
+
hostNameBool = parsedUrl.hostname && parsedUrl.hostname.includes(_constants.WEBEX_DOT_COM);
|
|
67
|
+
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)));
|
|
68
|
+
}
|
|
69
|
+
return hostNameBool && pathNameBool;
|
|
92
70
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return
|
|
71
|
+
}, {
|
|
72
|
+
key: "isConversationUrl",
|
|
73
|
+
value: function isConversationUrl(value, webex) {
|
|
74
|
+
var clusterId = webex.internal.services.getClusterId(value);
|
|
75
|
+
if (clusterId) {
|
|
76
|
+
return clusterId.endsWith(_constants.CONVERSATION_SERVICE);
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
101
79
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
80
|
+
}, {
|
|
81
|
+
key: "isSipUri",
|
|
82
|
+
value: function isSipUri(sipString) {
|
|
83
|
+
// TODO: lets remove regex from this equation and user URI matchers and such
|
|
84
|
+
// have not found a great sip uri parser library as of now
|
|
85
|
+
var sipUri = _constants.DIALER_REGEX.SIP_ADDRESS.exec(sipString);
|
|
86
|
+
return sipUri;
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
key: "isPhoneNumber",
|
|
90
|
+
value: function isPhoneNumber(phoneNumber) {
|
|
91
|
+
var isValidNumber = _constants.DIALER_REGEX.PHONE_NUMBER.test(phoneNumber);
|
|
92
|
+
return isValidNumber;
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
key: "getHydraId",
|
|
96
|
+
value: function getHydraId(destination) {
|
|
97
|
+
var _deconstructHydraId = (0, _common.deconstructHydraId)(destination),
|
|
98
|
+
type = _deconstructHydraId.type,
|
|
99
|
+
id = _deconstructHydraId.id,
|
|
100
|
+
cluster = _deconstructHydraId.cluster;
|
|
101
|
+
if (id && _constants.UUID_REG.test(id)) {
|
|
102
|
+
if (type === _constants._ROOM_) {
|
|
103
|
+
return {
|
|
104
|
+
room: true,
|
|
105
|
+
destination: id,
|
|
106
|
+
cluster: cluster
|
|
128
107
|
};
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
id: destination
|
|
136
|
-
}; // we are assuming userId as default
|
|
137
|
-
_context.next = 10;
|
|
138
|
-
return webex.people.list(_options);
|
|
139
|
-
case 10:
|
|
140
|
-
res = _context.sent;
|
|
141
|
-
_res$items$ = res.items[0], orgId = _res$items$.orgId, userId = _res$items$.id;
|
|
142
|
-
userId = (0, _common.deconstructHydraId)(userId).id;
|
|
143
|
-
orgId = (0, _common.deconstructHydraId)(orgId).id;
|
|
144
|
-
destination = {
|
|
145
|
-
userId: userId,
|
|
146
|
-
orgId: orgId
|
|
108
|
+
}
|
|
109
|
+
if (type === _constants._PEOPLE_) {
|
|
110
|
+
return {
|
|
111
|
+
people: true,
|
|
112
|
+
destination: id,
|
|
113
|
+
cluster: cluster
|
|
147
114
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
115
|
+
}
|
|
116
|
+
return {};
|
|
117
|
+
}
|
|
118
|
+
return {};
|
|
119
|
+
}
|
|
120
|
+
}, {
|
|
121
|
+
key: "getSipUriFromHydraPersonId",
|
|
122
|
+
value: function getSipUriFromHydraPersonId(destination, webex) {
|
|
123
|
+
return webex.people.get(destination).then(function (res) {
|
|
124
|
+
if (res.emails && res.emails.length) {
|
|
125
|
+
return res.emails[0];
|
|
126
|
+
}
|
|
127
|
+
throw new _parameter.default('Hydra Id Lookup was an invalid hydra person id.');
|
|
128
|
+
}).catch(function (err) {
|
|
129
|
+
_loggerProxy.default.logger.error("Meeting-info:util#MeetingInfoUtil.getSipUriFromHydraPersonId --> getSipUriFromHydraPersonId ".concat(err, " "));
|
|
130
|
+
throw err;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
134
|
+
key: "getDestinationType",
|
|
135
|
+
value: function () {
|
|
136
|
+
var _getDestinationType = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(from) {
|
|
137
|
+
var type, webex, destination, _options, res, _res$items$, orgId, userId, options, hydraId;
|
|
138
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
139
|
+
while (1) switch (_context.prev = _context.next) {
|
|
140
|
+
case 0:
|
|
141
|
+
type = from.type, webex = from.webex;
|
|
142
|
+
destination = from.destination;
|
|
143
|
+
if (!(type === _constants._PERSONAL_ROOM_)) {
|
|
144
|
+
_context.next = 15;
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
if (destination) {
|
|
148
|
+
_context.next = 7;
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
// if we are not getting anything in desination we fetch org and user ids from webex instance
|
|
152
|
+
destination = {
|
|
153
|
+
userId: webex.internal.device.userId,
|
|
154
|
+
orgId: webex.internal.device.orgId
|
|
155
|
+
};
|
|
156
|
+
_context.next = 15;
|
|
157
|
+
break;
|
|
158
|
+
case 7:
|
|
159
|
+
_options = _constants.VALID_EMAIL_ADDRESS.test(destination) ? {
|
|
160
|
+
email: destination
|
|
161
|
+
} : {
|
|
162
|
+
id: destination
|
|
163
|
+
}; // we are assuming userId as default
|
|
164
|
+
_context.next = 10;
|
|
165
|
+
return webex.people.list(_options);
|
|
166
|
+
case 10:
|
|
167
|
+
res = _context.sent;
|
|
168
|
+
_res$items$ = res.items[0], orgId = _res$items$.orgId, userId = _res$items$.id;
|
|
169
|
+
userId = (0, _common.deconstructHydraId)(userId).id;
|
|
170
|
+
orgId = (0, _common.deconstructHydraId)(orgId).id;
|
|
171
|
+
destination = {
|
|
172
|
+
userId: userId,
|
|
173
|
+
orgId: orgId
|
|
174
|
+
};
|
|
175
|
+
case 15:
|
|
176
|
+
if (!type) {
|
|
177
|
+
_context.next = 17;
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
return _context.abrupt("return", {
|
|
181
|
+
destination: destination,
|
|
182
|
+
type: type
|
|
183
|
+
});
|
|
184
|
+
case 17:
|
|
185
|
+
options = {};
|
|
186
|
+
if (webex && webex.config && webex.config.meetings && webex.config.meetings.disableHydraId) {
|
|
187
|
+
hydraId = null;
|
|
188
|
+
} else {
|
|
189
|
+
hydraId = this.getHydraId(destination);
|
|
190
|
+
}
|
|
191
|
+
if (!this.isMeetingLink(destination)) {
|
|
192
|
+
_context.next = 25;
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
_loggerProxy.default.logger.warn('Meeting-info:util#generateOptions --> WARN, use of Meeting Link is deprecated, please use a SIP URI instead');
|
|
196
|
+
options.type = _constants._MEETING_LINK_;
|
|
197
|
+
options.destination = destination;
|
|
198
|
+
_context.next = 52;
|
|
199
|
+
break;
|
|
200
|
+
case 25:
|
|
201
|
+
if (!this.isSipUri(destination)) {
|
|
202
|
+
_context.next = 30;
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
options.type = _constants._SIP_URI_;
|
|
206
|
+
options.destination = destination;
|
|
207
|
+
_context.next = 52;
|
|
208
|
+
break;
|
|
209
|
+
case 30:
|
|
210
|
+
if (!this.isPhoneNumber(destination)) {
|
|
211
|
+
_context.next = 35;
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
options.type = _constants._SIP_URI_;
|
|
215
|
+
options.destination = destination;
|
|
216
|
+
_context.next = 52;
|
|
217
|
+
break;
|
|
218
|
+
case 35:
|
|
219
|
+
if (!this.isConversationUrl(destination, webex)) {
|
|
220
|
+
_context.next = 40;
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
options.type = _constants._CONVERSATION_URL_;
|
|
224
|
+
options.destination = destination;
|
|
225
|
+
_context.next = 52;
|
|
226
|
+
break;
|
|
227
|
+
case 40:
|
|
228
|
+
if (!(hydraId && hydraId.people)) {
|
|
229
|
+
_context.next = 45;
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
options.type = _constants._SIP_URI_;
|
|
233
|
+
return _context.abrupt("return", this.getSipUriFromHydraPersonId(hydraId && hydraId.destination, webex).then(function (res) {
|
|
234
|
+
options.destination = res;
|
|
235
|
+
|
|
236
|
+
// Since hydra person ids require a unique case in which they are
|
|
237
|
+
// entirely converted to a SIP URI, we need to set a flag for detecting
|
|
238
|
+
// this type of destination.
|
|
239
|
+
options.wasHydraPerson = true;
|
|
240
|
+
return _promise.default.resolve(options);
|
|
241
|
+
}));
|
|
242
|
+
case 45:
|
|
243
|
+
if (!hydraId.room) {
|
|
244
|
+
_context.next = 50;
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
_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.");
|
|
248
|
+
// Error code 30105 added as Space ID deprecated as of beta, Please refer migration guide.
|
|
249
|
+
throw new _webexErrors.SpaceIDDeprecatedError();
|
|
250
|
+
case 50:
|
|
251
|
+
_loggerProxy.default.logger.warn("Meeting-info:util#getDestinationType --> ".concat(this.meetingInfoError));
|
|
252
|
+
throw new _parameter.default("".concat(this.meetingInfoError));
|
|
253
|
+
case 52:
|
|
254
|
+
return _context.abrupt("return", _promise.default.resolve(options));
|
|
255
|
+
case 53:
|
|
256
|
+
case "end":
|
|
257
|
+
return _context.stop();
|
|
167
258
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
259
|
+
}, _callee, this);
|
|
260
|
+
}));
|
|
261
|
+
function getDestinationType(_x) {
|
|
262
|
+
return _getDestinationType.apply(this, arguments);
|
|
263
|
+
}
|
|
264
|
+
return getDestinationType;
|
|
265
|
+
}()
|
|
266
|
+
/**
|
|
267
|
+
* Helper function to build up a correct locus url depending on the value passed
|
|
268
|
+
* @param {Object} options type and value to fetch meeting info
|
|
269
|
+
* @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
|
|
270
|
+
* @param {String} options.installedOrgID org ID of user's machine
|
|
271
|
+
* @param {Object} options.destination ?? value.value
|
|
272
|
+
* @returns {Object} returns an object with {resource, method}
|
|
273
|
+
*/
|
|
274
|
+
}, {
|
|
275
|
+
key: "getRequestBody",
|
|
276
|
+
value: function getRequestBody(options) {
|
|
277
|
+
var _destination$info, _destination$info2;
|
|
278
|
+
var type = options.type,
|
|
279
|
+
destination = options.destination,
|
|
280
|
+
password = options.password,
|
|
281
|
+
captchaInfo = options.captchaInfo,
|
|
282
|
+
installedOrgID = options.installedOrgID,
|
|
283
|
+
locusId = options.locusId,
|
|
284
|
+
extraParams = options.extraParams;
|
|
285
|
+
var body = _objectSpread(_objectSpread({}, _constants.DEFAULT_MEETING_INFO_REQUEST_BODY), extraParams);
|
|
286
|
+
switch (type) {
|
|
287
|
+
case _constants._SIP_URI_:
|
|
288
|
+
body.sipUrl = destination;
|
|
172
289
|
break;
|
|
173
|
-
case
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
options.type = _constants._SIP_URI_;
|
|
179
|
-
options.destination = destination;
|
|
180
|
-
_context.next = 52;
|
|
290
|
+
case _constants._PERSONAL_ROOM_:
|
|
291
|
+
body.userId = destination.userId;
|
|
292
|
+
body.orgId = destination.orgId;
|
|
181
293
|
break;
|
|
182
|
-
case
|
|
183
|
-
|
|
184
|
-
_context.next = 35;
|
|
185
|
-
break;
|
|
186
|
-
}
|
|
187
|
-
options.type = _constants._SIP_URI_;
|
|
188
|
-
options.destination = destination;
|
|
189
|
-
_context.next = 52;
|
|
294
|
+
case _constants._MEETING_ID_:
|
|
295
|
+
body.meetingKey = destination;
|
|
190
296
|
break;
|
|
191
|
-
case
|
|
192
|
-
|
|
193
|
-
_context.next = 40;
|
|
194
|
-
break;
|
|
195
|
-
}
|
|
196
|
-
options.type = _constants._CONVERSATION_URL_;
|
|
197
|
-
options.destination = destination;
|
|
198
|
-
_context.next = 52;
|
|
297
|
+
case _constants._CONVERSATION_URL_:
|
|
298
|
+
body.conversationUrl = destination;
|
|
199
299
|
break;
|
|
200
|
-
case
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
300
|
+
case _constants._LOCUS_ID_:
|
|
301
|
+
// use meetingID for the completer meeting info for the already started meeting
|
|
302
|
+
if ((_destination$info = destination.info) !== null && _destination$info !== void 0 && _destination$info.webExMeetingId) {
|
|
303
|
+
body.meetingKey = destination.info.webExMeetingId;
|
|
304
|
+
} else if ((_destination$info2 = destination.info) !== null && _destination$info2 !== void 0 && _destination$info2.sipUri) {
|
|
305
|
+
body.sipUrl = destination.info.sipUri;
|
|
204
306
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
options.wasHydraPerson = true;
|
|
213
|
-
return _promise.default.resolve(options);
|
|
214
|
-
}));
|
|
215
|
-
case 45:
|
|
216
|
-
if (!hydraId.room) {
|
|
217
|
-
_context.next = 50;
|
|
307
|
+
break;
|
|
308
|
+
case _constants._MEETING_LINK_:
|
|
309
|
+
body.meetingUrl = destination;
|
|
310
|
+
break;
|
|
311
|
+
case _constants._MEETING_UUID_:
|
|
312
|
+
{
|
|
313
|
+
body.meetingUUID = destination;
|
|
218
314
|
break;
|
|
219
315
|
}
|
|
220
|
-
|
|
221
|
-
// Error code 30105 added as Space ID deprecated as of beta, Please refer migration guide.
|
|
222
|
-
throw new _webexErrors.SpaceIDDeprecatedError();
|
|
223
|
-
case 50:
|
|
224
|
-
_loggerProxy.default.logger.warn("Meeting-info:util#getDestinationType --> ".concat(meetingInfoError));
|
|
225
|
-
throw new _parameter.default("".concat(meetingInfoError));
|
|
226
|
-
case 52:
|
|
227
|
-
return _context.abrupt("return", _promise.default.resolve(options));
|
|
228
|
-
case 53:
|
|
229
|
-
case "end":
|
|
230
|
-
return _context.stop();
|
|
316
|
+
default:
|
|
231
317
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
return function (_x) {
|
|
235
|
-
return _ref.apply(this, arguments);
|
|
236
|
-
};
|
|
237
|
-
}();
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Helper function to build up a correct locus url depending on the value passed
|
|
241
|
-
* @param {Object} options type and value to fetch meeting info
|
|
242
|
-
* @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
|
|
243
|
-
* @param {String} options.installedOrgID org ID of user's machine
|
|
244
|
-
* @param {Object} options.destination ?? value.value
|
|
245
|
-
* @returns {Object} returns an object with {resource, method}
|
|
246
|
-
*/
|
|
247
|
-
MeetingInfoUtil.getRequestBody = function (options) {
|
|
248
|
-
var _destination$info, _destination$info2;
|
|
249
|
-
var type = options.type,
|
|
250
|
-
destination = options.destination,
|
|
251
|
-
password = options.password,
|
|
252
|
-
captchaInfo = options.captchaInfo,
|
|
253
|
-
installedOrgID = options.installedOrgID,
|
|
254
|
-
locusId = options.locusId,
|
|
255
|
-
extraParams = options.extraParams;
|
|
256
|
-
var body = _objectSpread(_objectSpread({}, _constants.DEFAULT_MEETING_INFO_REQUEST_BODY), extraParams);
|
|
257
|
-
switch (type) {
|
|
258
|
-
case _constants._SIP_URI_:
|
|
259
|
-
body.sipUrl = destination;
|
|
260
|
-
break;
|
|
261
|
-
case _constants._PERSONAL_ROOM_:
|
|
262
|
-
body.userId = destination.userId;
|
|
263
|
-
body.orgId = destination.orgId;
|
|
264
|
-
break;
|
|
265
|
-
case _constants._MEETING_ID_:
|
|
266
|
-
body.meetingKey = destination;
|
|
267
|
-
break;
|
|
268
|
-
case _constants._CONVERSATION_URL_:
|
|
269
|
-
body.conversationUrl = destination;
|
|
270
|
-
break;
|
|
271
|
-
case _constants._LOCUS_ID_:
|
|
272
|
-
// use meetingID for the completer meeting info for the already started meeting
|
|
273
|
-
if ((_destination$info = destination.info) !== null && _destination$info !== void 0 && _destination$info.webExMeetingId) {
|
|
274
|
-
body.meetingKey = destination.info.webExMeetingId;
|
|
275
|
-
} else if ((_destination$info2 = destination.info) !== null && _destination$info2 !== void 0 && _destination$info2.sipUri) {
|
|
276
|
-
body.sipUrl = destination.info.sipUri;
|
|
318
|
+
if (password) {
|
|
319
|
+
body.password = password;
|
|
277
320
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
break;
|
|
282
|
-
case _constants._MEETING_UUID_:
|
|
283
|
-
{
|
|
284
|
-
body.meetingUUID = destination;
|
|
285
|
-
break;
|
|
321
|
+
if (captchaInfo) {
|
|
322
|
+
body.captchaID = captchaInfo.id;
|
|
323
|
+
body.captchaVerifyCode = captchaInfo.code;
|
|
286
324
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
if (installedOrgID) {
|
|
297
|
-
body.installedOrgID = installedOrgID;
|
|
298
|
-
}
|
|
299
|
-
if (locusId) {
|
|
300
|
-
body.locusId = locusId;
|
|
301
|
-
}
|
|
302
|
-
return body;
|
|
303
|
-
};
|
|
325
|
+
if (installedOrgID) {
|
|
326
|
+
body.installedOrgID = installedOrgID;
|
|
327
|
+
}
|
|
328
|
+
if (locusId) {
|
|
329
|
+
body.locusId = locusId;
|
|
330
|
+
}
|
|
331
|
+
return body;
|
|
332
|
+
}
|
|
304
333
|
|
|
305
|
-
/**
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
};
|
|
334
|
+
/**
|
|
335
|
+
* Helper function to parse the webex site/host from a URI string.
|
|
336
|
+
* @param {String} uri string (e.g. '10019857020@convergedats.webex.com')
|
|
337
|
+
* @returns {String} the site/host part of the URI string (e.g. 'convergedats.webex.com')
|
|
338
|
+
*/
|
|
339
|
+
}, {
|
|
340
|
+
key: "getWebexSite",
|
|
341
|
+
value: function getWebexSite(uri) {
|
|
342
|
+
var _uri$match;
|
|
343
|
+
var exceptedDomains = ['meet.webex.com', 'meetup.webex.com', 'ciscospark.com'];
|
|
344
|
+
var site = uri === null || uri === void 0 ? void 0 : (_uri$match = uri.match(/.+@([^.]+\.[^.]+\.[^.]+)$/)) === null || _uri$match === void 0 ? void 0 : _uri$match[1];
|
|
345
|
+
var isExceptedDomain = !!site && exceptedDomains.some(function (domain) {
|
|
346
|
+
return site.includes(domain);
|
|
347
|
+
});
|
|
348
|
+
return isExceptedDomain ? null : site;
|
|
349
|
+
}
|
|
319
350
|
|
|
320
|
-
/**
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
|
|
351
|
+
/**
|
|
352
|
+
* Helper function to return the direct URI for fetching meeting info (to avoid a redirect).
|
|
353
|
+
* @param {Object} options type and value to fetch meeting info
|
|
354
|
+
* @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
|
|
355
|
+
* @param {Object} options.destination ?? value.value
|
|
356
|
+
* @returns {String} returns a URI string or null of there is no direct URI
|
|
357
|
+
*/
|
|
358
|
+
}, {
|
|
359
|
+
key: "getDirectMeetingInfoURI",
|
|
360
|
+
value: function getDirectMeetingInfoURI(options) {
|
|
361
|
+
var _destination$info3;
|
|
362
|
+
var type = options.type,
|
|
363
|
+
destination = options.destination;
|
|
364
|
+
var preferredWebexSite = null;
|
|
365
|
+
switch (type) {
|
|
366
|
+
case _constants._SIP_URI_:
|
|
367
|
+
preferredWebexSite = this.getWebexSite(destination);
|
|
368
|
+
break;
|
|
369
|
+
case _constants._LOCUS_ID_:
|
|
370
|
+
preferredWebexSite = (_destination$info3 = destination.info) === null || _destination$info3 === void 0 ? void 0 : _destination$info3.webExSite;
|
|
371
|
+
break;
|
|
372
|
+
default:
|
|
373
|
+
}
|
|
374
|
+
return preferredWebexSite ? "https://".concat(preferredWebexSite, "/wbxappapi/v1/meetingInfo") : null;
|
|
375
|
+
}
|
|
376
|
+
}]);
|
|
377
|
+
return MeetingInfoUtil;
|
|
378
|
+
}();
|
|
379
|
+
(0, _defineProperty2.default)(MeetingInfoUtil, "meetingInfoError", 'MeetingInfo is fetched with the meeting link, SIP URI, phone number, Hydra people ID, or a conversation URL.');
|
|
344
380
|
//# sourceMappingURL=utilv2.js.map
|