@webex/plugin-meetings 3.12.0-next.13 → 3.12.0-next.131

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 (232) 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/annotation/index.js +2 -2
  5. package/dist/annotation/index.js.map +1 -1
  6. package/dist/breakouts/breakout.js +8 -3
  7. package/dist/breakouts/breakout.js.map +1 -1
  8. package/dist/breakouts/events.js +29 -14
  9. package/dist/breakouts/events.js.map +1 -1
  10. package/dist/breakouts/index.js +99 -4
  11. package/dist/breakouts/index.js.map +1 -1
  12. package/dist/common/errors/webex-errors.js +49 -5
  13. package/dist/common/errors/webex-errors.js.map +1 -1
  14. package/dist/config.js +2 -2
  15. package/dist/config.js.map +1 -1
  16. package/dist/constants.js +37 -10
  17. package/dist/constants.js.map +1 -1
  18. package/dist/controls-options-manager/index.js +46 -10
  19. package/dist/controls-options-manager/index.js.map +1 -1
  20. package/dist/hashTree/constants.js +4 -1
  21. package/dist/hashTree/constants.js.map +1 -1
  22. package/dist/hashTree/hashTreeParser.js +1045 -393
  23. package/dist/hashTree/hashTreeParser.js.map +1 -1
  24. package/dist/hashTree/utils.js +20 -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 +409 -122
  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 +4 -5
  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 +1669 -835
  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 +34 -2
  62. package/dist/meeting/util.js.map +1 -1
  63. package/dist/meeting-info/meeting-info-v2.js +9 -3
  64. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  65. package/dist/meetings/index.js +281 -124
  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 +7 -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/reachability/clusterReachability.js.map +1 -1
  91. package/dist/reachability/index.js +121 -83
  92. package/dist/reachability/index.js.map +1 -1
  93. package/dist/reachability/reachability.types.js +2 -0
  94. package/dist/reachability/reachability.types.js.map +1 -1
  95. package/dist/reachability/util.js +45 -0
  96. package/dist/reachability/util.js.map +1 -1
  97. package/dist/reactions/reactions.type.js.map +1 -1
  98. package/dist/recording-controller/index.js +1 -3
  99. package/dist/recording-controller/index.js.map +1 -1
  100. package/dist/roap/turnDiscovery.js +8 -1
  101. package/dist/roap/turnDiscovery.js.map +1 -1
  102. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  103. package/dist/types/config.d.ts +2 -2
  104. package/dist/types/constants.d.ts +13 -1
  105. package/dist/types/controls-options-manager/index.d.ts +16 -0
  106. package/dist/types/hashTree/constants.d.ts +1 -0
  107. package/dist/types/hashTree/hashTreeParser.d.ts +189 -22
  108. package/dist/types/hashTree/utils.d.ts +7 -0
  109. package/dist/types/index.d.ts +3 -0
  110. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  111. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  112. package/dist/types/locus-info/index.d.ts +61 -7
  113. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  114. package/dist/types/locus-info/types.d.ts +21 -1
  115. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  116. package/dist/types/media/properties.d.ts +6 -2
  117. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  118. package/dist/types/meeting/index.d.ts +175 -11
  119. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  120. package/dist/types/meeting/request.d.ts +1 -0
  121. package/dist/types/meeting/util.d.ts +9 -0
  122. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  123. package/dist/types/meetings/index.d.ts +38 -18
  124. package/dist/types/meetings/meetings.types.d.ts +15 -0
  125. package/dist/types/meetings/request.d.ts +14 -0
  126. package/dist/types/member/index.d.ts +1 -0
  127. package/dist/types/member/types.d.ts +1 -0
  128. package/dist/types/member/util.d.ts +9 -0
  129. package/dist/types/members/index.d.ts +15 -2
  130. package/dist/types/members/util.d.ts +1 -5
  131. package/dist/types/metrics/constants.d.ts +6 -0
  132. package/dist/types/multistream/codec/constants.d.ts +7 -0
  133. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  134. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  135. package/dist/types/reachability/index.d.ts +10 -3
  136. package/dist/types/reachability/reachability.types.d.ts +7 -0
  137. package/dist/types/reachability/util.d.ts +17 -0
  138. package/dist/types/reactions/reactions.type.d.ts +3 -0
  139. package/dist/webinar/index.js +307 -161
  140. package/dist/webinar/index.js.map +1 -1
  141. package/package.json +23 -23
  142. package/src/aiEnableRequest/index.ts +16 -0
  143. package/src/annotation/index.ts +6 -4
  144. package/src/breakouts/breakout.ts +3 -1
  145. package/src/breakouts/events.ts +33 -11
  146. package/src/breakouts/index.ts +122 -2
  147. package/src/common/errors/webex-errors.ts +50 -3
  148. package/src/config.ts +2 -2
  149. package/src/constants.ts +21 -3
  150. package/src/controls-options-manager/index.ts +62 -10
  151. package/src/hashTree/constants.ts +7 -0
  152. package/src/hashTree/hashTreeParser.ts +796 -192
  153. package/src/hashTree/utils.ts +19 -0
  154. package/src/index.ts +6 -0
  155. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  156. package/src/interceptors/locusRetry.ts +25 -4
  157. package/src/interpretation/index.ts +27 -9
  158. package/src/interpretation/interpretation.types.ts +11 -0
  159. package/src/locus-info/controlsUtils.ts +3 -1
  160. package/src/locus-info/index.ts +413 -130
  161. package/src/locus-info/infoUtils.ts +41 -6
  162. package/src/locus-info/types.ts +25 -1
  163. package/src/media/MediaConnectionAwaiter.ts +21 -4
  164. package/src/media/index.ts +10 -1
  165. package/src/media/properties.ts +8 -3
  166. package/src/meeting/in-meeting-actions.ts +8 -0
  167. package/src/meeting/index.ts +923 -117
  168. package/src/meeting/locusMediaRequest.ts +106 -6
  169. package/src/meeting/muteState.ts +10 -1
  170. package/src/meeting/request.ts +11 -0
  171. package/src/meeting/util.ts +46 -5
  172. package/src/meeting-info/meeting-info-v2.ts +10 -4
  173. package/src/meetings/index.ts +178 -78
  174. package/src/meetings/meetings.types.ts +19 -0
  175. package/src/meetings/request.ts +43 -0
  176. package/src/meetings/util.ts +117 -4
  177. package/src/member/index.ts +10 -0
  178. package/src/member/types.ts +1 -0
  179. package/src/member/util.ts +29 -0
  180. package/src/members/index.ts +70 -7
  181. package/src/members/util.ts +12 -4
  182. package/src/metrics/constants.ts +6 -0
  183. package/src/multistream/codec/constants.ts +58 -0
  184. package/src/multistream/mediaRequestManager.ts +119 -28
  185. package/src/multistream/receiveSlot.ts +18 -0
  186. package/src/reachability/clusterReachability.ts +3 -2
  187. package/src/reachability/index.ts +47 -16
  188. package/src/reachability/reachability.types.ts +11 -0
  189. package/src/reachability/util.ts +36 -0
  190. package/src/reactions/reactions.type.ts +3 -0
  191. package/src/recording-controller/index.ts +1 -2
  192. package/src/roap/turnDiscovery.ts +9 -1
  193. package/src/webinar/index.ts +216 -38
  194. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  195. package/test/unit/spec/annotation/index.ts +3 -3
  196. package/test/unit/spec/breakouts/breakout.ts +9 -3
  197. package/test/unit/spec/breakouts/events.ts +120 -2
  198. package/test/unit/spec/breakouts/index.ts +223 -3
  199. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  200. package/test/unit/spec/controls-options-manager/index.js +139 -32
  201. package/test/unit/spec/hashTree/hashTreeParser.ts +2299 -243
  202. package/test/unit/spec/hashTree/utils.ts +37 -0
  203. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  204. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  205. package/test/unit/spec/interpretation/index.ts +26 -4
  206. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  207. package/test/unit/spec/locus-info/index.js +671 -63
  208. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  209. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  210. package/test/unit/spec/media/index.ts +92 -0
  211. package/test/unit/spec/media/properties.ts +23 -23
  212. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  213. package/test/unit/spec/meeting/index.js +2733 -116
  214. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  215. package/test/unit/spec/meeting/muteState.js +81 -0
  216. package/test/unit/spec/meeting/request.js +12 -0
  217. package/test/unit/spec/meeting/utils.js +153 -1
  218. package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
  219. package/test/unit/spec/meetings/index.js +486 -49
  220. package/test/unit/spec/meetings/request.js +141 -0
  221. package/test/unit/spec/meetings/utils.js +402 -51
  222. package/test/unit/spec/member/index.js +7 -0
  223. package/test/unit/spec/member/util.js +89 -0
  224. package/test/unit/spec/members/index.js +216 -0
  225. package/test/unit/spec/members/request.js +37 -1
  226. package/test/unit/spec/members/utils.js +63 -0
  227. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  228. package/test/unit/spec/reachability/index.ts +128 -46
  229. package/test/unit/spec/reachability/util.ts +31 -0
  230. package/test/unit/spec/recording-controller/index.js +9 -8
  231. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  232. package/test/unit/spec/webinar/index.ts +332 -31
