@webex/calling 3.3.1 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
  2. package/dist/CallingClient/calling/call.js +5 -3
  3. package/dist/CallingClient/calling/call.js.map +1 -1
  4. package/dist/CallingClient/calling/call.test.js +17 -15
  5. package/dist/CallingClient/calling/call.test.js.map +1 -1
  6. package/dist/CallingClient/constants.js +5 -8
  7. package/dist/CallingClient/constants.js.map +1 -1
  8. package/dist/Contacts/ContactsClient.js +258 -292
  9. package/dist/Contacts/ContactsClient.js.map +1 -1
  10. package/dist/Contacts/ContactsClient.test.js +46 -12
  11. package/dist/Contacts/ContactsClient.test.js.map +1 -1
  12. package/dist/Contacts/constants.js +3 -1
  13. package/dist/Contacts/constants.js.map +1 -1
  14. package/dist/Contacts/contactFixtures.js +141 -48
  15. package/dist/Contacts/contactFixtures.js.map +1 -1
  16. package/dist/Contacts/types.js.map +1 -1
  17. package/dist/Metrics/index.js +9 -9
  18. package/dist/Metrics/index.js.map +1 -1
  19. package/dist/Metrics/index.test.js +37 -10
  20. package/dist/Metrics/index.test.js.map +1 -1
  21. package/dist/SDKConnector/types.js.map +1 -1
  22. package/dist/common/Utils.js +3 -3
  23. package/dist/common/Utils.js.map +1 -1
  24. package/dist/common/Utils.test.js +1 -1
  25. package/dist/common/Utils.test.js.map +1 -1
  26. package/dist/common/constants.js +6 -1
  27. package/dist/common/constants.js.map +1 -1
  28. package/dist/common/testUtil.js +1 -5
  29. package/dist/common/testUtil.js.map +1 -1
  30. package/dist/common/types.js +1 -0
  31. package/dist/common/types.js.map +1 -1
  32. package/dist/module/CallingClient/calling/call.js +6 -4
  33. package/dist/module/CallingClient/constants.js +4 -6
  34. package/dist/module/Contacts/ContactsClient.js +64 -58
  35. package/dist/module/Contacts/constants.js +2 -0
  36. package/dist/module/Contacts/contactFixtures.js +175 -31
  37. package/dist/module/Metrics/index.js +9 -9
  38. package/dist/module/common/Utils.js +4 -5
  39. package/dist/module/common/constants.js +5 -0
  40. package/dist/module/common/testUtil.js +0 -4
  41. package/dist/module/common/types.js +1 -0
  42. package/dist/types/CallingClient/calling/CallerId/types.d.ts +1 -23
  43. package/dist/types/CallingClient/calling/CallerId/types.d.ts.map +1 -1
  44. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  45. package/dist/types/CallingClient/constants.d.ts +3 -5
  46. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  47. package/dist/types/Contacts/ContactsClient.d.ts +1 -1
  48. package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
  49. package/dist/types/Contacts/constants.d.ts +2 -0
  50. package/dist/types/Contacts/constants.d.ts.map +1 -1
  51. package/dist/types/Contacts/contactFixtures.d.ts +71 -39
  52. package/dist/types/Contacts/contactFixtures.d.ts.map +1 -1
  53. package/dist/types/Contacts/types.d.ts +6 -13
  54. package/dist/types/Contacts/types.d.ts.map +1 -1
  55. package/dist/types/SDKConnector/types.d.ts +1 -5
  56. package/dist/types/SDKConnector/types.d.ts.map +1 -1
  57. package/dist/types/common/Utils.d.ts +1 -0
  58. package/dist/types/common/Utils.d.ts.map +1 -1
  59. package/dist/types/common/constants.d.ts +5 -0
  60. package/dist/types/common/constants.d.ts.map +1 -1
  61. package/dist/types/common/testUtil.d.ts +0 -4
  62. package/dist/types/common/testUtil.d.ts.map +1 -1
  63. package/dist/types/common/types.d.ts +56 -25
  64. package/dist/types/common/types.d.ts.map +1 -1
  65. package/package.json +7 -7
@@ -29,6 +29,8 @@ var _Logger = _interopRequireDefault(require("../Logger"));
29
29
  var _constants2 = require("./constants");
30
30
  var _types2 = require("./types");
31
31
  var _Utils = require("../common/Utils");
32
+ var _ExtendedError = _interopRequireDefault(require("../Errors/catalog/ExtendedError"));
33
+ var _types3 = require("../Errors/types");
32
34
  function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
