@webex/plugin-meetings 3.8.0-next.76 → 3.8.0-next.78

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/package.json CHANGED
@@ -43,13 +43,13 @@
43
43
  "@webex/eslint-config-legacy": "0.0.0",
44
44
  "@webex/jest-config-legacy": "0.0.0",
45
45
  "@webex/legacy-tools": "0.0.0",
46
- "@webex/plugin-meetings": "3.8.0-next.76",
47
- "@webex/plugin-rooms": "3.8.0-next.25",
48
- "@webex/test-helper-chai": "3.8.0-next.20",
49
- "@webex/test-helper-mocha": "3.8.0-next.20",
50
- "@webex/test-helper-mock-webex": "3.8.0-next.20",
51
- "@webex/test-helper-retry": "3.8.0-next.20",
52
- "@webex/test-helper-test-users": "3.8.0-next.20",
46
+ "@webex/plugin-meetings": "3.8.0-next.78",
47
+ "@webex/plugin-rooms": "3.8.0-next.26",
48
+ "@webex/test-helper-chai": "3.8.0-next.21",
49
+ "@webex/test-helper-mocha": "3.8.0-next.21",
50
+ "@webex/test-helper-mock-webex": "3.8.0-next.21",
51
+ "@webex/test-helper-retry": "3.8.0-next.21",
52
+ "@webex/test-helper-test-users": "3.8.0-next.21",
53
53
  "chai": "^4.3.4",
54
54
  "chai-as-promised": "^7.1.1",
55
55
  "eslint": "^8.24.0",
@@ -61,23 +61,23 @@
61
61
  "typescript": "^4.7.4"
62
62
  },
63
63
  "dependencies": {
64
- "@webex/common": "3.8.0-next.20",
64
+ "@webex/common": "3.8.0-next.21",
65
65
  "@webex/event-dictionary-ts": "^1.0.1753",
66
66
  "@webex/internal-media-core": "2.16.0",
67
- "@webex/internal-plugin-conversation": "3.8.0-next.25",
68
- "@webex/internal-plugin-device": "3.8.0-next.20",
69
- "@webex/internal-plugin-llm": "3.8.0-next.23",
70
- "@webex/internal-plugin-mercury": "3.8.0-next.22",
71
- "@webex/internal-plugin-metrics": "3.8.0-next.20",
72
- "@webex/internal-plugin-support": "3.8.0-next.25",
73
- "@webex/internal-plugin-user": "3.8.0-next.20",
74
- "@webex/internal-plugin-voicea": "3.8.0-next.76",
75
- "@webex/media-helpers": "3.8.0-next.24",
76
- "@webex/plugin-people": "3.8.0-next.22",
77
- "@webex/plugin-rooms": "3.8.0-next.25",
67
+ "@webex/internal-plugin-conversation": "3.8.0-next.26",
68
+ "@webex/internal-plugin-device": "3.8.0-next.21",
69
+ "@webex/internal-plugin-llm": "3.8.0-next.24",
70
+ "@webex/internal-plugin-mercury": "3.8.0-next.23",
71
+ "@webex/internal-plugin-metrics": "3.8.0-next.21",
72
+ "@webex/internal-plugin-support": "3.8.0-next.26",
73
+ "@webex/internal-plugin-user": "3.8.0-next.21",
74
+ "@webex/internal-plugin-voicea": "3.8.0-next.78",
75
+ "@webex/media-helpers": "3.8.0-next.25",
76
+ "@webex/plugin-people": "3.8.0-next.23",
77
+ "@webex/plugin-rooms": "3.8.0-next.26",
78
78
  "@webex/ts-sdp": "^1.8.1",
79
79
  "@webex/web-capabilities": "^1.4.0",
80
- "@webex/webex-core": "3.8.0-next.20",
80
+ "@webex/webex-core": "3.8.0-next.21",
81
81
  "ampersand-collection": "^2.0.2",
82
82
  "bowser": "^2.11.0",
83
83
  "btoa": "^1.2.1",
@@ -93,5 +93,5 @@
93
93
  "//": [
94
94
  "TODO: upgrade jwt-decode when moving to node 18"
95
95
  ],
96
- "version": "3.8.0-next.76"
96
+ "version": "3.8.0-next.78"
97
97
  }
@@ -262,7 +262,10 @@ type FetchMeetingInfoParams = {
262
262
  sendCAevents?: boolean;
263
263
  };
