@webex/plugin-meetings 2.35.3 → 2.35.4

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 (212) hide show
  1. package/dist/common/browser-detection.js.map +1 -1
  2. package/dist/common/collection.js.map +1 -1
  3. package/dist/common/config.js.map +1 -1
  4. package/dist/common/errors/captcha-error.js +7 -0
  5. package/dist/common/errors/captcha-error.js.map +1 -1
  6. package/dist/common/errors/intent-to-join.js +8 -0
  7. package/dist/common/errors/intent-to-join.js.map +1 -1
  8. package/dist/common/errors/join-meeting.js +8 -0
  9. package/dist/common/errors/join-meeting.js.map +1 -1
  10. package/dist/common/errors/media.js +7 -0
  11. package/dist/common/errors/media.js.map +1 -1
  12. package/dist/common/errors/parameter.js.map +1 -1
  13. package/dist/common/errors/password-error.js +7 -0
  14. package/dist/common/errors/password-error.js.map +1 -1
  15. package/dist/common/errors/permission.js +7 -0
  16. package/dist/common/errors/permission.js.map +1 -1
  17. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  18. package/dist/common/errors/reconnection.js +7 -0
  19. package/dist/common/errors/reconnection.js.map +1 -1
  20. package/dist/common/errors/stats.js +7 -0
  21. package/dist/common/errors/stats.js.map +1 -1
  22. package/dist/common/errors/webex-errors.js.map +1 -1
  23. package/dist/common/errors/webex-meetings-error.js +5 -2
  24. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  25. package/dist/common/events/events-scope.js.map +1 -1
  26. package/dist/common/events/events.js.map +1 -1
  27. package/dist/common/events/trigger-proxy.js.map +1 -1
  28. package/dist/common/events/util.js.map +1 -1
  29. package/dist/common/logs/logger-config.js.map +1 -1
  30. package/dist/common/logs/logger-proxy.js.map +1 -1
  31. package/dist/common/logs/request.js +3 -0
  32. package/dist/common/logs/request.js.map +1 -1
  33. package/dist/common/queue.js.map +1 -1
  34. package/dist/config.js.map +1 -1
  35. package/dist/constants.js.map +1 -1
  36. package/dist/locus-info/controlsUtils.js.map +1 -1
  37. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  38. package/dist/locus-info/fullState.js.map +1 -1
  39. package/dist/locus-info/hostUtils.js.map +1 -1
  40. package/dist/locus-info/index.js +43 -5
  41. package/dist/locus-info/index.js.map +1 -1
  42. package/dist/locus-info/infoUtils.js.map +1 -1
  43. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  44. package/dist/locus-info/parser.js +12 -3
  45. package/dist/locus-info/parser.js.map +1 -1
  46. package/dist/locus-info/selfUtils.js.map +1 -1
  47. package/dist/media/index.js.map +1 -1
  48. package/dist/media/properties.js +12 -0
  49. package/dist/media/properties.js.map +1 -1
  50. package/dist/media/util.js.map +1 -1
  51. package/dist/mediaQualityMetrics/config.js.map +1 -1
  52. package/dist/meeting/effectsState.js +8 -1
  53. package/dist/meeting/effectsState.js.map +1 -1
  54. package/dist/meeting/index.js +151 -32
  55. package/dist/meeting/index.js.map +1 -1
  56. package/dist/meeting/muteState.js +6 -0
  57. package/dist/meeting/muteState.js.map +1 -1
  58. package/dist/meeting/request.js +54 -24
  59. package/dist/meeting/request.js.map +1 -1
  60. package/dist/meeting/state.js.map +1 -1
  61. package/dist/meeting/util.js.map +1 -1
  62. package/dist/meeting-info/collection.js +4 -1
  63. package/dist/meeting-info/collection.js.map +1 -1
  64. package/dist/meeting-info/index.js +5 -0
  65. package/dist/meeting-info/index.js.map +1 -1
  66. package/dist/meeting-info/meeting-info-v2.js +14 -2
  67. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  68. package/dist/meeting-info/request.js +3 -0
  69. package/dist/meeting-info/request.js.map +1 -1
  70. package/dist/meeting-info/util.js.map +1 -1
  71. package/dist/meeting-info/utilv2.js.map +1 -1
  72. package/dist/meetings/collection.js +4 -1
  73. package/dist/meetings/collection.js.map +1 -1
  74. package/dist/meetings/index.js +72 -20
  75. package/dist/meetings/index.js.map +1 -1
  76. package/dist/meetings/request.js +4 -0
  77. package/dist/meetings/request.js.map +1 -1
  78. package/dist/meetings/util.js.map +1 -1
  79. package/dist/member/index.js +30 -7
  80. package/dist/member/index.js.map +1 -1
  81. package/dist/member/util.js +2 -1
  82. package/dist/member/util.js.map +1 -1
  83. package/dist/members/collection.js +1 -0
  84. package/dist/members/collection.js.map +1 -1
  85. package/dist/members/index.js +12 -1
  86. package/dist/members/index.js.map +1 -1
  87. package/dist/members/request.js +19 -9
  88. package/dist/members/request.js.map +1 -1
  89. package/dist/members/util.js.map +1 -1
  90. package/dist/metrics/config.js.map +1 -1
  91. package/dist/metrics/constants.js.map +1 -1
  92. package/dist/metrics/index.js +8 -0
  93. package/dist/metrics/index.js.map +1 -1
  94. package/dist/networkQualityMonitor/index.js +10 -2
  95. package/dist/networkQualityMonitor/index.js.map +1 -1
  96. package/dist/peer-connection-manager/index.js +11 -4
  97. package/dist/peer-connection-manager/index.js.map +1 -1
  98. package/dist/personal-meeting-room/index.js +11 -0
  99. package/dist/personal-meeting-room/index.js.map +1 -1
  100. package/dist/personal-meeting-room/request.js +2 -1
  101. package/dist/personal-meeting-room/request.js.map +1 -1
  102. package/dist/personal-meeting-room/util.js.map +1 -1
  103. package/dist/reachability/index.js +17 -7
  104. package/dist/reachability/index.js.map +1 -1
  105. package/dist/reachability/request.js +1 -0
  106. package/dist/reachability/request.js.map +1 -1
  107. package/dist/reconnection-manager/index.js +21 -2
  108. package/dist/reconnection-manager/index.js.map +1 -1
  109. package/dist/roap/collection.js +1 -0
  110. package/dist/roap/collection.js.map +1 -1
  111. package/dist/roap/handler.js +14 -2
  112. package/dist/roap/handler.js.map +1 -1
  113. package/dist/roap/index.js +11 -1
  114. package/dist/roap/index.js.map +1 -1
  115. package/dist/roap/request.js +7 -2
  116. package/dist/roap/request.js.map +1 -1
  117. package/dist/roap/state.js.map +1 -1
  118. package/dist/roap/turnDiscovery.js +9 -1
  119. package/dist/roap/turnDiscovery.js.map +1 -1
  120. package/dist/roap/util.js.map +1 -1
  121. package/dist/statsAnalyzer/global.js.map +1 -1
  122. package/dist/statsAnalyzer/index.js +19 -1
  123. package/dist/statsAnalyzer/index.js.map +1 -1
  124. package/dist/statsAnalyzer/mqaUtil.js +9 -3
  125. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  126. package/dist/transcription/index.js +10 -3
  127. package/dist/transcription/index.js.map +1 -1
  128. package/package.json +17 -17
  129. package/src/common/{browser-detection.js → browser-detection.ts} +1 -1
  130. package/src/common/collection.ts +6 -6
  131. package/src/common/{config.js → config.ts} +1 -1
  132. package/src/common/errors/{captcha-error.js → captcha-error.ts} +5 -1
  133. package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +6 -1
  134. package/src/common/errors/{join-meeting.js → join-meeting.ts} +6 -1
  135. package/src/common/errors/{media.js → media.ts} +5 -1
  136. package/src/common/errors/parameter.ts +3 -2
  137. package/src/common/errors/{password-error.js → password-error.ts} +5 -1
  138. package/src/common/errors/{permission.js → permission.ts} +5 -1
  139. package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
  140. package/src/common/errors/{reconnection.js → reconnection.ts} +5 -1
  141. package/src/common/errors/{stats.js → stats.ts} +5 -1
  142. package/src/common/errors/{webex-errors.js → webex-errors.ts} +1 -2
  143. package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +3 -1
  144. package/src/common/events/{events-scope.js → events-scope.ts} +1 -1
  145. package/src/common/events/{events.js → events.ts} +0 -0
  146. package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +1 -2
  147. package/src/common/events/{util.js → util.ts} +1 -1
  148. package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
  149. package/src/common/logs/{logger-proxy.js → logger-proxy.ts} +1 -1
  150. package/src/common/logs/{request.js → request.ts} +12 -2
  151. package/src/common/queue.ts +1 -2
  152. package/src/{config.js → config.ts} +1 -0
  153. package/src/constants.ts +1 -0
  154. package/src/locus-info/{controlsUtils.js → controlsUtils.ts} +4 -4
  155. package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
  156. package/src/locus-info/{fullState.js → fullState.ts} +1 -1
  157. package/src/locus-info/{hostUtils.js → hostUtils.ts} +5 -5
  158. package/src/locus-info/{index.js → index.ts} +67 -32
  159. package/src/locus-info/{infoUtils.js → infoUtils.ts} +3 -4
  160. package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +13 -13
  161. package/src/locus-info/{parser.js → parser.ts} +22 -12
  162. package/src/locus-info/{selfUtils.js → selfUtils.ts} +17 -19
  163. package/src/media/{index.js → index.ts} +108 -39
  164. package/src/media/{properties.js → properties.ts} +16 -4
  165. package/src/media/{util.js → util.ts} +2 -3
  166. package/src/mediaQualityMetrics/{config.js → config.ts} +1 -1
  167. package/src/meeting/{effectsState.js → effectsState.ts} +12 -6
  168. package/src/meeting/{index.js → index.ts} +323 -147
  169. package/src/meeting/{muteState.js → muteState.ts} +16 -11
  170. package/src/meeting/{request.js → request.ts} +124 -36
  171. package/src/meeting/{state.js → state.ts} +6 -6
  172. package/src/meeting/{util.js → util.ts} +4 -4
  173. package/src/meeting-info/{collection.js → collection.ts} +4 -1
  174. package/src/meeting-info/{index.js → index.ts} +10 -6
  175. package/src/meeting-info/{meeting-info-v2.js → meeting-info-v2.ts} +28 -10
  176. package/src/meeting-info/{request.js → request.ts} +6 -2
  177. package/src/meeting-info/{util.js → util.ts} +6 -5
  178. package/src/meeting-info/{utilv2.js → utilv2.ts} +8 -7
  179. package/src/meetings/{collection.js → collection.ts} +5 -2
  180. package/src/meetings/{index.js → index.ts} +88 -22
  181. package/src/meetings/{request.js → request.ts} +6 -1
  182. package/src/meetings/{util.js → util.ts} +5 -3
  183. package/src/member/{index.js → index.ts} +46 -15
  184. package/src/member/{util.js → util.ts} +17 -16
  185. package/src/members/{collection.js → collection.ts} +2 -1
  186. package/src/members/{index.js → index.ts} +39 -26
  187. package/src/members/{request.js → request.ts} +16 -5
  188. package/src/members/{util.js → util.ts} +7 -7
  189. package/src/metrics/{config.js → config.ts} +0 -2
  190. package/src/metrics/{constants.js → constants.ts} +0 -0
  191. package/src/metrics/{index.js → index.ts} +27 -8
  192. package/src/networkQualityMonitor/{index.js → index.ts} +18 -3
  193. package/src/peer-connection-manager/{index.js → index.ts} +72 -28
  194. package/src/personal-meeting-room/{index.js → index.ts} +17 -4
  195. package/src/personal-meeting-room/{request.js → request.ts} +3 -1
  196. package/src/personal-meeting-room/{util.js → util.ts} +1 -1
  197. package/src/reachability/{index.js → index.ts} +28 -17
  198. package/src/reachability/request.ts +4 -2
  199. package/src/reconnection-manager/{index.js → index.ts} +42 -13
  200. package/src/roap/{collection.js → collection.ts} +1 -0
  201. package/src/roap/{handler.js → handler.ts} +15 -4
  202. package/src/roap/{index.js → index.ts} +23 -10
  203. package/src/roap/{request.js → request.ts} +19 -3
  204. package/src/roap/{state.js → state.ts} +3 -2
  205. package/src/roap/turnDiscovery.ts +14 -5
  206. package/src/roap/{util.js → util.ts} +1 -2
  207. package/src/statsAnalyzer/{global.js → global.ts} +0 -0
  208. package/src/statsAnalyzer/{index.js → index.ts} +36 -17
  209. package/src/statsAnalyzer/{mqaUtil.js → mqaUtil.ts} +6 -1
  210. package/src/transcription/{index.js → index.ts} +16 -11
  211. package/test/integration/spec/space-meeting.js +1 -2
  212. package/test/unit/spec/roap/util.js +1 -1
