@webex/plugin-meetings 3.12.0-next.19 → 3.12.0-next.190

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 (312) hide show
  1. package/.sdd/manifest.json +1312 -0
  2. package/.sdd/templates/.source.json +30 -0
  3. package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
  4. package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
  5. package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
  6. package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
  7. package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
  8. package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
  9. package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
  10. package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
  11. package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
  12. package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
  13. package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
  14. package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
  15. package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
  16. package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
  17. package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
  18. package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
  19. package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
  20. package/.sdd/templates/component-repo/template-map.json +112 -0
  21. package/AGENTS.md +135 -0
  22. package/ai-docs/ARCHITECTURE.md +208 -0
  23. package/ai-docs/CONTRACTS.md +267 -0
  24. package/ai-docs/DATA_MODEL.md +64 -0
  25. package/ai-docs/GETTING_STARTED.md +73 -0
  26. package/ai-docs/GLOSSARY.md +56 -0
  27. package/ai-docs/REVIEW_CHECKLIST.md +45 -0
  28. package/ai-docs/RULES.md +79 -0
  29. package/ai-docs/SECURITY.md +74 -0
  30. package/ai-docs/SERVICE_STATE.md +59 -0
  31. package/ai-docs/SPEC_INDEX.md +85 -0
  32. package/ai-docs/TEST_INDEX.md +45 -0
  33. package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
  34. package/ai-docs/patterns/defensive-error-propagation.md +55 -0
  35. package/ai-docs/patterns/event-scope-emission.md +46 -0
  36. package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
  37. package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
  38. package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
  39. package/assets/README.md +28 -0
  40. package/assets/e2ee-0.0.1.js +2 -0
  41. package/assets/e2ee-0.0.1.wasm +0 -0
  42. package/dist/aiEnableRequest/index.js +15 -2
  43. package/dist/aiEnableRequest/index.js.map +1 -1
  44. package/dist/annotation/index.js +55 -19
  45. package/dist/annotation/index.js.map +1 -1
  46. package/dist/assets/e2ee-0.0.1.js +2 -0
  47. package/dist/assets/e2ee-0.0.1.wasm +0 -0
  48. package/dist/breakouts/breakout.js +8 -3
  49. package/dist/breakouts/breakout.js.map +1 -1
  50. package/dist/breakouts/events.js +29 -14
  51. package/dist/breakouts/events.js.map +1 -1
  52. package/dist/breakouts/index.js +128 -7
  53. package/dist/breakouts/index.js.map +1 -1
  54. package/dist/common/errors/webex-errors.js +54 -5
  55. package/dist/common/errors/webex-errors.js.map +1 -1
  56. package/dist/config.js +3 -2
  57. package/dist/config.js.map +1 -1
  58. package/dist/constants.js +39 -11
  59. package/dist/constants.js.map +1 -1
  60. package/dist/controls-options-manager/index.js +46 -10
  61. package/dist/controls-options-manager/index.js.map +1 -1
  62. package/dist/hashTree/constants.js +4 -1
  63. package/dist/hashTree/constants.js.map +1 -1
  64. package/dist/hashTree/hashTreeParser.js +1096 -391
  65. package/dist/hashTree/hashTreeParser.js.map +1 -1
  66. package/dist/hashTree/utils.js +20 -0
  67. package/dist/hashTree/utils.js.map +1 -1
  68. package/dist/index.js +8 -0
  69. package/dist/index.js.map +1 -1
  70. package/dist/interceptors/dataChannelAuthToken.js +58 -16
  71. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  72. package/dist/interceptors/locusRetry.js +24 -9
  73. package/dist/interceptors/locusRetry.js.map +1 -1
  74. package/dist/interpretation/index.js +55 -12
  75. package/dist/interpretation/index.js.map +1 -1
  76. package/dist/interpretation/interpretation.types.js +7 -0
  77. package/dist/interpretation/interpretation.types.js.map +1 -0
  78. package/dist/interpretation/siLanguage.js +1 -1
  79. package/dist/locus-info/controlsUtils.js +4 -1
  80. package/dist/locus-info/controlsUtils.js.map +1 -1
  81. package/dist/locus-info/index.js +615 -176
  82. package/dist/locus-info/index.js.map +1 -1
  83. package/dist/locus-info/infoUtils.js +36 -5
  84. package/dist/locus-info/infoUtils.js.map +1 -1
  85. package/dist/locus-info/types.js +20 -0
  86. package/dist/locus-info/types.js.map +1 -1
  87. package/dist/media/MediaConnectionAwaiter.js +229 -166
  88. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  89. package/dist/media/index.js +8 -2
  90. package/dist/media/index.js.map +1 -1
  91. package/dist/media/properties.js +4 -5
  92. package/dist/media/properties.js.map +1 -1
  93. package/dist/meeting/in-meeting-actions.js +5 -1
  94. package/dist/meeting/in-meeting-actions.js.map +1 -1
  95. package/dist/meeting/index.js +1850 -961
  96. package/dist/meeting/index.js.map +1 -1
  97. package/dist/meeting/locusMediaRequest.js +229 -82
  98. package/dist/meeting/locusMediaRequest.js.map +1 -1
  99. package/dist/meeting/muteState.js +10 -1
  100. package/dist/meeting/muteState.js.map +1 -1
  101. package/dist/meeting/request.js +5 -2
  102. package/dist/meeting/request.js.map +1 -1
  103. package/dist/meeting/util.js +42 -4
  104. package/dist/meeting/util.js.map +1 -1
  105. package/dist/meeting/voicea-meeting.js +2 -1
  106. package/dist/meeting/voicea-meeting.js.map +1 -1
  107. package/dist/meeting-info/meeting-info-v2.js +12 -5
  108. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  109. package/dist/meetings/index.js +304 -129
  110. package/dist/meetings/index.js.map +1 -1
  111. package/dist/meetings/meetings.types.js +6 -1
  112. package/dist/meetings/meetings.types.js.map +1 -1
  113. package/dist/meetings/request.js +39 -0
  114. package/dist/meetings/request.js.map +1 -1
  115. package/dist/meetings/util.js +116 -18
  116. package/dist/meetings/util.js.map +1 -1
  117. package/dist/member/index.js +10 -0
  118. package/dist/member/index.js.map +1 -1
  119. package/dist/member/types.js.map +1 -1
  120. package/dist/member/util.js +30 -0
  121. package/dist/member/util.js.map +1 -1
  122. package/dist/members/index.js +101 -43
  123. package/dist/members/index.js.map +1 -1
  124. package/dist/members/util.js +8 -1
  125. package/dist/members/util.js.map +1 -1
  126. package/dist/metrics/constants.js +7 -1
  127. package/dist/metrics/constants.js.map +1 -1
  128. package/dist/multistream/codec/constants.js +63 -0
  129. package/dist/multistream/codec/constants.js.map +1 -0
  130. package/dist/multistream/mediaRequestManager.js +62 -15
  131. package/dist/multistream/mediaRequestManager.js.map +1 -1
  132. package/dist/multistream/receiveSlot.js +9 -0
  133. package/dist/multistream/receiveSlot.js.map +1 -1
  134. package/dist/multistream/remoteMediaManager.js +32 -4
  135. package/dist/multistream/remoteMediaManager.js.map +1 -1
  136. package/dist/multistream/sendSlotManager.js +11 -1
  137. package/dist/multistream/sendSlotManager.js.map +1 -1
  138. package/dist/reachability/clusterReachability.js.map +1 -1
  139. package/dist/reachability/index.js +121 -83
  140. package/dist/reachability/index.js.map +1 -1
  141. package/dist/reachability/reachability.types.js +2 -0
  142. package/dist/reachability/reachability.types.js.map +1 -1
  143. package/dist/reachability/util.js +45 -0
  144. package/dist/reachability/util.js.map +1 -1
  145. package/dist/reactions/reactions.type.js.map +1 -1
  146. package/dist/recording-controller/index.js +1 -3
  147. package/dist/recording-controller/index.js.map +1 -1
  148. package/dist/roap/turnDiscovery.js +8 -1
  149. package/dist/roap/turnDiscovery.js.map +1 -1
  150. package/dist/types/annotation/index.d.ts +19 -0
  151. package/dist/types/common/errors/webex-errors.d.ts +36 -2
  152. package/dist/types/config.d.ts +3 -2
  153. package/dist/types/constants.d.ts +15 -2
  154. package/dist/types/controls-options-manager/index.d.ts +16 -0
  155. package/dist/types/hashTree/constants.d.ts +1 -0
  156. package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
  157. package/dist/types/hashTree/utils.d.ts +7 -0
  158. package/dist/types/index.d.ts +4 -0
  159. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  160. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  161. package/dist/types/locus-info/index.d.ts +106 -8
  162. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  163. package/dist/types/locus-info/types.d.ts +22 -1
  164. package/dist/types/media/MediaConnectionAwaiter.d.ts +66 -49
  165. package/dist/types/media/properties.d.ts +6 -2
  166. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  167. package/dist/types/meeting/index.d.ts +217 -16
  168. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  169. package/dist/types/meeting/request.d.ts +1 -0
  170. package/dist/types/meeting/util.d.ts +12 -1
  171. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  172. package/dist/types/meetings/index.d.ts +40 -19
  173. package/dist/types/meetings/meetings.types.d.ts +15 -0
  174. package/dist/types/meetings/request.d.ts +14 -0
  175. package/dist/types/member/index.d.ts +1 -0
  176. package/dist/types/member/types.d.ts +1 -0
  177. package/dist/types/member/util.d.ts +9 -0
  178. package/dist/types/members/index.d.ts +15 -2
  179. package/dist/types/members/util.d.ts +1 -5
  180. package/dist/types/metrics/constants.d.ts +6 -0
  181. package/dist/types/multistream/codec/constants.d.ts +7 -0
  182. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  183. package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
  184. package/dist/types/multistream/sendSlotManager.d.ts +5 -1
  185. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  186. package/dist/types/reachability/index.d.ts +10 -3
  187. package/dist/types/reachability/reachability.types.d.ts +7 -0
  188. package/dist/types/reachability/util.d.ts +17 -0
  189. package/dist/types/reactions/reactions.type.d.ts +3 -0
  190. package/dist/webinar/index.js +441 -252
  191. package/dist/webinar/index.js.map +1 -1
  192. package/package.json +26 -24
  193. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  194. package/src/aiEnableRequest/index.ts +16 -0
  195. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  196. package/src/annotation/index.ts +61 -29
  197. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  198. package/src/breakouts/breakout.ts +3 -1
  199. package/src/breakouts/events.ts +33 -11
  200. package/src/breakouts/index.ts +145 -3
  201. package/src/common/errors/webex-errors.ts +56 -3
  202. package/src/config.ts +7 -3
  203. package/src/constants.ts +23 -4
  204. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  205. package/src/controls-options-manager/index.ts +62 -10
  206. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  207. package/src/hashTree/constants.ts +7 -0
  208. package/src/hashTree/hashTreeParser.ts +861 -193
  209. package/src/hashTree/utils.ts +19 -0
  210. package/src/index.ts +7 -0
  211. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  212. package/src/interceptors/dataChannelAuthToken.ts +59 -12
  213. package/src/interceptors/locusRetry.ts +26 -5
  214. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  215. package/src/interpretation/index.ts +65 -10
  216. package/src/interpretation/interpretation.types.ts +11 -0
  217. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  218. package/src/locus-info/controlsUtils.ts +3 -1
  219. package/src/locus-info/index.ts +566 -164
  220. package/src/locus-info/infoUtils.ts +41 -6
  221. package/src/locus-info/types.ts +26 -1
  222. package/src/media/MediaConnectionAwaiter.ts +229 -196
  223. package/src/media/ai-docs/media-spec.md +267 -0
  224. package/src/media/index.ts +10 -1
  225. package/src/media/properties.ts +8 -3
  226. package/src/meeting/ai-docs/meeting-spec.md +404 -0
  227. package/src/meeting/in-meeting-actions.ts +8 -0
  228. package/src/meeting/index.ts +1093 -251
  229. package/src/meeting/locusMediaRequest.ts +106 -6
  230. package/src/meeting/muteState.ts +10 -1
  231. package/src/meeting/request.ts +11 -0
  232. package/src/meeting/util.ts +53 -9
  233. package/src/meeting/voicea-meeting.ts +1 -1
  234. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  235. package/src/meeting-info/meeting-info-v2.ts +11 -4
  236. package/src/meetings/ai-docs/meetings-spec.md +296 -0
  237. package/src/meetings/index.ts +202 -81
  238. package/src/meetings/meetings.types.ts +19 -0
  239. package/src/meetings/request.ts +43 -0
  240. package/src/meetings/util.ts +117 -4
  241. package/src/member/ai-docs/member-spec.md +196 -0
  242. package/src/member/index.ts +10 -0
  243. package/src/member/types.ts +1 -0
  244. package/src/member/util.ts +29 -0
  245. package/src/members/ai-docs/members-spec.md +256 -0
  246. package/src/members/index.ts +70 -7
  247. package/src/members/util.ts +12 -4
  248. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  249. package/src/metrics/constants.ts +6 -0
  250. package/src/multistream/ai-docs/multistream-spec.md +295 -0
  251. package/src/multistream/codec/constants.ts +58 -0
  252. package/src/multistream/mediaRequestManager.ts +119 -28
  253. package/src/multistream/receiveSlot.ts +18 -0
  254. package/src/multistream/remoteMediaManager.ts +23 -1
  255. package/src/multistream/sendSlotManager.ts +15 -1
  256. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  257. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  258. package/src/reachability/clusterReachability.ts +3 -2
  259. package/src/reachability/index.ts +47 -16
  260. package/src/reachability/reachability.types.ts +11 -0
  261. package/src/reachability/util.ts +36 -0
  262. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  263. package/src/reactions/reactions.type.ts +3 -0
  264. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  265. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  266. package/src/recording-controller/index.ts +1 -2
  267. package/src/roap/ai-docs/roap-spec.md +241 -0
  268. package/src/roap/turnDiscovery.ts +9 -1
  269. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  270. package/src/webinar/index.ts +247 -89
  271. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  272. package/test/unit/spec/annotation/index.ts +214 -182
  273. package/test/unit/spec/breakouts/breakout.ts +9 -3
  274. package/test/unit/spec/breakouts/events.ts +120 -2
  275. package/test/unit/spec/breakouts/index.ts +336 -15
  276. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  277. package/test/unit/spec/controls-options-manager/index.js +139 -32
  278. package/test/unit/spec/hashTree/hashTreeParser.ts +2360 -239
  279. package/test/unit/spec/hashTree/utils.ts +37 -0
  280. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +179 -1
  281. package/test/unit/spec/interceptors/locusRetry.ts +234 -5
  282. package/test/unit/spec/interpretation/index.ts +119 -4
  283. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  284. package/test/unit/spec/locus-info/index.js +1014 -58
  285. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  286. package/test/unit/spec/media/MediaConnectionAwaiter.ts +479 -17
  287. package/test/unit/spec/media/index.ts +92 -0
  288. package/test/unit/spec/media/properties.ts +26 -26
  289. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  290. package/test/unit/spec/meeting/index.js +3601 -536
  291. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  292. package/test/unit/spec/meeting/muteState.js +81 -0
  293. package/test/unit/spec/meeting/request.js +12 -0
  294. package/test/unit/spec/meeting/utils.js +205 -19
  295. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  296. package/test/unit/spec/meeting-info/meetinginfov2.js +88 -11
  297. package/test/unit/spec/meetings/index.js +549 -49
  298. package/test/unit/spec/meetings/request.js +141 -0
  299. package/test/unit/spec/meetings/utils.js +402 -51
  300. package/test/unit/spec/member/index.js +7 -0
  301. package/test/unit/spec/member/util.js +89 -0
  302. package/test/unit/spec/members/index.js +216 -0
  303. package/test/unit/spec/members/request.js +37 -1
  304. package/test/unit/spec/members/utils.js +63 -0
  305. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  306. package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
  307. package/test/unit/spec/multistream/sendSlotManager.ts +30 -2
  308. package/test/unit/spec/reachability/index.ts +128 -46
  309. package/test/unit/spec/reachability/util.ts +31 -0
  310. package/test/unit/spec/recording-controller/index.js +9 -8
  311. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  312. package/test/unit/spec/webinar/index.ts +935 -466
