@webex/calling 3.12.0-next.9 → 3.12.0-next.90
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 +634 -454
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +809 -451
- 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 +890 -497
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +649 -58
- 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 +212 -71
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +417 -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 +198 -66
- 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 +266 -64
- 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 +85 -22
- 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 +8 -1
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts +27 -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 +21 -5
- 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,185 @@ 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
|
+
handledByCallback,
|
|
295
|
+
lineError,
|
|
296
|
+
errorCode,
|
|
297
|
+
finalError,
|
|
298
|
+
handleUnknownError,
|
|
299
|
+
caller,
|
|
300
|
+
retryAfter,
|
|
301
|
+
errorBody,
|
|
302
|
+
code,
|
|
303
|
+
errorMessage,
|
|
304
|
+
_caller,
|
|
305
|
+
_errorMessage,
|
|
306
|
+
_errorMessage2,
|
|
307
|
+
_errorMessage3,
|
|
308
|
+
_args = arguments,
|
|
309
|
+
_t,
|
|
310
|
+
_t2;
|
|
234
311
|
return _regenerator.default.wrap(function (_context) {
|
|
235
312
|
while (1) switch (_context.prev = _context.next) {
|
|
236
313
|
case 0:
|
|
314
|
+
handlers = _args.length > 3 && _args[3] !== undefined ? _args[3] : {};
|
|
315
|
+
serverCount = _args.length > 4 && _args[4] !== undefined ? _args[4] : 1;
|
|
316
|
+
retry429Cb = handlers.retry429Cb, restoreRegCb = handlers.restoreRegCb, sessionSupersededCb = handlers.sessionSupersededCb;
|
|
317
|
+
shouldDisconnect = false;
|
|
318
|
+
handledByCallback = false;
|
|
237
319
|
lineError = (0, _LineError.createLineError)('', {}, _types2.ERROR_TYPE.DEFAULT, _types3.RegistrationStatus.INACTIVE);
|
|
238
320
|
errorCode = Number(err.statusCode);
|
|
239
321
|
finalError = false;
|
|
322
|
+
/* Treatment for a status code this handler has no specific rule for: notify the
|
|
323
|
+
* consumer and leave the retry decision to the caller. */
|
|
324
|
+
handleUnknownError = function handleUnknownError() {
|
|
325
|
+
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.DEFAULT, 'Unknown error', _types3.RegistrationStatus.INACTIVE, lineError);
|
|
326
|
+
_Logger.default.warn("Unknown Error", loggerContext);
|
|
327
|
+
emitterCb(lineError, finalError);
|
|
328
|
+
shouldDisconnect = serverCount > 1;
|
|
329
|
+
};
|
|
240
330
|
_Logger.default.warn("Status code: -> ".concat(errorCode), loggerContext);
|
|
241
331
|
_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.
|
|
332
|
+
_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
333
|
break;
|
|
244
334
|
case 1:
|
|
245
335
|
finalError = true;
|
|
246
336
|
_Logger.default.warn("400 Bad Request", loggerContext);
|
|
247
337
|
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
338
|
emitterCb(lineError, finalError);
|
|
249
|
-
|
|
339
|
+
shouldDisconnect = serverCount > 1;
|
|
340
|
+
return _context.abrupt("continue", 20);
|
|
250
341
|
case 2:
|
|
251
342
|
// Return it to the Caller
|
|
252
343
|
finalError = true;
|
|
253
344
|
_Logger.default.warn("401 Unauthorized", loggerContext);
|
|
254
345
|
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
346
|
emitterCb(lineError, finalError);
|
|
256
|
-
|
|
347
|
+
shouldDisconnect = serverCount > 1;
|
|
348
|
+
return _context.abrupt("continue", 20);
|
|
257
349
|
case 3:
|
|
258
350
|
finalError = true;
|
|
259
351
|
_Logger.default.warn("404 Device Not Found", loggerContext);
|
|
260
352
|
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
353
|
emitterCb(lineError, finalError);
|
|
262
|
-
|
|
354
|
+
shouldDisconnect = serverCount > 1;
|
|
355
|
+
return _context.abrupt("continue", 20);
|
|
263
356
|
case 4:
|
|
357
|
+
if (sessionSupersededCb) {
|
|
358
|
+
_context.next = 5;
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
handleUnknownError();
|
|
362
|
+
return _context.abrupt("continue", 20);
|
|
363
|
+
case 5:
|
|
364
|
+
finalError = true;
|
|
365
|
+
handledByCallback = true;
|
|
366
|
+
_Logger.default.warn("409 Conflict: session superseded by another device for this user", loggerContext);
|
|
367
|
+
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.SESSION_SUPERSEDED, _constants.SESSION_SUPERSEDED_MESSAGE, _types3.RegistrationStatus.INACTIVE, lineError);
|
|
368
|
+
_context.next = 6;
|
|
369
|
+
return sessionSupersededCb(lineError);
|
|
370
|
+
case 6:
|
|
371
|
+
shouldDisconnect = false;
|
|
372
|
+
return _context.abrupt("continue", 20);
|
|
373
|
+
case 7:
|
|
264
374
|
_Logger.default.warn("429 Too Many Requests", loggerContext);
|
|
265
375
|
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
376
|
caller = loggerContext.method || 'handleErrors';
|
|
267
|
-
if (retry429Cb && err.headers) {
|
|
268
|
-
|
|
269
|
-
|
|
377
|
+
if (!(retry429Cb && err.headers)) {
|
|
378
|
+
_context.next = 8;
|
|
379
|
+
break;
|
|
270
380
|
}
|
|
271
|
-
|
|
272
|
-
|
|
381
|
+
retryAfter = Number(err.headers['retry-after']);
|
|
382
|
+
_context.next = 8;
|
|
383
|
+
return retry429Cb(retryAfter, caller);
|
|
384
|
+
case 8:
|
|
385
|
+
shouldDisconnect = false;
|
|
386
|
+
return _context.abrupt("continue", 20);
|
|
387
|
+
case 9:
|
|
273
388
|
_Logger.default.warn("500 Internal Server Error", loggerContext);
|
|
274
389
|
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
390
|
emitterCb(lineError, finalError);
|
|
276
|
-
|
|
277
|
-
|
|
391
|
+
shouldDisconnect = serverCount > 1;
|
|
392
|
+
return _context.abrupt("continue", 20);
|
|
393
|
+
case 10:
|
|
278
394
|
_Logger.default.warn("503 Service Unavailable", loggerContext);
|
|
279
395
|
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
396
|
emitterCb(lineError, finalError);
|
|
281
|
-
|
|
282
|
-
|
|
397
|
+
shouldDisconnect = serverCount > 1;
|
|
398
|
+
return _context.abrupt("continue", 20);
|
|
399
|
+
case 11:
|
|
283
400
|
_Logger.default.warn("403 Forbidden", loggerContext);
|
|
284
401
|
errorBody = err.body;
|
|
285
402
|
if (errorBody) {
|
|
286
|
-
_context.next =
|
|
403
|
+
_context.next = 12;
|
|
287
404
|
break;
|
|
288
405
|
}
|
|
289
406
|
_Logger.default.warn('Error response has no body, throwing default error', loggerContext);
|
|
290
407
|
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
408
|
emitterCb(lineError, finalError);
|
|
292
|
-
|
|
293
|
-
|
|
409
|
+
shouldDisconnect = serverCount > 1;
|
|
410
|
+
return _context.abrupt("return", {
|
|
411
|
+
finalError: finalError,
|
|
412
|
+
shouldDisconnect: shouldDisconnect,
|
|
413
|
+
handledByCallback: handledByCallback
|
|
414
|
+
});
|
|
415
|
+
case 12:
|
|
294
416
|
code = Number(errorBody.errorCode);
|
|
295
417
|
_Logger.default.warn("Error code found : ".concat(code), loggerContext);
|
|
296
418
|
_t2 = code;
|
|
297
|
-
_context.next = _t2 === _types2.DEVICE_ERROR_CODE.DEVICE_LIMIT_EXCEEDED ?
|
|
419
|
+
_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
420
|
break;
|
|
299
|
-
case
|
|
421
|
+
case 13:
|
|
300
422
|
errorMessage = 'User device limit exceeded';
|
|
301
423
|
_Logger.default.warn(errorMessage, loggerContext);
|
|
302
424
|
if (!restoreRegCb) {
|
|
303
|
-
_context.next =
|
|
425
|
+
_context.next = 14;
|
|
304
426
|
break;
|
|
305
427
|
}
|
|
306
428
|
_caller = loggerContext.method || 'handleErrors';
|
|
307
|
-
_context.next =
|
|
429
|
+
_context.next = 14;
|
|
308
430
|
return restoreRegCb(errorBody, _caller);
|
|
309
|
-
case
|
|
310
|
-
|
|
311
|
-
|
|
431
|
+
case 14:
|
|
432
|
+
shouldDisconnect = false;
|
|
433
|
+
return _context.abrupt("continue", 18);
|
|
434
|
+
case 15:
|
|
312
435
|
_errorMessage = 'User is not configured for WebRTC calling. Please contact the administrator to resolve this issue.';
|
|
313
436
|
finalError = true;
|
|
314
437
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage, _types3.RegistrationStatus.INACTIVE, lineError);
|
|
315
438
|
_Logger.default.warn(_errorMessage, loggerContext);
|
|
316
439
|
emitterCb(lineError, true);
|
|
317
|
-
|
|
318
|
-
|
|
440
|
+
shouldDisconnect = true;
|
|
441
|
+
return _context.abrupt("continue", 18);
|
|
442
|
+
case 16:
|
|
319
443
|
_errorMessage2 = 'An unknown error occurred while provisioning the device. Wait a moment and try again.';
|
|
320
444
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage2, _types3.RegistrationStatus.INACTIVE, lineError);
|
|
321
445
|
_Logger.default.warn(_errorMessage2, loggerContext);
|
|
322
446
|
emitterCb(lineError, finalError);
|
|
323
|
-
|
|
324
|
-
|
|
447
|
+
shouldDisconnect = serverCount > 1;
|
|
448
|
+
return _context.abrupt("continue", 18);
|
|
449
|
+
case 17:
|
|
325
450
|
_errorMessage3 = 'An unknown error occurred. Wait a moment and try again. Please contact the administrator if the problem persists.';
|
|
326
451
|
updateLineErrorContext(loggerContext, _types2.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage3, _types3.RegistrationStatus.INACTIVE, lineError);
|
|
327
452
|
_Logger.default.warn(_errorMessage3, loggerContext);
|
|
328
453
|
emitterCb(lineError, finalError);
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
454
|
+
shouldDisconnect = serverCount > 1;
|
|
455
|
+
case 18:
|
|
456
|
+
return _context.abrupt("continue", 20);
|
|
457
|
+
case 19:
|
|
458
|
+
handleUnknownError();
|
|
459
|
+
case 20:
|
|
460
|
+
return _context.abrupt("return", {
|
|
461
|
+
finalError: finalError,
|
|
462
|
+
shouldDisconnect: shouldDisconnect,
|
|
463
|
+
handledByCallback: handledByCallback
|
|
464
|
+
});
|
|
465
|
+
case 21:
|
|
338
466
|
case "end":
|
|
339
467
|
return _context.stop();
|
|
340
468
|
}
|
|
@@ -342,7 +470,7 @@ function _handleRegistrationErrors() {
|
|
|
342
470
|
}));
|
|
343
471
|
return _handleRegistrationErrors.apply(this, arguments);
|
|
344
472
|
}
|
|
345
|
-
function handleCallingClientErrors(
|
|
473
|
+
function handleCallingClientErrors(_x4, _x5, _x6) {
|
|
346
474
|
return _handleCallingClientErrors.apply(this, arguments);
|
|
347
475
|
}
|
|
348
476
|
/**
|
|
@@ -400,7 +528,7 @@ function _handleCallingClientErrors() {
|
|
|
400
528
|
}));
|
|
401
529
|
return _handleCallingClientErrors.apply(this, arguments);
|
|
402
530
|
}
|
|
403
|
-
function handleCallErrors(_x9, _x0, _x1, _x10, _x11
|
|
531
|
+
function handleCallErrors(_x7, _x8, _x9, _x0, _x1, _x10, _x11) {
|
|
404
532
|
return _handleCallErrors.apply(this, arguments);
|
|
405
533
|
}
|
|
406
534
|
/**
|
|
@@ -541,7 +669,7 @@ function _handleCallErrors() {
|
|
|
541
669
|
}));
|
|
542
670
|
return _handleCallErrors.apply(this, arguments);
|
|
543
671
|
}
|
|
544
|
-
function serviceErrorCodeHandler(
|
|
672
|
+
function serviceErrorCodeHandler(_x12, _x13) {
|
|
545
673
|
return _serviceErrorCodeHandler.apply(this, arguments);
|
|
546
674
|
}
|
|
547
675
|
/**
|
|
@@ -878,15 +1006,15 @@ var waitForMsecs = exports.waitForMsecs = function waitForMsecs(msec) {
|
|
|
878
1006
|
};
|
|
879
1007
|
|
|
880
1008
|
/**
|
|
881
|
-
*
|
|
1009
|
+
* Determine the calling backend from the device object.
|
|
882
1010
|
*
|
|
883
|
-
* @param
|
|
1011
|
+
* @param device - The device object containing callingBehavior and entitlement features.
|
|
884
1012
|
* @returns CallingBackEnd.
|
|
885
1013
|
*/
|
|
886
|
-
function
|
|
887
|
-
var entModels =
|
|
1014
|
+
function resolveCallingBackend(device) {
|
|
1015
|
+
var entModels = device.features.entitlement.models;
|
|
888
1016
|
var callingBackend;
|
|
889
|
-
if (
|
|
1017
|
+
if (device.callingBehavior === _constants2.NATIVE_WEBEX_TEAMS_CALLING) {
|
|
890
1018
|
for (var i = 0; i < entModels.length; i += 1) {
|
|
891
1019
|
if (entModels[i][_constants2.VALUES][_constants2.KEY] === _constants2.ENTITLEMENT_BASIC || entModels[i][_constants2.VALUES][_constants2.KEY] === _constants2.ENTITLEMENT_STANDARD) {
|
|
892
1020
|
callingBackend = _types3.CALLING_BACKEND.WXC;
|
|
@@ -896,12 +1024,22 @@ function getCallingBackEnd(webex) {
|
|
|
896
1024
|
break;
|
|
897
1025
|
}
|
|
898
1026
|
}
|
|
899
|
-
} else if (
|
|
1027
|
+
} else if (device.callingBehavior === _constants2.NATIVE_SIP_CALL_TO_UCM) {
|
|
900
1028
|
callingBackend = _types3.CALLING_BACKEND.UCM;
|
|
901
1029
|
} else {
|
|
902
1030
|
callingBackend = _types3.CALLING_BACKEND.INVALID;
|
|
903
1031
|
}
|
|
904
|
-
return callingBackend;
|
|
1032
|
+
return callingBackend || _types3.CALLING_BACKEND.INVALID;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* Register calling backend.
|
|
1037
|
+
*
|
|
1038
|
+
* @param webex -.
|
|
1039
|
+
* @returns CallingBackEnd.
|
|
1040
|
+
*/
|
|
1041
|
+
function getCallingBackEnd(webex) {
|
|
1042
|
+
return resolveCallingBackend(webex.internal.device);
|
|
905
1043
|
}
|
|
906
1044
|
|
|
907
1045
|
/**
|
|
@@ -912,7 +1050,7 @@ function getCallingBackEnd(webex) {
|
|
|
912
1050
|
* @param callingBackend -.
|
|
913
1051
|
* @returns Promise.
|
|
914
1052
|
*/
|
|
915
|
-
function getXsiActionEndpoint(
|
|
1053
|
+
function getXsiActionEndpoint(_x14, _x15, _x16) {
|
|
916
1054
|
return _getXsiActionEndpoint.apply(this, arguments);
|
|
917
1055
|
}
|
|
918
1056
|
/**
|
|
@@ -924,7 +1062,7 @@ function getXsiActionEndpoint(_x16, _x17, _x18) {
|
|
|
924
1062
|
*/
|
|
925
1063
|
function _getXsiActionEndpoint() {
|
|
926
1064
|
_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;
|
|
1065
|
+
var _webex$internal$servi, _userIdResponse$heade, hydraEndpoint, userIdResponse, response, xsiEndpoint, _bwTokenResponse$head, bwTokenResponse, _response, _xsiEndpoint, xsiUrl, errorInfo, _t7, _t8;
|
|
928
1066
|
return _regenerator.default.wrap(function (_context5) {
|
|
929
1067
|
while (1) switch (_context5.prev = _context5.next) {
|
|
930
1068
|
case 0:
|
|
@@ -933,9 +1071,10 @@ function _getXsiActionEndpoint() {
|
|
|
933
1071
|
_context5.next = _t7 === _types3.CALLING_BACKEND.WXC ? 1 : _t7 === _types3.CALLING_BACKEND.BWRKS ? 3 : 5;
|
|
934
1072
|
break;
|
|
935
1073
|
case 1:
|
|
1074
|
+
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
1075
|
_context5.next = 2;
|
|
937
1076
|
return webex.request({
|
|
938
|
-
uri: "".concat(
|
|
1077
|
+
uri: "".concat(hydraEndpoint, "/").concat(_constants2.XSI_ACTION_ENDPOINT_ORG_URL_PARAM),
|
|
939
1078
|
method: _types3.HTTP_METHODS.GET
|
|
940
1079
|
});
|
|
941
1080
|
case 2:
|
|
@@ -1026,7 +1165,7 @@ function getSortedVoicemailList(voiceMessageList, sortOrder) {
|
|
|
1026
1165
|
* @param filter - A filter for the query.
|
|
1027
1166
|
* @returns - Promise.
|
|
1028
1167
|
*/
|
|
1029
|
-
function scimQuery(
|
|
1168
|
+
function scimQuery(_x17) {
|
|
1030
1169
|
return _scimQuery.apply(this, arguments);
|
|
1031
1170
|
}
|
|
1032
1171
|
/**
|
|
@@ -1072,7 +1211,7 @@ function _scimQuery() {
|
|
|
1072
1211
|
}));
|
|
1073
1212
|
return _scimQuery.apply(this, arguments);
|
|
1074
1213
|
}
|
|
1075
|
-
function resolveCallerIdDisplay(
|
|
1214
|
+
function resolveCallerIdDisplay(_x18) {
|
|
1076
1215
|
return _resolveCallerIdDisplay.apply(this, arguments);
|
|
1077
1216
|
}
|
|
1078
1217
|
/**
|
|
@@ -1149,7 +1288,7 @@ function _resolveCallerIdDisplay() {
|
|
|
1149
1288
|
}));
|
|
1150
1289
|
return _resolveCallerIdDisplay.apply(this, arguments);
|
|
1151
1290
|
}
|
|
1152
|
-
function resolveCallerIdByName(
|
|
1291
|
+
function resolveCallerIdByName(_x19) {
|
|
1153
1292
|
return _resolveCallerIdByName.apply(this, arguments);
|
|
1154
1293
|
}
|
|
1155
1294
|
/**
|
|
@@ -1213,7 +1352,7 @@ function _resolveCallerIdByName() {
|
|
|
1213
1352
|
}));
|
|
1214
1353
|
return _resolveCallerIdByName.apply(this, arguments);
|
|
1215
1354
|
}
|
|
1216
|
-
function resolveContact(
|
|
1355
|
+
function resolveContact(_x20) {
|
|
1217
1356
|
return _resolveContact.apply(this, arguments);
|
|
1218
1357
|
}
|
|
1219
1358
|
/**
|
|
@@ -1328,7 +1467,7 @@ function isValidServiceDomain(serviceData) {
|
|
|
1328
1467
|
}
|
|
1329
1468
|
|
|
1330
1469
|
/**
|
|
1331
|
-
* Validates service data object(indicator
|
|
1470
|
+
* Validates service data object(indicator) and throws
|
|
1332
1471
|
* exception with a message indicating the reason for validation
|
|
1333
1472
|
* failure.
|
|
1334
1473
|
*
|
|
@@ -1340,9 +1479,6 @@ function validateServiceData(serviceData) {
|
|
|
1340
1479
|
if (!isValidServiceIndicator(serviceData.indicator)) {
|
|
1341
1480
|
throw new Error("Invalid service indicator, Allowed values are: ".concat(formattedValues));
|
|
1342
1481
|
}
|
|
1343
|
-
if (!isValidServiceDomain(serviceData)) {
|
|
1344
|
-
throw new Error('Invalid service domain.');
|
|
1345
|
-
}
|
|
1346
1482
|
}
|
|
1347
1483
|
|
|
1348
1484
|
/**
|
|
@@ -1480,4 +1616,9 @@ function _uploadLogs() {
|
|
|
1480
1616
|
}));
|
|
1481
1617
|
return _uploadLogs.apply(this, arguments);
|
|
1482
1618
|
}
|
|
1619
|
+
function normalizeMobiusUris(urls) {
|
|
1620
|
+
return urls.map(function (url) {
|
|
1621
|
+
return !url.endsWith('/') ? "".concat(url, "/") : url;
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1483
1624
|
//# sourceMappingURL=Utils.js.map
|