@webex/plugin-meetings 3.1.0 → 3.2.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.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/reconnection-not-started.js +46 -0
- package/dist/common/errors/reconnection-not-started.js.map +1 -0
- package/dist/constants.js +16 -5
- package/dist/constants.js.map +1 -1
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +7 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +10 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/media/properties.js +102 -57
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +10 -10
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +6 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +564 -475
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +27 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/util.js +9 -16
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +37 -49
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/util.js +304 -267
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +334 -298
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +12 -28
- package/dist/meetings/index.js.map +1 -1
- package/dist/reachability/index.js +88 -9
- package/dist/reachability/index.js.map +1 -1
- package/dist/reconnection-manager/index.js +138 -109
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/request.js +3 -27
- package/dist/roap/request.js.map +1 -1
- package/dist/statsAnalyzer/index.js +8 -2
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +17 -0
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +93 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +73 -0
- package/dist/types/constants.d.ts +1098 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +272 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +117 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +247 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +173 -0
- package/dist/types/meeting/index.d.ts +1832 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +75 -0
- package/dist/types/meeting/muteState.d.ts +178 -0
- package/dist/types/meeting/request.d.ts +295 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +122 -0
- package/dist/types/meeting/voicea-meeting.d.ts +17 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +49 -0
- package/dist/types/meeting-info/utilv2.d.ts +65 -0
- package/dist/types/meetings/collection.d.ts +40 -0
- package/dist/types/meetings/index.d.ts +383 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +160 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +70 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +119 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +49 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +300 -0
- package/dist/types/multistream/sendSlotManager.d.ts +69 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/clusterReachability.d.ts +110 -0
- package/dist/types/reachability/index.d.ts +120 -0
- package/dist/types/reachability/request.d.ts +39 -0
- package/dist/types/reachability/util.d.ts +15 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +86 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +155 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +61 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +217 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/common/errors/reconnection-not-started.ts +25 -0
- package/src/constants.ts +14 -5
- package/src/index.ts +30 -0
- package/src/locus-info/controlsUtils.ts +11 -0
- package/src/locus-info/index.ts +16 -0
- package/src/media/properties.ts +67 -15
- package/src/mediaQualityMetrics/config.ts +13 -7
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +144 -107
- package/src/meeting/locusMediaRequest.ts +31 -0
- package/src/meeting/util.ts +9 -16
- package/src/meeting/voicea-meeting.ts +44 -46
- package/src/meeting-info/util.ts +241 -233
- package/src/meeting-info/utilv2.ts +250 -244
- package/src/meetings/index.ts +15 -27
- package/src/reachability/index.ts +60 -0
- package/src/reconnection-manager/index.ts +128 -105
- package/src/roap/request.ts +1 -24
- package/src/statsAnalyzer/index.ts +10 -3
- package/src/statsAnalyzer/mqaUtil.ts +23 -0
- package/test/unit/spec/locus-info/controlsUtils.js +20 -0
- package/test/unit/spec/locus-info/index.js +21 -0
- package/test/unit/spec/media/properties.ts +145 -140
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +271 -105
- package/test/unit/spec/meeting/locusMediaRequest.ts +49 -0
- package/test/unit/spec/meeting/utils.js +3 -10
- package/test/unit/spec/meeting/voicea-meeting.ts +5 -14
- package/test/unit/spec/meetings/index.js +59 -17
- package/test/unit/spec/reachability/index.ts +266 -0
- package/test/unit/spec/reconnection-manager/index.js +127 -39
- package/test/unit/spec/roap/request.ts +0 -37
- package/test/unit/spec/stats-analyzer/index.js +100 -8
- package/src/common/errors/reconnection-in-progress.ts +0 -8
|
@@ -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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
static getParsedUrl(link) {
|
|
41
|
+
try {
|
|
42
|
+
let parsedUrl = url.parse(link);
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
|
82
|
+
return hostNameBool && pathNameBool;
|
|
56
83
|
}
|
|
57
|
-
};
|
|
58
84
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
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
|
-
|
|
89
|
-
|
|
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
|
-
|
|
94
|
-
|
|
103
|
+
static isPhoneNumber(phoneNumber) {
|
|
104
|
+
const isValidNumber = DIALER_REGEX.PHONE_NUMBER.test(phoneNumber);
|
|
95
105
|
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
return isValidNumber;
|
|
107
|
+
}
|
|
98
108
|
|
|
99
|
-
|
|
100
|
-
};
|
|
109
|
+
static getHydraId(destination) {
|
|
110
|
+
const {type, id, cluster} = deconstructHydraId(destination);
|
|
101
111
|
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
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
|
-
|
|
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
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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
|
-
|
|
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
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
if (installedOrgID) {
|
|
277
|
-
body.installedOrgID = installedOrgID;
|
|
278
|
-
}
|
|
274
|
+
if (password) {
|
|
275
|
+
body.password = password;
|
|
276
|
+
}
|
|
279
277
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
278
|
+
if (captchaInfo) {
|
|
279
|
+
body.captchaID = captchaInfo.id;
|
|
280
|
+
body.captchaVerifyCode = captchaInfo.code;
|
|
281
|
+
}
|
|
283
282
|
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
if (installedOrgID) {
|
|
284
|
+
body.installedOrgID = installedOrgID;
|
|
285
|
+
}
|
|
286
286
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
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
|
-
|
|
298
|
-
}
|
|
291
|
+
return body;
|
|
292
|
+
}
|
|
299
293
|
|
|
300
|
-
/**
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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
|
-
|
|
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
|
-
|
|
329
|
+
return preferredWebexSite ? `https://${preferredWebexSite}/wbxappapi/v1/meetingInfo` : null;
|
|
330
|
+
}
|
|
331
|
+
}
|
package/src/meetings/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint no-shadow: ["error", { "allow": ["eventType"] }] */
|
|
2
|
-
|
|
2
|
+
import {union} from 'lodash';
|
|
3
3
|
import '@webex/internal-plugin-mercury';
|
|
4
4
|
import '@webex/internal-plugin-conversation';
|
|
5
5
|
import '@webex/internal-plugin-metrics';
|
|
@@ -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;
|
|
@@ -996,7 +1001,10 @@ export default class Meetings extends WebexPlugin {
|
|
|
996
1001
|
fetchUserPreferredWebexSite() {
|
|
997
1002
|
return this.request.getMeetingPreferences().then((res) => {
|
|
998
1003
|
if (res) {
|
|
999
|
-
|
|
1004
|
+
const preferredWebexSite = MeetingsUtil.parseDefaultSiteFromMeetingPreferences(res);
|
|
1005
|
+
this.preferredWebexSite = preferredWebexSite;
|
|
1006
|
+
// @ts-ignore
|
|
1007
|
+
this.webex.internal.services._getCatalog().addAllowedDomains([preferredWebexSite]);
|
|
1000
1008
|
}
|
|
1001
1009
|
|
|
1002
1010
|
// fall back to getting the preferred site from the user information
|
|
@@ -1009,6 +1017,8 @@ export default class Meetings extends WebexPlugin {
|
|
|
1009
1017
|
user?.userPreferences?.userPreferencesItems?.preferredWebExSite;
|
|
1010
1018
|
if (preferredWebexSite) {
|
|
1011
1019
|
this.preferredWebexSite = preferredWebexSite;
|
|
1020
|
+
// @ts-ignore
|
|
1021
|
+
this.webex.internal.services._getCatalog().addAllowedDomains([preferredWebexSite]);
|
|
1012
1022
|
} else {
|
|
1013
1023
|
throw new Error('site not found');
|
|
1014
1024
|
}
|
|
@@ -1383,22 +1393,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
1383
1393
|
|
|
1384
1394
|
/**
|
|
1385
1395
|
* 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
1396
|
* @returns {Object} All currently active meetings.
|
|
1390
1397
|
* @public
|
|
1391
1398
|
* @memberof Meetings
|
|
1392
1399
|
*/
|
|
1393
|
-
public getAllMeetings(
|
|
1394
|
-
|
|
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);
|
|
1400
|
+
public getAllMeetings() {
|
|
1401
|
+
return this.meetingCollection.getAll();
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
1404
|
/**
|
|
@@ -1524,18 +1524,6 @@ export default class Meetings extends WebexPlugin {
|
|
|
1524
1524
|
this.breakoutLocusForHandleLater.splice(existIndex, 1);
|
|
1525
1525
|
}
|
|
1526
1526
|
|
|
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
1527
|
/**
|
|
1540
1528
|
* Get the logger instance for plugin-meetings
|
|
1541
1529
|
* @returns {Logger}
|