@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.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +11 -3
- package/dist/constants.js.map +1 -1
- package/dist/hashTree/constants.js +20 -0
- package/dist/hashTree/constants.js.map +1 -0
- package/dist/hashTree/hashTree.js +515 -0
- package/dist/hashTree/hashTree.js.map +1 -0
- package/dist/hashTree/hashTreeParser.js +1266 -0
- package/dist/hashTree/hashTreeParser.js.map +1 -0
- package/dist/hashTree/types.js +21 -0
- package/dist/hashTree/types.js.map +1 -0
- package/dist/hashTree/utils.js +48 -0
- package/dist/hashTree/utils.js.map +1 -0
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +511 -48
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/types.js +7 -0
- package/dist/locus-info/types.js.map +1 -0
- package/dist/meeting/index.js +41 -15
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +112 -70
- package/dist/meetings/index.js.map +1 -1
- package/dist/metrics/constants.js +3 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/reachability/clusterReachability.js +44 -358
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -1
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/reachabilityPeerConnection.js +445 -0
- package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
- package/dist/types/constants.d.ts +26 -21
- package/dist/types/hashTree/constants.d.ts +8 -0
- package/dist/types/hashTree/hashTree.d.ts +129 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +260 -0
- package/dist/types/hashTree/types.d.ts +25 -0
- package/dist/types/hashTree/utils.d.ts +9 -0
- package/dist/types/locus-info/index.d.ts +91 -42
- package/dist/types/locus-info/types.d.ts +46 -0
- package/dist/types/meeting/index.d.ts +22 -9
- package/dist/types/meetings/index.d.ts +9 -2
- package/dist/types/metrics/constants.d.ts +2 -0
- package/dist/types/reachability/clusterReachability.d.ts +10 -88
- package/dist/types/reachability/reachability.types.d.ts +12 -1
- package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -21
- package/src/constants.ts +13 -1
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTree.ts +463 -0
- package/src/hashTree/hashTreeParser.ts +1161 -0
- package/src/hashTree/types.ts +30 -0
- package/src/hashTree/utils.ts +42 -0
- package/src/locus-info/index.ts +556 -85
- package/src/locus-info/types.ts +48 -0
- package/src/meeting/index.ts +58 -26
- package/src/meeting/util.ts +1 -0
- package/src/meetings/index.ts +104 -51
- package/src/metrics/constants.ts +2 -0
- package/src/reachability/clusterReachability.ts +50 -347
- package/src/reachability/reachability.types.ts +15 -1
- package/src/reachability/reachabilityPeerConnection.ts +416 -0
- package/test/unit/spec/hashTree/hashTree.ts +655 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1532 -0
- package/test/unit/spec/hashTree/utils.ts +103 -0
- package/test/unit/spec/locus-info/index.js +667 -1
- package/test/unit/spec/meeting/index.js +91 -20
- package/test/unit/spec/meeting/utils.js +77 -0
- package/test/unit/spec/meetings/index.js +71 -26
- 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
|
+
};
|