@webex/calling 3.3.1 → 3.4.0-next.2

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