@webex/plugin-meetings 3.12.0-task-refactor.1 → 3.12.0-webex-services-ready.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.
Files changed (302) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +197 -0
  3. package/dist/aiEnableRequest/index.js.map +1 -0
  4. package/dist/aiEnableRequest/utils.js +36 -0
  5. package/dist/aiEnableRequest/utils.js.map +1 -0
  6. package/dist/annotation/index.js +14 -5
  7. package/dist/annotation/index.js.map +1 -1
  8. package/dist/breakouts/breakout.js +8 -3
  9. package/dist/breakouts/breakout.js.map +1 -1
  10. package/dist/breakouts/index.js +26 -2
  11. package/dist/breakouts/index.js.map +1 -1
  12. package/dist/common/errors/webex-errors.js +49 -5
  13. package/dist/common/errors/webex-errors.js.map +1 -1
  14. package/dist/config.js +9 -3
  15. package/dist/config.js.map +1 -1
  16. package/dist/constants.js +59 -10
  17. package/dist/constants.js.map +1 -1
  18. package/dist/controls-options-manager/constants.js +11 -1
  19. package/dist/controls-options-manager/constants.js.map +1 -1
  20. package/dist/controls-options-manager/index.js +67 -29
  21. package/dist/controls-options-manager/index.js.map +1 -1
  22. package/dist/controls-options-manager/util.js +91 -0
  23. package/dist/controls-options-manager/util.js.map +1 -1
  24. package/dist/hashTree/constants.js +34 -0
  25. package/dist/hashTree/constants.js.map +1 -0
  26. package/dist/hashTree/hashTree.js +533 -0
  27. package/dist/hashTree/hashTree.js.map +1 -0
  28. package/dist/hashTree/hashTreeParser.js +2068 -36
  29. package/dist/hashTree/hashTreeParser.js.map +1 -1
  30. package/dist/hashTree/types.js +13 -3
  31. package/dist/hashTree/types.js.map +1 -1
  32. package/dist/hashTree/utils.js +111 -0
  33. package/dist/hashTree/utils.js.map +1 -0
  34. package/dist/index.js +18 -2
  35. package/dist/index.js.map +1 -1
  36. package/dist/interceptors/constant.js +12 -0
  37. package/dist/interceptors/constant.js.map +1 -0
  38. package/dist/interceptors/dataChannelAuthToken.js +350 -0
  39. package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
  40. package/dist/interceptors/index.js +7 -0
  41. package/dist/interceptors/index.js.map +1 -1
  42. package/dist/interceptors/locusRetry.js +23 -8
  43. package/dist/interceptors/locusRetry.js.map +1 -1
  44. package/dist/interceptors/locusRouteToken.js +27 -5
  45. package/dist/interceptors/locusRouteToken.js.map +1 -1
  46. package/dist/interceptors/utils.js +27 -0
  47. package/dist/interceptors/utils.js.map +1 -0
  48. package/dist/interpretation/index.js +11 -2
  49. package/dist/interpretation/index.js.map +1 -1
  50. package/dist/interpretation/interpretation.types.js +7 -0
  51. package/dist/interpretation/interpretation.types.js.map +1 -0
  52. package/dist/interpretation/siLanguage.js +1 -1
  53. package/dist/locus-info/controlsUtils.js +11 -4
  54. package/dist/locus-info/controlsUtils.js.map +1 -1
  55. package/dist/locus-info/index.js +896 -277
  56. package/dist/locus-info/index.js.map +1 -1
  57. package/dist/locus-info/infoUtils.js +36 -5
  58. package/dist/locus-info/infoUtils.js.map +1 -1
  59. package/dist/locus-info/selfUtils.js +1 -0
  60. package/dist/locus-info/selfUtils.js.map +1 -1
  61. package/dist/locus-info/types.js +19 -0
  62. package/dist/locus-info/types.js.map +1 -1
  63. package/dist/media/MediaConnectionAwaiter.js +72 -3
  64. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  65. package/dist/media/index.js +8 -2
  66. package/dist/media/index.js.map +1 -1
  67. package/dist/media/properties.js +5 -2
  68. package/dist/media/properties.js.map +1 -1
  69. package/dist/meeting/in-meeting-actions.js +11 -1
  70. package/dist/meeting/in-meeting-actions.js.map +1 -1
  71. package/dist/meeting/index.js +2075 -1096
  72. package/dist/meeting/index.js.map +1 -1
  73. package/dist/meeting/locusMediaRequest.js +229 -82
  74. package/dist/meeting/locusMediaRequest.js.map +1 -1
  75. package/dist/meeting/muteState.js +10 -1
  76. package/dist/meeting/muteState.js.map +1 -1
  77. package/dist/meeting/request.js +55 -2
  78. package/dist/meeting/request.js.map +1 -1
  79. package/dist/meeting/request.type.js.map +1 -1
  80. package/dist/meeting/util.js +168 -5
  81. package/dist/meeting/util.js.map +1 -1
  82. package/dist/meeting-info/meeting-info-v2.js +2 -2
  83. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  84. package/dist/meetings/index.js +369 -173
  85. package/dist/meetings/index.js.map +1 -1
  86. package/dist/meetings/meetings.types.js +6 -1
  87. package/dist/meetings/meetings.types.js.map +1 -1
  88. package/dist/meetings/request.js +39 -0
  89. package/dist/meetings/request.js.map +1 -1
  90. package/dist/meetings/util.js +127 -25
  91. package/dist/meetings/util.js.map +1 -1
  92. package/dist/member/index.js +20 -0
  93. package/dist/member/index.js.map +1 -1
  94. package/dist/member/types.js.map +1 -1
  95. package/dist/member/util.js +40 -0
  96. package/dist/member/util.js.map +1 -1
  97. package/dist/members/index.js +101 -43
  98. package/dist/members/index.js.map +1 -1
  99. package/dist/members/util.js +8 -1
  100. package/dist/members/util.js.map +1 -1
  101. package/dist/metrics/constants.js +11 -1
  102. package/dist/metrics/constants.js.map +1 -1
  103. package/dist/multistream/codec/constants.js +63 -0
  104. package/dist/multistream/codec/constants.js.map +1 -0
  105. package/dist/multistream/mediaRequestManager.js +64 -68
  106. package/dist/multistream/mediaRequestManager.js.map +1 -1
  107. package/dist/multistream/receiveSlot.js +9 -0
  108. package/dist/multistream/receiveSlot.js.map +1 -1
  109. package/dist/multistream/remoteMediaManager.js +11 -0
  110. package/dist/multistream/remoteMediaManager.js.map +1 -1
  111. package/dist/multistream/sendSlotManager.js +116 -2
  112. package/dist/multistream/sendSlotManager.js.map +1 -1
  113. package/dist/reachability/clusterReachability.js +171 -18
  114. package/dist/reachability/clusterReachability.js.map +1 -1
  115. package/dist/reachability/index.js +142 -94
  116. package/dist/reachability/index.js.map +1 -1
  117. package/dist/reachability/reachability.types.js +2 -0
  118. package/dist/reachability/reachability.types.js.map +1 -1
  119. package/dist/reachability/reachabilityPeerConnection.js +1 -1
  120. package/dist/reachability/reachabilityPeerConnection.js.map +1 -1
  121. package/dist/reachability/util.js +45 -0
  122. package/dist/reachability/util.js.map +1 -1
  123. package/dist/reactions/reactions.type.js.map +1 -1
  124. package/dist/reconnection-manager/index.js +0 -1
  125. package/dist/reconnection-manager/index.js.map +1 -1
  126. package/dist/recording-controller/index.js +1 -3
  127. package/dist/recording-controller/index.js.map +1 -1
  128. package/dist/types/aiEnableRequest/index.d.ts +5 -0
  129. package/dist/types/aiEnableRequest/utils.d.ts +2 -0
  130. package/dist/types/common/browser-detection.d.ts +1 -0
  131. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  132. package/dist/types/common/events/events-scope.d.ts +1 -0
  133. package/dist/types/common/events/events.d.ts +1 -0
  134. package/dist/types/config.d.ts +7 -2
  135. package/dist/types/constants.d.ts +35 -1
  136. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  137. package/dist/types/controls-options-manager/index.d.ts +16 -0
  138. package/dist/types/hashTree/constants.d.ts +11 -0
  139. package/dist/types/hashTree/hashTree.d.ts +136 -0
  140. package/dist/types/hashTree/hashTreeParser.d.ts +392 -14
  141. package/dist/types/hashTree/types.d.ts +20 -0
  142. package/dist/types/hashTree/utils.d.ts +40 -0
  143. package/dist/types/index.d.ts +4 -0
  144. package/dist/types/interceptors/constant.d.ts +5 -0
  145. package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
  146. package/dist/types/interceptors/index.d.ts +2 -1
  147. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  148. package/dist/types/interceptors/locusRouteToken.d.ts +2 -0
  149. package/dist/types/interceptors/utils.d.ts +1 -0
  150. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  151. package/dist/types/locus-info/index.d.ts +116 -51
  152. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  153. package/dist/types/locus-info/types.d.ts +48 -12
  154. package/dist/types/media/MediaConnectionAwaiter.d.ts +20 -2
  155. package/dist/types/media/properties.d.ts +3 -1
  156. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  157. package/dist/types/meeting/index.d.ts +196 -15
  158. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  159. package/dist/types/meeting/request.d.ts +17 -1
  160. package/dist/types/meeting/request.type.d.ts +5 -0
  161. package/dist/types/meeting/util.d.ts +40 -0
  162. package/dist/types/meeting-info/util.d.ts +1 -0
  163. package/dist/types/meeting-info/utilv2.d.ts +1 -0
  164. package/dist/types/meetings/index.d.ts +34 -20
  165. package/dist/types/meetings/meetings.types.d.ts +15 -0
  166. package/dist/types/meetings/request.d.ts +14 -0
  167. package/dist/types/member/index.d.ts +2 -0
  168. package/dist/types/member/types.d.ts +5 -4
  169. package/dist/types/member/util.d.ts +14 -0
  170. package/dist/types/members/index.d.ts +15 -2
  171. package/dist/types/members/util.d.ts +1 -5
  172. package/dist/types/metrics/constants.d.ts +10 -0
  173. package/dist/types/multistream/codec/constants.d.ts +7 -0
  174. package/dist/types/multistream/mediaRequestManager.d.ts +20 -26
  175. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  176. package/dist/types/reachability/clusterReachability.d.ts +33 -6
  177. package/dist/types/reachability/index.d.ts +10 -3
  178. package/dist/types/reachability/reachability.types.d.ts +7 -0
  179. package/dist/types/reachability/util.d.ts +17 -0
  180. package/dist/types/reactions/reactions.type.d.ts +4 -0
  181. package/dist/types/recording-controller/util.d.ts +5 -5
  182. package/dist/types/roap/index.d.ts +1 -1
  183. package/dist/types/webinar/utils.d.ts +6 -0
  184. package/dist/webinar/index.js +585 -164
  185. package/dist/webinar/index.js.map +1 -1
  186. package/dist/webinar/utils.js +25 -0
  187. package/dist/webinar/utils.js.map +1 -0
  188. package/package.json +26 -24
  189. package/src/aiEnableRequest/README.md +84 -0
  190. package/src/aiEnableRequest/index.ts +186 -0
  191. package/src/aiEnableRequest/utils.ts +25 -0
  192. package/src/annotation/index.ts +27 -7
  193. package/src/breakouts/breakout.ts +3 -1
  194. package/src/breakouts/index.ts +31 -0
  195. package/src/common/errors/webex-errors.ts +50 -3
  196. package/src/config.ts +7 -2
  197. package/src/constants.ts +49 -3
  198. package/src/controls-options-manager/constants.ts +14 -1
  199. package/src/controls-options-manager/index.ts +87 -28
  200. package/src/controls-options-manager/util.ts +81 -1
  201. package/src/hashTree/constants.ts +26 -0
  202. package/src/hashTree/hashTree.ts +480 -0
  203. package/src/hashTree/hashTreeParser.ts +1911 -29
  204. package/src/hashTree/types.ts +24 -1
  205. package/src/hashTree/utils.ts +98 -0
  206. package/src/index.ts +14 -1
  207. package/src/interceptors/constant.ts +6 -0
  208. package/src/interceptors/dataChannelAuthToken.ts +246 -0
  209. package/src/interceptors/index.ts +2 -1
  210. package/src/interceptors/locusRetry.ts +25 -4
  211. package/src/interceptors/locusRouteToken.ts +22 -5
  212. package/src/interceptors/utils.ts +16 -0
  213. package/src/interpretation/index.ts +29 -11
  214. package/src/interpretation/interpretation.types.ts +11 -0
  215. package/src/locus-info/controlsUtils.ts +20 -1
  216. package/src/locus-info/index.ts +958 -250
  217. package/src/locus-info/infoUtils.ts +41 -6
  218. package/src/locus-info/selfUtils.ts +1 -0
  219. package/src/locus-info/types.ts +51 -12
  220. package/src/media/MediaConnectionAwaiter.ts +62 -5
  221. package/src/media/index.ts +10 -1
  222. package/src/media/properties.ts +4 -1
  223. package/src/meeting/in-meeting-actions.ts +20 -0
  224. package/src/meeting/index.ts +1025 -146
  225. package/src/meeting/locusMediaRequest.ts +106 -6
  226. package/src/meeting/muteState.ts +10 -1
  227. package/src/meeting/request.ts +53 -0
  228. package/src/meeting/request.type.ts +6 -0
  229. package/src/meeting/util.ts +207 -7
  230. package/src/meeting-info/meeting-info-v2.ts +4 -2
  231. package/src/meetings/index.ts +307 -132
  232. package/src/meetings/meetings.types.ts +19 -0
  233. package/src/meetings/request.ts +43 -0
  234. package/src/meetings/util.ts +127 -13
  235. package/src/member/index.ts +20 -0
  236. package/src/member/types.ts +1 -0
  237. package/src/member/util.ts +41 -0
  238. package/src/members/index.ts +70 -7
  239. package/src/members/util.ts +12 -4
  240. package/src/metrics/constants.ts +11 -0
  241. package/src/multistream/codec/constants.ts +58 -0
  242. package/src/multistream/mediaRequestManager.ts +117 -76
  243. package/src/multistream/receiveSlot.ts +18 -0
  244. package/src/multistream/remoteMediaManager.ts +13 -0
  245. package/src/multistream/sendSlotManager.ts +97 -3
  246. package/src/reachability/clusterReachability.ts +156 -29
  247. package/src/reachability/index.ts +62 -17
  248. package/src/reachability/reachability.types.ts +11 -0
  249. package/src/reachability/reachabilityPeerConnection.ts +3 -1
  250. package/src/reachability/util.ts +36 -0
  251. package/src/reactions/reactions.type.ts +4 -0
  252. package/src/reconnection-manager/index.ts +0 -1
  253. package/src/recording-controller/index.ts +1 -2
  254. package/src/webinar/index.ts +448 -11
  255. package/src/webinar/utils.ts +16 -0
  256. package/test/unit/spec/aiEnableRequest/index.ts +1067 -0
  257. package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
  258. package/test/unit/spec/annotation/index.ts +69 -7
  259. package/test/unit/spec/breakouts/breakout.ts +9 -3
  260. package/test/unit/spec/breakouts/index.ts +49 -0
  261. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  262. package/test/unit/spec/controls-options-manager/index.js +244 -29
  263. package/test/unit/spec/controls-options-manager/util.js +165 -0
  264. package/test/unit/spec/hashTree/hashTree.ts +721 -0
  265. package/test/unit/spec/hashTree/hashTreeParser.ts +5328 -0
  266. package/test/unit/spec/hashTree/utils.ts +264 -0
  267. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +406 -0
  268. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  269. package/test/unit/spec/interceptors/locusRouteToken.ts +44 -0
  270. package/test/unit/spec/interceptors/utils.ts +75 -0
  271. package/test/unit/spec/interpretation/index.ts +26 -4
  272. package/test/unit/spec/locus-info/controlsUtils.js +222 -52
  273. package/test/unit/spec/locus-info/index.js +2000 -171
  274. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  275. package/test/unit/spec/media/MediaConnectionAwaiter.ts +96 -1
  276. package/test/unit/spec/media/index.ts +92 -0
  277. package/test/unit/spec/media/properties.ts +12 -3
  278. package/test/unit/spec/meeting/in-meeting-actions.ts +12 -2
  279. package/test/unit/spec/meeting/index.js +2925 -209
  280. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  281. package/test/unit/spec/meeting/muteState.js +81 -0
  282. package/test/unit/spec/meeting/request.js +82 -0
  283. package/test/unit/spec/meeting/utils.js +595 -27
  284. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  285. package/test/unit/spec/meetings/index.js +1214 -75
  286. package/test/unit/spec/meetings/request.js +141 -0
  287. package/test/unit/spec/meetings/utils.js +453 -52
  288. package/test/unit/spec/member/index.js +35 -4
  289. package/test/unit/spec/member/util.js +154 -27
  290. package/test/unit/spec/members/index.js +216 -0
  291. package/test/unit/spec/members/request.js +37 -1
  292. package/test/unit/spec/members/utils.js +63 -0
  293. package/test/unit/spec/multistream/mediaRequestManager.ts +503 -122
  294. package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
  295. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  296. package/test/unit/spec/reachability/clusterReachability.ts +125 -1
  297. package/test/unit/spec/reachability/index.ts +154 -49
  298. package/test/unit/spec/reachability/util.ts +31 -0
  299. package/test/unit/spec/reconnection-manager/index.js +4 -8
  300. package/test/unit/spec/recording-controller/index.js +9 -8
  301. package/test/unit/spec/webinar/index.ts +837 -39
  302. package/test/unit/spec/webinar/utils.ts +39 -0
