@webex/plugin-meetings 3.1.0 → 3.3.0

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 (206) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/common/errors/{reconnection-in-progress.js → reconnection-not-started.js} +27 -15
  4. package/dist/common/errors/reconnection-not-started.js.map +1 -0
  5. package/dist/constants.js +12 -3
  6. package/dist/constants.js.map +1 -1
  7. package/dist/index.js +80 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/interpretation/index.js +1 -1
  10. package/dist/interpretation/siLanguage.js +1 -1
  11. package/dist/locus-info/controlsUtils.js +7 -1
  12. package/dist/locus-info/controlsUtils.js.map +1 -1
  13. package/dist/locus-info/index.js +10 -0
  14. package/dist/locus-info/index.js.map +1 -1
  15. package/dist/media/properties.js +102 -57
  16. package/dist/media/properties.js.map +1 -1
  17. package/dist/meeting/in-meeting-actions.js +6 -0
  18. package/dist/meeting/in-meeting-actions.js.map +1 -1
  19. package/dist/meeting/index.js +543 -467
  20. package/dist/meeting/index.js.map +1 -1
  21. package/dist/meeting/locusMediaRequest.js +27 -0
  22. package/dist/meeting/locusMediaRequest.js.map +1 -1
  23. package/dist/meeting/util.js +9 -16
  24. package/dist/meeting/util.js.map +1 -1
  25. package/dist/meeting/voicea-meeting.js +37 -49
  26. package/dist/meeting/voicea-meeting.js.map +1 -1
  27. package/dist/meeting-info/util.js +304 -267
  28. package/dist/meeting-info/util.js.map +1 -1
  29. package/dist/meeting-info/utilv2.js +334 -298
  30. package/dist/meeting-info/utilv2.js.map +1 -1
  31. package/dist/meetings/index.js +6 -27
  32. package/dist/meetings/index.js.map +1 -1
  33. package/dist/reachability/index.js +6 -0
  34. package/dist/reachability/index.js.map +1 -1
  35. package/dist/reconnection-manager/index.js +138 -109
  36. package/dist/reconnection-manager/index.js.map +1 -1
  37. package/dist/roap/request.js +3 -27
  38. package/dist/roap/request.js.map +1 -1
  39. package/dist/statsAnalyzer/index.js +4 -0
  40. package/dist/statsAnalyzer/index.js.map +1 -1
  41. package/dist/statsAnalyzer/mqaUtil.js +3 -0
  42. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  43. package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
  44. package/dist/{constants.d.ts → types/constants.d.ts} +11 -2
  45. package/dist/types/index.d.ts +19 -0
  46. package/dist/{media → types/media}/properties.d.ts +26 -2
  47. package/dist/{meeting → types/meeting}/in-meeting-actions.d.ts +6 -0
  48. package/dist/{meeting → types/meeting}/index.d.ts +5 -6
  49. package/dist/{meeting → types/meeting}/locusMediaRequest.d.ts +1 -0
  50. package/dist/{meeting → types/meeting}/util.d.ts +3 -0
  51. package/dist/{meeting → types/meeting}/voicea-meeting.d.ts +3 -2
  52. package/dist/{meeting-info → types/meeting-info}/index.d.ts +1 -1
  53. package/dist/{meeting-info → types/meeting-info}/meeting-info-v2.d.ts +1 -1
  54. package/dist/types/meeting-info/util.d.ts +49 -0
  55. package/dist/types/meeting-info/utilv2.d.ts +65 -0
  56. package/dist/{meetings → types/meetings}/index.d.ts +1 -16
  57. package/dist/{reconnection-manager → types/reconnection-manager}/index.d.ts +4 -14
  58. package/dist/webinar/index.js +1 -1
  59. package/package.json +22 -22
  60. package/src/common/errors/reconnection-not-started.ts +25 -0
  61. package/src/constants.ts +12 -4
  62. package/src/index.ts +30 -0
  63. package/src/locus-info/controlsUtils.ts +11 -0
  64. package/src/locus-info/index.ts +16 -0
  65. package/src/media/properties.ts +67 -15
  66. package/src/meeting/in-meeting-actions.ts +12 -0
  67. package/src/meeting/index.ts +121 -98
  68. package/src/meeting/locusMediaRequest.ts +31 -0
  69. package/src/meeting/util.ts +9 -16
  70. package/src/meeting/voicea-meeting.ts +44 -46
  71. package/src/meeting-info/util.ts +241 -233
  72. package/src/meeting-info/utilv2.ts +250 -244
  73. package/src/meetings/index.ts +8 -25
  74. package/src/reachability/index.ts +3 -0
  75. package/src/reconnection-manager/index.ts +128 -105
  76. package/src/roap/request.ts +1 -24
  77. package/src/statsAnalyzer/index.ts +4 -0
  78. package/src/statsAnalyzer/mqaUtil.ts +5 -0
  79. package/test/unit/spec/locus-info/controlsUtils.js +20 -0
  80. package/test/unit/spec/locus-info/index.js +21 -0
  81. package/test/unit/spec/media/properties.ts +145 -140
  82. package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
  83. package/test/unit/spec/meeting/index.js +243 -97
  84. package/test/unit/spec/meeting/locusMediaRequest.ts +49 -0
  85. package/test/unit/spec/meeting/utils.js +3 -10
  86. package/test/unit/spec/meeting/voicea-meeting.ts +5 -14
  87. package/test/unit/spec/meetings/index.js +27 -8
  88. package/test/unit/spec/reconnection-manager/index.js +127 -39
  89. package/test/unit/spec/roap/request.ts +0 -37
  90. package/test/unit/spec/stats-analyzer/index.js +11 -0
  91. package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
  92. package/dist/common/errors/reconnection-in-progress.js.map +0 -1
  93. package/dist/index.d.ts +0 -7
  94. package/dist/meeting-info/util.d.ts +0 -2
  95. package/dist/meeting-info/utilv2.d.ts +0 -2
  96. package/src/common/errors/reconnection-in-progress.ts +0 -8
  97. /package/dist/{annotation → types/annotation}/annotation.types.d.ts +0 -0
  98. /package/dist/{annotation → types/annotation}/constants.d.ts +0 -0
  99. /package/dist/{annotation → types/annotation}/index.d.ts +0 -0
  100. /package/dist/{breakouts → types/breakouts}/breakout.d.ts +0 -0
  101. /package/dist/{breakouts → types/breakouts}/collection.d.ts +0 -0
  102. /package/dist/{breakouts → types/breakouts}/edit-lock-error.d.ts +0 -0
  103. /package/dist/{breakouts → types/breakouts}/events.d.ts +0 -0
  104. /package/dist/{breakouts → types/breakouts}/index.d.ts +0 -0
  105. /package/dist/{breakouts → types/breakouts}/request.d.ts +0 -0
  106. /package/dist/{breakouts → types/breakouts}/utils.d.ts +0 -0
  107. /package/dist/{common → types/common}/browser-detection.d.ts +0 -0
  108. /package/dist/{common → types/common}/collection.d.ts +0 -0
  109. /package/dist/{common → types/common}/config.d.ts +0 -0
  110. /package/dist/{common → types/common}/errors/captcha-error.d.ts +0 -0
  111. /package/dist/{common → types/common}/errors/intent-to-join.d.ts +0 -0
  112. /package/dist/{common → types/common}/errors/join-meeting.d.ts +0 -0
  113. /package/dist/{common → types/common}/errors/media.d.ts +0 -0
  114. /package/dist/{common → types/common}/errors/no-meeting-info.d.ts +0 -0
  115. /package/dist/{common → types/common}/errors/parameter.d.ts +0 -0
  116. /package/dist/{common → types/common}/errors/password-error.d.ts +0 -0
  117. /package/dist/{common → types/common}/errors/permission.d.ts +0 -0
  118. /package/dist/{common → types/common}/errors/reclaim-host-role-errors.d.ts +0 -0
  119. /package/dist/{common → types/common}/errors/reconnection.d.ts +0 -0
  120. /package/dist/{common → types/common}/errors/stats.d.ts +0 -0
  121. /package/dist/{common → types/common}/errors/webex-errors.d.ts +0 -0
  122. /package/dist/{common → types/common}/errors/webex-meetings-error.d.ts +0 -0
  123. /package/dist/{common → types/common}/events/events-scope.d.ts +0 -0
  124. /package/dist/{common → types/common}/events/events.d.ts +0 -0
  125. /package/dist/{common → types/common}/events/trigger-proxy.d.ts +0 -0
  126. /package/dist/{common → types/common}/events/util.d.ts +0 -0
  127. /package/dist/{common → types/common}/logs/logger-config.d.ts +0 -0
  128. /package/dist/{common → types/common}/logs/logger-proxy.d.ts +0 -0
  129. /package/dist/{common → types/common}/logs/request.d.ts +0 -0
  130. /package/dist/{common → types/common}/queue.d.ts +0 -0
  131. /package/dist/{config.d.ts → types/config.d.ts} +0 -0
  132. /package/dist/{controls-options-manager → types/controls-options-manager}/constants.d.ts +0 -0
  133. /package/dist/{controls-options-manager → types/controls-options-manager}/enums.d.ts +0 -0
  134. /package/dist/{controls-options-manager → types/controls-options-manager}/index.d.ts +0 -0
  135. /package/dist/{controls-options-manager → types/controls-options-manager}/types.d.ts +0 -0
  136. /package/dist/{controls-options-manager → types/controls-options-manager}/util.d.ts +0 -0
  137. /package/dist/{interceptors → types/interceptors}/index.d.ts +0 -0
  138. /package/dist/{interceptors → types/interceptors}/locusRetry.d.ts +0 -0
  139. /package/dist/{interpretation → types/interpretation}/collection.d.ts +0 -0
  140. /package/dist/{interpretation → types/interpretation}/index.d.ts +0 -0
  141. /package/dist/{interpretation → types/interpretation}/siLanguage.d.ts +0 -0
  142. /package/dist/{locus-info → types/locus-info}/controlsUtils.d.ts +0 -0
  143. /package/dist/{locus-info → types/locus-info}/embeddedAppsUtils.d.ts +0 -0
  144. /package/dist/{locus-info → types/locus-info}/fullState.d.ts +0 -0
  145. /package/dist/{locus-info → types/locus-info}/hostUtils.d.ts +0 -0
  146. /package/dist/{locus-info → types/locus-info}/index.d.ts +0 -0
  147. /package/dist/{locus-info → types/locus-info}/infoUtils.d.ts +0 -0
  148. /package/dist/{locus-info → types/locus-info}/mediaSharesUtils.d.ts +0 -0
  149. /package/dist/{locus-info → types/locus-info}/parser.d.ts +0 -0
  150. /package/dist/{locus-info → types/locus-info}/selfUtils.d.ts +0 -0
  151. /package/dist/{media → types/media}/MediaConnectionAwaiter.d.ts +0 -0
  152. /package/dist/{media → types/media}/index.d.ts +0 -0
  153. /package/dist/{media → types/media}/util.d.ts +0 -0
  154. /package/dist/{mediaQualityMetrics → types/mediaQualityMetrics}/config.d.ts +0 -0
  155. /package/dist/{meeting → types/meeting}/muteState.d.ts +0 -0
  156. /package/dist/{meeting → types/meeting}/request.d.ts +0 -0
  157. /package/dist/{meeting → types/meeting}/request.type.d.ts +0 -0
  158. /package/dist/{meeting → types/meeting}/state.d.ts +0 -0
  159. /package/dist/{meeting-info → types/meeting-info}/collection.d.ts +0 -0
  160. /package/dist/{meeting-info → types/meeting-info}/request.d.ts +0 -0
  161. /package/dist/{meetings → types/meetings}/collection.d.ts +0 -0
  162. /package/dist/{meetings → types/meetings}/meetings.types.d.ts +0 -0
  163. /package/dist/{meetings → types/meetings}/request.d.ts +0 -0
  164. /package/dist/{meetings → types/meetings}/util.d.ts +0 -0
  165. /package/dist/{member → types/member}/index.d.ts +0 -0
  166. /package/dist/{member → types/member}/types.d.ts +0 -0
  167. /package/dist/{member → types/member}/util.d.ts +0 -0
  168. /package/dist/{members → types/members}/collection.d.ts +0 -0
  169. /package/dist/{members → types/members}/index.d.ts +0 -0
  170. /package/dist/{members → types/members}/request.d.ts +0 -0
  171. /package/dist/{members → types/members}/types.d.ts +0 -0
  172. /package/dist/{members → types/members}/util.d.ts +0 -0
  173. /package/dist/{metrics → types/metrics}/constants.d.ts +0 -0
  174. /package/dist/{metrics → types/metrics}/index.d.ts +0 -0
  175. /package/dist/{multistream → types/multistream}/mediaRequestManager.d.ts +0 -0
  176. /package/dist/{multistream → types/multistream}/receiveSlot.d.ts +0 -0
  177. /package/dist/{multistream → types/multistream}/receiveSlotManager.d.ts +0 -0
  178. /package/dist/{multistream → types/multistream}/remoteMedia.d.ts +0 -0
  179. /package/dist/{multistream → types/multistream}/remoteMediaGroup.d.ts +0 -0
  180. /package/dist/{multistream → types/multistream}/remoteMediaManager.d.ts +0 -0
  181. /package/dist/{multistream → types/multistream}/sendSlotManager.d.ts +0 -0
  182. /package/dist/{networkQualityMonitor → types/networkQualityMonitor}/index.d.ts +0 -0
  183. /package/dist/{personal-meeting-room → types/personal-meeting-room}/index.d.ts +0 -0
  184. /package/dist/{personal-meeting-room → types/personal-meeting-room}/request.d.ts +0 -0
  185. /package/dist/{personal-meeting-room → types/personal-meeting-room}/util.d.ts +0 -0
  186. /package/dist/{reachability → types/reachability}/clusterReachability.d.ts +0 -0
  187. /package/dist/{reachability → types/reachability}/index.d.ts +0 -0
  188. /package/dist/{reachability → types/reachability}/request.d.ts +0 -0
  189. /package/dist/{reachability → types/reachability}/util.d.ts +0 -0
  190. /package/dist/{reactions → types/reactions}/constants.d.ts +0 -0
  191. /package/dist/{reactions → types/reactions}/reactions.d.ts +0 -0
  192. /package/dist/{reactions → types/reactions}/reactions.type.d.ts +0 -0
  193. /package/dist/{recording-controller → types/recording-controller}/enums.d.ts +0 -0
  194. /package/dist/{recording-controller → types/recording-controller}/index.d.ts +0 -0
  195. /package/dist/{recording-controller → types/recording-controller}/util.d.ts +0 -0
  196. /package/dist/{roap → types/roap}/index.d.ts +0 -0
  197. /package/dist/{roap → types/roap}/request.d.ts +0 -0
  198. /package/dist/{roap → types/roap}/turnDiscovery.d.ts +0 -0
  199. /package/dist/{rtcMetrics → types/rtcMetrics}/constants.d.ts +0 -0
  200. /package/dist/{rtcMetrics → types/rtcMetrics}/index.d.ts +0 -0
  201. /package/dist/{statsAnalyzer → types/statsAnalyzer}/global.d.ts +0 -0
  202. /package/dist/{statsAnalyzer → types/statsAnalyzer}/index.d.ts +0 -0
  203. /package/dist/{statsAnalyzer → types/statsAnalyzer}/mqaUtil.d.ts +0 -0
  204. /package/dist/{transcription → types/transcription}/index.d.ts +0 -0
  205. /package/dist/{webinar → types/webinar}/collection.d.ts +0 -0
  206. /package/dist/{webinar → types/webinar}/index.d.ts +0 -0
