@webex/plugin-meetings 3.9.0-next.1 → 3.9.0-next.11

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 (45) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/interpretation/index.js +1 -1
  4. package/dist/interpretation/siLanguage.js +1 -1
  5. package/dist/locus-info/index.js +15 -6
  6. package/dist/locus-info/index.js.map +1 -1
  7. package/dist/locus-info/parser.js +4 -1
  8. package/dist/locus-info/parser.js.map +1 -1
  9. package/dist/meeting/index.js +101 -79
  10. package/dist/meeting/index.js.map +1 -1
  11. package/dist/meeting-info/meeting-info-v2.js +29 -21
  12. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  13. package/dist/meetings/index.js +31 -25
  14. package/dist/meetings/index.js.map +1 -1
  15. package/dist/members/index.js +3 -2
  16. package/dist/members/index.js.map +1 -1
  17. package/dist/members/util.js +7 -2
  18. package/dist/members/util.js.map +1 -1
  19. package/dist/reachability/index.js +3 -3
  20. package/dist/reachability/index.js.map +1 -1
  21. package/dist/types/locus-info/index.d.ts +2 -0
  22. package/dist/types/meeting/index.d.ts +1 -0
  23. package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
  24. package/dist/types/meetings/index.d.ts +3 -1
  25. package/dist/types/members/index.d.ts +2 -1
  26. package/dist/types/members/util.d.ts +6 -3
  27. package/dist/webinar/index.js +1 -1
  28. package/package.json +13 -13
  29. package/src/locus-info/index.ts +13 -5
  30. package/src/locus-info/parser.ts +5 -1
  31. package/src/meeting/index.ts +29 -3
  32. package/src/meeting-info/meeting-info-v2.ts +24 -5
  33. package/src/meetings/index.ts +9 -3
  34. package/src/members/index.ts +9 -2
  35. package/src/members/util.ts +18 -2
  36. package/src/reachability/index.ts +3 -3
  37. package/test/unit/spec/locus-info/index.js +7 -7
  38. package/test/unit/spec/locus-info/parser.js +3 -2
  39. package/test/unit/spec/meeting/index.js +96 -22
  40. package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
  41. package/test/unit/spec/meetings/index.js +10 -1
  42. package/test/unit/spec/members/index.js +30 -2
  43. package/test/unit/spec/members/request.js +55 -0
  44. package/test/unit/spec/members/utils.js +116 -14
  45. package/test/unit/spec/reachability/index.ts +158 -3
@@ -129,7 +129,32 @@ describe('plugin-meetings', () => {
129
129
  });
130
130
  });
