@webex/plugin-meetings 2.37.0 → 2.37.1

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