@@ -276,6 +276,31 @@ describe('plugin-meetings', () => {
276
276
  assert.notCalled(meeting.locusInfo.handleLocusAPIResponse);
277
277
  });
278
278
 
279
+ it('should call handleLocusAPIResponse when response body is an unwrapped LocusDTO', () => {
280
+ const meeting = {
281
+ locusInfo: {
282
+ handleLocusAPIResponse: sinon.stub(),
283
+ },
284
+ };
285
+
286
+ const originalResponse = {
287
+ body: {
288
+ url: 'https://locus-a.wbx2.com/locus/api/v1/loci/some-id',
289
+ participants: [],
290
+ self: {},
291
+ },
292
+ };
293
+
294
+ const response = MeetingUtil.updateLocusFromApiResponse(meeting, originalResponse);
295
+
296
+ assert.deepEqual(response, originalResponse);
297
+ assert.calledOnceWithExactly(
298
+ meeting.locusInfo.handleLocusAPIResponse,
299
+ meeting,
300
+ originalResponse.body
301
+ );
302
+ });
303
+
279
304
  it('should work with an undefined meeting', () => {
280
305
  const originalResponse = {
281
306
  body: {
@@ -294,6 +319,7 @@ describe('plugin-meetings', () => {
294
319
  const addSequenceSpy = sinon.spy(MeetingUtil, 'addSequence');
295
320
 
296
321
  const meeting = {
322
+ locusUrl: 'https://locus.example.com/loci/abc',
297
323
  request: sinon.stub().returns(Promise.resolve('result')),
298
324
  };
299
325
 
@@ -301,6 +327,7 @@ describe('plugin-meetings', () => {
301
327
 
302
328
  const options = {
303
329
  some: 'option',
330
+ uri: 'https://locus.example.com/loci/abc',
304
331
  body: {},
305
332
  };
306
333
 
@@ -314,7 +341,7 @@ describe('plugin-meetings', () => {
314
341
  addSequenceSpy.resetHistory();
315
342
 
316
343
  // body missing from options
317
- result = await locusDeltaRequest({});
344
+ result = await locusDeltaRequest({uri: 'https://locus.example.com/loci/abc'});
318
345
  assert.equal(result, 'result');
319
346
  assert.calledOnceWithExactly(updateLocusFromApiResponseSpy, meeting, 'result');
320
347
  assert.calledOnceWithExactly(addSequenceSpy, meeting, options.body);
@@ -328,6 +355,78 @@ describe('plugin-meetings', () => {
328
355
  WeakRef.prototype.deref.restore();
329
356
  });
330
357
 
358
+ it('calls updateLocusFromApiResponse when request uri starts with the meeting locusUrl', async () => {
359
+ const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
360
+
361
+ const meeting = {
362
+ locusUrl: 'https://locus.example.com/loci/abc',
363
+ request: sinon.stub().returns(Promise.resolve('result')),
364
+ };
365
+
366
+ const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
367
+
368
+ const result = await locusDeltaRequest({
369
+ uri: 'https://locus.example.com/loci/abc/participant/123',
370
+ body: {},
371
+ });
372
+
373
+ assert.equal(result, 'result');
374
+ assert.calledOnceWithExactly(updateLocusFromApiResponseSpy, meeting, 'result');
375
+ });
376
+
377
+ it('does not call updateLocusFromApiResponse when request uri does not match the meeting locusUrl', async () => {
378
+ const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
379
+
380
+ const meeting = {
381
+ locusUrl: 'https://locus.example.com/loci/abc',
382
+ request: sinon.stub().returns(Promise.resolve('result')),
383
+ };
384
+
385
+ const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
386
+
387
+ const result = await locusDeltaRequest({
388
+ uri: 'https://locus.example.com/loci/different',
389
+ body: {},
390
+ });
391
+
392
+ assert.equal(result, 'result');
393
+ assert.notCalled(updateLocusFromApiResponseSpy);
394
+ });
395
+
396
+ it('does not call updateLocusFromApiResponse when request uri is missing', async () => {
397
+ const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
398
+
399
+ const meeting = {
400
+ locusUrl: 'https://locus.example.com/loci/abc',
401
+ request: sinon.stub().returns(Promise.resolve('result')),
402
+ };
403
+
404
+ const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
405
+
406
+ const result = await locusDeltaRequest({body: {}});
407
+
408
+ assert.equal(result, 'result');
409
+ assert.notCalled(updateLocusFromApiResponseSpy);
410
+ });
411
+
412
+ it('does not call updateLocusFromApiResponse when meeting locusUrl is missing', async () => {
413
+ const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
414
+
415
+ const meeting = {
416
+ request: sinon.stub().returns(Promise.resolve('result')),
417
+ };
418
+
419
+ const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
420
+
421
+ const result = await locusDeltaRequest({
422
+ uri: 'https://locus.example.com/loci/abc',
423
+ body: {},
424
+ });
425
+
426
+ assert.equal(result, 'result');
427
+ assert.notCalled(updateLocusFromApiResponseSpy);
428
+ });
429
+
331
430
  it('calls generateBuildLocusDeltaRequestOptions as expected', () => {
332
431
  const generateBuildLocusDeltaRequestOptionsSpy = sinon.spy(
333
432
  MeetingUtil,
@@ -942,6 +1041,55 @@ describe('plugin-meetings', () => {
942
1041
  });
943
1042
  });
944
1043
 
1044
+ describe('canViewTheParticipantList', () => {
1045
+ it('returns true when both VIEW_THE_PARTICIPANT_LIST and CAN_VIEW_THE_PARTICIPANT_LIST hints are present and canNotViewTheParticipantList is false', () => {
1046
+ assert.isTrue(
1047
+ MeetingUtil.canViewTheParticipantList(
1048
+ ['VIEW_THE_PARTICIPANT_LIST', 'CAN_VIEW_THE_PARTICIPANT_LIST'],
1049
+ false
1050
+ )
1051
+ );
1052
+ });
1053
+
1054
+ it('returns false when VIEW_THE_PARTICIPANT_LIST hint is missing', () => {
1055
+ assert.isFalse(
1056
+ MeetingUtil.canViewTheParticipantList(['CAN_VIEW_THE_PARTICIPANT_LIST'], false)
1057
+ );
1058
+ });
1059
+
1060
+ it('returns false when CAN_VIEW_THE_PARTICIPANT_LIST hint is missing', () => {
1061
+ assert.isFalse(
1062
+ MeetingUtil.canViewTheParticipantList(['VIEW_THE_PARTICIPANT_LIST'], false)
1063
+ );
1064
+ });
1065
+
1066
+ it('returns false when canNotViewTheParticipantList is true', () => {
1067
+ assert.isFalse(
1068
+ MeetingUtil.canViewTheParticipantList(
1069
+ ['VIEW_THE_PARTICIPANT_LIST', 'CAN_VIEW_THE_PARTICIPANT_LIST'],
1070
+ true
1071
+ )
1072
+ );
1073
+ });
1074
+
1075
+ it('returns false when display hints array is empty', () => {
1076
+ assert.isFalse(MeetingUtil.canViewTheParticipantList([], false));
1077
+ });
1078
+
1079
+ it('returns false when both conditions are violated', () => {
1080
+ assert.isFalse(MeetingUtil.canViewTheParticipantList([], true));
1081
+ });
1082
+
1083
+ it('returns true when canNotViewTheParticipantList is undefined (not yet set on meeting)', () => {
1084
+ assert.isTrue(
1085
+ MeetingUtil.canViewTheParticipantList(
1086
+ ['VIEW_THE_PARTICIPANT_LIST', 'CAN_VIEW_THE_PARTICIPANT_LIST'],
1087
+ undefined
1088
+ )
1089
+ );
1090
+ });
1091
+ });
1092
+
945
1093
  describe('canAttendeeRequestAiAssistantEnabled', () => {
946
1094
  it('returns false when user is a cohost', () => {
947
1095
  assert.deepEqual(
@@ -1150,6 +1298,10 @@ describe('plugin-meetings', () => {
1150
1298
  {functionName: 'canSelectSpokenLanguages', displayHint: 'DISPLAY_NON_ENGLISH_ASR'},
1151
1299
  {functionName: 'waitingForOthersToJoin', displayHint: 'WAITING_FOR_OTHERS'},
1152
1300
  {functionName: 'showAutoEndMeetingWarning', displayHint: 'SHOW_AUTO_END_MEETING_WARNING'},
1301
+ {
1302
+ functionName: 'isAnonymizeDisplayNamesEnabled',
1303
+ displayHint: 'ANONYMOUS_DISPLAY_NAMES_ENABLED',
1304
+ },
1153
1305
  ].forEach(({functionName, displayHint}) => {
1154
1306
  describe(functionName, () => {
1155
1307
  it('works as expected', () => {
@@ -654,7 +654,7 @@ describe('plugin-meetings', () => {
654
654
  meetingInfo.createAdhocSpaceMeeting,
655
655
  'conversationUrl',
656
656
  installedOrgID,
657
- null,
657
+ null
658
658
  );
659
659
  assert.notCalled(webex.request);
660
660
  meetingInfo.createAdhocSpaceMeeting.restore();
@@ -900,6 +900,63 @@ describe('plugin-meetings', () => {
900
900
  }
901
901
  );
902
902
 
903
+ forEach(
904
+ [
905
+ {
906
+ meetingId: 'meeting-id',
907
+ sendCAevents: true,
908
+ correlationId: 'correlation-id',
909
+ shouldSendCorrelationId: true,
910
+ condition: 'when CA events are enabled for the meeting',
911
+ },
912
+ {
913
+ sendCAevents: true,
914
+ correlationId: 'correlation-id',
915
+ shouldSendCorrelationId: false,
916
+ condition: 'without a meetingId',
917
+ },
918
+ {
919
+ meetingId: 'meeting-id',
920
+ sendCAevents: false,
921
+ correlationId: 'correlation-id',
922
+ shouldSendCorrelationId: false,
923
+ condition: 'when CA events are disabled',
924
+ },
925
+ {
926
+ meetingId: 'meeting-id',
927
+ sendCAevents: true,
928
+ shouldSendCorrelationId: false,
929
+ condition: 'without a correlationId',
930
+ },
931
+ ],
932
+ ({meetingId, sendCAevents, correlationId, shouldSendCorrelationId, condition}) => {
933
+ it(`should ${
934
+ shouldSendCorrelationId ? '' : 'not '
935
+ }send the correlationId header ${condition}`, async () => {
936
+ webex.request.resolves({statusCode: 200, body: {meetingKey: '1234323'}});
937
+
938
+ await meetingInfo.fetchMeetingInfo(
939
+ '1234323',
940
+ DESTINATION_TYPE.MEETING_ID,
941
+ null,
942
+ null,
943
+ null,
944
+ null,
945
+ undefined,
946
+ {meetingId, sendCAevents, correlationId}
947
+ );
948
+
949
+ const requestOptions = webex.request.firstCall.args[0];
950
+
951
+ if (shouldSendCorrelationId) {
952
+ assert.deepEqual(requestOptions.headers, {correlationId});
953
+ } else {
954
+ assert.notProperty(requestOptions, 'headers');
955
+ }
956
+ });
957
+ }
958
+ );
959
+
903
960
  it('should send CA metric if meetingId is provided and send CA events is authorized', async () => {
904
961
  const requestResponse = {
905
962
  statusCode: 200,
@@ -1068,13 +1125,16 @@ describe('plugin-meetings', () => {
1068
1125
  await runTest(423006, true);
1069
1126
  });
1070
1127
 
1128
+ it('should throw MeetingInfoV2CaptchaError for 423 response (wbxappapi code 423008)', async () => {
1129
+ await runTest(423008, true);
1130
+ });
1131
+
1071
1132
  it('should throw MeetingInfoV2CaptchaError for 423 response (wbxappapi code 423001)', async () => {
1072
1133
  await runTest(423001, false);
1073
1134
  });
1074
1135
  });
1075
1136
 
1076
1137
  describe('should stop call fetchMeetingInfo if siteFullUrl is empty for 404 response', () => {
1077
-
1078
1138
  const runTest = async (wbxAppApiCode, expectedIsPasswordRequired) => {
1079
1139
  webex.request = sinon.stub().rejects({
1080
1140
  statusCode: 404,
@@ -1082,12 +1142,11 @@ describe('plugin-meetings', () => {
1082
1142
  code: wbxAppApiCode,
1083
1143
  message: 'Alternate Meeting Server',
1084
1144
  data: {
1085
- 'siteFullUrl': ''
1086
- }
1145
+ siteFullUrl: '',
1146
+ },
1087
1147
  },
1088
1148
  });
1089
1149
 
1090
-
1091
1150
  try {
1092
1151
  await meetingInfo.fetchMeetingInfo('1234323', DESTINATION_TYPE.MEETING_ID, 'abc', {
1093
1152
  id: '999',
@@ -1097,7 +1156,7 @@ describe('plugin-meetings', () => {
1097
1156
  } catch (err) {
1098
1157
  assert(Metrics.sendBehavioralMetric.calledOnce);
1099
1158
  assert.deepEqual(err.body.data, {
1100
- siteFullUrl: ''
1159
+ siteFullUrl: '',
1101
1160
  });
1102
1161
  }
1103
1162
  };
@@ -1107,7 +1166,6 @@ describe('plugin-meetings', () => {
1107
1166
  });
1108
1167
  });
1109
1168
 
1110
-
1111
1169
  it('should throw an error and not fetch with an "empty" body', async () => {
1112
1170
  const body = {supportHostKey: 'foo', supportCountryList: 'bar'};
1113
1171
  const requestResponse = {statusCode: 200, body};
@@ -1176,7 +1234,11 @@ describe('plugin-meetings', () => {
1176
1234
  body: conversation,
1177
1235
  });
1178
1236
 
1179
- const result = await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID, classificationId);
1237
+ const result = await meetingInfo.createAdhocSpaceMeeting(
1238
+ conversationUrl,
1239
+ installedOrgID,
1240
+ classificationId
1241
+ );
1180
1242
 
1181
1243
  assert.calledWith(webex.request, {
1182
1244
  uri: conversationUrl,
@@ -1210,7 +1272,11 @@ describe('plugin-meetings', () => {
1210
1272
  webex.request = sinon.stub().resolves({
1211
1273
  body: conversation,
1212
1274
  });
1213
- await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID, classificationId);
1275
+ await meetingInfo.createAdhocSpaceMeeting(
1276
+ conversationUrl,
1277
+ installedOrgID,
1278
+ classificationId
1279
+ );
1214
1280
 
1215
1281
  assert.calledWith(webex.request, {
1216
1282
  uri: conversationUrl,
@@ -1282,7 +1348,7 @@ describe('plugin-meetings', () => {
1282
1348
  {errorCode: 423007},
1283
1349
  {errorCode: 403026},
1284
1350
  {errorCode: 403037},
1285
- {errorCode: 403137},
1351
+ {errorCode: 403106},
1286
1352
  ],
1287
1353
  ({errorCode}) => {
1288
1354
  it(`should throw a MeetingInfoV2JoinWebinarError for error code ${errorCode}`, async () => {