@webex/plugin-meetings 3.12.0-next.1 → 3.12.0-next.100

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 (235) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +15 -2
  3. package/dist/aiEnableRequest/index.js.map +1 -1
  4. package/dist/breakouts/breakout.js +8 -3
  5. package/dist/breakouts/breakout.js.map +1 -1
  6. package/dist/breakouts/index.js +26 -2
  7. package/dist/breakouts/index.js.map +1 -1
  8. package/dist/common/errors/webex-errors.js +49 -5
  9. package/dist/common/errors/webex-errors.js.map +1 -1
  10. package/dist/config.js +2 -2
  11. package/dist/config.js.map +1 -1
  12. package/dist/constants.js +35 -9
  13. package/dist/constants.js.map +1 -1
  14. package/dist/controls-options-manager/constants.js +11 -1
  15. package/dist/controls-options-manager/constants.js.map +1 -1
  16. package/dist/controls-options-manager/index.js +67 -29
  17. package/dist/controls-options-manager/index.js.map +1 -1
  18. package/dist/controls-options-manager/util.js +91 -0
  19. package/dist/controls-options-manager/util.js.map +1 -1
  20. package/dist/hashTree/constants.js +13 -1
  21. package/dist/hashTree/constants.js.map +1 -1
  22. package/dist/hashTree/hashTreeParser.js +898 -391
  23. package/dist/hashTree/hashTreeParser.js.map +1 -1
  24. package/dist/hashTree/utils.js +42 -0
  25. package/dist/hashTree/utils.js.map +1 -1
  26. package/dist/index.js +7 -0
  27. package/dist/index.js.map +1 -1
  28. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  29. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  30. package/dist/interceptors/locusRetry.js +23 -8
  31. package/dist/interceptors/locusRetry.js.map +1 -1
  32. package/dist/interpretation/index.js +10 -1
  33. package/dist/interpretation/index.js.map +1 -1
  34. package/dist/interpretation/interpretation.types.js +7 -0
  35. package/dist/interpretation/interpretation.types.js.map +1 -0
  36. package/dist/interpretation/siLanguage.js +1 -1
  37. package/dist/locus-info/controlsUtils.js +4 -1
  38. package/dist/locus-info/controlsUtils.js.map +1 -1
  39. package/dist/locus-info/index.js +401 -115
  40. package/dist/locus-info/index.js.map +1 -1
  41. package/dist/locus-info/infoUtils.js +36 -5
  42. package/dist/locus-info/infoUtils.js.map +1 -1
  43. package/dist/locus-info/types.js +19 -0
  44. package/dist/locus-info/types.js.map +1 -1
  45. package/dist/media/MediaConnectionAwaiter.js +15 -2
  46. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  47. package/dist/media/index.js +8 -2
  48. package/dist/media/index.js.map +1 -1
  49. package/dist/media/properties.js +1 -0
  50. package/dist/media/properties.js.map +1 -1
  51. package/dist/meeting/in-meeting-actions.js +5 -1
  52. package/dist/meeting/in-meeting-actions.js.map +1 -1
  53. package/dist/meeting/index.js +1444 -772
  54. package/dist/meeting/index.js.map +1 -1
  55. package/dist/meeting/locusMediaRequest.js +229 -82
  56. package/dist/meeting/locusMediaRequest.js.map +1 -1
  57. package/dist/meeting/muteState.js +10 -1
  58. package/dist/meeting/muteState.js.map +1 -1
  59. package/dist/meeting/request.js +5 -2
  60. package/dist/meeting/request.js.map +1 -1
  61. package/dist/meeting/util.js +35 -2
  62. package/dist/meeting/util.js.map +1 -1
  63. package/dist/meeting-info/meeting-info-v2.js +2 -2
  64. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  65. package/dist/meetings/index.js +231 -118
  66. package/dist/meetings/index.js.map +1 -1
  67. package/dist/meetings/meetings.types.js +6 -1
  68. package/dist/meetings/meetings.types.js.map +1 -1
  69. package/dist/meetings/request.js +39 -0
  70. package/dist/meetings/request.js.map +1 -1
  71. package/dist/meetings/util.js +116 -18
  72. package/dist/meetings/util.js.map +1 -1
  73. package/dist/member/index.js +10 -0
  74. package/dist/member/index.js.map +1 -1
  75. package/dist/member/types.js.map +1 -1
  76. package/dist/member/util.js +30 -0
  77. package/dist/member/util.js.map +1 -1
  78. package/dist/members/index.js +101 -43
  79. package/dist/members/index.js.map +1 -1
  80. package/dist/members/util.js +8 -1
  81. package/dist/members/util.js.map +1 -1
  82. package/dist/metrics/constants.js +10 -1
  83. package/dist/metrics/constants.js.map +1 -1
  84. package/dist/multistream/codec/constants.js +63 -0
  85. package/dist/multistream/codec/constants.js.map +1 -0
  86. package/dist/multistream/mediaRequestManager.js +62 -15
  87. package/dist/multistream/mediaRequestManager.js.map +1 -1
  88. package/dist/multistream/receiveSlot.js +9 -0
  89. package/dist/multistream/receiveSlot.js.map +1 -1
  90. package/dist/multistream/sendSlotManager.js +116 -2
  91. package/dist/multistream/sendSlotManager.js.map +1 -1
  92. package/dist/reachability/clusterReachability.js.map +1 -1
  93. package/dist/reachability/index.js +121 -83
  94. package/dist/reachability/index.js.map +1 -1
  95. package/dist/reachability/reachability.types.js +2 -0
  96. package/dist/reachability/reachability.types.js.map +1 -1
  97. package/dist/reachability/util.js +45 -0
  98. package/dist/reachability/util.js.map +1 -1
  99. package/dist/reactions/reactions.type.js.map +1 -1
  100. package/dist/recording-controller/index.js +1 -3
  101. package/dist/recording-controller/index.js.map +1 -1
  102. package/dist/roap/turnDiscovery.js +8 -1
  103. package/dist/roap/turnDiscovery.js.map +1 -1
  104. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  105. package/dist/types/config.d.ts +2 -2
  106. package/dist/types/constants.d.ts +12 -1
  107. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  108. package/dist/types/controls-options-manager/index.d.ts +16 -0
  109. package/dist/types/hashTree/constants.d.ts +2 -0
  110. package/dist/types/hashTree/hashTreeParser.d.ts +146 -17
  111. package/dist/types/hashTree/utils.d.ts +18 -0
  112. package/dist/types/index.d.ts +3 -0
  113. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  114. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  115. package/dist/types/locus-info/index.d.ts +59 -6
  116. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  117. package/dist/types/locus-info/types.d.ts +21 -1
  118. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  119. package/dist/types/media/properties.d.ts +1 -0
  120. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  121. package/dist/types/meeting/index.d.ts +143 -9
  122. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  123. package/dist/types/meeting/request.d.ts +1 -0
  124. package/dist/types/meeting/util.d.ts +9 -0
  125. package/dist/types/meetings/index.d.ts +30 -18
  126. package/dist/types/meetings/meetings.types.d.ts +15 -0
  127. package/dist/types/meetings/request.d.ts +14 -0
  128. package/dist/types/member/index.d.ts +1 -0
  129. package/dist/types/member/types.d.ts +1 -0
  130. package/dist/types/member/util.d.ts +9 -0
  131. package/dist/types/members/index.d.ts +15 -2
  132. package/dist/types/members/util.d.ts +1 -5
  133. package/dist/types/metrics/constants.d.ts +9 -0
  134. package/dist/types/multistream/codec/constants.d.ts +7 -0
  135. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  136. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  137. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  138. package/dist/types/reachability/index.d.ts +10 -3
  139. package/dist/types/reachability/reachability.types.d.ts +7 -0
  140. package/dist/types/reachability/util.d.ts +17 -0
  141. package/dist/types/reactions/reactions.type.d.ts +3 -0
  142. package/dist/webinar/index.js +485 -234
  143. package/dist/webinar/index.js.map +1 -1
  144. package/package.json +22 -22
  145. package/src/aiEnableRequest/index.ts +16 -0
  146. package/src/breakouts/breakout.ts +3 -1
  147. package/src/breakouts/index.ts +31 -0
  148. package/src/common/errors/webex-errors.ts +50 -3
  149. package/src/config.ts +2 -2
  150. package/src/constants.ts +20 -3
  151. package/src/controls-options-manager/constants.ts +14 -1
  152. package/src/controls-options-manager/index.ts +87 -28
  153. package/src/controls-options-manager/util.ts +81 -1
  154. package/src/hashTree/constants.ts +16 -0
  155. package/src/hashTree/hashTreeParser.ts +596 -204
  156. package/src/hashTree/utils.ts +36 -0
  157. package/src/index.ts +6 -0
  158. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  159. package/src/interceptors/locusRetry.ts +25 -4
  160. package/src/interpretation/index.ts +27 -9
  161. package/src/interpretation/interpretation.types.ts +11 -0
  162. package/src/locus-info/controlsUtils.ts +3 -1
  163. package/src/locus-info/index.ts +415 -136
  164. package/src/locus-info/infoUtils.ts +41 -6
  165. package/src/locus-info/types.ts +25 -1
  166. package/src/media/MediaConnectionAwaiter.ts +21 -4
  167. package/src/media/index.ts +10 -1
  168. package/src/media/properties.ts +1 -0
  169. package/src/meeting/in-meeting-actions.ts +8 -0
  170. package/src/meeting/index.ts +790 -136
  171. package/src/meeting/locusMediaRequest.ts +106 -6
  172. package/src/meeting/muteState.ts +10 -1
  173. package/src/meeting/request.ts +11 -0
  174. package/src/meeting/util.ts +47 -5
  175. package/src/meeting-info/meeting-info-v2.ts +4 -2
  176. package/src/meetings/index.ts +133 -78
  177. package/src/meetings/meetings.types.ts +19 -0
  178. package/src/meetings/request.ts +43 -0
  179. package/src/meetings/util.ts +117 -4
  180. package/src/member/index.ts +10 -0
  181. package/src/member/types.ts +1 -0
  182. package/src/member/util.ts +29 -0
  183. package/src/members/index.ts +70 -7
  184. package/src/members/util.ts +12 -4
  185. package/src/metrics/constants.ts +10 -0
  186. package/src/multistream/codec/constants.ts +58 -0
  187. package/src/multistream/mediaRequestManager.ts +119 -28
  188. package/src/multistream/receiveSlot.ts +18 -0
  189. package/src/multistream/sendSlotManager.ts +97 -3
  190. package/src/reachability/clusterReachability.ts +3 -2
  191. package/src/reachability/index.ts +47 -16
  192. package/src/reachability/reachability.types.ts +11 -0
  193. package/src/reachability/util.ts +36 -0
  194. package/src/reactions/reactions.type.ts +3 -0
  195. package/src/recording-controller/index.ts +1 -2
  196. package/src/roap/turnDiscovery.ts +9 -1
  197. package/src/webinar/index.ts +330 -50
  198. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  199. package/test/unit/spec/breakouts/breakout.ts +9 -3
  200. package/test/unit/spec/breakouts/index.ts +49 -0
  201. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  202. package/test/unit/spec/controls-options-manager/index.js +244 -29
  203. package/test/unit/spec/controls-options-manager/util.js +165 -0
  204. package/test/unit/spec/hashTree/hashTreeParser.ts +1911 -143
  205. package/test/unit/spec/hashTree/utils.ts +125 -1
  206. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  207. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  208. package/test/unit/spec/interpretation/index.ts +26 -4
  209. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  210. package/test/unit/spec/locus-info/index.js +645 -80
  211. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  212. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  213. package/test/unit/spec/media/index.ts +92 -0
  214. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  215. package/test/unit/spec/meeting/index.js +2261 -109
  216. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  217. package/test/unit/spec/meeting/muteState.js +81 -0
  218. package/test/unit/spec/meeting/request.js +12 -0
  219. package/test/unit/spec/meeting/utils.js +157 -1
  220. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  221. package/test/unit/spec/meetings/index.js +366 -39
  222. package/test/unit/spec/meetings/request.js +141 -0
  223. package/test/unit/spec/meetings/utils.js +402 -51
  224. package/test/unit/spec/member/index.js +7 -0
  225. package/test/unit/spec/member/util.js +89 -0
  226. package/test/unit/spec/members/index.js +216 -0
  227. package/test/unit/spec/members/request.js +37 -1
  228. package/test/unit/spec/members/utils.js +63 -0
  229. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  230. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  231. package/test/unit/spec/reachability/index.ts +128 -46
  232. package/test/unit/spec/reachability/util.ts +31 -0
  233. package/test/unit/spec/recording-controller/index.js +9 -8
  234. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  235. package/test/unit/spec/webinar/index.ts +516 -30