@@ -1,5 +1,6 @@
1
1
  /* eslint no-shadow: ["error", { "allow": ["eventType"] }] */
2
- import {cloneDeep, clone, set} from 'lodash';
2
+ import {cloneDeep, clone, set, once} from 'lodash';
3
+ import {WasmRuntimeProbe} from '@webex/web-capabilities';
3
4
  import '@webex/internal-plugin-mercury';
4
5
  import '@webex/internal-plugin-conversation';
5
6
  import '@webex/internal-plugin-metrics';
@@ -55,10 +56,12 @@ import PasswordError from '../common/errors/password-error';
55
56
  import CaptchaError from '../common/errors/captcha-error';
56
57
  import MeetingCollection from './collection';
57
58
  import {
59
+ FetchSitePreferencesMeViaSiteOptions,
58
60
  MEETING_KEY,
59
61
  INoiseReductionEffect,
60
62
  IVirtualBackgroundEffect,
61
63
  MeetingRegistrationStatus,
64
+ SitePreferencesResponse,
62
65
  } from './meetings.types';
63
66
  import MeetingsUtil from './util';
64
67
  import PermissionError from '../common/errors/permission';
@@ -69,7 +72,9 @@ import JoinForbiddenError from '../common/errors/join-forbidden-error';
69
72
  import {HashTreeMessage} from '../hashTree/hashTreeParser';
