@webex/plugin-meetings 3.12.0-next.10 → 3.12.0-next.12

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 (33) hide show
  1. package/dist/aiEnableRequest/index.js +1 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/controls-options-manager/constants.js +11 -1
  5. package/dist/controls-options-manager/constants.js.map +1 -1
  6. package/dist/controls-options-manager/index.js +23 -21
  7. package/dist/controls-options-manager/index.js.map +1 -1
  8. package/dist/controls-options-manager/util.js +91 -0
  9. package/dist/controls-options-manager/util.js.map +1 -1
  10. package/dist/hashTree/hashTreeParser.js +36 -20
  11. package/dist/hashTree/hashTreeParser.js.map +1 -1
  12. package/dist/interpretation/index.js +1 -1
  13. package/dist/interpretation/siLanguage.js +1 -1
  14. package/dist/locus-info/index.js +38 -14
  15. package/dist/locus-info/index.js.map +1 -1
  16. package/dist/meeting/util.js +1 -0
  17. package/dist/meeting/util.js.map +1 -1
  18. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  19. package/dist/types/hashTree/hashTreeParser.d.ts +12 -2
  20. package/dist/types/locus-info/index.d.ts +8 -3
  21. package/dist/webinar/index.js +1 -1
  22. package/package.json +13 -13
  23. package/src/controls-options-manager/constants.ts +14 -1
  24. package/src/controls-options-manager/index.ts +26 -19
  25. package/src/controls-options-manager/util.ts +81 -1
  26. package/src/hashTree/hashTreeParser.ts +39 -22
  27. package/src/locus-info/index.ts +48 -24
  28. package/src/meeting/util.ts +1 -0
  29. package/test/unit/spec/controls-options-manager/index.js +114 -6
  30. package/test/unit/spec/controls-options-manager/util.js +165 -0
  31. package/test/unit/spec/hashTree/hashTreeParser.ts +59 -32
  32. package/test/unit/spec/locus-info/index.js +47 -22
  33. package/test/unit/spec/meeting/utils.js +4 -0
@@ -413,7 +413,7 @@ describe('plugin-meetings', () => {
413
413
  };
414
414
 
415
415
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
416
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
416
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
417
417
  updatedObjects: [{htMeta: {elementId: {type: 'self'}}, data: newSelf}],
418
418
  });
419
419
 
@@ -440,7 +440,7 @@ describe('plugin-meetings', () => {
440
440
  locusInfo.info.isWebinar = true;
441
441
 
442
442
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
443
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
443
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
444
444
  updatedObjects: [{htMeta: {elementId: {type: 'self'}}, data: newSelf}],
445
445
  });
446
446
 
@@ -473,7 +473,7 @@ describe('plugin-meetings', () => {
473
473
  locusInfo.info.isWebinar = true;
474
474
 
475
475
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
476
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
476
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
477
477
  updatedObjects: [{htMeta: {elementId: {type: 'self'}}, data: newSelf}],
478
478
  });
479
479
 
@@ -501,7 +501,7 @@ describe('plugin-meetings', () => {
501
501
  };
502
502
 
503
503
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
504
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
504
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
505
505
  updatedObjects: [{htMeta: {elementId: {type: 'fullState'}}, data: newFullState}],
506
506
  });
507
507
 
@@ -519,7 +519,7 @@ describe('plugin-meetings', () => {
519
519
  };
520
520
 
521
521
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
522
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
522
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
523
523
  updatedObjects: [{htMeta: {elementId: {type: 'info'}}, data: newInfo}],
524
524
  });
525
525
 
@@ -537,7 +537,7 @@ describe('plugin-meetings', () => {
537
537
  };
538
538
 
539
539
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
540
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
540
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
541
541
  updatedObjects: [{htMeta: {elementId: {type: 'links'}}, data: newLinks}],
542
542
  });
543
543
 
@@ -557,7 +557,7 @@ describe('plugin-meetings', () => {
557
557
  };
558
558
 
559
559
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
560
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
560
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
561
561
  updatedObjects: [{htMeta: newLocusHtMeta, data: newLocus}],
562
562
  });
563
563
 