@@ -4,8 +4,24 @@ export declare const ObjectType: {
4
4
  readonly self: "self";
5
5
  readonly locus: "locus";
6
6
  readonly mediaShare: "mediashare";
7
+ readonly info: "info";
8
+ readonly fullState: "fullstate";
9
+ readonly links: "links";
10
+ readonly control: "controlentry";
11
+ readonly metadata: "metadata";
12
+ readonly embeddedApp: "embeddedapp";
7
13
  };
8
14
  export type ObjectType = Enum<typeof ObjectType>;
15
+ export declare const ObjectTypeToLocusKeyMap: {
16
+ links: string;
17
+ info: string;
18
+ fullstate: string;
19
+ self: string;
20
+ participant: string;
21
+ mediashare: string;
22
+ controlentry: string;
23
+ embeddedapp: string;
24
+ };
9
25
  export interface HtMeta {
10
26
  elementId: {
11
27
  type: ObjectType;
@@ -14,3 +30,7 @@ export interface HtMeta {
14
30
  };
15
31
  dataSetNames: string[];
16
32
  }
33
+ export interface HashTreeObject {
34
+ htMeta: HtMeta;
35
+ data: Record<string, any>;
36
+ }
@@ -0,0 +1,40 @@
1
+ import { HashTreeObject } from './types';
2
+ /**
3
+ * Checks if the given hash tree object is of type "self"
4
+ * @param {HashTreeObject} object object to check
5
+ * @returns {boolean} True if the object is of type "self", false otherwise
6
+ */
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;
14
+ /**
15
+ * Analyzes given part of Locus DTO recursively and delete any nested objects that have their own htMeta
16
+ *
17
+ * @param {Object} currentLocusPart part of locus DTO to analyze
18
+ * @param {Object} parent parent object
19
+ * @param {string|number} currentKey key of the parent object that currentLocusPart is
20
+ * @returns {void}
21
+ */
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>;
@@ -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,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 };
@@ -11,11 +11,11 @@ export default class LocusRetryStatusInterceptor extends Interceptor {
11
11
  */
12
12
  static create(): LocusRetryStatusInterceptor;
13
13
  /**
14
- * Handle response errors
15
- * @param {Object} options
16
- * @param {WebexHttpError} reason
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
@@ -11,6 +11,8 @@ export default class LocusRouteTokenInterceptor extends Interceptor {
11
11
  */
12
12
  static create(): LocusRouteTokenInterceptor;
13
13
  getLocusIdByRequestUrl(url: string): string;
14
+ getLocusIdByResponseBody(body: any): any;
15
+ getHeader(headers: Record<string, string>, name: string): string;
14
16
  /**
15
17
  * @param {Object} options
16
18
  * @param {HttpResponse} response
@@ -0,0 +1 @@
1
+ export declare const isJwtTokenExpired: (token: string) => boolean;
@@ -0,0 +1,10 @@
1
+ export type InterpreterUsingResource = {
2
+ id: string;
3
+ email?: string;
4
+ };
5
+ export type Interpreter = {
6
+ order: number;
7
+ sourceLanguage: string;
8
+ targetLanguage: string;
9
+ usingResource: InterpreterUsingResource;
10
+ };
@@ -1,7 +1,9 @@
1
1
  import EventsScope from '../common/events/events-scope';
2
2
  import { LOCUSEVENT } from '../constants';
3
- import HashTreeParser, { DataSet, HashTreeMessage, HashTreeObject } from '../hashTree/hashTreeParser';
4
- import { LocusDTO } from './types';
3
+ import HashTreeParser, { DataSet, HashTreeMessage, Metadata } from '../hashTree/hashTreeParser';
4
+ import { HashTreeObject } from '../hashTree/types';
5
+ import { Links, LocusDTO } from './types';
6
+ import MeetingCollection from '../meetings/collection';
5
7
  export type LocusLLMEvent = {
6
8
  data: {
7
9
  eventType: typeof LOCUSEVENT.HASH_TREE_DATA_UPDATED;
@@ -11,6 +13,32 @@ export type LocusLLMEvent = {
11
13
  export type LocusApiResponseBody = {
12
14
  dataSets?: DataSet[];
13
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
+ * @returns {any} The meeting if found, otherwise undefined
29
+ */
30
+ export declare function findMeetingForHashTreeMessage(message: HashTreeMessage | undefined, meetingCollection: MeetingCollection): any;
31
+ /**
32
+ * Creates a locus object from the objects received in a hash tree message. It usually will be
33
+ * incomplete, because hash tree messages only contain the parts of locus that have changed,
34
+ * and some updates come separately over Mercury or LLM in separate messages.
35
+ *
36
+ * @param {HashTreeMessage} message hash tree message to created the locus from
37
+ * @returns {Object} the created locus object and metadata if present
38
+ */
39
+ export declare function createLocusFromHashTreeMessage(message: HashTreeMessage): {
40
+ locus: LocusDTO;
41
+ metadata?: Metadata;
14
42
  };
15
43
  /**
16
44
  * @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
@@ -29,10 +57,7 @@ export default class LocusInfo extends EventsScope {
29
57
  aclUrl: any;
30
58
  baseSequence: any;
31
59
  created: any;
32
- identities: any;
33
- membership: any;
34
60
  participants: any;
35
- participantsUrl: any;
36
61
  replaces: any;
37
62
  scheduledMeeting: any;
38
63
  sequence: any;
@@ -44,13 +69,11 @@ export default class LocusInfo extends EventsScope {
44
69
  info: any;
45
70
  roles: any;
46
71
  mediaShares: any;
47
- replace: any;
48
72
  url: any;
49
- services: any;
50
- resources: any;
73
+ links?: Links;
51
74
  mainSessionLocusCache: any;
52
75
  self: any;
53
- hashTreeParser?: HashTreeParser;
76
+ hashTreeParsers: Map<string, HashTreeParserEntry>;
54
77
  hashTreeObjectId2ParticipantId: Map<number, string>;
55
78
  classicVsHashTreeMismatchMetricCounter: number;
56
79
  /**
@@ -95,13 +118,18 @@ export default class LocusInfo extends EventsScope {
95
118
  */
96
119
  init(locus?: any): void;
97
120
  /**
98
- * Creates the HashTreeParser instance.
99
- * @param {Object} initial locus data
100
- * @returns {void}
121
+ * Creates a HashTreeParser instance for a given locusUrl and stores it in the map.
122
+ * @param {Object} params
123
+ * @param {string} params.locusUrl - the locus URL used as the map key
124
+ * @param {Object} params.initialLocus - initial locus data
125
+ * @param {Object} params.metadata - hash tree metadata
126
+ * @param {string} params.replacedAt - timestamp from Locus indicating when the replacement happened
127
+ * @returns {HashTreeParser} the newly created parser
101
128
  */
102
129
  private createHashTreeParser;
103
130
  /**
104
131
  * @param {Object} data - data to initialize locus info with. It may be from a join or GET /loci response or from a Mercury event that triggers a creation of meeting object
132
+ * @param {Function} [onLocusSynced] - optional callback that will be called at the end of initial setup, when locus info is fully synced. It will be called with the full locus snapshot as an argument (which may be null if we haven't received any full locus DTOs during the initial setup, for example in case we receive only hash tree messages without full locus DTOs)
105
133
  * @returns {undefined}
106
134
  * @memberof LocusInfo
107
135
  */
@@ -109,6 +137,7 @@ export default class LocusInfo extends EventsScope {
109
137
  trigger: 'join-response';
110
138
  locus: LocusDTO;
111
139
  dataSets?: DataSet[];
140
+ metadata?: Metadata;
112
141
  } | {
113
142
  trigger: 'locus-message';
114
143
  locus?: LocusDTO;
@@ -116,7 +145,13 @@ export default class LocusInfo extends EventsScope {
116
145
  } | {
117
146
  trigger: 'get-loci-response';
118
147
  locus?: LocusDTO;
119
- }): Promise<void>;
148
+ }, onLocusSynced?: (locus: LocusDTO) => void): Promise<void>;
149
+ /**
150
+ * Builds a full locus DTO snapshot from current internal locus state.
151
+ *
152
+ * @returns {LocusDTO}
153
+ */
154
+ private getCurrentLocusSnapshot;
120
155
  /**
121
156
  * Handles HTTP response from Locus API call.
122
157
  * @param {Meeting} meeting meeting object
@@ -125,7 +160,6 @@ export default class LocusInfo extends EventsScope {
125
160
  */
