@webex/plugin-meetings 3.12.0-auth-prejoin-fetch.1 → 3.12.0-llmrefactor.10

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 (63) hide show
  1. package/dist/aiEnableRequest/index.js +1 -1
  2. package/dist/annotation/index.js +53 -17
  3. package/dist/annotation/index.js.map +1 -1
  4. package/dist/breakouts/breakout.js +1 -1
  5. package/dist/breakouts/index.js +35 -9
  6. package/dist/breakouts/index.js.map +1 -1
  7. package/dist/hashTree/hashTreeParser.js +101 -48
  8. package/dist/hashTree/hashTreeParser.js.map +1 -1
  9. package/dist/interceptors/dataChannelAuthToken.js +41 -59
  10. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  11. package/dist/interpretation/index.js +1 -1
  12. package/dist/interpretation/siLanguage.js +1 -1
  13. package/dist/locus-info/index.js +27 -2
  14. package/dist/locus-info/index.js.map +1 -1
  15. package/dist/locus-info/types.js +2 -1
  16. package/dist/locus-info/types.js.map +1 -1
  17. package/dist/meeting/index.js +913 -921
  18. package/dist/meeting/index.js.map +1 -1
  19. package/dist/meeting/util.js +5 -1
  20. package/dist/meeting/util.js.map +1 -1
  21. package/dist/meeting/voicea-meeting.js +2 -1
  22. package/dist/meeting/voicea-meeting.js.map +1 -1
  23. package/dist/meeting-info/meeting-info-v2.js +36 -92
  24. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  25. package/dist/meetings/index.js +33 -93
  26. package/dist/meetings/index.js.map +1 -1
  27. package/dist/meetings/meetings.types.js.map +1 -1
  28. package/dist/types/annotation/index.d.ts +19 -0
  29. package/dist/types/hashTree/hashTreeParser.d.ts +12 -0
  30. package/dist/types/locus-info/index.d.ts +6 -0
  31. package/dist/types/locus-info/types.d.ts +1 -0
  32. package/dist/types/meeting/index.d.ts +47 -20
  33. package/dist/types/meeting/util.d.ts +3 -1
  34. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -24
  35. package/dist/types/meetings/index.d.ts +2 -13
  36. package/dist/types/meetings/meetings.types.d.ts +1 -15
  37. package/dist/webinar/index.js +298 -255
  38. package/dist/webinar/index.js.map +1 -1
  39. package/package.json +21 -21
  40. package/src/annotation/index.ts +55 -25
  41. package/src/breakouts/index.ts +33 -11
  42. package/src/hashTree/hashTreeParser.ts +67 -3
  43. package/src/interceptors/dataChannelAuthToken.ts +48 -77
  44. package/src/locus-info/index.ts +20 -0
  45. package/src/locus-info/types.ts +1 -0
  46. package/src/meeting/index.ts +318 -332
  47. package/src/meeting/util.ts +2 -2
  48. package/src/meeting/voicea-meeting.ts +1 -1
  49. package/src/meeting-info/meeting-info-v2.ts +18 -74
  50. package/src/meetings/index.ts +6 -70
  51. package/src/meetings/meetings.types.ts +1 -17
  52. package/src/webinar/index.ts +168 -188
  53. package/test/unit/spec/annotation/index.ts +214 -182
  54. package/test/unit/spec/breakouts/index.ts +126 -25
  55. package/test/unit/spec/hashTree/hashTreeParser.ts +212 -1
  56. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +81 -99
  57. package/test/unit/spec/locus-info/index.js +79 -0
  58. package/test/unit/spec/meeting/index.js +979 -701
  59. package/test/unit/spec/meeting/utils.js +16 -2
  60. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  61. package/test/unit/spec/meeting-info/meetinginfov2.js +0 -210
  62. package/test/unit/spec/meetings/index.js +5 -231
  63. package/test/unit/spec/webinar/index.ts +886 -718
@@ -1354,7 +1354,9 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1354
1354
  key: "destroy",