@@ -590,7 +590,7 @@ describe('plugin-meetings', () => {
590
590
  };
591
591
 
592
592
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
593
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
593
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
594
594
  updatedObjects: [
595
595
  {
596
596
  htMeta: newLocusHtMeta,
@@ -637,7 +637,7 @@ describe('plugin-meetings', () => {
637
637
  };
638
638
 
639
639
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
640
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
640
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
641
641
  updatedObjects: [
642
642
  // first, a removal of LOCUS object
643
643
  {htMeta: {elementId: {type: 'locus'}}, data: null},
@@ -671,7 +671,7 @@ describe('plugin-meetings', () => {
671
671
  const newLocusHtMeta = {elementId: {type: 'locus', version: 99}};
672
672
 
673
673
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
674
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
674
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
675
675
  updatedObjects: [
676
676
  // first, an update
677
677
  {htMeta: newLocusHtMeta, data: newLocus},
@@ -700,7 +700,7 @@ describe('plugin-meetings', () => {
700
700
  };
701
701
 
702
702
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
703
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
703
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
704
704
  updatedObjects: [
705
705
  // first, an update
706
706
  {htMeta: {elementId: {type: 'locus'}}, data: newLocus1},
@@ -730,7 +730,7 @@ describe('plugin-meetings', () => {
730
730
  };
731
731
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
732
732
  // with 1 participant added, 1 updated, and 1 removed
733
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
733
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
734
734
  updatedObjects: [
735
735
  {htMeta: {elementId: {type: 'participant', id: 'fake-ht-participant-1'}}, data: null},
736
736
  {
@@ -774,7 +774,7 @@ describe('plugin-meetings', () => {
774
774
  };
775
775
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
776
776
  // with 1 participant added, 1 updated, and 1 removed
777
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
777
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
778
778
  updatedObjects: [
779
779
  {htMeta: {elementId: {type: 'mediashare', id: 'fake-ht-mediaShare-1'}}, data: null},
780
780
  {
@@ -807,7 +807,7 @@ describe('plugin-meetings', () => {
807
807
  };
808
808
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
809
809
  // with 1 embedded app added, 1 updated, and 1 removed
810
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
810
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
811
811
  updatedObjects: [
812
812
  {htMeta: {elementId: {type: 'embeddedapp', id: 'fake-ht-embeddedApp-1'}}, data: null},
813
813
  {
@@ -844,7 +844,7 @@ describe('plugin-meetings', () => {
844
844
  };
845
845
 
846
846
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
847
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
847
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
848
848
  updatedObjects: [
849
849
  {
850
850
  htMeta: {elementId: {type: 'mediashare', id: 'fake-ht-mediaShare-2'}},
@@ -883,7 +883,7 @@ describe('plugin-meetings', () => {
883
883
  };
884
884
 
885
885
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
886
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
886
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
887
887
  updatedObjects: [
888
888
  {
889
889
  htMeta: {elementId: {type: 'controlentry', id: 'control-1'}},
@@ -911,7 +911,7 @@ describe('plugin-meetings', () => {
911
911
 
912
912
  it('should process locus update correctly when CONTROL object is received with no data', () => {
913
913
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
914
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
914
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
915
915
  updatedObjects: [
916
916
  {
917
917
  htMeta: {elementId: {type: 'controlentry', id: 'some-control-id'}},
@@ -935,7 +935,7 @@ describe('plugin-meetings', () => {
935
935
  const destroyStub = sinon.stub(locusInfo.webex.meetings, 'destroy');
936
936
 
937
937
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
938
- locusInfoUpdateCallback(MEETING_ENDED);
938
+ locusInfoUpdateCallback({updateType: MEETING_ENDED});
939
939
 
940
940
  assert.calledOnceWithExactly(collectionGetStub, locusInfo.meetingId);
941
941
  assert.calledOnceWithExactly(
@@ -953,7 +953,7 @@ describe('plugin-meetings', () => {
953
953
  const destroyStub = sinon.stub(locusInfo.webex.meetings, 'destroy');
954
954
 
955
955
  // simulate an update from the HashTreeParser (normally this would be triggered by incoming locus messages)
956
- locusInfoUpdateCallback(MEETING_ENDED);
956
+ locusInfoUpdateCallback({updateType: MEETING_ENDED});
957
957
 
958
958
  assert.calledOnceWithExactly(collectionGetStub, locusInfo.meetingId);
959
959
  assert.notCalled(destroyStub);
@@ -963,7 +963,7 @@ describe('plugin-meetings', () => {
963
963
  const createdHashTreeParser = locusInfo.hashTreeParsers.get('fake-locus-url');
964
964
  createdHashTreeParser.initializedFromHashTree = false;
965
965
 
966
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
966
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
967
967
  updatedObjects: [
968
968
  {
969
969
  htMeta: {elementId: {type: 'self'}},
@@ -978,7 +978,7 @@ describe('plugin-meetings', () => {
978
978
  });
979
979
 
980
980
  it('should set forceReplaceMembers to false on subsequent updates (initializedFromHashTree is true)', () => {
981
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
981
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
982
982
  updatedObjects: [
983
983
  {
984
984
  htMeta: {elementId: {type: 'self'}},
@@ -994,7 +994,7 @@ describe('plugin-meetings', () => {
994
994
  it('should copy participant data to self when participant matches self identity and state is LEFT with reason MOVED', () => {
995
995
  locusInfo.self = {id: 'fake-self', identity: 'user-123'};
996
996
 
997
- locusInfoUpdateCallback(OBJECTS_UPDATED, {
997
+ locusInfoUpdateCallback({updateType: OBJECTS_UPDATED,
998
998
  updatedObjects: [
999
999
  {
1000
1000
  htMeta: {elementId: {type: 'participant', id: 99}},
@@ -4413,6 +4413,31 @@ describe('plugin-meetings', () => {
4413
4413
  });
4414
4414
  });
4415
4415
 
4416
+ describe('#cleanUp', () => {
4417
+ it('calls cleanUp on all hash tree parsers and clears maps', () => {
4418
+ const parser1 = {cleanUp: sinon.stub()};
4419
+ const parser2 = {cleanUp: sinon.stub()};
4420
+
4421
+ locusInfo.hashTreeParsers.set('url1', {parser: parser1, initializedFromHashTree: true});
4422
+ locusInfo.hashTreeParsers.set('url2', {parser: parser2, initializedFromHashTree: true});
4423
+ locusInfo.hashTreeObjectId2ParticipantId.set(1, 'participant1');
4424
+
4425
+ locusInfo.cleanUp();
4426
+
4427
+ assert.calledOnce(parser1.cleanUp);
4428
+ assert.calledOnce(parser2.cleanUp);
4429
+ assert.equal(locusInfo.hashTreeParsers.size, 0);
4430
+ assert.equal(locusInfo.hashTreeObjectId2ParticipantId.size, 0);
4431
+ });
4432
+
4433
+ it('works when there are no hash tree parsers', () => {
4434
+ locusInfo.cleanUp();
4435
+
4436
+ assert.equal(locusInfo.hashTreeParsers.size, 0);
4437
+ assert.equal(locusInfo.hashTreeObjectId2ParticipantId.size, 0);
4438
+ });
4439
+ });
4440
+
4416
4441
  describe('#handleOneonOneEvent', () => {
4417
4442
  beforeEach(() => {
4418
4443
  locusInfo.emitScoped = sinon.stub();
@@ -60,6 +60,7 @@ describe('plugin-meetings', () => {
60
60
  meeting.annotaion = {cleanUp: sinon.stub()};
61
61
  meeting.getWebexObject = sinon.stub().returns(webex);
62
62
  meeting.simultaneousInterpretation = {cleanUp: sinon.stub()};
63
+ meeting.locusInfo = {cleanUp: sinon.stub()};
63
64
  meeting.trigger = sinon.stub();
64
65
  meeting.webex = webex;
65
66
  meeting.webex.internal.newMetrics.callDiagnosticMetrics =
@@ -89,6 +90,7 @@ describe('plugin-meetings', () => {
89
90
  assert.calledOnceWithExactly(meeting.cleanupLLMConneciton, {throwOnError: false});
90
91
  assert.calledOnce(meeting.breakouts.cleanUp);
91
92
  assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
93
+ assert.calledOnce(meeting.locusInfo.cleanUp);
92
94
  assert.calledOnce(webex.internal.device.meetingEnded);
93
95
  assert.calledOnceWithExactly(
94
96
  meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
@@ -110,6 +112,7 @@ describe('plugin-meetings', () => {
110
112
  assert.notCalled(meeting.cleanupLLMConneciton);
111
113
  assert.calledOnce(meeting.breakouts.cleanUp);
112
114
  assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
115
+ assert.calledOnce(meeting.locusInfo.cleanUp);
113
116
  assert.calledOnce(webex.internal.device.meetingEnded);
114
117
  assert.calledOnceWithExactly(
115
118
  meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
@@ -130,6 +133,7 @@ describe('plugin-meetings', () => {
130
133
  assert.notCalled(meeting.cleanupLLMConneciton);
131
134
  assert.calledOnce(meeting.breakouts.cleanUp);
132
135
  assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
136
+ assert.calledOnce(meeting.locusInfo.cleanUp);
133
137
  assert.calledOnce(webex.internal.device.meetingEnded);
134
138
  assert.calledOnceWithExactly(
135
139
  meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,