@webex/plugin-meetings 3.11.0-webex-services-ready.1 → 3.12.0-mobius-socket.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 (171) hide show
  1. package/dist/aiEnableRequest/index.js +184 -0
  2. package/dist/aiEnableRequest/index.js.map +1 -0
  3. package/dist/aiEnableRequest/utils.js +36 -0
  4. package/dist/aiEnableRequest/utils.js.map +1 -0
  5. package/dist/annotation/index.js +14 -5
  6. package/dist/annotation/index.js.map +1 -1
  7. package/dist/breakouts/breakout.js +1 -1
  8. package/dist/breakouts/index.js +1 -1
  9. package/dist/config.js +7 -2
  10. package/dist/config.js.map +1 -1
  11. package/dist/constants.js +28 -6
  12. package/dist/constants.js.map +1 -1
  13. package/dist/hashTree/constants.js +3 -1
  14. package/dist/hashTree/constants.js.map +1 -1
  15. package/dist/hashTree/hashTree.js +18 -0
  16. package/dist/hashTree/hashTree.js.map +1 -1
  17. package/dist/hashTree/hashTreeParser.js +868 -419
  18. package/dist/hashTree/hashTreeParser.js.map +1 -1
  19. package/dist/hashTree/types.js +4 -2
  20. package/dist/hashTree/types.js.map +1 -1
  21. package/dist/hashTree/utils.js +10 -0
  22. package/dist/hashTree/utils.js.map +1 -1
  23. package/dist/index.js +11 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/interceptors/constant.js +12 -0
  26. package/dist/interceptors/constant.js.map +1 -0
  27. package/dist/interceptors/dataChannelAuthToken.js +290 -0
  28. package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
  29. package/dist/interceptors/index.js +7 -0
  30. package/dist/interceptors/index.js.map +1 -1
  31. package/dist/interceptors/utils.js +27 -0
  32. package/dist/interceptors/utils.js.map +1 -0
  33. package/dist/interpretation/index.js +2 -2
  34. package/dist/interpretation/index.js.map +1 -1
  35. package/dist/interpretation/siLanguage.js +1 -1
  36. package/dist/locus-info/controlsUtils.js +5 -3
  37. package/dist/locus-info/controlsUtils.js.map +1 -1
  38. package/dist/locus-info/index.js +522 -131
  39. package/dist/locus-info/index.js.map +1 -1
  40. package/dist/locus-info/selfUtils.js +1 -0
  41. package/dist/locus-info/selfUtils.js.map +1 -1
  42. package/dist/locus-info/types.js.map +1 -1
  43. package/dist/media/MediaConnectionAwaiter.js +57 -1
  44. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  45. package/dist/media/properties.js +4 -2
  46. package/dist/media/properties.js.map +1 -1
  47. package/dist/meeting/in-meeting-actions.js +7 -1
  48. package/dist/meeting/in-meeting-actions.js.map +1 -1
  49. package/dist/meeting/index.js +1293 -929
  50. package/dist/meeting/index.js.map +1 -1
  51. package/dist/meeting/request.js +50 -0
  52. package/dist/meeting/request.js.map +1 -1
  53. package/dist/meeting/request.type.js.map +1 -1
  54. package/dist/meeting/util.js +133 -3
  55. package/dist/meeting/util.js.map +1 -1
  56. package/dist/meetings/index.js +117 -48
  57. package/dist/meetings/index.js.map +1 -1
  58. package/dist/member/index.js +10 -0
  59. package/dist/member/index.js.map +1 -1
  60. package/dist/member/util.js +10 -0
  61. package/dist/member/util.js.map +1 -1
  62. package/dist/metrics/constants.js +6 -1
  63. package/dist/metrics/constants.js.map +1 -1
  64. package/dist/multistream/mediaRequestManager.js +9 -60
  65. package/dist/multistream/mediaRequestManager.js.map +1 -1
  66. package/dist/multistream/remoteMediaManager.js +11 -0
  67. package/dist/multistream/remoteMediaManager.js.map +1 -1
  68. package/dist/multistream/sendSlotManager.js +116 -2
  69. package/dist/multistream/sendSlotManager.js.map +1 -1
  70. package/dist/reactions/reactions.type.js.map +1 -1
  71. package/dist/reconnection-manager/index.js +0 -1
  72. package/dist/reconnection-manager/index.js.map +1 -1
  73. package/dist/types/aiEnableRequest/index.d.ts +5 -0
  74. package/dist/types/aiEnableRequest/utils.d.ts +2 -0
  75. package/dist/types/config.d.ts +4 -0
  76. package/dist/types/constants.d.ts +23 -1
  77. package/dist/types/hashTree/constants.d.ts +1 -0
  78. package/dist/types/hashTree/hashTree.d.ts +7 -0
  79. package/dist/types/hashTree/hashTreeParser.d.ts +122 -14
  80. package/dist/types/hashTree/types.d.ts +3 -0
  81. package/dist/types/hashTree/utils.d.ts +6 -0
  82. package/dist/types/index.d.ts +1 -0
  83. package/dist/types/interceptors/constant.d.ts +5 -0
  84. package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
  85. package/dist/types/interceptors/index.d.ts +2 -1
  86. package/dist/types/interceptors/utils.d.ts +1 -0
  87. package/dist/types/locus-info/index.d.ts +60 -8
  88. package/dist/types/locus-info/types.d.ts +7 -0
  89. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  90. package/dist/types/media/properties.d.ts +2 -1
  91. package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
  92. package/dist/types/meeting/index.d.ts +72 -7
  93. package/dist/types/meeting/request.d.ts +16 -1
  94. package/dist/types/meeting/request.type.d.ts +5 -0
  95. package/dist/types/meeting/util.d.ts +31 -0
  96. package/dist/types/meetings/index.d.ts +4 -2
  97. package/dist/types/member/index.d.ts +1 -0
  98. package/dist/types/member/util.d.ts +5 -0
  99. package/dist/types/metrics/constants.d.ts +5 -0
  100. package/dist/types/multistream/mediaRequestManager.d.ts +0 -23
  101. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  102. package/dist/types/reactions/reactions.type.d.ts +1 -0
  103. package/dist/types/webinar/utils.d.ts +6 -0
  104. package/dist/webinar/index.js +438 -163
  105. package/dist/webinar/index.js.map +1 -1
  106. package/dist/webinar/utils.js +25 -0
  107. package/dist/webinar/utils.js.map +1 -0
  108. package/package.json +24 -23
  109. package/src/aiEnableRequest/README.md +84 -0
  110. package/src/aiEnableRequest/index.ts +170 -0
  111. package/src/aiEnableRequest/utils.ts +25 -0
  112. package/src/annotation/index.ts +27 -7
  113. package/src/config.ts +4 -0
  114. package/src/constants.ts +29 -1
  115. package/src/hashTree/constants.ts +1 -0
  116. package/src/hashTree/hashTree.ts +17 -0
  117. package/src/hashTree/hashTreeParser.ts +761 -260
  118. package/src/hashTree/types.ts +4 -0
  119. package/src/hashTree/utils.ts +9 -0
  120. package/src/index.ts +8 -1
  121. package/src/interceptors/constant.ts +6 -0
  122. package/src/interceptors/dataChannelAuthToken.ts +170 -0
  123. package/src/interceptors/index.ts +2 -1
  124. package/src/interceptors/utils.ts +16 -0
  125. package/src/interpretation/index.ts +2 -2
  126. package/src/locus-info/controlsUtils.ts +11 -0
  127. package/src/locus-info/index.ts +579 -113
  128. package/src/locus-info/selfUtils.ts +1 -0
  129. package/src/locus-info/types.ts +8 -0
  130. package/src/media/MediaConnectionAwaiter.ts +41 -1
  131. package/src/media/properties.ts +3 -1
  132. package/src/meeting/in-meeting-actions.ts +12 -0
  133. package/src/meeting/index.ts +372 -86
  134. package/src/meeting/request.ts +42 -0
  135. package/src/meeting/request.type.ts +6 -0
  136. package/src/meeting/util.ts +160 -2
  137. package/src/meetings/index.ts +157 -44
  138. package/src/member/index.ts +10 -0
  139. package/src/member/util.ts +12 -0
  140. package/src/metrics/constants.ts +6 -0
  141. package/src/multistream/mediaRequestManager.ts +4 -54
  142. package/src/multistream/remoteMediaManager.ts +13 -0
  143. package/src/multistream/sendSlotManager.ts +97 -3
  144. package/src/reactions/reactions.type.ts +1 -0
  145. package/src/reconnection-manager/index.ts +0 -1
  146. package/src/webinar/index.ts +265 -6
  147. package/src/webinar/utils.ts +16 -0
  148. package/test/unit/spec/aiEnableRequest/index.ts +981 -0
  149. package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
  150. package/test/unit/spec/annotation/index.ts +69 -7
  151. package/test/unit/spec/hashTree/hashTree.ts +66 -0
  152. package/test/unit/spec/hashTree/hashTreeParser.ts +2321 -175
  153. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +210 -0
  154. package/test/unit/spec/interceptors/utils.ts +75 -0
  155. package/test/unit/spec/locus-info/controlsUtils.js +29 -0
  156. package/test/unit/spec/locus-info/index.js +1134 -55
  157. package/test/unit/spec/media/MediaConnectionAwaiter.ts +41 -1
  158. package/test/unit/spec/media/properties.ts +12 -3
  159. package/test/unit/spec/meeting/in-meeting-actions.ts +8 -2
  160. package/test/unit/spec/meeting/index.js +829 -121
  161. package/test/unit/spec/meeting/request.js +70 -0
  162. package/test/unit/spec/meeting/utils.js +438 -26
  163. package/test/unit/spec/meetings/index.js +653 -32
  164. package/test/unit/spec/member/index.js +28 -4
  165. package/test/unit/spec/member/util.js +65 -27
  166. package/test/unit/spec/multistream/mediaRequestManager.ts +2 -85
  167. package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
  168. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  169. package/test/unit/spec/reconnection-manager/index.js +4 -8
  170. package/test/unit/spec/webinar/index.ts +534 -37
  171. package/test/unit/spec/webinar/utils.ts +39 -0
