@webex/plugin-meetings 3.0.0-beta.14 → 3.0.0-beta.16

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 (311) hide show
  1. package/UPGRADING.md +9 -9
  2. package/browsers.js +19 -24
  3. package/dist/common/browser-detection.js +1 -20
  4. package/dist/common/browser-detection.js.map +1 -1
  5. package/dist/common/collection.js +5 -20
  6. package/dist/common/collection.js.map +1 -1
  7. package/dist/common/config.js +0 -7
  8. package/dist/common/config.js.map +1 -1
  9. package/dist/common/errors/captcha-error.js +5 -26
  10. package/dist/common/errors/captcha-error.js.map +1 -1
  11. package/dist/common/errors/intent-to-join.js +5 -26
  12. package/dist/common/errors/intent-to-join.js.map +1 -1
  13. package/dist/common/errors/join-meeting.js +6 -27
  14. package/dist/common/errors/join-meeting.js.map +1 -1
  15. package/dist/common/errors/media.js +5 -26
  16. package/dist/common/errors/media.js.map +1 -1
  17. package/dist/common/errors/parameter.js +5 -33
  18. package/dist/common/errors/parameter.js.map +1 -1
  19. package/dist/common/errors/password-error.js +5 -26
  20. package/dist/common/errors/password-error.js.map +1 -1
  21. package/dist/common/errors/permission.js +4 -25
  22. package/dist/common/errors/permission.js.map +1 -1
  23. package/dist/common/errors/reconnection-in-progress.js +0 -17
  24. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  25. package/dist/common/errors/reconnection.js +5 -26
  26. package/dist/common/errors/reconnection.js.map +1 -1
  27. package/dist/common/errors/stats.js +5 -26
  28. package/dist/common/errors/stats.js.map +1 -1
  29. package/dist/common/errors/webex-errors.js +6 -41
  30. package/dist/common/errors/webex-errors.js.map +1 -1
  31. package/dist/common/errors/webex-meetings-error.js +1 -24
  32. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  33. package/dist/common/events/events-scope.js +0 -22
  34. package/dist/common/events/events-scope.js.map +1 -1
  35. package/dist/common/events/events.js +0 -23
  36. package/dist/common/events/events.js.map +1 -1
  37. package/dist/common/events/trigger-proxy.js +0 -12
  38. package/dist/common/events/trigger-proxy.js.map +1 -1
  39. package/dist/common/events/util.js +0 -15
  40. package/dist/common/events/util.js.map +1 -1
  41. package/dist/common/logs/logger-config.js +0 -4
  42. package/dist/common/logs/logger-config.js.map +1 -1
  43. package/dist/common/logs/logger-proxy.js +1 -8
  44. package/dist/common/logs/logger-proxy.js.map +1 -1
  45. package/dist/common/logs/request.js +35 -61
  46. package/dist/common/logs/request.js.map +1 -1
  47. package/dist/common/queue.js +4 -14
  48. package/dist/common/queue.js.map +1 -1
  49. package/dist/config.js +1 -5
  50. package/dist/config.js.map +1 -1
  51. package/dist/constants.js +45 -40
  52. package/dist/constants.js.map +1 -1
  53. package/dist/index.js +1 -17
  54. package/dist/index.js.map +1 -1
  55. package/dist/locus-info/controlsUtils.js +10 -28
  56. package/dist/locus-info/controlsUtils.js.map +1 -1
  57. package/dist/locus-info/embeddedAppsUtils.js +3 -26
  58. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  59. package/dist/locus-info/fullState.js +0 -15
  60. package/dist/locus-info/fullState.js.map +1 -1
  61. package/dist/locus-info/hostUtils.js +4 -12
  62. package/dist/locus-info/hostUtils.js.map +1 -1
  63. package/dist/locus-info/index.js +101 -193
  64. package/dist/locus-info/index.js.map +1 -1
  65. package/dist/locus-info/infoUtils.js +0 -38
  66. package/dist/locus-info/infoUtils.js.map +1 -1
  67. package/dist/locus-info/mediaSharesUtils.js +12 -38
  68. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  69. package/dist/locus-info/parser.js +87 -123
  70. package/dist/locus-info/parser.js.map +1 -1
  71. package/dist/locus-info/selfUtils.js +16 -81
  72. package/dist/locus-info/selfUtils.js.map +1 -1
  73. package/dist/media/index.js +43 -97
  74. package/dist/media/index.js.map +1 -1
  75. package/dist/media/internal-media-core-wrapper.js +0 -4
  76. package/dist/media/internal-media-core-wrapper.js.map +1 -1
  77. package/dist/media/properties.js +64 -110
  78. package/dist/media/properties.js.map +1 -1
  79. package/dist/media/util.js +2 -9
  80. package/dist/media/util.js.map +1 -1
  81. package/dist/mediaQualityMetrics/config.js +10 -12
  82. package/dist/mediaQualityMetrics/config.js.map +1 -1
  83. package/dist/meeting/effectsState.js +120 -192
  84. package/dist/meeting/effectsState.js.map +1 -1
  85. package/dist/meeting/in-meeting-actions.js +0 -13
  86. package/dist/meeting/in-meeting-actions.js.map +1 -1
  87. package/dist/meeting/index.js +819 -1591
  88. package/dist/meeting/index.js.map +1 -1
  89. package/dist/meeting/muteState.js +31 -78
  90. package/dist/meeting/muteState.js.map +1 -1
  91. package/dist/meeting/request.js +160 -230
  92. package/dist/meeting/request.js.map +1 -1
  93. package/dist/meeting/request.type.js +0 -1
  94. package/dist/meeting/request.type.js.map +1 -1
  95. package/dist/meeting/state.js +21 -31
  96. package/dist/meeting/state.js.map +1 -1
  97. package/dist/meeting/util.js +19 -158
  98. package/dist/meeting/util.js.map +1 -1
  99. package/dist/meeting-info/collection.js +3 -25
  100. package/dist/meeting-info/collection.js.map +1 -1
  101. package/dist/meeting-info/index.js +10 -33
  102. package/dist/meeting-info/index.js.map +1 -1
  103. package/dist/meeting-info/meeting-info-v2.js +179 -268
  104. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  105. package/dist/meeting-info/request.js +1 -16
  106. package/dist/meeting-info/request.js.map +1 -1
  107. package/dist/meeting-info/util.js +98 -183
  108. package/dist/meeting-info/util.js.map +1 -1
  109. package/dist/meeting-info/utilv2.js +137 -228
  110. package/dist/meeting-info/utilv2.js.map +1 -1
  111. package/dist/meetings/collection.js +3 -21
  112. package/dist/meetings/collection.js.map +1 -1
  113. package/dist/meetings/index.js +450 -582
  114. package/dist/meetings/index.js.map +1 -1
  115. package/dist/meetings/request.js +7 -30
  116. package/dist/meetings/request.js.map +1 -1
  117. package/dist/meetings/util.js +99 -155
  118. package/dist/meetings/util.js.map +1 -1
  119. package/dist/member/index.js +49 -89
  120. package/dist/member/index.js.map +1 -1
  121. package/dist/member/util.js +17 -68
  122. package/dist/member/util.js.map +1 -1
  123. package/dist/members/collection.js +2 -12
  124. package/dist/members/collection.js.map +1 -1
  125. package/dist/members/index.js +72 -194
  126. package/dist/members/index.js.map +1 -1
  127. package/dist/members/request.js +21 -56
  128. package/dist/members/request.js.map +1 -1
  129. package/dist/members/util.js +9 -38
  130. package/dist/members/util.js.map +1 -1
  131. package/dist/metrics/config.js +0 -2
  132. package/dist/metrics/config.js.map +1 -1
  133. package/dist/metrics/constants.js +1 -2
  134. package/dist/metrics/constants.js.map +1 -1
  135. package/dist/metrics/index.js +48 -136
  136. package/dist/metrics/index.js.map +1 -1
  137. package/dist/multistream/mediaRequestManager.js +12 -28
  138. package/dist/multistream/mediaRequestManager.js.map +1 -1
  139. package/dist/multistream/multistreamMedia.js +11 -21
  140. package/dist/multistream/multistreamMedia.js.map +1 -1
  141. package/dist/multistream/receiveSlot.js +7 -47
  142. package/dist/multistream/receiveSlot.js.map +1 -1
  143. package/dist/multistream/receiveSlotManager.js +38 -77
  144. package/dist/multistream/receiveSlotManager.js.map +1 -1
  145. package/dist/multistream/remoteMedia.js +11 -56
  146. package/dist/multistream/remoteMedia.js.map +1 -1
  147. package/dist/multistream/remoteMediaGroup.js +6 -40
  148. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  149. package/dist/multistream/remoteMediaManager.js +221 -380
  150. package/dist/multistream/remoteMediaManager.js.map +1 -1
  151. package/dist/networkQualityMonitor/index.js +28 -57
  152. package/dist/networkQualityMonitor/index.js.map +1 -1
  153. package/dist/personal-meeting-room/index.js +10 -45
  154. package/dist/personal-meeting-room/index.js.map +1 -1
  155. package/dist/personal-meeting-room/request.js +2 -33
  156. package/dist/personal-meeting-room/request.js.map +1 -1
  157. package/dist/personal-meeting-room/util.js +0 -13
  158. package/dist/personal-meeting-room/util.js.map +1 -1
  159. package/dist/reachability/index.js +100 -166
  160. package/dist/reachability/index.js.map +1 -1
  161. package/dist/reachability/request.js +2 -18
  162. package/dist/reachability/request.js.map +1 -1
  163. package/dist/reactions/reactions.js +0 -2
  164. package/dist/reactions/reactions.js.map +1 -1
  165. package/dist/reactions/reactions.type.js +2 -6
  166. package/dist/reactions/reactions.type.js.map +1 -1
  167. package/dist/reconnection-manager/index.js +294 -459
  168. package/dist/reconnection-manager/index.js.map +1 -1
  169. package/dist/roap/index.js +18 -53
  170. package/dist/roap/index.js.map +1 -1
  171. package/dist/roap/request.js +13 -55
  172. package/dist/roap/request.js.map +1 -1
  173. package/dist/roap/turnDiscovery.js +10 -52
  174. package/dist/roap/turnDiscovery.js.map +1 -1
  175. package/dist/statsAnalyzer/global.js +0 -2
  176. package/dist/statsAnalyzer/global.js.map +1 -1
  177. package/dist/statsAnalyzer/index.js +66 -174
  178. package/dist/statsAnalyzer/index.js.map +1 -1
  179. package/dist/statsAnalyzer/mqaUtil.js +54 -53
  180. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  181. package/dist/transcription/index.js +13 -45
  182. package/dist/transcription/index.js.map +1 -1
  183. package/internal-README.md +7 -6
  184. package/package.json +18 -18
  185. package/src/common/browser-detection.ts +9 -6
  186. package/src/common/collection.ts +3 -1
  187. package/src/common/errors/captcha-error.ts +6 -6
  188. package/src/common/errors/intent-to-join.ts +6 -6
  189. package/src/common/errors/join-meeting.ts +12 -8
  190. package/src/common/errors/media.ts +6 -6
  191. package/src/common/errors/parameter.ts +9 -6
  192. package/src/common/errors/password-error.ts +6 -6
  193. package/src/common/errors/permission.ts +5 -5
  194. package/src/common/errors/reconnection.ts +6 -6
  195. package/src/common/errors/stats.ts +6 -6
  196. package/src/common/errors/webex-errors.ts +7 -5
  197. package/src/common/errors/webex-meetings-error.ts +1 -1
  198. package/src/common/events/events-scope.ts +5 -1
  199. package/src/common/events/events.ts +5 -1
  200. package/src/common/events/trigger-proxy.ts +8 -3
  201. package/src/common/events/util.ts +1 -2
  202. package/src/common/logs/logger-proxy.ts +21 -10
  203. package/src/common/logs/request.ts +11 -8
  204. package/src/config.ts +11 -11
  205. package/src/constants.ts +1 -1
  206. package/src/index.js +1 -1
  207. package/src/locus-info/controlsUtils.ts +34 -24
  208. package/src/locus-info/fullState.ts +15 -11
  209. package/src/locus-info/hostUtils.ts +4 -3
  210. package/src/locus-info/index.ts +25 -34
  211. package/src/locus-info/infoUtils.ts +12 -4
  212. package/src/locus-info/mediaSharesUtils.ts +4 -4
  213. package/src/locus-info/parser.ts +45 -68
  214. package/src/locus-info/selfUtils.ts +106 -57
  215. package/src/media/index.ts +123 -135
  216. package/src/media/internal-media-core-wrapper.ts +2 -2
  217. package/src/media/properties.ts +30 -20
  218. package/src/media/util.ts +1 -1
  219. package/src/mediaQualityMetrics/config.ts +46 -46
  220. package/src/meeting/effectsState.ts +35 -35
  221. package/src/meeting/in-meeting-actions.ts +7 -3
  222. package/src/meeting/index.ts +1559 -1292
  223. package/src/meeting/muteState.ts +62 -31
  224. package/src/meeting/request.ts +155 -116
  225. package/src/meeting/request.type.ts +8 -8
  226. package/src/meeting/state.ts +45 -30
  227. package/src/meeting/util.ts +101 -70
  228. package/src/meeting-info/collection.ts +2 -1
  229. package/src/meeting-info/index.ts +32 -30
  230. package/src/meeting-info/meeting-info-v2.ts +106 -108
  231. package/src/meeting-info/request.ts +9 -3
  232. package/src/meeting-info/util.ts +54 -46
  233. package/src/meeting-info/utilv2.ts +59 -53
  234. package/src/meetings/collection.ts +1 -1
  235. package/src/meetings/index.ts +512 -440
  236. package/src/meetings/request.ts +26 -24
  237. package/src/meetings/util.ts +29 -29
  238. package/src/member/index.ts +55 -49
  239. package/src/member/util.ts +26 -13
  240. package/src/members/collection.ts +0 -1
  241. package/src/members/index.ts +182 -126
  242. package/src/members/request.ts +46 -14
  243. package/src/members/util.ts +44 -42
  244. package/src/metrics/config.ts +254 -81
  245. package/src/metrics/constants.ts +0 -2
  246. package/src/metrics/index.ts +84 -71
  247. package/src/multistream/multistreamMedia.ts +1 -0
  248. package/src/multistream/receiveSlot.ts +1 -0
  249. package/src/multistream/receiveSlotManager.ts +1 -0
  250. package/src/multistream/remoteMedia.ts +1 -1
  251. package/src/multistream/remoteMediaGroup.ts +2 -1
  252. package/src/multistream/remoteMediaManager.ts +3 -0
  253. package/src/networkQualityMonitor/index.ts +20 -23
  254. package/src/personal-meeting-room/index.ts +12 -16
  255. package/src/personal-meeting-room/request.ts +10 -3
  256. package/src/personal-meeting-room/util.ts +3 -3
  257. package/src/reachability/index.ts +61 -59
  258. package/src/reachability/request.ts +36 -32
  259. package/src/reactions/reactions.ts +4 -4
  260. package/src/reactions/reactions.type.ts +4 -3
  261. package/src/reconnection-manager/index.ts +139 -84
  262. package/src/roap/index.ts +46 -38
  263. package/src/roap/request.ts +44 -31
  264. package/src/roap/turnDiscovery.ts +59 -30
  265. package/src/statsAnalyzer/global.ts +30 -33
  266. package/src/statsAnalyzer/index.ts +432 -175
  267. package/src/statsAnalyzer/mqaUtil.ts +178 -72
  268. package/src/transcription/index.ts +34 -32
  269. package/test/integration/spec/journey.js +664 -463
  270. package/test/integration/spec/space-meeting.js +319 -204
  271. package/test/integration/spec/transcription.js +7 -8
  272. package/test/unit/spec/common/browser-detection.js +9 -28
  273. package/test/unit/spec/fixture/locus.js +92 -90
  274. package/test/unit/spec/locus-info/controlsUtils.js +5 -5
  275. package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
  276. package/test/unit/spec/locus-info/index.js +1 -2
  277. package/test/unit/spec/locus-info/infoUtils.js +26 -33
  278. package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
  279. package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
  280. package/test/unit/spec/locus-info/parser.js +3 -9
  281. package/test/unit/spec/locus-info/selfConstant.js +72 -103
  282. package/test/unit/spec/locus-info/selfUtils.js +21 -12
  283. package/test/unit/spec/meeting/effectsState.js +36 -46
  284. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -3
  285. package/test/unit/spec/meeting/index.js +1279 -685
  286. package/test/unit/spec/meeting/muteState.js +42 -33
  287. package/test/unit/spec/meeting/request.js +57 -46
  288. package/test/unit/spec/meeting/utils.js +78 -53
  289. package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
  290. package/test/unit/spec/meeting-info/request.js +7 -9
  291. package/test/unit/spec/meeting-info/util.js +11 -12
  292. package/test/unit/spec/meeting-info/utilv2.js +110 -74
  293. package/test/unit/spec/meetings/collection.js +1 -1
  294. package/test/unit/spec/meetings/index.js +438 -257
  295. package/test/unit/spec/meetings/utils.js +14 -12
  296. package/test/unit/spec/member/index.js +0 -1
  297. package/test/unit/spec/member/util.js +5 -6
  298. package/test/unit/spec/members/index.js +104 -54
  299. package/test/unit/spec/members/request.js +29 -20
  300. package/test/unit/spec/members/utils.js +8 -5
  301. package/test/unit/spec/metrics/index.js +16 -21
  302. package/test/unit/spec/networkQualityMonitor/index.js +21 -15
  303. package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
  304. package/test/unit/spec/reachability/index.ts +9 -11
  305. package/test/unit/spec/reconnection-manager/index.js +16 -18
  306. package/test/unit/spec/roap/turnDiscovery.ts +22 -19
  307. package/test/unit/spec/stats-analyzer/index.js +25 -20
  308. package/test/utils/cmr.js +44 -42
  309. package/test/utils/testUtils.js +83 -74
  310. package/test/utils/webex-config.js +18 -18
  311. package/test/utils/webex-test-users.js +53 -50
