@webex/plugin-meetings 3.12.0-webex-services-ready.4 → 3.13.0-next.1

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 (165) hide show
  1. package/.sdd/manifest.json +1312 -0
  2. package/.sdd/templates/.source.json +30 -0
  3. package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
  4. package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
  5. package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
  6. package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
  7. package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
  8. package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
  9. package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
  10. package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
  11. package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
  12. package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
  13. package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
  14. package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
  15. package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
  16. package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
  17. package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
  18. package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
  19. package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
  20. package/.sdd/templates/component-repo/template-map.json +112 -0
  21. package/AGENTS.md +130 -4
  22. package/ai-docs/ARCHITECTURE.md +208 -0
  23. package/ai-docs/CONTRACTS.md +267 -0
  24. package/ai-docs/DATA_MODEL.md +64 -0
  25. package/ai-docs/GETTING_STARTED.md +73 -0
  26. package/ai-docs/GLOSSARY.md +56 -0
  27. package/ai-docs/REVIEW_CHECKLIST.md +45 -0
  28. package/ai-docs/RULES.md +79 -0
  29. package/ai-docs/SECURITY.md +74 -0
  30. package/ai-docs/SERVICE_STATE.md +59 -0
  31. package/ai-docs/SPEC_INDEX.md +85 -0
  32. package/ai-docs/TEST_INDEX.md +45 -0
  33. package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
  34. package/ai-docs/patterns/defensive-error-propagation.md +55 -0
  35. package/ai-docs/patterns/event-scope-emission.md +46 -0
  36. package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
  37. package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
  38. package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
  39. package/assets/README.md +28 -0
  40. package/assets/e2ee-0.0.1.js +2 -0
  41. package/assets/e2ee-0.0.1.wasm +0 -0
  42. package/dist/aiEnableRequest/index.js +1 -1
  43. package/dist/annotation/index.js +55 -19
  44. package/dist/annotation/index.js.map +1 -1
  45. package/dist/assets/e2ee-0.0.1.js +2 -0
  46. package/dist/assets/e2ee-0.0.1.wasm +0 -0
  47. package/dist/breakouts/breakout.js +1 -1
  48. package/dist/breakouts/index.js +39 -5
  49. package/dist/breakouts/index.js.map +1 -1
  50. package/dist/common/errors/webex-errors.js +7 -2
  51. package/dist/common/errors/webex-errors.js.map +1 -1
  52. package/dist/config.js +1 -0
  53. package/dist/config.js.map +1 -1
  54. package/dist/constants.js +6 -5
  55. package/dist/constants.js.map +1 -1
  56. package/dist/hashTree/hashTreeParser.js +101 -48
  57. package/dist/hashTree/hashTreeParser.js.map +1 -1
  58. package/dist/index.js +1 -0
  59. package/dist/index.js.map +1 -1
  60. package/dist/interceptors/dataChannelAuthToken.js +41 -59
  61. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  62. package/dist/interceptors/locusRetry.js +1 -1
  63. package/dist/interceptors/locusRetry.js.map +1 -1
  64. package/dist/interpretation/index.js +46 -12
  65. package/dist/interpretation/index.js.map +1 -1
  66. package/dist/interpretation/siLanguage.js +1 -1
  67. package/dist/locus-info/index.js +236 -80
  68. package/dist/locus-info/index.js.map +1 -1
  69. package/dist/locus-info/types.js +2 -1
  70. package/dist/locus-info/types.js.map +1 -1
  71. package/dist/media/MediaConnectionAwaiter.js +225 -175
  72. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  73. package/dist/meeting/index.js +355 -299
  74. package/dist/meeting/index.js.map +1 -1
  75. package/dist/meeting/util.js +8 -2
  76. package/dist/meeting/util.js.map +1 -1
  77. package/dist/meeting/voicea-meeting.js +2 -1
  78. package/dist/meeting/voicea-meeting.js.map +1 -1
  79. package/dist/meeting-info/meeting-info-v2.js +10 -3
  80. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  81. package/dist/meetings/index.js +72 -31
  82. package/dist/meetings/index.js.map +1 -1
  83. package/dist/multistream/remoteMediaManager.js +32 -4
  84. package/dist/multistream/remoteMediaManager.js.map +1 -1
  85. package/dist/multistream/sendSlotManager.js +11 -1
  86. package/dist/multistream/sendSlotManager.js.map +1 -1
  87. package/dist/types/annotation/index.d.ts +19 -0
  88. package/dist/types/common/errors/webex-errors.d.ts +6 -2
  89. package/dist/types/config.d.ts +1 -0
  90. package/dist/types/constants.d.ts +2 -1
  91. package/dist/types/hashTree/hashTreeParser.d.ts +12 -0
  92. package/dist/types/index.d.ts +1 -0
  93. package/dist/types/locus-info/index.d.ts +45 -1
  94. package/dist/types/locus-info/types.d.ts +1 -0
  95. package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -53
  96. package/dist/types/meeting/index.d.ts +49 -12
  97. package/dist/types/meeting/util.d.ts +3 -1
  98. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  99. package/dist/types/meetings/index.d.ts +2 -1
  100. package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
  101. package/dist/types/multistream/sendSlotManager.d.ts +5 -1
  102. package/dist/webinar/index.js +298 -255
  103. package/dist/webinar/index.js.map +1 -1
  104. package/package.json +25 -23
  105. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  106. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  107. package/src/annotation/index.ts +61 -29
  108. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  109. package/src/breakouts/index.ts +35 -2
  110. package/src/common/errors/webex-errors.ts +8 -2
  111. package/src/config.ts +5 -1
  112. package/src/constants.ts +2 -1
  113. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  114. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  115. package/src/hashTree/hashTreeParser.ts +67 -3
  116. package/src/index.ts +1 -0
  117. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  118. package/src/interceptors/dataChannelAuthToken.ts +48 -77
  119. package/src/interceptors/locusRetry.ts +1 -1
  120. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  121. package/src/interpretation/index.ts +38 -1
  122. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  123. package/src/locus-info/index.ts +156 -35
  124. package/src/locus-info/types.ts +1 -0
  125. package/src/media/MediaConnectionAwaiter.ts +223 -207
  126. package/src/media/ai-docs/media-spec.md +267 -0
  127. package/src/meeting/ai-docs/meeting-spec.md +404 -0
  128. package/src/meeting/index.ts +332 -296
  129. package/src/meeting/util.ts +7 -4
  130. package/src/meeting/voicea-meeting.ts +1 -1
  131. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  132. package/src/meeting-info/meeting-info-v2.ts +7 -2
  133. package/src/meetings/ai-docs/meetings-spec.md +296 -0
  134. package/src/meetings/index.ts +59 -23
  135. package/src/member/ai-docs/member-spec.md +196 -0
  136. package/src/members/ai-docs/members-spec.md +256 -0
  137. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  138. package/src/multistream/ai-docs/multistream-spec.md +295 -0
  139. package/src/multistream/remoteMediaManager.ts +23 -1
  140. package/src/multistream/sendSlotManager.ts +15 -1
  141. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  142. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  143. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  144. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  145. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  146. package/src/roap/ai-docs/roap-spec.md +241 -0
  147. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  148. package/src/webinar/index.ts +168 -188
  149. package/test/unit/spec/annotation/index.ts +214 -182
  150. package/test/unit/spec/breakouts/index.ts +145 -13
  151. package/test/unit/spec/hashTree/hashTreeParser.ts +212 -1
  152. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +81 -99
  153. package/test/unit/spec/interceptors/locusRetry.ts +29 -1
  154. package/test/unit/spec/interpretation/index.ts +93 -0
  155. package/test/unit/spec/locus-info/index.js +397 -0
  156. package/test/unit/spec/media/MediaConnectionAwaiter.ts +426 -19
  157. package/test/unit/spec/media/properties.ts +3 -3
  158. package/test/unit/spec/meeting/index.js +1219 -723
  159. package/test/unit/spec/meeting/utils.js +52 -18
  160. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  161. package/test/unit/spec/meeting-info/meetinginfov2.js +69 -1
  162. package/test/unit/spec/meetings/index.js +145 -43
  163. package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
  164. package/test/unit/spec/multistream/sendSlotManager.ts +30 -2
  165. package/test/unit/spec/webinar/index.ts +886 -718
