@webex/calling 3.8.1-next.5 → 3.8.1
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/CallingClient/CallingClient.js +105 -125
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/constants.js +2 -3
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/registration/register.js +144 -164
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +9 -29
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/Errors/types.js +0 -2
- package/dist/Errors/types.js.map +1 -1
- package/dist/Metrics/index.js +2 -9
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +4 -10
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js.map +1 -1
- package/dist/common/Utils.js +27 -28
- package/dist/common/Utils.js.map +1 -1
- package/dist/module/CallingClient/CallingClient.js +2 -2
- package/dist/module/CallingClient/constants.js +0 -1
- package/dist/module/CallingClient/registration/register.js +11 -14
- package/dist/module/Errors/types.js +0 -2
- package/dist/module/Metrics/index.js +1 -8
- package/dist/module/common/Utils.js +1 -2
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +0 -1
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/Errors/types.d.ts +0 -2
- package/dist/types/Errors/types.d.ts.map +1 -1
- package/dist/types/Metrics/index.d.ts.map +1 -1
- package/dist/types/Metrics/types.d.ts +1 -2
- package/dist/types/Metrics/types.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -323,9 +323,9 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
323
323
|
value: (function () {
|
|
324
324
|
var _getClientRegionInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
325
325
|
var _this3 = this;
|
|
326
|
-
var regionInfo, _iterator, _step,
|
|
327
|
-
return _regenerator.default.wrap(function _callee6$(
|
|
328
|
-
while (1) switch (
|
|
326
|
+
var regionInfo, _iterator, _step, mobius, temp, myIP, response, clientRegionInfo, extendedError;
|
|
327
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
328
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
329
329
|
case 0:
|
|
330
330
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
331
331
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -333,96 +333,77 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
333
333
|
});
|
|
334
334
|
regionInfo = {};
|
|
335
335
|
_iterator = _createForOfIteratorHelper(this.mobiusClusters);
|
|
336
|
-
|
|
337
|
-
_loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
|
|
338
|
-
var mobius, temp, myIP, response, clientRegionInfo, extendedError;
|
|
339
|
-
return _regenerator.default.wrap(function _loop$(_context6) {
|
|
340
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
341
|
-
case 0:
|
|
342
|
-
mobius = _step.value;
|
|
343
|
-
_this3.mobiusHost = "https://".concat(mobius.host).concat(_constants2.API_V1);
|
|
344
|
-
_context6.prev = 2;
|
|
345
|
-
_context6.next = 5;
|
|
346
|
-
return _this3.webex.request({
|
|
347
|
-
uri: "".concat(_this3.mobiusHost).concat(_constants2.URL_ENDPOINT).concat(_constants2.IP_ENDPOINT),
|
|
348
|
-
method: _types3.HTTP_METHODS.GET,
|
|
349
|
-
headers: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants2.CISCO_DEVICE_URL, _this3.webex.internal.device.url), _constants2.SPARK_USER_AGENT, _constants2.CALLING_USER_AGENT),
|
|
350
|
-
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
351
|
-
});
|
|
352
|
-
case 5:
|
|
353
|
-
temp = _context6.sent;
|
|
354
|
-
myIP = temp.body.ipv4; // eslint-disable-next-line no-await-in-loop
|
|
355
|
-
_context6.next = 9;
|
|
356
|
-
return _this3.webex.request({
|
|
357
|
-
uri: "".concat(_constants2.DISCOVERY_URL, "/").concat(myIP),
|
|
358
|
-
method: _types3.HTTP_METHODS.GET,
|
|
359
|
-
addAuthHeader: false,
|
|
360
|
-
headers: (0, _defineProperty2.default)({}, _constants2.SPARK_USER_AGENT, null)
|
|
361
|
-
});
|
|
362
|
-
case 9:
|
|
363
|
-
response = _context6.sent;
|
|
364
|
-
clientRegionInfo = response.body;
|
|
365
|
-
regionInfo.clientRegion = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.clientRegion ? clientRegionInfo.clientRegion : '';
|
|
366
|
-
regionInfo.countryCode = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.countryCode ? clientRegionInfo.countryCode : '';
|
|
367
|
-
return _context6.abrupt("return", 1);
|
|
368
|
-
case 16:
|
|
369
|
-
_context6.prev = 16;
|
|
370
|
-
_context6.t0 = _context6["catch"](2);
|
|
371
|
-
extendedError = new Error("Failed to get client region info: ".concat(_context6.t0));
|
|
372
|
-
_Logger.default.error(extendedError, {
|
|
373
|
-
method: _constants2.METHODS.GET_CLIENT_REGION_INFO,
|
|
374
|
-
file: _constants2.CALLING_CLIENT_FILE
|
|
375
|
-
});
|
|
376
|
-
(0, _Utils.handleCallingClientErrors)(_context6.t0, function (clientError) {
|
|
377
|
-
var _headers$trackingId, _headers3;
|
|
378
|
-
_this3.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, _constants2.GET_MOBIUS_SERVERS_UTIL, 'UNKNOWN', (_headers$trackingId = (_headers3 = _context6.t0.headers) === null || _headers3 === void 0 ? void 0 : _headers3.trackingId) !== null && _headers$trackingId !== void 0 ? _headers$trackingId : '', undefined, clientError);
|
|
379
|
-
_this3.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
380
|
-
}, {
|
|
381
|
-
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
382
|
-
file: _constants2.CALLING_CLIENT_FILE
|
|
383
|
-
});
|
|
384
|
-
regionInfo.clientRegion = '';
|
|
385
|
-
regionInfo.countryCode = '';
|
|
386
|
-
case 23:
|
|
387
|
-
case "end":
|
|
388
|
-
return _context6.stop();
|
|
389
|
-
}
|
|
390
|
-
}, _loop, null, [[2, 16]]);
|
|
391
|
-
});
|
|
336
|
+
_context6.prev = 3;
|
|
392
337
|
_iterator.s();
|
|
393
|
-
case
|
|
338
|
+
case 5:
|
|
394
339
|
if ((_step = _iterator.n()).done) {
|
|
395
|
-
|
|
396
|
-
break;
|
|
397
|
-
}
|
|
398
|
-
return _context7.delegateYield(_loop(), "t0", 8);
|
|
399
|
-
case 8:
|
|
400
|
-
if (!_context7.t0) {
|
|
401
|
-
_context7.next = 10;
|
|
340
|
+
_context6.next = 31;
|
|
402
341
|
break;
|
|
403
342
|
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
343
|
+
mobius = _step.value;
|
|
344
|
+
this.mobiusHost = "https://".concat(mobius.host).concat(_constants2.API_V1);
|
|
345
|
+
_context6.prev = 8;
|
|
346
|
+
_context6.next = 11;
|
|
347
|
+
return this.webex.request({
|
|
348
|
+
uri: "".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT).concat(_constants2.IP_ENDPOINT),
|
|
349
|
+
method: _types3.HTTP_METHODS.GET,
|
|
350
|
+
headers: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants2.CISCO_DEVICE_URL, this.webex.internal.device.url), _constants2.SPARK_USER_AGENT, _constants2.CALLING_USER_AGENT),
|
|
351
|
+
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
352
|
+
});
|
|
353
|
+
case 11:
|
|
354
|
+
temp = _context6.sent;
|
|
355
|
+
myIP = temp.body.ipv4; // eslint-disable-next-line no-await-in-loop
|
|
356
|
+
_context6.next = 15;
|
|
357
|
+
return this.webex.request({
|
|
358
|
+
uri: "".concat(_constants2.DISCOVERY_URL, "/").concat(myIP),
|
|
359
|
+
method: _types3.HTTP_METHODS.GET,
|
|
360
|
+
addAuthHeader: false,
|
|
361
|
+
headers: (0, _defineProperty2.default)({}, _constants2.SPARK_USER_AGENT, null)
|
|
362
|
+
});
|
|
363
|
+
case 15:
|
|
364
|
+
response = _context6.sent;
|
|
365
|
+
clientRegionInfo = response.body;
|
|
366
|
+
regionInfo.clientRegion = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.clientRegion ? clientRegionInfo.clientRegion : '';
|
|
367
|
+
regionInfo.countryCode = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.countryCode ? clientRegionInfo.countryCode : '';
|
|
368
|
+
return _context6.abrupt("break", 31);
|
|
369
|
+
case 22:
|
|
370
|
+
_context6.prev = 22;
|
|
371
|
+
_context6.t0 = _context6["catch"](8);
|
|
372
|
+
extendedError = new Error("Failed to get client region info: ".concat(_context6.t0));
|
|
373
|
+
_Logger.default.error(extendedError, {
|
|
374
|
+
method: _constants2.METHODS.GET_CLIENT_REGION_INFO,
|
|
375
|
+
file: _constants2.CALLING_CLIENT_FILE
|
|
376
|
+
});
|
|
377
|
+
(0, _Utils.handleCallingClientErrors)(_context6.t0, function (clientError) {
|
|
378
|
+
_this3.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, clientError);
|
|
379
|
+
_this3.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
380
|
+
}, {
|
|
381
|
+
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
382
|
+
file: _constants2.CALLING_CLIENT_FILE
|
|
383
|
+
});
|
|
384
|
+
regionInfo.clientRegion = '';
|
|
385
|
+
regionInfo.countryCode = '';
|
|
386
|
+
case 29:
|
|
387
|
+
_context6.next = 5;
|
|
407
388
|
break;
|
|
408
|
-
case
|
|
409
|
-
|
|
389
|
+
case 31:
|
|
390
|
+
_context6.next = 36;
|
|
410
391
|
break;
|
|
411
|
-
case
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
_iterator.e(
|
|
415
|
-
case
|
|
416
|
-
|
|
392
|
+
case 33:
|
|
393
|
+
_context6.prev = 33;
|
|
394
|
+
_context6.t1 = _context6["catch"](3);
|
|
395
|
+
_iterator.e(_context6.t1);
|
|
396
|
+
case 36:
|
|
397
|
+
_context6.prev = 36;
|
|
417
398
|
_iterator.f();
|
|
418
|
-
return
|
|
419
|
-
case
|
|
420
|
-
return
|
|
421
|
-
case
|
|
399
|
+
return _context6.finish(36);
|
|
400
|
+
case 39:
|
|
401
|
+
return _context6.abrupt("return", regionInfo);
|
|
402
|
+
case 40:
|
|
422
403
|
case "end":
|
|
423
|
-
return
|
|
404
|
+
return _context6.stop();
|
|
424
405
|
}
|
|
425
|
-
}, _callee6, this, [[3,
|
|
406
|
+
}, _callee6, this, [[3, 33, 36, 39], [8, 22]]);
|
|
426
407
|
}));
|
|
427
408
|
function getClientRegionInfo() {
|
|
428
409
|
return _getClientRegionInfo.apply(this, arguments);
|
|
@@ -443,8 +424,8 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
443
424
|
_this$sdkConfig4$disc,
|
|
444
425
|
_this4 = this;
|
|
445
426
|
var useDefault, clientRegion, countryCode, _this$sdkConfig5, _this$sdkConfig5$disc, _this$sdkConfig6, _this$sdkConfig6$disc, regionInfo, temp, mobiusServers, mobiusUris, extendedError;
|
|
446
|
-
return _regenerator.default.wrap(function _callee7$(
|
|
447
|
-
while (1) switch (
|
|
427
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
428
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
448
429
|
case 0:
|
|
449
430
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
450
431
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -459,7 +440,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
459
440
|
*/
|
|
460
441
|
useDefault = false;
|
|
461
442
|
if (!((_this$sdkConfig3 = this.sdkConfig) !== null && _this$sdkConfig3 !== void 0 && (_this$sdkConfig3$disc = _this$sdkConfig3.discovery) !== null && _this$sdkConfig3$disc !== void 0 && _this$sdkConfig3$disc.country && (_this$sdkConfig4 = this.sdkConfig) !== null && _this$sdkConfig4 !== void 0 && (_this$sdkConfig4$disc = _this$sdkConfig4.discovery) !== null && _this$sdkConfig4$disc !== void 0 && _this$sdkConfig4$disc.region)) {
|
|
462
|
-
|
|
443
|
+
_context7.next = 9;
|
|
463
444
|
break;
|
|
464
445
|
}
|
|
465
446
|
_Logger.default.log('Updating region and country from the SDK config', {
|
|
@@ -469,27 +450,27 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
469
450
|
clientRegion = (_this$sdkConfig5 = this.sdkConfig) === null || _this$sdkConfig5 === void 0 ? void 0 : (_this$sdkConfig5$disc = _this$sdkConfig5.discovery) === null || _this$sdkConfig5$disc === void 0 ? void 0 : _this$sdkConfig5$disc.region;
|
|
470
451
|
countryCode = (_this$sdkConfig6 = this.sdkConfig) === null || _this$sdkConfig6 === void 0 ? void 0 : (_this$sdkConfig6$disc = _this$sdkConfig6.discovery) === null || _this$sdkConfig6$disc === void 0 ? void 0 : _this$sdkConfig6$disc.country;
|
|
471
452
|
this.mobiusHost = this.webex.internal.services._serviceUrls.mobius;
|
|
472
|
-
|
|
453
|
+
_context7.next = 15;
|
|
473
454
|
break;
|
|
474
455
|
case 9:
|
|
475
456
|
_Logger.default.log('Updating region and country through Region discovery', {
|
|
476
457
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
477
458
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL
|
|
478
459
|
});
|
|
479
|
-
|
|
460
|
+
_context7.next = 12;
|
|
480
461
|
return this.getClientRegionInfo();
|
|
481
462
|
case 12:
|
|
482
|
-
regionInfo =
|
|
463
|
+
regionInfo = _context7.sent;
|
|
483
464
|
clientRegion = regionInfo.clientRegion;
|
|
484
465
|
countryCode = regionInfo.countryCode;
|
|
485
466
|
case 15:
|
|
486
467
|
if (!(clientRegion && countryCode)) {
|
|
487
|
-
|
|
468
|
+
_context7.next = 37;
|
|
488
469
|
break;
|
|
489
470
|
}
|
|
490
471
|
_Logger.default.log("Found Region: ".concat(clientRegion, " and country: ").concat(countryCode, ", going to fetch Mobius server"), '');
|
|
491
|
-
|
|
492
|
-
|
|
472
|
+
_context7.prev = 17;
|
|
473
|
+
_context7.next = 20;
|
|
493
474
|
return this.webex.request({
|
|
494
475
|
uri: "".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT, "?regionCode=").concat(clientRegion, "&countryCode=").concat(countryCode),
|
|
495
476
|
method: _types3.HTTP_METHODS.GET,
|
|
@@ -497,7 +478,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
497
478
|
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
498
479
|
});
|
|
499
480
|
case 20:
|
|
500
|
-
temp =
|
|
481
|
+
temp = _context7.sent;
|
|
501
482
|
_Logger.default.log('Mobius Server found for the region', '');
|
|
502
483
|
mobiusServers = temp.body;
|
|
503
484
|
/* update arrays of Mobius Uris. */
|
|
@@ -505,19 +486,18 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
505
486
|
this.primaryMobiusUris = mobiusUris.primary;
|
|
506
487
|
this.backupMobiusUris = mobiusUris.backup;
|
|
507
488
|
_Logger.default.info("Final list of Mobius Servers, primary: ".concat(mobiusUris.primary, " and backup: ").concat(mobiusUris.backup), '');
|
|
508
|
-
|
|
489
|
+
_context7.next = 35;
|
|
509
490
|
break;
|
|
510
491
|
case 29:
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
extendedError = new Error("Failed to get Mobius servers: ".concat(
|
|
492
|
+
_context7.prev = 29;
|
|
493
|
+
_context7.t0 = _context7["catch"](17);
|
|
494
|
+
extendedError = new Error("Failed to get Mobius servers: ".concat(_context7.t0));
|
|
514
495
|
_Logger.default.error(extendedError, {
|
|
515
496
|
method: _constants2.METHODS.GET_MOBIUS_SERVERS,
|
|
516
497
|
file: _constants2.CALLING_CLIENT_FILE
|
|
517
498
|
});
|
|
518
|
-
(0, _Utils.handleCallingClientErrors)(
|
|
519
|
-
|
|
520
|
-
_this4.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, _constants2.GET_MOBIUS_SERVERS_UTIL, 'UNKNOWN', (_headers$trackingId2 = (_headers5 = _context8.t0.headers) === null || _headers5 === void 0 ? void 0 : _headers5.trackingId) !== null && _headers$trackingId2 !== void 0 ? _headers$trackingId2 : '', undefined, clientError);
|
|
499
|
+
(0, _Utils.handleCallingClientErrors)(_context7.t0, function (clientError) {
|
|
500
|
+
_this4.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, clientError);
|
|
521
501
|
_this4.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
522
502
|
}, {
|
|
523
503
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
@@ -525,7 +505,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
525
505
|
});
|
|
526
506
|
useDefault = true;
|
|
527
507
|
case 35:
|
|
528
|
-
|
|
508
|
+
_context7.next = 38;
|
|
529
509
|
break;
|
|
530
510
|
case 37:
|
|
531
511
|
/* Setting this to true because region info is possibly undefined */
|
|
@@ -542,7 +522,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
542
522
|
}
|
|
543
523
|
case 39:
|
|
544
524
|
case "end":
|
|
545
|
-
return
|
|
525
|
+
return _context7.stop();
|
|
546
526
|
}
|
|
547
527
|
}, _callee7, this, [[17, 29]]);
|
|
548
528
|
}));
|
|
@@ -597,23 +577,23 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
597
577
|
this.sdkConnector.registerListener(_types2.MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE, /*#__PURE__*/function () {
|
|
598
578
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(event) {
|
|
599
579
|
var sessionArr, i;
|
|
600
|
-
return _regenerator.default.wrap(function _callee8$(
|
|
601
|
-
while (1) switch (
|
|
580
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
581
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
602
582
|
case 0:
|
|
603
583
|
if (!(event && event.data.userSessions.userSessions)) {
|
|
604
|
-
|
|
584
|
+
_context8.next = 7;
|
|
605
585
|
break;
|
|
606
586
|
}
|
|
607
587
|
sessionArr = event === null || event === void 0 ? void 0 : event.data.userSessions.userSessions;
|
|
608
588
|
if (!(sessionArr.length === 1)) {
|
|
609
|
-
|
|
589
|
+
_context8.next = 5;
|
|
610
590
|
break;
|
|
611
591
|
}
|
|
612
592
|
if (!(sessionArr[0].sessionType !== _types2.SessionType.WEBEX_CALLING)) {
|
|
613
|
-
|
|
593
|
+
_context8.next = 5;
|
|
614
594
|
break;
|
|
615
595
|
}
|
|
616
|
-
return
|
|
596
|
+
return _context8.abrupt("return");
|
|
617
597
|
case 5:
|
|
618
598
|
for (i = 0; i < sessionArr.length; i += 1) {
|
|
619
599
|
if (sessionArr[i].sessionType !== _types2.SessionType.WEBEX_CALLING) {
|
|
@@ -623,7 +603,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
623
603
|
_this5.emit(_types2.CALLING_CLIENT_EVENT_KEYS.USER_SESSION_INFO, event);
|
|
624
604
|
case 7:
|
|
625
605
|
case "end":
|
|
626
|
-
return
|
|
606
|
+
return _context8.stop();
|
|
627
607
|
}
|
|
628
608
|
}, _callee8);
|
|
629
609
|
}));
|
|
@@ -643,8 +623,8 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
643
623
|
var _createLine = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
644
624
|
var _this$sdkConfig7, _this$sdkConfig8;
|
|
645
625
|
var line;
|
|
646
|
-
return _regenerator.default.wrap(function _callee9$(
|
|
647
|
-
while (1) switch (
|
|
626
|
+
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
627
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
648
628
|
case 0:
|
|
649
629
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
650
630
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -654,7 +634,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
654
634
|
this.lineDict[line.lineId] = line;
|
|
655
635
|
case 3:
|
|
656
636
|
case "end":
|
|
657
|
-
return
|
|
637
|
+
return _context9.stop();
|
|
658
638
|
}
|
|
659
639
|
}, _callee9, this);
|
|
660
640
|
}));
|
|
@@ -723,23 +703,23 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
723
703
|
value: (function () {
|
|
724
704
|
var _uploadLogs2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
725
705
|
var result;
|
|
726
|
-
return _regenerator.default.wrap(function _callee10$(
|
|
727
|
-
while (1) switch (
|
|
706
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
707
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
728
708
|
case 0:
|
|
729
|
-
|
|
709
|
+
_context10.next = 2;
|
|
730
710
|
return (0, _Utils.uploadLogs)({}, true);
|
|
731
711
|
case 2:
|
|
732
|
-
result =
|
|
712
|
+
result = _context10.sent;
|
|
733
713
|
if (result) {
|
|
734
|
-
|
|
714
|
+
_context10.next = 5;
|
|
735
715
|
break;
|
|
736
716
|
}
|
|
737
717
|
throw new Error('Failed to upload logs: No response received.');
|
|
738
718
|
case 5:
|
|
739
|
-
return
|
|
719
|
+
return _context10.abrupt("return", result);
|
|
740
720
|
case 6:
|
|
741
721
|
case "end":
|
|
742
|
-
return
|
|
722
|
+
return _context10.stop();
|
|
743
723
|
}
|
|
744
724
|
}, _callee10);
|
|
745
725
|
}));
|
|
@@ -759,17 +739,17 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
759
739
|
var createClient = exports.createClient = /*#__PURE__*/function () {
|
|
760
740
|
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(webex, config) {
|
|
761
741
|
var callingClientInstance;
|
|
762
|
-
return _regenerator.default.wrap(function _callee11$(
|
|
763
|
-
while (1) switch (
|
|
742
|
+
return _regenerator.default.wrap(function _callee11$(_context11) {
|
|
743
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
764
744
|
case 0:
|
|
765
745
|
callingClientInstance = new CallingClient(webex, config);
|
|
766
|
-
|
|
746
|
+
_context11.next = 3;
|
|
767
747
|
return callingClientInstance.init();
|
|
768
748
|
case 3:
|
|
769
|
-
return
|
|
749
|
+
return _context11.abrupt("return", callingClientInstance);
|
|
770
750
|
case 4:
|
|
771
751
|
case "end":
|
|
772
|
-
return
|
|
752
|
+
return _context11.stop();
|
|
773
753
|
}
|
|
774
754
|
}, _callee11);
|
|
775
755
|
}));
|