@@ -23,7 +23,7 @@ import {
23
23
  PROVISIONAL_TYPE_DIAL_IN,
24
24
  PROVISIONAL_TYPE_DIAL_OUT,
25
25
  SEND_DTMF_ENDPOINT,
26
- _SLIDES_
26
+ _SLIDES_,
27
27
  } from '../constants';
28
28
  import {Reaction} from '../reactions/reactions.type';
29
29
  import {SendReactionOptions, ToggleReactionsOptions} from './request.type';
@@ -36,7 +36,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
36
36
 
37
37
  constructor(attrs: any, options: any) {
38
38
  super(attrs, options);
39
- this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {leading: true, trailing: true});
39
+ this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {
40
+ leading: true,
41
+ trailing: true,
42
+ });
40
43
  }
41
44
 
42
45
  /**
@@ -85,13 +88,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
85
88
  pin,
86
89
  moveToResource,
87
90
  roapMessage,
88
- preferTranscoding
91
+ preferTranscoding,
89
92
  } = options;
90
93
 
91
- LoggerProxy.logger.info(
92
- 'Meeting:request#joinMeeting --> Joining a meeting',
93
- correlationId
94
- );
94
+ LoggerProxy.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);
95
95
 
96
96
  let url = '';
97
97
 
@@ -100,18 +100,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
100
100
  device: {
101
101
  url: deviceUrl,
102
102
  // @ts-ignore - config comes from registerPlugin
103
- deviceType: this.config.meetings.deviceType
103
+ deviceType: this.config.meetings.deviceType,
104
104
  },
105
105
  usingResource: resourceId || null,
106
- moveMediaToResource: resourceId && moveToResource || false,
106
+ moveMediaToResource: (resourceId && moveToResource) || false,
107
107
  correlationId,
108
108
  respOnlySdp: true,
109
109
  allowMultiDevice: true,
110
110
  ensureConversation: ensureConversation || false,
111
111
  supportsNativeLobby: 1,
112
112
  clientMediaPreferences: {
113
- preferTranscoding: preferTranscoding ?? true
114
- }
113
+ preferTranscoding: preferTranscoding ?? true,
114
+ },
115
115
  };
116
116
 
117
117
  // @ts-ignore
@@ -136,30 +136,29 @@ export default class MeetingRequest extends StatelessWebexPlugin {
136
136
 
137
137
  if (locusUrl) {
138
138
  url = `${locusUrl}/${PARTICIPANT}`;
139
- }
140
- else if (inviteeAddress || meetingNumber) {
139
+ } else if (inviteeAddress || meetingNumber) {
141
140
  try {
142
141
  // @ts-ignore
143
142
  await this.webex.internal.services.waitForCatalog('postauth');
144
143
  // @ts-ignore
145
144
  url = `${this.webex.internal.services.get('locus')}/${LOCI}/${CALL}`;
146
145
  body.invitee = {
147
- address: inviteeAddress || `wbxmn:${meetingNumber}`
146
+ address: inviteeAddress || `wbxmn:${meetingNumber}`,
148
147
  };
149
- }
150
- catch (e) {
151
- LoggerProxy.logger.error(`Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`);
152
- throw (e);
148
+ } catch (e) {
149
+ LoggerProxy.logger.error(
150
+ `Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`
151
+ );
152
+ throw e;
153
153
  }
154
154
  }
155
155
 
156
-
157
156
  // TODO: -- this will be resolved in SDK request
158
157
  url = url.concat(`?${ALTERNATE_REDIRECT_TRUE}`);
159
158
 
160
159
  if (resourceId === inviteeAddress) {
161
160
  body.callPreferences = {
162
- requestedMedia: [_SLIDES_]
161
+ requestedMedia: [_SLIDES_],
163
162
  };
164
163
  }
165
164
 
@@ -171,7 +170,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
171
170
  return this.request({
172
171
  method: HTTP_VERBS.POST,
173
172
  uri: url,
174
- body
173
+ body,
175
174
  });
176
175
  }
177
176
 
@@ -183,16 +182,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
183
182
  * @returns {Promise}
184
183
  * @private
185
184
  */