@@ -799,6 +799,171 @@ describe('plugin-meetings', () => {
799
799
  );
800
800
  });
801
801
  });
802
+
803
+ describe('isAudioControl()', () => {
804
+ it('should return true when all body keys are audio control keys', () => {
805
+ assert.isTrue(ControlsOptionsUtil.isAudioControl({audio: {muted: true}}));
806
+ });
807
+
808
+ it('should return true when body has muteOnEntry key', () => {
809
+ assert.isTrue(ControlsOptionsUtil.isAudioControl({muteOnEntry: {enabled: true}}));
810
+ });
811
+
812
+ it('should return true when body has disallowUnmute key', () => {
813
+ assert.isTrue(ControlsOptionsUtil.isAudioControl({disallowUnmute: {enabled: true}}));
814
+ });
815
+
816
+ it('should return true when body has multiple audio control keys', () => {
817
+ assert.isTrue(ControlsOptionsUtil.isAudioControl({audio: {muted: true}, muteOnEntry: {enabled: true}, disallowUnmute: {enabled: true}}));
818
+ });
819
+
820
+ it('should return false when body has a non-audio control key', () => {
821
+ assert.isFalse(ControlsOptionsUtil.isAudioControl({raiseHand: {enabled: true}}));
822
+ });
823
+
824
+ it('should return false when body has a mix of audio and non-audio keys', () => {
825
+ assert.isFalse(ControlsOptionsUtil.isAudioControl({audio: {muted: true}, raiseHand: {enabled: true}}));
826
+ });
827
+
828
+ it('should return true for an empty body', () => {
829
+ assert.isTrue(ControlsOptionsUtil.isAudioControl({}));
830
+ });
831
+ });
832
+
833
+ describe('isBreakoutLocusUrl()', () => {
834
+ it('should return true when mainLocusUrl differs from locusUrl', () => {
835
+ assert.isTrue(ControlsOptionsUtil.isBreakoutLocusUrl('locus/breakout', 'locus/main'));
836
+ });
837
+
838
+ it('should return false when mainLocusUrl equals locusUrl', () => {
839
+ assert.isFalse(ControlsOptionsUtil.isBreakoutLocusUrl('locus/main', 'locus/main'));
840
+ });
841
+
842
+ it('should return false when mainLocusUrl is undefined', () => {
843
+ assert.isFalse(ControlsOptionsUtil.isBreakoutLocusUrl('locus/breakout', undefined));
844
+ });
845
+
846
+ it('should return false when mainLocusUrl is null', () => {
847
+ assert.isFalse(ControlsOptionsUtil.isBreakoutLocusUrl('locus/breakout', null));
848
+ });
849
+
850
+ it('should return false when mainLocusUrl is empty string', () => {
851
+ assert.isFalse(ControlsOptionsUtil.isBreakoutLocusUrl('locus/breakout', ''));
852
+ });
853
+ });
854
+
855
+ describe('getControlsRequestParams()', () => {
856
+ const locusUrl = 'locus/breakout';
857
+ const mainLocusUrl = 'locus/main';
858
+
859
+ it('should return full request params targeting locusUrl when not in a breakout', () => {
860
+ const result = ControlsOptionsUtil.getControlsRequestParams({
861
+ body: {raiseHand: {enabled: true}},
862
+ locusUrl: 'locus/main',
863
+ mainLocusUrl: 'locus/main',
864
+ });
865
+
866
+ assert.equal(result.uri, 'locus/main/controls');
867
+ assert.deepEqual(result.body, {raiseHand: {enabled: true}});
868
+ assert.equal(result.method, 'PATCH');
869
+ });
870
+
871
+ it('should return mainLocusUrl with authorizingLocusUrl in body for non-audio controls in a breakout', () => {
872
+ const result = ControlsOptionsUtil.getControlsRequestParams({
873
+ body: {raiseHand: {enabled: true}},
874
+ locusUrl,
875
+ mainLocusUrl,
876
+ });
877
+
878
+ assert.equal(result.uri, 'locus/main/controls');
879
+ assert.deepEqual(result.body, {raiseHand: {enabled: true}, authorizingLocusUrl: locusUrl});
880
+ assert.equal(result.method, 'PATCH');
881
+ });
882
+
883
+ it('should return locusUrl without authorizingLocusUrl for audio controls in a breakout', () => {
884
+ const result = ControlsOptionsUtil.getControlsRequestParams({
885
+ body: {audio: {muted: true}},
886
+ locusUrl,
887
+ mainLocusUrl,
888
+ });
889
+
890
+ assert.equal(result.uri, 'locus/breakout/controls');
891
+ assert.deepEqual(result.body, {audio: {muted: true}});
892
+ assert.equal(result.method, 'PATCH');
893
+ });
894
+
895
+ it('should return locusUrl without authorizingLocusUrl for muteOnEntry in a breakout', () => {
896
+ const result = ControlsOptionsUtil.getControlsRequestParams({
897
+ body: {muteOnEntry: {enabled: true}},
898
+ locusUrl,
899
+ mainLocusUrl,
900
+ });
901
+
902
+ assert.equal(result.uri, 'locus/breakout/controls');
903
+ assert.deepEqual(result.body, {muteOnEntry: {enabled: true}});
904
+ assert.equal(result.method, 'PATCH');
905
+ });
906
+
907
+ it('should return locusUrl without authorizingLocusUrl for disallowUnmute in a breakout', () => {
908
+ const result = ControlsOptionsUtil.getControlsRequestParams({
909
+ body: {disallowUnmute: {enabled: true}},
910
+ locusUrl,
911
+ mainLocusUrl,
912
+ });
913
+
914
+ assert.equal(result.uri, 'locus/breakout/controls');
915
+ assert.deepEqual(result.body, {disallowUnmute: {enabled: true}});
916
+ assert.equal(result.method, 'PATCH');
917
+ });
918
+
919
+ it('should return locusUrl when mainLocusUrl is undefined', () => {
920
+ const result = ControlsOptionsUtil.getControlsRequestParams({
921
+ body: {raiseHand: {enabled: true}},
922
+ locusUrl,
923
+ mainLocusUrl: undefined,
924
+ });
925
+
926
+ assert.equal(result.uri, 'locus/breakout/controls');
927
+ assert.deepEqual(result.body, {raiseHand: {enabled: true}});
928
+ assert.equal(result.method, 'PATCH');
929
+ });
930
+
931
+ it('should return locusUrl when mainLocusUrl is null', () => {
932
+ const result = ControlsOptionsUtil.getControlsRequestParams({
933
+ body: {raiseHand: {enabled: true}},
934
+ locusUrl,
935
+ mainLocusUrl: null,
936
+ });
937
+
938
+ assert.equal(result.uri, 'locus/breakout/controls');
939
+ assert.deepEqual(result.body, {raiseHand: {enabled: true}});
940
+ assert.equal(result.method, 'PATCH');
941
+ });
942
+
943
+ it('should return locusUrl when mainLocusUrl is empty string', () => {
944
+ const result = ControlsOptionsUtil.getControlsRequestParams({
945
+ body: {raiseHand: {enabled: true}},
946
+ locusUrl,
947
+ mainLocusUrl: '',
948
+ });
949
+
950
+ assert.equal(result.uri, 'locus/breakout/controls');
951
+ assert.deepEqual(result.body, {raiseHand: {enabled: true}});
952
+ assert.equal(result.method, 'PATCH');
953
+ });
954
+
955
+ it('should return locusUrl for audio controls when not in a breakout', () => {
956
+ const result = ControlsOptionsUtil.getControlsRequestParams({
957
+ body: {audio: {muted: true}},
958
+ locusUrl: 'locus/main',
959
+ mainLocusUrl: 'locus/main',
960
+ });
961
+
962
+ assert.equal(result.uri, 'locus/main/controls');
963
+ assert.deepEqual(result.body, {audio: {muted: true}});
964
+ assert.equal(result.method, 'PATCH');
965
+ });
966
+ });
802
967
  });
803
968
  });
804
969
  });