70
73
  import {HashTreeObject} from '../hashTree/types';
71
74
  import {isSelf} from '../hashTree/utils';
75
+
72
76
  import {createLocusFromHashTreeMessage, findMeetingForHashTreeMessage} from '../locus-info';
77
+ import {LocusDTO} from '../locus-info/types';
73
78
 
74
79
  let mediaLogger;
75
80
 
@@ -206,6 +211,52 @@ export default class Meetings extends WebexPlugin {
206
211
  namespace = MEETINGS;
207
212
  registrationStatus: MeetingRegistrationStatus;
208
213
 
214
+ /**
215
+ * Emits a metric describing how well this browser runs WebAssembly, used to spot browsers
216
+ * where real-time WASM effects (e.g. background noise removal) run poorly.
217
+ *
218
+ * @param {string} correlationId - correlation id to report the result against
219
+ * @returns {void}
220
+ */
221
+ private emitWasmRuntimePerformance = once((correlationId: string): void => {
222
+ // Probe and telemetry failures must not prevent meeting creation.
223
+ WasmRuntimeProbe.check()
224
+ .then((result) => {
225
+ const {status, capability, reason, measurements} = result;
226
+ const {
227
+ divRatio = null,
228
+ sqrtRatio = null,
229
+ addNsPerOp = null,
230
+ addMedianMs = null,
231
+ divMedianMs = null,
232
+ sqrtMedianMs = null,
233
+ } = measurements ?? {};
234
+ const measurementsLog = JSON.stringify(measurements);
235
+
236
+ LoggerProxy.logger.log(
237
+ `Meetings:index#emitWasmRuntimePerformance --> WASM runtime performance status: ${status}, capability: ${capability}, reason: ${reason}, measurements: ${measurementsLog}`
238
+ );
239
+
240
+ return Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.WASM_RUNTIME_PERFORMANCE, {
241
+ status,
242
+ capability,
243
+ reason,
244
+ divRatio,
245
+ sqrtRatio,
246
+ addNsPerOp,
247
+ addMedianMs,
248
+ divMedianMs,
249
+ sqrtMedianMs,
250
+ correlation_id: correlationId,
251
+ });
252
+ })
253
+ .catch((error) => {
254
+ LoggerProxy.logger.error(
255
+ `Meetings:index#emitWasmRuntimePerformance --> ERROR, failed to probe or report WASM runtime performance: ${error.message}`
256
+ );
257
+ });
258
+ });
259
+
209
260
  /**
210
261
  * Initializes the Meetings Plugin
211
262
  * @constructor
@@ -313,7 +364,7 @@ export default class Meetings extends WebexPlugin {
313
364
  const breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
314
365
 
315
366
  const isSelfJoined = newLocus?.self?.state === _JOINED_;
316
- const isSelfMoved = newLocus?.self?.state === _LEFT_ && newLocus?.self?.reason === _MOVED_;
367
+ const isSelfMoved = MeetingsUtil.isSelfMovedOrBreakoutEnded(newLocus);
317
368
  // @ts-ignore
318
369
  const deviceFromNewLocus = MeetingsUtil.getThisDevice(newLocus, this.webex.internal.device.url);
319
370
  const isResourceMovedOnThisDevice =
@@ -390,7 +441,7 @@ export default class Meetings extends WebexPlugin {
390
441
  private isNeedHandleLocusDTO(meeting: any, newLocus: any) {
391
442
  if (newLocus) {
392
443
  const isNewLocusAsBreakout = MeetingsUtil.isBreakoutLocusDTO(newLocus);
393
- const isSelfMoved = newLocus?.self?.state === _LEFT_ && newLocus?.self?.reason === _MOVED_;
444
+ const isSelfMoved = MeetingsUtil.isSelfMovedOrBreakoutEnded(newLocus);
394
445
  const isSelfMovedToLobby =
395
446
  newLocus?.self?.devices[0]?.intent?.reason === _ON_HOLD_LOBBY_ &&
396
447
  newLocus?.self?.devices[0]?.intent?.type === _WAIT_;
@@ -435,14 +486,11 @@ export default class Meetings extends WebexPlugin {
435
486
  if (existingMeeting) {
436
487
  return existingMeeting;
437
488
  }
438
-
439
489
  if (data.eventType === LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
440
490
  // need to check if maybe this event indicates a move to/from breakout
441
491
  const meetingForHashTreeMessage = findMeetingForHashTreeMessage(
442
- data.stateElementsMessage,
443
- this.meetingCollection,
444
- // @ts-ignore
445
- this.webex.internal.device.url
492
+ data?.stateElementsMessage,
493
+ this.meetingCollection
446
494
  );
447
495
 
448
496
  if (meetingForHashTreeMessage) {
@@ -492,7 +540,6 @@ export default class Meetings extends WebexPlugin {
492
540
  */