186
- private refreshCaptcha({ captchaRefreshUrl, captchaId }: { captchaRefreshUrl: string; captchaId: string }) {
185
+ private refreshCaptcha({
186
+ captchaRefreshUrl,
187
+ captchaId,
188
+ }: {
189
+ captchaRefreshUrl: string;
190
+ captchaId: string;
191
+ }) {
187
192
  const body = {
188
- captchaId
193
+ captchaId,
189
194
  };
190
195
 
191
196
  // @ts-ignore
192
197
  return this.request({
193
198
  method: HTTP_VERBS.POST,
194
199
  uri: captchaRefreshUrl,
195
- body
200
+ body,
196
201
  }).catch((err) => {
197
202
  LoggerProxy.logger.error(`Meeting:request#refreshCaptcha --> Error: ${err}`);
198
203
 
@@ -232,18 +237,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
232
237
  deviceType: deviceType.PROVISIONAL,
233
238
  provisionalType: PROVISIONAL_TYPE_DIAL_IN,
234
239
  url: dialInUrl,
235
- clientUrl
240
+ clientUrl,
236
241
  },
237
- correlationId
242
+ correlationId,
238
243
  };
239
244
 
240
245
  // @ts-ignore
241
246
  return this.request({
242
247
  method: HTTP_VERBS.POST,
243
248
  uri,
244
- body
249
+ body,
245
250
  }).catch((err) => {
246
- LoggerProxy.logger.error(`Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`);
251
+ LoggerProxy.logger.error(
252
+ `Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`
253
+ );
247
254
 
248
255
  throw err;
249
256
  });
@@ -285,18 +292,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
285
292
  provisionalType: PROVISIONAL_TYPE_DIAL_OUT,
286
293
  url: dialOutUrl,
287
294
  dialoutAddress: phoneNumber,
288
- clientUrl
295
+ clientUrl,
289
296
  },
290
- correlationId
297
+ correlationId,
291
298
  };
