@webex/plugin-meetings 3.9.0-next.10 → 3.9.0-next.11

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.
@@ -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
@@ -458,7 +458,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
458
458
  }, _callee7);
459
459
  }))();
460
460
  },
461
- version: "3.9.0-next.10"
461
+ version: "3.9.0-next.11"
462
462
  });
463
463
  var _default = exports.default = Webinar;
464
464
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -92,5 +92,5 @@
92
92
  "//": [
93
93
  "TODO: upgrade jwt-decode when moving to node 18"
94
94
  ],
95
- "version": "3.9.0-next.10"
95
+ "version": "3.9.0-next.11"
96
96
  }
@@ -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);
@@ -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(conversationUrl: string, installedOrgID?: string) {
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(conversationUrl, installedOrgID)
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(destinationType.destination, installedOrgID);
668
+ return this.createAdhocSpaceMeeting(
669
+ destinationType.destination,
670
+ installedOrgID,
671
+ classificationId
672
+ );
654
673
  }
655
674
 
656
675
  const body = await MeetingInfoUtil.getRequestBody({
@@ -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, {
@@ -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],