@webex/plugin-meetings 3.10.0-next.9 → 3.10.0-webex-services-ready.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 (73) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +11 -3
  4. package/dist/constants.js.map +1 -1
  5. package/dist/hashTree/constants.js +20 -0
  6. package/dist/hashTree/constants.js.map +1 -0
  7. package/dist/hashTree/hashTree.js +515 -0
  8. package/dist/hashTree/hashTree.js.map +1 -0
  9. package/dist/hashTree/hashTreeParser.js +1266 -0
  10. package/dist/hashTree/hashTreeParser.js.map +1 -0
  11. package/dist/hashTree/types.js +21 -0
  12. package/dist/hashTree/types.js.map +1 -0
  13. package/dist/hashTree/utils.js +48 -0
  14. package/dist/hashTree/utils.js.map +1 -0
  15. package/dist/interpretation/index.js +1 -1
  16. package/dist/interpretation/siLanguage.js +1 -1
  17. package/dist/locus-info/index.js +511 -48
  18. package/dist/locus-info/index.js.map +1 -1
  19. package/dist/locus-info/types.js +7 -0
  20. package/dist/locus-info/types.js.map +1 -0
  21. package/dist/meeting/index.js +41 -15
  22. package/dist/meeting/index.js.map +1 -1
  23. package/dist/meeting/util.js +1 -0
  24. package/dist/meeting/util.js.map +1 -1
  25. package/dist/meetings/index.js +112 -70
  26. package/dist/meetings/index.js.map +1 -1
  27. package/dist/metrics/constants.js +3 -1
  28. package/dist/metrics/constants.js.map +1 -1
  29. package/dist/reachability/clusterReachability.js +44 -358
  30. package/dist/reachability/clusterReachability.js.map +1 -1
  31. package/dist/reachability/reachability.types.js +14 -1
  32. package/dist/reachability/reachability.types.js.map +1 -1
  33. package/dist/reachability/reachabilityPeerConnection.js +445 -0
  34. package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
  35. package/dist/types/constants.d.ts +26 -21
  36. package/dist/types/hashTree/constants.d.ts +8 -0
  37. package/dist/types/hashTree/hashTree.d.ts +129 -0
  38. package/dist/types/hashTree/hashTreeParser.d.ts +260 -0
  39. package/dist/types/hashTree/types.d.ts +25 -0
  40. package/dist/types/hashTree/utils.d.ts +9 -0
  41. package/dist/types/locus-info/index.d.ts +91 -42
  42. package/dist/types/locus-info/types.d.ts +46 -0
  43. package/dist/types/meeting/index.d.ts +22 -9
  44. package/dist/types/meetings/index.d.ts +9 -2
  45. package/dist/types/metrics/constants.d.ts +2 -0
  46. package/dist/types/reachability/clusterReachability.d.ts +10 -88
  47. package/dist/types/reachability/reachability.types.d.ts +12 -1
  48. package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
  49. package/dist/webinar/index.js +1 -1
  50. package/package.json +22 -21
  51. package/src/constants.ts +13 -1
  52. package/src/hashTree/constants.ts +9 -0
  53. package/src/hashTree/hashTree.ts +463 -0
  54. package/src/hashTree/hashTreeParser.ts +1161 -0
  55. package/src/hashTree/types.ts +30 -0
  56. package/src/hashTree/utils.ts +42 -0
  57. package/src/locus-info/index.ts +556 -85
  58. package/src/locus-info/types.ts +48 -0
  59. package/src/meeting/index.ts +58 -26
  60. package/src/meeting/util.ts +1 -0
  61. package/src/meetings/index.ts +104 -51
  62. package/src/metrics/constants.ts +2 -0
  63. package/src/reachability/clusterReachability.ts +50 -347
  64. package/src/reachability/reachability.types.ts +15 -1
  65. package/src/reachability/reachabilityPeerConnection.ts +416 -0
  66. package/test/unit/spec/hashTree/hashTree.ts +655 -0
  67. package/test/unit/spec/hashTree/hashTreeParser.ts +1532 -0
  68. package/test/unit/spec/hashTree/utils.ts +103 -0
  69. package/test/unit/spec/locus-info/index.js +667 -1
  70. package/test/unit/spec/meeting/index.js +91 -20
  71. package/test/unit/spec/meeting/utils.js +77 -0
  72. package/test/unit/spec/meetings/index.js +71 -26
  73. package/test/unit/spec/reachability/clusterReachability.ts +281 -138
@@ -0,0 +1,30 @@
1
+ import {Enum} from '../constants';
2
+
3
+ // todo: Locus docs have now more types like CONTROL_ENTRY, EMBEDDED_APP - need to add support for them once Locus implements them
4
+ export const ObjectType = {
5
+ participant: 'participant',
6
+ self: 'self',
7
+ locus: 'locus',
8
+ mediaShare: 'mediashare',
9
+ info: 'info',
10
+ fullState: 'fullstate',
11
+ } as const;
12
+
13
+ export type ObjectType = Enum<typeof ObjectType>;
14
+
15
+ // mapping from ObjectType to top level LocusDTO keys
16
+ export const ObjectTypeToLocusKeyMap = {
17
+ [ObjectType.info]: 'info',
18
+ [ObjectType.fullState]: 'fullState',
19
+ [ObjectType.self]: 'self',
20
+ [ObjectType.participant]: 'participants', // note: each object is a single participant in participants array
21
+ [ObjectType.mediaShare]: 'mediaShares', // note: each object is a single mediaShare in mediaShares array
22
+ };
23
+ export interface HtMeta {
24
+ elementId: {
25
+ type: ObjectType;
26
+ id: number;
27
+ version: number;
28
+ };
29
+ dataSetNames: string[];
30
+ }
@@ -0,0 +1,42 @@
1
+ /* eslint-disable import/prefer-default-export */
2
+
3
+ /**
4
+ * Analyzes given part of Locus DTO recursively and delete any nested objects that have their own htMeta
5
+ *
6
+ * @param {Object} currentLocusPart part of locus DTO to analyze
7
+ * @param {Object} parent parent object
8
+ * @param {string|number} currentKey key of the parent object that currentLocusPart is
9
+ * @returns {void}
10
+ */
11
+ export const deleteNestedObjectsWithHtMeta = (
12
+ currentLocusPart: any,
13
+ parent?: any,
14
+ currentKey?: string | number
15
+ ) => {
16
+ if (typeof currentLocusPart !== 'object' || currentLocusPart === null) {
17
+ return;
18
+ }
19
+
20
+ if (parent && currentKey !== undefined && currentLocusPart.htMeta) {
21
+ if (Array.isArray(parent)) {
22
+ parent.splice(Number(currentKey), 1);
23
+ } else {
24
+ delete parent[currentKey];
25
+ }
26
+
27
+ return;
28
+ }
29
+
30
+ if (Array.isArray(currentLocusPart)) {
31
+ // iterate array in reverse, so that indexes remain valid when deleting elements
32
+ for (let i = currentLocusPart.length - 1; i >= 0; i -= 1) {
33
+ deleteNestedObjectsWithHtMeta(currentLocusPart[i], currentLocusPart, i);
34
+ }
35
+ } else {
36
+ for (const key of Object.keys(currentLocusPart)) {
37
+ if (Object.prototype.hasOwnProperty.call(currentLocusPart, key)) {
38
+ deleteNestedObjectsWithHtMeta(currentLocusPart[key], currentLocusPart, key);
39
+ }
40
+ }
41
+ }
42
+ };