292
299
 
293
300
  // @ts-ignore
294
301
  return this.request({
295
302
  method: HTTP_VERBS.POST,
296
303
  uri,
297
- body
304
+ body,
298
305
  }).catch((err) => {
299
- LoggerProxy.logger.error(`Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`);
306
+ LoggerProxy.logger.error(
307
+ `Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`
308
+ );
300
309
 
301
310
  throw err;
302
311
  });
@@ -309,7 +318,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
309
318
  * @param {String} options.syncUrl sync url to get ht elatest locus delta
310
319
  * @returns {Promise}
311
320
  */
312
- syncMeeting(options: { desync: boolean; syncUrl: string }) {
321
+ syncMeeting(options: {desync: boolean; syncUrl: string}) {
313
322
  /* eslint-disable no-else-return */
314
323
  const {desync} = options;
315
324
  let {syncUrl} = options;
@@ -317,16 +326,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
317
326
  /* istanbul ignore else */
318
327
  if (desync) {
319
328
  // check for existing URL parameters
320
- syncUrl = syncUrl.concat(syncUrl.split('?')[1] ? '&' : '?').concat(`${LOCUS.SYNCDEBUG}=${desync}`);
329
+ syncUrl = syncUrl
330
+ .concat(syncUrl.split('?')[1] ? '&' : '?')
331
+ .concat(`${LOCUS.SYNCDEBUG}=${desync}`);
321
332
  }
322
333
 
323
334
  // @ts-ignore
324
335
  return this.request({
325
336
  method: HTTP_VERBS.GET,
326
- uri: syncUrl
337
+ uri: syncUrl,
327
338
  }) // TODO: Handle if delta sync failed . Get the full locus object
328
339
  .catch((err) => {
329
- LoggerProxy.logger.error(`Meeting:request#syncMeeting --> Error syncing meeting, error ${err}`);
340
+ LoggerProxy.logger.error(
341
+ `Meeting:request#syncMeeting --> Error syncing meeting, error ${err}`
342
+ );
330
343
 
331
344
  return err;
332
345
  });
@@ -339,7 +352,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
339
352
  * @param {String} options.locusUrl sync url to get ht elatest locus delta
340
353
  * @returns {Promise}
341
354
  */
342
- getFullLocus(options: { desync: boolean; locusUrl: string }) {
355
+ getFullLocus(options: {desync: boolean; locusUrl: string}) {
343
356
  let {locusUrl} = options;
344
357
  const {desync} = options;
345
358
 
@@ -351,9 +364,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
351
364
  // @ts-ignore
352
365
  return this.request({
353
366
  method: HTTP_VERBS.GET,
354
- uri: locusUrl
367
+ uri: locusUrl,
355
368
  }).catch((err) => {
356
- LoggerProxy.logger.error(`Meeting:request#getFullLocus --> Error getting full locus, error ${err}`);
369
+ LoggerProxy.logger.error(
370
+ `Meeting:request#getFullLocus --> Error getting full locus, error ${err}`
371
+ );
357
372
 
358
373
  return err;
359
374
  });
@@ -392,16 +407,16 @@ export default class MeetingRequest extends StatelessWebexPlugin {
392
407
  const body = {
393
408
  device: {
394
409
  deviceType: deviceType.PROVISIONAL,
395
- url: phoneUrl
410
+ url: phoneUrl,
396
411
  },
397
- correlationId
412
+ correlationId,
398
413
  };
399
414
 
400
415
  // @ts-ignore
401
416
  return this.request({
402
417
  method: HTTP_VERBS.PUT,
403
418
  uri,
404
- body
419
+ body,
405
420
  }).catch((err) => {
406
421
  LoggerProxy.logger.error(
407
422
  `Meeting:request#disconnectPhoneAudio --> Error when requesting phone ${phoneUrl} to leave, error ${err}`
@@ -434,27 +449,24 @@ export default class MeetingRequest extends StatelessWebexPlugin {
434
449
  resourceId: string;
435
450
  correlationId: string;
436
451
  }) {
437
- LoggerProxy.logger.info(
438
- 'Meeting:request#leaveMeeting --> Leaving a meeting',
439
- correlationId
440
- );
452
+ LoggerProxy.logger.info('Meeting:request#leaveMeeting --> Leaving a meeting', correlationId);
441
453
 
442
454
  const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;
443
455
  const body = {
444
456
  device: {
445
457
  // @ts-ignore
446
458
  deviceType: this.config.meetings.deviceType,
447
- url
459
+ url,
448
460
  },
449
461
  usingResource: resourceId || null,
450
- correlationId
462
+ correlationId,
451
463
  };
452
464
 
453
465
  // @ts-ignore
454
466
  return this.request({
455
467
  method: HTTP_VERBS.PUT,
456
468
  uri,
457
- body
469
+ body,
458
470
  });
459
471
  }
460
472
 
@@ -466,22 +478,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
466
478
  * @param {String} options.correlationId
467
479
  * @returns {Promise}
468
480
  */
469
- acknowledgeMeeting(options: { locusUrl: string; deviceUrl: string; correlationId: string }) {
481
+ acknowledgeMeeting(options: {locusUrl: string; deviceUrl: string; correlationId: string}) {
470
482
  const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;
471
483
  const body = {
472
484
  device: {
473
485
  // @ts-ignore
474
486
  deviceType: this.config.meetings.deviceType,
475
- url: options.deviceUrl
487
+ url: options.deviceUrl,
476
488
  },
477
- correlationId: options.correlationId
489
+ correlationId: options.correlationId,
478
490
  };
479
491
 
480
492
  // @ts-ignore
481
493
  return this.request({
482
494
  method: HTTP_VERBS.PUT,
483
495
  uri,
484
- body
496
+ body,
485
497
  });
486
498
  }
487
499
 
@@ -493,20 +505,26 @@ export default class MeetingRequest extends StatelessWebexPlugin {
493
505
  * @param {String} options.id
494
506
  * @returns {Promise}
495
507
  */
496
- recordMeeting(options: { locusUrl: string; deviceUrl: string; id: string, recording: any, paused: any }) {
508
+ recordMeeting(options: {
509
+ locusUrl: string;
510
+ deviceUrl: string;
511
+ id: string;
512
+ recording: any;
513
+ paused: any;
514
+ }) {
497
515
  const uri = `${options.locusUrl}/${CONTROLS}`;
498
516
  const body = {
499
517
  record: {
500
518
  recording: options.recording,
501
- paused: options.paused
502
- }
519
+ paused: options.paused,
520
+ },
503
521
  };
504
522
 
505
523
  // @ts-ignore
506
524
  return this.request({
507
525
  method: HTTP_VERBS.PATCH,
508
526
  uri,
509
- body
527
+ body,
510
528
  });
511
529
  }
512
530
 
@@ -514,15 +532,15 @@ export default class MeetingRequest extends StatelessWebexPlugin {
514
532
  const uri = `${options.locusUrl}/${CONTROLS}`;
515
533
  const body = {
516
534
  lock: {
517
- locked: options.lock
518
- }
535
+ locked: options.lock,
536
+ },
519
537
  };
520
538
 
521
539
  // @ts-ignore
522
540
  return this.request({
523
541
  method: HTTP_VERBS.PATCH,
524
542
  uri,
525
- body
543
+ body,
526
544
  });
527
545
  }
528
546
 
@@ -534,13 +552,13 @@ export default class MeetingRequest extends StatelessWebexPlugin {
534
552
  * @param {String} options.reason
535
553
  * @returns {Promise}
536
554
  */
537
- declineMeeting(options: { locusUrl: string; deviceUrl: string; reason: string }) {
555
+ declineMeeting(options: {locusUrl: string; deviceUrl: string; reason: string}) {
538
556
  const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;
539
557
  const body = {
540
558
  device: {
541
559
  // @ts-ignore
542
560
  deviceType: this.config.meetings.deviceType,
543
- url: options.deviceUrl
561
+ url: options.deviceUrl,
544
562
  },
545
563
  ...(options.reason && {reason: options.reason}),
546
564
  };
@@ -549,7 +567,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
549
567
  return this.request({
550
568
  method: HTTP_VERBS.PUT,
551
569
  uri,
552
- body
570
+ body,
553
571
  });
554
572
  }
555
573
 
@@ -564,34 +582,38 @@ export default class MeetingRequest extends StatelessWebexPlugin {
564
582
  * @param {Boolean} options.preferTranscoding false for multistream (Homer), true for transcoded media (Edonus)
565
583
  * @returns {Promise}
566
584
  */
567
- remoteAudioVideoToggle(options: {
568
- selfId: string;
569
- locusUrl: string;
570
- deviceUrl: string;
571
- resourceId: string;
572
- localMedias: string;
573
- } | any) {
585
+ remoteAudioVideoToggle(
586
+ options:
587
+ | {
588
+ selfId: string;
589
+ locusUrl: string;
590
+ deviceUrl: string;
591
+ resourceId: string;
592
+ localMedias: string;
593
+ }
594
+ | any
595
+ ) {
574
596
  const uri = `${options.locusUrl}/${PARTICIPANT}/${options.selfId}/${MEDIA}`;
575
597
  const body = {
576
598
  device: {
577
599
  // @ts-ignore
578
600
  deviceType: this.config.meetings.deviceType,
579
- url: options.deviceUrl
601
+ url: options.deviceUrl,
580
602
  },
581
603
  usingResource: options.resourceId || null,
582
604
  correlationId: options.correlationId,
583
605
  respOnlySdp: true,
584
606
  localMedias: options.localMedias,
585
607
  clientMediaPreferences: {
586
- preferTranscoding: options.preferTranscoding ?? true
587
- }
608
+ preferTranscoding: options.preferTranscoding ?? true,
609
+ },
588
610
  };
589
611
 
590
612
  // @ts-ignore
591
613
  return this.request({
592
614
  method: HTTP_VERBS.PUT,
593
615
  uri,
594
- body
616
+ body,
595
617
  });
596
618
  }
597
619
 
@@ -605,13 +627,17 @@ export default class MeetingRequest extends StatelessWebexPlugin {
605
627
  * @param {String} options.uri floor grant uri
606
628
  * @returns {Promise}
607
629
  */
608
- changeMeetingFloor(options: {
609
- disposition: string;
610
- personUrl: string;
611
- deviceUrl: string;
612
- resourceId: string;
613
- uri: string;
614
- } | any) {
630
+ changeMeetingFloor(
631
+ options:
632
+ | {
633
+ disposition: string;
634
+ personUrl: string;
635
+ deviceUrl: string;
636
+ resourceId: string;
637
+ uri: string;
638
+ }
639
+ | any
640
+ ) {
615
641
  let floorReq: any = {disposition: options.disposition};
616
642
 
617
643
  /* istanbul ignore else */
@@ -623,20 +649,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
623
649
  {
624
650
  // @ts-ignore
625
651
  deviceType: this.config.meetings.deviceType,
626
- url: options.deviceUrl
627
- }
628
- ]
652
+ url: options.deviceUrl,
653
+ },
654
+ ],
629
655
  },
630
656
  disposition: options.disposition,
631
657
  requester: {
632
- url: options.personUrl
633
- }
658
+ url: options.personUrl,
659
+ },
634
660
  };
635
661
  }
636
662
 
637
663
  const body: any = {
638
664
  floor: floorReq,
639
- resourceUrl: options.resourceUrl
665
+ resourceUrl: options.resourceUrl,
640
666
  };
641
667
 
642
668
  if (options?.resourceToken) {
@@ -647,7 +673,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
647
673
  return this.request({
648
674
  uri: options.uri,
649
675
  method: HTTP_VERBS.PUT,
650
- body
676
+ body,
651
677
  });
652
678
  }
653
679
 
@@ -659,7 +685,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
659
685
  * @param {String} options.tones a string of one or more DTMF tones to send
660
686
  * @returns {Promise}
661
687
  */
662
- sendDTMF({ locusUrl, deviceUrl, tones }: { locusUrl: string; deviceUrl: string; tones: string }) {
688
+ sendDTMF({locusUrl, deviceUrl, tones}: {locusUrl: string; deviceUrl: string; tones: string}) {
663
689
  // @ts-ignore
664
690
  return this.request({
665
691
  method: HTTP_VERBS.POST,
@@ -668,9 +694,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
668
694
  deviceUrl,
669
695
  dtmf: {
670
696
  correlationId: uuid.v4(),
671
- tones
672
- }
673
- }
697
+ tones,
698
+ },
699
+ },
674
700
  });
675
701
  }
676
702
 
@@ -709,24 +735,37 @@ export default class MeetingRequest extends StatelessWebexPlugin {
709
735
  }) {
710
736
  // send main/content renderInfo only if both width and height are specified
711
737
  if (main && (!main.width || !main.height)) {
712
- return Promise.reject(new Error(`Both width and height must be specified. One of them is missing for main: ${JSON.stringify(main)}`));
738
+ return Promise.reject(
739
+ new Error(
740
+ `Both width and height must be specified. One of them is missing for main: ${JSON.stringify(
741
+ main
742
+ )}`
743
+ )
744
+ );
713
745
  }
714
746
 
715
747
  if (content && (!content.width || !content.height)) {
716
- return Promise.reject(new Error(`Both width and height must be specified. One of them is missing for content: ${JSON.stringify(content)}`));
748
+ return Promise.reject(
749
+ new Error(
750
+ `Both width and height must be specified. One of them is missing for content: ${JSON.stringify(
751
+ content
752
+ )}`
753
+ )
754
+ );
717
755
  }
718
756
 
719
- const renderInfoMain = (main) ? {width: main.width, height: main.height} : undefined;
720
- const renderInfoContent = (content) ? {width: content.width, height: content.height} : undefined;
757
+ const renderInfoMain = main ? {width: main.width, height: main.height} : undefined;
758
+ const renderInfoContent = content ? {width: content.width, height: content.height} : undefined;
721
759
 
722
- const layoutParams = (renderInfoMain || renderInfoContent) ?
723
- {
724
- renderInfo:
725
- {
726
- main: renderInfoMain,
727
- content: renderInfoContent
728
- }
729
- } : undefined;
760
+ const layoutParams =
761
+ renderInfoMain || renderInfoContent
762
+ ? {
763
+ renderInfo: {
764
+ main: renderInfoMain,
765
+ content: renderInfoContent,
766
+ },
767
+ }
768
+ : undefined;
730
769
 
731
770
  // @ts-ignore
732
771
  return this.request({
@@ -736,9 +775,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
736
775
  layout: {
737
776
  deviceUrl,
738
777
  type: layoutType,
739
- layoutParams
740
- }
741
- }
778
+ layoutParams,
779
+ },
780
+ },
742
781
  });
743
782
  }
744
783
 
@@ -748,13 +787,13 @@ export default class MeetingRequest extends StatelessWebexPlugin {
748
787
  * @param {Url} options.locusUrl
749
788
  * @returns {Promise}
750
789
  */
751
- endMeetingForAll({ locusUrl }: { locusUrl: string }) {
790
+ endMeetingForAll({locusUrl}: {locusUrl: string}) {
752
791
  const uri = `${locusUrl}/${END}`;
753
792
 
754
793
  // @ts-ignore
755
794
  return this.request({
756
795
  method: HTTP_VERBS.POST,
757
- uri
796
+ uri,
758
797
  });
759
798
  }
760
799
 
@@ -764,11 +803,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
764
803
  * @param {Url} options.keepAliveUrl
765
804
  * @returns {Promise}
766
805
  */
767
- keepAlive({ keepAliveUrl }: { keepAliveUrl: string }) {
806
+ keepAlive({keepAliveUrl}: {keepAliveUrl: string}) {
768
807
  // @ts-ignore
769
808
  return this.request({
770
809
  method: HTTP_VERBS.GET,
771
- uri: keepAliveUrl
810
+ uri: keepAliveUrl,
772
811
  });
773
812
  }
774
813
 
@@ -780,7 +819,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
780
819
  * @param {string} options.senderID
781
820
  * @returns {Promise}
782
821
  */
783
- sendReaction({ reactionChannelUrl, reaction, participantId }: SendReactionOptions) {
822
+ sendReaction({reactionChannelUrl, reaction, participantId}: SendReactionOptions) {
784
823
  const uri = reactionChannelUrl;
785
824
 
786
825
  // @ts-ignore
@@ -790,7 +829,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
790
829
  body: {
791
830
  sender: {participantId},
792
831
  reaction,
793
- }
832
+ },
794
833
  });
795
834
  }
796
835
 
@@ -800,7 +839,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
800
839
  * @param {locusUrl} options.locusUrl
801
840
  * @returns {Promise}
802
841
  */
803
- toggleReactions({ enable, locusUrl, requestingParticipantId }: ToggleReactionsOptions) {
842
+ toggleReactions({enable, locusUrl, requestingParticipantId}: ToggleReactionsOptions) {
804
843
  const uri = `${locusUrl}/${CONTROLS}`;
805
844
 
806
845
  return this.request({
@@ -808,10 +847,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
808
847
  uri,
809
848
  body: {
810
849
  reactions: {
811
- enabled: enable
850
+ enabled: enable,
812
851
  },
813
852
  requestingParticipantId,
814
- }
853
+ },
815
854
  });
816
855
  }
817
856
  }
@@ -1,11 +1,11 @@
1
1
  export type SendReactionOptions = {
2
- reactionChannelUrl: string,
3
- reaction: Reaction,
4
- participantId: string
5
- }
2
+ reactionChannelUrl: string;
3
+ reaction: Reaction;
4
+ participantId: string;
5
+ };
6
6
 
7
7
  export type ToggleReactionsOptions = {
8
- enable: boolean,
9
- locusUrl: string,
10
- requestingParticipantId: string
11
- }
8
+ enable: boolean;
9
+ locusUrl: string;
10
+ requestingParticipantId: string;
11
+ };