264
264
 
265
- type MediaReachabilityMetrics = ReachabilityMetrics & {isSubnetReachable: boolean};
265
+ type MediaReachabilityMetrics = ReachabilityMetrics & {
266
+ isSubnetReachable: boolean;
267
+ selectedCluster: string | null;
268
+ };
266
269
 
267
270
  /**
268
271
  * MediaDirection
@@ -9691,9 +9694,15 @@ export default class Meeting extends StatelessWebexPlugin {
9691
9694
  isSubnetReachable = this.webex.meetings.reachability.isSubnetReachable(this.mediaServerIp);
9692
9695
  }
9693
9696
 
9697
+ let selectedCluster = null;
9698
+ if (this.mediaConnections && this.mediaConnections.length > 0) {
9699
+ selectedCluster = this.mediaConnections[0].mediaAgentCluster;
9700
+ }
9701
+
9694
9702
  return {
9695
9703
  ...reachabilityMetrics,
9696
9704
  isSubnetReachable,
9705
+ selectedCluster,
9697
9706
  };
9698
9707
  }
9699
9708
  }
@@ -617,6 +617,7 @@ export default class MeetingInfoV2 {
617
617
  * @param {Object} extraParams
618
618
  * @param {Object} options
619
619
  * @param {String} registrationId
620
+ * @param {String} fullSiteUrl
620
621
  * @returns {Promise} returns a meeting info object
621
622
  * @public
622
623
  * @memberof MeetingInfo
@@ -633,7 +634,8 @@ export default class MeetingInfoV2 {
633
634
  locusId = null,
634
635
  extraParams: object = {},
635
636
  options: {meetingId?: string; sendCAevents?: boolean} = {},
636
- registrationId: string = null
637
+ registrationId: string = null,
638
+ fullSiteUrl: string = null
637
639
  ) {
638
640
  const {meetingId, sendCAevents} = options;
639
641
 
@@ -659,6 +661,7 @@ export default class MeetingInfoV2 {
659
661
  locusId,
660
662
  extraParams,
661
663
  registrationId,
664
+ disableWebRedirect: true,
662
665
  });
663
666
 
664
667
  // If the body only contains the default properties, we don't have enough to
@@ -684,7 +687,9 @@ export default class MeetingInfoV2 {
684
687
 
685
688
  const directURI = await MeetingInfoUtil.getDirectMeetingInfoURI(destinationType);
686
689
 
687
- if (directURI) {
690
+ if (fullSiteUrl) {
691
+ requestOptions.uri = `https://${fullSiteUrl}/wbxappapi/v1/meetingInfo`;
692
+ } else if (directURI) {
688
693
  requestOptions.uri = directURI;
689
694
  } else {
690
695
  requestOptions.service = WBXAPPAPI_SERVICE;
@@ -237,6 +237,7 @@ export default class MeetingInfoUtil {
237
237
  locusId,
238
238
  extraParams,
239
239
  registrationId,
240
+ disableWebRedirect,
240
241
  } = options;
241
242
  const body: any = {
242
243
  ...DEFAULT_MEETING_INFO_REQUEST_BODY,
@@ -296,6 +297,10 @@ export default class MeetingInfoUtil {
296
297
  body.locusId = locusId;
297
298
  }
298
299
 
300
+ if (disableWebRedirect) {
301
+ body.disableWebRedirect = disableWebRedirect;
302
+ }
303
+
299
304
  return body;
300
305
  }
301
306
 
@@ -2188,6 +2188,7 @@ describe('plugin-meetings', () => {
2188
2188
  someReachabilityMetric2: 'some value2',
2189
2189
  selectedCandidatePairChanges: 2,
2190
2190
  isSubnetReachable: null,
2191
+ selectedCluster: null,
2191
2192
  numTransports: 1,
2192
2193
  iceCandidatesCount: 0,
2193
2194
  }
@@ -2235,6 +2236,7 @@ describe('plugin-meetings', () => {
2235
2236
  connectionState: 'unknown',
2236
2237
  iceConnectionState: 'unknown',
2237
2238
  isSubnetReachable: null,
2239
+ selectedCluster: null,
2238
2240
  })
2239
2241
  );
2240
2242
 
@@ -2301,6 +2303,7 @@ describe('plugin-meetings', () => {
2301
2303
  numTransports: 1,
2302
2304
  iceCandidatesCount: 0,
2303
2305
  isSubnetReachable: null,
2306
+ selectedCluster: null,
2304
2307
  }
2305
2308
  );
2306
2309
  });
@@ -2359,6 +2362,7 @@ describe('plugin-meetings', () => {
2359
2362
  connectionState: 'connecting',
2360
2363
  iceConnectionState: 'checking',
2361
2364
  isSubnetReachable: null,
2365
+ selectedCluster: null,
2362
2366
  })
2363
2367
  );
2364
2368
 
@@ -2417,6 +2421,7 @@ describe('plugin-meetings', () => {
2417
2421
  connectionState: 'connecting',
2418
2422
  iceConnectionState: 'checking',
2419
2423
  isSubnetReachable: null,
2424
+ selectedCluster: null,
2420
2425
  })
2421
2426
  );
2422
2427
 
@@ -2939,6 +2944,7 @@ describe('plugin-meetings', () => {
2939
2944
  numTransports: 1,
2940
2945
  iceCandidatesCount: 0,
2941
2946
  isSubnetReachable: null,
2947
+ selectedCluster: null,
2942
2948
  },
2943
2949
  ]);
2944
2950
 
@@ -3146,6 +3152,7 @@ describe('plugin-meetings', () => {
3146
3152
  isJoinWithMediaRetry: false,
3147
3153
  iceCandidatesCount: 0,
3148
3154
  isSubnetReachable: null,
3155
+ selectedCluster: null,
3149
3156
  },
3150
3157
  ]);
3151
3158
  meeting.roap.doTurnDiscovery;
@@ -3276,6 +3283,11 @@ describe('plugin-meetings', () => {
3276
3283
  stopReachability: sinon.stub(),
3277
3284
  isSubnetReachable: sinon.stub().returns(true),
3278
3285
  };
3286
+ meeting.mediaConnections = [
3287
+ {
3288
+ mediaAgentCluster: 'some.cluster',
3289
+ }
3290
+ ]
3279
3291
  meeting.iceCandidatesCount = 3;
3280
3292
  meeting.iceCandidateErrors.set('701_error', 3);
3281
3293
  meeting.iceCandidateErrors.set('701_turn_host_lookup_received_error', 1);
@@ -3304,6 +3316,7 @@ describe('plugin-meetings', () => {
3304
3316
  '701_error': 3,
3305
3317
  '701_turn_host_lookup_received_error': 1,
3306
3318
  isSubnetReachable: null,
3319
+ selectedCluster: 'some.cluster',
3307
3320
  }
3308
3321
  );
3309
3322
 
@@ -3367,6 +3380,7 @@ describe('plugin-meetings', () => {
3367
3380
  selectedCandidatePairChanges: 2,
3368
3381
  numTransports: 1,
3369
3382
  isSubnetReachable: null,
3383
+ selectedCluster: null,
3370
3384
  iceCandidatesCount: 0,
3371
3385
  }
3372
3386
  );
@@ -3429,6 +3443,7 @@ describe('plugin-meetings', () => {
3429
3443
  '701_error': 2,
3430
3444
  '701_turn_host_lookup_received_error': 1,
3431
3445
  isSubnetReachable: null,
3446
+ selectedCluster: null,
3432
3447
  iceCandidatesCount: 0,
3433
3448
  }
3434
3449
  );
@@ -3478,6 +3493,7 @@ describe('plugin-meetings', () => {
3478
3493
  iceCandidatesCount: 0,
3479
3494
  reachability_public_udp_success: 5,
3480
3495
  isSubnetReachable: false,
3496
+ selectedCluster: null,
3481
3497
  });
3482
3498
  });
3483
3499
 
@@ -3539,6 +3555,7 @@ describe('plugin-meetings', () => {
3539
3555
  numTransports: 1,
3540
3556
  reachability_public_udp_success: 5,
3541
3557
  isSubnetReachable: true,
3558
+ selectedCluster: null,
3542
3559
  iceCandidatesCount: 0,
3543
3560
  }
3544
3561
  );
@@ -511,6 +511,7 @@ describe('plugin-meetings', () => {
511
511
  password: 'abc',
512
512
  captchaID: '999',
513
513
  captchaVerifyCode: 'aabbcc11',
514
+ disableWebRedirect: true,
514
515
  },
515
516
  });
516
517
  assert.deepEqual(result, requestResponse);
@@ -544,6 +545,7 @@ describe('plugin-meetings', () => {
544
545
  supportCountryList: true,
545
546
  meetingKey: '1234323',
546
547
  installedOrgID,
548
+ disableWebRedirect: true,
547
549
  },
548
550
  });
549
551
  assert.deepEqual(result, requestResponse);
@@ -578,6 +580,7 @@ describe('plugin-meetings', () => {
578
580
  supportCountryList: true,
579
581
  meetingKey: '1234323',
580
582
  locusId,
583
+ disableWebRedirect: true,
581
584
  },
582
585
  });
583
586
  assert.deepEqual(result, requestResponse);
@@ -613,6 +616,7 @@ describe('plugin-meetings', () => {
613
616
  supportCountryList: true,
614
617
  meetingKey: '1234323',
615
618
  ...extraParams,
619
+ disableWebRedirect: true,
616
620
  },
617
621
  });
618
622
  assert.deepEqual(result, requestResponse);
@@ -843,6 +847,7 @@ describe('plugin-meetings', () => {
843
847
  supportCountryList: true,
844
848
  meetingKey: '1234323',
845
849
  ...extraParams,
850
+ disableWebRedirect: true,
846
851
  },
847
852
  });
848
853
  assert.deepEqual(result, requestResponse);
@@ -922,6 +927,7 @@ describe('plugin-meetings', () => {
922
927
  supportCountryList: true,
923
928
  meetingKey: '1234323',
924
929
  ...extraParams,
930
+ disableWebRedirect: true,
925
931
  },
926
932
  });
927
933
  assert.deepEqual(result, requestResponse);
@@ -1065,6 +1071,41 @@ describe('plugin-meetings', () => {
1065
1071
  });
1066
1072
  });
1067
1073
 
1074
+ describe('should stop call fetchMeetingInfo if siteFullUrl is empty for 404 response', () => {
1075
+
1076
+ const runTest = async (wbxAppApiCode, expectedIsPasswordRequired) => {
1077
+ webex.request = sinon.stub().rejects({
1078
+ statusCode: 404,
1079
+ body: {
1080
+ code: wbxAppApiCode,
1081
+ message: 'Alternate Meeting Server',
1082
+ data: {
1083
+ 'siteFullUrl': ''
1084
+ }
1085
+ },
1086
+ });
1087
+
1088
+
1089
+ try {
1090
+ await meetingInfo.fetchMeetingInfo('1234323', DESTINATION_TYPE.MEETING_ID, 'abc', {
1091
+ id: '999',
1092
+ code: 'aabbcc11',
1093
+ });
1094
+ assert.fail('fetchMeetingInfo should have thrown, but has not done that');
1095
+ } catch (err) {
1096
+ assert(Metrics.sendBehavioralMetric.calledOnce);
1097
+ assert.deepEqual(err.body.data, {
1098
+ siteFullUrl: ''
1099
+ });
1100
+ }
1101
+ };
1102
+
1103
+ it('should throw MeetingInfoV2CaptchaError for 404 response (wbxappapi code 404100)', async () => {
1104
+ await runTest(404100, false);
1105
+ });
1106
+ });
1107
+
1108
+
1068
1109
  it('should throw an error and not fetch with an "empty" body', async () => {
1069
1110
  const body = {supportHostKey: 'foo', supportCountryList: 'bar'};
1070
1111
  const requestResponse = {statusCode: 200, body};
@@ -241,6 +241,25 @@ describe('plugin-meetings', () => {
241
241
  }
242
242
  );
243
243
  });
244
+
245
+ it('allows for disableWebRedirect', () => {
246
+
247
+ const res = MeetingInfoUtil.getRequestBody({
248
+ type: DESTINATION_TYPE.CONVERSATION_URL,
249
+ destination: 'https://conv-a.wbx2.com/conversation/api/v1/conversations/bfb49281',
250
+ disableWebRedirect: true,
251
+ });
252
+
253
+ assert.deepEqual(
254
+ res,
255
+ {
256
+ conversationUrl: 'https://conv-a.wbx2.com/conversation/api/v1/conversations/bfb49281',
257
+ supportHostKey: true,
258
+ supportCountryList: true,
259
+ disableWebRedirect: true,
260
+ }
261
+ );
262
+ });
244
263
  });
245
264
 
246
265
  describe('#getWebexSite', () => {