@webex/plugin-meetings 3.11.0 → 3.12.0-llmrefactor.2
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 +60 -15
- 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 +128 -7
- 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 +332 -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 +2287 -1118
- 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 +2 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +369 -162
- 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/annotation/index.d.ts +19 -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 +271 -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/meetings/index.d.ts +42 -20
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- 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 +612 -165
- 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 +67 -15
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +145 -3
- 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 +217 -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 +1258 -222
- 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 +4 -2
- package/src/meetings/index.ts +319 -117
- package/src/meetings/meetings.types.ts +19 -0
- 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 +416 -12
- 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 +228 -134
- 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 +331 -15
- 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 +388 -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 +3694 -450
- 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 +19 -10
- package/test/unit/spec/meetings/index.js +1138 -86
- 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 +1087 -167
- package/test/unit/spec/webinar/utils.ts +39 -0
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import type { LocusSyncLatencyEventName } from '@webex/internal-plugin-metrics';
|
|
1
2
|
import HashTree from './hashTree';
|
|
2
3
|
import { Enum } from '../constants';
|
|
3
|
-
import { HashTreeObject } from './types';
|
|
4
|
+
import { HtMeta, HashTreeObject } from './types';
|
|
4
5
|
import { LocusDTO } from '../locus-info/types';
|
|
6
|
+
export declare enum SyncAllBackoffType {
|
|
7
|
+
NONE = "none",
|
|
8
|
+
ONLY_LLM = "onlyLLM",
|
|
9
|
+
ALL = "all"
|
|
10
|
+
}
|
|
5
11
|
export interface DataSet {
|
|
6
12
|
url: string;
|
|
7
13
|
root: string;
|
|
@@ -13,9 +19,11 @@ export interface DataSet {
|
|
|
13
19
|
maxMs: number;
|
|
14
20
|
exponent: number;
|
|
15
21
|
};
|
|
22
|
+
heartbeatIntervalMs?: number;
|
|
16
23
|
}
|
|
17
24
|
export interface RootHashMessage {
|
|
18
25
|
dataSets: Array<DataSet>;
|
|
26
|
+
heartbeatIntervalMs?: number;
|
|
19
27
|
}
|
|
20
28
|
export interface HashTreeMessage {
|
|
21
29
|
dataSets: Array<DataSet>;
|
|
@@ -23,20 +31,77 @@ export interface HashTreeMessage {
|
|
|
23
31
|
locusStateElements?: Array<HashTreeObject>;
|
|
24
32
|
locusSessionId?: string;
|
|
25
33
|
locusUrl: string;
|
|
34
|
+
heartbeatIntervalMs?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface VisibleDataSetInfo {
|
|
37
|
+
name: string;
|
|
38
|
+
url: string;
|
|
39
|
+
dataChannelUrl?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface Metadata {
|
|
42
|
+
htMeta: HtMeta;
|
|
43
|
+
visibleDataSets: VisibleDataSetInfo[];
|
|
26
44
|
}
|
|
27
45
|
interface InternalDataSet extends DataSet {
|
|
28
46
|
hashTree?: HashTree;
|
|
29
47
|
timer?: ReturnType<typeof setTimeout>;
|
|
48
|
+
heartbeatWatchdogTimer?: ReturnType<typeof setTimeout>;
|
|
49
|
+
syncAbortController?: AbortController;
|
|
30
50
|
}
|
|
31
51
|
type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
|
|
52
|
+
type GenerateTrackingId = () => string | undefined;
|
|
32
53
|
export declare const LocusInfoUpdateType: {
|
|
33
54
|
readonly OBJECTS_UPDATED: "OBJECTS_UPDATED";
|
|
34
55
|
readonly MEETING_ENDED: "MEETING_ENDED";
|
|
56
|
+
readonly LOCUS_NOT_FOUND: "LOCUS_NOT_FOUND";
|
|
35
57
|
};
|
|
36
58
|
export type LocusInfoUpdateType = Enum<typeof LocusInfoUpdateType>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
59
|
+
interface LocusUpdatePayloads {
|
|
60
|
+
[LocusInfoUpdateType.OBJECTS_UPDATED]: {
|
|
61
|
+
updatedObjects: HashTreeObject[];
|
|
62
|
+
};
|
|
63
|
+
[LocusInfoUpdateType.MEETING_ENDED]: unknown;
|
|
64
|
+
[LocusInfoUpdateType.LOCUS_NOT_FOUND]: unknown;
|
|
65
|
+
}
|
|
66
|
+
export type LocusInfoUpdate = {
|
|
67
|
+
[K in keyof LocusUpdatePayloads]: {
|
|
68
|
+
updateType: K;
|
|
69
|
+
} & LocusUpdatePayloads[K];
|
|
70
|
+
}[keyof LocusUpdatePayloads];
|
|
71
|
+
export type LocusInfoUpdateCallback = (update: LocusInfoUpdate) => void;
|
|
72
|
+
export type SyncLatencyTracker = {
|
|
73
|
+
saveLatency: (key: 'internal.client.locus.sync.random.backoff', value: number, options: {
|
|
74
|
+
meetingId: string;
|
|
75
|
+
dataSetName: string;
|
|
76
|
+
}) => void;
|
|
77
|
+
saveTimestamp: (options: {
|
|
78
|
+
key: LocusSyncLatencyEventName;
|
|
79
|
+
options: {
|
|
80
|
+
meetingId: string;
|
|
81
|
+
dataSetName: string;
|
|
82
|
+
trackingId?: string;
|
|
83
|
+
};
|
|
84
|
+
}) => void;
|
|
85
|
+
clearLocusSyncLatency: (dataSetName: string, meetingId: string, trackingId?: string) => void;
|
|
86
|
+
};
|
|
87
|
+
export type HashTreeParserCallbacks = {
|
|
88
|
+
locusInfoUpdateCallback: LocusInfoUpdateCallback;
|
|
89
|
+
syncLatencyTracker?: SyncLatencyTracker;
|
|
90
|
+
generateTrackingId?: GenerateTrackingId;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* This error is thrown if we receive information that the meeting has ended while we're processing some hash messages.
|
|
94
|
+
* It's handled internally by HashTreeParser and results in MEETING_ENDED being sent up.
|
|
95
|
+
*/
|
|
96
|
+
export declare class MeetingEndedError extends Error {
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* This error is thrown when a 404 is received from Locus hash tree endpoints, indicating that the locus URL
|
|
100
|
+
* is no longer valid (e.g. participant moved to a breakout room, or meeting ended).
|
|
101
|
+
* It's handled internally by HashTreeParser and results in LOCUS_NOT_FOUND being sent up.
|
|
102
|
+
*/
|
|
103
|
+
export declare class LocusNotFoundError extends Error {
|
|
104
|
+
}
|
|
40
105
|
/**
|
|
41
106
|
* Parses hash tree eventing locus data
|
|
42
107
|
*/
|
|
@@ -44,9 +109,18 @@ declare class HashTreeParser {
|
|
|
44
109
|
dataSets: Record<string, InternalDataSet>;
|
|
45
110
|
visibleDataSetsUrl: string;
|
|
46
111
|
webexRequest: WebexRequestMethod;
|
|
47
|
-
|
|
48
|
-
|
|
112
|
+
private callbacks;
|
|
113
|
+
private syncLatencyMeetingId;
|
|
114
|
+
visibleDataSets: VisibleDataSetInfo[];
|
|
49
115
|
debugId: string;
|
|
116
|
+
private excludedDataSets;
|
|
117
|
+
state: 'active' | 'stopped';
|
|
118
|
+
private syncQueue;
|
|
119
|
+
private isSyncInProgress;
|
|
120
|
+
private syncAllBackoffType;
|
|
121
|
+
private dataSetsSyncedDuringBackoff;
|
|
122
|
+
private syncQueueProcessingPromise;
|
|
123
|
+
private topLevelHeartbeatIntervalMs?;
|
|
50
124
|
/**
|
|
51
125
|
* Constructor for HashTreeParser
|
|
52
126
|
* @param {Object} options
|
|
@@ -57,34 +131,56 @@ declare class HashTreeParser {
|
|
|
57
131
|
dataSets: Array<DataSet>;
|
|
58
132
|
locus: any;
|
|
59
133
|
};
|
|
134
|
+
metadata: Metadata | null;
|
|
60
135
|
webexRequest: WebexRequestMethod;
|
|
61
|
-
|
|
136
|
+
callbacks: HashTreeParserCallbacks;
|
|
62
137
|
debugId: string;
|
|
138
|
+
excludedDataSets?: string[];
|
|
139
|
+
syncLatencyMeetingId: string;
|
|
63
140
|
});
|
|
141
|
+
/**
|
|
142
|
+
* Sets the visible data sets list for the HashTreeParser. This method should be called only at the start, to initialize
|
|
143
|
+
* the visible data sets, before any message processsing, so for example from the constructor or when resuming the parser.
|
|
144
|
+
*
|
|
145
|
+
* @param {Array<VisibleDataSetInfo>} visibleDataSets - The visible data sets to set
|
|
146
|
+
* @param {Array<DataSet>} dataSets - The "dataSets" list from Locus (yes, Locus sends visibleDataSets and dataSets as separate lists and they can differ)
|
|
147
|
+
* @returns {void}
|
|
148
|
+
*/
|
|
149
|
+
private setVisibleDataSets;
|
|
150
|
+
/**
|
|
151
|
+
* Checks if the given data set name is in the list of visible data sets
|
|
152
|
+
* @param {string} dataSetName data set name to check
|
|
153
|
+
* @returns {Boolean} True if the data set is visible, false otherwise
|
|
154
|
+
*/
|
|
155
|
+
private isVisibleDataSet;
|
|
156
|
+
/**
|
|
157
|
+
* Checks if the given data set name is in the excluded list
|
|
158
|
+
* @param {string} dataSetName data set name to check
|
|
159
|
+
* @returns {boolean} True if the data set is excluded, false otherwise
|
|
160
|
+
*/
|
|
161
|
+
private isExcludedDataSet;
|
|
162
|
+
/**
|
|
163
|
+
* Adds a data set to the visible data sets list, unless it is in the excluded list.
|
|
164
|
+
* @param {VisibleDataSetInfo} dataSetInfo data set info to add
|
|
165
|
+
* @returns {boolean} True if the data set was added, false if it was excluded
|
|
166
|
+
*/
|
|
167
|
+
private addToVisibleDataSetsList;
|
|
64
168
|
/**
|
|
65
169
|
* Initializes a new visible data set by creating a hash tree for it, adding it to all the internal structures,
|
|
66
170
|
* and sending an initial sync request to Locus with empty leaf data - that will trigger Locus to gives us all the data
|
|
67
171
|
* from that dataset (in the response or via messages).
|
|
68
172
|
*
|
|
69
|
-
* @param {
|
|
173
|
+
* @param {VisibleDataSetInfo} visibleDataSetInfo Information about the new visible data set
|
|
174
|
+
* @param {DataSet} dataSetInfo The new data set to be added
|
|
70
175
|
* @returns {Promise}
|
|
71
176
|
*/
|
|
72
177
|
private initializeNewVisibleDataSet;
|
|
73
178
|
/**
|
|
74
|
-
*
|
|
179
|
+
* Queries Locus for all up-to-date information about all visible data sets
|
|
75
180
|
*
|
|
76
|
-
* @param {string} datasetName - name of the dataset for which to send the request
|
|
77
|
-
* @param {string} debugText - text to include in logs
|
|
78
181
|
* @returns {Promise}
|
|
79
182
|
*/
|
|
80
|
-
private
|
|
81
|
-
/**
|
|
82
|
-
* Queries Locus for information about all the data sets
|
|
83
|
-
*
|
|
84
|
-
* @param {string} url - url from which we can get info about all data sets
|
|
85
|
-
* @returns {Promise}
|
|
86
|
-
*/
|
|
87
|
-
private getAllDataSetsMetadata;
|
|
183
|
+
private getAllVisibleDataSetsFromLocus;
|
|
88
184
|
/**
|
|
89
185
|
* Initializes the hash tree parser from a message received from Locus.
|
|
90
186
|
*
|
|
@@ -105,7 +201,7 @@ declare class HashTreeParser {
|
|
|
105
201
|
/**
|
|
106
202
|
* Initializes data sets by doing an initialization sync on each visible data set that doesn't have a hash tree yet.
|
|
107
203
|
*
|
|
108
|
-
* @param {DataSet[]}
|
|
204
|
+
* @param {DataSet[]} visibleDataSets Array of visible DataSet objects to initialize
|
|
109
205
|
* @param {string} debugText Text to include in logs for debugging purposes
|
|
110
206
|
* @returns {Promise}
|
|
111
207
|
*/
|
|
@@ -121,6 +217,15 @@ declare class HashTreeParser {
|
|
|
121
217
|
* @returns {any} - An object mapping dataset names to arrays of leaf data
|
|
122
218
|
*/
|
|
123
219
|
private analyzeLocusHtMeta;
|
|
220
|
+
/**
|
|
221
|
+
* Analyzes the Metadata object that is sent outside of Locus object, and appends its data to passed in leafInfo
|
|
222
|
+
* structure.
|
|
223
|
+
*
|
|
224
|
+
* @param {Record<string, LeafInfo[]>} leafInfo the structure to which the Metadata info will be appended
|
|
225
|
+
* @param {Metadata} metadata Metadata object
|
|
226
|
+
* @returns {void}
|
|
227
|
+
*/
|
|
228
|
+
private analyzeMetadata;
|
|
124
229
|
/**
|
|
125
230
|
* Checks if the provided hash tree message indicates the end of the meeting and that there won't be any more updates.
|
|
126
231
|
*
|
|
@@ -135,6 +240,29 @@ declare class HashTreeParser {
|
|
|
135
240
|
* @returns {void}
|
|
136
241
|
*/
|
|
137
242
|
private handleRootHashHeartBeatMessage;
|
|
243
|
+
/**
|
|
244
|
+
* Handles known errors that can happen during syncs
|
|
245
|
+
*
|
|
246
|
+
* @param {any} error - The error to handle
|
|
247
|
+
* @returns {boolean} true if the error was recognized and handled, false otherwise
|
|
248
|
+
*/
|
|
249
|
+
private handleSyncErrors;
|
|
250
|
+
/**
|
|
251
|
+
* Asynchronously initializes new visible data sets
|
|
252
|
+
*
|
|
253
|
+
* @param {VisibleDataSetInfo[]} dataSetsRequiringInitialization list of datasets to initialize
|
|
254
|
+
* @returns {void}
|
|
255
|
+
*/
|
|
256
|
+
private queueInitForNewVisibleDataSets;
|
|
257
|
+
/**
|
|
258
|
+
* Handles updates to Metadata object that we receive from Locus via other means than messages. Right now
|
|
259
|
+
* that means only in the API response alongside locus object.
|
|
260
|
+
*
|
|
261
|
+
* @param {Metadata} metadata received in Locus update other than a message (for example in an API response)
|
|
262
|
+
* @param {HashTreeObject[]} updatedObjects a list of updated hash tree objects to which any updates resulting from new Metadata will be added
|
|
263
|
+
* @returns {void}
|
|
264
|
+
*/
|
|
265
|
+
handleMetadataUpdate(metadata: Metadata, updatedObjects: HashTreeObject[]): void;
|
|
138
266
|
/**
|
|
139
267
|
* This method should be called when we receive a partial locus DTO that contains dataSets and htMeta information
|
|
140
268
|
* It updates the hash trees with the new leaf data based on the received Locus
|
|
@@ -145,6 +273,7 @@ declare class HashTreeParser {
|
|
|
145
273
|
handleLocusUpdate(update: {
|
|
146
274
|
dataSets?: Array<DataSet>;
|
|
147
275
|
locus: any;
|
|
276
|
+
metadata?: Metadata;
|
|
148
277
|
}): void;
|
|
149
278
|
/**
|
|
150
279
|
* Updates the internal data set information based on the received data set from Locus.
|
|
@@ -153,6 +282,14 @@ declare class HashTreeParser {
|
|
|
153
282
|
* @returns {void}
|
|
154
283
|
*/
|
|
155
284
|
private updateDataSetInfo;
|
|
285
|
+
/**
|
|
286
|
+
* Updates the leaf count for a data set, resizing its hash tree accordingly.
|
|
287
|
+
*
|
|
288
|
+
* @param {InternalDataSet} dataSet - The data set to update
|
|
289
|
+
* @param {number} newLeafCount - The new leaf count
|
|
290
|
+
* @returns {void}
|
|
291
|
+
*/
|
|
292
|
+
private updateDataSetLeafCount;
|
|
156
293
|
/**
|
|
157
294
|
* Checks for changes in the visible data sets based on the updated objects.
|
|
158
295
|
* @param {HashTreeObject[]} updatedObjects - The list of updated hash tree objects.
|
|
@@ -175,18 +312,17 @@ declare class HashTreeParser {
|
|
|
175
312
|
* visible data sets and they require async initialization, the names of these data sets
|
|
176
313
|
* are returned in an array.
|
|
177
314
|
*
|
|
178
|
-
* @param {
|
|
179
|
-
* @param {
|
|
315
|
+
* @param {VisibleDataSetInfo[]} removedDataSets - The list of removed data sets.
|
|
316
|
+
* @param {VisibleDataSetInfo[]} addedDataSets - The list of added data sets.
|
|
180
317
|
* @param {HashTreeObject[]} updatedObjects - The list of updated hash tree objects to which changes will be added.
|
|
181
|
-
* @returns {
|
|
318
|
+
* @returns {VisibleDataSetInfo[]} list of data sets that couldn't be initialized synchronously
|
|
182
319
|
*/
|
|
183
320
|
private processVisibleDataSetChanges;
|
|
184
321
|
/**
|
|
185
322
|
* Adds entries to the passed in updateObjects array
|
|
186
323
|
* for the changes that result from adding and removing visible data sets.
|
|
187
324
|
*
|
|
188
|
-
* @param {
|
|
189
|
-
* @param {string[]} addedDataSets - The list of added data sets.
|
|
325
|
+
* @param {VisibleDataSetInfo[]} addedDataSets - The list of added data sets.
|
|
190
326
|
* @returns {Promise<void>}
|
|
191
327
|
*/
|
|
192
328
|
private initializeNewVisibleDataSets;
|
|
@@ -195,7 +331,7 @@ declare class HashTreeParser {
|
|
|
195
331
|
*
|
|
196
332
|
* @param {HashTreeMessage} message - The hash tree message containing data sets and objects to be processed
|
|
197
333
|
* @param {string} [debugText] - Optional debug text to include in logs
|
|
198
|
-
* @returns {
|
|
334
|
+
* @returns {HashTreeObject[]} list of hash tree objects that were updated as a result of processing the message
|
|
199
335
|
*/
|
|
200
336
|
private parseMessage;
|
|
201
337
|
/**
|
|
@@ -205,7 +341,16 @@ declare class HashTreeParser {
|
|
|
205
341
|
* @param {string} [debugText] - Optional debug text to include in logs
|
|
206
342
|
* @returns {void}
|
|
207
343
|
*/
|
|
208
|
-
handleMessage(message: HashTreeMessage, debugText?: string):
|
|
344
|
+
handleMessage(message: HashTreeMessage, debugText?: string): void;
|
|
345
|
+
/**
|
|
346
|
+
* Checks if Locus sync latency metrics should be collected for a dataset.
|
|
347
|
+
*
|
|
348
|
+
* @param {string} dataSetName dataset name
|
|
349
|
+
* @param {boolean} [isInitialization=false] whether this is an initialization sync
|
|
350
|
+
* @returns {boolean}
|
|
351
|
+
*/
|
|
352
|
+
private shouldCollectSyncMetrics;
|
|
353
|
+
private saveSyncBackoffLatency;
|
|
209
354
|
/**
|
|
210
355
|
* Calls the updateInfo callback if there are any updates to report
|
|
211
356
|
*
|
|
@@ -220,6 +365,103 @@ declare class HashTreeParser {
|
|
|
220
365
|
* @returns {number} - A weighted backoff time based on the provided configuration, using algorithm supplied by Locus team
|
|
221
366
|
*/
|
|
222
367
|
private getWeightedBackoffTime;
|
|
368
|
+
/**
|
|
369
|
+
* Returns a copy of a hash tree message restricted to a single dataset, keeping only the
|
|
370
|
+
* requested dataset and the elements belonging to it. Used to strip out datasets that Locus
|
|
371
|
+
* may include in a sync response but that we didn't request (e.g. "unjoined" sharing elements
|
|
372
|
+
* with "main"), which would otherwise be applied once per dataset.
|
|
373
|
+
*
|
|
374
|
+
* @param {HashTreeMessage} message the sync response message
|
|
375
|
+
* @param {string} dataSetName the dataset that was requested
|
|
376
|
+
* @returns {HashTreeMessage} a new message containing only the requested dataset
|
|
377
|
+
*/
|
|
378
|
+
private filterMessageToDataSet;
|
|
379
|
+
/**
|
|
380
|
+
* Performs a sync for the given data set.
|
|
381
|
+
*
|
|
382
|
+
* @param {InternalDataSet} dataSet - The data set to sync
|
|
383
|
+
* @param {string} reason - The reason for the sync (used for logging)
|
|
384
|
+
* @param {boolean} [isInitialization] - Whether this is an initialization sync (sends empty leaves data instead of comparing hashes)
|
|
385
|
+
* @returns {Promise<void>}
|
|
386
|
+
*/
|
|
387
|
+
private performSync;
|
|
388
|
+
/**
|
|
389
|
+
* Cancels any pending or in-flight syncs for the specified data sets.
|
|
390
|
+
* This removes matching entries from the sync queue and aborts any in-flight sync HTTP requests.
|
|
391
|
+
*
|
|
392
|
+
* @param {string[]} dataSetNames - The names of the data sets to cancel syncs for
|
|
393
|
+
* @returns {void}
|
|
394
|
+
*/
|
|
395
|
+
private cancelPendingSyncsForDataSets;
|
|
396
|
+
/**
|
|
397
|
+
* If a syncAllDatasets backoff sleep is in progress, marks the given data sets to be skipped
|
|
398
|
+
* after the sleep completes.
|
|
399
|
+
*
|
|
400
|
+
* @param {string[]} dataSetNames - The names of the data sets to mark
|
|
401
|
+
* @returns {void}
|
|
402
|
+
*/
|
|
403
|
+
private markDataSetsForSyncAllBackoffSkip;
|
|
404
|
+
/**
|
|
405
|
+
* Aborts any in-flight sync HTTP requests for the specified data sets.
|
|
406
|
+
*
|
|
407
|
+
* @param {string[]} dataSetNames - The names of the data sets whose syncs should be aborted
|
|
408
|
+
* @returns {void}
|
|
409
|
+
*/
|
|
410
|
+
private abortInFlightSyncs;
|
|
411
|
+
/**
|
|
412
|
+
* Enqueues a sync for the given data set. If the data set is already in the queue, the request is ignored.
|
|
413
|
+
* This ensures that all syncs are executed sequentially and no more than 1 sync runs at a time.
|
|
414
|
+
*
|
|
415
|
+
* @param {string} dataSetName - The name of the data set to sync
|
|
416
|
+
* @param {string} reason - The reason for the sync (used for logging)
|
|
417
|
+
* @param {boolean} [isInitialization=false] - Whether this is an initialization sync (uses empty leaves data instead of hash comparison)
|
|
418
|
+
* @returns {void}
|
|
419
|
+
*/
|
|
420
|
+
private enqueueSyncForDataset;
|
|
421
|
+
/**
|
|
422
|
+
* Processes the sync queue sequentially. Only one instance of this method runs at a time.
|
|
423
|
+
*
|
|
424
|
+
* @returns {Promise<void>}
|
|
425
|
+
*/
|
|
426
|
+
private processSyncQueue;
|
|
427
|
+
/**
|
|
428
|
+
* sets the backoff type for syncAllDatasets calls, which determines the scope of datasets that will be synced after the backoff delay.
|
|
429
|
+
*
|
|
430
|
+
* @param {boolean} onlyLLM - Whether the backoff is for a syncAllDatasets call that is syncing only LLM datasets
|
|
431
|
+
* @returns {void}
|
|
432
|
+
*/
|
|
433
|
+
private setSyncAllBackoffType;
|
|
434
|
+
/**
|
|
435
|
+
* Checks if a syncAll backoff is already in progress. If so, upgrades the scope from
|
|
436
|
+
* onlyLLM to all datasets when the new call has a broader scope.
|
|
437
|
+
*
|
|
438
|
+
* @param {boolean} onlyLLM - Whether the current call is for LLM datasets only
|
|
439
|
+
* @returns {boolean} true if a backoff is already pending (caller should return early)
|
|
440
|
+
*/
|
|
441
|
+
private tryUpgradePendingBackoff;
|
|
442
|
+
/**
|
|
443
|
+
* Syncs all data sets that have hash trees, one by one in sequence, using the priority order
|
|
444
|
+
* provided by sortByInitPriority().
|
|
445
|
+
*
|
|
446
|
+
* If a call is already waiting in the backoff delay phase, a new call with a broader scope
|
|
447
|
+
* (onlyLLM=false) will upgrade the pending scope, and the dataset list will be computed after
|
|
448
|
+
* the backoff using the upgraded scope. After the backoff, the sync queue handles deduplication
|
|
449
|
+
* so no guard is needed.
|
|
450
|
+
*
|
|
451
|
+
* @param {Object} [options={}] - Options for syncing
|
|
452
|
+
* @param {boolean} [options.onlyLLM=false] - Whether to sync only LLM based data sets
|
|
453
|
+
* @returns {Promise<void>}
|
|
454
|
+
*/
|
|
455
|
+
syncAllDatasets(options?: {
|
|
456
|
+
onlyLLM?: boolean;
|
|
457
|
+
}): Promise<void>;
|
|
458
|
+
/**
|
|
459
|
+
* Returns the list of data sets that have hash trees, sorted by the priority order provided by sortByInitPriority().
|
|
460
|
+
*
|
|
461
|
+
* @param {boolean} onlyLLM - Whether to include only LLM based data sets
|
|
462
|
+
* @returns {Array<{name: string, backoff: {maxMs: number, exponent: number}}>} The sorted list of data sets with their backoff configurations
|
|
463
|
+
*/
|
|
464
|
+
private getSortedDataSetsWithHashTrees;
|
|
223
465
|
/**
|
|
224
466
|
* Runs the sync algorithm for the given data set.
|
|
225
467
|
*
|
|
@@ -227,23 +469,66 @@ declare class HashTreeParser {
|
|
|
227
469
|
* @returns {void}
|
|
228
470
|
*/
|
|
229
471
|
private runSyncAlgorithm;
|
|
472
|
+
/**
|
|
473
|
+
* Resets the heartbeat watchdog timers for the specified data sets. Each data set has its own
|
|
474
|
+
* watchdog timer that monitors whether heartbeats are being received within the expected interval.
|
|
475
|
+
* If a heartbeat is not received for a specific data set within heartbeatIntervalMs plus
|
|
476
|
+
* a backoff-calculated time, the sync algorithm is initiated for that data set
|
|
477
|
+
*
|
|
478
|
+
* @param {Array<DataSet>} receivedDataSets - The data sets from the received message for which watchdog timers should be reset
|
|
479
|
+
* @returns {void}
|
|
480
|
+
*/
|
|
481
|
+
private resetHeartbeatWatchdogs;
|
|
230
482
|
/**
|
|
231
483
|
* Stops all timers for the data sets to prevent any further sync attempts.
|
|
232
484
|
* @returns {void}
|
|
233
485
|
*/
|
|
234
486
|
private stopAllTimers;
|
|
487
|
+
/**
|
|
488
|
+
* Stops the HashTreeParser, preventing it from processing any further messages and clearing all timers.
|
|
489
|
+
* It also clears all the hash trees, so if the parser is resumed later, it will need to do a sync
|
|
490
|
+
* to be up-to-date.
|
|
491
|
+
* @returns {void}
|
|
492
|
+
*/
|
|
493
|
+
stop(): void;
|
|
494
|
+
/**
|
|
495
|
+
* Cleans up the HashTreeParser, stopping all timers and clearing all internal state.
|
|
496
|
+
* After calling this, the parser should not be used anymore.
|
|
497
|
+
* @returns {void}
|
|
498
|
+
*/
|
|
499
|
+
cleanUp(): void;
|
|
500
|
+
/**
|
|
501
|
+
* Resumes the HashTreeParser that was previously stopped, using a hash tree message.
|
|
502
|
+
* @param {HashTreeMessage} message - The message to resume with, it must contain metadata with visible data sets info
|
|
503
|
+
* @returns {void}
|
|
504
|
+
*/
|
|
505
|
+
resumeFromMessage(message: HashTreeMessage): void;
|
|
506
|
+
/**
|
|
507
|
+
* Resumes the HashTreeParser that was previously stopped, using a Locus API response.
|
|
508
|
+
* Unlike resumeFromMessage(), this does not require metadata/dataSets in the input,
|
|
509
|
+
* as it fetches all necessary information from Locus via initializeFromGetLociResponse.
|
|
510
|
+
* @param {LocusDTO} locus - locus object from an API response
|
|
511
|
+
* @returns {Promise}
|
|
512
|
+
*/
|
|
513
|
+
resumeFromApiResponse(locus: LocusDTO): Promise<void>;
|
|
514
|
+
private checkForSentinelHttpResponse;
|
|
235
515
|
/**
|
|
236
516
|
* Gets the current hashes from the locus for a specific data set.
|
|
237
517
|
* @param {string} dataSetName
|
|
238
|
-
* @
|
|
518
|
+
* @param {string} currentRootHash
|
|
519
|
+
* @param {Object} [trackingIds] tracking ids for the /hashtree request
|
|
520
|
+
* @param {string} [trackingIds.requestTrackingId] tracking id forced onto the /hashtree HTTP request header (kept distinct from the /sync request's tracking id)
|
|
521
|
+
* @param {string} [trackingIds.metricTrackingId] tracking id (the /sync request's) under which the hashtree latency milestones are recorded, so they belong to the same sync latency record
|
|
522
|
+
* @returns {Object|null} An object containing the hashes and leaf count, or null if the hashes match and no sync is needed
|
|
239
523
|
*/
|
|
240
524
|
private getHashesFromLocus;
|
|
241
525
|
/**
|
|
242
526
|
* Sends a sync request to Locus for the specified data set.
|
|
243
527
|
*
|
|
244
528
|
* @param {InternalDataSet} dataSet The data set to sync.
|
|
245
|
-
* @param {
|
|
246
|
-
* @
|
|
529
|
+
* @param {Object} options Either `{ isInitialization: true }` for init syncs (uses leafCount=1 with empty leaf data) or `{ mismatchedLeavesData }` for normal syncs.
|
|
530
|
+
* @param {string} [trackingId] tracking id
|
|
531
|
+
* @returns {Promise<HashTreeMessage | null>}
|
|
247
532
|
*/
|
|
248
533
|
private sendSyncRequestToLocus;
|
|
249
534
|
}
|
|
@@ -8,6 +8,8 @@ export declare const ObjectType: {
|
|
|
8
8
|
readonly fullState: "fullstate";
|
|
9
9
|
readonly links: "links";
|
|
10
10
|
readonly control: "controlentry";
|
|
11
|
+
readonly metadata: "metadata";
|
|
12
|
+
readonly embeddedApp: "embeddedapp";
|
|
11
13
|
};
|
|
12
14
|
export type ObjectType = Enum<typeof ObjectType>;
|
|
13
15
|
export declare const ObjectTypeToLocusKeyMap: {
|
|
@@ -18,6 +20,7 @@ export declare const ObjectTypeToLocusKeyMap: {
|
|
|
18
20
|
participant: string;
|
|
19
21
|
mediashare: string;
|
|
20
22
|
controlentry: string;
|
|
23
|
+
embeddedapp: string;
|
|
21
24
|
};
|
|
22
25
|
export interface HtMeta {
|
|
23
26
|
elementId: {
|
|
@@ -5,6 +5,12 @@ import { HashTreeObject } from './types';
|
|
|
5
5
|
* @returns {boolean} True if the object is of type "self", false otherwise
|
|
6
6
|
*/
|
|
7
7
|
export declare function isSelf(object: HashTreeObject): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the given hash tree object is of type "Metadata"
|
|
10
|
+
* @param {HashTreeObject} object object to check
|
|
11
|
+
* @returns {boolean} True if the object is of type "Metadata", false otherwise
|
|
12
|
+
*/
|
|
13
|
+
export declare function isMetadata(object: HashTreeObject): boolean;
|
|
8
14
|
/**
|
|
9
15
|
* Analyzes given part of Locus DTO recursively and delete any nested objects that have their own htMeta
|
|
10
16
|
*
|
|
@@ -14,3 +20,21 @@ export declare function isSelf(object: HashTreeObject): boolean;
|
|
|
14
20
|
* @returns {void}
|
|
15
21
|
*/
|
|
16
22
|
export declare const deleteNestedObjectsWithHtMeta: (currentLocusPart: any, parent?: any, currentKey?: string | number) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Reorders items so that those matching the given priority list come first (in priority order),
|
|
25
|
+
* followed by everything else in their original order.
|
|
26
|
+
*
|
|
27
|
+
* @param {Array<T>} items - The items to reorder
|
|
28
|
+
* @param {string[]} priority - Ordered list of names that should come first
|
|
29
|
+
* @returns {Array<T>} A new array with prioritized items first
|
|
30
|
+
*/
|
|
31
|
+
export declare function sortByInitPriority<T extends {
|
|
32
|
+
name: string;
|
|
33
|
+
}>(items: T[], priority: string[]): T[];
|
|
34
|
+
/**
|
|
35
|
+
* Sleeps for the specified amount of milliseconds
|
|
36
|
+
*
|
|
37
|
+
* @param {number} ms amount of milliseconds to sleep
|
|
38
|
+
* @returns {Promise<void>} A promise that resolves after the specified delay
|
|
39
|
+
*/
|
|
40
|
+
export declare function sleep(ms: number): Promise<void>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,6 +16,10 @@ export * as REACTIONS from './reactions/reactions';
|
|
|
16
16
|
export * as sdkAnnotationTypes from './annotation/annotation.types';
|
|
17
17
|
export * as MeetingInfoV2 from './meeting-info/meeting-info-v2';
|
|
18
18
|
export { type Reaction } from './reactions/reactions.type';
|
|
19
|
+
export { SitePreferenceSelectOption } from './meetings/meetings.types';
|
|
20
|
+
export type { FetchSitePreferencesMeViaSiteOptions, SitePreferencesResponse, } from './meetings/meetings.types';
|
|
21
|
+
export type { Interpreter, InterpreterUsingResource } from './interpretation/interpretation.types';
|
|
19
22
|
export { CaptchaError, IntentToJoinError, JoinMeetingError, PasswordError, PermissionError, ReclaimHostIsHostAlreadyError, ReclaimHostNotAllowedError, ReclaimHostNotSupportedError, ReclaimHostEmptyWrongKeyError, Meeting, MeetingInfoUtil, JoinWebinarError, SdpResponseTimeoutError, };
|
|
20
23
|
export { RemoteMedia } from './multistream/remoteMedia';
|
|
21
24
|
export { default as TriggerProxy } from './common/events/trigger-proxy';
|
|
25
|
+
export { getAIEnablementApprover } from './aiEnableRequest/utils';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2026 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
import { Interceptor } from '@webex/http-core';
|
|
5
|
+
/**
|
|
6
|
+
* @class
|
|
7
|
+
*/
|
|
8
|
+
export default class DataChannelAuthTokenInterceptor extends Interceptor {
|
|
9
|
+
private _refreshDataChannelToken;
|
|
10
|
+
private _isDataChannelTokenEnabled;
|
|
11
|
+
constructor(options: any);
|
|
12
|
+
/**
|
|
13
|
+
* @returns {DataChannelAuthTokenInterceptor}
|
|
14
|
+
*/
|
|
15
|
+
static create(): DataChannelAuthTokenInterceptor;
|
|
16
|
+
private getRetryKey;
|
|
17
|
+
private getHeader;
|
|
18
|
+
/**
|
|
19
|
+
* Intercepts outgoing requests and refreshes the Data-Channel-Auth-Token
|
|
20
|
+
* if the current JWT token is expired before the request is sent.
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} options - The original request options.
|
|
23
|
+
* @returns {Promise<Object>} Updated request options with refreshed token if needed.
|
|
24
|
+
*/
|
|
25
|
+
onRequest(options: any): Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* Intercept responses and, on 401/403 with `Data-Channel-Auth-Token` header,
|
|
28
|
+
* attempt to refresh the data channel token and retry the original request once.
|
|
29
|
+
*
|
|
30
|
+
* @param {Object} options
|
|
31
|
+
* @param {Object} reason
|
|
32
|
+
* @returns {Promise<HttpResponse>}
|
|
33
|
+
*/
|
|
34
|
+
onResponseError(options: any, reason: any): Promise<unknown>;
|
|
35
|
+
/**
|
|
36
|
+
* Retry the failed data channel request after a delay.
|
|
37
|
+
* Refreshes the Data-Channel-Auth-Token and re-sends the original request.
|
|
38
|
+
*
|
|
39
|
+
* @param {Object} options - Original request options.
|
|
40
|
+
* @returns {Promise<HttpResponse>} - Resolves on successful retry.
|
|
41
|
+
*/
|
|
42
|
+
refreshTokenAndRetryWithDelay(options: any): Promise<unknown>;
|
|
43
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import LocusRetryStatusInterceptor from './locusRetry';
|
|
2
2
|
import LocusRouteTokenInterceptor from './locusRouteToken';
|
|
3
|
-
|
|
3
|
+
import DataChannelAuthTokenInterceptor from './dataChannelAuthToken';
|
|
4
|
+
export { LocusRetryStatusInterceptor, LocusRouteTokenInterceptor, DataChannelAuthTokenInterceptor };
|
|
@@ -11,11 +11,11 @@ export default class LocusRetryStatusInterceptor extends Interceptor {
|
|
|
11
11
|
*/
|
|
12
12
|
static create(): LocusRetryStatusInterceptor;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @param {
|
|
16
|
-
* @
|
|
17
|
-
* @returns {Promise<WebexHttpError>}
|
|
14
|
+
* Check whether a URI is a Locus /hashtree or /sync endpoint.
|
|
15
|
+
* @param {string} uri
|
|
16
|
+
* @returns {boolean}
|
|
18
17
|
*/
|
|
18
|
+
private static isLocusHashtreeOrSync;
|
|
19
19
|
onResponseError(options: any, reason: any): Promise<unknown>;
|
|
20
20
|
/**
|
|
21
21
|
* Handle retries for locus service unavailable errors
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isJwtTokenExpired: (token: string) => boolean;
|