33
35
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable no-await-in-loop */
34
36
  /**
@@ -370,211 +372,173 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
370
372
  return _decryptContact.apply(this, arguments);
371
373
  }
372
374
  return decryptContact;
373
- }()
374
- /**
375
- * Fetches contacts from DSS.
376
- */
377
- )
375
+ }())
378
376
  }, {
379
- key: "fetchContactFromDSS",
380
- value: (function () {
381
- var _fetchContactFromDSS = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(contactsDataMap) {
382
- var _this5 = this;
383
- var contactList, dssResult, _loop, i;
384
- return _regenerator.default.wrap(function _callee9$(_context10) {
385
- while (1) switch (_context10.prev = _context10.next) {
386
- case 0:
387
- contactList = [];
388
- _context10.next = 3;
389
- return this.webex.internal.dss.lookup({
390
- ids: (0, _keys.default)(contactsDataMap)
391
- });
392
- case 3:
393
- dssResult = _context10.sent;
394
- _loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
395
- var contact, contactId, displayName, emails, phoneNumbers, sipAddresses, photos, _contact$additionalIn, department, firstName, identityManager, jobTitle, lastName, manager, _contactsDataMap$cont, contactType, avatarUrlDomain, encryptionKeyUrl, ownerId, groups, avatarURL, addedPhoneNumbers, decryptedPhoneNumbers, addedSipAddresses, decryptedSipAddresses, cloudContact;
396
- return _regenerator.default.wrap(function _loop$(_context9) {
397
- while (1) switch (_context9.prev = _context9.next) {
398
- case 0:
399
- contact = dssResult[i];
400
- contactId = contact.identity;
401
- displayName = contact.displayName, emails = contact.emails, phoneNumbers = contact.phoneNumbers, sipAddresses = contact.sipAddresses, photos = contact.photos;
402
- _contact$additionalIn = contact.additionalInfo, department = _contact$additionalIn.department, firstName = _contact$additionalIn.firstName, identityManager = _contact$additionalIn.identityManager, jobTitle = _contact$additionalIn.jobTitle, lastName = _contact$additionalIn.lastName;
403
- manager = identityManager && identityManager.displayName ? identityManager.displayName : undefined;
404
- _contactsDataMap$cont = contactsDataMap[contactId], contactType = _contactsDataMap$cont.contactType, avatarUrlDomain = _contactsDataMap$cont.avatarUrlDomain, encryptionKeyUrl = _contactsDataMap$cont.encryptionKeyUrl, ownerId = _contactsDataMap$cont.ownerId, groups = _contactsDataMap$cont.groups;
405
- avatarURL = '';
406
- if (photos.length) {
407
- avatarURL = photos[0].value;
408
- }
409
- addedPhoneNumbers = contactsDataMap[contactId].phoneNumbers;
410
- if (!addedPhoneNumbers) {
411
- _context9.next = 14;
412
- break;
413
- }
414
- _context9.next = 12;
415
- return _this5.decryptContactDetail(encryptionKeyUrl, addedPhoneNumbers);
416
- case 12:
417
- decryptedPhoneNumbers = _context9.sent;
418
- decryptedPhoneNumbers.forEach(function (number) {
419
- return phoneNumbers.push(number);
420
- });
421
- case 14:
422
- addedSipAddresses = contactsDataMap[contactId].sipAddresses;
423
- if (!addedSipAddresses) {
424
- _context9.next = 20;
425
- break;
426
- }
427
- _context9.next = 18;
428
- return _this5.decryptContactDetail(encryptionKeyUrl, addedSipAddresses);
429
- case 18:
430
- decryptedSipAddresses = _context9.sent;
431
- decryptedSipAddresses.forEach(function (address) {
432
- return sipAddresses.push(address);
433
- });
434
- case 20:
435
- cloudContact = {
436
- avatarUrlDomain: avatarUrlDomain,
437
- avatarURL: avatarURL,
438
- contactId: contactId,
439
- contactType: contactType,
440
- department: department,
441
- displayName: displayName,
442
- emails: emails,
443
- encryptionKeyUrl: encryptionKeyUrl,
444
- firstName: firstName,
445
- groups: groups,
446
- lastName: lastName,
447
- manager: manager,
448
- ownerId: ownerId,
449
- phoneNumbers: phoneNumbers,
450
- sipAddresses: sipAddresses,
451
- title: jobTitle
452
- };
453
- contactList.push(cloudContact);
454
- case 22:
455
- case "end":
456
- return _context9.stop();
457
- }
458
- }, _loop);
459
- });
460
- i = 0;
461
- case 6:
462
- if (!(i < dssResult.length)) {
463
- _context10.next = 11;
464
- break;
465
- }
466
- return _context10.delegateYield(_loop(), "t0", 8);
467
- case 8:
468
- i += 1;
469
- _context10.next = 6;
470
- break;
471
- case 11:
472
- return _context10.abrupt("return", contactList);
473
- case 12:
474
- case "end":
475
- return _context10.stop();
377
+ key: "resolveCloudContacts",
378
+ value: function resolveCloudContacts(contactsDataMap, inputList) {
379
+ var finalContactList = [];
380
+ try {
381
+ var contactList = (0, _keys.default)(contactsDataMap);
382
+ var _loop = function _loop(n) {
383
+ var filteredContact = inputList.Resources.filter(function (item) {
384
+ return item.id === contactList[n];
385
+ })[0];
386
+ var displayName = filteredContact.displayName,
387
+ emails = filteredContact.emails,
388
+ phoneNumbers = filteredContact.phoneNumbers,
389
+ photos = filteredContact.photos;
390
+ var sipAddresses = filteredContact[_constants.SCIM_WEBEXIDENTITY_USER].sipAddresses;
391
+ var firstName = filteredContact.name.givenName;
392
+ var lastName = filteredContact.name.familyName;
393
+ var manager = filteredContact[_constants.SCIM_ENTERPRISE_USER].manager.displayName;
394
+ var department = filteredContact[_constants.SCIM_ENTERPRISE_USER].department;
395
+ var avatarURL = '';
396
+ if (photos !== null && photos !== void 0 && photos.length) {
397
+ avatarURL = photos[0].value;
476
398
  }
477
- }, _callee9, this);
478
- }));
479
- function fetchContactFromDSS(_x11) {
480
- return _fetchContactFromDSS.apply(this, arguments);
399
+ var _contactsDataMap$cont = contactsDataMap[contactList[n]],
400
+ contactType = _contactsDataMap$cont.contactType,
401
+ avatarUrlDomain = _contactsDataMap$cont.avatarUrlDomain,
402
+ encryptionKeyUrl = _contactsDataMap$cont.encryptionKeyUrl,
403
+ ownerId = _contactsDataMap$cont.ownerId,
404
+ groups = _contactsDataMap$cont.groups;
405
+ var cloudContact = {
406
+ avatarUrlDomain: avatarUrlDomain,
407
+ avatarURL: avatarURL,
408
+ contactId: contactList[n],
409
+ contactType: contactType,
410
+ department: department,
411
+ displayName: displayName,
412
+ emails: emails,
413
+ encryptionKeyUrl: encryptionKeyUrl,
414
+ firstName: firstName,
415
+ groups: groups,
416
+ lastName: lastName,
417
+ manager: manager,
418
+ ownerId: ownerId,
419
+ phoneNumbers: phoneNumbers,
420
+ sipAddresses: sipAddresses
421
+ };
422
+ finalContactList.push(cloudContact);
423
+ };
424
+ for (var n = 0; n < contactList.length; n += 1) {
425
+ _loop(n);
426
+ }
427
+ } catch (error) {
428
+ _Logger.default.error(new _ExtendedError.default(error.message, {}, _types3.ERROR_TYPE.DEFAULT), {});
429
+ return null;
481
430
  }
482
- return fetchContactFromDSS;
483
- }()
431
+ return finalContactList;
432
+ }
433
+
484
434
  /**
485
435
  * Returns list of contacts.
486
436
  */