@@ -12,6 +12,7 @@ import * as BrowserDetectionModule from '@webex/plugin-meetings/src/common/brows
12
12
  import PasswordError from '@webex/plugin-meetings/src/common/errors/password-error';
13
13
  import CaptchaError from '@webex/plugin-meetings/src/common/errors/captcha-error';
14
14
  import {ServerRoles} from '@webex/plugin-meetings/src/member/types';
15
+ import {WebexHttpError} from '@webex/webex-core';
15
16
 
16
17
  describe('plugin-meetings', () => {
17
18
  let webex;
@@ -75,7 +76,7 @@ describe('plugin-meetings', () => {
75
76
  });
76
77
 
77
78
  describe('#cleanup', () => {
78
- it('do clean up on meeting object with LLM enabled', async () => {
79
+ it('cleans up an LLM-enabled meeting while preserving Voicea by default', async () => {
79
80
  meeting.config = {enableAutomaticLLM: true};
80
81
  await MeetingUtil.cleanUp(meeting);
81
82
  assert.calledOnce(meeting.cleanupLocalStreams);
@@ -87,10 +88,14 @@ describe('plugin-meetings', () => {
87
88
  assert.calledOnce(meeting.unsetPeerConnections);
88
89
  assert.calledOnce(meeting.reconnectionManager.cleanUp);
89
90
  assert.calledOnce(meeting.stopKeepAlive);
90
- assert.calledOnceWithExactly(meeting.cleanupLLMConneciton, {throwOnError: false});
91
+ assert.calledOnceWithExactly(meeting.cleanupLLMConneciton, {
92
+ throwOnError: false,
93
+ preserveVoiceaChannel: true,
94
+ });
91
95
  assert.calledOnce(meeting.breakouts.cleanUp);
92
96
  assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
93
- assert.calledOnce(meeting.locusInfo.cleanUp);
97
+ // locusInfo.cleanUp (hash tree parser teardown) is deferred to Meetings#destroy
98
+ assert.notCalled(meeting.locusInfo.cleanUp);
94
99
  assert.calledOnce(webex.internal.device.meetingEnded);
95
100
  assert.calledOnceWithExactly(
96
101
  meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
@@ -98,6 +103,17 @@ describe('plugin-meetings', () => {
98
103
  );
99
104
  });
100
105
 
106
+ it('cleans up an LLM-enabled meeting without preserving Voicea when requested', async () => {
107
+ meeting.config = {enableAutomaticLLM: true};
108
+
109
+ await MeetingUtil.cleanUp(meeting, {preserveVoiceaChannel: false});
110
+
111
+ assert.calledOnceWithExactly(meeting.cleanupLLMConneciton, {
112
+ throwOnError: false,
113
+ preserveVoiceaChannel: false,
114
+ });
115
+ });
116
+
101
117
  it('do clean up on meeting object with LLM disabled', async () => {
102
118
  meeting.config = {enableAutomaticLLM: false};
103
119
  await MeetingUtil.cleanUp(meeting);
@@ -112,7 +128,8 @@ describe('plugin-meetings', () => {
112
128
  assert.notCalled(meeting.cleanupLLMConneciton);
113
129
  assert.calledOnce(meeting.breakouts.cleanUp);
114
130
  assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
115
- assert.calledOnce(meeting.locusInfo.cleanUp);
131
+ // locusInfo.cleanUp (hash tree parser teardown) is deferred to Meetings#destroy
132
+ assert.notCalled(meeting.locusInfo.cleanUp);
116
133
  assert.calledOnce(webex.internal.device.meetingEnded);
117
134
  assert.calledOnceWithExactly(
118
135
  meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
@@ -133,7 +150,8 @@ describe('plugin-meetings', () => {
133
150
  assert.notCalled(meeting.cleanupLLMConneciton);
134
151
  assert.calledOnce(meeting.breakouts.cleanUp);
135
152
  assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
136
- assert.calledOnce(meeting.locusInfo.cleanUp);
153
+ // locusInfo.cleanUp (hash tree parser teardown) is deferred to Meetings#destroy
154
+ assert.notCalled(meeting.locusInfo.cleanUp);
137
155
  assert.calledOnce(webex.internal.device.meetingEnded);
138
156
  assert.calledOnceWithExactly(
139
157
  meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
@@ -762,7 +780,15 @@ describe('plugin-meetings', () => {
762
780
  });
763
781
 
764
782
  it('should post client event with error when join fails', async () => {
765
- const joinError = new Error('Join failed');
783
+ const joinError = new WebexHttpError.TooManyRequests({
784
+ statusCode: 429,
785
+ body: {message: 'Locus rate limited'},
786
+ options: {
787
+ method: 'POST',
788
+ headers: {},
789
+ uri: 'https://locus.example.com/locus/api/v1/loci/call',
790
+ },
791
+ });
766
792
  meeting.meetingRequest.joinMeeting.rejects(joinError);
767
793
  meeting.meetingInfo = {meetingLookupUrl: 'test-lookup-url'};
768
794
 
@@ -1412,12 +1438,16 @@ describe('plugin-meetings', () => {
1412
1438
  MeetingUtil.parseInterpretationInfo(meeting, meetingInfo);
1413
1439
  assert.calledWith(meeting.simultaneousInterpretation.updateMeetingSIEnabled, true, true);
1414
1440
  assert.calledWith(meeting.simultaneousInterpretation.updateHostSIEnabled, true);
1415
- assert.calledWith(meeting.simultaneousInterpretation.updateInterpretation, {
1416
- siLanguages: [
1417
- {languageName: 'en', languageCode: 1},
1418
- {languageName: 'es', languageCode: 2},
1419
- ],
1420
- });
1441
+ assert.calledWith(
1442
+ meeting.simultaneousInterpretation.updateInterpretation,
1443
+ {
1444
+ siLanguages: [
1445
+ {languageName: 'en', languageCode: 1},
1446
+ {languageName: 'es', languageCode: 2},
1447
+ ],
1448
+ },
1449
+ {preserveSiEnabled: true}
1450
+ );
1421
1451
  });
1422
1452
 
1423
1453
  it('should update simultaneous interpretation settings with host SI disabled', () => {
@@ -1426,12 +1456,16 @@ describe('plugin-meetings', () => {
1426
1456
  MeetingUtil.parseInterpretationInfo(meeting, meetingInfo);
1427
1457
  assert.calledWith(meeting.simultaneousInterpretation.updateMeetingSIEnabled, true, false);
1428
1458
  assert.calledWith(meeting.simultaneousInterpretation.updateHostSIEnabled, false);
1429
- assert.calledWith(meeting.simultaneousInterpretation.updateInterpretation, {
1430
- siLanguages: [
1431
- {languageName: 'en', languageCode: 1},
1432
- {languageName: 'es', languageCode: 2},
1433
- ],
1434
- });
1459
+ assert.calledWith(
1460
+ meeting.simultaneousInterpretation.updateInterpretation,
1461
+ {
1462
+ siLanguages: [
1463
+ {languageName: 'en', languageCode: 1},
1464
+ {languageName: 'es', languageCode: 2},
1465
+ ],
1466
+ },
1467
+ {preserveSiEnabled: true}
1468
+ );
1435
1469
  });
1436
1470
  it('should update simultaneous interpretation settings with SI disabled', () => {
1437
1471
  meetingInfo.turnOnSimultaneousInterpretation = false;
@@ -150,6 +150,90 @@ describe('plugin-meetings', () => {
150
150
  });
151
151
 
152
152
  describe('processNewCaptions', () => {
153
+ const processCaptions = () => processNewCaptions({
154
+ data: fakeVoiceaPayload,
155
+ meeting: fakeMeeting
156
+ });
157
+
158
+ it('should process a final-only caption without an existing interim caption', () => {
159
+ const transcriptData = fakeMeeting.transcription;
160
+ const transcriptId = fakeVoiceaPayload.transcriptId;
161
+
162
+ delete transcriptData.interimCaptions[transcriptId];
163
+
164
+ assert.doesNotThrow(processCaptions);
165
+
166
+ const finalCaption = transcriptData.captions.find(caption => caption.id === transcriptId);
167
+
168
+ assert.exists(finalCaption);
169
+ assert.deepEqual(transcriptData.interimCaptions[transcriptId], []);
170
+ });
171
+
172
+ it('should process an interim caption received after a final caption', () => {
173
+ const transcriptData = fakeMeeting.transcription;
174
+ const transcriptId = fakeVoiceaPayload.transcriptId;
175
+
176
+ delete transcriptData.interimCaptions[transcriptId];
177
+
178
+ assert.doesNotThrow(processCaptions);
179
+
180
+ fakeVoiceaPayload.isFinal = false;
181
+
182
+ assert.doesNotThrow(processCaptions);
183
+
184
+ const speakerId = fakeMeeting.members.membersCollection.members[fakeMemberId].participant.person.id;
185
+ const interimId = `${transcriptId}_${speakerId}`;
186
+
187
+ assert.exists(transcriptData.captions.find(caption => caption.id === transcriptId));
188
+ assert.exists(transcriptData.captions.find(caption => caption.id === interimId));
189
+ assert.deepEqual(transcriptData.interimCaptions[transcriptId], [interimId]);
190
+ });
191
+
192
+ it('should process repeated final captions without throwing', () => {
193
+ const transcriptData = fakeMeeting.transcription;
194
+ const transcriptId = fakeVoiceaPayload.transcriptId;
195
+
196
+ delete transcriptData.interimCaptions[transcriptId];
197
+
198
+ assert.doesNotThrow(() => {
199
+ processCaptions();
200
+ processCaptions();
201
+ });
202
+
203
+ assert.exists(transcriptData.captions.find(caption => caption.id === transcriptId));
204
+ });
205
+
206
+ it('should process a final payload containing transcript entries for multiple CSIs without throwing', () => {
207
+ const transcriptData = fakeMeeting.transcription;
208
+ const transcriptId = fakeVoiceaPayload.transcriptId;
209
+ const firstCsi = 1234867712;
210
+ const secondCsi = 1234867713;
211
+ const secondCaptionText = 'Caption from a second CSI';
212
+
213
+ fakeVoiceaPayload.transcripts = [
214
+ {
215
+ ...fakeVoiceaPayload.transcripts[0],
216
+ csis: [firstCsi]
217
+ },
218
+ {
219
+ text: secondCaptionText,
220
+ csis: [secondCsi],
221
+ transcript_language_code: 'en'
222
+ }
223
+ ];
224
+
225
+ assert.doesNotThrow(processCaptions);
226
+
227
+ const finalCaptionTexts = transcriptData.captions
228
+ .filter(caption => caption.id === transcriptId)
229
+ .map(caption => caption.text);
230
+
231
+ assert.deepEqual(finalCaptionTexts, [
232
+ fakeVoiceaPayload.transcripts[0].text,
233
+ secondCaptionText
234
+ ]);
235
+ });
236
+
153
237
  it('should process new final captions correctly', () => {
154
238
  let transcriptData = fakeMeeting.transcription;
155
239
  let transcriptId = fakeVoiceaPayload.transcriptId;
@@ -254,4 +338,4 @@ describe('plugin-meetings', () => {
254
338
  });
255
339
  });
256
340
  });
257
- });
341
+ });
@@ -815,8 +815,14 @@ describe('plugin-meetings', () => {
815
815
  {meetingId: '123', sendCAevents: false, shouldSendCAevents: false},
816
816
  {shouldSendCAevents: false},
817
817
  {meetingId: '123', sendCAevents: true, shouldSendCAevents: true, confIdStr: '999'},
818
+ {
819
+ meetingId: '123',
820
+ sendCAevents: true,
821
+ shouldSendCAevents: true,
822
+ locusClusterUrl: 'locus-k.wbx2.com',
823
+ },
818
824
  ],
819
- ({meetingId, sendCAevents, shouldSendCAevents, confIdStr}) => {
825
+ ({meetingId, sendCAevents, shouldSendCAevents, confIdStr, locusClusterUrl}) => {
820
826
  it('should send CA metric if meetingId is provided and send CA events is authorized', async () => {
821
827
  const requestResponse = {
822
828
  statusCode: 200,
@@ -825,6 +831,9 @@ describe('plugin-meetings', () => {
825
831
  if (confIdStr) {
826
832
  requestResponse.body.confIdStr = confIdStr;
827
833
  }
834
+ if (locusClusterUrl) {
835
+ requestResponse.body.locusClusterUrl = locusClusterUrl;
836
+ }
828
837
  const extraParams = {mtid: 'm9fe0afd8c435e892afcce9ea25b97046', joinTXId: 'TSmrX61wNF'};
829
838
 
830
839
  webex.request.resolves(requestResponse);
@@ -890,6 +899,7 @@ describe('plugin-meetings', () => {
890
899
  webexConferenceIdStr: confIdStr
891
900
  ? requestResponse.body?.confIdStr
892
901
  : requestResponse.body?.confID,
902
+ locusCluster: locusClusterUrl,
893
903
  },
894
904
  });
895
905
  } else {
@@ -900,6 +910,63 @@ describe('plugin-meetings', () => {
900
910
  }
901
911
  );
902
912
 
913
+ forEach(
914
+ [
915
+ {
916
+ meetingId: 'meeting-id',
917
+ sendCAevents: true,
918
+ correlationId: 'correlation-id',
919
+ shouldSendCorrelationId: true,
920
+ condition: 'when CA events are enabled for the meeting',
921
+ },
922
+ {
923
+ sendCAevents: true,
924
+ correlationId: 'correlation-id',
925
+ shouldSendCorrelationId: false,
926
+ condition: 'without a meetingId',
927
+ },
928
+ {
929
+ meetingId: 'meeting-id',
930
+ sendCAevents: false,
931
+ correlationId: 'correlation-id',
932
+ shouldSendCorrelationId: false,
933
+ condition: 'when CA events are disabled',
934
+ },
935
+ {
936
+ meetingId: 'meeting-id',
937
+ sendCAevents: true,
938
+ shouldSendCorrelationId: false,
939
+ condition: 'without a correlationId',
940
+ },
941
+ ],
942
+ ({meetingId, sendCAevents, correlationId, shouldSendCorrelationId, condition}) => {
943
+ it(`should ${
944
+ shouldSendCorrelationId ? '' : 'not '
945
+ }send the correlationId header ${condition}`, async () => {
946
+ webex.request.resolves({statusCode: 200, body: {meetingKey: '1234323'}});
947
+
948
+ await meetingInfo.fetchMeetingInfo(
949
+ '1234323',
950
+ DESTINATION_TYPE.MEETING_ID,
951
+ null,
952
+ null,
953
+ null,
954
+ null,
955
+ undefined,
956
+ {meetingId, sendCAevents, correlationId}
957
+ );
958
+
959
+ const requestOptions = webex.request.firstCall.args[0];
960
+
961
+ if (shouldSendCorrelationId) {
962
+ assert.deepEqual(requestOptions.headers, {correlationId});
963
+ } else {
964
+ assert.notProperty(requestOptions, 'headers');
965
+ }
966
+ });
967
+ }
968
+ );
969
+
903
970
  it('should send CA metric if meetingId is provided and send CA events is authorized', async () => {
904
971
  const requestResponse = {
905
972
  statusCode: 200,
@@ -966,6 +1033,7 @@ describe('plugin-meetings', () => {
966
1033
  meetingId: 'meetingId',
967
1034
  globalMeetingId: requestResponse.body?.meetingId,
968
1035
  webexConferenceIdStr: requestResponse.body?.confID,
1036
+ locusCluster: undefined,
969
1037
  },
970
1038
  });
971
1039
  });