@webex/calling 3.12.0-next.10 → 3.12.0-next.100
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/CallRecording/CallRecording.js +160 -0
- package/dist/CallRecording/CallRecording.js.map +1 -0
- package/dist/CallRecording/CallRecording.test.js +257 -0
- package/dist/CallRecording/CallRecording.test.js.map +1 -0
- package/dist/CallRecording/WxcCallRecordingConnector.js +577 -0
- package/dist/CallRecording/WxcCallRecordingConnector.js.map +1 -0
- package/dist/CallRecording/WxcCallRecordingConnector.test.js +652 -0
- package/dist/CallRecording/WxcCallRecordingConnector.test.js.map +1 -0
- package/dist/CallRecording/callRecordingFixtures.js +235 -0
- package/dist/CallRecording/callRecordingFixtures.js.map +1 -0
- package/dist/CallRecording/constants.js +50 -0
- package/dist/CallRecording/constants.js.map +1 -0
- package/dist/CallRecording/types.js +137 -0
- package/dist/CallRecording/types.js.map +1 -0
- package/dist/CallRecording/utils.js +42 -0
- package/dist/CallRecording/utils.js.map +1 -0
- package/dist/CallRecording/utils.test.js +97 -0
- package/dist/CallRecording/utils.test.js.map +1 -0
- package/dist/CallingClient/CallingClient.js +456 -226
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +513 -154
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/calling/call.js +635 -455
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +874 -484
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +106 -35
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/callManager.test.js +140 -0
- package/dist/CallingClient/calling/callManager.test.js.map +1 -1
- package/dist/CallingClient/calling/types.js +5 -0
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/constants.js +32 -3
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/index.js +8 -1
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +62 -10
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/registration/register.js +967 -504
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +936 -59
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/types.js +26 -0
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.js +41 -104
- package/dist/CallingClient/registration/webWorker.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.test.js +39 -153
- package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
- package/dist/CallingClient/types.js +7 -0
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/CallingClient/utils/constants.js +58 -0
- package/dist/CallingClient/utils/constants.js.map +1 -0
- package/dist/CallingClient/utils/index.js +63 -0
- package/dist/CallingClient/utils/index.js.map +1 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.js +122 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.js.map +1 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.test.js +221 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.test.js.map +1 -0
- package/dist/CallingClient/utils/request.js +435 -0
- package/dist/CallingClient/utils/request.js.map +1 -0
- package/dist/CallingClient/utils/request.test.js +999 -0
- package/dist/CallingClient/utils/request.test.js.map +1 -0
- package/dist/CallingClient/utils/types.js +7 -0
- package/dist/CallingClient/utils/types.js.map +1 -0
- package/dist/CallingClient/utils/wsFeatureFlag.js +70 -0
- package/dist/CallingClient/utils/wsFeatureFlag.js.map +1 -0
- package/dist/CallingClient/utils/wsFeatureFlag.test.js +139 -0
- package/dist/CallingClient/utils/wsFeatureFlag.test.js.map +1 -0
- package/dist/Contacts/ContactsClient.js +13 -11
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/ContactsClient.test.js +3 -8
- package/dist/Contacts/ContactsClient.test.js.map +1 -1
- package/dist/Errors/types.js +2 -0
- package/dist/Errors/types.js.map +1 -1
- package/dist/Events/types.js +38 -1
- package/dist/Events/types.js.map +1 -1
- package/dist/Metrics/index.js +63 -2
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +357 -1
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js +19 -1
- package/dist/Metrics/types.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/api.js +56 -0
- package/dist/api.js.map +1 -1
- package/dist/common/Utils.js +198 -68
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +414 -181
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/testUtil.js +10 -5
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js +3 -0
- package/dist/common/types.js.map +1 -1
- package/dist/index.js +171 -40
- package/dist/index.js.map +1 -1
- package/dist/mobius-socket/config.js +24 -0
- package/dist/mobius-socket/config.js.map +1 -0
- package/dist/mobius-socket/errors.js +143 -0
- package/dist/mobius-socket/errors.js.map +1 -0
- package/dist/mobius-socket/errors.test.js +20 -0
- package/dist/mobius-socket/errors.test.js.map +1 -0
- package/dist/mobius-socket/index.js +57 -0
- package/dist/mobius-socket/index.js.map +1 -0
- package/dist/mobius-socket/mobius-socket-events.test.js +492 -0
- package/dist/mobius-socket/mobius-socket-events.test.js.map +1 -0
- package/dist/mobius-socket/mobius-socket.js +849 -0
- package/dist/mobius-socket/mobius-socket.js.map +1 -0
- package/dist/mobius-socket/mobius-socket.test.js +1898 -0
- package/dist/mobius-socket/mobius-socket.test.js.map +1 -0
- package/dist/mobius-socket/socket/constants.js +55 -0
- package/dist/mobius-socket/socket/constants.js.map +1 -0
- package/dist/mobius-socket/socket/index.js +15 -0
- package/dist/mobius-socket/socket/index.js.map +1 -0
- package/dist/mobius-socket/socket/socket-base.js +604 -0
- package/dist/mobius-socket/socket/socket-base.js.map +1 -0
- package/dist/mobius-socket/socket/socket.js +19 -0
- package/dist/mobius-socket/socket/socket.js.map +1 -0
- package/dist/mobius-socket/socket/socket.shim.js +26 -0
- package/dist/mobius-socket/socket/socket.shim.js.map +1 -0
- package/dist/mobius-socket/socket/types.js +7 -0
- package/dist/mobius-socket/socket/types.js.map +1 -0
- package/dist/mobius-socket/socket.test.js +727 -0
- package/dist/mobius-socket/socket.test.js.map +1 -0
- package/dist/mobius-socket/test/mocha-helpers.js +23 -0
- package/dist/mobius-socket/test/mocha-helpers.js.map +1 -0
- package/dist/mobius-socket/test/promise-tick.js +28 -0
- package/dist/mobius-socket/test/promise-tick.js.map +1 -0
- package/dist/mobius-socket/types.js +7 -0
- package/dist/mobius-socket/types.js.map +1 -0
- package/dist/module/CallRecording/CallRecording.js +56 -0
- package/dist/module/CallRecording/WxcCallRecordingConnector.js +257 -0
- package/dist/module/CallRecording/callRecordingFixtures.js +201 -0
- package/dist/module/CallRecording/constants.js +28 -0
- package/dist/module/CallRecording/types.js +19 -0
- package/dist/module/CallRecording/utils.js +14 -0
- package/dist/module/CallingClient/CallingClient.js +126 -10
- package/dist/module/CallingClient/calling/call.js +201 -67
- package/dist/module/CallingClient/calling/callManager.js +51 -11
- package/dist/module/CallingClient/calling/types.js +2 -0
- package/dist/module/CallingClient/constants.js +27 -0
- package/dist/module/CallingClient/line/index.js +4 -2
- package/dist/module/CallingClient/registration/register.js +294 -67
- package/dist/module/CallingClient/registration/types.js +5 -1
- package/dist/module/CallingClient/registration/webWorker.js +42 -61
- package/dist/module/CallingClient/registration/webWorkerStr.js +47 -82
- package/dist/module/CallingClient/utils/constants.js +36 -0
- package/dist/module/CallingClient/utils/index.js +5 -0
- package/dist/module/CallingClient/utils/mobiusSocketMapper.js +72 -0
- package/dist/module/CallingClient/utils/request.js +211 -0
- package/dist/module/CallingClient/utils/types.js +1 -0
- package/dist/module/CallingClient/utils/wsFeatureFlag.js +41 -0
- package/dist/module/Contacts/ContactsClient.js +1 -1
- package/dist/module/Errors/types.js +2 -0
- package/dist/module/Events/types.js +23 -0
- package/dist/module/Metrics/index.js +48 -1
- package/dist/module/Metrics/types.js +18 -0
- package/dist/module/api.js +3 -2
- package/dist/module/common/Utils.js +77 -19
- package/dist/module/common/testUtil.js +6 -1
- package/dist/module/common/types.js +3 -0
- package/dist/module/index.js +7 -3
- package/dist/module/mobius-socket/config.js +15 -0
- package/dist/module/mobius-socket/errors.js +58 -0
- package/dist/module/mobius-socket/index.js +24 -0
- package/dist/module/mobius-socket/mobius-socket.js +593 -0
- package/dist/module/mobius-socket/socket/constants.js +26 -0
- package/dist/module/mobius-socket/socket/index.js +4 -0
- package/dist/module/mobius-socket/socket/socket-base.js +368 -0
- package/dist/module/mobius-socket/socket/socket.js +9 -0
- package/dist/module/mobius-socket/socket/socket.shim.js +12 -0
- package/dist/module/mobius-socket/socket/types.js +1 -0
- package/dist/module/mobius-socket/types.js +1 -0
- package/dist/types/CallRecording/CallRecording.d.ts +18 -0
- package/dist/types/CallRecording/CallRecording.d.ts.map +1 -0
- package/dist/types/CallRecording/WxcCallRecordingConnector.d.ts +23 -0
- package/dist/types/CallRecording/WxcCallRecordingConnector.d.ts.map +1 -0
- package/dist/types/CallRecording/callRecordingFixtures.d.ts +61 -0
- package/dist/types/CallRecording/callRecordingFixtures.d.ts.map +1 -0
- package/dist/types/CallRecording/constants.d.ts +29 -0
- package/dist/types/CallRecording/constants.d.ts.map +1 -0
- package/dist/types/CallRecording/types.d.ts +176 -0
- package/dist/types/CallRecording/types.d.ts.map +1 -0
- package/dist/types/CallRecording/utils.d.ts +3 -0
- package/dist/types/CallRecording/utils.d.ts.map +1 -0
- package/dist/types/CallingClient/CallingClient.d.ts +8 -0
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts +17 -3
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/callManager.d.ts +8 -4
- package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +38 -9
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +27 -0
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts +1 -1
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +9 -1
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts +26 -2
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts.map +1 -1
- package/dist/types/CallingClient/types.d.ts +4 -2
- package/dist/types/CallingClient/types.d.ts.map +1 -1
- package/dist/types/CallingClient/utils/constants.d.ts +35 -0
- package/dist/types/CallingClient/utils/constants.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/index.d.ts +6 -0
- package/dist/types/CallingClient/utils/index.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/mobiusSocketMapper.d.ts +5 -0
- package/dist/types/CallingClient/utils/mobiusSocketMapper.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/request.d.ts +28 -0
- package/dist/types/CallingClient/utils/request.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/types.d.ts +34 -0
- package/dist/types/CallingClient/utils/types.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/wsFeatureFlag.d.ts +4 -0
- package/dist/types/CallingClient/utils/wsFeatureFlag.d.ts.map +1 -0
- package/dist/types/Errors/types.d.ts +2 -0
- package/dist/types/Errors/types.d.ts.map +1 -1
- package/dist/types/Events/types.d.ts +80 -6
- package/dist/types/Events/types.d.ts.map +1 -1
- package/dist/types/Metrics/index.d.ts.map +1 -1
- package/dist/types/Metrics/types.d.ts +19 -2
- package/dist/types/Metrics/types.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +39 -12
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/api.d.ts +6 -4
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts +9 -4
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/testUtil.d.ts +5 -1
- package/dist/types/common/testUtil.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +5 -1
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +9 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/mobius-socket/config.d.ts +17 -0
- package/dist/types/mobius-socket/config.d.ts.map +1 -0
- package/dist/types/mobius-socket/errors.d.ts +32 -0
- package/dist/types/mobius-socket/errors.d.ts.map +1 -0
- package/dist/types/mobius-socket/index.d.ts +14 -0
- package/dist/types/mobius-socket/index.d.ts.map +1 -0
- package/dist/types/mobius-socket/mobius-socket.d.ts +48 -0
- package/dist/types/mobius-socket/mobius-socket.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/constants.d.ts +27 -0
- package/dist/types/mobius-socket/socket/constants.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/index.d.ts +5 -0
- package/dist/types/mobius-socket/socket/index.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket-base.d.ts +43 -0
- package/dist/types/mobius-socket/socket/socket-base.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket.d.ts +6 -0
- package/dist/types/mobius-socket/socket/socket.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket.shim.d.ts +6 -0
- package/dist/types/mobius-socket/socket/socket.shim.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/types.d.ts +61 -0
- package/dist/types/mobius-socket/socket/types.d.ts.map +1 -0
- package/dist/types/mobius-socket/types.d.ts +21 -0
- package/dist/types/mobius-socket/types.d.ts.map +1 -0
- package/package.json +20 -7
- package/src/mobius-socket/socket/socket.shim.ts +22 -0
- package/src/mobius-socket/socket/socket.ts +14 -0
package/dist/common/Utils.js
CHANGED
|
@@ -27,10 +27,13 @@ exports.handleCallErrors = handleCallErrors;
|
|
|
27
27
|
exports.handleCallingClientErrors = handleCallingClientErrors;
|
|
28
28
|
exports.handleRegistrationErrors = handleRegistrationErrors;
|
|
29
29
|
exports.inferIdFromUuid = inferIdFromUuid;
|
|
30
|
+
exports.isValidServiceDomain = isValidServiceDomain;
|
|
30
31
|
exports.modifySdpForIPv4 = modifySdpForIPv4;
|
|
32
|
+
exports.normalizeMobiusUris = normalizeMobiusUris;
|
|
31
33
|
exports.parseMediaQualityStatistics = parseMediaQualityStatistics;
|
|
32
34
|
exports.resolveCallerIdByName = resolveCallerIdByName;
|
|
33
35
|
exports.resolveCallerIdDisplay = resolveCallerIdDisplay;
|
|
36
|
+
exports.resolveCallingBackend = resolveCallingBackend;
|
|
34
37
|
exports.resolveContact = resolveContact;
|
|
35
38
|
exports.scimQuery = scimQuery;
|
|
36
39
|
exports.serviceErrorCodeHandler = serviceErrorCodeHandler;
|
|
@@ -66,13 +69,15 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbo
|
|
|
66
69
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
67
70
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /* eslint-disable no-fallthrough */ /* eslint-disable no-underscore-dangle */ /* eslint-disable @typescript-eslint/no-shadow */
|
|
68
71
|
function filterMobiusUris(mobiusServers, defaultMobiusUrl) {
|
|
69
|
-
var _mobiusServers$primar, _mobiusServers$backup;
|
|
72
|
+
var _mobiusServers$primar, _mobiusServers$primar2, _mobiusServers$backup, _mobiusServers$backup2;
|
|
70
73
|
var logContext = {
|
|
71
74
|
file: _constants.UTILS_FILE,
|
|
72
75
|
method: 'filterMobiusUris'
|
|
73
76
|
};
|
|
74
77
|
var urisArrayPrimary = [];
|
|
75
78
|
var urisArrayBackup = [];
|
|
79
|
+
var wssArrayPrimary = [];
|
|
80
|
+
var wssArrayBackup = [];
|
|
76
81
|
if (mobiusServers !== null && mobiusServers !== void 0 && (_mobiusServers$primar = mobiusServers.primary) !== null && _mobiusServers$primar !== void 0 && _mobiusServers$primar.uris) {
|
|
77
82
|
_Logger.default.info('Adding Primary uris', logContext);
|
|
78
83
|
var _iterator = _createForOfIteratorHelper(mobiusServers.primary.uris),
|
|
@@ -88,14 +93,14 @@ function filterMobiusUris(mobiusServers, defaultMobiusUrl) {
|
|
|
88
93
|
_iterator.f();
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
|
-
if (mobiusServers !== null && mobiusServers !== void 0 && (_mobiusServers$
|
|
92
|
-
_Logger.default.info('Adding
|
|
93
|
-
var _iterator2 = _createForOfIteratorHelper(mobiusServers.
|
|
96
|
+
if (mobiusServers !== null && mobiusServers !== void 0 && (_mobiusServers$primar2 = mobiusServers.primary) !== null && _mobiusServers$primar2 !== void 0 && _mobiusServers$primar2.wss) {
|
|
97
|
+
_Logger.default.info('Adding Primary wss uris', logContext);
|
|
98
|
+
var _iterator2 = _createForOfIteratorHelper(mobiusServers.primary.wss),
|
|
94
99
|
_step2;
|
|
95
100
|
try {
|
|
96
101
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
97
|
-
var
|
|
98
|
-
|
|
102
|
+
var wssUri = _step2.value;
|
|
103
|
+
wssArrayPrimary.push(wssUri);
|
|
99
104
|
}
|
|
100
105
|
} catch (err) {
|
|
101
106
|
_iterator2.e(err);
|
|
@@ -103,6 +108,36 @@ function filterMobiusUris(mobiusServers, defaultMobiusUrl) {
|
|
|
103
108
|
_iterator2.f();
|
|
104
109
|
}
|
|
105
110
|
}
|
|
111
|
+
if (mobiusServers !== null && mobiusServers !== void 0 && (_mobiusServers$backup = mobiusServers.backup) !== null && _mobiusServers$backup !== void 0 && _mobiusServers$backup.uris) {
|
|
112
|
+
_Logger.default.info('Adding Backup uris', logContext);
|
|
113
|
+
var _iterator3 = _createForOfIteratorHelper(mobiusServers.backup.uris),
|
|
114
|
+
_step3;
|
|
115
|
+
try {
|
|
116
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
117
|
+
var _uri = _step3.value;
|
|
118
|
+
urisArrayBackup.push("".concat(_uri).concat(_constants.URL_ENDPOINT));
|
|
119
|
+
}
|
|
120
|
+
} catch (err) {
|
|
121
|
+
_iterator3.e(err);
|
|
122
|
+
} finally {
|
|
123
|
+
_iterator3.f();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (mobiusServers !== null && mobiusServers !== void 0 && (_mobiusServers$backup2 = mobiusServers.backup) !== null && _mobiusServers$backup2 !== void 0 && _mobiusServers$backup2.wss) {
|
|
127
|
+
_Logger.default.info('Adding Backup wss uris', logContext);
|
|
128
|
+
var _iterator4 = _createForOfIteratorHelper(mobiusServers.backup.wss),
|
|
129
|
+
_step4;
|
|
130
|
+
try {
|
|
131
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
132
|
+
var _wssUri = _step4.value;
|
|
133
|
+
wssArrayBackup.push(_wssUri);
|
|
134
|
+
}
|
|
135
|
+
} catch (err) {
|
|
136
|
+
_iterator4.e(err);
|
|
137
|
+
} finally {
|
|
138
|
+
_iterator4.f();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
106
141
|
|
|
107
142
|
/*
|
|
108
143
|
* If there are no entries in both primary and backup arrays then add the default
|
|
@@ -116,6 +151,8 @@ function filterMobiusUris(mobiusServers, defaultMobiusUrl) {
|
|
|
116
151
|
}
|
|
117
152
|
var primaryUris = [];
|
|
118
153
|
var backupUris = [];
|
|
154
|
+
var primaryWss = [];
|
|
155
|
+
var backupWss = [];
|
|
119
156
|
|
|
120
157
|
/* Remove duplicates from primary by keeping the order intact */
|
|
121
158
|
for (var i = 0; i < urisArrayPrimary.length; i += 1) {
|
|
@@ -130,9 +167,25 @@ function filterMobiusUris(mobiusServers, defaultMobiusUrl) {
|
|
|
130
167
|
backupUris.push(urisArrayBackup[_i]);
|
|
131
168
|
}
|
|
132
169
|
}
|
|
170
|
+
|
|
171
|
+
/* Remove duplicates from primary wss by keeping the order intact */
|
|
172
|
+
for (var _i2 = 0; _i2 < wssArrayPrimary.length; _i2 += 1) {
|
|
173
|
+
if (primaryWss.indexOf(wssArrayPrimary[_i2]) === -1) {
|
|
174
|
+
primaryWss.push(wssArrayPrimary[_i2]);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Remove duplicates from backup wss by keeping the order intact */
|
|
179
|
+
for (var _i3 = 0; _i3 < wssArrayBackup.length; _i3 += 1) {
|
|
180
|
+
if (backupWss.indexOf(wssArrayBackup[_i3]) === -1) {
|
|
181
|
+
backupWss.push(wssArrayBackup[_i3]);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
133
184
|
return {
|
|
134
185
|
primary: primaryUris,
|
|
135
|
-
backup: backupUris
|
|
186
|
+
backup: backupUris,
|
|
187
|
+
primaryWss: primaryWss,
|
|
188
|
+
backupWss: backupWss
|
|
136
189
|
};
|
|
137
190
|
}
|
|
138
191
|
|
|
@@ -196,9 +249,9 @@ function updateErrorContext(errContext, type, message, clientError) {
|
|
|
196
249
|
* @param caller - Method which called this handler.
|
|
197
250
|
* @param file - File name from where error got reported.
|
|
198
251
|
*/
|
|
199
|
-
function emitFinalFailure(emitterCb, loggerContext) {
|
|
200
|
-
var clientError = (0, _LineError.createLineError)('', {}, _types2.ERROR_TYPE.DEFAULT, _types3.RegistrationStatus.INACTIVE);
|
|
201
|
-
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.SERVICE_UNAVAILABLE, 'An unknown error occurred. Wait a moment and try again. Please contact the administrator if the problem persists.', _types3.RegistrationStatus.INACTIVE, clientError);
|
|
252
|
+
function emitFinalFailure(emitterCb, loggerContext, message) {
|
|
253
|
+
var clientError = (0, _LineError.createLineError)(message || '', {}, _types2.ERROR_TYPE.DEFAULT, _types3.RegistrationStatus.INACTIVE);
|
|
254
|
+
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.SERVICE_UNAVAILABLE, message || 'An unknown error occurred. Wait a moment and try again. Please contact the administrator if the problem persists.', _types3.RegistrationStatus.INACTIVE, clientError);
|
|
202
255
|
emitterCb(clientError);
|
|
203
256
|
}
|
|
204
257
|
|
|
@@ -207,7 +260,9 @@ function emitFinalFailure(emitterCb, loggerContext) {
|
|
|
207
260
|
* @param err - Error body.
|
|
208
261
|
* @param emitterCb - LineErrorEmitterCallback
|
|
209
262
|
* @param loggerContext - Logging context that has method and file name
|
|
210
|
-
* @param
|
|
263
|
+
* @param handlers - Specialized per-status-code handlers the caller opts into, as
|
|
264
|
+
* {@link RegistrationErrorHandlers}.
|
|
265
|
+
* @param serverCount - Number of servers in the list.
|
|
211
266
|
*
|
|
212
267
|
* In emitterCb,
|
|
213
268
|
* For non final error scenarios in registration flow,
|
|
@@ -218,7 +273,7 @@ function emitFinalFailure(emitterCb, loggerContext) {
|
|
|
218
273
|
* be scheduled to attempt registration again.
|
|
219
274
|
*
|
|
220
275
|
*/
|
|
221
|
-
function handleRegistrationErrors(_x, _x2, _x3
|
|
276
|
+
function handleRegistrationErrors(_x, _x2, _x3) {
|
|
222
277
|
return _handleRegistrationErrors.apply(this, arguments);
|
|
223
278
|
}
|
|
224
279
|
/**
|
|
@@ -229,112 +284,174 @@ function handleRegistrationErrors(_x, _x2, _x3, _x4, _x5) {
|
|
|
229
284
|
* @param restoreRegCb - Callback which will try restoring resgistration in case of 403
|
|
230
285
|
*/
|
|
231
286
|
function _handleRegistrationErrors() {
|
|
232
|
-
_handleRegistrationErrors = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(err, emitterCb, loggerContext
|
|
233
|
-
var
|
|
287
|
+
_handleRegistrationErrors = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(err, emitterCb, loggerContext) {
|
|
288
|
+
var handlers,
|
|
289
|
+
serverCount,
|
|
290
|
+
retry429Cb,
|
|
291
|
+
restoreRegCb,
|
|
292
|
+
sessionSupersededCb,
|
|
293
|
+
shouldDisconnect,
|
|
294
|
+
lineError,
|
|
295
|
+
errorCode,
|
|
296
|
+
finalError,
|
|
297
|
+
caller,
|
|
298
|
+
retryAfter,
|
|
299
|
+
errorBody,
|
|
300
|
+
code,
|
|
301
|
+
errorMessage,
|
|
302
|
+
_caller,
|
|
303
|
+
_errorMessage,
|
|
304
|
+
_errorMessage2,
|
|
305
|
+
_errorMessage3,
|
|
306
|
+
_args = arguments,
|
|
307
|
+
_t,
|
|
308
|
+
_t2;
|
|
234
309
|
return _regenerator.default.wrap(function (_context) {
|
|
235
310
|
while (1) switch (_context.prev = _context.next) {
|
|
236
311
|
case 0:
|
|
312
|
+
handlers = _args.length > 3 && _args[3] !== undefined ? _args[3] : {};
|
|
313
|
+
serverCount = _args.length > 4 && _args[4] !== undefined ? _args[4] : 1;
|
|
314
|
+
retry429Cb = handlers.retry429Cb, restoreRegCb = handlers.restoreRegCb, sessionSupersededCb = handlers.sessionSupersededCb;
|
|
315
|
+
shouldDisconnect = false;
|
|
237
316
|
lineError = (0, _LineError.createLineError)('', {}, _types2.ERROR_TYPE.DEFAULT, _types3.RegistrationStatus.INACTIVE);
|
|
238
317
|
errorCode = Number(err.statusCode);
|
|
239
318
|
finalError = false;
|
|
240
319
|
_Logger.default.warn("Status code: -> ".concat(errorCode), loggerContext);
|
|
241
320
|
_t = errorCode;
|
|
242
|
-
_context.next = _t === _types2.ERROR_CODE.BAD_REQUEST ? 1 : _t === _types2.ERROR_CODE.UNAUTHORIZED ? 2 : _t === _types2.ERROR_CODE.DEVICE_NOT_FOUND ? 3 : _t === _types2.ERROR_CODE.
|
|
321
|
+
_context.next = _t === _types2.ERROR_CODE.BAD_REQUEST ? 1 : _t === _types2.ERROR_CODE.UNAUTHORIZED ? 2 : _t === _types2.ERROR_CODE.DEVICE_NOT_FOUND ? 3 : _t === _types2.ERROR_CODE.CONFLICT ? 4 : _t === _types2.ERROR_CODE.TOO_MANY_REQUESTS ? 7 : _t === _types2.ERROR_CODE.INTERNAL_SERVER_ERROR ? 9 : _t === _types2.ERROR_CODE.SERVICE_UNAVAILABLE ? 10 : _t === _types2.ERROR_CODE.FORBIDDEN ? 11 : 19;
|
|
243
322
|
break;
|
|
244
323
|
case 1:
|
|
245
324
|
finalError = true;
|
|
246
325
|
_Logger.default.warn("400 Bad Request", loggerContext);
|
|
247
326
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.BAD_REQUEST, 'Invalid input. Please verify the required parameters, sign out and then sign back in with the valid data', _types3.RegistrationStatus.INACTIVE, lineError);
|
|
248
327
|
emitterCb(lineError, finalError);
|
|
249
|
-
|
|
328
|
+
shouldDisconnect = serverCount > 1;
|
|
329
|
+
return _context.abrupt("continue", 20);
|
|
250
330
|
case 2:
|
|
251
331
|
// Return it to the Caller
|
|
252
332
|
finalError = true;
|
|
253
333
|
_Logger.default.warn("401 Unauthorized", loggerContext);
|
|
254
334
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.TOKEN_ERROR, 'User is unauthorized due to an expired token. Sign out, then sign back in.', _types3.RegistrationStatus.INACTIVE, lineError);
|
|
255
335
|
emitterCb(lineError, finalError);
|
|
256
|
-
|
|
336
|
+
shouldDisconnect = serverCount > 1;
|
|
337
|
+
return _context.abrupt("continue", 20);
|
|
257
338
|
case 3:
|
|
258
339
|
finalError = true;
|
|
259
340
|
_Logger.default.warn("404 Device Not Found", loggerContext);
|
|
260
341
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.NOT_FOUND, 'Webex Calling is unable to find your device. Sign out, then sign back in', _types3.RegistrationStatus.INACTIVE, lineError);
|
|
261
342
|
emitterCb(lineError, finalError);
|
|
262
|
-
|
|
343
|
+
shouldDisconnect = serverCount > 1;
|
|
344
|
+
return _context.abrupt("continue", 20);
|
|
263
345
|
case 4:
|
|
346
|
+
if (sessionSupersededCb) {
|
|
347
|
+
_context.next = 5;
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
_Logger.default.warn("409 Conflict: ignored, caller does not handle a superseded session", loggerContext);
|
|
351
|
+
return _context.abrupt("continue", 20);
|
|
352
|
+
case 5:
|
|
353
|
+
finalError = true;
|
|
354
|
+
_Logger.default.warn("409 Conflict: session superseded by another device for this user", loggerContext);
|
|
355
|
+
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.SESSION_SUPERSEDED, _constants.SESSION_SUPERSEDED_MESSAGE, _types3.RegistrationStatus.INACTIVE, lineError);
|
|
356
|
+
_context.next = 6;
|
|
357
|
+
return sessionSupersededCb(lineError);
|
|
358
|
+
case 6:
|
|
359
|
+
shouldDisconnect = false;
|
|
360
|
+
return _context.abrupt("continue", 20);
|
|
361
|
+
case 7:
|
|
264
362
|
_Logger.default.warn("429 Too Many Requests", loggerContext);
|
|
265
363
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.TOO_MANY_REQUESTS, 'Server is handling too many request at the time. Wait a moment and try again', _types3.RegistrationStatus.INACTIVE, lineError);
|
|
266
364
|
caller = loggerContext.method || 'handleErrors';
|
|
267
|
-
if (retry429Cb && err.headers) {
|
|
268
|
-
|
|
269
|
-
|
|
365
|
+
if (!(retry429Cb && err.headers)) {
|
|
366
|
+
_context.next = 8;
|
|
367
|
+
break;
|
|
270
368
|
}
|
|
271
|
-
|
|
272
|
-
|
|
369
|
+
retryAfter = Number(err.headers['retry-after']);
|
|
370
|
+
_context.next = 8;
|
|
371
|
+
return retry429Cb(retryAfter, caller);
|
|
372
|
+
case 8:
|
|
373
|
+
shouldDisconnect = false;
|
|
374
|
+
return _context.abrupt("continue", 20);
|
|
375
|
+
case 9:
|
|
273
376
|
_Logger.default.warn("500 Internal Server Error", loggerContext);
|
|
274
377
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.SERVER_ERROR, 'An unknown error occurred while placing the request. Wait a moment and try again.', _types3.RegistrationStatus.INACTIVE, lineError);
|
|
275
378
|
emitterCb(lineError, finalError);
|
|
276
|
-
|
|
277
|
-
|
|
379
|
+
shouldDisconnect = serverCount > 1;
|
|
380
|
+
return _context.abrupt("continue", 20);
|
|
381
|
+
case 10:
|
|
278
382
|
_Logger.default.warn("503 Service Unavailable", loggerContext);
|
|
279
383
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.SERVICE_UNAVAILABLE, 'An error occurred on the server while processing the request. Wait a moment and try again.', _types3.RegistrationStatus.INACTIVE, lineError);
|
|
280
384
|
emitterCb(lineError, finalError);
|
|
281
|
-
|
|
282
|
-
|
|
385
|
+
shouldDisconnect = serverCount > 1;
|
|
386
|
+
return _context.abrupt("continue", 20);
|
|
387
|
+
case 11:
|
|
283
388
|
_Logger.default.warn("403 Forbidden", loggerContext);
|
|
284
389
|
errorBody = err.body;
|
|
285
390
|
if (errorBody) {
|
|
286
|
-
_context.next =
|
|
391
|
+
_context.next = 12;
|
|
287
392
|
break;
|
|
288
393
|
}
|
|
289
394
|
_Logger.default.warn('Error response has no body, throwing default error', loggerContext);
|
|
290
395
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.FORBIDDEN_ERROR, 'An unauthorized action has been received. This action has been blocked. Please contact the administrator if this persists.', _types3.RegistrationStatus.INACTIVE, lineError);
|
|
291
396
|
emitterCb(lineError, finalError);
|
|
292
|
-
|
|
293
|
-
|
|
397
|
+
shouldDisconnect = serverCount > 1;
|
|
398
|
+
return _context.abrupt("return", {
|
|
399
|
+
finalError: finalError,
|
|
400
|
+
shouldDisconnect: shouldDisconnect
|
|
401
|
+
});
|
|
402
|
+
case 12:
|
|
294
403
|
code = Number(errorBody.errorCode);
|
|
295
404
|
_Logger.default.warn("Error code found : ".concat(code), loggerContext);
|
|
296
405
|
_t2 = code;
|
|
297
|
-
_context.next = _t2 === _types2.DEVICE_ERROR_CODE.DEVICE_LIMIT_EXCEEDED ?
|
|
406
|
+
_context.next = _t2 === _types2.DEVICE_ERROR_CODE.DEVICE_LIMIT_EXCEEDED ? 13 : _t2 === _types2.DEVICE_ERROR_CODE.DEVICE_CREATION_DISABLED ? 15 : _t2 === _types2.DEVICE_ERROR_CODE.DEVICE_CREATION_FAILED ? 16 : 17;
|
|
298
407
|
break;
|
|
299
|
-
case
|
|
408
|
+
case 13:
|
|
300
409
|
errorMessage = 'User device limit exceeded';
|
|
301
410
|
_Logger.default.warn(errorMessage, loggerContext);
|
|
302
411
|
if (!restoreRegCb) {
|
|
303
|
-
_context.next =
|
|
412
|
+
_context.next = 14;
|
|
304
413
|
break;
|
|
305
414
|
}
|
|
306
415
|
_caller = loggerContext.method || 'handleErrors';
|
|
307
|
-
_context.next =
|
|
416
|
+
_context.next = 14;
|
|
308
417
|
return restoreRegCb(errorBody, _caller);
|
|
309
|
-
case
|
|
310
|
-
|
|
311
|
-
|
|
418
|
+
case 14:
|
|
419
|
+
shouldDisconnect = false;
|
|
420
|
+
return _context.abrupt("continue", 18);
|
|
421
|
+
case 15:
|
|
312
422
|
_errorMessage = 'User is not configured for WebRTC calling. Please contact the administrator to resolve this issue.';
|
|
313
423
|
finalError = true;
|
|
314
424
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage, _types3.RegistrationStatus.INACTIVE, lineError);
|
|
315
425
|
_Logger.default.warn(_errorMessage, loggerContext);
|
|
316
426
|
emitterCb(lineError, true);
|
|
317
|
-
|
|
318
|
-
|
|
427
|
+
shouldDisconnect = true;
|
|
428
|
+
return _context.abrupt("continue", 18);
|
|
429
|
+
case 16:
|
|
319
430
|
_errorMessage2 = 'An unknown error occurred while provisioning the device. Wait a moment and try again.';
|
|
320
431
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage2, _types3.RegistrationStatus.INACTIVE, lineError);
|
|
321
432
|
_Logger.default.warn(_errorMessage2, loggerContext);
|
|
322
433
|
emitterCb(lineError, finalError);
|
|
323
|
-
|
|
324
|
-
|
|
434
|
+
shouldDisconnect = serverCount > 1;
|
|
435
|
+
return _context.abrupt("continue", 18);
|
|
436
|
+
case 17:
|
|
325
437
|
_errorMessage3 = 'An unknown error occurred. Wait a moment and try again. Please contact the administrator if the problem persists.';
|
|
326
438
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage3, _types3.RegistrationStatus.INACTIVE, lineError);
|
|
327
439
|
_Logger.default.warn(_errorMessage3, loggerContext);
|
|
328
440
|
emitterCb(lineError, finalError);
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
441
|
+
shouldDisconnect = serverCount > 1;
|
|
442
|
+
case 18:
|
|
443
|
+
return _context.abrupt("continue", 20);
|
|
444
|
+
case 19:
|
|
332
445
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.DEFAULT, 'Unknown error', _types3.RegistrationStatus.INACTIVE, lineError);
|
|
333
446
|
_Logger.default.warn("Unknown Error", loggerContext);
|
|
334
447
|
emitterCb(lineError, finalError);
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
448
|
+
shouldDisconnect = serverCount > 1;
|
|
449
|
+
case 20:
|
|
450
|
+
return _context.abrupt("return", {
|
|
451
|
+
finalError: finalError,
|
|
452
|
+
shouldDisconnect: shouldDisconnect
|
|
453
|
+
});
|
|
454
|
+
case 21:
|
|
338
455
|
case "end":
|
|
339
456
|
return _context.stop();
|
|
340
457
|
}
|
|
@@ -342,7 +459,7 @@ function _handleRegistrationErrors() {
|
|
|
342
459
|
}));
|
|
343
460
|
return _handleRegistrationErrors.apply(this, arguments);
|
|
344
461
|
}
|
|
345
|
-
function handleCallingClientErrors(
|
|
462
|
+
function handleCallingClientErrors(_x4, _x5, _x6) {
|
|
346
463
|
return _handleCallingClientErrors.apply(this, arguments);
|
|
347
464
|
}
|
|
348
465
|
/**
|
|
@@ -400,7 +517,7 @@ function _handleCallingClientErrors() {
|
|
|
400
517
|
}));
|
|
401
518
|
return _handleCallingClientErrors.apply(this, arguments);
|
|
402
519
|
}
|
|
403
|
-
function handleCallErrors(_x9, _x0, _x1, _x10, _x11
|
|
520
|
+
function handleCallErrors(_x7, _x8, _x9, _x0, _x1, _x10, _x11) {
|
|
404
521
|
return _handleCallErrors.apply(this, arguments);
|
|
405
522
|
}
|
|
406
523
|
/**
|
|
@@ -541,7 +658,7 @@ function _handleCallErrors() {
|
|
|
541
658
|
}));
|
|
542
659
|
return _handleCallErrors.apply(this, arguments);
|
|
543
660
|
}
|
|
544
|
-
function serviceErrorCodeHandler(
|
|
661
|
+
function serviceErrorCodeHandler(_x12, _x13) {
|
|
545
662
|
return _serviceErrorCodeHandler.apply(this, arguments);
|
|
546
663
|
}
|
|
547
664
|
/**
|
|
@@ -878,15 +995,15 @@ var waitForMsecs = exports.waitForMsecs = function waitForMsecs(msec) {
|
|
|
878
995
|
};
|
|
879
996
|
|
|
880
997
|
/**
|
|
881
|
-
*
|
|
998
|
+
* Determine the calling backend from the device object.
|
|
882
999
|
*
|
|
883
|
-
* @param
|
|
1000
|
+
* @param device - The device object containing callingBehavior and entitlement features.
|
|
884
1001
|
* @returns CallingBackEnd.
|
|
885
1002
|
*/
|
|
886
|
-
function
|
|
887
|
-
var entModels =
|
|
1003
|
+
function resolveCallingBackend(device) {
|
|
1004
|
+
var entModels = device.features.entitlement.models;
|
|
888
1005
|
var callingBackend;
|
|
889
|
-
if (
|
|
1006
|
+
if (device.callingBehavior === _constants2.NATIVE_WEBEX_TEAMS_CALLING) {
|
|
890
1007
|
for (var i = 0; i < entModels.length; i += 1) {
|
|
891
1008
|
if (entModels[i][_constants2.VALUES][_constants2.KEY] === _constants2.ENTITLEMENT_BASIC || entModels[i][_constants2.VALUES][_constants2.KEY] === _constants2.ENTITLEMENT_STANDARD) {
|
|
892
1009
|
callingBackend = _types3.CALLING_BACKEND.WXC;
|
|
@@ -896,12 +1013,22 @@ function getCallingBackEnd(webex) {
|
|
|
896
1013
|
break;
|
|
897
1014
|
}
|
|
898
1015
|
}
|
|
899
|
-
} else if (
|
|
1016
|
+
} else if (device.callingBehavior === _constants2.NATIVE_SIP_CALL_TO_UCM) {
|
|
900
1017
|
callingBackend = _types3.CALLING_BACKEND.UCM;
|
|
901
1018
|
} else {
|
|
902
1019
|
callingBackend = _types3.CALLING_BACKEND.INVALID;
|
|
903
1020
|
}
|
|
904
|
-
return callingBackend;
|
|
1021
|
+
return callingBackend || _types3.CALLING_BACKEND.INVALID;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* Register calling backend.
|
|
1026
|
+
*
|
|
1027
|
+
* @param webex -.
|
|
1028
|
+
* @returns CallingBackEnd.
|
|
1029
|
+
*/
|
|
1030
|
+
function getCallingBackEnd(webex) {
|
|
1031
|
+
return resolveCallingBackend(webex.internal.device);
|
|
905
1032
|
}
|
|
906
1033
|
|
|
907
1034
|
/**
|
|
@@ -912,7 +1039,7 @@ function getCallingBackEnd(webex) {
|
|
|
912
1039
|
* @param callingBackend -.
|
|
913
1040
|
* @returns Promise.
|
|
914
1041
|
*/
|
|
915
|
-
function getXsiActionEndpoint(
|
|
1042
|
+
function getXsiActionEndpoint(_x14, _x15, _x16) {
|
|
916
1043
|
return _getXsiActionEndpoint.apply(this, arguments);
|
|
917
1044
|
}
|
|
918
1045
|
/**
|
|
@@ -924,7 +1051,7 @@ function getXsiActionEndpoint(_x16, _x17, _x18) {
|
|
|
924
1051
|
*/
|
|
925
1052
|
function _getXsiActionEndpoint() {
|
|
926
1053
|
_getXsiActionEndpoint = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5(webex, loggerContext, callingBackend) {
|
|
927
|
-
var _userIdResponse$heade, userIdResponse, response, xsiEndpoint, _bwTokenResponse$head, bwTokenResponse, _response, _xsiEndpoint, xsiUrl, errorInfo, _t7, _t8;
|
|
1054
|
+
var _webex$internal$servi, _userIdResponse$heade, hydraEndpoint, userIdResponse, response, xsiEndpoint, _bwTokenResponse$head, bwTokenResponse, _response, _xsiEndpoint, xsiUrl, errorInfo, _t7, _t8;
|
|
928
1055
|
return _regenerator.default.wrap(function (_context5) {
|
|
929
1056
|
while (1) switch (_context5.prev = _context5.next) {
|
|
930
1057
|
case 0:
|
|
@@ -933,9 +1060,10 @@ function _getXsiActionEndpoint() {
|
|
|
933
1060
|
_context5.next = _t7 === _types3.CALLING_BACKEND.WXC ? 1 : _t7 === _types3.CALLING_BACKEND.BWRKS ? 3 : 5;
|
|
934
1061
|
break;
|
|
935
1062
|
case 1:
|
|
1063
|
+
hydraEndpoint = ((_webex$internal$servi = webex.internal.services._serviceUrls) === null || _webex$internal$servi === void 0 ? void 0 : _webex$internal$servi.hydra) || webex.internal.services.get(webex.internal.services._activeServices.hydra);
|
|
936
1064
|
_context5.next = 2;
|
|
937
1065
|
return webex.request({
|
|
938
|
-
uri: "".concat(
|
|
1066
|
+
uri: "".concat(hydraEndpoint, "/").concat(_constants2.XSI_ACTION_ENDPOINT_ORG_URL_PARAM),
|
|
939
1067
|
method: _types3.HTTP_METHODS.GET
|
|
940
1068
|
});
|
|
941
1069
|
case 2:
|
|
@@ -1026,7 +1154,7 @@ function getSortedVoicemailList(voiceMessageList, sortOrder) {
|
|
|
1026
1154
|
* @param filter - A filter for the query.
|
|
1027
1155
|
* @returns - Promise.
|
|
1028
1156
|
*/
|
|
1029
|
-
function scimQuery(
|
|
1157
|
+
function scimQuery(_x17) {
|
|
1030
1158
|
return _scimQuery.apply(this, arguments);
|
|
1031
1159
|
}
|
|
1032
1160
|
/**
|
|
@@ -1072,7 +1200,7 @@ function _scimQuery() {
|
|
|
1072
1200
|
}));
|
|
1073
1201
|
return _scimQuery.apply(this, arguments);
|
|
1074
1202
|
}
|
|
1075
|
-
function resolveCallerIdDisplay(
|
|
1203
|
+
function resolveCallerIdDisplay(_x18) {
|
|
1076
1204
|
return _resolveCallerIdDisplay.apply(this, arguments);
|
|
1077
1205
|
}
|
|
1078
1206
|
/**
|
|
@@ -1149,7 +1277,7 @@ function _resolveCallerIdDisplay() {
|
|
|
1149
1277
|
}));
|
|
1150
1278
|
return _resolveCallerIdDisplay.apply(this, arguments);
|
|
1151
1279
|
}
|
|
1152
|
-
function resolveCallerIdByName(
|
|
1280
|
+
function resolveCallerIdByName(_x19) {
|
|
1153
1281
|
return _resolveCallerIdByName.apply(this, arguments);
|
|
1154
1282
|
}
|
|
1155
1283
|
/**
|
|
@@ -1213,7 +1341,7 @@ function _resolveCallerIdByName() {
|
|
|
1213
1341
|
}));
|
|
1214
1342
|
return _resolveCallerIdByName.apply(this, arguments);
|
|
1215
1343
|
}
|
|
1216
|
-
function resolveContact(
|
|
1344
|
+
function resolveContact(_x20) {
|
|
1217
1345
|
return _resolveContact.apply(this, arguments);
|
|
1218
1346
|
}
|
|
1219
1347
|
/**
|
|
@@ -1328,7 +1456,7 @@ function isValidServiceDomain(serviceData) {
|
|
|
1328
1456
|
}
|
|
1329
1457
|
|
|
1330
1458
|
/**
|
|
1331
|
-
* Validates service data object(indicator
|
|
1459
|
+
* Validates service data object(indicator) and throws
|
|
1332
1460
|
* exception with a message indicating the reason for validation
|
|
1333
1461
|
* failure.
|
|
1334
1462
|
*
|
|
@@ -1340,9 +1468,6 @@ function validateServiceData(serviceData) {
|
|
|
1340
1468
|
if (!isValidServiceIndicator(serviceData.indicator)) {
|
|
1341
1469
|
throw new Error("Invalid service indicator, Allowed values are: ".concat(formattedValues));
|
|
1342
1470
|
}
|
|
1343
|
-
if (!isValidServiceDomain(serviceData)) {
|
|
1344
|
-
throw new Error('Invalid service domain.');
|
|
1345
|
-
}
|
|
1346
1471
|
}
|
|
1347
1472
|
|
|
1348
1473
|
/**
|
|
@@ -1480,4 +1605,9 @@ function _uploadLogs() {
|
|
|
1480
1605
|
}));
|
|
1481
1606
|
return _uploadLogs.apply(this, arguments);
|
|
1482
1607
|
}
|
|
1608
|
+
function normalizeMobiusUris(urls) {
|
|
1609
|
+
return urls.map(function (url) {
|
|
1610
|
+
return !url.endsWith('/') ? "".concat(url, "/") : url;
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1483
1613
|
//# sourceMappingURL=Utils.js.map
|