493
541
  private handleLocusEvent(data: LocusEvent, useRandomDelayForInfo = false) {
494
542
  let meeting = this.getCorrespondingMeetingByLocus(data);
495
-
496
543
  // @ts-ignore
497
544
  if (this.config.experimental.storeLocusHashTreeEventsForDebugging) {
498
545
  storeEventForDebugging('mercury', data);
@@ -513,6 +560,7 @@ export default class Meetings extends WebexPlugin {
513
560
  if (meeting && !MeetingsUtil.isBreakoutLocusDTO(data.locus)) {
514
561
  meeting.locusInfo.updateMainSessionLocusCache(data.locus); // here data.locus will never be a complete locus
515
562
  }
563
+
516
564
  if (!this.isNeedHandleLocusDTO(meeting, data.locus)) {
517
565
  LoggerProxy.logger.log(
518
566
  `Meetings:index#handleLocusEvent --> doesn't need to process locus event`
@@ -586,17 +634,21 @@ export default class Meetings extends WebexPlugin {
586
634
  this.create(data.locus, DESTINATION_TYPE.LOCUS_ID, useRandomDelayForInfo)
587
635
  .then(async (newMeeting) => {
588
636
  meeting = newMeeting;
589
-
590
637
  try {
591
638
  // It's a new meeting so initialize the locus data
592
- await meeting.locusInfo.initialSetup({
593
- trigger:
594
- data.eventType === LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS
595
- ? 'get-loci-response'
596
- : 'locus-message',
597
- locus: data.locus,
598
- hashTreeMessage: data.stateElementsMessage,
599
- });
639
+ await meeting.locusInfo.initialSetup(
640
+ {
641
+ trigger:
642
+ data.eventType === LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS
643
+ ? 'get-loci-response'
644
+ : 'locus-message',
645
+ locus: data.locus,
646
+ hashTreeMessage: data.stateElementsMessage,
647
+ },
648
+ (locus: LocusDTO) => {
649
+ meeting.finalizeMeetingAfterInitialLocusSetup(locus);
650
+ }
651
+ );
600
652
  } catch (error) {
601
653
  LoggerProxy.logger.warn(
602
654
  `Meetings:index#handleLocusEvent --> Error initializing locus data: ${error.message}`
@@ -707,7 +759,14 @@ export default class Meetings extends WebexPlugin {
707
759
 
708
760
  // @ts-ignore
709
761
  this.webex.internal.mercury.on(ONLINE, () => {
710
- this.syncMeetings({keepOnlyLocusMeetings: false});
762
+ // Fire-and-forget sync on socket recovery. Unlike the reconnection manager (which awaits and
763
+ // retries), nothing consumes this promise, so catch its rejection to avoid an unhandled
764
+ // promise rejection (a transient guest classic-sync failure would otherwise crash Node hosts).
765
+ this.syncMeetings({keepOnlyLocusMeetings: false}).catch((error) => {
766
+ LoggerProxy.logger.warn(
767
+ `Meetings:index#listenForEvents --> syncMeetings after ONLINE event failed: ${error}`
768
+ );
769
+ });
711
770
  });
712
771
 
713
772
  // @ts-ignore
@@ -837,97 +896,82 @@ export default class Meetings extends WebexPlugin {
837
896
  }
838
897
 
839
898
  /**
840
- * API to toggle TCP reachability, needs to be called before webex.meetings.register()
841
- * @param {Boolean} newValue
842
- * @private
843
- * @memberof Meetings
844
- * @returns {undefined}
845
- */
846
- private _toggleTcpReachability(newValue: boolean) {
847
- if (typeof newValue !== 'boolean') {
848
- return;
849
- }
850
- // @ts-ignore
851
- if (this.config.experimental.enableTcpReachability !== newValue) {
852
- // @ts-ignore
853
- this.config.experimental.enableTcpReachability = newValue;
854
- }
855
- }
856
-
857
- /**
858
- * API to toggle TLS reachability, needs to be called before webex.meetings.register()
899
+ * API to toggle backend ipv6 native support config, needs to be called before webex.meetings.register()
900
+ *
859
901
  * @param {Boolean} newValue
860
902
  * @private
861
903
  * @memberof Meetings
862
904
  * @returns {undefined}
863
905
  */
864
- private _toggleTlsReachability(newValue: boolean) {
906
+ private _toggleIpv6BackendNativeSupport(newValue: boolean) {
865
907
  if (typeof newValue !== 'boolean') {
866
908
  return;
867
909
  }
868
910
  // @ts-ignore
869
- if (this.config.experimental.enableTlsReachability !== newValue) {
911
+ if (this.config.backendIpv6NativeSupport !== newValue) {
870
912
  // @ts-ignore
871
- this.config.experimental.enableTlsReachability = newValue;
913
+ this.config.backendIpv6NativeSupport = newValue;
872
914
  }
873
915
  }
874
916
 
875
917
  /**
876
- * API to toggle backend ipv6 native support config, needs to be called before webex.meetings.register()
918
+ * API to toggle usage of audio main DTX, needs to be called before webex.meetings.register()
877
919
  *
878
920
  * @param {Boolean} newValue
879
921
  * @private
880
922
  * @memberof Meetings
881
923
  * @returns {undefined}
882
924
  */
883
- private _toggleIpv6BackendNativeSupport(newValue: boolean) {
925
+ private _toggleDisableAudioMainDtx(newValue: boolean) {
884
926
  if (typeof newValue !== 'boolean') {
885
927
  return;
886
928
  }
929
+
887
930
  // @ts-ignore
888
- if (this.config.backendIpv6NativeSupport !== newValue) {
931
+ if (this.config.experimental.disableAudioMainDtx !== newValue) {
889
932
  // @ts-ignore
890
- this.config.backendIpv6NativeSupport = newValue;
933
+ this.config.experimental.disableAudioMainDtx = newValue;
891
934
  }
892
935
  }
893
936
 
894
937
  /**
895
- * API to toggle usage of audio main DTX, needs to be called before webex.meetings.register()
938
+ * API to toggle usage of audio twcc support
896
939
  *
897
940
  * @param {Boolean} newValue
898
941
  * @private
899
942
  * @memberof Meetings
900
943
  * @returns {undefined}
901
944
  */
902
- private _toggleDisableAudioMainDtx(newValue: boolean) {
945
+ private _toggleEnableAudioTwccForMultistream(newValue: boolean) {
903
946
  if (typeof newValue !== 'boolean') {
904
947
  return;
905
948
  }
906
949
 
907
950
  // @ts-ignore
908
- if (this.config.experimental.disableAudioMainDtx !== newValue) {
951
+ if (this.config.enableAudioTwccForMultistream !== newValue) {
909
952
  // @ts-ignore
910
- this.config.experimental.disableAudioMainDtx = newValue;
953
+ this.config.enableAudioTwccForMultistream = newValue;
911
954
  }
912
955
  }
913
956
 
914
957
  /**
915
- * API to toggle usage of audio twcc support
958
+ * API to toggle AV1 codec support for video slides in multistream,
959
+ * needs to be called before webex.meetings.joinWithMedia()
916
960
  *
917
961
  * @param {Boolean} newValue
918
962
  * @private
919
963
  * @memberof Meetings
920
964
  * @returns {undefined}
921
965
  */
922
- private _toggleEnableAudioTwccForMultistream(newValue: boolean) {
966
+ private _toggleEnableAv1SlidesSupport(newValue: boolean) {
923
967
  if (typeof newValue !== 'boolean') {
924
968
  return;
925
969
  }
926
970
 
927
971
  // @ts-ignore
928
- if (this.config.enableAudioTwccForMultistream !== newValue) {
972
+ if (this.config.enableAv1SlidesSupport !== newValue) {
929
973
  // @ts-ignore
930
- this.config.enableAudioTwccForMultistream = newValue;
974
+ this.config.enableAv1SlidesSupport = newValue;
931
975
  }
932
976
  }
933
977
 
@@ -1403,6 +1447,31 @@ export default class Meetings extends WebexPlugin {
1403
1447
  return this.personalMeetingRoom;
1404
1448
  }
1405
1449
 
1450
+ /**
1451
+ * Fetches site preferences for the provided Webex site, or the preferred Webex site.
1452
+ * This is used to determine capabilities of the site, such as whether scheduling a webinar is supported.
1453
+ *
1454
+ * @param {object} [options]
1455
+ * @param {string} [options.siteUrl] - Webex site URL. Defaults to preferredWebexSite, for example "cisco.webex.com".
1456
+ * @param {string} [options.siteName] - Site name query override. Defaults to the site name derived from siteUrl, for example "cisco" for "cisco.webex.com".
1457
+ * @param {SitePreferenceSelectOption[]} [options.selectOptions] - Preference sections to fetch. Defaults to 'scheduling'.
1458
+ * @returns {Promise<SitePreferencesResponse>} site preferences response body
1459
+ * @throws {ParameterError}
1460
+ * @public
1461
+ * @memberof Meetings
1462
+ * @example
1463
+ * const preferences = await webex.meetings.fetchSitePreferencesMeViaSite();
1464
+ * const supportScheduleWebinar = preferences?.scheduling?.supportScheduleWebinar;
1465
+ */
1466
+ public fetchSitePreferencesMeViaSite(
1467
+ options: FetchSitePreferencesMeViaSiteOptions = {}
1468
+ ): Promise<SitePreferencesResponse> {
1469
+ return this.request.fetchSitePreferencesMeViaSite({
1470
+ ...options,
1471
+ siteUrl: options.siteUrl || this.preferredWebexSite,
1472
+ });
1473
+ }
1474
+
1406
1475
  /**
1407
1476
  * Returns basic information about a meeting that exists or
1408
1477
  * used to exist in the MeetingCollection
@@ -1423,7 +1492,11 @@ export default class Meetings extends WebexPlugin {
1423
1492
  * @memberof Meetings
1424
1493
  */
1425
1494
  private destroy(meeting: Meeting, reason: object) {
1426
- MeetingUtil.cleanUp(meeting);
1495
+ MeetingUtil.cleanUp(meeting, {preserveVoiceaChannel: false});
1496
+
1497
+ // Tear down hash tree parsers here (and not in MeetingUtil.cleanUp) so they survive
1498
+ // leave/endMeetingForAll to consume the final sentinel END message from Locus.
1499
+ meeting.locusInfo?.cleanUp();
1427
1500
  // keep some basic info about the deleted meeting forever
1428
1501
  this.deletedMeetings.set(meeting.id, {
1429
1502
  id: meeting.id,
@@ -1620,6 +1693,8 @@ export default class Meetings extends WebexPlugin {
1620
1693
  });
1621
1694
  }
1622
1695
  });
1696
+
1697
+ this.emitWasmRuntimePerformance(createdMeeting.correlationId);
1623
1698
  } else {
1624
1699
  LoggerProxy.logger.error(
1625
1700
  `Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ${meeting}`
@@ -1765,10 +1840,14 @@ export default class Meetings extends WebexPlugin {
1765
1840
  extraParams: infoExtraParams,
1766
1841
  sendCAevents: !!callStateForMetrics?.correlationId, // if client sends correlation id as argument of public create(), then it means that this meeting creation is part of a pre-join intent from user
1767
1842
  };
1843
+ const shouldDeferMeetingInfoFetch = type === DESTINATION_TYPE.LOCUS_ID && !destination?.info;
1844
+
1845
+ const isOneOnOneCallLocus =
1846
+ type === DESTINATION_TYPE.LOCUS_ID && MeetingsUtil.isOneOnOneCall(destination);
1768
1847
 
1769
1848
  if (meetingInfo) {
1770
1849
  meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
1771
- } else if (type !== DESTINATION_TYPE.ONE_ON_ONE_CALL) {
1850
+ } else if (type !== DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus) {
1772
1851
  // ignore fetchMeetingInfo for 1:1 meetings
1773
1852
  if (enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0) {
1774
1853
  meeting.fetchMeetingInfoTimeoutId = setTimeout(
@@ -1776,8 +1855,12 @@ export default class Meetings extends WebexPlugin {
1776
1855
  waitingTime
1777
1856
  );
1778
1857
  meeting.parseMeetingInfo(undefined, destination);
1779
- } else {
1858
+ } else if (!shouldDeferMeetingInfoFetch) {
1780
1859
  await meeting.fetchMeetingInfo(meetingInfoOptions);
1860
+ } else {
1861
+ LoggerProxy.logger.info(
1862
+ 'Meetings:index#createMeeting --> defer fetchMeetingInfo for incomplete locus, will do it after locus initialSetup'
1863
+ );
1781
1864
  }
1782
1865
  }
1783
1866
  } catch (err) {
@@ -1884,29 +1967,35 @@ export default class Meetings extends WebexPlugin {
1884
1967
  }
1885
1968
 
1886
1969
  /**
1887
- * Syncs all the meetings from server. Does nothing and returns immediately if unverified guest.
1970
+ * Syncs all the meetings from server. For unverified guests it skips the getActiveMeetings() call
1971
+ * (which Locus rejects for them) and instead resyncs each meeting individually via LocusInfo#sync.
1888
1972
  * @param {boolean} keepOnlyLocusMeetings - whether the sync should keep only locus meetings or any other meeting in meetingCollection
1889
1973
  * @returns {Promise<void>}
1890
1974
  * @public
1891
1975
  * @memberof Meetings
1892
1976
  */
1893
- public syncMeetings({keepOnlyLocusMeetings = true} = {}): Promise<void> {
1977
+ public async syncMeetings({
1978
+ keepOnlyLocusMeetings = true,
1979
+ skipHashTreeSync = false,
1980
+ } = {}): Promise<void> {
1894
1981
  // @ts-ignore
1895
- if (this.webex.credentials.isUnverifiedGuest) {
1982
+ const isUnverifiedGuest = Boolean(this.webex.credentials.isUnverifiedGuest);
1983
+
1984
+ if (isUnverifiedGuest) {
1896
1985
  LoggerProxy.logger.info(
1897
- 'Meetings:index#syncMeetings --> skipping meeting sync as unverified guest'
1986
+ 'Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync'
1898
1987
  );
1899
1988
 
1900
- return Promise.resolve();
1901
- }
1902
-
1903
- return this.request
1904
- .getActiveMeetings()
1905
- .then((locusArray) => {
1906
- const activeLocusUrl = [];
1989
+ // Locus rejects getActiveMeetings() for unverified guests, so the per-meeting sync below
1990
+ // (with canSyncClassicLocus enabled) resyncs each classic meeting individually instead.
1991
+ } else {
1992
+ try {
1993
+ const locusArray = await this.request.getActiveMeetings();
1994
+ const activeLocusUrl: string[] = [];
1907
1995
 
1908
1996
  if (locusArray?.loci && locusArray.loci.length > 0) {
1909
1997
  const lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
1998
+
1910
1999
  lociToUpdate.forEach((locus) => {
1911
2000
  activeLocusUrl.push(locus.url);
1912
2001
  this.handleLocusEvent({
@@ -1924,21 +2013,54 @@ export default class Meetings extends WebexPlugin {
1924
2013
  // (they had a locusUrl previously but are no longer active) in the sync
1925
2014
  for (const meeting of Object.values(meetingsCollection)) {
1926
2015
  // @ts-ignore
1927
- const {locusUrl} = meeting;
2016
+ const {locusUrl, locusInfo} = meeting;
1928
2017
  if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1929
- // destroy function also uploads logs
1930
- // @ts-ignore
1931
- this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
2018
+ const globalMeetingId = locusInfo?.info?.globalMeetingId;
2019
+
2020
+ if (
2021
+ globalMeetingId &&
2022
+ locusArray?.loci?.some(
2023
+ (locus: LocusDTO) => locus.info?.globalMeetingId === globalMeetingId
2024
+ )
2025
+ ) {
2026
+ // don't destroy the meeting as Locus API still returned some Locus that shares
2027
+ // the same globalMeetingId - that happens for example if a webinar user (who hasn't scheduled it)
2028
+ // is in a breakout and gets moved to a different breakout while we were offline
2029
+ } else {
2030
+ // destroy function also uploads logs
2031
+ // @ts-ignore
2032
+ this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
2033
+ }
1932
2034
  }
1933
2035
  }
1934
2036
  }
1935
- })
1936
- .catch((error) => {
2037
+ } catch (error) {
1937
2038
  LoggerProxy.logger.error(
1938
2039
  `Meetings:index#syncMeetings --> failed to sync meetings, ${error}`
1939
2040
  );
1940
- throw new Error(error);
1941
- });
2041
+ throw error;
2042
+ }
2043
+ }
2044
+
2045
+ // Resync each remaining meeting via LocusInfo#sync, which routes to hash tree or classic. For
2046
+ // signed-in users classic meetings were already synced above, so only the hash tree sync runs.
2047
+ const remainingMeetings = this.meetingCollection.getAll();
2048
+ const syncPromises = [];
2049
+
2050
+ for (const meeting of Object.values(remainingMeetings) as any[]) {
2051
+ if (meeting.locusInfo) {
2052
+ syncPromises.push(
2053
+ meeting.locusInfo.sync(meeting, {
2054
+ canSyncClassicLocus: isUnverifiedGuest,
2055
+ canSyncHashTree: !skipHashTreeSync,
2056
+ })
2057
+ );
2058
+ }
2059
+ }
2060
+
2061
+ if (syncPromises.length > 0) {
2062
+ await Promise.all(syncPromises);
2063
+ }
1942
2064
  }
1943
2065
 
1944
2066
  /**
@@ -1954,8 +2076,8 @@ export default class Meetings extends WebexPlugin {
1954
2076
  this.breakoutLocusForHandleLater = [];
1955
2077
  const lociToUpdate = [...mainLoci];
1956
2078
  breakoutLoci.forEach((breakoutLocus) => {
1957
- const associateMainLocus = mainLoci.find(
1958
- (mainLocus) => mainLocus.controls?.breakout?.url === breakoutLocus.controls?.breakout?.url
2079
+ const associateMainLocus = mainLoci.find((mainLocus) =>
2080
+ MeetingsUtil.isMainAssociatedWithBreakout(mainLocus, breakoutLocus)
1959
2081
  );
1960
2082
  const existCorrespondingMeeting = this.getCorrespondingMeetingByLocus({
1961
2083
  eventType: LOCUSEVENT.SDK_NO_EVENT,
@@ -1983,7 +2105,7 @@ export default class Meetings extends WebexPlugin {
1983
2105
  * @public
1984
2106
  * @memberof Meetings
1985
2107
  */
1986
- checkHandleBreakoutLocus(newCreatedLocus) {
2108
+ checkHandleBreakoutLocus(newCreatedLocus: any) {
1987
2109
  if (
1988
2110
  !newCreatedLocus ||
1989
2111
  !this.breakoutLocusForHandleLater ||
@@ -1994,9 +2116,8 @@ export default class Meetings extends WebexPlugin {
1994
2116
  if (MeetingsUtil.isBreakoutLocusDTO(newCreatedLocus)) {
1995
2117
  return;
1996
2118
  }
1997
- const existIndex = this.breakoutLocusForHandleLater.findIndex(
1998
- (breakoutLocus) =>
1999
- breakoutLocus.controls?.breakout?.url === newCreatedLocus.controls?.breakout?.url
2119
+ const existIndex = this.breakoutLocusForHandleLater.findIndex((breakoutLocus: any) =>
2120
+ MeetingsUtil.isMainAssociatedWithBreakout(newCreatedLocus, breakoutLocus)
2000
2121
  );
2001
2122
 
2002
2123
  if (existIndex < 0) {
@@ -31,3 +31,22 @@ export type MeetingRegistrationStatus = {
31
31
  mercuryConnect: boolean;
32
32
  checkH264Support: boolean;
33
33
  };
34
+
35
+ export enum SitePreferenceSelectOption {
36
+ SCHEDULING = 'scheduling',
37
+ }
38
+
39
+ export type FetchSitePreferencesMeViaSiteOptions = {
40
+ siteUrl?: string;
41
+ siteName?: string;
42
+ selectOptions?: SitePreferenceSelectOption[];
43
+ };
44
+
45
+ export const DEFAULT_SITE_PREFERENCE_SELECT_OPTIONS = [SitePreferenceSelectOption.SCHEDULING];
46
+
47
+ export type SitePreferencesResponse = {
48
+ scheduling?: {
49
+ supportScheduleWebinar?: boolean;
50
+ webinarWebLink?: string;
51
+ };
52
+ };
@@ -2,7 +2,14 @@
2
2
  import {StatelessWebexPlugin} from '@webex/webex-core';
3
3
 
4
4
  import LoggerProxy from '../common/logs/logger-proxy';
5
+ import ParameterError from '../common/errors/parameter';
5
6
  import {HTTP_VERBS, API, RESOURCE} from '../constants';
7
+ import {
8
+ DEFAULT_SITE_PREFERENCE_SELECT_OPTIONS,
9
+ type FetchSitePreferencesMeViaSiteOptions,
10
+ type SitePreferencesResponse,
11
+ } from './meetings.types';
12
+ import MeetingsUtil from './util';
6
13
 
7
14
  /**
8
15
  * @class MeetingRequest
@@ -45,6 +52,42 @@ export default class MeetingRequest extends StatelessWebexPlugin {
45
52
  return this.webex.internal.services.getMeetingPreferences();
46
53
  }
47
54
 
55
+ /**
56
+ * Fetches site preferences from a given site given a select option and a siteUrl with an optional siteName. If siteName is not provided, it will be derived from the siteUrl. If siteUrl is not provided, it will throw an error. If selectOptions is not provided, it will default to scheduling.
57
+ *
58
+ * @param {object} [options]
59
+ * @param {string} [options.siteUrl] - Webex site URL, for example "cisco.webex.com".
60
+ * @param {string} [options.siteName] - Site name query override. Defaults to the site name derived from options.siteUrl, e.g., "cisco".
61
+ * @param {SitePreferenceSelectOption[]} [options.selectOptions] - Preference sections to fetch. Defaults to 'scheduling'.
62
+ * @returns {Promise<SitePreferencesResponse>} site preferences response body
63
+ * @throws {ParameterError}
64
+ * @public
65
+ * @memberof MeetingRequest
66
+ */
67
+ fetchSitePreferencesMeViaSite(
68
+ options: FetchSitePreferencesMeViaSiteOptions = {}
69
+ ): Promise<SitePreferencesResponse> {
70
+ const {siteUrl, selectOptions = DEFAULT_SITE_PREFERENCE_SELECT_OPTIONS} = options;
71
+
72
+ if (!siteUrl) {
73
+ throw new ParameterError(
74
+ 'No siteUrl available. Call register() before fetching site preferences or provide options.siteUrl.'
75
+ );
76
+ }
77
+
78
+ // @ts-ignore - config comes from registerPlugin
79
+ const multipartSitePrefixList = this.config.meetings.multipartSitePrefixList || [];
80
+ const siteName = options.siteName || MeetingsUtil.getSiteName(siteUrl, multipartSitePrefixList);
81
+
82
+ // @ts-ignore
83
+ return this.request({
84
+ method: HTTP_VERBS.GET,
85
+ uri: `https://${siteUrl}/wbxappapi/v1/users/me/preference?select=${encodeURIComponent(
86
+ selectOptions.join(',')
87
+ )}&siteurl=${encodeURIComponent(siteName)}`,
88
+ }).then((res: any) => res.body);
89
+ }
90
+
48
91
  // locus federation, determines and populate locus if the responseBody has remote URLs to fetch locus details
49
92
 
50
93
  /**