@webex/plugin-meetings 3.9.0-next.10 → 3.9.0-next.12
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/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +7 -3
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +20 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +29 -21
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +31 -25
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/meeting/index.d.ts +1 -0
- package/dist/types/meeting/util.d.ts +6 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
- package/dist/types/meetings/index.d.ts +3 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/meeting/index.ts +9 -1
- package/src/meeting/util.ts +22 -0
- package/src/meeting-info/meeting-info-v2.ts +24 -5
- package/src/meetings/index.ts +9 -3
- package/test/unit/spec/meeting/index.js +11 -0
- package/test/unit/spec/meeting/utils.js +21 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
- package/test/unit/spec/meetings/index.js +10 -1
@@ -14,6 +14,12 @@ declare const MeetingUtil: {
|
|
14
14
|
* @returns {IP_VERSION|undefined} ipver value to be passed to the backend APIs or undefined if we should not pass any value to the backend
|
15
15
|
*/
|
16
16
|
getIpVersion(webex: any): IP_VERSION | undefined;
|
17
|
+
/**
|
18
|
+
* Returns CA event labels related to Orpheus ipver parameter that can be sent to CA with any CA event
|
19
|
+
* @param {any} webex instance
|
20
|
+
* @returns {Array<string>|undefined} array of CA event labels or undefined if no labels should be sent
|
21
|
+
*/
|
22
|
+
getCaEventLabelsForIpVersion(webex: any): Array<string> | undefined;
|
17
23
|
joinMeeting: (meeting: any, options: any) => Promise<any>;
|
18
24
|
cleanUp: (meeting: any) => any;
|
19
25
|
disconnectPhoneAudio: (meeting: any, phoneUrl: any) => any;
|
@@ -187,20 +187,22 @@ export default class MeetingInfoV2 {
|
|
187
187
|
* @param {String} conversationUrl conversationUrl to start adhoc meeting on
|
188
188
|
* @param {String} installedOrgID org ID of user's machine
|
189
189
|
* @param {Boolean} enableStaticMeetingLink whether or not to enable static meeting link
|
190
|
+
* @param {String} classificationId need it to start adhoc meeting if space support classification
|
190
191
|
* @returns {Promise} returns a meeting info object
|
191
192
|
* @public
|
192
193
|
* @memberof MeetingInfo
|
193
194
|
*/
|
194
|
-
createAdhocSpaceMeetingOrEnableStaticMeetingLink(conversationUrl: string, installedOrgID?: string, enableStaticMeetingLink?: boolean): Promise<any>;
|
195
|
+
createAdhocSpaceMeetingOrEnableStaticMeetingLink(conversationUrl: string, installedOrgID?: string, enableStaticMeetingLink?: boolean, classificationId?: any): Promise<any>;
|
195
196
|
/**
|
196
197
|
* Creates adhoc space meetings for a space by fetching the conversation infomation
|
197
198
|
* @param {String} conversationUrl conversationUrl to start adhoc meeting on
|
198
199
|
* @param {String} installedOrgID org ID of user's machine
|
200
|
+
* @param {String} classificationId if space is support classification, it needs provide it during start instant meeting
|
199
201
|
* @returns {Promise} returns a meeting info object
|
200
202
|
* @public
|
201
203
|
* @memberof MeetingInfo
|
202
204
|
*/
|
203
|
-
createAdhocSpaceMeeting(conversationUrl: string, installedOrgID?: string): Promise<any>;
|
205
|
+
createAdhocSpaceMeeting(conversationUrl: string, installedOrgID?: string, classificationId?: string): Promise<any>;
|
204
206
|
/**
|
205
207
|
* Fetches details for static meeting link
|
206
208
|
* @param {String} conversationUrl conversationUrl that's required to find static meeting link if it exists
|
@@ -239,6 +241,7 @@ export default class MeetingInfoV2 {
|
|
239
241
|
* @param {Object} options
|
240
242
|
* @param {String} registrationId
|
241
243
|
* @param {String} fullSiteUrl
|
244
|
+
* @param {String} classificationId
|
242
245
|
* @returns {Promise} returns a meeting info object
|
243
246
|
* @public
|
244
247
|
* @memberof MeetingInfo
|
@@ -249,5 +252,5 @@ export default class MeetingInfoV2 {
|
|
249
252
|
}, installedOrgID?: any, locusId?: any, extraParams?: object, options?: {
|
250
253
|
meetingId?: string;
|
251
254
|
sendCAevents?: boolean;
|
252
|
-
}, registrationId?: string, fullSiteUrl?: string): Promise<any>;
|
255
|
+
}, registrationId?: string, fullSiteUrl?: string, classificationId?: string): Promise<any>;
|
253
256
|
}
|
@@ -400,11 +400,12 @@ export default class Meetings extends WebexPlugin {
|
|
400
400
|
* @param {Object} [meetingInfo] - Pre-fetched complete meeting info
|
401
401
|
* @param {String} [meetingLookupUrl] - meeting info prefetch url
|
402
402
|
* @param {string} sessionCorrelationId - the optional specified sessionCorrelationId (callStateForMetrics.sessionCorrelationId) can be provided instead
|
403
|
+
* @param {String} classificationId - If space support classification, it will provide it while start instant meeting
|
403
404
|
* @returns {Promise<Meeting>} A new Meeting.
|
404
405
|
* @public
|
405
406
|
* @memberof Meetings
|
406
407
|
*/
|
407
|
-
create(destination: string, type?: DESTINATION_TYPE, useRandomDelayForInfo?: boolean, infoExtraParams?: {}, correlationId?: string, failOnMissingMeetingInfo?: boolean, callStateForMetrics?: CallStateForMetrics, meetingInfo?: any, meetingLookupUrl?: any, sessionCorrelationId?: string): any;
|
408
|
+
create(destination: string, type?: DESTINATION_TYPE, useRandomDelayForInfo?: boolean, infoExtraParams?: {}, correlationId?: string, failOnMissingMeetingInfo?: boolean, callStateForMetrics?: CallStateForMetrics, meetingInfo?: any, meetingLookupUrl?: any, sessionCorrelationId?: string, classificationId?: string): any;
|
408
409
|
/**
|
409
410
|
* Enable static meeting links for given conversation url.
|
410
411
|
*
|
@@ -438,6 +439,7 @@ export default class Meetings extends WebexPlugin {
|
|
438
439
|
* @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
|
439
440
|
* @param {Object} [meetingInfo] - Pre-fetched complete meeting info
|
440
441
|
* @param {String} [meetingLookupUrl] - meeting info prefetch url
|
442
|
+
* @param {String} classificationId see create()
|
441
443
|
* @returns {Promise} a new meeting instance complete with meeting info and destination
|
442
444
|
* @private
|
443
445
|
* @memberof Meetings
|
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
package/src/meeting/index.ts
CHANGED
@@ -269,6 +269,7 @@ export enum ScreenShareFloorStatus {
|
|
269
269
|
type FetchMeetingInfoParams = {
|
270
270
|
password?: string;
|
271
271
|
registrationId?: string;
|
272
|
+
classificationId?: string;
|
272
273
|
captchaCode?: string;
|
273
274
|
extraParams?: Record<string, any>;
|
274
275
|
sendCAevents?: boolean;
|
@@ -1902,6 +1903,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
1902
1903
|
extraParams = {},
|
1903
1904
|
sendCAevents = false,
|
1904
1905
|
registrationId = null,
|
1906
|
+
classificationId = null,
|
1905
1907
|
}): Promise<void> {
|
1906
1908
|
try {
|
1907
1909
|
const captchaInfo = captchaCode
|
@@ -1918,7 +1920,9 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
1918
1920
|
this.locusId,
|
1919
1921
|
extraParams,
|
1920
1922
|
{meetingId: this.id, sendCAevents},
|
1921
|
-
registrationId
|
1923
|
+
registrationId,
|
1924
|
+
null,
|
1925
|
+
classificationId
|
1922
1926
|
);
|
1923
1927
|
|
1924
1928
|
this.parseMeetingInfo(info?.body, this.destination, info?.errors);
|
@@ -6796,6 +6800,10 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
6796
6800
|
// @ts-ignore
|
6797
6801
|
this.webex.internal.newMetrics.submitClientEvent({
|
6798
6802
|
name: 'client.ice.start',
|
6803
|
+
payload: {
|
6804
|
+
// @ts-ignore
|
6805
|
+
labels: MeetingUtil.getCaEventLabelsForIpVersion(this.webex),
|
6806
|
+
},
|
6799
6807
|
options: {
|
6800
6808
|
meetingId: this.id,
|
6801
6809
|
},
|
package/src/meeting/util.ts
CHANGED
@@ -115,6 +115,28 @@ const MeetingUtil = {
|
|
115
115
|
return IP_VERSION.unknown;
|
116
116
|
},
|
117
117
|
|
118
|
+
/**
|
119
|
+
* Returns CA event labels related to Orpheus ipver parameter that can be sent to CA with any CA event
|
120
|
+
* @param {any} webex instance
|
121
|
+
* @returns {Array<string>|undefined} array of CA event labels or undefined if no labels should be sent
|
122
|
+
*/
|
123
|
+
getCaEventLabelsForIpVersion(webex: any): Array<string> | undefined {
|
124
|
+
const ipver = MeetingUtil.getIpVersion(webex);
|
125
|
+
|
126
|
+
switch (ipver) {
|
127
|
+
case IP_VERSION.unknown:
|
128
|
+
return undefined;
|
129
|
+
case IP_VERSION.only_ipv4:
|
130
|
+
return ['hasIpv4_true'];
|
131
|
+
case IP_VERSION.only_ipv6:
|
132
|
+
return ['hasIpv6_true'];
|
133
|
+
case IP_VERSION.ipv4_and_ipv6:
|
134
|
+
return ['hasIpv4_true', 'hasIpv6_true'];
|
135
|
+
default:
|
136
|
+
return undefined;
|
137
|
+
}
|
138
|
+
},
|
139
|
+
|
118
140
|
joinMeeting: async (meeting, options) => {
|
119
141
|
if (!meeting) {
|
120
142
|
return Promise.reject(new ParameterError('You need a meeting object.'));
|
@@ -371,6 +371,7 @@ export default class MeetingInfoV2 {
|
|
371
371
|
* @param {String} conversationUrl conversationUrl to start adhoc meeting on
|
372
372
|
* @param {String} installedOrgID org ID of user's machine
|
373
373
|
* @param {Boolean} enableStaticMeetingLink whether or not to enable static meeting link
|
374
|
+
* @param {String} classificationId need it to start adhoc meeting if space support classification
|
374
375
|
* @returns {Promise} returns a meeting info object
|
375
376
|
* @public
|
376
377
|
* @memberof MeetingInfo
|
@@ -379,7 +380,8 @@ export default class MeetingInfoV2 {
|
|
379
380
|
conversationUrl: string,
|
380
381
|
installedOrgID?: string,
|
381
382
|
// setting this to true enables static meeting link
|
382
|
-
enableStaticMeetingLink = false
|
383
|
+
enableStaticMeetingLink = false,
|
384
|
+
classificationId = undefined
|
383
385
|
) {
|
384
386
|
const getInvitees = (particpants = []) => {
|
385
387
|
const invitees = [];
|
@@ -407,6 +409,7 @@ export default class MeetingInfoV2 {
|
|
407
409
|
invitees: getInvitees(conversation.participants?.items),
|
408
410
|
installedOrgID,
|
409
411
|
schedule: enableStaticMeetingLink,
|
412
|
+
classificationId,
|
410
413
|
};
|
411
414
|
|
412
415
|
if (installedOrgID) {
|
@@ -429,16 +432,26 @@ export default class MeetingInfoV2 {
|
|
429
432
|
* Creates adhoc space meetings for a space by fetching the conversation infomation
|
430
433
|
* @param {String} conversationUrl conversationUrl to start adhoc meeting on
|
431
434
|
* @param {String} installedOrgID org ID of user's machine
|
435
|
+
* @param {String} classificationId if space is support classification, it needs provide it during start instant meeting
|
432
436
|
* @returns {Promise} returns a meeting info object
|
433
437
|
* @public
|
434
438
|
* @memberof MeetingInfo
|
435
439
|
*/
|
436
|
-
async createAdhocSpaceMeeting(
|
440
|
+
async createAdhocSpaceMeeting(
|
441
|
+
conversationUrl: string,
|
442
|
+
installedOrgID?: string,
|
443
|
+
classificationId?: string
|
444
|
+
) {
|
437
445
|
if (!this.webex.meetings.preferredWebexSite) {
|
438
446
|
throw Error('No preferred webex site found');
|
439
447
|
}
|
440
448
|
|
441
|
-
return this.createAdhocSpaceMeetingOrEnableStaticMeetingLink(
|
449
|
+
return this.createAdhocSpaceMeetingOrEnableStaticMeetingLink(
|
450
|
+
conversationUrl,
|
451
|
+
installedOrgID,
|
452
|
+
false,
|
453
|
+
classificationId
|
454
|
+
)
|
442
455
|
.then((requestResult) => {
|
443
456
|
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ADHOC_MEETING_SUCCESS);
|
444
457
|
|
@@ -618,6 +631,7 @@ export default class MeetingInfoV2 {
|
|
618
631
|
* @param {Object} options
|
619
632
|
* @param {String} registrationId
|
620
633
|
* @param {String} fullSiteUrl
|
634
|
+
* @param {String} classificationId
|
621
635
|
* @returns {Promise} returns a meeting info object
|
622
636
|
* @public
|
623
637
|
* @memberof MeetingInfo
|
@@ -635,7 +649,8 @@ export default class MeetingInfoV2 {
|
|
635
649
|
extraParams: object = {},
|
636
650
|
options: {meetingId?: string; sendCAevents?: boolean} = {},
|
637
651
|
registrationId: string = null,
|
638
|
-
fullSiteUrl: string = null
|
652
|
+
fullSiteUrl: string = null,
|
653
|
+
classificationId: string = null
|
639
654
|
) {
|
640
655
|
const {meetingId, sendCAevents} = options;
|
641
656
|
|
@@ -650,7 +665,11 @@ export default class MeetingInfoV2 {
|
|
650
665
|
this.webex.config.meetings.experimental.enableAdhocMeetings &&
|
651
666
|
this.webex.meetings.preferredWebexSite
|
652
667
|
) {
|
653
|
-
return this.createAdhocSpaceMeeting(
|
668
|
+
return this.createAdhocSpaceMeeting(
|
669
|
+
destinationType.destination,
|
670
|
+
installedOrgID,
|
671
|
+
classificationId
|
672
|
+
);
|
654
673
|
}
|
655
674
|
|
656
675
|
const body = await MeetingInfoUtil.getRequestBody({
|
package/src/meetings/index.ts
CHANGED
@@ -1331,6 +1331,7 @@ export default class Meetings extends WebexPlugin {
|
|
1331
1331
|
* @param {Object} [meetingInfo] - Pre-fetched complete meeting info
|
1332
1332
|
* @param {String} [meetingLookupUrl] - meeting info prefetch url
|
1333
1333
|
* @param {string} sessionCorrelationId - the optional specified sessionCorrelationId (callStateForMetrics.sessionCorrelationId) can be provided instead
|
1334
|
+
* @param {String} classificationId - If space support classification, it will provide it while start instant meeting
|
1334
1335
|
* @returns {Promise<Meeting>} A new Meeting.
|
1335
1336
|
* @public
|
1336
1337
|
* @memberof Meetings
|
@@ -1345,7 +1346,8 @@ export default class Meetings extends WebexPlugin {
|
|
1345
1346
|
callStateForMetrics: CallStateForMetrics = undefined,
|
1346
1347
|
meetingInfo = undefined,
|
1347
1348
|
meetingLookupUrl = undefined,
|
1348
|
-
sessionCorrelationId: string = undefined
|
1349
|
+
sessionCorrelationId: string = undefined,
|
1350
|
+
classificationId: string = undefined
|
1349
1351
|
) {
|
1350
1352
|
// Validate meeting information based on the provided destination and
|
1351
1353
|
// type. This must be performed prior to determining if the meeting is
|
@@ -1415,7 +1417,8 @@ export default class Meetings extends WebexPlugin {
|
|
1415
1417
|
callStateForMetrics,
|
1416
1418
|
failOnMissingMeetingInfo,
|
1417
1419
|
meetingInfo,
|
1418
|
-
meetingLookupUrl
|
1420
|
+
meetingLookupUrl,
|
1421
|
+
classificationId
|
1419
1422
|
).then((createdMeeting: any) => {
|
1420
1423
|
// If the meeting was successfully created.
|
1421
1424
|
if (createdMeeting && createdMeeting.on) {
|
@@ -1529,6 +1532,7 @@ export default class Meetings extends WebexPlugin {
|
|
1529
1532
|
* @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
|
1530
1533
|
* @param {Object} [meetingInfo] - Pre-fetched complete meeting info
|
1531
1534
|
* @param {String} [meetingLookupUrl] - meeting info prefetch url
|
1535
|
+
* @param {String} classificationId see create()
|
1532
1536
|
* @returns {Promise} a new meeting instance complete with meeting info and destination
|
1533
1537
|
* @private
|
1534
1538
|
* @memberof Meetings
|
@@ -1541,7 +1545,8 @@ export default class Meetings extends WebexPlugin {
|
|
1541
1545
|
callStateForMetrics: CallStateForMetrics = undefined,
|
1542
1546
|
failOnMissingMeetingInfo = false,
|
1543
1547
|
meetingInfo = undefined,
|
1544
|
-
meetingLookupUrl = undefined
|
1548
|
+
meetingLookupUrl = undefined,
|
1549
|
+
classificationId = undefined
|
1545
1550
|
) {
|
1546
1551
|
const meeting = new Meeting(
|
1547
1552
|
{
|
@@ -1589,6 +1594,7 @@ export default class Meetings extends WebexPlugin {
|
|
1589
1594
|
// @ts-ignore
|
1590
1595
|
const {enableUnifiedMeetings} = this.config.experimental;
|
1591
1596
|
const meetingInfoOptions = {
|
1597
|
+
classificationId,
|
1592
1598
|
extraParams: infoExtraParams,
|
1593
1599
|
sendCAevents: !!callStateForMetrics?.correlationId, // if client sends correlation id as argument of public create(), then it means that this meeting creation is part of a pre-join intent from user
|
1594
1600
|
};
|
@@ -7478,6 +7478,8 @@ describe('plugin-meetings', () => {
|
|
7478
7478
|
'locus-id',
|
7479
7479
|
{extraParam1: 'value1', permissionToken: FAKE_PERMISSION_TOKEN},
|
7480
7480
|
{meetingId: meeting.id, sendCAevents: true},
|
7481
|
+
null,
|
7482
|
+
null,
|
7481
7483
|
null
|
7482
7484
|
);
|
7483
7485
|
assert.deepEqual(meeting.meetingInfo, {
|
@@ -7524,6 +7526,8 @@ describe('plugin-meetings', () => {
|
|
7524
7526
|
'locus-id',
|
7525
7527
|
{extraParam1: 'value1', permissionToken: FAKE_PERMISSION_TOKEN},
|
7526
7528
|
{meetingId: meeting.id, sendCAevents: true},
|
7529
|
+
null,
|
7530
|
+
null,
|
7527
7531
|
null
|
7528
7532
|
);
|
7529
7533
|
assert.deepEqual(meeting.meetingInfo, {
|
@@ -7579,6 +7583,8 @@ describe('plugin-meetings', () => {
|
|
7579
7583
|
permissionToken: FAKE_PERMISSION_TOKEN,
|
7580
7584
|
},
|
7581
7585
|
{meetingId: meeting.id, sendCAevents: true},
|
7586
|
+
null,
|
7587
|
+
null,
|
7582
7588
|
null
|
7583
7589
|
);
|
7584
7590
|
assert.deepEqual(meeting.meetingInfo, {
|
@@ -9020,11 +9026,16 @@ describe('plugin-meetings', () => {
|
|
9020
9026
|
meeting.hasMediaConnectionConnectedAtLeastOnce = false;
|
9021
9027
|
meeting.setupMediaConnectionListeners();
|
9022
9028
|
|
9029
|
+
sinon.stub(MeetingUtil, 'getCaEventLabelsForIpVersion').returns(['fake labels']);
|
9030
|
+
|
9023
9031
|
simulateConnectionStateChange(ConnectionState.Connecting);
|
9024
9032
|
|
9025
9033
|
assert.calledOnce(webex.internal.newMetrics.submitClientEvent);
|
9026
9034
|
assert.calledWithMatch(webex.internal.newMetrics.submitClientEvent, {
|
9027
9035
|
name: 'client.ice.start',
|
9036
|
+
payload: {
|
9037
|
+
labels: ['fake labels'],
|
9038
|
+
},
|
9028
9039
|
options: {
|
9029
9040
|
meetingId: meeting.id,
|
9030
9041
|
},
|
@@ -1310,6 +1310,27 @@ describe('plugin-meetings', () => {
|
|
1310
1310
|
});
|
1311
1311
|
});
|
1312
1312
|
|
1313
|
+
describe('getCaEventLabelsForIpVersion', () => {
|
1314
|
+
[
|
1315
|
+
{ipver: IP_VERSION.unknown, expectedLabels: undefined},
|
1316
|
+
{ipver: IP_VERSION.only_ipv4, expectedLabels: ['hasIpv4_true']},
|
1317
|
+
{ipver: IP_VERSION.only_ipv6, expectedLabels: ['hasIpv6_true']},
|
1318
|
+
{
|
1319
|
+
ipver: IP_VERSION.ipv4_and_ipv6,
|
1320
|
+
expectedLabels: ['hasIpv4_true', 'hasIpv6_true'],
|
1321
|
+
},
|
1322
|
+
].forEach(({ipver, expectedLabels}) => {
|
1323
|
+
it(`returns expected labels when ipver=${ipver}`, () => {
|
1324
|
+
sinon.stub(MeetingUtil, 'getIpVersion').returns(ipver);
|
1325
|
+
|
1326
|
+
const result = MeetingUtil.getCaEventLabelsForIpVersion(webex);
|
1327
|
+
|
1328
|
+
assert.calledOnceWithExactly(MeetingUtil.getIpVersion, webex);
|
1329
|
+
assert.deepEqual(result, expectedLabels);
|
1330
|
+
});
|
1331
|
+
});
|
1332
|
+
});
|
1333
|
+
|
1313
1334
|
describe('getChangeMeetingFloorErrorPayload', () => {
|
1314
1335
|
[
|
1315
1336
|
{
|
@@ -218,6 +218,7 @@ describe('plugin-meetings', () => {
|
|
218
218
|
invitees: invitee,
|
219
219
|
installedOrgID: undefined,
|
220
220
|
schedule: true,
|
221
|
+
classificationId: undefined,
|
221
222
|
},
|
222
223
|
});
|
223
224
|
|
@@ -652,7 +653,8 @@ describe('plugin-meetings', () => {
|
|
652
653
|
assert.calledOnceWithExactly(
|
653
654
|
meetingInfo.createAdhocSpaceMeeting,
|
654
655
|
'conversationUrl',
|
655
|
-
installedOrgID
|
656
|
+
installedOrgID,
|
657
|
+
null,
|
656
658
|
);
|
657
659
|
assert.notCalled(webex.request);
|
658
660
|
meetingInfo.createAdhocSpaceMeeting.restore();
|
@@ -1148,6 +1150,7 @@ describe('plugin-meetings', () => {
|
|
1148
1150
|
describe('createAdhocSpaceMeeting', () => {
|
1149
1151
|
const conversationUrl = 'https://conversationUrl/xxx';
|
1150
1152
|
const installedOrgID = '12345';
|
1153
|
+
const classificationId = '123456';
|
1151
1154
|
|
1152
1155
|
const setup = () => {
|
1153
1156
|
const invitee = [];
|
@@ -1173,7 +1176,7 @@ describe('plugin-meetings', () => {
|
|
1173
1176
|
body: conversation,
|
1174
1177
|
});
|
1175
1178
|
|
1176
|
-
const result = await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID);
|
1179
|
+
const result = await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID, classificationId);
|
1177
1180
|
|
1178
1181
|
assert.calledWith(webex.request, {
|
1179
1182
|
uri: conversationUrl,
|
@@ -1192,6 +1195,7 @@ describe('plugin-meetings', () => {
|
|
1192
1195
|
invitees: invitee,
|
1193
1196
|
installedOrgID: installedOrgID,
|
1194
1197
|
schedule: false,
|
1198
|
+
classificationId,
|
1195
1199
|
},
|
1196
1200
|
});
|
1197
1201
|
assert.calledOnce(Metrics.sendBehavioralMetric);
|
@@ -1206,7 +1210,7 @@ describe('plugin-meetings', () => {
|
|
1206
1210
|
webex.request = sinon.stub().resolves({
|
1207
1211
|
body: conversation,
|
1208
1212
|
});
|
1209
|
-
await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID);
|
1213
|
+
await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID, classificationId);
|
1210
1214
|
|
1211
1215
|
assert.calledWith(webex.request, {
|
1212
1216
|
uri: conversationUrl,
|
@@ -1224,6 +1228,7 @@ describe('plugin-meetings', () => {
|
|
1224
1228
|
invitees: invitee,
|
1225
1229
|
installedOrgID,
|
1226
1230
|
schedule: false,
|
1231
|
+
classificationId,
|
1227
1232
|
},
|
1228
1233
|
});
|
1229
1234
|
assert(Metrics.sendBehavioralMetric.calledOnce);
|
@@ -1099,6 +1099,7 @@ describe('plugin-meetings', () => {
|
|
1099
1099
|
const FAKE_USE_RANDOM_DELAY = true;
|
1100
1100
|
const correlationId = 'my-correlationId';
|
1101
1101
|
const sessionCorrelationId = 'my-session-correlationId';
|
1102
|
+
const classificationId = 'my-classificationId';
|
1102
1103
|
const callStateForMetrics = {
|
1103
1104
|
sessionCorrelationId: 'my-session-correlationId2',
|
1104
1105
|
correlationId: 'my-correlationId2',
|
@@ -1119,7 +1120,8 @@ describe('plugin-meetings', () => {
|
|
1119
1120
|
callStateForMetrics,
|
1120
1121
|
undefined,
|
1121
1122
|
undefined,
|
1122
|
-
sessionCorrelationId
|
1123
|
+
sessionCorrelationId,
|
1124
|
+
classificationId
|
1123
1125
|
);
|
1124
1126
|
assert.calledOnceWithExactly(fakeMeeting.updateCallStateForMetrics, {
|
1125
1127
|
...callStateForMetrics,
|
@@ -1201,6 +1203,13 @@ describe('plugin-meetings', () => {
|
|
1201
1203
|
);
|
1202
1204
|
});
|
1203
1205
|
|
1206
|
+
it('calls createMeeting with classificationId and returns its promise', async () => {
|
1207
|
+
await checkCallCreateMeeting(
|
1208
|
+
[test1, test2, FAKE_USE_RANDOM_DELAY, {}, undefined, true, callStateForMetrics, undefined, undefined, undefined, classificationId],
|
1209
|
+
[test1, test2, FAKE_USE_RANDOM_DELAY, {}, callStateForMetrics, true, undefined, undefined, classificationId],
|
1210
|
+
);
|
1211
|
+
});
|
1212
|
+
|
1204
1213
|
it('calls createMeeting with callStateForMetrics overwritten with correlationId and returns its promise', async () => {
|
1205
1214
|
await checkCallCreateMeeting(
|
1206
1215
|
[test1, test2, FAKE_USE_RANDOM_DELAY, {}, correlationId, true, callStateForMetrics],
|