126
161
  handleLocusAPIResponse(meeting: any, responseBody: LocusApiResponseBody): void;
127
162
  /**
128
- *
129
163
  * @param {HashTreeObject} object data set object
130
164
  * @param {any} locus
131
165
  * @returns {void}
@@ -139,6 +173,35 @@ export default class LocusInfo extends EventsScope {
139
173
  * @returns {void}
140
174
  */
141
175
  sendClassicVsHashTreeMismatchMetric(meeting: any, message: string): void;
176
+ /**
177
+ * Helper that handles the common logic for reactivating a stopped HashTreeParser when
178
+ * a newer "replaces" is detected. Used by both the message and API response parser switch methods.
179
+ *
180
+ * @param {string} callerName - name of the calling method, used in log messages
181
+ * @param {string} locusUrl - the locus URL of the stopped parser
182
+ * @param {HashTreeParserEntry} stoppedEntry - the stopped parser entry
183
+ * @param {ReplacesInfo} replaces - replacement info extracted from self
184
+ * @param {Function} resumeCallback - callback to invoke after reactivation to resume the parser
185
+ * @returns {void}
186
+ */
187
+ private resumeStoppedParser;
188
+ /**
189
+ * Handles an API response whose locusUrl doesn't match any active HashTreeParser
190
+ * (either no entry exists, or the existing entry is stopped).
191
+ * Creates a new parser or reactivates a stopped one using initializeFromGetLociResponse.
192
+ *
193
+ * @param {string} locusUrl - the locus URL from the API response
194
+ * @param {LocusDTO} locus - the locus DTO from the API response
195
+ * @returns {void}
196
+ */
197
+ private handleHashTreeParserSwitchForAPIResponse;
198
+ /**
199
+ * Checks if the hash tree message should trigger a switch to a different HashTreeParser
200
+ *
201
+ * @param {HashTreeMessage} message incoming hash tree message
202
+ * @returns {boolean} true if the message was handled as a parser switch, false otherwise
203
+ */
204
+ private handleHashTreeParserSwitch;
142
205
  /**
143
206
  * Handles a hash tree message received from Locus.
144
207
  *
@@ -148,12 +211,23 @@ export default class LocusInfo extends EventsScope {
148
211
  * @returns {void}
149
212
  */
