@webex/plugin-meetings 3.11.0-webex-services-ready.1 → 3.12.0-auth-prejoin-fetch.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.
- package/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +197 -0
- package/dist/aiEnableRequest/index.js.map +1 -0
- package/dist/aiEnableRequest/utils.js +36 -0
- package/dist/aiEnableRequest/utils.js.map +1 -0
- package/dist/annotation/index.js +16 -7
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +99 -4
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +49 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +8 -3
- package/dist/config.js.map +1 -1
- package/dist/constants.js +60 -11
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +67 -29
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +16 -2
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTree.js +18 -0
- package/dist/hashTree/hashTree.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1655 -538
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/types.js +4 -2
- package/dist/hashTree/types.js.map +1 -1
- package/dist/hashTree/utils.js +52 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/constant.js +12 -0
- package/dist/interceptors/constant.js.map +1 -0
- package/dist/interceptors/dataChannelAuthToken.js +350 -0
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
- package/dist/interceptors/index.js +7 -0
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interceptors/utils.js +27 -0
- package/dist/interceptors/utils.js.map +1 -0
- package/dist/interpretation/index.js +11 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +9 -4
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +914 -212
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/selfUtils.js +1 -0
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js +19 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +72 -3
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +8 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +8 -7
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +11 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2347 -1096
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +55 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +168 -5
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +100 -38
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +466 -174
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +116 -18
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +20 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +40 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +12 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +64 -68
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +11 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +116 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +121 -83
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +0 -1
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/aiEnableRequest/index.d.ts +5 -0
- package/dist/types/aiEnableRequest/utils.d.ts +2 -0
- package/dist/types/common/errors/webex-errors.d.ts +32 -2
- package/dist/types/config.d.ts +6 -2
- package/dist/types/constants.d.ts +35 -1
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +3 -0
- package/dist/types/hashTree/hashTree.d.ts +7 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +315 -30
- package/dist/types/hashTree/types.d.ts +3 -0
- package/dist/types/hashTree/utils.d.ts +24 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/interceptors/constant.d.ts +5 -0
- package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
- package/dist/types/interceptors/index.d.ts +2 -1
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interceptors/utils.d.ts +1 -0
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +126 -15
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +28 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +20 -2
- package/dist/types/media/properties.d.ts +8 -3
- package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
- package/dist/types/meeting/index.d.ts +253 -16
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +17 -1
- package/dist/types/meeting/request.type.d.ts +5 -0
- package/dist/types/meeting/util.d.ts +40 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +25 -1
- package/dist/types/meetings/index.d.ts +54 -21
- package/dist/types/meetings/meetings.types.d.ts +30 -1
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +2 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +14 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +11 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +20 -26
- package/dist/types/multistream/sendSlotManager.d.ts +23 -1
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +10 -3
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +4 -0
- package/dist/types/webinar/utils.d.ts +6 -0
- package/dist/webinar/index.js +585 -164
- package/dist/webinar/index.js.map +1 -1
- package/dist/webinar/utils.js +25 -0
- package/dist/webinar/utils.js.map +1 -0
- package/package.json +24 -23
- package/src/aiEnableRequest/README.md +84 -0
- package/src/aiEnableRequest/index.ts +186 -0
- package/src/aiEnableRequest/utils.ts +25 -0
- package/src/annotation/index.ts +32 -10
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +122 -2
- package/src/common/errors/webex-errors.ts +50 -3
- package/src/config.ts +6 -2
- package/src/constants.ts +49 -3
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +87 -28
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/constants.ts +17 -0
- package/src/hashTree/hashTree.ts +17 -0
- package/src/hashTree/hashTreeParser.ts +1482 -361
- package/src/hashTree/types.ts +4 -0
- package/src/hashTree/utils.ts +45 -0
- package/src/index.ts +14 -1
- package/src/interceptors/constant.ts +6 -0
- package/src/interceptors/dataChannelAuthToken.ts +246 -0
- package/src/interceptors/index.ts +2 -1
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interceptors/utils.ts +16 -0
- package/src/interpretation/index.ts +29 -11
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/controlsUtils.ts +14 -1
- package/src/locus-info/index.ts +976 -203
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/selfUtils.ts +1 -0
- package/src/locus-info/types.ts +33 -1
- package/src/media/MediaConnectionAwaiter.ts +62 -5
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +11 -4
- package/src/meeting/in-meeting-actions.ts +20 -0
- package/src/meeting/index.ts +1300 -180
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +53 -0
- package/src/meeting/request.type.ts +6 -0
- package/src/meeting/util.ts +207 -7
- package/src/meeting-info/meeting-info-v2.ts +83 -21
- package/src/meetings/index.ts +402 -121
- package/src/meetings/meetings.types.ts +36 -1
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +117 -4
- package/src/member/index.ts +20 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +41 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/constants.ts +12 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +117 -76
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/multistream/remoteMediaManager.ts +13 -0
- package/src/multistream/sendSlotManager.ts +97 -3
- package/src/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +47 -16
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/reactions.type.ts +4 -0
- package/src/reconnection-manager/index.ts +0 -1
- package/src/recording-controller/index.ts +1 -2
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/index.ts +448 -11
- package/src/webinar/utils.ts +16 -0
- package/test/unit/spec/aiEnableRequest/index.ts +1067 -0
- package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
- package/test/unit/spec/annotation/index.ts +70 -8
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +223 -3
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +244 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTree.ts +66 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +4528 -171
- package/test/unit/spec/hashTree/utils.ts +125 -1
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +406 -0
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interceptors/utils.ts +75 -0
- package/test/unit/spec/interpretation/index.ts +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +200 -56
- package/test/unit/spec/locus-info/index.js +1861 -149
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +96 -1
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +35 -26
- package/test/unit/spec/meeting/in-meeting-actions.ts +12 -2
- package/test/unit/spec/meeting/index.js +3691 -366
- package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +82 -0
- package/test/unit/spec/meeting/utils.js +595 -27
- package/test/unit/spec/meeting-info/meetinginfov2.js +286 -10
- package/test/unit/spec/meetings/index.js +1400 -78
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +402 -51
- package/test/unit/spec/member/index.js +35 -4
- package/test/unit/spec/member/util.js +154 -27
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +503 -122
- package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
- package/test/unit/spec/reachability/index.ts +128 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/reconnection-manager/index.js +4 -8
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +837 -39
- package/test/unit/spec/webinar/utils.ts +39 -0
|
@@ -486,6 +486,216 @@ describe('plugin-meetings', () => {
|
|
|
486
486
|
MeetingInfoUtil.getDirectMeetingInfoURI.restore();
|
|
487
487
|
});
|
|
488
488
|
|
|
489
|
+
it('should fetch and normalize preJoin meeting info with pre-meeting CA identifiers', async () => {
|
|
490
|
+
const correlationId = 'correlation-id';
|
|
491
|
+
const sessionCorrelationId = 'session-correlation-id';
|
|
492
|
+
const meetingInfoBody = {
|
|
493
|
+
meetingKey: '1234323',
|
|
494
|
+
meetingId: 'global-meeting-id',
|
|
495
|
+
confID: 'conference-id',
|
|
496
|
+
};
|
|
497
|
+
const requestResponse = {
|
|
498
|
+
statusCode: 200,
|
|
499
|
+
url: 'https://example.webex.com/wbxappapi/v1/preJoin',
|
|
500
|
+
body: {meetingInfo: meetingInfoBody, guestJWT: 'not-consumed-by-meetings'},
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
webex.request.resolves(requestResponse);
|
|
504
|
+
|
|
505
|
+
const preJoinMeetingInfo = MeetingInfo.createPreJoinProvider(webex, {
|
|
506
|
+
correlationId,
|
|
507
|
+
sessionCorrelationId,
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
const result = await preJoinMeetingInfo.fetchMeetingInfo(
|
|
511
|
+
'1234323',
|
|
512
|
+
DESTINATION_TYPE.MEETING_ID,
|
|
513
|
+
null,
|
|
514
|
+
null,
|
|
515
|
+
null,
|
|
516
|
+
null,
|
|
517
|
+
{correlationId, joinTXId: 'join-transaction-id'},
|
|
518
|
+
{sendCAevents: true}
|
|
519
|
+
);
|
|
520
|
+
|
|
521
|
+
assert.calledWith(webex.request, {
|
|
522
|
+
method: 'POST',
|
|
523
|
+
service: WBXAPPAPI_SERVICE,
|
|
524
|
+
resource: 'preJoin',
|
|
525
|
+
headers: {correlationId},
|
|
526
|
+
body: {
|
|
527
|
+
supportHostKey: true,
|
|
528
|
+
supportCountryList: true,
|
|
529
|
+
meetingKey: '1234323',
|
|
530
|
+
joinTXId: 'join-transaction-id',
|
|
531
|
+
disableWebRedirect: true,
|
|
532
|
+
},
|
|
533
|
+
});
|
|
534
|
+
assert.deepEqual(result, {...requestResponse, body: meetingInfoBody});
|
|
535
|
+
assert.deepEqual(webex.internal.newMetrics.submitClientEvent.firstCall.args[0], {
|
|
536
|
+
name: 'client.meetinginfo.request',
|
|
537
|
+
options: {
|
|
538
|
+
correlationId,
|
|
539
|
+
sessionCorrelationId,
|
|
540
|
+
meetingJoinPhase: 'pre-join',
|
|
541
|
+
},
|
|
542
|
+
});
|
|
543
|
+
assert.deepEqual(webex.internal.newMetrics.submitClientEvent.secondCall.args[0], {
|
|
544
|
+
name: 'client.meetinginfo.response',
|
|
545
|
+
payload: {
|
|
546
|
+
identifiers: {meetingLookupUrl: requestResponse.url},
|
|
547
|
+
},
|
|
548
|
+
options: {
|
|
549
|
+
correlationId,
|
|
550
|
+
sessionCorrelationId,
|
|
551
|
+
meetingJoinPhase: 'pre-join',
|
|
552
|
+
webexConferenceIdStr: meetingInfoBody.confID,
|
|
553
|
+
globalMeetingId: meetingInfoBody.meetingId,
|
|
554
|
+
},
|
|
555
|
+
});
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
it('should use the direct preJoin uri when the destination resolves to a Webex site', async () => {
|
|
559
|
+
const correlationId = 'correlation-id';
|
|
560
|
+
const body = {meetingKey: '1234323'};
|
|
561
|
+
const meetingInfoBody = {meetingKey: '1234323'};
|
|
562
|
+
|
|
563
|
+
sinon.stub(MeetingInfoUtil, 'getDestinationType').returns(
|
|
564
|
+
Promise.resolve({
|
|
565
|
+
type: DESTINATION_TYPE.SIP_URI,
|
|
566
|
+
destination: 'example@something.webex.com',
|
|
567
|
+
})
|
|
568
|
+
);
|
|
569
|
+
sinon.stub(MeetingInfoUtil, 'getRequestBody').returns(Promise.resolve(body));
|
|
570
|
+
sinon
|
|
571
|
+
.stub(MeetingInfoUtil, 'getDirectMeetingInfoURI')
|
|
572
|
+
.returns('https://something.webex.com/wbxappapi/v1/meetingInfo');
|
|
573
|
+
webex.request.resolves({statusCode: 200, body: {meetingInfo: meetingInfoBody}});
|
|
574
|
+
|
|
575
|
+
const preJoinMeetingInfo = MeetingInfo.createPreJoinProvider(webex, {correlationId});
|
|
576
|
+
|
|
577
|
+
const result = await preJoinMeetingInfo.fetchMeetingInfo(
|
|
578
|
+
'example@something.webex.com',
|
|
579
|
+
DESTINATION_TYPE.SIP_URI,
|
|
580
|
+
null,
|
|
581
|
+
null,
|
|
582
|
+
null,
|
|
583
|
+
null,
|
|
584
|
+
{}
|
|
585
|
+
);
|
|
586
|
+
|
|
587
|
+
assert.calledWith(webex.request, {
|
|
588
|
+
method: 'POST',
|
|
589
|
+
uri: 'https://something.webex.com/wbxappapi/v1/preJoin',
|
|
590
|
+
headers: {correlationId},
|
|
591
|
+
body,
|
|
592
|
+
});
|
|
593
|
+
assert.deepEqual(result.body, meetingInfoBody);
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
it('should keep using preJoin and its request context for subsequent provider requests', async () => {
|
|
597
|
+
const correlationId = 'correlation-id';
|
|
598
|
+
const meetingInfoBody = {meetingKey: '1234323'};
|
|
599
|
+
const preJoinProvider = MeetingInfo.createPreJoinProvider(webex, {correlationId});
|
|
600
|
+
|
|
601
|
+
webex.request.resolves({statusCode: 200, body: {meetingInfo: meetingInfoBody}});
|
|
602
|
+
|
|
603
|
+
await preJoinProvider.fetchMeetingInfo('1234323', DESTINATION_TYPE.MEETING_ID);
|
|
604
|
+
await preJoinProvider.fetchMeetingInfo('1234323', DESTINATION_TYPE.MEETING_ID, 'password');
|
|
605
|
+
|
|
606
|
+
assert.calledTwice(webex.request);
|
|
607
|
+
forEach(webex.request.args, ([requestOptions]) => {
|
|
608
|
+
assert.equal(requestOptions.resource, 'preJoin');
|
|
609
|
+
assert.deepEqual(requestOptions.headers, {correlationId});
|
|
610
|
+
});
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
it('should preserve preJoin meeting info on password errors', async () => {
|
|
614
|
+
const preJoinMeetingInfo = {meetingKey: '1234323'};
|
|
615
|
+
const preJoinProvider = MeetingInfo.createPreJoinProvider(webex, {
|
|
616
|
+
correlationId: 'correlation-id',
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
webex.request.rejects({
|
|
620
|
+
statusCode: 403,
|
|
621
|
+
body: {code: 403000, meetingInfo: preJoinMeetingInfo},
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
try {
|
|
625
|
+
await preJoinProvider.fetchMeetingInfo(
|
|
626
|
+
'1234323',
|
|
627
|
+
DESTINATION_TYPE.MEETING_ID,
|
|
628
|
+
null,
|
|
629
|
+
null,
|
|
630
|
+
null,
|
|
631
|
+
null,
|
|
632
|
+
{}
|
|
633
|
+
);
|
|
634
|
+
assert.fail('fetchMeetingInfo should have thrown, but has not done that');
|
|
635
|
+
} catch (error) {
|
|
636
|
+
assert.instanceOf(error, MeetingInfoV2PasswordError);
|
|
637
|
+
assert.deepEqual(error.meetingInfo, preJoinMeetingInfo);
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
forEach(
|
|
642
|
+
[
|
|
643
|
+
{errorCode: 403049, ErrorType: MeetingInfoV2PolicyError},
|
|
644
|
+
{errorCode: 403022, ErrorType: MeetingInfoV2JoinWebinarError},
|
|
645
|
+
{errorCode: 403003, ErrorType: MeetingInfoV2JoinForbiddenError},
|
|
646
|
+
],
|
|
647
|
+
({errorCode, ErrorType}) => {
|
|
648
|
+
it(`should preserve preJoin meeting info for semantic error ${errorCode}`, async () => {
|
|
649
|
+
const preJoinMeetingInfo = {meetingKey: '1234323'};
|
|
650
|
+
const preJoinProvider = MeetingInfo.createPreJoinProvider(webex, {
|
|
651
|
+
correlationId: 'correlation-id',
|
|
652
|
+
});
|
|
653
|
+
|
|
654
|
+
webex.request.rejects({
|
|
655
|
+
statusCode: 403,
|
|
656
|
+
body: {code: errorCode, message: 'semantic error', meetingInfo: preJoinMeetingInfo},
|
|
657
|
+
});
|
|
658
|
+
|
|
659
|
+
try {
|
|
660
|
+
await preJoinProvider.fetchMeetingInfo(
|
|
661
|
+
'1234323',
|
|
662
|
+
DESTINATION_TYPE.MEETING_ID,
|
|
663
|
+
null,
|
|
664
|
+
null,
|
|
665
|
+
null,
|
|
666
|
+
null,
|
|
667
|
+
{}
|
|
668
|
+
);
|
|
669
|
+
assert.fail('fetchMeetingInfo should have thrown, but has not done that');
|
|
670
|
+
} catch (error) {
|
|
671
|
+
assert.instanceOf(error, ErrorType);
|
|
672
|
+
assert.deepEqual(error.meetingInfo, preJoinMeetingInfo);
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
);
|
|
677
|
+
|
|
678
|
+
it('should reject a preJoin success response without meetingInfo', async () => {
|
|
679
|
+
webex.request.resolves({statusCode: 200, body: {}});
|
|
680
|
+
|
|
681
|
+
const preJoinProvider = MeetingInfo.createPreJoinProvider(webex, {
|
|
682
|
+
correlationId: 'correlation-id',
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
await assert.isRejected(
|
|
686
|
+
preJoinProvider.fetchMeetingInfo(
|
|
687
|
+
'1234323',
|
|
688
|
+
DESTINATION_TYPE.MEETING_ID,
|
|
689
|
+
null,
|
|
690
|
+
null,
|
|
691
|
+
null,
|
|
692
|
+
null,
|
|
693
|
+
{}
|
|
694
|
+
),
|
|
695
|
+
'PreJoin response did not include meetingInfo'
|
|
696
|
+
);
|
|
697
|
+
});
|
|
698
|
+
|
|
489
699
|
it('should fetch meeting info with provided password and captcha code', async () => {
|
|
490
700
|
const requestResponse = {statusCode: 200, body: {meetingKey: '1234323'}};
|
|
491
701
|
|
|
@@ -654,7 +864,7 @@ describe('plugin-meetings', () => {
|
|
|
654
864
|
meetingInfo.createAdhocSpaceMeeting,
|
|
655
865
|
'conversationUrl',
|
|
656
866
|
installedOrgID,
|
|
657
|
-
null
|
|
867
|
+
null
|
|
658
868
|
);
|
|
659
869
|
assert.notCalled(webex.request);
|
|
660
870
|
meetingInfo.createAdhocSpaceMeeting.restore();
|
|
@@ -900,6 +1110,63 @@ describe('plugin-meetings', () => {
|
|
|
900
1110
|
}
|
|
901
1111
|
);
|
|
902
1112
|
|
|
1113
|
+
forEach(
|
|
1114
|
+
[
|
|
1115
|
+
{
|
|
1116
|
+
meetingId: 'meeting-id',
|
|
1117
|
+
sendCAevents: true,
|
|
1118
|
+
correlationId: 'correlation-id',
|
|
1119
|
+
shouldSendCorrelationId: true,
|
|
1120
|
+
condition: 'when CA events are enabled for the meeting',
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
sendCAevents: true,
|
|
1124
|
+
correlationId: 'correlation-id',
|
|
1125
|
+
shouldSendCorrelationId: false,
|
|
1126
|
+
condition: 'without a meetingId',
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
meetingId: 'meeting-id',
|
|
1130
|
+
sendCAevents: false,
|
|
1131
|
+
correlationId: 'correlation-id',
|
|
1132
|
+
shouldSendCorrelationId: false,
|
|
1133
|
+
condition: 'when CA events are disabled',
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
meetingId: 'meeting-id',
|
|
1137
|
+
sendCAevents: true,
|
|
1138
|
+
shouldSendCorrelationId: false,
|
|
1139
|
+
condition: 'without a correlationId',
|
|
1140
|
+
},
|
|
1141
|
+
],
|
|
1142
|
+
({meetingId, sendCAevents, correlationId, shouldSendCorrelationId, condition}) => {
|
|
1143
|
+
it(`should ${
|
|
1144
|
+
shouldSendCorrelationId ? '' : 'not '
|
|
1145
|
+
}send the correlationId header ${condition}`, async () => {
|
|
1146
|
+
webex.request.resolves({statusCode: 200, body: {meetingKey: '1234323'}});
|
|
1147
|
+
|
|
1148
|
+
await meetingInfo.fetchMeetingInfo(
|
|
1149
|
+
'1234323',
|
|
1150
|
+
DESTINATION_TYPE.MEETING_ID,
|
|
1151
|
+
null,
|
|
1152
|
+
null,
|
|
1153
|
+
null,
|
|
1154
|
+
null,
|
|
1155
|
+
undefined,
|
|
1156
|
+
{meetingId, sendCAevents, correlationId}
|
|
1157
|
+
);
|
|
1158
|
+
|
|
1159
|
+
const requestOptions = webex.request.firstCall.args[0];
|
|
1160
|
+
|
|
1161
|
+
if (shouldSendCorrelationId) {
|
|
1162
|
+
assert.deepEqual(requestOptions.headers, {correlationId});
|
|
1163
|
+
} else {
|
|
1164
|
+
assert.notProperty(requestOptions, 'headers');
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
);
|
|
1169
|
+
|
|
903
1170
|
it('should send CA metric if meetingId is provided and send CA events is authorized', async () => {
|
|
904
1171
|
const requestResponse = {
|
|
905
1172
|
statusCode: 200,
|
|
@@ -1068,13 +1335,16 @@ describe('plugin-meetings', () => {
|
|
|
1068
1335
|
await runTest(423006, true);
|
|
1069
1336
|
});
|
|
1070
1337
|
|
|
1338
|
+
it('should throw MeetingInfoV2CaptchaError for 423 response (wbxappapi code 423008)', async () => {
|
|
1339
|
+
await runTest(423008, true);
|
|
1340
|
+
});
|
|
1341
|
+
|
|
1071
1342
|
it('should throw MeetingInfoV2CaptchaError for 423 response (wbxappapi code 423001)', async () => {
|
|
1072
1343
|
await runTest(423001, false);
|
|
1073
1344
|
});
|
|
1074
1345
|
});
|
|
1075
1346
|
|
|
1076
1347
|
describe('should stop call fetchMeetingInfo if siteFullUrl is empty for 404 response', () => {
|
|
1077
|
-
|
|
1078
1348
|
const runTest = async (wbxAppApiCode, expectedIsPasswordRequired) => {
|
|
1079
1349
|
webex.request = sinon.stub().rejects({
|
|
1080
1350
|
statusCode: 404,
|
|
@@ -1082,12 +1352,11 @@ describe('plugin-meetings', () => {
|
|
|
1082
1352
|
code: wbxAppApiCode,
|
|
1083
1353
|
message: 'Alternate Meeting Server',
|
|
1084
1354
|
data: {
|
|
1085
|
-
|
|
1086
|
-
}
|
|
1355
|
+
siteFullUrl: '',
|
|
1356
|
+
},
|
|
1087
1357
|
},
|
|
1088
1358
|
});
|
|
1089
1359
|
|
|
1090
|
-
|
|
1091
1360
|
try {
|
|
1092
1361
|
await meetingInfo.fetchMeetingInfo('1234323', DESTINATION_TYPE.MEETING_ID, 'abc', {
|
|
1093
1362
|
id: '999',
|
|
@@ -1097,7 +1366,7 @@ describe('plugin-meetings', () => {
|
|
|
1097
1366
|
} catch (err) {
|
|
1098
1367
|
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
1099
1368
|
assert.deepEqual(err.body.data, {
|
|
1100
|
-
siteFullUrl: ''
|
|
1369
|
+
siteFullUrl: '',
|
|
1101
1370
|
});
|
|
1102
1371
|
}
|
|
1103
1372
|
};
|
|
@@ -1107,7 +1376,6 @@ describe('plugin-meetings', () => {
|
|
|
1107
1376
|
});
|
|
1108
1377
|
});
|
|
1109
1378
|
|
|
1110
|
-
|
|
1111
1379
|
it('should throw an error and not fetch with an "empty" body', async () => {
|
|
1112
1380
|
const body = {supportHostKey: 'foo', supportCountryList: 'bar'};
|
|
1113
1381
|
const requestResponse = {statusCode: 200, body};
|
|
@@ -1176,7 +1444,11 @@ describe('plugin-meetings', () => {
|
|
|
1176
1444
|
body: conversation,
|
|
1177
1445
|
});
|
|
1178
1446
|
|
|
1179
|
-
const result = await meetingInfo.createAdhocSpaceMeeting(
|
|
1447
|
+
const result = await meetingInfo.createAdhocSpaceMeeting(
|
|
1448
|
+
conversationUrl,
|
|
1449
|
+
installedOrgID,
|
|
1450
|
+
classificationId
|
|
1451
|
+
);
|
|
1180
1452
|
|
|
1181
1453
|
assert.calledWith(webex.request, {
|
|
1182
1454
|
uri: conversationUrl,
|
|
@@ -1210,7 +1482,11 @@ describe('plugin-meetings', () => {
|
|
|
1210
1482
|
webex.request = sinon.stub().resolves({
|
|
1211
1483
|
body: conversation,
|
|
1212
1484
|
});
|
|
1213
|
-
await meetingInfo.createAdhocSpaceMeeting(
|
|
1485
|
+
await meetingInfo.createAdhocSpaceMeeting(
|
|
1486
|
+
conversationUrl,
|
|
1487
|
+
installedOrgID,
|
|
1488
|
+
classificationId
|
|
1489
|
+
);
|
|
1214
1490
|
|
|
1215
1491
|
assert.calledWith(webex.request, {
|
|
1216
1492
|
uri: conversationUrl,
|
|
@@ -1282,7 +1558,7 @@ describe('plugin-meetings', () => {
|
|
|
1282
1558
|
{errorCode: 423007},
|
|
1283
1559
|
{errorCode: 403026},
|
|
1284
1560
|
{errorCode: 403037},
|
|
1285
|
-
{errorCode:
|
|
1561
|
+
{errorCode: 403106},
|
|
1286
1562
|
],
|
|
1287
1563
|
({errorCode}) => {
|
|
1288
1564
|
it(`should throw a MeetingInfoV2JoinWebinarError for error code ${errorCode}`, async () => {
|