@@ -1,4 +1,3 @@
1
-
2
1
  import LoggerProxy from '../common/logs/logger-proxy';
3
2
  import ParameterError from '../common/errors/parameter';
4
3
  import PermissionError from '../common/errors/permission';
@@ -11,6 +10,7 @@ import {AUDIO, VIDEO} from '../constants';
11
10
  If we ever need to support it, search for REMOTE_MUTE_VIDEO_MISSING_IMPLEMENTATION string to find the places that need updating
12
11
  */
13
12
 
13
+
14
14
  const createMuteState = (type, meeting, mediaDirection) => {
15
15
  if (type === AUDIO && !mediaDirection.sendAudio) {
16
16
  return null;
@@ -30,13 +30,18 @@ const createMuteState = (type, meeting, mediaDirection) => {
30
30
  More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#
31
31
  */
32
32
  class MuteState {
33
+ pendingPromiseReject: any;
34
+ pendingPromiseResolve: any;
35
+ state: any;
36
+ type: any;
37
+
33
38
  /**
34
39
  * Constructor
35
40
  *
36
41
  * @param {String} type - audio or video
37
42
  * @param {Object} meeting - the meeting object (used for reading current remote mute status)
38
43
  */
39
- constructor(type, meeting) {
44
+ constructor(type: string, meeting: any) {
40
45
  if ((type !== AUDIO) && (type !== VIDEO)) {
41
46
  throw new ParameterError('Mute state is designed for handling audio or video only');
42
47
  }
@@ -72,7 +77,7 @@ class MuteState {
72
77
  * @param {Boolean} [mute] true for muting, false for unmuting request
73
78
  * @returns {Promise}
74
79
  */
75
- handleClientRequest(meeting, mute) {
80
+ public handleClientRequest(meeting?: object, mute?: boolean) {
76
81
  LoggerProxy.logger.info(`Meeting:muteState#handleClientRequest --> ${this.type}: user requesting new mute state: ${mute}`);
77
82
 
78
83
  if (!mute && !this.state.server.unmuteAllowed) {
@@ -103,7 +108,7 @@ class MuteState {
103
108
  * @memberof MuteState
104
109
  * @returns {void}
105
110
  */
106
- applyClientStateLocally(meeting) {
111
+ public applyClientStateLocally(meeting?: any) {
107
112
  Media.setLocalTrack(
108
113
  !this.state.client.localMute,
109
114
  (this.type === AUDIO) ? meeting.mediaProperties.audioTrack : meeting.mediaProperties.videoTrack
@@ -118,7 +123,7 @@ class MuteState {
118
123
  * @memberof MuteState
119
124
  * @returns {void}
120
125
  */
121
- applyClientStateToServer(meeting) {
126
+ private applyClientStateToServer(meeting?: object) {
122
127
  if (this.state.syncToServerInProgress) {
123
128
  LoggerProxy.logger.info(`Meeting:muteState#applyClientStateToServer --> ${this.type}: request to server in progress, we need to wait for it to complete`);
124
129
 
@@ -178,7 +183,7 @@ class MuteState {
178
183
  * @memberof MuteState
179
184
  * @returns {Promise}
180
185
  */
181
- sendLocalMuteRequestToServer(meeting) {
186
+ private sendLocalMuteRequestToServer(meeting?: any) {
182
187
  const audioMuted = (this.type === AUDIO) ? this.state.client.localMute : meeting.audio?.state.client.localMute;
183
188
  const videoMuted = (this.type === VIDEO) ? this.state.client.localMute : meeting.video?.state.client.localMute;
184
189
 
@@ -214,7 +219,7 @@ class MuteState {
214
219
  * @memberof MuteState
215
220
  * @returns {Promise}
216
221
  */
217
- sendRemoteMuteRequestToServer(meeting) {
222
+ private sendRemoteMuteRequestToServer(meeting?: any) {
218
223
  if (this.type === AUDIO) {
219
224
  const remoteMute = this.state.client.localMute;
220
225
 
@@ -252,7 +257,7 @@ class MuteState {
252
257
  * @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when "hard mute" feature is used)
253
258
  * @returns {undefined}
254
259
  */
255
- handleServerRemoteMuteUpdate(muted, unmuteAllowed) {
260
+ public handleServerRemoteMuteUpdate(muted?: boolean, unmuteAllowed?: boolean) {
256
261
  LoggerProxy.logger.info(`Meeting:muteState#handleServerRemoteMuteUpdate --> ${this.type}: updating server remoteMute to (${muted})`);
257
262
  this.state.server.remoteMute = muted;
258
263
  this.state.server.unmuteAllowed = unmuteAllowed;
@@ -266,7 +271,7 @@ class MuteState {
266
271
  * @param {Object} [meeting] the meeting object
267
272
  * @returns {undefined}
268
273
  */
269
- handleServerLocalUnmuteRequired(meeting) {
274
+ public handleServerLocalUnmuteRequired(meeting?: object) {
270
275
  LoggerProxy.logger.info(`Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received -> doing local unmute`);
271
276
 
272
277
  this.state.server.remoteMute = false;
@@ -289,7 +294,7 @@ class MuteState {
289
294
  * @memberof MuteState
290
295
  * @returns {Boolean}
291
296
  */
292
- isMuted() {
297
+ public isMuted() {
293
298
  return this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute;
294
299
  }
295
300
 
@@ -300,7 +305,7 @@ class MuteState {
300
305
  * @memberof MuteState
301
306
  * @returns {Boolean}
302
307
  */
303
- isSelf() {
308
+ public isSelf() {
304
309
  return this.state.client.localMute && !this.state.server.remoteMute;
305
310
  }
306
311
 
@@ -1,6 +1,8 @@
1
1
  import uuid from 'uuid';
2
2
  import {debounce} from 'lodash';
3
+ // @ts-ignore
3
4
  import {StatelessWebexPlugin} from '@webex/webex-core';
5
+ // @ts-ignore
4
6
  import {deviceType} from '@webex/common';
5
7
 
6
8
  import LoggerProxy from '../common/logs/logger-proxy';
@@ -28,7 +30,9 @@ import {
28
30
  * @class MeetingRequest
29
31
  */
30
32
  export default class MeetingRequest extends StatelessWebexPlugin {
31
- constructor(attrs, options) {
33
+ changeVideoLayoutDebounced: any;
34
+
35
+ constructor(attrs: any, options: any) {
32
36
  super(attrs, options);
33
37
  this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {leading: true, trailing: true});
34
38
  }
@@ -48,7 +52,23 @@ export default class MeetingRequest extends StatelessWebexPlugin {
48
52
  * @param {Object} options.roapMessage
49
53
  * @returns {Promise}
50
54
  */
51
- async joinMeeting(options) {
55
+ async joinMeeting(options: {
56
+ sipUri: string;
57
+ deviceUrl: string;
58
+ locusUrl: string;
59
+ resourceId: string;
60
+ correlationId: string;
61
+ ensureConversation: boolean;
62
+ moderator: boolean;
63
+ pin: boolean;
64
+ moveToResource: boolean;
65
+ roapMessage: any;
66
+ asResourceOccupant: any;
67
+ inviteeAddress: any;
68
+ meetingNumber: any;
69
+ permissionToken: any;
70
+ preferTranscoding: any;
71
+ }) {
52
72
  const {
53
73
  asResourceOccupant,
54
74
  inviteeAddress,
@@ -73,10 +93,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
73
93
 
74
94
  let url = '';
75
95
 
76
- const body = {
96
+ const body: any = {
77
97
  asResourceOccupant,
78
98
  device: {
79
99
  url: deviceUrl,
100
+ // @ts-ignore - config comes from registerPlugin
80
101
  deviceType: this.config.meetings.deviceType
81
102
  },
82
103
  usingResource: resourceId || null,
@@ -91,8 +112,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
91
112
  }
92
113
  };
93
114
 
115
+ // @ts-ignore
94
116
  if (this.webex.meetings.clientRegion) {
117
+ // @ts-ignore
95
118
  body.device.countryCode = this.webex.meetings.clientRegion.countryCode;
119
+ // @ts-ignore
96
120
  body.device.regionCode = this.webex.meetings.clientRegion.regionCode;
97
121
  }
98
122
 
@@ -113,7 +137,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
113
137
  }
114
138
  else if (inviteeAddress || meetingNumber) {
115
139
  try {
140
+ // @ts-ignore
116
141
  await this.webex.internal.services.waitForCatalog('postauth');
142
+ // @ts-ignore
117
143
  url = `${this.webex.internal.services.get('locus')}/${LOCI}/${CALL}`;
118
144
  body.invitee = {
119
145
  address: inviteeAddress || `wbxmn:${meetingNumber}`
@@ -139,6 +165,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
139
165
  body.localMedias = roapMessage.localMedias;
140
166
  }
141
167
 
168
+ /// @ts-ignore
142
169
  return this.request({
143
170
  method: HTTP_VERBS.POST,
144
171
  uri: url,
@@ -154,14 +181,12 @@ export default class MeetingRequest extends StatelessWebexPlugin {
154
181
  * @returns {Promise}
155
182
  * @private
156
183
  */
157
- refreshCaptcha({
158
- captchaRefreshUrl,
159
- captchaId
160
- }) {
184
+ private refreshCaptcha({ captchaRefreshUrl, captchaId }: { captchaRefreshUrl: string; captchaId: string }) {
161
185
  const body = {
162
186
  captchaId
163
187
  };
164
188
 
189
+ // @ts-ignore
165
190
  return this.request({
166
191
  method: HTTP_VERBS.POST,
167
192
  uri: captchaRefreshUrl,
@@ -177,17 +202,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
177
202
  * Make a network request to add a dial in device
178
203
  * @param {Object} options
179
204
  * @param {String} options.correlationId
180
- * @param {String} options.localUrl url for the meeting
205
+ * @param {String} options.locusUrl url for the meeting
181
206
  * @param {String} options.dialInUrl identifier for the to-be provisioned device
182
207
  * @param {String} options.clientUrl identifier for the web device
183
208
  * @returns {Promise}
184
209
  * @private
185
210
  */
186
- dialIn({
211
+ private dialIn({
187
212
  locusUrl,
188
213
  dialInUrl,
189
214
  clientUrl,
190
- correlationId
215
+ correlationId,
216
+ }: {
217
+ correlationId: string;
218
+ locusUrl: string;
219
+ dialInUrl: string;
220
+ clientUrl: string;
191
221
  }) {
192
222
  LoggerProxy.logger.info(
193
223
  'Meeting:request#dialIn --> Provisioning a dial in device',
@@ -205,6 +235,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
205
235
  correlationId
206
236
  };
207
237
 
238
+ // @ts-ignore
208
239
  return this.request({
209
240
  method: HTTP_VERBS.POST,
210
241
  uri,
@@ -220,19 +251,25 @@ export default class MeetingRequest extends StatelessWebexPlugin {
220
251
  * Make a network request to add a dial out device
221
252
  * @param {Object} options
222
253
  * @param {String} options.correlationId
223
- * @param {String} options.localUrl url for the meeting
254
+ * @param {String} options.locusUrl url for the meeting
224
255
  * @param {String} options.dialOutUrl identifier for the to-be provisioned device
225
256
  * @param {String} options.phoneNumber phone number to dial out to
226
257
  * @param {String} options.clientUrl identifier for the web device
227
258
  * @returns {Promise}
228
259
  * @private
229
260
  */
230
- dialOut({
261
+ private dialOut({
231
262
  locusUrl,
232
263
  dialOutUrl,
233
264
  phoneNumber,
234
265
  clientUrl,
235
- correlationId
266
+ correlationId,
267
+ }: {
268
+ correlationId: string;
269
+ locusUrl: string;
270
+ dialOutUrl: string;
271
+ phoneNumber: string;
272
+ clientUrl: string;
236
273
  }) {
237
274
  LoggerProxy.logger.info(
238
275
  'Meeting:request#dialOut --> Provisioning a dial out device',
@@ -251,6 +288,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
251
288
  correlationId
252
289
  };
253
290
 
291
+ // @ts-ignore
254
292
  return this.request({
255
293
  method: HTTP_VERBS.POST,
256
294
  uri,
@@ -265,11 +303,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
265
303
  /**
266
304
  * Syns the missed delta event
267
305
  * @param {Object} options
268
- * @param {boolen} options.desync flag to get partial or whole locus object
306
+ * @param {boolean} options.desync flag to get partial or whole locus object
269
307
  * @param {String} options.syncUrl sync url to get ht elatest locus delta
270
308
  * @returns {Promise}
271
309
  */
272
- syncMeeting(options) {
310
+ syncMeeting(options: { desync: boolean; syncUrl: string }) {
273
311
  /* eslint-disable no-else-return */
274
312
  const {desync} = options;
275
313
  let {syncUrl} = options;
@@ -280,6 +318,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
280
318
  syncUrl = syncUrl.concat(syncUrl.split('?')[1] ? '&' : '?').concat(`${LOCUS.SYNCDEBUG}=${desync}`);
281
319
  }
282
320
 
321
+ // @ts-ignore
283
322
  return this.request({
284
323
  method: HTTP_VERBS.GET,
285
324
  uri: syncUrl
@@ -294,11 +333,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
294
333
  /**
295
334
  * Request to get the complete locus object
296
335
  * @param {Object} options
297
- * @param {boolen} options.desync flag to get partial or whole locus object
336
+ * @param {boolean} options.desync flag to get partial or whole locus object
298
337
  * @param {String} options.locusUrl sync url to get ht elatest locus delta
299
338
  * @returns {Promise}
300
339
  */
301
- getFullLocus(options) {
340
+ getFullLocus(options: { desync: boolean; locusUrl: string }) {
302
341
  let {locusUrl} = options;
303
342
  const {desync} = options;
304
343
 
@@ -307,6 +346,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
307
346
  locusUrl += `?${LOCUS.SYNCDEBUG}=${desync}`;
308
347
  }
309
348
 
349
+ // @ts-ignore
310
350
  return this.request({
311
351
  method: HTTP_VERBS.GET,
312
352
  uri: locusUrl
@@ -330,11 +370,16 @@ export default class MeetingRequest extends StatelessWebexPlugin {
330
370
  * @returns {Promise}
331
371
  * @private
332
372
  */
333
- disconnectPhoneAudio({
373
+ private disconnectPhoneAudio({
334
374
  locusUrl,
335
375
  phoneUrl,
336
376
  correlationId,
337
- selfId
377
+ selfId,
378
+ }: {
379
+ locusUrl: string;
380
+ phoneUrl: string;
381
+ correlationId: string;
382
+ selfId: string;
338
383
  }) {
339
384
  LoggerProxy.logger.info(
340
385
  `Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,
@@ -350,6 +395,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
350
395
  correlationId
351
396
  };
352
397
 
398
+ // @ts-ignore
353
399
  return this.request({
354
400
  method: HTTP_VERBS.PUT,
355
401
  uri,
@@ -378,7 +424,13 @@ export default class MeetingRequest extends StatelessWebexPlugin {
378
424
  selfId,
379
425
  deviceUrl: url,
380
426
  resourceId,
381
- correlationId
427
+ correlationId,
428
+ }: {
429
+ locusUrl: string;
430
+ selfId: string;
431
+ deviceUrl: string;
432
+ resourceId: string;
433
+ correlationId: string;
382
434
  }) {
383
435
  LoggerProxy.logger.info(
384
436
  'Meeting:request#leaveMeeting --> Leaving a meeting',
@@ -388,6 +440,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
388
440
  const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;
389
441
  const body = {
390
442
  device: {
443
+ // @ts-ignore
391
444
  deviceType: this.config.meetings.deviceType,
392
445
  url
393
446
  },
@@ -395,6 +448,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
395
448
  correlationId
396
449
  };
397
450
 
451
+ // @ts-ignore
398
452
  return this.request({
399
453
  method: HTTP_VERBS.PUT,
400
454
  uri,
@@ -410,16 +464,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
410
464
  * @param {String} options.correlationId
411
465
  * @returns {Promise}
412
466
  */
413
- acknowledgeMeeting(options) {
467
+ acknowledgeMeeting(options: { locusUrl: string; deviceUrl: string; correlationId: string }) {
414
468
  const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;
415
469
  const body = {
416
470
  device: {
471
+ // @ts-ignore
417
472
  deviceType: this.config.meetings.deviceType,
418
473
  url: options.deviceUrl
419
474
  },
420
475
  correlationId: options.correlationId
421
476
  };
422
477
 
478
+ // @ts-ignore
423
479
  return this.request({
424
480
  method: HTTP_VERBS.PUT,
425
481
  uri,
@@ -435,7 +491,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
435
491
  * @param {String} options.id
436
492
  * @returns {Promise}
437
493
  */
438
- recordMeeting(options) {
494
+ recordMeeting(options: { locusUrl: string; deviceUrl: string; id: string, recording: any, paused: any }) {
439
495
  const uri = `${options.locusUrl}/${CONTROLS}`;
440
496
  const body = {
441
497
  record: {
@@ -444,6 +500,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
444
500
  }
445
501
  };
446
502
 
503
+ // @ts-ignore
447
504
  return this.request({
448
505
  method: HTTP_VERBS.PATCH,
449
506
  uri,
@@ -459,6 +516,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
459
516
  }
460
517
  };
461
518
 
519
+ // @ts-ignore
462
520
  return this.request({
463
521
  method: HTTP_VERBS.PATCH,
464
522
  uri,
@@ -474,16 +532,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
474
532
  * @param {String} options.reason
475
533
  * @returns {Promise}
476
534
  */
477
- declineMeeting(options) {
535
+ declineMeeting(options: { locusUrl: string; deviceUrl: string; reason: string }) {
478
536
  const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;
479
537
  const body = {
480
538
  device: {
539
+ // @ts-ignore
481
540
  deviceType: this.config.meetings.deviceType,
482
541
  url: options.deviceUrl
483
542
  },
484
- ...(options.reason && {reason: options.reason})
543
+ ...(options.reason && {reason: options.reason}),
485
544
  };
486
545
 
546
+ // @ts-ignore
487
547
  return this.request({
488
548
  method: HTTP_VERBS.PUT,
489
549
  uri,
@@ -501,10 +561,17 @@ export default class MeetingRequest extends StatelessWebexPlugin {
501
561
  * @param {String} options.localMedias local sdps
502
562
  * @returns {Promise}
503
563
  */
504
- remoteAudioVideoToggle(options) {
564
+ remoteAudioVideoToggle(options: {
565
+ selfId: string;
566
+ locusUrl: string;
567
+ deviceUrl: string;
568
+ resourceId: string;
569
+ localMedias: string;
570
+ } | any) {
505
571
  const uri = `${options.locusUrl}/${PARTICIPANT}/${options.selfId}/${MEDIA}`;
506
572
  const body = {
507
573
  device: {
574
+ // @ts-ignore
508
575
  deviceType: this.config.meetings.deviceType,
509
576
  url: options.deviceUrl
510
577
  },
@@ -517,6 +584,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
517
584
  }
518
585
  };
519
586
 
587
+ // @ts-ignore
520
588
  return this.request({
521
589
  method: HTTP_VERBS.PUT,
522
590
  uri,
@@ -534,8 +602,14 @@ export default class MeetingRequest extends StatelessWebexPlugin {
534
602
  * @param {String} options.uri floor grant uri
535
603
  * @returns {Promise}
536
604
  */
537
- changeMeetingFloor(options) {
538
- let floorReq = {disposition: options.disposition};
605
+ changeMeetingFloor(options: {
606
+ disposition: string;
607
+ personUrl: string;
608
+ deviceUrl: string;
609
+ resourceId: string;
610
+ uri: string;
611
+ } | any) {
612
+ let floorReq: any = {disposition: options.disposition};
539
613
 
540
614
  /* istanbul ignore else */
541
615
  if (options.disposition === FLOOR_ACTION.GRANTED) {
@@ -544,6 +618,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
544
618
  url: options.personUrl,
545
619
  devices: [
546
620
  {
621
+ // @ts-ignore
547
622
  deviceType: this.config.meetings.deviceType,
548
623
  url: options.deviceUrl
549
624
  }
@@ -556,7 +631,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
556
631
  };
557
632
  }
558
633
 
559
- const body = {
634
+ const body: any = {
560
635
  floor: floorReq,
561
636
  resourceUrl: options.resourceUrl
562
637
  };
@@ -565,6 +640,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
565
640
  body.resourceToken = options?.resourceToken;
566
641
  }
567
642
 
643
+ // @ts-ignore
568
644
  return this.request({
569
645
  uri: options.uri,
570
646
  method: HTTP_VERBS.PUT,
@@ -580,7 +656,8 @@ export default class MeetingRequest extends StatelessWebexPlugin {
580
656
  * @param {String} options.tones a string of one or more DTMF tones to send
581
657
  * @returns {Promise}
582
658
  */
583
- sendDTMF({locusUrl, deviceUrl, tones}) {
659
+ sendDTMF({ locusUrl, deviceUrl, tones }: { locusUrl: string; deviceUrl: string; tones: string }) {
660
+ // @ts-ignore
584
661
  return this.request({
585
662
  method: HTTP_VERBS.POST,
586
663
  uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,
@@ -613,7 +690,19 @@ export default class MeetingRequest extends StatelessWebexPlugin {
613
690
  deviceUrl,
614
691
  layoutType,
615
692
  main,
616
- content
693
+ content,
694
+ }: {
695
+ locusUrl: string;
696
+ deviceUrl: string;
697
+ layoutType: string;
698
+ main: {
699
+ width: number;
700
+ height: number;
701
+ };
702
+ content: {
703
+ width: number;
704
+ height: number;
705
+ };
617
706
  }) {
618
707
  // send main/content renderInfo only if both width and height are specified
619
708
  if (main && (!main.width || !main.height)) {
@@ -636,6 +725,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
636
725
  }
637
726
  } : undefined;
638
727
 
728
+ // @ts-ignore
639
729
  return this.request({
640
730
  method: HTTP_VERBS.PUT,
641
731
  uri: `${locusUrl}/${CONTROLS}`,
@@ -655,11 +745,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
655
745
  * @param {Url} options.locusUrl
656
746
  * @returns {Promise}
657
747
  */
658
- endMeetingForAll({
659
- locusUrl,
660
- }) {
748
+ endMeetingForAll({ locusUrl }: { locusUrl: string }) {
661
749
  const uri = `${locusUrl}/${END}`;
662
750
 
751
+ // @ts-ignore
663
752
  return this.request({
664
753
  method: HTTP_VERBS.POST,
665
754
  uri
@@ -672,9 +761,8 @@ export default class MeetingRequest extends StatelessWebexPlugin {
672
761
  * @param {Url} options.keepAliveUrl
673
762
  * @returns {Promise}
674
763
  */
675
- keepAlive({
676
- keepAliveUrl,
677
- }) {
764
+ keepAlive({ keepAliveUrl }: { keepAliveUrl: string }) {
765
+ // @ts-ignore
678
766
  return this.request({
679
767
  method: HTTP_VERBS.GET,
680
768
  uri: keepAliveUrl
@@ -13,7 +13,7 @@ const MeetingStateMachine = {
13
13
  * @param {Meeting} meetingRef A reference to a meeting instance
14
14
  * @returns {StateMachine}
15
15
  */
16
- create(meetingRef) {
16
+ create(meetingRef: any) {
17
17
  if (!meetingRef) {
18
18
  throw new ParameterError('You must initialize the meeting state machine with a meeting reference.');
19
19
  }
@@ -44,7 +44,7 @@ const MeetingStateMachine = {
44
44
  * @param {Boolean} remote.remoteDeclined
45
45
  * @returns {String}
46
46
  */
47
- to(remote) {
47
+ to(remote: { remoteAnswered: boolean; remoteDeclined: boolean }) {
48
48
  // other user answered the call
49
49
  if (remote.remoteAnswered) {
50
50
  return MEETING_STATE_MACHINE.STATES.ANSWERED;
@@ -114,7 +114,7 @@ const MeetingStateMachine = {
114
114
  * @param {Object} stop -- {remoteAnswered: {Boolean}, remoteDeclined: {Boolean}}
115
115
  * @returns {Boolean}
116
116
  */
117
- onRemote(transition, stop) {
117
+ onRemote(transition: object, stop: object) {
118
118
  if (this.meeting) {
119
119
  Trigger.trigger(
120
120
  this.meeting,
@@ -136,7 +136,7 @@ const MeetingStateMachine = {
136
136
  * @param {String} type -- incoming call === INCOMING / or other meetings have a ring type of JOIN
137
137
  * @returns {Boolean}
138
138
  */
139
- onRing(transition, type) {
139
+ onRing(transition: object, type: string) {
140
140
  if (this.meeting) {
141
141
  Trigger.trigger(
142
142
  this.meeting,
@@ -158,7 +158,7 @@ const MeetingStateMachine = {
158
158
  * @param {Error} error
159
159
  * @returns {Boolean}
160
160
  */
161
- onEnterError(transition, error) {
161
+ onEnterError(transition: any, error: Error) {
162
162
  LoggerProxy.logger.error(`Meeting:state#onEnterError --> state->onEnterError#meeting.id: ${this.meeting.id} | Transition '${transition?.transition}' : ${transition?.from} -> ${transition?.to}, with error ${error}. Last states: ${this.history}`);
163
163
  },
164
164
  /**
@@ -166,7 +166,7 @@ const MeetingStateMachine = {
166
166
  * @param {Object} transition
167
167
  * @returns {Boolean}
168
168
  */
169
- onAfterTransition(transition) {
169
+ onAfterTransition(transition: any) {
170
170
  LoggerProxy.logger.log(`Meeting:state#onAfterTransition --> state->onAfterTransition#meeting.id: ${this.meeting.id} | Transition '${transition.transition}' : ${transition.from} -> ${transition.to} executed. Last states: ${this.history}`);
171
171
  }
172
172
  },
@@ -19,10 +19,10 @@ import PermissionError from '../common/errors/permission';
19
19
  import PasswordError from '../common/errors/password-error';
20
20
  import CaptchaError from '../common/errors/captcha-error';
21
21
 
22
- const MeetingUtil = {};
22
+ const MeetingUtil: any = {};
23
23
 
24
24
  MeetingUtil.parseLocusJoin = (response) => {
25
- const parsed = {};
25
+ const parsed: any = {};
26
26
 
27
27
  // First todo: add check for existance
28
28
  parsed.locus = response.body.locus;
@@ -168,7 +168,7 @@ MeetingUtil.disconnectPhoneAudio = (meeting, phoneUrl) => {
168
168
  // if you explicity want it not to leave on resource id, pass
169
169
  // {resourceId: null}
170
170
  // TODO: chris, you can modify this however you want
171
- MeetingUtil.leaveMeeting = (meeting, options = {}) => {
171
+ MeetingUtil.leaveMeeting = (meeting, options: any = {}) => {
172
172
  if (meeting.meetingState === FULL_STATE.INACTIVE) {
173
173
  // TODO: clean up if the meeting is already inactive
174
174
  return Promise.reject(new MeetingNotActiveError());
@@ -237,7 +237,7 @@ MeetingUtil.isMediaEstablished = (currentMediaStatus) =>
237
237
  currentMediaStatus && (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share);
238
238
 
239
239
 
240
- MeetingUtil.joinMeetingOptions = (meeting, options = {}) => {
240
+ MeetingUtil.joinMeetingOptions = (meeting, options: any = {}) => {
241
241
  meeting.resourceId = meeting.resourceId || options.resourceId;
242
242
 
243
243
  if (meeting.requiredCaptcha) {
@@ -24,12 +24,15 @@ export default class MeetingInfoCollection extends Collection {
24
24
  * @public
25
25
  * @memberof MeetingInfoCollection
26
26
  */
27
- get(id) {
27
+ public get(id: string) {
28
+ // @ts-ignore
28
29
  if (this.meetingInfos[id]) {
30
+ // @ts-ignore
29
31
  return this.meetingInfos[id];
30
32
  }
31
33
 
32
34
  return find(
35
+ // @ts-ignore
33
36
  this.meetingInfos,
34
37
  (info) => info.sipUrl === id || info.locusId === id || info.userId === id || info.meetingLink === id
35
38
  );