@@ -30,169 +30,176 @@ import ParameterError from '../common/errors/parameter';
30
30
  import LoggerProxy from '../common/logs/logger-proxy';
31
31
  import {SpaceIDDeprecatedError} from '../common/errors/webex-errors';
32
32
 
33
- const MeetingInfoUtil: any = {};
34
- const meetingInfoError =
35
- 'MeetingInfo is fetched with the meeting link, SIP URI, phone number, Hydra people ID, or a conversation URL.';
33
+ /**
34
+ * @class MeetingInfoUtil
35
+ */
36
+ export default class MeetingInfoUtil {
37
+ static meetingInfoError =
38
+ 'MeetingInfo is fetched with the meeting link, SIP URI, phone number, Hydra people ID, or a conversation URL.';
36
39
 
37
- MeetingInfoUtil.getParsedUrl = (link) => {
38
- try {
39
- let parsedUrl = url.parse(link);
40
+ static getParsedUrl(link) {
41
+ try {
42
+ let parsedUrl = url.parse(link);
40
43
 
41
- if (!parsedUrl) {
42
- return false;
43
- }
44
- // hack for links such as <company>.webex.com/meet/<user> without a protocol
45
- if (!parsedUrl.protocol) {
46
- parsedUrl = url.parse(`${HTTPS_PROTOCOL}${link}`);
44
+ if (!parsedUrl) {
45
+ return false;
46
+ }
47
+ // hack for links such as <company>.webex.com/meet/<user> without a protocol
48
+ if (!parsedUrl.protocol) {
49
+ parsedUrl = url.parse(`${HTTPS_PROTOCOL}${link}`);
50
+ }
51
+
52
+ return parsedUrl;
53
+ } catch (error) {
54
+ LoggerProxy.logger.warn(
55
+ `Meeting-info:util#getParsedUrl --> unable to parse the URL, error: ${error}`
56
+ );
57
+
58
+ return null;
47
59
  }
60
+ }
48
61
 
49
- return parsedUrl;
50
- } catch (error) {
51
- LoggerProxy.logger.warn(
52
- `Meeting-info:util#getParsedUrl --> unable to parse the URL, error: ${error}`
53
- );
62
+ /**
63
+ * Helper function to check if a string matches a known meeting link pattern
64
+ * @param {String} value string to parse and see if it matches a meeting link
65
+ * @returns {Boolean}
66
+ */
67
+ static isMeetingLink(value: string) {
68
+ let hostNameBool;
69
+ let pathNameBool;
70
+ const parsedUrl = this.getParsedUrl(value);
71
+ if (parsedUrl) {
72
+ hostNameBool = parsedUrl.hostname && parsedUrl.hostname.includes(WEBEX_DOT_COM);
73
+ pathNameBool =
74
+ parsedUrl.pathname &&
75
+ (parsedUrl.pathname.includes(`/${MEET}`) ||
76
+ parsedUrl.pathname.includes(`/${MEET_M}`) ||
77
+ parsedUrl.pathname.includes(`/${MEET_CISCO}`) ||
78
+ parsedUrl.pathname.includes(`/${MEET_CO}`) ||
79
+ parsedUrl.pathname.includes(`/${JOIN}`));
80
+ }
54
81
 
55
- return null;
82
+ return hostNameBool && pathNameBool;
56
83
  }
57
- };
58
84
 
59
- /**
60
- * Helper function to check if a string matches a known meeting link pattern
61
- * @param {String} value string to parse and see if it matches a meeting link
62
- * @returns {Boolean}
63
- */
64
- MeetingInfoUtil.isMeetingLink = (value: string) => {
65
- const parsedUrl = MeetingInfoUtil.getParsedUrl(value);
66
- const hostNameBool = parsedUrl.hostname && parsedUrl.hostname.includes(WEBEX_DOT_COM);
67
- const pathNameBool =
68
- parsedUrl.pathname &&
69
- (parsedUrl.pathname.includes(`/${MEET}`) ||
70
- parsedUrl.pathname.includes(`/${MEET_M}`) ||
71
- parsedUrl.pathname.includes(`/${MEET_CISCO}`) ||
72
- parsedUrl.pathname.includes(`/${MEET_CO}`) ||
73
- parsedUrl.pathname.includes(`/${JOIN}`));
74
-
75
- return hostNameBool && pathNameBool;
76
- };
77
-
78
- MeetingInfoUtil.isConversationUrl = (value, webex) => {
79
- const clusterId = webex.internal.services.getClusterId(value);
80
-
81
- if (clusterId) {
82
- return clusterId.endsWith(CONVERSATION_SERVICE);
85
+ static isConversationUrl(value, webex) {
86
+ const clusterId = webex.internal.services.getClusterId(value);
87
+
88
+ if (clusterId) {
89
+ return clusterId.endsWith(CONVERSATION_SERVICE);
90
+ }
91
+
92
+ return false;
83
93
  }
84
94
 
85
- return false;
86
- };
95
+ static isSipUri(sipString) {
96
+ // TODO: lets remove regex from this equation and user URI matchers and such
97
+ // have not found a great sip uri parser library as of now
98
+ const sipUri = DIALER_REGEX.SIP_ADDRESS.exec(sipString);
87
99
 
88
- MeetingInfoUtil.isSipUri = (sipString) => {
89
- // TODO: lets remove regex from this equation and user URI matchers and such
90
- // have not found a great sip uri parser library as of now
91
- const sipUri = DIALER_REGEX.SIP_ADDRESS.exec(sipString);
100
+ return sipUri;
101
+ }
92
102
 
93
- return sipUri;
94
- };
103
+ static isPhoneNumber(phoneNumber) {
104
+ const isValidNumber = DIALER_REGEX.PHONE_NUMBER.test(phoneNumber);
95
105
 
96
- MeetingInfoUtil.isPhoneNumber = (phoneNumber) => {
97
- const isValidNumber = DIALER_REGEX.PHONE_NUMBER.test(phoneNumber);
106
+ return isValidNumber;
107
+ }
98
108
 
99
- return isValidNumber;
100
- };
109
+ static getHydraId(destination) {
110
+ const {type, id, cluster} = deconstructHydraId(destination);
101
111
 
102
- MeetingInfoUtil.getHydraId = (destination) => {
103
- const {type, id, cluster} = deconstructHydraId(destination);
112
+ if (id && UUID_REG.test(id)) {
113
+ if (type === _ROOM_) {
114
+ return {room: true, destination: id, cluster};
115
+ }
116
+ if (type === _PEOPLE_) {
117
+ return {people: true, destination: id, cluster};
118
+ }
104
119
 
105
- if (id && UUID_REG.test(id)) {
106
- if (type === _ROOM_) {
107
- return {room: true, destination: id, cluster};
108
- }
109
- if (type === _PEOPLE_) {
110
- return {people: true, destination: id, cluster};
120
+ return {};
111
121
  }
112
122
 
113
123
  return {};
114
124
  }
115
125
 
116
- return {};
117
- };
126
+ static getSipUriFromHydraPersonId(destination, webex) {
127
+ return webex.people
128
+ .get(destination)
129
+ .then((res) => {
130
+ if (res.emails && res.emails.length) {
131
+ return res.emails[0];
132
+ }
133
+ throw new ParameterError('Hydra Id Lookup was an invalid hydra person id.');
134
+ })
135
+ .catch((err) => {
136
+ LoggerProxy.logger.error(
137
+ `Meeting-info:util#MeetingInfoUtil.getSipUriFromHydraPersonId --> getSipUriFromHydraPersonId ${err} `
138
+ );
139
+ throw err;
140
+ });
141
+ }
118
142
 
119
- MeetingInfoUtil.getSipUriFromHydraPersonId = (destination, webex) =>
120
- webex.people
121
- .get(destination)
122
- .then((res) => {
123
- if (res.emails && res.emails.length) {
124
- return res.emails[0];
143
+ static async getDestinationType(from) {
144
+ const {type, webex} = from;
145
+ let {destination} = from;
146
+
147
+ if (type === _PERSONAL_ROOM_) {
148
+ // this case checks if your type is personal room
149
+ if (!destination) {
150
+ // if we are not getting anything in desination we fetch org and user ids from webex instance
151
+ destination = {
152
+ userId: webex.internal.device.userId,
153
+ orgId: webex.internal.device.orgId,
154
+ };
155
+ } else {
156
+ const options = VALID_EMAIL_ADDRESS.test(destination)
157
+ ? {email: destination}
158
+ : {id: destination}; // we are assuming userId as default
159
+ const res = await webex.people.list(options);
160
+
161
+ let {orgId, id: userId} = res.items[0];
162
+
163
+ userId = deconstructHydraId(userId).id;
164
+ orgId = deconstructHydraId(orgId).id;
165
+ destination = {userId, orgId};
125
166
  }
126
- throw new ParameterError('Hydra Id Lookup was an invalid hydra person id.');
127
- })
128
- .catch((err) => {
129
- LoggerProxy.logger.error(
130
- `Meeting-info:util#MeetingInfoUtil.getSipUriFromHydraPersonId --> getSipUriFromHydraPersonId ${err} `
131
- );
132
- throw err;
133
- });
134
-
135
- MeetingInfoUtil.getDestinationType = async (from) => {
136
- const {type, webex} = from;
137
- let {destination} = from;
138
-
139
- if (type === _PERSONAL_ROOM_) {
140
- // this case checks if your type is personal room
141
- if (!destination) {
142
- // if we are not getting anything in desination we fetch org and user ids from webex instance
143
- destination = {
144
- userId: webex.internal.device.userId,
145
- orgId: webex.internal.device.orgId,
167
+ }
168
+ if (type) {
169
+ return {
170
+ destination,
171
+ type,
146
172
  };
147
- } else {
148
- const options = VALID_EMAIL_ADDRESS.test(destination)
149
- ? {email: destination}
150
- : {id: destination}; // we are assuming userId as default
151
- const res = await webex.people.list(options);
152
-
153
- let {orgId, id: userId} = res.items[0];
173
+ }
174
+ const options: any = {};
175
+ let hydraId;
154
176
 
155
- userId = deconstructHydraId(userId).id;
156
- orgId = deconstructHydraId(orgId).id;
157
- destination = {userId, orgId};
177
+ if (webex && webex.config && webex.config.meetings && webex.config.meetings.disableHydraId) {
178
+ hydraId = null;
179
+ } else {
180
+ hydraId = this.getHydraId(destination);
158
181
  }
159
- }
160
- if (type) {
161
- return {
162
- destination,
163
- type,
164
- };
165
- }
166
- const options: any = {};
167
- let hydraId;
168
182
 
169
- if (webex && webex.config && webex.config.meetings && webex.config.meetings.disableHydraId) {
170
- hydraId = null;
171
- } else {
172
- hydraId = MeetingInfoUtil.getHydraId(destination);
173
- }
183
+ if (this.isMeetingLink(destination)) {
184
+ LoggerProxy.logger.warn(
185
+ 'Meeting-info:util#generateOptions --> WARN, use of Meeting Link is deprecated, please use a SIP URI instead'
186
+ );
174
187
 
175
- if (MeetingInfoUtil.isMeetingLink(destination)) {
176
- LoggerProxy.logger.warn(
177
- 'Meeting-info:util#generateOptions --> WARN, use of Meeting Link is deprecated, please use a SIP URI instead'
178
- );
179
-
180
- options.type = _MEETING_LINK_;
181
- options.destination = destination;
182
- } else if (MeetingInfoUtil.isSipUri(destination)) {
183
- options.type = _SIP_URI_;
184
- options.destination = destination;
185
- } else if (MeetingInfoUtil.isPhoneNumber(destination)) {
186
- options.type = _SIP_URI_;
187
- options.destination = destination;
188
- } else if (MeetingInfoUtil.isConversationUrl(destination, webex)) {
189
- options.type = _CONVERSATION_URL_;
190
- options.destination = destination;
191
- } else if (hydraId && hydraId.people) {
192
- options.type = _SIP_URI_;
193
-
194
- return MeetingInfoUtil.getSipUriFromHydraPersonId(hydraId && hydraId.destination, webex).then(
195
- (res) => {
188
+ options.type = _MEETING_LINK_;
189
+ options.destination = destination;
190
+ } else if (this.isSipUri(destination)) {
191
+ options.type = _SIP_URI_;
192
+ options.destination = destination;
193
+ } else if (this.isPhoneNumber(destination)) {
194
+ options.type = _SIP_URI_;
195
+ options.destination = destination;
196
+ } else if (this.isConversationUrl(destination, webex)) {
197
+ options.type = _CONVERSATION_URL_;
198
+ options.destination = destination;
199
+ } else if (hydraId && hydraId.people) {
200
+ options.type = _SIP_URI_;
201
+
202
+ return this.getSipUriFromHydraPersonId(hydraId && hydraId.destination, webex).then((res) => {
196
203
  options.destination = res;
197
204
 
198
205
  // Since hydra person ids require a unique case in which they are
@@ -201,125 +208,124 @@ MeetingInfoUtil.getDestinationType = async (from) => {
201
208
  options.wasHydraPerson = true;
202
209
 
203
210
  return Promise.resolve(options);
204
- }
205
- );
206
- } else if (hydraId.room) {
207
- LoggerProxy.logger.error(
208
- `Meeting-info:util#getDestinationType --> Using the space ID as a destination is no longer supported. Please refer to the [migration guide](https://github.com/webex/webex-js-sdk/wiki/Migration-to-Unified-Space-Meetings) to migrate to use the meeting ID or SIP address.`
209
- );
210
- // Error code 30105 added as Space ID deprecated as of beta, Please refer migration guide.
211
- throw new SpaceIDDeprecatedError();
212
- } else {
213
- LoggerProxy.logger.warn(`Meeting-info:util#getDestinationType --> ${meetingInfoError}`);
214
- throw new ParameterError(`${meetingInfoError}`);
211
+ });
212
+ } else if (hydraId.room) {
213
+ LoggerProxy.logger.error(
214
+ `Meeting-info:util#getDestinationType --> Using the space ID as a destination is no longer supported. Please refer to the [migration guide](https://github.com/webex/webex-js-sdk/wiki/Migration-to-Unified-Space-Meetings) to migrate to use the meeting ID or SIP address.`
215
+ );
216
+ // Error code 30105 added as Space ID deprecated as of beta, Please refer migration guide.
217
+ throw new SpaceIDDeprecatedError();
218
+ } else {
219
+ LoggerProxy.logger.warn(`Meeting-info:util#getDestinationType --> ${this.meetingInfoError}`);
220
+ throw new ParameterError(`${this.meetingInfoError}`);
221
+ }
222
+
223
+ return Promise.resolve(options);
215
224
  }
216
225
 
217
- return Promise.resolve(options);
218
- };
226
+ /**
227
+ * Helper function to build up a correct locus url depending on the value passed
228
+ * @param {Object} options type and value to fetch meeting info
229
+ * @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
230
+ * @param {String} options.installedOrgID org ID of user's machine
231
+ * @param {Object} options.destination ?? value.value
232
+ * @returns {Object} returns an object with {resource, method}
233
+ */
234
+ static getRequestBody(options: {type: string; destination: object} | any) {
235
+ const {type, destination, password, captchaInfo, installedOrgID, locusId, extraParams} =
236
+ options;
237
+ const body: any = {
238
+ ...DEFAULT_MEETING_INFO_REQUEST_BODY,
239
+ ...extraParams,
240
+ };
219
241
 
220
- /**
221
- * Helper function to build up a correct locus url depending on the value passed
222
- * @param {Object} options type and value to fetch meeting info
223
- * @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
224
- * @param {String} options.installedOrgID org ID of user's machine
225
- * @param {Object} options.destination ?? value.value
226
- * @returns {Object} returns an object with {resource, method}
227
- */
228
- MeetingInfoUtil.getRequestBody = (options: {type: string; destination: object} | any) => {
229
- const {type, destination, password, captchaInfo, installedOrgID, locusId, extraParams} = options;
230
- const body: any = {
231
- ...DEFAULT_MEETING_INFO_REQUEST_BODY,
232
- ...extraParams,
233
- };
234
-
235
- switch (type) {
236
- case _SIP_URI_:
237
- body.sipUrl = destination;
238
- break;
239
- case _PERSONAL_ROOM_:
240
- body.userId = destination.userId;
241
- body.orgId = destination.orgId;
242
- break;
243
- case _MEETING_ID_:
244
- body.meetingKey = destination;
245
- break;
246
- case _CONVERSATION_URL_:
247
- body.conversationUrl = destination;
248
- break;
249
- case _LOCUS_ID_:
250
- // use meetingID for the completer meeting info for the already started meeting
251
- if (destination.info?.webExMeetingId) {
252
- body.meetingKey = destination.info.webExMeetingId;
253
- } else if (destination.info?.sipUri) {
254
- body.sipUrl = destination.info.sipUri;
242
+ switch (type) {
243
+ case _SIP_URI_:
244
+ body.sipUrl = destination;
245
+ break;
246
+ case _PERSONAL_ROOM_:
247
+ body.userId = destination.userId;
248
+ body.orgId = destination.orgId;
249
+ break;
250
+ case _MEETING_ID_:
251
+ body.meetingKey = destination;
252
+ break;
253
+ case _CONVERSATION_URL_:
254
+ body.conversationUrl = destination;
255
+ break;
256
+ case _LOCUS_ID_:
257
+ // use meetingID for the completer meeting info for the already started meeting
258
+ if (destination.info?.webExMeetingId) {
259
+ body.meetingKey = destination.info.webExMeetingId;
260
+ } else if (destination.info?.sipUri) {
261
+ body.sipUrl = destination.info.sipUri;
262
+ }
263
+ break;
264
+ case _MEETING_LINK_:
265
+ body.meetingUrl = destination;
266
+ break;
267
+ case _MEETING_UUID_: {
268
+ body.meetingUUID = destination;
269
+ break;
255
270
  }
256
- break;
257
- case _MEETING_LINK_:
258
- body.meetingUrl = destination;
259
- break;
260
- case _MEETING_UUID_: {
261
- body.meetingUUID = destination;
262
- break;
271
+ default:
263
272
  }
264
- default:
265
- }
266
-
267
- if (password) {
268
- body.password = password;
269
- }
270
273
 
271
- if (captchaInfo) {
272
- body.captchaID = captchaInfo.id;
273
- body.captchaVerifyCode = captchaInfo.code;
274
- }
275
-
276
- if (installedOrgID) {
277
- body.installedOrgID = installedOrgID;
278
- }
274
+ if (password) {
275
+ body.password = password;
276
+ }
279
277
 
280
- if (locusId) {
281
- body.locusId = locusId;
282
- }
278
+ if (captchaInfo) {
279
+ body.captchaID = captchaInfo.id;
280
+ body.captchaVerifyCode = captchaInfo.code;
281
+ }
283
282
 
284
- return body;
285
- };
283
+ if (installedOrgID) {
284
+ body.installedOrgID = installedOrgID;
285
+ }
286
286
 
287
- /**
288
- * Helper function to parse the webex site/host from a URI string.
289
- * @param {String} uri string (e.g. '10019857020@convergedats.webex.com')
290
- * @returns {String} the site/host part of the URI string (e.g. 'convergedats.webex.com')
291
- */
292
- MeetingInfoUtil.getWebexSite = (uri: string) => {
293
- const exceptedDomains = ['meet.webex.com', 'meetup.webex.com', 'ciscospark.com'];
294
- const site = uri?.match(/.+@([^.]+\.[^.]+\.[^.]+)$/)?.[1];
295
- const isExceptedDomain = !!site && exceptedDomains.some((domain) => site.includes(domain));
287
+ if (locusId) {
288
+ body.locusId = locusId;
289
+ }
296
290
 
297
- return isExceptedDomain ? null : site;
298
- };
291
+ return body;
292
+ }
299
293
 
300
- /**
301
- * Helper function to return the direct URI for fetching meeting info (to avoid a redirect).
302
- * @param {Object} options type and value to fetch meeting info
303
- * @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
304
- * @param {Object} options.destination ?? value.value
305
- * @returns {String} returns a URI string or null of there is no direct URI
306
- */
307
- MeetingInfoUtil.getDirectMeetingInfoURI = (options: {type: string; destination: any}) => {
308
- const {type, destination} = options;
309
-
310
- let preferredWebexSite = null;
311
-
312
- switch (type) {
313
- case _SIP_URI_:
314
- preferredWebexSite = MeetingInfoUtil.getWebexSite(destination);
315
- break;
316
- case _LOCUS_ID_:
317
- preferredWebexSite = destination.info?.webExSite;
318
- break;
319
- default:
294
+ /**
295
+ * Helper function to parse the webex site/host from a URI string.
296
+ * @param {String} uri string (e.g. '10019857020@convergedats.webex.com')
297
+ * @returns {String} the site/host part of the URI string (e.g. 'convergedats.webex.com')
298
+ */
299
+ static getWebexSite(uri: string) {
300
+ const exceptedDomains = ['meet.webex.com', 'meetup.webex.com', 'ciscospark.com'];
301
+ const site = uri?.match(/.+@([^.]+\.[^.]+\.[^.]+)$/)?.[1];
302
+ const isExceptedDomain = !!site && exceptedDomains.some((domain) => site.includes(domain));
303
+
304
+ return isExceptedDomain ? null : site;
320
305
  }
321
306
 
322
- return preferredWebexSite ? `https://${preferredWebexSite}/wbxappapi/v1/meetingInfo` : null;
323
- };
307
+ /**
308
+ * Helper function to return the direct URI for fetching meeting info (to avoid a redirect).
309
+ * @param {Object} options type and value to fetch meeting info
310
+ * @param {String} options.type One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
311
+ * @param {Object} options.destination ?? value.value
312
+ * @returns {String} returns a URI string or null of there is no direct URI
313
+ */
314
+ static getDirectMeetingInfoURI(options: {type: string; destination: any}) {
315
+ const {type, destination} = options;
316
+
317
+ let preferredWebexSite = null;
318
+
319
+ switch (type) {
320
+ case _SIP_URI_:
321
+ preferredWebexSite = this.getWebexSite(destination);
322
+ break;
323
+ case _LOCUS_ID_:
324
+ preferredWebexSite = destination.info?.webExSite;
325
+ break;
326
+ default:
327
+ }
324
328
 
325
- export default MeetingInfoUtil;
329
+ return preferredWebexSite ? `https://${preferredWebexSite}/wbxappapi/v1/meetingInfo` : null;
330
+ }
331
+ }
@@ -45,6 +45,8 @@ import {
45
45
  MEETINGNUMBER,
46
46
  _JOINED_,
47
47
  _MOVED_,
48
+ _ON_HOLD_LOBBY_,
49
+ _WAIT_,
48
50
  } from '../constants';
49
51
  import BEHAVIORAL_METRICS from '../metrics/constants';
50
52
  import MeetingInfo from '../meeting-info';
@@ -340,6 +342,9 @@ export default class Meetings extends WebexPlugin {
340
342
  if (newLocus) {
341
343
  const isNewLocusAsBreakout = MeetingsUtil.isBreakoutLocusDTO(newLocus);
342
344
  const isSelfMoved = newLocus?.self?.state === _LEFT_ && newLocus?.self?.reason === _MOVED_;
345
+ const isSelfMovedToLobby =
346
+ newLocus?.self?.devices[0]?.intent?.reason === _ON_HOLD_LOBBY_ &&
347
+ newLocus?.self?.devices[0]?.intent?.type === _WAIT_;
343
348
  if (!meeting) {
344
349
  if (isNewLocusAsBreakout) {
345
350
  LoggerProxy.logger.log(
@@ -352,7 +357,7 @@ export default class Meetings extends WebexPlugin {
352
357
  return this.isNeedHandleMainLocus(meeting, newLocus);
353
358
  }
354
359
  if (!isNewLocusAsBreakout) {
355
- return this.isNeedHandleMainLocus(meeting, newLocus);
360
+ return isSelfMovedToLobby || this.isNeedHandleMainLocus(meeting, newLocus);
356
361
  }
357
362
 
358
363
  return !isSelfMoved;
@@ -1383,22 +1388,12 @@ export default class Meetings extends WebexPlugin {
1383
1388
 
1384
1389
  /**
1385
1390
  * Get all meetings.
1386
- * @param {object} options
1387
- * @param {object} options.startDate - get meetings after this start date
1388
- * @param {object} options.endDate - get meetings before this end date
1389
1391
  * @returns {Object} All currently active meetings.
1390
1392
  * @public
1391
1393
  * @memberof Meetings
1392
1394
  */
1393
- public getAllMeetings(
1394
- options: {
1395
- startDate: object;
1396
- endDate: object;
1397
- } = {} as any
1398
- ) {
1399
- // Options may include other parameters to filter this collection
1400
- // of meetings.
1401
- return this.meetingCollection.getAll(options);
1395
+ public getAllMeetings() {
1396
+ return this.meetingCollection.getAll();
1402
1397
  }
1403
1398
 
1404
1399
  /**
@@ -1524,18 +1519,6 @@ export default class Meetings extends WebexPlugin {
1524
1519
  this.breakoutLocusForHandleLater.splice(existIndex, 1);
1525
1520
  }
1526
1521
 
1527
- /**
1528
- * Get all scheduled meetings.
1529
- * @param {object} options
1530
- * @param {object} options.startDate - get meetings after this start date
1531
- * @param {object} options.endDate - get meetings before this end date
1532
- * @returns {Object} All scheduled meetings.
1533
- * @memberof Meetings
1534
- */
1535
- getScheduledMeetings() {
1536
- return this.meetingCollection.getAll({scheduled: true});
1537
- }
1538
-
1539
1522
  /**
1540
1523
  * Get the logger instance for plugin-meetings
1541
1524
  * @returns {Logger}
@@ -314,6 +314,9 @@ export default class Reachability {
314
314
  if (result.tcp.result === 'unreachable') {
315
315
  unreachableList.push({name: key, protocol: 'tcp'});
316
316
  }
317
+ if (result.xtls.result === 'unreachable') {
318
+ unreachableList.push({name: key, protocol: 'xtls'});
319
+ }
317
320
  });
318
321
 
319
322
  return unreachableList;