150
213
  private handleHashTreeMessage;
214
+ /**
215
+ * Triggers a sync of all hash tree datasets for all hash tree parsers associated with this meeting.
216
+ * The syncs are executed sequentially within each parser.
217
+ *
218
+ * @param {Object} [options={}] - Options for syncing
219
+ * @param {boolean} [options.onlyLLM=false] - Whether to sync only LLM based data sets
220
+ * @returns {Promise<void>}
221
+ */
222
+ syncAllHashTreeDatasets(options?: {
223
+ onlyLLM?: boolean;
224
+ }): Promise<void>;
151
225
  /**
152
226
  * Callback registered with HashTreeParser to receive locus info updates.
153
227
  * Updates our locus info based on the data parsed by the hash tree parser.
154
228
  *
155
- * @param {LocusInfoUpdateType} updateType - The type of update received.
156
- * @param {Object} [data] - Additional data for the update, if applicable.
229
+ * @param {string} locusUrl - the locus URL for which the update is received
230
+ * @param {LocusInfoUpdate} update - Details about the update.
157
231
  * @returns {void}
158
232
  */
159
233
  private updateFromHashTree;
@@ -175,15 +249,18 @@ export default class LocusInfo extends EventsScope {
175
249
  /**
176
250
  * Function for handling full locus when it's using hash trees (so not the "classic" one).
177
251
  *
252
+ * @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
178
253
  * @param {object} locus locus object
179
- * @param {string} eventType locus event
254
+ * @param {object} metadata locus hash trees metadata
180
255
  * @param {DataSet[]} dataSets
256
+ * @param {string} eventType locus event
181
257
  * @returns {void}
182
258
  */
183
259
  private onFullLocusWithHashTrees;
184
260
  /**
185
261
  * Function for handling full locus when it's the "classic" one (not hash trees)
186
262
  *
263
+ * @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
187
264
  * @param {object} locus locus object
188
265
  * @param {string} eventType locus event
189
266
  * @returns {void}
@@ -191,13 +268,15 @@ export default class LocusInfo extends EventsScope {
191
268
  private onFullLocusClassic;
192
269
  /**
193
270
  * updates the locus with full locus object
271
+ * @param {string} debugText string explaining the trigger for this call, added to logs for debugging purposes
194
272
  * @param {object} locus locus object
195
273
  * @param {string} eventType locus event
196
274
  * @param {DataSet[]} dataSets
275
+ * @param {object} metadata locus hash trees metadata
197
276
  * @returns {object} null
198
277
  * @memberof LocusInfo
199
278
  */
200
- onFullLocus(locus: any, eventType?: string, dataSets?: Array<DataSet>): void;
279
+ onFullLocus(debugText: string, locus: any, eventType?: string, dataSets?: Array<DataSet>, metadata?: Metadata): void;
201
280
  /**
202
281
  * Common part of handling full locus, used by both classic and hash tree based locus handling
203
282
  * @param {object} locus locus object
@@ -211,6 +290,13 @@ export default class LocusInfo extends EventsScope {
211
290
  * @memberof LocusInfo
212
291
  */
213
292
  handleOneOnOneEvent(eventType: string): void;
293
+ /**
294
+ * Makes sure that passed in locus object has a participant object for self.
295
+ *
296
+ * @param {LocusDTO} locus The locus object to check and modify if needed
297
+ * @returns {void}
298
+ */
299
+ ensureSelfParticipantExists(locus: any): void;
214
300
  /**
215
301
  * @param {Object} locus
216
302
  * @returns {undefined}
@@ -222,7 +308,7 @@ export default class LocusInfo extends EventsScope {
222
308
  * @returns {undefined}
223
309
  * @memberof LocusInfo
224
310
  */
225
- updateLocusInfo(locus: any): void;
311
+ updateLocusInfo(locus: any): boolean;
226
312
  /**
227
313
  * @param {Array} participants
228
314
  * @param {Object} self
@@ -278,21 +364,12 @@ export default class LocusInfo extends EventsScope {
278
364
  */
279
365
  updateCreated(created: object): void;
280
366
  /**
281
- * @param {Object} services
367
+ * Updates links and emits appropriate events if services or resources have changed
368
+ * @param {Object} links
282
369
  * @returns {undefined}
283
370
  * @memberof LocusInfo
284
371
  */
285
- updateServices(services: Record<'breakout' | 'record', {
286
- url: string;
287
- }>): void;
288
- /**
289
- * @param {Object} resources
290
- * @returns {undefined}
291
- * @memberof LocusInfo
292
- */
293
- updateResources(resources: Record<'webcastInstance', {
294
- url: string;
295
- }>): void;
372
+ updateLinks(links?: Links): void;
296
373
  /**
297
374
  * @param {Object} fullState
298
375
  * @returns {undefined}
@@ -330,17 +407,11 @@ export default class LocusInfo extends EventsScope {
330
407
  */
331
408
  updateMediaShares(mediaShares: object, forceUpdate?: boolean): void;
332
409
  /**
333
- * @param {String} participantsUrl
410
+ * @param {Object} replaces
334
411
  * @returns {undefined}
335
412
  * @memberof LocusInfo
336
413
  */
337
- updateParticipantsUrl(participantsUrl: string): void;
338
- /**
339
- * @param {Object} replace
340
- * @returns {undefined}
341
- * @memberof LocusInfo
342
- */
343
- updateReplace(replace: object): void;
414
+ updateReplaces(replaces: object): void;
344
415
  /**
345
416
  * handles when the locus.self is updated
346
417
  * @param {Object} self the new locus.self
@@ -375,18 +446,6 @@ export default class LocusInfo extends EventsScope {
375
446
  * @memberof LocusInfo
376
447
  */
377
448
  updateSequence(sequence: number): void;
378
- /**
379
- * @param {Object} membership
380
- * @returns {undefined}
381
- * @memberof LocusInfo
382
- */
383
- updateMemberShip(membership: object): void;
384
- /**
385
- * @param {Array} identities
386
- * @returns {undefined}
387
- * @memberof LocusInfo
388
- */
389
- updateIdentifiers(identities: Array<any>): void;
390
449
  /**
391
450
  * check the locus is main session's one or not, if is main session's, update main session cache
392
451
  * @param {Object} locus
@@ -423,4 +482,10 @@ export default class LocusInfo extends EventsScope {
423
482
  * @memberof LocusInfo
424
483
  */
425
484
  clearMainSessionLocusCache(): void;
485
+ /**
486
+ * Cleans up all hash tree parsers and clears internal maps.
487
+ * @returns {void}
488
+ * @memberof LocusInfo
489
+ */
490
+ cleanUp(): void;
426
491
  }