131
131
  describe('#generateEditDisplayNameMemberOptions', () => {
132
- it('returns the correct options', () => {
132
+ it('returns the correct options with suffix when suffix is there', () => {
133
+ const locusUrl = 'urlTest1';
134
+ const memberId = 'test1';
135
+ const requestingParticipantId = 'test2';
136
+ const alias = 'alias';
137
+ const suffix = 'suffix';
138
+
139
+ assert.deepEqual(
140
+ MembersUtil.generateEditDisplayNameMemberOptions(
141
+ memberId,
142
+ requestingParticipantId,
143
+ alias,
144
+ locusUrl,
145
+ suffix
146
+ ),
147
+ {
148
+ memberId,
149
+ requestingParticipantId,
150
+ alias,
151
+ locusUrl,
152
+ suffix,
153
+ }
154
+ );
155
+ });
156
+
157
+ it('returns the correct options without suffix when suffix is not there', () => {
133
158
  const locusUrl = 'urlTest1';
134
159
  const memberId = 'test1';
135
160
  const requestingParticipantId = 'test2';
@@ -147,6 +172,7 @@ describe('plugin-meetings', () => {
147
172
  requestingParticipantId,
148
173
  alias,
149
174
  locusUrl,
175
+ suffix: undefined,
150
176
  }
151
177
  );
152
178
  });
@@ -306,7 +332,7 @@ describe('plugin-meetings', () => {
306
332
  const options = {
307
333
  invitee: {
308
334
  phoneNumber: '1234567890',
309
- isInternalNumber: false
335
+ isInternalNumber: false,
310
336
  },
311
337
  alertIfActive: false,
312
338
  };
@@ -315,7 +341,7 @@ describe('plugin-meetings', () => {
315
341
  invitees: [
316
342
  {
317
343
  address: '1234567890',
318
- isInternalNumber: false
344
+ isInternalNumber: false,
319
345
  },
320
346
  ],
321
347
  alertIfActive: false,
@@ -417,16 +443,10 @@ describe('plugin-meetings', () => {
417
443
  const memberId = 'test';
418
444
  const invitee = {memberId, isInternalNumber: false};
419
445
 
420
- assert.deepEqual(
421
- MembersUtil.cancelInviteByMemberIdOptions(
422
- invitee,
423
- locusUrl
424
- ),
425
- {
426
- invitee,
427
- locusUrl,
428
- }
429
- );
446
+ assert.deepEqual(MembersUtil.cancelInviteByMemberIdOptions(invitee, locusUrl), {
447
+ invitee,
448
+ locusUrl,
449
+ });
430
450
  });
431
451
  });
432
452
 
@@ -436,7 +456,7 @@ describe('plugin-meetings', () => {
436
456
  const memberId = 'test';
437
457
  const options = {
438
458
  locusUrl,
439
- invitee: {memberId, isInternalNumber: false}
459
+ invitee: {memberId, isInternalNumber: false},
440
460
  };
441
461
  const body = {
442
462
  actionType: 'REMOVE',
@@ -452,5 +472,87 @@ describe('plugin-meetings', () => {
452
472
  });
453
473
  });
454
474
  });
475
+
476
+ describe('#editDisplayNameMemberRequestParams', () => {
477
+ it('returns the correct params when suffix is available', () => {
478
+ const locusUrl = 'TestLocusUrl1';
479
+ const memberId = 'test1';
480
+ const alias = 'alias1';
481
+ const requestingParticipantId = '23131';
482
+ const suffix = 'suffix1';
483
+ const options = {
484
+ locusUrl: locusUrl,
485
+ memberId,
486
+ alias,
487
+ requestingParticipantId,
488
+ suffix,
489
+ };
490
+
491
+ const uri = `${locusUrl}/participant/${memberId}/alias`;
492
+
493
+ assert.deepEqual(MembersUtil.editDisplayNameMemberRequestParams(options), {
494
+ method: HTTP_VERBS.POST,
495
+ uri,
496
+ body: {
497
+ aliasValue: alias,
498
+ requestingParticipantId,
499
+ suffixValue: suffix,
500
+ },
501
+ });
502
+ });
503
+
504
+ it('returns the correct params when suffix is not available', () => {
505
+ const locusUrl = 'TestLocusUrl2';
506
+ const memberId = 'test2';
507
+ const alias = 'alias2';
508
+ const requestingParticipantId = '12345';
509
+
510
+ const options = {
511
+ locusUrl: locusUrl,
512
+ memberId,
513
+ alias,
514
+ requestingParticipantId,
515
+ };
516
+
517
+ const uri = `${locusUrl}/participant/${memberId}/alias`;
518
+
519
+ assert.deepEqual(MembersUtil.editDisplayNameMemberRequestParams(options), {
520
+ method: HTTP_VERBS.POST,
521
+ uri,
522
+ body: {
523
+ aliasValue: alias,
524
+ requestingParticipantId,
525
+ },
526
+ });
527
+ });
528
+
529
+ it('returns the correct params when suffix is empty string', () => {
530
+ const locusUrl = 'TestLocusUrl3';
531
+ const memberId = 'test3';
532
+ const alias = 'alias3';
533
+ const requestingParticipantId = '322424';
534
+ const suffix = '';
535
+
536
+ const options = {
537
+ locusUrl: locusUrl,
538
+ memberId,
539
+ alias,
540
+ suffix,
541
+ requestingParticipantId,
542
+ };
543
+
544
+ const uri = `${locusUrl}/participant/${memberId}/alias`;
545
+
546
+ assert.deepEqual(MembersUtil.editDisplayNameMemberRequestParams(options), {
547
+ method: HTTP_VERBS.POST,
548
+ uri,
549
+ body: {
550
+ aliasValue: alias,
551
+ requestingParticipantId,
552
+ suffixValue: suffix,
553
+ },
554
+ });
555
+ });
556
+ });
455
557
  });
456
558
  });
@@ -3,15 +3,14 @@ import MockWebex from '@webex/test-helper-mock-webex';
3
3
  import sinon from 'sinon';
4
4
  import EventEmitter from 'events';
5
5
  import testUtils from '../../../utils/testUtils';
6
- import Reachability, {
7
- ReachabilityResultsForBackend,
8
- } from '@webex/plugin-meetings/src/reachability/';
6
+ import Reachability from '@webex/plugin-meetings/src/reachability/';
9
7
  import {ClusterNode} from '../../../../src/reachability/request';
10
8
  import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
11
9
  import * as ClusterReachabilityModule from '@webex/plugin-meetings/src/reachability/clusterReachability';
12
10
  import Metrics from '@webex/plugin-meetings/src/metrics';
13
11
 
14
12
  import {IP_VERSION} from '@webex/plugin-meetings/src/constants';
13
+ import { ReachabilityResultsForBackend } from '@webex/plugin-meetings/src/reachability/reachability.types';
15
14
 
16
15
  describe('isAnyPublicClusterReachable', () => {
17
16
  let webex;
@@ -836,6 +835,162 @@ describe('gatherReachability', () => {
836
835
  },
837
836
  },
838
837
  // ========================================================================
838
+ {
839
+ title: '2 clusters: one with multiple urls, reachability should resolve after the first result for each protocol is ready',
840
+ waitShortTimeout: false,
841
+ waitLongTimeout: false,
842
+ mockClusters: {
843
+ cluster1: {
844
+ udp: ['udp-url1-1', 'udp-url1-2'],
845
+ tcp: ['tcp-url1-1', 'tcp-url1-2'],
846
+ xtls: ['xtls-url1-1', 'xtls-url1-2'],
847
+ isVideoMesh: false,
848
+ },
849
+ cluster2: {
850
+ udp: ['udp-url2'],
851
+ tcp: ['tcp-url2'],
852
+ xtls: ['xtls-url2'],
853
+ isVideoMesh: false,
854
+ },
855
+ },
856
+ mockResultReadyEvents: [
857
+ // results are only for the first url for each protocol not the 2nd one
858
+ {
859
+ clusterId: 'cluster1',
860
+ protocol: 'udp',
861
+ result: {
862
+ result: 'reachable',
863
+ clientMediaIPs: ['1.2.3.4'],
864
+ latencyInMilliseconds: 10,
865
+ },
866
+ },
867
+ {
868
+ clusterId: 'cluster1',
869
+ protocol: 'tcp',
870
+ result: {
871
+ result: 'reachable',
872
+ latencyInMilliseconds: 100,
873
+ },
874
+ },
875
+ {
876
+ clusterId: 'cluster1',
877
+ protocol: 'xtls',
878
+ result: {
879
+ result: 'reachable',
880
+ latencyInMilliseconds: 200,
881
+ },
882
+ },
883
+ {
884
+ clusterId: 'cluster2',
885
+ protocol: 'udp',
886
+ result: {
887
+ result: 'reachable',
888
+ clientMediaIPs: ['1.2.3.4'],
889
+ latencyInMilliseconds: 20,
890
+ },
891
+ },
892
+ {
893
+ clusterId: 'cluster2',
894
+ protocol: 'tcp',
895
+ result: {
896
+ result: 'reachable',
897
+ latencyInMilliseconds: 110,
898
+ },
899
+ },
900
+ {
901
+ clusterId: 'cluster2',
902
+ protocol: 'xtls',
903
+ result: {
904
+ result: 'reachable',
905
+ latencyInMilliseconds: 220,
906
+ },
907
+ },
908
+ ],
909
+ expectedResults: {
910
+ cluster1: {
911
+ udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 10},
912
+ tcp: {result: 'reachable', latencyInMilliseconds: 100},
913
+ xtls: {result: 'reachable', latencyInMilliseconds: 200},
914
+ isVideoMesh: false,
915
+ },
916
+ cluster2: {
917
+ udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 20},
918
+ tcp: {result: 'reachable', latencyInMilliseconds: 110},
919
+ xtls: {result: 'reachable', latencyInMilliseconds: 220},
920
+ isVideoMesh: false,
921
+ },
922
+ },
923
+ expectedMetrics: {
924
+ vmn_udp_min: -1,
925
+ vmn_udp_max: -1,
926
+ vmn_udp_average: -1,
927
+ public_udp_min: 10,
928
+ public_udp_max: 20,
929
+ public_udp_average: 15,
930
+ public_tcp_min: 100,
931
+ public_tcp_max: 110,
932
+ public_tcp_average: 105,
933
+ public_xtls_min: 200,
934
+ public_xtls_max: 220,
935
+ public_xtls_average: 210,
936
+ },
937
+ },
938
+ // ========================================================================
939
+ {
940
+ title: '1 cluster with zero urls for TCP, reachability should resolve after the first result for each protocol is ready without waiting for TCP',
941
+ waitShortTimeout: false,
942
+ waitLongTimeout: false,
943
+ mockClusters: {
944
+ cluster1: {
945
+ udp: ['udp-url1'],
946
+ tcp: [],
947
+ xtls: ['xtls-url1'],
948
+ isVideoMesh: false,
949
+ },
950
+ },
951
+ mockResultReadyEvents: [
952
+ {
953
+ clusterId: 'cluster1',
954
+ protocol: 'udp',
955
+ result: {
956
+ result: 'reachable',
957
+ clientMediaIPs: ['1.2.3.4'],
958
+ latencyInMilliseconds: 10,
959
+ },
960
+ },
961
+ {
962
+ clusterId: 'cluster1',
963
+ protocol: 'xtls',
964
+ result: {
965
+ result: 'reachable',
966
+ latencyInMilliseconds: 200,
967
+ },
968
+ },
969
+ ],
970
+ expectedResults: {
971
+ cluster1: {
972
+ udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 10},
973
+ tcp: {result: 'untested'},
974
+ xtls: {result: 'reachable', latencyInMilliseconds: 200},
975
+ isVideoMesh: false,
976
+ },
977
+ },
978
+ expectedMetrics: {
979
+ vmn_udp_min: -1,
980
+ vmn_udp_max: -1,
981
+ vmn_udp_average: -1,
982
+ public_udp_min: 10,
983
+ public_udp_max: 10,
984
+ public_udp_average: 10,
985
+ public_tcp_min: -1,
986
+ public_tcp_max: -1,
987
+ public_tcp_average: -1,
988
+ public_xtls_min: 200,
989
+ public_xtls_max: 200,
990
+ public_xtls_average: 200,
991
+ },
992
+ },
993
+ // ========================================================================
839
994
  {
840
995
  title: '2 clusters: both with no results at all',
841
996
  waitShortTimeout: 'public',