487
- )
488
437
  }, {
489
438
  key: "getContacts",
490
439
  value: (function () {
491
440
  var _getContacts = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
492
- var _this6 = this;
493
- var loggerContext, contactList, contactsDataMap, response, responseBody, contacts, groups, i, contact, decryptedContact, cloudContacts, contactResponse, errorInfo, errorStatus;
494
- return _regenerator.default.wrap(function _callee11$(_context12) {
495
- while (1) switch (_context12.prev = _context12.next) {
441
+ var _this5 = this;
442
+ var loggerContext, contactList, cloudContactsMap, response, responseBody, contacts, groups, contactIdList, query, result, resolvedContacts, contactResponse, errorInfo, errorStatus;
443
+ return _regenerator.default.wrap(function _callee11$(_context11) {
444
+ while (1) switch (_context11.prev = _context11.next) {
496
445
  case 0:
497
446
  loggerContext = {
498
447
  file: _constants2.CONTACTS_FILE,
499
448
  method: 'getContacts'
500
449
  };
501
450
  contactList = [];
502
- contactsDataMap = {};
503
- _context12.prev = 3;
504
- _context12.next = 6;
451
+ cloudContactsMap = {};
452
+ _context11.prev = 3;
453
+ _context11.next = 6;
505
454
  return this.webex.request({
506
455
  // eslint-disable-next-line no-underscore-dangle
507
456
  uri: "".concat(this.webex.internal.services._serviceUrls.contactsService, "/").concat(_constants2.ENCRYPT_FILTER, "/").concat(_constants2.USERS, "/").concat(_constants2.CONTACT_FILTER),
508
457
  method: _types.HTTP_METHODS.GET
509
458
  });
510
459
  case 6:
511
- response = _context12.sent;
460
+ response = _context11.sent;
512
461
  responseBody = response.body;
513
462
  if (responseBody) {
514
- _context12.next = 10;
463
+ _context11.next = 10;
515
464
  break;
516
465
  }
517
466
  throw new Error("".concat(response));
518
467
  case 10:
519
468
  contacts = responseBody.contacts, groups = responseBody.groups;
520
- i = 0;
521
- case 12:
522
- if (!(i < contacts.length)) {
523
- _context12.next = 25;
524
- break;
525
- }
526
- contact = contacts[i];
527
- if (!(contact.contactType === _types2.ContactType.CUSTOM)) {
528
- _context12.next = 21;
469
+ contacts.map( /*#__PURE__*/function () {
470
+ var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(contact) {
471
+ var decryptedContact;
472
+ return _regenerator.default.wrap(function _callee9$(_context9) {
473
+ while (1) switch (_context9.prev = _context9.next) {
474
+ case 0:
475
+ if (!(contact.contactType === _types2.ContactType.CUSTOM)) {
476
+ _context9.next = 7;
477
+ break;
478
+ }
479
+ _context9.next = 3;
480
+ return _this5.decryptContact(contact);
481
+ case 3:
482
+ decryptedContact = _context9.sent;
483
+ contactList.push(decryptedContact);
484
+ _context9.next = 8;
485
+ break;
486
+ case 7:
487
+ if (contact.contactType === _types2.ContactType.CLOUD && contact.contactId) {
488
+ cloudContactsMap[contact.contactId] = contact;
489
+ }
490
+ case 8:
491
+ case "end":
492
+ return _context9.stop();
493
+ }
494
+ }, _callee9);
495
+ }));
496
+ return function (_x11) {
497
+ return _ref13.apply(this, arguments);
498
+ };
499
+ }());
500
+
501
+ // Resolve cloud contacts
502
+ if (!(0, _keys.default)(cloudContactsMap).length) {
503
+ _context11.next = 20;
529
504
  break;
530
505
  }
531
- _context12.next = 17;
532
- return this.decryptContact(contact);
506
+ contactIdList = (0, _keys.default)(cloudContactsMap);
507
+ query = contactIdList.map(function (item) {
508
+ return "".concat(_constants2.SCIM_ID_FILTER, " \"").concat(item, "\"");
509
+ }).join(_constants2.OR);
510
+ _context11.next = 17;
511
+ return (0, _Utils.scimQuery)(query);
533
512
  case 17:
534
- decryptedContact = _context12.sent;
535
- contactList.push(decryptedContact);
536
- _context12.next = 22;
537
- break;
538
- case 21:
539
- if (contact.contactType === _types2.ContactType.CLOUD && contact.contactId) {
540
- contactsDataMap[contact.contactId] = contact;
541
- }
542
- case 22:
543
- i += 1;
544
- _context12.next = 12;
545
- break;
546
- case 25:
547
- if (!(0, _keys.default)(contactsDataMap).length) {
548
- _context12.next = 30;
549
- break;
513
+ result = _context11.sent;
514
+ resolvedContacts = this.resolveCloudContacts(cloudContactsMap, result.body);
515
+ if (resolvedContacts) {
516
+ resolvedContacts.map(function (item) {
517
+ return contactList.push(item);
518
+ });
550
519
  }
551
- _context12.next = 28;
552
- return this.fetchContactFromDSS(contactsDataMap);
553
- case 28:
554
- cloudContacts = _context12.sent;
555
- contactList.push.apply(contactList, (0, _toConsumableArray2.default)(cloudContacts));
556
- case 30:
557
- _context12.next = 32;
520
+ case 20:
521
+ _context11.next = 22;
558
522
  return _promise.default.all(groups.map( /*#__PURE__*/function () {
559
- var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(group, idx) {
560
- return _regenerator.default.wrap(function _callee10$(_context11) {
561
- while (1) switch (_context11.prev = _context11.next) {
523
+ var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(group, idx) {
524
+ return _regenerator.default.wrap(function _callee10$(_context10) {
525
+ while (1) switch (_context10.prev = _context10.next) {
562
526
  case 0:
563
- _context11.next = 2;
564
- return _this6.webex.internal.encryption.decryptText(group.encryptionKeyUrl, group.displayName);
527
+ _context10.next = 2;
528
+ return _this5.webex.internal.encryption.decryptText(group.encryptionKeyUrl, group.displayName);
565
529
  case 2:
566
- groups[idx].displayName = _context11.sent;
530
+ groups[idx].displayName = _context10.sent;
567
531
  case 3:
568
532
  case "end":
569
- return _context11.stop();
533
+ return _context10.stop();
570
534
  }
571
535
  }, _callee10);
572
536
  }));
573
537
  return function (_x12, _x13) {
574
- return _ref13.apply(this, arguments);
538
+ return _ref14.apply(this, arguments);
575
539
  };
576
540
  }()));
577
- case 32:
541
+ case 22:
578
542
  this.groups = groups;
579
543
  this.contacts = contactList;
580
544
  contactResponse = {
@@ -585,18 +549,18 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
585
549
  },
586
550
  message: _constants.SUCCESS_MESSAGE
587
551
  };
588
- return _context12.abrupt("return", contactResponse);
589
- case 38:
590
- _context12.prev = 38;
591
- _context12.t0 = _context12["catch"](3);
592
- errorInfo = _context12.t0;
552
+ return _context11.abrupt("return", contactResponse);
553
+ case 28:
554
+ _context11.prev = 28;
555
+ _context11.t0 = _context11["catch"](3);
556
+ errorInfo = _context11.t0;
593
557
  errorStatus = (0, _Utils.serviceErrorCodeHandler)(errorInfo, loggerContext);
594
- return _context12.abrupt("return", errorStatus);
595
- case 43:
558
+ return _context11.abrupt("return", errorStatus);
559
+ case 33:
596
560
  case "end":
597
- return _context12.stop();
561
+ return _context11.stop();
598
562
  }
599
- }, _callee11, this, [[3, 38]]);
563
+ }, _callee11, this, [[3, 28]]);
600
564
  }));
601
565
  function getContacts() {
602
566
  return _getContacts.apply(this, arguments);
@@ -614,8 +578,8 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
614
578
  value: (function () {
615
579
  var _createNewEncryptionKeyUrl = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
616
580
  var loggerContext, unboundedKeyUri, unboundedKeys;
617
- return _regenerator.default.wrap(function _callee12$(_context13) {
618
- while (1) switch (_context13.prev = _context13.next) {
581
+ return _regenerator.default.wrap(function _callee12$(_context12) {
582
+ while (1) switch (_context12.prev = _context12.next) {
619
583
  case 0:
620
584
  loggerContext = {
621
585
  file: _constants2.CONTACTS_FILE,
@@ -623,20 +587,20 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
623
587
  };
624
588
  unboundedKeyUri = '';
625
589
  _Logger.default.info('Requesting kms for a new KRO and key', loggerContext);
626
- _context13.next = 5;
590
+ _context12.next = 5;
627
591
  return this.webex.internal.encryption.kms.createUnboundKeys({
628
592
  count: 1
629
593
  });
630
594
  case 5:
631
- unboundedKeys = _context13.sent;
595
+ unboundedKeys = _context12.sent;
632
596
  unboundedKeyUri = unboundedKeys[0].uri;
633
597
  this.webex.internal.encryption.kms.createResource({
634
598
  keyUris: [unboundedKeyUri]
635
599
  });
636
- return _context13.abrupt("return", unboundedKeyUri);
600
+ return _context12.abrupt("return", unboundedKeyUri);
637
601
  case 9:
638
602
  case "end":
639
- return _context13.stop();
603
+ return _context12.stop();
640
604
  }
641
605
  }, _callee12, this);
642
606
  }));
@@ -657,14 +621,14 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
657
621
  var _fetchEncryptionKeyUrl = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
658
622
  var _response$data$group;
659
623
  var response, _response$data$group2;
660
- return _regenerator.default.wrap(function _callee13$(_context14) {
661
- while (1) switch (_context14.prev = _context14.next) {
624
+ return _regenerator.default.wrap(function _callee13$(_context13) {
625
+ while (1) switch (_context13.prev = _context13.next) {
662
626
  case 0:
663
627
  if (!this.encryptionKeyUrl) {
664
- _context14.next = 2;
628
+ _context13.next = 2;
665
629
  break;
666
630
  }
667
- return _context14.abrupt("return", this.encryptionKeyUrl);
631
+ return _context13.abrupt("return", this.encryptionKeyUrl);
668
632
  case 2:
669
633
  // istanbul ignore else
670
634
  if (this.groups === undefined) {
@@ -672,30 +636,30 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
672
636
  }
673
637
  // istanbul ignore else
674
638
  if (!(this.groups && this.groups.length)) {
675
- _context14.next = 5;
639
+ _context13.next = 5;
676
640
  break;
677
641
  }
678
- return _context14.abrupt("return", this.groups[0].encryptionKeyUrl);
642
+ return _context13.abrupt("return", this.groups[0].encryptionKeyUrl);
679
643
  case 5:
680
- _context14.next = 7;
644
+ _context13.next = 7;
681
645
  return this.createNewEncryptionKeyUrl();
682
646
  case 7:
683
- this.encryptionKeyUrl = _context14.sent;
647
+ this.encryptionKeyUrl = _context13.sent;
684
648
  _Logger.default.info("Creating a default group: ".concat(_constants2.DEFAULT_GROUP_NAME), {
685
649
  file: _constants2.CONTACTS_FILE,
686
650
  method: this.fetchEncryptionKeyUrl.name
687
651
  });
688
- _context14.next = 11;
652
+ _context13.next = 11;
689
653
  return this.createContactGroup(_constants2.DEFAULT_GROUP_NAME, this.encryptionKeyUrl);
690
654
  case 11:
691
- response = _context14.sent;
655
+ response = _context13.sent;
692
656
  if ((_response$data$group = response.data.group) !== null && _response$data$group !== void 0 && _response$data$group.groupId) {
693
657
  this.defaultGroupId = (_response$data$group2 = response.data.group) === null || _response$data$group2 === void 0 ? void 0 : _response$data$group2.groupId;
694
658
  }
695
- return _context14.abrupt("return", this.encryptionKeyUrl);
659
+ return _context13.abrupt("return", this.encryptionKeyUrl);
696
660
  case 14:
697
661
  case "end":
698
- return _context14.stop();
662
+ return _context13.stop();
699
663
  }
700
664
  }, _callee13, this);
701
665
  }));
@@ -715,55 +679,55 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
715
679
  value: (function () {
716
680
  var _fetchDefaultGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
717
681
  var i, response, group;
718
- return _regenerator.default.wrap(function _callee14$(_context15) {
719
- while (1) switch (_context15.prev = _context15.next) {
682
+ return _regenerator.default.wrap(function _callee14$(_context14) {
683
+ while (1) switch (_context14.prev = _context14.next) {
720
684
  case 0:
721
685
  if (!this.defaultGroupId) {
722
- _context15.next = 2;
686
+ _context14.next = 2;
723
687
  break;
724
688
  }
725
- return _context15.abrupt("return", this.defaultGroupId);
689
+ return _context14.abrupt("return", this.defaultGroupId);
726
690
  case 2:
727
691
  if (!(this.groups && this.groups.length)) {
728
- _context15.next = 11;
692
+ _context14.next = 11;
729
693
  break;
730
694
  }
731
695
  i = 0;
732
696
  case 4:
733
697
  if (!(i < this.groups.length)) {
734
- _context15.next = 11;
698
+ _context14.next = 11;
735
699
  break;
736
700
  }
737
701
  if (!(this.groups[i].displayName === _constants2.DEFAULT_GROUP_NAME)) {
738
- _context15.next = 8;
702
+ _context14.next = 8;
739
703
  break;
740
704
  }
741
705
  this.defaultGroupId = this.groups[i].groupId;
742
- return _context15.abrupt("return", this.defaultGroupId);
706
+ return _context14.abrupt("return", this.defaultGroupId);
743
707
  case 8:
744
708
  i += 1;
745
- _context15.next = 4;
709
+ _context14.next = 4;
746
710
  break;
747
711
  case 11:
748
712
  _Logger.default.info('No default group found.', {
749
713
  file: _constants2.CONTACTS_FILE,
750
714
  method: this.fetchDefaultGroup.name
751
715
  });
752
- _context15.next = 14;
716
+ _context14.next = 14;
753
717
  return this.createContactGroup(_constants2.DEFAULT_GROUP_NAME);
754
718
  case 14:
755
- response = _context15.sent;
719
+ response = _context14.sent;
756
720
  group = response.data.group;
757
721
  if (!group) {
758
- _context15.next = 18;
722
+ _context14.next = 18;
759
723
  break;
760
724
  }
761
- return _context15.abrupt("return", group.groupId);
725
+ return _context14.abrupt("return", group.groupId);
762
726
  case 18:
763
- return _context15.abrupt("return", '');
727
+ return _context14.abrupt("return", '');
764
728
  case 19:
765
729
  case "end":
766
- return _context15.stop();
730
+ return _context14.stop();
767
731
  }
768
732
  }, _callee14, this);
769
733
  }));
@@ -785,45 +749,45 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
785
749
  value: (function () {
786
750
  var _createContactGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(displayName, encryptionKeyUrl, groupType) {
787
751
  var loggerContext, encryptionKeyUrlFinal, isExistingGroup, encryptedDisplayName, groupInfo, _this$groups, response, group, contactResponse, errorInfo, errorStatus;
788
- return _regenerator.default.wrap(function _callee15$(_context16) {
789
- while (1) switch (_context16.prev = _context16.next) {
752
+ return _regenerator.default.wrap(function _callee15$(_context15) {
753
+ while (1) switch (_context15.prev = _context15.next) {
790
754
  case 0:
791
755
  loggerContext = {
792
756
  file: _constants2.CONTACTS_FILE,
793
757
  method: this.createContactGroup.name
794
758
  };
795
759
  _Logger.default.info("Creating contact group ".concat(displayName), loggerContext);
796
- _context16.t0 = encryptionKeyUrl;
797
- if (_context16.t0) {
798
- _context16.next = 7;
760
+ _context15.t0 = encryptionKeyUrl;
761
+ if (_context15.t0) {
762
+ _context15.next = 7;
799
763
  break;
800
764
  }
801
- _context16.next = 6;
765
+ _context15.next = 6;
802
766
  return this.fetchEncryptionKeyUrl();
803
767
  case 6:
804
- _context16.t0 = _context16.sent;
768
+ _context15.t0 = _context15.sent;
805
769
  case 7:
806
- encryptionKeyUrlFinal = _context16.t0;
770
+ encryptionKeyUrlFinal = _context15.t0;
807
771
  if (!(this.groups === undefined)) {
808
- _context16.next = 11;
772
+ _context15.next = 11;
809
773
  break;
810
774
  }
811
- _context16.next = 11;
775
+ _context15.next = 11;
812
776
  return this.getContacts();
813
777
  case 11:
814
778
  if (!(this.groups && this.groups.length)) {
815
- _context16.next = 16;
779
+ _context15.next = 16;
816
780
  break;
817
781
  }
818
782
  isExistingGroup = this.groups.find(function (group) {
819
783
  return group.displayName === displayName;
820
784
  });
821
785
  if (!isExistingGroup) {
822
- _context16.next = 16;
786
+ _context15.next = 16;
823
787
  break;
824
788
  }
825
789
  _Logger.default.warn("Group name ".concat(displayName, " already exists."), loggerContext);
826
- return _context16.abrupt("return", {
790
+ return _context15.abrupt("return", {
827
791
  statusCode: 400,
828
792
  data: {
829
793
  error: 'Group displayName already exists'
@@ -831,18 +795,18 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
831
795
  message: _constants.FAILURE_MESSAGE
832
796
  });
833
797
  case 16:
834
- _context16.next = 18;
798
+ _context15.next = 18;
835
799
  return this.webex.internal.encryption.encryptText(encryptionKeyUrlFinal, displayName);
836
800
  case 18:
837
- encryptedDisplayName = _context16.sent;
801
+ encryptedDisplayName = _context15.sent;
838
802
  groupInfo = {
839
803
  schemas: _constants2.CONTACTS_SCHEMA,
840
804
  displayName: encryptedDisplayName,
841
805
  groupType: groupType || _types2.GroupType.NORMAL,
842
806
  encryptionKeyUrl: encryptionKeyUrlFinal
843
807
  };
844
- _context16.prev = 20;
845
- _context16.next = 23;
808
+ _context15.prev = 20;
809
+ _context15.next = 23;
846
810
  return this.webex.request({
847
811
  // eslint-disable-next-line no-underscore-dangle
848
812
  uri: "".concat(this.webex.internal.services._serviceUrls.contactsService, "/").concat(_constants2.ENCRYPT_FILTER, "/").concat(_constants2.USERS, "/").concat(_constants2.GROUP_FILTER),
@@ -850,7 +814,7 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
850
814
  body: groupInfo
851
815
  });
852
816
  case 23:
853
- response = _context16.sent;
817
+ response = _context15.sent;
854
818
  group = response.body;
855
819
  group.displayName = displayName;
856
820
  contactResponse = {
@@ -861,17 +825,17 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
861
825
  message: _constants.SUCCESS_MESSAGE
862
826
  };
863
827
  (_this$groups = this.groups) === null || _this$groups === void 0 ? void 0 : _this$groups.push(group);
864
- return _context16.abrupt("return", contactResponse);
828
+ return _context15.abrupt("return", contactResponse);
865
829
  case 31:
866
- _context16.prev = 31;
867
- _context16.t1 = _context16["catch"](20);
830
+ _context15.prev = 31;
831
+ _context15.t1 = _context15["catch"](20);
868
832
  _Logger.default.warn('Unable to create contact group.', loggerContext);
869
- errorInfo = _context16.t1;
833
+ errorInfo = _context15.t1;
870
834
  errorStatus = (0, _Utils.serviceErrorCodeHandler)(errorInfo, loggerContext);
871
- return _context16.abrupt("return", errorStatus);
835
+ return _context15.abrupt("return", errorStatus);
872
836
  case 37:
873
837
  case "end":
874
- return _context16.stop();
838
+ return _context15.stop();
875
839
  }
876
840
  }, _callee15, this, [[20, 31]]);
877
841
  }));
@@ -890,23 +854,23 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
890
854
  value: (function () {
891
855
  var _deleteContactGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(groupId) {
892
856
  var loggerContext, _this$groups2, _this$groups4, response, contactResponse, groupToDelete, _this$groups3, errorInfo, errorStatus;
893
- return _regenerator.default.wrap(function _callee16$(_context17) {
894
- while (1) switch (_context17.prev = _context17.next) {
857
+ return _regenerator.default.wrap(function _callee16$(_context16) {
858
+ while (1) switch (_context16.prev = _context16.next) {
895
859
  case 0:
896
860
  loggerContext = {
897
861
  file: _constants2.CONTACTS_FILE,
898
862
  method: this.deleteContactGroup.name
899
863
  };
900
- _context17.prev = 1;
864
+ _context16.prev = 1;
901
865
  _Logger.default.info("Deleting contact group: ".concat(groupId), loggerContext);
902
- _context17.next = 5;
866
+ _context16.next = 5;
903
867
  return this.webex.request({
904
868
  // eslint-disable-next-line no-underscore-dangle
905
869
  uri: "".concat(this.webex.internal.services._serviceUrls.contactsService, "/").concat(_constants2.ENCRYPT_FILTER, "/").concat(_constants2.USERS, "/").concat(_constants2.GROUP_FILTER, "/").concat(groupId),
906
870
  method: _types.HTTP_METHODS.DELETE
907
871
  });
908
872
  case 5:
909
- response = _context17.sent;
873
+ response = _context16.sent;
910
874
  contactResponse = {
911
875
  statusCode: Number(response[_constants.STATUS_CODE]),
912
876
  data: {},
@@ -921,17 +885,17 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
921
885
  if (!((_this$groups4 = this.groups) !== null && _this$groups4 !== void 0 && _this$groups4.length)) {
922
886
  this.defaultGroupId = '';
923
887
  }
924
- return _context17.abrupt("return", contactResponse);
888
+ return _context16.abrupt("return", contactResponse);
925
889
  case 13:
926
- _context17.prev = 13;
927
- _context17.t0 = _context17["catch"](1);
890
+ _context16.prev = 13;
891
+ _context16.t0 = _context16["catch"](1);
928
892
  _Logger.default.warn("Unable to delete contact group ".concat(groupId), loggerContext);
929
- errorInfo = _context17.t0;
893
+ errorInfo = _context16.t0;
930
894
  errorStatus = (0, _Utils.serviceErrorCodeHandler)(errorInfo, loggerContext);
931
- return _context17.abrupt("return", errorStatus);
895
+ return _context16.abrupt("return", errorStatus);
932
896
  case 19:
933
897
  case "end":
934
- return _context17.stop();
898
+ return _context16.stop();
935
899
  }
936
900
  }, _callee16, this, [[1, 13]]);
937
901
  }));
@@ -949,54 +913,54 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
949
913
  key: "createContact",
950
914
  value: (function () {
951
915
  var _createContact = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(contactInfo) {
952
- var loggerContext, contact, defaultGroupId, requestBody, encryptedContact, _encryptedContact, response, newContact, contactResponse, decryptedContacts, _this$contacts, _this$contacts2, errorInfo, errorStatus;
953
- return _regenerator.default.wrap(function _callee17$(_context18) {
954
- while (1) switch (_context18.prev = _context18.next) {
916
+ var loggerContext, contact, defaultGroupId, requestBody, encryptedContact, _encryptedContact, response, newContact, contactResponse, query, res, resolvedContact, _this$contacts, _this$contacts2, errorInfo, errorStatus;
917
+ return _regenerator.default.wrap(function _callee17$(_context17) {
918
+ while (1) switch (_context17.prev = _context17.next) {
955
919
  case 0:
956
920
  loggerContext = {
957
921
  file: _constants2.CONTACTS_FILE,
958
922
  method: this.createContact.name
959
923
  };
960
924
  _Logger.default.info("Request to create contact: contactType: ".concat(contactInfo.contactType), loggerContext);
961
- _context18.prev = 2;
925
+ _context17.prev = 2;
962
926
  contact = _objectSpread({}, contactInfo);
963
927
  if (contact.encryptionKeyUrl) {
964
- _context18.next = 8;
928
+ _context17.next = 8;
965
929
  break;
966
930
  }
967
- _context18.next = 7;
931
+ _context17.next = 7;
968
932
  return this.fetchEncryptionKeyUrl();
969
933
  case 7:
970
- contact.encryptionKeyUrl = _context18.sent;
934
+ contact.encryptionKeyUrl = _context17.sent;
971
935
  case 8:
972
936
  if (!(!contact.groups || contact.groups.length === 0)) {
973
- _context18.next = 13;
937
+ _context17.next = 13;
974
938
  break;
975
939
  }
976
- _context18.next = 11;
940
+ _context17.next = 11;
977
941
  return this.fetchDefaultGroup();
978
942
  case 11:
979
- defaultGroupId = _context18.sent;
943
+ defaultGroupId = _context17.sent;
980
944
  contact.groups = [defaultGroupId];
981
945
  case 13:
982
946
  contact.schemas = _constants2.CONTACTS_SCHEMA;
983
947
  requestBody = {};
984
- _context18.t0 = contact.contactType;
985
- _context18.next = _context18.t0 === _types2.ContactType.CUSTOM ? 18 : _context18.t0 === _types2.ContactType.CLOUD ? 23 : 30;
948
+ _context17.t0 = contact.contactType;
949
+ _context17.next = _context17.t0 === _types2.ContactType.CUSTOM ? 18 : _context17.t0 === _types2.ContactType.CLOUD ? 23 : 30;
986
950
  break;
987
951
  case 18:
988
- _context18.next = 20;
952
+ _context17.next = 20;
989
953
  return this.encryptContact(contact);
990
954
  case 20:
991
- encryptedContact = _context18.sent;
955
+ encryptedContact = _context17.sent;
992
956
  requestBody = encryptedContact;
993
- return _context18.abrupt("break", 31);
957
+ return _context17.abrupt("break", 31);
994
958
  case 23:
995
959
  if (contact.contactId) {
996
- _context18.next = 25;
960
+ _context17.next = 25;
997
961
  break;
998
962
  }
999
- return _context18.abrupt("return", {
963
+ return _context17.abrupt("return", {
1000
964
  statusCode: 400,
1001
965
  data: {
1002
966
  error: 'contactId is required for contactType:CLOUD.'
@@ -1004,14 +968,14 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
1004
968
  message: _constants.FAILURE_MESSAGE
1005
969
  });
1006
970
  case 25:
1007
- _context18.next = 27;
971
+ _context17.next = 27;
1008
972
  return this.encryptContact(contact);
1009
973
  case 27:
1010
- _encryptedContact = _context18.sent;
974
+ _encryptedContact = _context17.sent;
1011
975
  requestBody = _encryptedContact;
1012
- return _context18.abrupt("break", 31);
976
+ return _context17.abrupt("break", 31);
1013
977
  case 30:
1014
- return _context18.abrupt("return", {
978
+ return _context17.abrupt("return", {
1015
979
  statusCode: 400,
1016
980
  data: {
1017
981
  error: 'Unknown contactType received.'
@@ -1019,7 +983,7 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
1019
983
  message: _constants.FAILURE_MESSAGE
1020
984
  });
1021
985
  case 31:
1022
- _context18.next = 33;
986
+ _context17.next = 33;
1023
987
  return this.webex.request({
1024
988
  // eslint-disable-next-line no-underscore-dangle
1025
989
  uri: "".concat(this.webex.internal.services._serviceUrls.contactsService, "/").concat(_constants2.ENCRYPT_FILTER, "/").concat(_constants2.USERS, "/").concat(_constants2.CONTACT_FILTER),
@@ -1027,7 +991,7 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
1027
991
  body: requestBody
1028
992
  });
1029
993
  case 33:
1030
- response = _context18.sent;
994
+ response = _context17.sent;
1031
995
  newContact = response.body;
1032
996
  contact.contactId = newContact.contactId;
1033
997
  contactResponse = {
@@ -1037,38 +1001,40 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
1037
1001
  },
1038
1002
  message: _constants.SUCCESS_MESSAGE
1039
1003
  };
1040
- if (!(contact.contactType === _types2.ContactType.CLOUD)) {
1041
- _context18.next = 44;
1004
+ if (!(contact.contactType === _types2.ContactType.CLOUD && newContact.contactId)) {
1005
+ _context17.next = 46;
1042
1006
  break;
1043
1007
  }
1044
- _context18.next = 40;
1045
- return this.fetchContactFromDSS(Object.fromEntries([[newContact.contactId, newContact]]));
1046
- case 40:
1047
- decryptedContacts = _context18.sent;
1048
- if (decryptedContacts.length && decryptedContacts[0]) {
1049
- (_this$contacts = this.contacts) === null || _this$contacts === void 0 ? void 0 : _this$contacts.push(decryptedContacts[0]);
1008
+ query = "".concat(_constants2.SCIM_ID_FILTER, " \"").concat(newContact.contactId, "\"");
1009
+ _context17.next = 41;
1010
+ return (0, _Utils.scimQuery)(query);
1011
+ case 41:
1012
+ res = _context17.sent;
1013
+ resolvedContact = this.resolveCloudContacts(Object.fromEntries([[newContact.contactId, newContact]]), res.body);
1014
+ if (resolvedContact) {
1015
+ (_this$contacts = this.contacts) === null || _this$contacts === void 0 ? void 0 : _this$contacts.push(resolvedContact[0]);
1050
1016
  }
1051
- _context18.next = 45;
1017
+ _context17.next = 47;
1052
1018
  break;
1053
- case 44:
1019
+ case 46:
1054
1020
  (_this$contacts2 = this.contacts) === null || _this$contacts2 === void 0 ? void 0 : _this$contacts2.push(contact);
1055
- case 45:
1056
- return _context18.abrupt("return", contactResponse);
1057
- case 48:
1058
- _context18.prev = 48;
1059
- _context18.t1 = _context18["catch"](2);
1021
+ case 47:
1022
+ return _context17.abrupt("return", contactResponse);
1023
+ case 50:
1024
+ _context17.prev = 50;
1025
+ _context17.t1 = _context17["catch"](2);
1060
1026
  _Logger.default.warn('Failed to create contact.', {
1061
1027
  file: _constants2.CONTACTS_FILE,
1062
1028
  method: this.createContact.name
1063
1029
  });
1064
- errorInfo = _context18.t1;
1030
+ errorInfo = _context17.t1;
1065
1031
  errorStatus = (0, _Utils.serviceErrorCodeHandler)(errorInfo, loggerContext);
1066
- return _context18.abrupt("return", errorStatus);
1067
- case 54:
1032
+ return _context17.abrupt("return", errorStatus);
1033
+ case 56:
1068
1034
  case "end":
1069
- return _context18.stop();
1035
+ return _context17.stop();
1070
1036
  }
1071
- }, _callee17, this, [[2, 48]]);
1037
+ }, _callee17, this, [[2, 50]]);
1072
1038
  }));
1073
1039
  function createContact(_x18) {
1074
1040
  return _createContact.apply(this, arguments);
@@ -1085,23 +1051,23 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
1085
1051
  value: (function () {
1086
1052
  var _deleteContact = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(contactId) {
1087
1053
  var loggerContext, _this$contacts3, response, contactResponse, contactToDelete, _this$contacts4, errorInfo, errorStatus;
1088
- return _regenerator.default.wrap(function _callee18$(_context19) {
1089
- while (1) switch (_context19.prev = _context19.next) {
1054
+ return _regenerator.default.wrap(function _callee18$(_context18) {
1055
+ while (1) switch (_context18.prev = _context18.next) {
1090
1056
  case 0:
1091
1057
  loggerContext = {
1092
1058
  file: _constants2.CONTACTS_FILE,
1093
1059
  method: this.deleteContact.name
1094
1060
  };
1095
- _context19.prev = 1;
1061
+ _context18.prev = 1;
1096
1062
  _Logger.default.info("Deleting contact : ".concat(contactId), loggerContext);
1097
- _context19.next = 5;
1063
+ _context18.next = 5;
1098
1064
  return this.webex.request({
1099
1065
  // eslint-disable-next-line no-underscore-dangle
1100
1066
  uri: "".concat(this.webex.internal.services._serviceUrls.contactsService, "/").concat(_constants2.ENCRYPT_FILTER, "/").concat(_constants2.USERS, "/").concat(_constants2.CONTACT_FILTER, "/").concat(contactId),
1101
1067
  method: _types.HTTP_METHODS.DELETE
1102
1068
  });
1103
1069
  case 5:
1104
- response = _context19.sent;
1070
+ response = _context18.sent;
1105
1071
  contactResponse = {
1106
1072
  statusCode: Number(response[_constants.STATUS_CODE]),
1107
1073
  data: {},
@@ -1113,17 +1079,17 @@ var ContactsClient = exports.ContactsClient = /*#__PURE__*/function () {
1113
1079
  if (contactToDelete !== undefined && contactToDelete !== -1) {
1114
1080
  (_this$contacts4 = this.contacts) === null || _this$contacts4 === void 0 ? void 0 : _this$contacts4.splice(contactToDelete, 1);
1115
1081
  }
1116
- return _context19.abrupt("return", contactResponse);
1082
+ return _context18.abrupt("return", contactResponse);
1117
1083
  case 12:
1118
- _context19.prev = 12;
1119
- _context19.t0 = _context19["catch"](1);
1084
+ _context18.prev = 12;
1085
+ _context18.t0 = _context18["catch"](1);
1120
1086
  _Logger.default.warn("Unable to delete contact ".concat(contactId), loggerContext);
1121
- errorInfo = _context19.t0;
1087
+ errorInfo = _context18.t0;
1122
1088
  errorStatus = (0, _Utils.serviceErrorCodeHandler)(errorInfo, loggerContext);
1123
- return _context19.abrupt("return", errorStatus);
1089
+ return _context18.abrupt("return", errorStatus);
1124
1090
  case 18:
1125
1091
  case "end":
1126
- return _context19.stop();
1092
+ return _context18.stop();
1127
1093
  }
1128
1094
  }, _callee18, this, [[1, 12]]);
1129
1095
  }));