1355
1355
  value: function destroy(meeting, reason) {
1356
1356
  var _meeting$locusInfo, _meeting$locusInfo2, _meeting$locusInfo2$f, _meeting$locusInfo3, _meeting$locusInfo3$f;
1357
- _util.default.cleanUp(meeting);
1357
+ _util.default.cleanUp(meeting, {
1358
+ preserveVoiceaChannel: false
1359
+ });
1358
1360
  // keep some basic info about the deleted meeting forever
1359
1361
  this.deletedMeetings.set(meeting.id, {
1360
1362
  id: meeting.id,
@@ -1421,7 +1423,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1421
1423
  * @param {String} [meetingLookupUrl] - meeting info prefetch url
1422
1424
  * @param {string} sessionCorrelationId - the optional specified sessionCorrelationId (callStateForMetrics.sessionCorrelationId) can be provided instead
1423
1425
  * @param {String} classificationId - If space support classification, it will provide it while start instant meeting
1424
- * @param {PrefetchedMeetingInfo} prefetchedMeetingInfo - meeting information requested before creating the Meeting
1425
1426
  * @returns {Promise<Meeting>} A new Meeting.
1426
1427
  * @public
1427
1428
  * @memberof Meetings
@@ -1440,11 +1441,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1440
1441
  var meetingLookupUrl = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : undefined;
1441
1442
  var sessionCorrelationId = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : undefined;
1442
1443
  var classificationId = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : undefined;
1443
- var prefetchedMeetingInfo = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : undefined;
1444
- if (meetingInfo && prefetchedMeetingInfo) {
1445
- return _promise.default.reject(new Error('meetingInfo and prefetchedMeetingInfo cannot both be provided'));
1446
- }
1447
-
1448
1444
  // Validate meeting information based on the provided destination and
1449
1445
  // type. This must be performed prior to determining if the meeting is
1450
1446
  // found in the collection, as we mutate the destination for hydra person
@@ -1495,7 +1491,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1495
1491
  // Validate if a meeting was found.
1496
1492
  if (!meeting) {
1497
1493
  // Create a meeting based on the normalized destination and type.
1498
- return _this1.createMeeting(targetDest, type, useRandomDelayForInfo, infoExtraParams, callStateForMetrics, failOnMissingMeetingInfo, meetingInfo, meetingLookupUrl, classificationId, prefetchedMeetingInfo).then(function (createdMeeting) {
1494
+ return _this1.createMeeting(targetDest, type, useRandomDelayForInfo, infoExtraParams, callStateForMetrics, failOnMissingMeetingInfo, meetingInfo, meetingLookupUrl, classificationId).then(function (createdMeeting) {
1499
1495
  // If the meeting was successfully created.
1500
1496
  if (createdMeeting && createdMeeting.on) {
1501
1497
  // Create a destruction event for the meeting.
@@ -1540,55 +1536,12 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1540
1536
  });
1541
1537
  }
1542
1538
  meeting.updateCallStateForMetrics(callStateForMetrics);
1543
- if (prefetchedMeetingInfo && (0, _lodash.isEmpty)(meeting.meetingInfo)) {
1544
- return meeting.consumePrefetchedMeetingInfo(prefetchedMeetingInfo).then(function () {
1545
- return meeting;
1546
- });
1547
- }
1548
1539
 
1549
1540
  // Return the existing meeting.
1550
1541
  return _promise.default.resolve(meeting);
1551
1542
  });
1552
1543
  }
1553
1544
 
1554
- /**
1555
- * Starts meeting-information retrieval without creating or registering a Meeting.
1556
- *
1557
- * @param {PrefetchMeetingInfoParams} params request destination and metric identifiers
1558
- * @returns {PrefetchedMeetingInfo} opaque handle consumed later by create() or Meeting
1559
- * @public
1560
- * @memberof Meetings
1561
- */
1562
- }, {
1563
- key: "prefetchMeetingInfo",
1564
- value: function prefetchMeetingInfo(_ref5) {
1565
- var destination = _ref5.destination,
1566
- _ref5$type = _ref5.type,
1567
- type = _ref5$type === void 0 ? null : _ref5$type,
1568
- _ref5$extraParams = _ref5.extraParams,
1569
- extraParams = _ref5$extraParams === void 0 ? {} : _ref5$extraParams,
1570
- preJoinContext = _ref5.preJoinContext,
1571
- _ref5$classificationI = _ref5.classificationId,
1572
- classificationId = _ref5$classificationI === void 0 ? undefined : _ref5$classificationI;
1573
- var sendCAevents = !!preJoinContext.correlationId;
1574
- // @ts-ignore - parent SDK instance inherited from WebexPlugin
1575
- var webex = this.webex;
1576
- var meetingInfoProvider = _meetingInfoV.default.createPreJoinProvider(webex, preJoinContext);
1577
- var request = meetingInfoProvider.fetchMeetingInfo(destination, type, null, null,
1578
- // @ts-ignore - config coming from registerPlugin
1579
- this.config.installedOrgID, null, extraParams, {
1580
- sendCAevents: sendCAevents
1581
- }, null, null, classificationId);
1582
- request.catch(function () {
1583
- return undefined;
1584
- });
1585
- return {
1586
- request: request,
1587
- provider: meetingInfoProvider,
1588
- extraParams: extraParams
1589
- };
1590
- }
1591
-
1592
1545
  /**
1593
1546
  * Enable static meeting links for given conversation url.
1594
1547
  *
@@ -1643,7 +1596,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1643
1596
  * @param {Object} [meetingInfo] - Pre-fetched complete meeting info
1644
1597
  * @param {String} [meetingLookupUrl] - meeting info prefetch url
1645
1598
  * @param {String} classificationId see create()
1646
- * @param {PrefetchedMeetingInfo} prefetchedMeetingInfo - meeting information requested before creating the Meeting
1647
1599
  * @returns {Promise} a new meeting instance complete with meeting info and destination
1648
1600
  * @private
1649
1601
  * @memberof Meetings
@@ -1661,7 +1613,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1661
1613
  meetingInfo,
1662
1614
  meetingLookupUrl,
1663
1615
  classificationId,
1664
- prefetchedMeetingInfo,
1665
1616
  meeting,
1666
1617
  _destination$fullStat,
1667
1618
  waitingTime,
@@ -1689,7 +1640,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1689
1640
  meetingInfo = _args4.length > 6 && _args4[6] !== undefined ? _args4[6] : undefined;
1690
1641
  meetingLookupUrl = _args4.length > 7 && _args4[7] !== undefined ? _args4[7] : undefined;
1691
1642
  classificationId = _args4.length > 8 && _args4[8] !== undefined ? _args4[8] : undefined;
1692
- prefetchedMeetingInfo = _args4.length > 9 && _args4[9] !== undefined ? _args4[9] : undefined;
1693
1643
  meeting = new _meeting.default({
1694
1644
  // @ts-ignore
1695
1645
  userId: this.webex.internal.device.userId,
@@ -1737,71 +1687,61 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1737
1687
  break;
1738
1688
  }
1739
1689
  meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
1740
- _context4.next = 8;
1690
+ _context4.next = 6;
1741
1691
  break;
1742
1692
  case 2:
1743
- if (!prefetchedMeetingInfo) {
1744
- _context4.next = 4;
1745
- break;
1746
- }
1747
- _context4.next = 3;
1748
- return meeting.consumePrefetchedMeetingInfo(prefetchedMeetingInfo);
1749
- case 3:
1750
- _context4.next = 8;
1751
- break;
1752
- case 4:
1753
1693
  if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus)) {
1754
- _context4.next = 8;
1694
+ _context4.next = 6;
1755
1695
  break;
1756
1696
  }
1757
1697
  if (!(enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0)) {
1758
- _context4.next = 5;
1698
+ _context4.next = 3;
1759
1699
  break;
1760
1700
  }
1761
1701
  meeting.fetchMeetingInfoTimeoutId = setTimeout(function () {
1762
1702
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1763
1703
  }, waitingTime);
1764
1704
  meeting.parseMeetingInfo(undefined, destination);
1765
- _context4.next = 8;
1705
+ _context4.next = 6;
1766
1706
  break;
1767
- case 5:
1707
+ case 3:
1768
1708
  if (shouldDeferMeetingInfoFetch) {
1769
- _context4.next = 7;
1709
+ _context4.next = 5;
1770
1710
  break;
1771
1711
  }
1772
- _context4.next = 6;
1712
+ _context4.next = 4;
1773
1713
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1774
- case 6:
1775
- _context4.next = 8;
1714
+ case 4:
1715
+ _context4.next = 6;
1776
1716
  break;
1777
- case 7:
1717
+ case 5:
1778
1718
  _loggerProxy.default.logger.info('Meetings:index#createMeeting --> defer fetchMeetingInfo for incomplete locus, will do it after locus initialSetup');
1779
- case 8:
1780
- _context4.next = 12;
1719
+ case 6:
1720
+ _context4.next = 10;
1781
1721
  break;
1782
- case 9:
1783
- _context4.prev = 9;
1722
+ case 7:
1723
+ _context4.prev = 7;
1784
1724
  _t2 = _context4["catch"](1);
1785
1725
  if (!(!(_t2 instanceof _captchaError.default) && !(_t2 instanceof _passwordError.default) && !(_t2 instanceof _permission.default) && !(_t2 instanceof _joinWebinarError.default) && !(_t2 instanceof _joinForbiddenError.default))) {
1786
- _context4.next = 11;
1726
+ _context4.next = 9;
1787
1727
  break;
1788
1728
  }
1789
1729
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
1790
1730
  if (!failOnMissingMeetingInfo) {
1791
- _context4.next = 10;
1731
+ _context4.next = 8;
1792
1732
  break;
1793
1733
  }
1794
1734
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.");
1795
1735
  // @ts-ignore
1796
1736
  this.destroy(meeting, _constants.MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
1797
1737
  throw new _noMeetingInfo.default();
1798
- case 10:
1738
+ case 8:
1799
1739
  // if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
1800
1740
  _loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
1801
- case 11:
1802
- _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_t2, " fetching meeting info for creation."));
1803
- case 12:
1804
- _context4.prev = 12;
1741
+ case 9:
1742
+ _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_t2, " fetching /meetingInfo for creation."));
1743
+ case 10:
1744
+ _context4.prev = 10;
1805
1745
  // For type LOCUS_ID we need to parse the locus object to get the information
1806
1746
  // about the caller and callee
1807
1747
  // Meeting Added event will be created in `handleLocusEvent`
@@ -1825,14 +1765,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1825
1765
  type: meetingAddedType
1826
1766
  });
1827
1767
  }
1828
- return _context4.finish(12);
1829
- case 13:
1768
+ return _context4.finish(10);
1769
+ case 11:
1830
1770
  return _context4.abrupt("return", meeting);
1831
- case 14:
1771
+ case 12:
1832
1772
  case "end":
1833
1773
  return _context4.stop();
1834
1774
  }
1835
- }, _callee4, this, [[1, 9, 12, 13]]);
1775
+ }, _callee4, this, [[1, 7, 10, 11]]);
1836
1776
  }));
1837
1777
  function createMeeting(_x4) {
1838
1778
  return _createMeeting.apply(this, arguments);
@@ -1878,10 +1818,10 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1878
1818
  value: (function () {
1879
1819
  var _syncMeetings = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
1880
1820
  var _this11 = this;
1881
- var _ref6,
1882
- _ref6$keepOnlyLocusMe,
1821
+ var _ref5,
1822
+ _ref5$keepOnlyLocusMe,
1883
1823
  keepOnlyLocusMeetings,
1884
- _ref6$skipHashTreeSyn,
1824
+ _ref5$skipHashTreeSyn,
1885
1825
  skipHashTreeSync,
1886
1826
  locusArray,
1887
1827
  activeLocusUrl,
@@ -1900,7 +1840,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1900
1840
  return _regenerator.default.wrap(function (_context6) {
1901
1841
  while (1) switch (_context6.prev = _context6.next) {
1902
1842
  case 0:
1903
- _ref6 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, _ref6$keepOnlyLocusMe = _ref6.keepOnlyLocusMeetings, keepOnlyLocusMeetings = _ref6$keepOnlyLocusMe === void 0 ? true : _ref6$keepOnlyLocusMe, _ref6$skipHashTreeSyn = _ref6.skipHashTreeSync, skipHashTreeSync = _ref6$skipHashTreeSyn === void 0 ? false : _ref6$skipHashTreeSyn;
1843
+ _ref5 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, _ref5$keepOnlyLocusMe = _ref5.keepOnlyLocusMeetings, keepOnlyLocusMeetings = _ref5$keepOnlyLocusMe === void 0 ? true : _ref5$keepOnlyLocusMe, _ref5$skipHashTreeSyn = _ref5.skipHashTreeSync, skipHashTreeSync = _ref5$skipHashTreeSyn === void 0 ? false : _ref5$skipHashTreeSyn;
1904
1844
  if (!this.webex.credentials.isUnverifiedGuest) {
1905
1845
  _context6.next = 1;
1906
1846
  break;