@@ -1,2 +1,10 @@
1
+ export declare enum DisplayHintSection {
2
+ JOINED = "joined",
3
+ MODERATOR = "moderator",
4
+ COHOST = "coHost",
5
+ PRESENTER = "presenter",
6
+ PANELIST = "panelist",
7
+ ATTENDEE = "attendee"
8
+ }
1
9
  declare const InfoUtils: any;
2
10
  export default InfoUtils;
@@ -1,17 +1,43 @@
1
+ import { Enum } from '../constants';
1
2
  import { HtMeta } from '../hashTree/types';
3
+ export declare const EndMeetingReason: {
4
+ readonly maxMeetingDuration: "MAX_MEETING_DURATION";
5
+ readonly allParticipantsLeft: "ALL_PARTICIPANTS_LEFT";
6
+ readonly sipHostLeft: "SIP_HOST_LEFT";
7
+ readonly noHost: "NO_HOST";
8
+ readonly waitingForMpsEndMeetingTimeout: "WAITING_FOR_MPS_END_MEETING_TIMEOUT";
9
+ readonly fraudDetection: "FRAUD_DETECTION";
10
+ readonly meetingEndedByHost: "MEETING_ENDED_BY_HOST";
11
+ readonly meetingUpdated: "MEETING_UPDATED";
12
+ readonly meetingCancelled: "MEETING_CANCELLED";
13
+ readonly autoEndWithSingleParticipant: "AUTO_END_WITH_SINGLE_PARTICIPANT";
14
+ readonly breakoutEnded: "BREAKOUT_ENDED";
15
+ };
16
+ export type EndMeetingReason = Enum<typeof EndMeetingReason>;
17
+ export type LocusFullState = {
18
+ active: boolean;
19
+ count: number;
20
+ lastActive: string;
21
+ locked: boolean;
22
+ sessionId: string;
23
+ sessionIds: string[];
24
+ startTime: number;
25
+ state: string;
26
+ type: string;
27
+ endMeetingReason?: EndMeetingReason;
28
+ };
29
+ export type Links = {
30
+ services: Record<'breakout' | 'record', {
31
+ url: string;
32
+ }>;
33
+ resources: Record<'webcastInstance' | 'visibleDataSets', {
34
+ url: string;
35
+ }>;
36
+ };
2
37
  export type LocusDTO = {
3
38
  controls?: any;
4
- fullState?: {
5
- active: boolean;
6
- count: number;
7
- lastActive: string;
8
- locked: boolean;
9
- sessionId: string;
10
- seessionIds: string[];
11
- startTime: number;
12
- state: string;
13
- type: string;
14
- };
39
+ embeddedApps?: any[];
40
+ fullState?: LocusFullState;
15
41
  host?: {
16
42
  id: string;
17
43
  incomingCallProtocols: any[];
@@ -23,8 +49,9 @@ export type LocusDTO = {
23
49
  info?: any;
24
50
  jsSdkMeta?: {
25
51
  removedParticipantIds: string[];
52
+ forceReplaceMembers?: boolean;
26
53
  };
27
- links?: any;
54
+ links?: Links;
28
55
  mediaShares?: any[];
29
56
  meetings?: any[];
30
57
  participants: any[];
@@ -43,3 +70,12 @@ export type LocusDTO = {
43
70
  syncUrl?: string;
44
71
  url?: string;
45
72
  };
73
+ export type ReplacesInfo = {
74
+ locusUrl: string;
75
+ replacedAt: string;
76
+ sessionId: string;
77
+ };
78
+ export declare const LocusErrorCodes: {
79
+ readonly LOCUS_INACTIVE: 2403004;
80
+ };
81
+ export type LocusErrorCodes = Enum<typeof LocusErrorCodes>;
@@ -1,5 +1,9 @@
1
1
  export interface MediaConnectionAwaiterProps {
2
2
  webrtcMediaConnection: any;
3
+ correlationId: string;
4
+ }
5
+ export interface FailureResult {
6
+ iceConnected: boolean;
3
7
  }
4
8
  /**
5
9
  * @class MediaConnectionAwaiter
@@ -10,6 +14,7 @@ export default class MediaConnectionAwaiter {
10
14
  private defer;
11
15
  private retried;
12
16
  private iceConnected;
17
+ private correlationId;
13
18
  private onTimeoutCallback;
14
19
  private peerConnectionStateCallback;
15
20
  private iceConnectionStateCallback;
@@ -17,7 +22,7 @@ export default class MediaConnectionAwaiter {
17
22
  /**
18
23
  * @param {MediaConnectionAwaiterProps} mediaConnectionAwaiterProps
19
24
  */
20
- constructor({ webrtcMediaConnection }: MediaConnectionAwaiterProps);
25
+ constructor({ webrtcMediaConnection, correlationId }: MediaConnectionAwaiterProps);
21
26
  /**
22
27
  * Returns true if the connection is connected, false otherwise.
23
28
  *
@@ -30,6 +35,12 @@ export default class MediaConnectionAwaiter {
30
35
  * @returns {boolean}
31
36
  */
32
37
  private isFailed;
38
+ /**
39
+ * Returns true if ICE connection state indicates connectivity.
40
+ *
41
+ * @returns {boolean}
42
+ */
43
+ private isIceConnected;
33
44
  /**
34
45
  * Returns true if the ICE Gathering is completed, false otherwise.
35
46
  *
@@ -66,6 +77,13 @@ export default class MediaConnectionAwaiter {
66
77
  * @returns {void}
67
78
  */
68
79
  iceGatheringStateHandler(): void;
80
+ /**
81
+ * sends a metric with some additional info that might help debugging
82
+ * issues where browser doesn't update the RTCPeerConnection's iceConnectionState or connectionState
83
+ *
84
+ * @returns {void}
85
+ */
86
+ sendMetric(): Promise<void>;
69
87
  /**
70
88
  * Function called when the timeout is reached.
71
89
  *
@@ -75,7 +93,7 @@ export default class MediaConnectionAwaiter {
75
93
  /**
76
94
  * Waits for the webrtc media connection to be connected.
77
95
  *
78
- * @returns {Promise}
96
+ * @returns {Promise<void>} In case of failure, the promise is rejected with FailureResult
79
97
  */
80
98
  waitForMediaConnectionConnected(): Promise<void>;
81
99
  }
@@ -26,6 +26,7 @@ export default class MediaProperties {
26
26
  shareAudioStream?: LocalSystemAudioStream;
27
27
  videoDeviceId: any;
28
28
  videoStream?: LocalCameraStream;
29
+ srtpCipher: string | undefined;
29
30
  namespace: string;
30
31
  mediaIssueCounters: {
31
32
  [key: string]: number;
@@ -93,9 +94,10 @@ export default class MediaProperties {
93
94
  /**
94
95
  * Waits for the webrtc media connection to be connected.
95
96
  *
97
+ * @param {string} correlationId
96
98
  * @returns {Promise<void>}
97
99
  */
98
- waitForMediaConnectionConnected(): Promise<void>;
100
+ waitForMediaConnectionConnected(correlationId: string): Promise<void>;
99
101
  /**
100
102
  * Returns ICE transport information:
101
103
  * - selectedCandidatePairChanges - number of times the selected candidate pair was changed, it should be at least 1 for successful connections