@@ -110,6 +110,13 @@ declare class HashTree {
110
110
  * or an empty array if the index is invalid or leaf is empty.
111
111
  */
112
112
  getLeafData(leafIndex: number): LeafDataItem[];
113
+ /**
114
+ * Retrieves the version of a specific item by its id and type.
115
+ * @param {number} id The ID of the item.
116
+ * @param {ObjectType} type The type of the item.
117
+ * @returns {number | undefined} The version of the item if found, undefined otherwise.
118
+ */
119
+ getItemVersion(id: number, type: ObjectType): number | undefined;
113
120
  /**
114
121
  * Resizes the HashTree to have a new number of leaf nodes, redistributing all existing items.
115
122
  * @param {number} newNumLeaves The new number of leaf nodes (must be 0 or a power of 2).
@@ -1,6 +1,6 @@
1
1
  import HashTree from './hashTree';
2
2
  import { Enum } from '../constants';
3
- import { HashTreeObject } from './types';
3
+ import { HtMeta, HashTreeObject } from './types';
4
4
  import { LocusDTO } from '../locus-info/types';
5
5
  export interface DataSet {
6
6
  url: string;
@@ -23,10 +23,21 @@ export interface HashTreeMessage {
23
23
  locusStateElements?: Array<HashTreeObject>;
24
24
  locusSessionId?: string;
25
25
  locusUrl: string;
26
+ heartbeatIntervalMs?: number;
27
+ }
28
+ export interface VisibleDataSetInfo {
29
+ name: string;
30
+ url: string;
31
+ dataChannelUrl?: string;
32
+ }
33
+ export interface Metadata {
34
+ htMeta: HtMeta;
35
+ visibleDataSets: VisibleDataSetInfo[];
26
36
  }
27
37
  interface InternalDataSet extends DataSet {
28
38
  hashTree?: HashTree;
29
39
  timer?: ReturnType<typeof setTimeout>;
40
+ heartbeatWatchdogTimer?: ReturnType<typeof setTimeout>;
30
41
  }
31
42
  type WebexRequestMethod = (options: Record<string, any>) => Promise<any>;
32
43
  export declare const LocusInfoUpdateType: {
@@ -37,6 +48,12 @@ export type LocusInfoUpdateType = Enum<typeof LocusInfoUpdateType>;
37
48
  export type LocusInfoUpdateCallback = (updateType: LocusInfoUpdateType, data?: {
38
49
  updatedObjects: HashTreeObject[];
39
50
  }) => void;
51
+ /**
52
+ * This error is thrown if we receive information that the meeting has ended while we're processing some hash messages.
53
+ * It's handled internally by HashTreeParser and results in MEETING_ENDED being sent up.
54
+ */
55
+ export declare class MeetingEndedError extends Error {
56
+ }
40
57
  /**
41
58
  * Parses hash tree eventing locus data
42
59
  */
@@ -45,8 +62,11 @@ declare class HashTreeParser {
45
62
  visibleDataSetsUrl: string;
46
63
  webexRequest: WebexRequestMethod;
47
64
  locusInfoUpdateCallback: LocusInfoUpdateCallback;
48
- visibleDataSets: string[];
65
+ visibleDataSets: VisibleDataSetInfo[];
49
66
  debugId: string;
67
+ heartbeatIntervalMs?: number;
68
+ private excludedDataSets;
69
+ state: 'active' | 'stopped';
50
70
  /**
51
71
  * Constructor for HashTreeParser
52
72
  * @param {Object} options
@@ -57,16 +77,46 @@ declare class HashTreeParser {
57
77
  dataSets: Array<DataSet>;
58
78
  locus: any;
59
79
  };
80
+ metadata: Metadata | null;
60
81
  webexRequest: WebexRequestMethod;
61
82
  locusInfoUpdateCallback: LocusInfoUpdateCallback;
62
83
  debugId: string;
84
+ excludedDataSets?: string[];
63
85
  });
86
+ /**
87
+ * Sets the visible data sets list for the HashTreeParser. This method should be called only at the start, to initialize
88
+ * the visible data sets, before any message processsing, so for example from the constructor or when resuming the parser.
89
+ *
90
+ * @param {Array<VisibleDataSetInfo>} visibleDataSets - The visible data sets to set
91
+ * @param {Array<DataSet>} dataSets - The "dataSets" list from Locus (yes, Locus sends visibleDataSets and dataSets as separate lists and they can differ)
92
+ * @returns {void}
93
+ */
94
+ private setVisibleDataSets;
95
+ /**
96
+ * Checks if the given data set name is in the list of visible data sets
97
+ * @param {string} dataSetName data set name to check
98
+ * @returns {Boolean} True if the data set is visible, false otherwise
99
+ */
100
+ private isVisibleDataSet;
101
+ /**
102
+ * Checks if the given data set name is in the excluded list
103
+ * @param {string} dataSetName data set name to check
104
+ * @returns {boolean} True if the data set is excluded, false otherwise
105
+ */
106
+ private isExcludedDataSet;
107
+ /**
108
+ * Adds a data set to the visible data sets list, unless it is in the excluded list.
109
+ * @param {VisibleDataSetInfo} dataSetInfo data set info to add
110
+ * @returns {boolean} True if the data set was added, false if it was excluded
111
+ */
112
+ private addToVisibleDataSetsList;
64
113
  /**
65
114
  * Initializes a new visible data set by creating a hash tree for it, adding it to all the internal structures,
66
115
  * and sending an initial sync request to Locus with empty leaf data - that will trigger Locus to gives us all the data
67
116
  * from that dataset (in the response or via messages).
68
117
  *
69
- * @param {DataSet} dataSet The new data set to be added
118
+ * @param {VisibleDataSetInfo} visibleDataSetInfo Information about the new visible data set
119
+ * @param {DataSet} dataSetInfo The new data set to be added
70
120
  * @returns {Promise}
71
121
  */
72
122
  private initializeNewVisibleDataSet;
@@ -79,12 +129,11 @@ declare class HashTreeParser {
79
129
  */
80
130
  private sendInitializationSyncRequestToLocus;
81
131
  /**
82
- * Queries Locus for information about all the data sets
132
+ * Queries Locus for all up-to-date information about all visible data sets
83
133
  *
84
- * @param {string} url - url from which we can get info about all data sets
85
134
  * @returns {Promise}
86
135
  */
87
- private getAllDataSetsMetadata;
136
+ private getAllVisibleDataSetsFromLocus;
88
137
  /**
89
138
  * Initializes the hash tree parser from a message received from Locus.
90
139
  *
@@ -105,7 +154,7 @@ declare class HashTreeParser {
105
154
  /**
106
155
  * Initializes data sets by doing an initialization sync on each visible data set that doesn't have a hash tree yet.
107
156
  *
108
- * @param {DataSet[]} dataSets Array of DataSet objects to initialize
157
+ * @param {DataSet[]} visibleDataSets Array of visible DataSet objects to initialize
109
158
  * @param {string} debugText Text to include in logs for debugging purposes
110
159
  * @returns {Promise}
111
160
  */
@@ -121,6 +170,15 @@ declare class HashTreeParser {
121
170
  * @returns {any} - An object mapping dataset names to arrays of leaf data
122
171
  */
123
172
  private analyzeLocusHtMeta;
173
+ /**
174
+ * Analyzes the Metadata object that is sent outside of Locus object, and appends its data to passed in leafInfo
175
+ * structure.
176
+ *
177
+ * @param {Record<string, LeafInfo[]>} leafInfo the structure to which the Metadata info will be appended
178
+ * @param {Metadata} metadata Metadata object
179
+ * @returns {void}
180
+ */
181
+ private analyzeMetadata;
124
182
  /**
125
183
  * Checks if the provided hash tree message indicates the end of the meeting and that there won't be any more updates.
126
184
  *
@@ -135,6 +193,22 @@ declare class HashTreeParser {
135
193
  * @returns {void}
136
194
  */
137
195
  private handleRootHashHeartBeatMessage;
196
+ /**
197
+ * Asynchronously initializes new visible data sets
198
+ *
199
+ * @param {VisibleDataSetInfo[]} dataSetsRequiringInitialization list of datasets to initialize
200
+ * @returns {void}
201
+ */
202
+ private queueInitForNewVisibleDataSets;
203
+ /**
204
+ * Handles updates to Metadata object that we receive from Locus via other means than messages. Right now
205
+ * that means only in the API response alongside locus object.
206
+ *
207
+ * @param {Metadata} metadata received in Locus update other than a message (for example in an API response)
208
+ * @param {HashTreeObject[]} updatedObjects a list of updated hash tree objects to which any updates resulting from new Metadata will be added
209
+ * @returns {void}
210
+ */
211
+ handleMetadataUpdate(metadata: Metadata, updatedObjects: HashTreeObject[]): void;
138
212
  /**
139
213
  * This method should be called when we receive a partial locus DTO that contains dataSets and htMeta information
140
214
  * It updates the hash trees with the new leaf data based on the received Locus
@@ -145,6 +219,7 @@ declare class HashTreeParser {
145
219
  handleLocusUpdate(update: {
146
220
  dataSets?: Array<DataSet>;
147
221
  locus: any;
222
+ metadata?: Metadata;
148
223
  }): void;
149
224
  /**
150
225
  * Updates the internal data set information based on the received data set from Locus.
@@ -175,18 +250,17 @@ declare class HashTreeParser {
175
250
  * visible data sets and they require async initialization, the names of these data sets
176
251
  * are returned in an array.
177
252
  *
178
- * @param {string[]} removedDataSets - The list of removed data sets.
179
- * @param {string[]} addedDataSets - The list of added data sets.
253
+ * @param {VisibleDataSetInfo[]} removedDataSets - The list of removed data sets.
254
+ * @param {VisibleDataSetInfo[]} addedDataSets - The list of added data sets.
180
255
  * @param {HashTreeObject[]} updatedObjects - The list of updated hash tree objects to which changes will be added.
181
- * @returns {string[]} names of data sets that couldn't be initialized synchronously
256
+ * @returns {VisibleDataSetInfo[]} list of data sets that couldn't be initialized synchronously
182
257
  */
183
258
  private processVisibleDataSetChanges;
184
259
  /**
185
260
  * Adds entries to the passed in updateObjects array
186
261
  * for the changes that result from adding and removing visible data sets.
187
262
  *
188
- * @param {HashTreeMessage} message - The hash tree message that triggered the visible data set changes.
189
- * @param {string[]} addedDataSets - The list of added data sets.
263
+ * @param {VisibleDataSetInfo[]} addedDataSets - The list of added data sets.
190
264
  * @returns {Promise<void>}
191
265
  */
192
266
  private initializeNewVisibleDataSets;
@@ -195,7 +269,7 @@ declare class HashTreeParser {
195
269
  *
196
270
  * @param {HashTreeMessage} message - The hash tree message containing data sets and objects to be processed
197
271
  * @param {string} [debugText] - Optional debug text to include in logs
198
- * @returns {Promise}
272
+ * @returns {HashTreeObject[]} list of hash tree objects that were updated as a result of processing the message
199
273
  */
200
274
  private parseMessage;
201
275
  /**
@@ -205,7 +279,7 @@ declare class HashTreeParser {
205
279
  * @param {string} [debugText] - Optional debug text to include in logs
206
280
  * @returns {void}
207
281
  */
208
- handleMessage(message: HashTreeMessage, debugText?: string): Promise<void>;
282
+ handleMessage(message: HashTreeMessage, debugText?: string): void;
209
283
  /**
210
284
  * Calls the updateInfo callback if there are any updates to report
211
285
  *
@@ -220,6 +294,15 @@ declare class HashTreeParser {
220
294
  * @returns {number} - A weighted backoff time based on the provided configuration, using algorithm supplied by Locus team
221
295
  */
222
296
  private getWeightedBackoffTime;
297
+ /**
298
+ * Performs a sync for the given data set.
299
+ *
300
+ * @param {InternalDataSet} dataSet - The data set to sync
301
+ * @param {string} rootHash - Our current root hash for this data set
302
+ * @param {string} reason - The reason for the sync (used for logging)
303
+ * @returns {Promise<void>}
304
+ */
305
+ private performSync;
223
306
  /**
224
307
  * Runs the sync algorithm for the given data set.
225
308
  *
@@ -227,14 +310,39 @@ declare class HashTreeParser {
227
310
  * @returns {void}
228
311
  */
229
312
  private runSyncAlgorithm;
313
+ /**
314
+ * Resets the heartbeat watchdog timers for the specified data sets. Each data set has its own
315
+ * watchdog timer that monitors whether heartbeats are being received within the expected interval.
316
+ * If a heartbeat is not received for a specific data set within heartbeatIntervalMs plus
317
+ * a backoff-calculated time, the sync algorithm is initiated for that data set
318
+ *
319
+ * @param {Array<DataSet>} receivedDataSets - The data sets from the received message for which watchdog timers should be reset
320
+ * @returns {void}
321
+ */
322
+ private resetHeartbeatWatchdogs;
230
323
  /**
231
324
  * Stops all timers for the data sets to prevent any further sync attempts.
232
325
  * @returns {void}
233
326
  */
234
327
  private stopAllTimers;
328
+ /**
329
+ * Stops the HashTreeParser, preventing it from processing any further messages and clearing all timers.
330
+ * It also clears all the hash trees, so if the parser is resumed later, it will need to do a sync
331
+ * to be up-to-date.
332
+ * @returns {void}
333
+ */
334
+ stop(): void;
335
+ /**
336
+ * Resumes the HashTreeParser that was previously stopped.
337
+ * @param {HashTreeMessage} message - The message to resume with, it must contain metadata with visible data sets info
338
+ * @returns {void}
339
+ */
340
+ resume(message: HashTreeMessage): void;
341
+ private checkForSentinelHttpResponse;
235
342
  /**
236
343
  * Gets the current hashes from the locus for a specific data set.
237
344
  * @param {string} dataSetName
345
+ * @param {string} currentRootHash
238
346
  * @returns {string[]}
239
347
  */
240
348
  private getHashesFromLocus;
@@ -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
  *
@@ -19,3 +19,4 @@ export { type Reaction } from './reactions/reactions.type';
19
19
  export { CaptchaError, IntentToJoinError, JoinMeetingError, PasswordError, PermissionError, ReclaimHostIsHostAlreadyError, ReclaimHostNotAllowedError, ReclaimHostNotSupportedError, ReclaimHostEmptyWrongKeyError, Meeting, MeetingInfoUtil, JoinWebinarError, SdpResponseTimeoutError, };
20
20
  export { RemoteMedia } from './multistream/remoteMedia';
21
21
  export { default as TriggerProxy } from './common/events/trigger-proxy';
22
+ export { getAIEnablementApprover } from './aiEnableRequest/utils';
@@ -0,0 +1,5 @@
1
+ declare const DATA_CHANNEL_AUTH_HEADER = "Data-Channel-Auth-Token";
2
+ declare const MAX_RETRY = 1;
3
+ declare const RETRY_INTERVAL = 2000;
4
+ declare const RETRY_KEY = "_dcRetryKey";
5
+ export { DATA_CHANNEL_AUTH_HEADER, MAX_RETRY, RETRY_INTERVAL, RETRY_KEY };
@@ -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
- export { LocusRetryStatusInterceptor, LocusRouteTokenInterceptor };
3
+ import DataChannelAuthTokenInterceptor from './dataChannelAuthToken';
4
+ export { LocusRetryStatusInterceptor, LocusRouteTokenInterceptor, DataChannelAuthTokenInterceptor };
@@ -0,0 +1 @@
1
+ export declare const isJwtTokenExpired: (token: string) => boolean;
@@ -1,8 +1,9 @@
1
1
  import EventsScope from '../common/events/events-scope';
2
2
  import { LOCUSEVENT } from '../constants';
3
- import HashTreeParser, { DataSet, HashTreeMessage } from '../hashTree/hashTreeParser';
3
+ import HashTreeParser, { DataSet, HashTreeMessage, Metadata } from '../hashTree/hashTreeParser';
4
4
  import { HashTreeObject } from '../hashTree/types';
5
5
  import { Links, LocusDTO } from './types';
6
+ import MeetingCollection from '../meetings/collection';
6
7
  export type LocusLLMEvent = {
7
8
  data: {
8
9
  eventType: typeof LOCUSEVENT.HASH_TREE_DATA_UPDATED;
@@ -12,6 +13,33 @@ export type LocusLLMEvent = {
12
13
  export type LocusApiResponseBody = {
13
14
  dataSets?: DataSet[];
14
15
  locus: LocusDTO;
16
+ metadata?: Metadata;
17
+ } | LocusDTO;
18
+ export type HashTreeParserEntry = {
19
+ parser: HashTreeParser;
20
+ replacedAt?: string;
21
+ initializedFromHashTree: boolean;
22
+ };
23
+ /**
24
+ * Finds a meeting for a given hash tree message.
25
+ *
26
+ * @param {HashTreeMessage} message - The hash tree message to find the meeting for
27
+ * @param {MeetingCollection} meetingCollection - The collection of meetings to search
28
+ * @param {string} deviceUrl - The URL of the user's device
29
+ * @returns {any} The meeting if found, otherwise undefined
30
+ */
31
+ export declare function findMeetingForHashTreeMessage(message: HashTreeMessage, meetingCollection: MeetingCollection, deviceUrl: string): any;
32
+ /**
33
+ * Creates a locus object from the objects received in a hash tree message. It usually will be
34
+ * incomplete, because hash tree messages only contain the parts of locus that have changed,
35
+ * and some updates come separately over Mercury or LLM in separate messages.
36
+ *
37
+ * @param {HashTreeMessage} message hash tree message to created the locus from
38
+ * @returns {Object} the created locus object and metadata if present
39
+ */
40
+ export declare function createLocusFromHashTreeMessage(message: HashTreeMessage): {
41
+ locus: LocusDTO;
42
+ metadata?: Metadata;
15
43
  };
16
44
  /**
17
45
  * @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
@@ -46,7 +74,7 @@ export default class LocusInfo extends EventsScope {
46
74
  links?: Links;
47
75
  mainSessionLocusCache: any;
48
76
  self: any;
49
- hashTreeParser?: HashTreeParser;
77
+ hashTreeParsers: Map<string, HashTreeParserEntry>;
50
78
  hashTreeObjectId2ParticipantId: Map<number, string>;
51
79
  classicVsHashTreeMismatchMetricCounter: number;
52
80
  /**
@@ -91,9 +119,13 @@ export default class LocusInfo extends EventsScope {
91
119
  */
92
120
  init(locus?: any): void;
93
121
  /**
94
- * Creates the HashTreeParser instance.
95
- * @param {Object} initial locus data
96
- * @returns {void}
122
+ * Creates a HashTreeParser instance for a given locusUrl and stores it in the map.
123
+ * @param {Object} params
124
+ * @param {string} params.locusUrl - the locus URL used as the map key
125
+ * @param {Object} params.initialLocus - initial locus data
126
+ * @param {Object} params.metadata - hash tree metadata
127
+ * @param {string} params.replacedAt - timestamp from Locus indicating when the replacement happened
128
+ * @returns {HashTreeParser} the newly created parser
97
129
  */
98
130
  private createHashTreeParser;
99
131
  /**
@@ -105,6 +137,7 @@ export default class LocusInfo extends EventsScope {
105
137
  trigger: 'join-response';
106
138
  locus: LocusDTO;
107
139
  dataSets?: DataSet[];
140
+ metadata?: Metadata;
108
141
  } | {
109
142
  trigger: 'locus-message';
110
143
  locus?: LocusDTO;
@@ -121,7 +154,6 @@ export default class LocusInfo extends EventsScope {
121
154
  */
122
155
  handleLocusAPIResponse(meeting: any, responseBody: LocusApiResponseBody): void;
123
156
  /**
124
- *
125
157
  * @param {HashTreeObject} object data set object
126
158
  * @param {any} locus
127
159
  * @returns {void}
@@ -135,6 +167,13 @@ export default class LocusInfo extends EventsScope {
135
167
  * @returns {void}
136
168
  */
137
169
  sendClassicVsHashTreeMismatchMetric(meeting: any, message: string): void;
170
+ /**
171
+ * Checks if the hash tree message should trigger a switch to a different HashTreeParser
172
+ *
173
+ * @param {HashTreeMessage} message incoming hash tree message
174
+ * @returns {boolean} true if the message was handled as a parser switch, false otherwise
175
+ */
176
+ private handleHashTreeParserSwitch;
138
177
  /**
139
178
  * Handles a hash tree message received from Locus.
140
179
  *
@@ -148,6 +187,7 @@ export default class LocusInfo extends EventsScope {
148
187
  * Callback registered with HashTreeParser to receive locus info updates.
149
188
  * Updates our locus info based on the data parsed by the hash tree parser.
150
189
  *
190
+ * @param {string} locusUrl - the locus URL for which the update is received
151
191
  * @param {LocusInfoUpdateType} updateType - The type of update received.
152
192
  * @param {Object} [data] - Additional data for the update, if applicable.
153
193
  * @returns {void}
@@ -171,7 +211,9 @@ export default class LocusInfo extends EventsScope {
171
211
  /**
172
212
  * Function for handling full locus when it's using hash trees (so not the "classic" one).
173
213
  *
214
+ * @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
174
215
  * @param {object} locus locus object
216
+ * @param {object} metadata locus hash trees metadata
175
217
  * @param {string} eventType locus event
176
218
  * @param {DataSet[]} dataSets
177
219
  * @returns {void}
@@ -180,6 +222,7 @@ export default class LocusInfo extends EventsScope {
180
222
  /**
181
223
  * Function for handling full locus when it's the "classic" one (not hash trees)
182
224
  *
225
+ * @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
183
226
  * @param {object} locus locus object
184
227
  * @param {string} eventType locus event
185
228
  * @returns {void}
@@ -187,13 +230,15 @@ export default class LocusInfo extends EventsScope {
187
230
  private onFullLocusClassic;
188
231
  /**
189
232
  * updates the locus with full locus object
233
+ * @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
190
234
  * @param {object} locus locus object
191
235
  * @param {string} eventType locus event
192
236
  * @param {DataSet[]} dataSets
237
+ * @param {object} metadata locus hash trees metadata
193
238
  * @returns {object} null
194
239
  * @memberof LocusInfo
195
240
  */
196
- onFullLocus(locus: any, eventType?: string, dataSets?: Array<DataSet>): void;
241
+ onFullLocus(debugText: string, locus: any, eventType?: string, dataSets?: Array<DataSet>, metadata?: Metadata): void;
197
242
  /**
198
243
  * Common part of handling full locus, used by both classic and hash tree based locus handling
199
244
  * @param {object} locus locus object
@@ -207,6 +252,13 @@ export default class LocusInfo extends EventsScope {
207
252
  * @memberof LocusInfo
208
253
  */
209
254
  handleOneOnOneEvent(eventType: string): void;
255
+ /**
256
+ * Makes sure that passed in locus object has a participant object for self.
257
+ *
258
+ * @param {LocusDTO} locus The locus object to check and modify if needed
259
+ * @returns {void}
260
+ */
261
+ ensureSelfParticipantExists(locus: any): void;
210
262
  /**
211
263
  * @param {Object} locus
212
264
  * @returns {undefined}
@@ -218,7 +270,7 @@ export default class LocusInfo extends EventsScope {
218
270
  * @returns {undefined}
219
271
  * @memberof LocusInfo
220
272
  */
221
- updateLocusInfo(locus: any): void;
273
+ updateLocusInfo(locus: any): boolean;
222
274
  /**
223
275
  * @param {Array} participants
224
276
  * @param {Object} self
@@ -20,6 +20,7 @@ export type Links = {
20
20
  };
21
21
  export type LocusDTO = {
22
22
  controls?: any;
23
+ embeddedApps?: any[];
23
24
  fullState?: LocusFullState;
24
25
  host?: {
25
26
  id: string;
@@ -32,6 +33,7 @@ export type LocusDTO = {
32
33
  info?: any;
33
34
  jsSdkMeta?: {
34
35
  removedParticipantIds: string[];
36
+ forceReplaceMembers?: boolean;
35
37
  };
36
38
  links?: Links;
37
39
  mediaShares?: any[];
@@ -52,3 +54,8 @@ export type LocusDTO = {
52
54
  syncUrl?: string;
53
55
  url?: string;
54
56
  };
57
+ export type ReplacesInfo = {
58
+ locusUrl: string;
59
+ replacedAt: string;
60
+ sessionId: string;
61
+ };
@@ -1,5 +1,6 @@
1
1
  export interface MediaConnectionAwaiterProps {
2
2
  webrtcMediaConnection: any;
3
+ correlationId: string;
3
4
  }
4
5
  /**
5
6
  * @class MediaConnectionAwaiter
@@ -10,6 +11,7 @@ export default class MediaConnectionAwaiter {
10
11
  private defer;
11
12
  private retried;
12
13
  private iceConnected;
14
+ private correlationId;
13
15
  private onTimeoutCallback;
14
16
  private peerConnectionStateCallback;
15
17
  private iceConnectionStateCallback;
@@ -17,7 +19,7 @@ export default class MediaConnectionAwaiter {
17
19
  /**
18
20
  * @param {MediaConnectionAwaiterProps} mediaConnectionAwaiterProps
19
21
  */
20
- constructor({ webrtcMediaConnection }: MediaConnectionAwaiterProps);
22
+ constructor({ webrtcMediaConnection, correlationId }: MediaConnectionAwaiterProps);
21
23
  /**
22
24
  * Returns true if the connection is connected, false otherwise.
23
25
  *
@@ -66,6 +68,13 @@ export default class MediaConnectionAwaiter {
66
68
  * @returns {void}
67
69
  */
68
70
  iceGatheringStateHandler(): void;
71
+ /**
72
+ * sends a metric with some additional info that might help debugging
73
+ * issues where browser doesn't update the RTCPeerConnection's iceConnectionState or connectionState
74
+ *
75
+ * @returns {void}
76
+ */
77
+ sendMetric(): Promise<void>;
69
78
  /**
70
79
  * Function called when the timeout is reached.
71
80
  *
@@ -93,9 +93,10 @@ export default class MediaProperties {
93
93
  /**
94
94
  * Waits for the webrtc media connection to be connected.
95
95
  *
96
+ * @param {string} correlationId
96
97
  * @returns {Promise<void>}
97
98
  */
98
- waitForMediaConnectionConnected(): Promise<void>;
99
+ waitForMediaConnectionConnected(correlationId: string): Promise<void>;
99
100
  /**
100
101
  * Returns ICE transport information:
101
102
  * - selectedCandidatePairChanges - number of times the selected candidate pair was changed, it should be at least 1 for successful connections
@@ -28,6 +28,7 @@ interface IInMeetingActions {
28
28
  canLowerAllHands?: boolean;
29
29
  canLowerSomeoneElsesHand?: boolean;
30
30
  bothLeaveAndEndMeetingAvailable?: boolean;
31
+ requireHostEndMeetingBeforeLeave?: boolean;
31
32
  canEnableClosedCaption?: boolean;
32
33
  canStartTranscribing?: boolean;
33
34
  canStopTranscribing?: boolean;
@@ -112,6 +113,8 @@ interface IInMeetingActions {
112
113
  canMoveToLobby?: boolean;
113
114
  canEnablePollingQA?: boolean;
114
115
  canDisablePollingQA?: boolean;
116
+ canAttendeeRequestAiAssistantEnabled?: boolean;
117
+ isAttendeeRequestAiAssistantDeclinedAll?: boolean;
115
118
  }
116
119
  /**
117
120
  * @class InMeetingActions
@@ -140,6 +143,7 @@ export default class InMeetingActions implements IInMeetingActions {
140
143
  canLowerAllHands: any;
141
144
  canLowerSomeoneElsesHand: any;
142
145
  bothLeaveAndEndMeetingAvailable: any;
146
+ requireHostEndMeetingBeforeLeave: any;
143
147
  canEnableClosedCaption: any;
144
148
  canStartTranscribing: any;
145
149
  canStopTranscribing: any;
@@ -224,6 +228,8 @@ export default class InMeetingActions implements IInMeetingActions {
224
228
  canMoveToLobby: any;
225
229
  canEnablePollingQA: any;
226
230
  canDisablePollingQA: any;
231
+ canAttendeeRequestAiAssistantEnabled: any;
232
+ isAttendeeRequestAiAssistantDeclinedAll: any;
227
233
  /**
228
234
  * Returns all meeting action options
229
235
  * @returns {Object}