@webex/plugin-meetings 3.11.0 → 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 +2357 -1094
- 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 +139 -93
- 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 +1314 -178
- 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 +56 -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 +3766 -417
- 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 +151 -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
|
@@ -10,6 +10,17 @@ import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
|
10
10
|
|
|
11
11
|
import MeetingInfoUtil from './utilv2';
|
|
12
12
|
|
|
13
|
+
type MeetingInfoApi = 'meetingInfo' | 'preJoin';
|
|
14
|
+
|
|
15
|
+
export type PreJoinContext = {
|
|
16
|
+
correlationId: string;
|
|
17
|
+
sessionCorrelationId?: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
type MeetingInfoV2Config =
|
|
21
|
+
| {api?: 'meetingInfo'; preJoinContext?: never}
|
|
22
|
+
| {api: 'preJoin'; preJoinContext: PreJoinContext};
|
|
23
|
+
|
|
13
24
|
const PASSWORD_ERROR_DEFAULT_MESSAGE =
|
|
14
25
|
'Password required. Call fetchMeetingInfo() with password argument';
|
|
15
26
|
const CAPTCHA_ERROR_DEFAULT_MESSAGE =
|
|
@@ -19,7 +30,7 @@ const ADHOC_MEETING_DEFAULT_ERROR =
|
|
|
19
30
|
const MEETING_IS_IN_PROGRESS_MESSAGE = 'Meeting is in progress';
|
|
20
31
|
const STATIC_MEETING_LINK_ALREADY_EXISTS_MESSAGE = 'Static meeting link already exists';
|
|
21
32
|
const FETCH_STATIC_MEETING_LINK = 'Meeting link does not exists for conversation';
|
|
22
|
-
const CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006];
|
|
33
|
+
const CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006, 423008];
|
|
23
34
|
const CAPTCHA_ERROR_REQUIRES_REGISTRATION_ID_CODES = [423007];
|
|
24
35
|
|
|
25
36
|
const POLICY_ERROR_CODES = [403049, 403104, 403103, 403048, 403102, 403101];
|
|
@@ -35,7 +46,9 @@ const JOIN_FORBIDDEN_CODES = [403003];
|
|
|
35
46
|
* 403137 - Registration ID verified failure
|
|
36
47
|
*
|
|
37
48
|
*/
|
|
38
|
-
const JOIN_WEBINAR_ERROR_CODES = [
|
|
49
|
+
const JOIN_WEBINAR_ERROR_CODES = [
|
|
50
|
+
403021, 403022, 403024, 403137, 423007, 403026, 403037, 403137, 403106,
|
|
51
|
+
];
|
|
39
52
|
|
|
40
53
|
/**
|
|
41
54
|
* Error to indicate that wbxappapi requires a password
|
|
@@ -273,12 +286,30 @@ export class MeetingInfoV2StaticMeetingLinkAlreadyExists extends Error {
|
|
|
273
286
|
export default class MeetingInfoV2 {
|
|
274
287
|
webex: any;
|
|
275
288
|
|
|
289
|
+
private readonly api: MeetingInfoApi;
|
|
290
|
+
|
|
291
|
+
private readonly preJoinContext?: PreJoinContext;
|
|
292
|
+
|
|
276
293
|
/**
|
|
277
294
|
*
|
|
278
295
|
* @param {WebexSDK} webex
|
|
296
|
+
* @param {MeetingInfoV2Config} config
|
|
279
297
|
*/
|
|
280
|
-
constructor(webex) {
|
|
298
|
+
constructor(webex, config: MeetingInfoV2Config = {}) {
|
|
281
299
|
this.webex = webex;
|
|
300
|
+
this.api = config.api ?? 'meetingInfo';
|
|
301
|
+
this.preJoinContext = config.preJoinContext;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Creates a meeting-info provider whose requests consistently use preJoin.
|
|
306
|
+
*
|
|
307
|
+
* @param {WebexSDK} webex
|
|
308
|
+
* @param {PreJoinContext} preJoinContext identifiers retained for later requests
|
|
309
|
+
* @returns {MeetingInfoV2}
|
|
310
|
+
*/
|
|
311
|
+
static createPreJoinProvider(webex, preJoinContext: PreJoinContext): MeetingInfoV2 {
|
|
312
|
+
return new MeetingInfoV2(webex, {api: 'preJoin', preJoinContext});
|
|
282
313
|
}
|
|
283
314
|
|
|
284
315
|
/**
|
|
@@ -647,12 +678,14 @@ export default class MeetingInfoV2 {
|
|
|
647
678
|
installedOrgID = null,
|
|
648
679
|
locusId = null,
|
|
649
680
|
extraParams: object = {},
|
|
650
|
-
options: {meetingId?: string; sendCAevents?: boolean} = {},
|
|
681
|
+
options: {meetingId?: string; sendCAevents?: boolean; correlationId?: string} = {},
|
|
651
682
|
registrationId: string = null,
|
|
652
683
|
fullSiteUrl: string = null,
|
|
653
684
|
classificationId: string = null
|
|
654
685
|
) {
|
|
655
|
-
const {meetingId, sendCAevents} = options;
|
|
686
|
+
const {meetingId, sendCAevents, correlationId: meetingCorrelationId} = options;
|
|
687
|
+
const {correlationId: preJoinCorrelationId, sessionCorrelationId} = this.preJoinContext ?? {};
|
|
688
|
+
const correlationId = preJoinCorrelationId ?? meetingCorrelationId;
|
|
656
689
|
|
|
657
690
|
const destinationType = await MeetingInfoUtil.getDestinationType({
|
|
658
691
|
destination,
|
|
@@ -678,7 +711,7 @@ export default class MeetingInfoV2 {
|
|
|
678
711
|
captchaInfo,
|
|
679
712
|
installedOrgID,
|
|
680
713
|
locusId,
|
|
681
|
-
extraParams,
|
|
714
|
+
extraParams: this.api === 'preJoin' ? lodash.omit(extraParams, 'correlationId') : extraParams,
|
|
682
715
|
registrationId,
|
|
683
716
|
disableWebRedirect: true,
|
|
684
717
|
});
|
|
@@ -702,36 +735,60 @@ export default class MeetingInfoV2 {
|
|
|
702
735
|
const requestOptions: any = {
|
|
703
736
|
method: HTTP_VERBS.POST,
|
|
704
737
|
body,
|
|
738
|
+
...(this.api === 'preJoin' && {headers: {correlationId}}),
|
|
705
739
|
};
|
|
706
740
|
|
|
741
|
+
if (meetingId && sendCAevents && correlationId) {
|
|
742
|
+
requestOptions.headers = {correlationId};
|
|
743
|
+
}
|
|
744
|
+
|
|
707
745
|
const directURI = await MeetingInfoUtil.getDirectMeetingInfoURI(destinationType);
|
|
708
746
|
|
|
709
747
|
if (fullSiteUrl) {
|
|
710
|
-
requestOptions.uri = `https://${fullSiteUrl}/wbxappapi/v1
|
|
748
|
+
requestOptions.uri = `https://${fullSiteUrl}/wbxappapi/v1/${this.api}`;
|
|
711
749
|
} else if (directURI) {
|
|
712
|
-
requestOptions.uri =
|
|
750
|
+
requestOptions.uri =
|
|
751
|
+
this.api === 'preJoin' ? directURI.replace(/\/meetingInfo$/, '/preJoin') : directURI;
|
|
713
752
|
} else {
|
|
714
753
|
requestOptions.service = WBXAPPAPI_SERVICE;
|
|
715
|
-
requestOptions.resource =
|
|
754
|
+
requestOptions.resource = this.api;
|
|
716
755
|
}
|
|
717
756
|
|
|
718
|
-
|
|
757
|
+
const metricOptions = meetingId
|
|
758
|
+
? {meetingId}
|
|
759
|
+
: {
|
|
760
|
+
correlationId,
|
|
761
|
+
sessionCorrelationId,
|
|
762
|
+
meetingJoinPhase: 'pre-join' as const,
|
|
763
|
+
};
|
|
764
|
+
const shouldSendCAEvents =
|
|
765
|
+
sendCAevents && (meetingId || (this.api === 'preJoin' && correlationId));
|
|
766
|
+
|
|
767
|
+
if (shouldSendCAEvents) {
|
|
719
768
|
this.webex.internal.newMetrics.submitInternalEvent({
|
|
720
769
|
name: 'internal.client.meetinginfo.request',
|
|
721
770
|
});
|
|
722
771
|
|
|
723
772
|
this.webex.internal.newMetrics.submitClientEvent({
|
|
724
773
|
name: 'client.meetinginfo.request',
|
|
725
|
-
options:
|
|
726
|
-
meetingId,
|
|
727
|
-
},
|
|
774
|
+
options: metricOptions,
|
|
728
775
|
});
|
|
729
776
|
}
|
|
730
777
|
|
|
731
778
|
return this.webex
|
|
732
779
|
.request(requestOptions)
|
|
733
780
|
.then((response) => {
|
|
734
|
-
|
|
781
|
+
let normalizedResponse = response;
|
|
782
|
+
|
|
783
|
+
if (this.api === 'preJoin') {
|
|
784
|
+
if (!response?.body?.meetingInfo) {
|
|
785
|
+
throw new Error('PreJoin response did not include meetingInfo');
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
normalizedResponse = {...response, body: response.body.meetingInfo};
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
if (shouldSendCAEvents) {
|
|
735
792
|
this.webex.internal.newMetrics.submitInternalEvent({
|
|
736
793
|
name: 'internal.client.meetinginfo.response',
|
|
737
794
|
});
|
|
@@ -740,22 +797,27 @@ export default class MeetingInfoV2 {
|
|
|
740
797
|
name: 'client.meetinginfo.response',
|
|
741
798
|
payload: {
|
|
742
799
|
identifiers: {
|
|
743
|
-
meetingLookupUrl:
|
|
800
|
+
meetingLookupUrl: normalizedResponse?.url,
|
|
744
801
|
},
|
|
745
802
|
},
|
|
746
803
|
options: {
|
|
747
|
-
|
|
748
|
-
webexConferenceIdStr:
|
|
749
|
-
|
|
804
|
+
...metricOptions,
|
|
805
|
+
webexConferenceIdStr:
|
|
806
|
+
normalizedResponse?.body?.confIdStr || normalizedResponse?.body?.confID,
|
|
807
|
+
globalMeetingId: normalizedResponse?.body?.meetingId,
|
|
750
808
|
},
|
|
751
809
|
});
|
|
752
810
|
}
|
|
753
811
|
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_SUCCESS);
|
|
754
812
|
|
|
755
|
-
return
|
|
813
|
+
return normalizedResponse;
|
|
756
814
|
})
|
|
757
815
|
.catch((err) => {
|
|
758
|
-
if (
|
|
816
|
+
if (this.api === 'preJoin' && err?.body?.meetingInfo && !err.body.data?.meetingInfo) {
|
|
817
|
+
err.body.data = {...err.body.data, meetingInfo: err.body.meetingInfo};
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
if (shouldSendCAEvents) {
|
|
759
821
|
this.webex.internal.newMetrics.submitInternalEvent({
|
|
760
822
|
name: 'internal.client.meetinginfo.response',
|
|
761
823
|
});
|
|
@@ -768,7 +830,7 @@ export default class MeetingInfoV2 {
|
|
|
768
830
|
},
|
|
769
831
|
},
|
|
770
832
|
options: {
|
|
771
|
-
|
|
833
|
+
...metricOptions,
|
|
772
834
|
rawError: err,
|
|
773
835
|
},
|
|
774
836
|
});
|