@webex/plugin-meetings 3.8.0-next.8 → 3.8.0-web-workers-keepalive.1
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/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +1 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/meeting/index.js +51 -5
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +4 -1
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +359 -60
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +60 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +3 -0
- package/dist/member/util.js.map +1 -1
- package/dist/metrics/constants.js +9 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/reachability/clusterReachability.js +52 -8
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +70 -45
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/request.js +19 -3
- package/dist/reachability/request.js.map +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/meeting/index.d.ts +8 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +80 -0
- package/dist/types/meetings/index.d.ts +29 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/metrics/constants.d.ts +9 -0
- package/dist/types/reachability/clusterReachability.d.ts +13 -1
- package/dist/types/reachability/index.d.ts +2 -1
- package/dist/types/reachability/reachability.types.d.ts +5 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/config.ts +1 -0
- package/src/locus-info/controlsUtils.ts +2 -2
- package/src/meeting/index.ts +51 -7
- package/src/meeting/util.ts +2 -1
- package/src/meeting-info/meeting-info-v2.ts +247 -6
- package/src/meetings/index.ts +72 -1
- package/src/member/index.ts +11 -0
- package/src/member/util.ts +3 -0
- package/src/metrics/constants.ts +9 -0
- package/src/reachability/clusterReachability.ts +47 -1
- package/src/reachability/index.ts +15 -0
- package/src/reachability/reachability.types.ts +6 -0
- package/src/reachability/request.ts +7 -0
- package/test/unit/spec/locus-info/controlsUtils.js +8 -0
- package/test/unit/spec/meeting/index.js +62 -4
- package/test/unit/spec/meeting/utils.js +55 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +443 -114
- package/test/unit/spec/meetings/index.js +78 -1
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +24 -0
- package/test/unit/spec/reachability/clusterReachability.ts +47 -1
- package/test/unit/spec/reachability/index.ts +12 -0
- package/test/unit/spec/reachability/request.js +47 -2
@@ -11,7 +11,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequ
|
|
11
11
|
_Object$defineProperty(exports, "__esModule", {
|
12
12
|
value: true
|
13
13
|
});
|
14
|
-
exports.default = exports.MeetingInfoV2PolicyError = exports.MeetingInfoV2PasswordError = exports.MeetingInfoV2JoinWebinarError = exports.MeetingInfoV2JoinForbiddenError = exports.MeetingInfoV2CaptchaError = exports.MeetingInfoV2AdhocMeetingError = void 0;
|
14
|
+
exports.default = exports.MeetingInfoV2StaticMeetingLinkAlreadyExists = exports.MeetingInfoV2StaticLinkDoesNotExistError = exports.MeetingInfoV2PolicyError = exports.MeetingInfoV2PasswordError = exports.MeetingInfoV2MeetingIsInProgressError = exports.MeetingInfoV2JoinWebinarError = exports.MeetingInfoV2JoinForbiddenError = exports.MeetingInfoV2CaptchaError = exports.MeetingInfoV2AdhocMeetingError = void 0;
|
15
15
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
16
16
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
17
17
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
@@ -35,6 +35,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
35
35
|
var PASSWORD_ERROR_DEFAULT_MESSAGE = 'Password required. Call fetchMeetingInfo() with password argument';
|
36
36
|
var CAPTCHA_ERROR_DEFAULT_MESSAGE = 'Captcha required. Call fetchMeetingInfo() with captchaInfo argument';
|
37
37
|
var ADHOC_MEETING_DEFAULT_ERROR = 'Failed starting the adhoc meeting, Please contact support team ';
|
38
|
+
var MEETING_IS_IN_PROGRESS_MESSAGE = 'Meeting is in progress';
|
39
|
+
var STATIC_MEETING_LINK_ALREADY_EXISTS_MESSAGE = 'Static meeting link already exists';
|
40
|
+
var FETCH_STATIC_MEETING_LINK = 'Meeting link does not exists for conversation';
|
38
41
|
var CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006];
|
39
42
|
var CAPTCHA_ERROR_REQUIRES_REGISTRATION_ID_CODES = [423007];
|
40
43
|
var POLICY_ERROR_CODES = [403049, 403104, 403103, 403048, 403102, 403101];
|
@@ -234,6 +237,92 @@ var MeetingInfoV2JoinForbiddenError = exports.MeetingInfoV2JoinForbiddenError =
|
|
234
237
|
}
|
235
238
|
return (0, _createClass2.default)(MeetingInfoV2JoinForbiddenError);
|
236
239
|
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
240
|
+
/**
|
241
|
+
* Error fetching static link for a conversation when it does not exist
|
242
|
+
*/
|
243
|
+
var MeetingInfoV2StaticLinkDoesNotExistError = exports.MeetingInfoV2StaticLinkDoesNotExistError = /*#__PURE__*/function (_Error7) {
|
244
|
+
(0, _inherits2.default)(MeetingInfoV2StaticLinkDoesNotExistError, _Error7);
|
245
|
+
var _super7 = _createSuper(MeetingInfoV2StaticLinkDoesNotExistError);
|
246
|
+
/**
|
247
|
+
*
|
248
|
+
* @constructor
|
249
|
+
* @param {Number} [wbxAppApiErrorCode]
|
250
|
+
* @param {String} [message]
|
251
|
+
*/
|
252
|
+
function MeetingInfoV2StaticLinkDoesNotExistError(wbxAppApiErrorCode) {
|
253
|
+
var _this7;
|
254
|
+
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : FETCH_STATIC_MEETING_LINK;
|
255
|
+
(0, _classCallCheck2.default)(this, MeetingInfoV2StaticLinkDoesNotExistError);
|
256
|
+
_this7 = _super7.call(this, "".concat(message, ", code=").concat(wbxAppApiErrorCode));
|
257
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this7), "sdkMessage", void 0);
|
258
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this7), "wbxAppApiCode", void 0);
|
259
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this7), "body", void 0);
|
260
|
+
_this7.name = 'MeetingInfoV2StaticLinkDoesNotExistError';
|
261
|
+
_this7.sdkMessage = message;
|
262
|
+
_this7.stack = new Error().stack;
|
263
|
+
_this7.wbxAppApiCode = wbxAppApiErrorCode;
|
264
|
+
return _this7;
|
265
|
+
}
|
266
|
+
return (0, _createClass2.default)(MeetingInfoV2StaticLinkDoesNotExistError);
|
267
|
+
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
268
|
+
/**
|
269
|
+
* Error enabling/disabling static meeting link
|
270
|
+
*/
|
271
|
+
var MeetingInfoV2MeetingIsInProgressError = exports.MeetingInfoV2MeetingIsInProgressError = /*#__PURE__*/function (_Error8) {
|
272
|
+
(0, _inherits2.default)(MeetingInfoV2MeetingIsInProgressError, _Error8);
|
273
|
+
var _super8 = _createSuper(MeetingInfoV2MeetingIsInProgressError);
|
274
|
+
/**
|
275
|
+
*
|
276
|
+
* @constructor
|
277
|
+
* @param {Number} [wbxAppApiErrorCode]
|
278
|
+
* @param {String} [message]
|
279
|
+
* @param {Boolean} [enable]
|
280
|
+
*/
|
281
|
+
function MeetingInfoV2MeetingIsInProgressError(wbxAppApiErrorCode) {
|
282
|
+
var _this8;
|
283
|
+
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : MEETING_IS_IN_PROGRESS_MESSAGE;
|
284
|
+
var enable = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
285
|
+
(0, _classCallCheck2.default)(this, MeetingInfoV2MeetingIsInProgressError);
|
286
|
+
_this8 = _super8.call(this, "".concat(message, ", code=").concat(wbxAppApiErrorCode, ", enable=").concat(enable));
|
287
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this8), "sdkMessage", void 0);
|
288
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this8), "wbxAppApiCode", void 0);
|
289
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this8), "body", void 0);
|
290
|
+
_this8.name = 'MeetingInfoV2MeetingIsInProgressError';
|
291
|
+
_this8.sdkMessage = message;
|
292
|
+
_this8.stack = new Error().stack;
|
293
|
+
_this8.wbxAppApiCode = wbxAppApiErrorCode;
|
294
|
+
return _this8;
|
295
|
+
}
|
296
|
+
return (0, _createClass2.default)(MeetingInfoV2MeetingIsInProgressError);
|
297
|
+
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
298
|
+
/**
|
299
|
+
* Error enabling/disabling static meeting link
|
300
|
+
*/
|
301
|
+
var MeetingInfoV2StaticMeetingLinkAlreadyExists = exports.MeetingInfoV2StaticMeetingLinkAlreadyExists = /*#__PURE__*/function (_Error9) {
|
302
|
+
(0, _inherits2.default)(MeetingInfoV2StaticMeetingLinkAlreadyExists, _Error9);
|
303
|
+
var _super9 = _createSuper(MeetingInfoV2StaticMeetingLinkAlreadyExists);
|
304
|
+
/**
|
305
|
+
*
|
306
|
+
* @constructor
|
307
|
+
* @param {Number} [wbxAppApiErrorCode]
|
308
|
+
* @param {String} [message]
|
309
|
+
*/
|
310
|
+
function MeetingInfoV2StaticMeetingLinkAlreadyExists(wbxAppApiErrorCode) {
|
311
|
+
var _this9;
|
312
|
+
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : STATIC_MEETING_LINK_ALREADY_EXISTS_MESSAGE;
|
313
|
+
(0, _classCallCheck2.default)(this, MeetingInfoV2StaticMeetingLinkAlreadyExists);
|
314
|
+
_this9 = _super9.call(this, "".concat(message, ", code=").concat(wbxAppApiErrorCode));
|
315
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this9), "sdkMessage", void 0);
|
316
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this9), "wbxAppApiCode", void 0);
|
317
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this9), "body", void 0);
|
318
|
+
_this9.name = 'MeetingInfoV2StaticMeetingLinkAlreadyExists';
|
319
|
+
_this9.sdkMessage = message;
|
320
|
+
_this9.stack = new Error().stack;
|
321
|
+
_this9.wbxAppApiCode = wbxAppApiErrorCode;
|
322
|
+
return _this9;
|
323
|
+
}
|
324
|
+
return (0, _createClass2.default)(MeetingInfoV2StaticMeetingLinkAlreadyExists);
|
325
|
+
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
237
326
|
/**
|
238
327
|
* @class MeetingInfo
|
239
328
|
*/
|
@@ -321,29 +410,27 @@ var MeetingInfoV2 = exports.default = /*#__PURE__*/function () {
|
|
321
410
|
});
|
322
411
|
}
|
323
412
|
}, {
|
324
|
-
key: "
|
413
|
+
key: "createAdhocSpaceMeetingOrEnableStaticMeetingLink",
|
325
414
|
value: (
|
326
415
|
/**
|
327
|
-
*
|
416
|
+
* helper function to either create an adhoc space meeting or enable static meeting link
|
328
417
|
* @param {String} conversationUrl conversationUrl to start adhoc meeting on
|
329
418
|
* @param {String} installedOrgID org ID of user's machine
|
419
|
+
* @param {Boolean} enableStaticMeetingLink whether or not to enable static meeting link
|
330
420
|
* @returns {Promise} returns a meeting info object
|
331
421
|
* @public
|
332
422
|
* @memberof MeetingInfo
|
333
423
|
*/
|
334
424
|
function () {
|
335
|
-
var
|
336
|
-
var
|
337
|
-
var
|
425
|
+
var _createAdhocSpaceMeetingOrEnableStaticMeetingLink = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(conversationUrl, installedOrgID) {
|
426
|
+
var _this10 = this;
|
427
|
+
var enableStaticMeetingLink,
|
428
|
+
getInvitees,
|
429
|
+
_args = arguments;
|
338
430
|
return _regenerator.default.wrap(function _callee$(_context) {
|
339
431
|
while (1) switch (_context.prev = _context.next) {
|
340
432
|
case 0:
|
341
|
-
|
342
|
-
_context.next = 2;
|
343
|
-
break;
|
344
|
-
}
|
345
|
-
throw Error('No preferred webex site found');
|
346
|
-
case 2:
|
433
|
+
enableStaticMeetingLink = _args.length > 2 && _args[2] !== undefined ? _args[2] : false;
|
347
434
|
getInvitees = function getInvitees() {
|
348
435
|
var particpants = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
349
436
|
var invitees = [];
|
@@ -372,42 +459,254 @@ var MeetingInfoV2 = exports.default = /*#__PURE__*/function () {
|
|
372
459
|
keyUrl: conversation.encryptionKeyUrl,
|
373
460
|
kroUrl: conversation.kmsResourceObjectUrl,
|
374
461
|
invitees: getInvitees((_conversation$partici = conversation.participants) === null || _conversation$partici === void 0 ? void 0 : _conversation$partici.items),
|
375
|
-
installedOrgID: installedOrgID
|
462
|
+
installedOrgID: installedOrgID,
|
463
|
+
schedule: enableStaticMeetingLink
|
376
464
|
};
|
377
465
|
if (installedOrgID) {
|
378
466
|
body.installedOrgID = installedOrgID;
|
379
467
|
}
|
380
|
-
var uri =
|
381
|
-
return
|
468
|
+
var uri = _this10.webex.meetings.preferredWebexSite ? "https://".concat(_this10.webex.meetings.preferredWebexSite, "/wbxappapi/v2/meetings/spaceInstant") : '';
|
469
|
+
return _this10.webex.request({
|
382
470
|
method: _constants.HTTP_VERBS.POST,
|
383
471
|
uri: uri,
|
384
472
|
body: body
|
385
473
|
});
|
386
|
-
})
|
474
|
+
}));
|
475
|
+
case 3:
|
476
|
+
case "end":
|
477
|
+
return _context.stop();
|
478
|
+
}
|
479
|
+
}, _callee, this);
|
480
|
+
}));
|
481
|
+
function createAdhocSpaceMeetingOrEnableStaticMeetingLink(_x, _x2) {
|
482
|
+
return _createAdhocSpaceMeetingOrEnableStaticMeetingLink.apply(this, arguments);
|
483
|
+
}
|
484
|
+
return createAdhocSpaceMeetingOrEnableStaticMeetingLink;
|
485
|
+
}()
|
486
|
+
/**
|
487
|
+
* Creates adhoc space meetings for a space by fetching the conversation infomation
|
488
|
+
* @param {String} conversationUrl conversationUrl to start adhoc meeting on
|
489
|
+
* @param {String} installedOrgID org ID of user's machine
|
490
|
+
* @returns {Promise} returns a meeting info object
|
491
|
+
* @public
|
492
|
+
* @memberof MeetingInfo
|
493
|
+
*/
|
494
|
+
)
|
495
|
+
}, {
|
496
|
+
key: "createAdhocSpaceMeeting",
|
497
|
+
value: (function () {
|
498
|
+
var _createAdhocSpaceMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(conversationUrl, installedOrgID) {
|
499
|
+
var _this11 = this;
|
500
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
501
|
+
while (1) switch (_context2.prev = _context2.next) {
|
502
|
+
case 0:
|
503
|
+
if (this.webex.meetings.preferredWebexSite) {
|
504
|
+
_context2.next = 2;
|
505
|
+
break;
|
506
|
+
}
|
507
|
+
throw Error('No preferred webex site found');
|
508
|
+
case 2:
|
509
|
+
return _context2.abrupt("return", this.createAdhocSpaceMeetingOrEnableStaticMeetingLink(conversationUrl, installedOrgID).then(function (requestResult) {
|
387
510
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADHOC_MEETING_SUCCESS);
|
388
511
|
return requestResult;
|
389
512
|
}).catch(function (err) {
|
390
513
|
var _err$body16, _err$body17;
|
391
|
-
|
392
|
-
|
393
|
-
|
514
|
+
_this11.handlePolicyError(err);
|
515
|
+
_this11.handleJoinWebinarError(err);
|
516
|
+
_this11.handleForbiddenError(err);
|
394
517
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADHOC_MEETING_FAILURE, {
|
395
518
|
reason: err.message,
|
396
519
|
stack: err.stack
|
397
520
|
});
|
398
521
|
throw new MeetingInfoV2AdhocMeetingError((_err$body16 = err.body) === null || _err$body16 === void 0 ? void 0 : _err$body16.code, (_err$body17 = err.body) === null || _err$body17 === void 0 ? void 0 : _err$body17.message);
|
399
522
|
}));
|
400
|
-
case
|
523
|
+
case 3:
|
401
524
|
case "end":
|
402
|
-
return
|
525
|
+
return _context2.stop();
|
403
526
|
}
|
404
|
-
},
|
527
|
+
}, _callee2, this);
|
405
528
|
}));
|
406
|
-
function createAdhocSpaceMeeting(
|
529
|
+
function createAdhocSpaceMeeting(_x3, _x4) {
|
407
530
|
return _createAdhocSpaceMeeting.apply(this, arguments);
|
408
531
|
}
|
409
532
|
return createAdhocSpaceMeeting;
|
410
533
|
}()
|
534
|
+
/**
|
535
|
+
* Fetches details for static meeting link
|
536
|
+
* @param {String} conversationUrl conversationUrl that's required to find static meeting link if it exists
|
537
|
+
* @returns {Promise} returns a Promise
|
538
|
+
* @public
|
539
|
+
* @memberof MeetingInfo
|
540
|
+
*/
|
541
|
+
)
|
542
|
+
}, {
|
543
|
+
key: "fetchStaticMeetingLink",
|
544
|
+
value: (function () {
|
545
|
+
var _fetchStaticMeetingLink = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(conversationUrl) {
|
546
|
+
var body, uri;
|
547
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
548
|
+
while (1) switch (_context3.prev = _context3.next) {
|
549
|
+
case 0:
|
550
|
+
if (this.webex.meetings.preferredWebexSite) {
|
551
|
+
_context3.next = 2;
|
552
|
+
break;
|
553
|
+
}
|
554
|
+
throw Error('No preferred webex site found');
|
555
|
+
case 2:
|
556
|
+
body = {
|
557
|
+
spaceUrl: conversationUrl
|
558
|
+
};
|
559
|
+
uri = this.webex.meetings.preferredWebexSite ? "https://".concat(this.webex.meetings.preferredWebexSite, "/wbxappapi/v2/meetings/spaceInstant/query") : '';
|
560
|
+
return _context3.abrupt("return", this.webex.request({
|
561
|
+
method: _constants.HTTP_VERBS.POST,
|
562
|
+
uri: uri,
|
563
|
+
body: body
|
564
|
+
}).then(function (requestResult) {
|
565
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.FETCH_STATIC_MEETING_LINK_SUCCESS);
|
566
|
+
return requestResult;
|
567
|
+
}).catch(function (err) {
|
568
|
+
if ((err === null || err === void 0 ? void 0 : err.statusCode) === 403) {
|
569
|
+
var _err$body18, _err$body19;
|
570
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LINK_DOES_NOT_EXIST_ERROR, {
|
571
|
+
reason: err.message,
|
572
|
+
stack: err.stack
|
573
|
+
});
|
574
|
+
throw new MeetingInfoV2StaticLinkDoesNotExistError((_err$body18 = err.body) === null || _err$body18 === void 0 ? void 0 : _err$body18.code, (_err$body19 = err.body) === null || _err$body19 === void 0 ? void 0 : _err$body19.message);
|
575
|
+
}
|
576
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.FETCH_STATIC_MEETING_LINK_FAILURE, {
|
577
|
+
reason: err.message,
|
578
|
+
stack: err.stack
|
579
|
+
});
|
580
|
+
throw err;
|
581
|
+
}));
|
582
|
+
case 5:
|
583
|
+
case "end":
|
584
|
+
return _context3.stop();
|
585
|
+
}
|
586
|
+
}, _callee3, this);
|
587
|
+
}));
|
588
|
+
function fetchStaticMeetingLink(_x5) {
|
589
|
+
return _fetchStaticMeetingLink.apply(this, arguments);
|
590
|
+
}
|
591
|
+
return fetchStaticMeetingLink;
|
592
|
+
}()
|
593
|
+
/**
|
594
|
+
* Enables static meeting link
|
595
|
+
* @param {String} conversationUrl conversationUrl that's required to enable static meeting link
|
596
|
+
* @returns {Promise} returns a Promise
|
597
|
+
* @public
|
598
|
+
* @memberof MeetingInfo
|
599
|
+
*/
|
600
|
+
)
|
601
|
+
}, {
|
602
|
+
key: "enableStaticMeetingLink",
|
603
|
+
value: (function () {
|
604
|
+
var _enableStaticMeetingLink = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(conversationUrl) {
|
605
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
606
|
+
while (1) switch (_context4.prev = _context4.next) {
|
607
|
+
case 0:
|
608
|
+
if (this.webex.meetings.preferredWebexSite) {
|
609
|
+
_context4.next = 2;
|
610
|
+
break;
|
611
|
+
}
|
612
|
+
throw Error('No preferred webex site found');
|
613
|
+
case 2:
|
614
|
+
return _context4.abrupt("return", this.createAdhocSpaceMeetingOrEnableStaticMeetingLink(conversationUrl, undefined, true).then(function (requestResult) {
|
615
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.ENABLE_STATIC_METTING_LINK_SUCCESS);
|
616
|
+
return requestResult;
|
617
|
+
}).catch(function (err) {
|
618
|
+
if ((err === null || err === void 0 ? void 0 : err.statusCode) === 403) {
|
619
|
+
var _err$body20, _err$body21;
|
620
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_IS_IN_PROGRESS_ERROR, {
|
621
|
+
reason: err.message,
|
622
|
+
stack: err.stack
|
623
|
+
});
|
624
|
+
throw new MeetingInfoV2MeetingIsInProgressError((_err$body20 = err.body) === null || _err$body20 === void 0 ? void 0 : _err$body20.code, (_err$body21 = err.body) === null || _err$body21 === void 0 ? void 0 : _err$body21.message, true);
|
625
|
+
}
|
626
|
+
if ((err === null || err === void 0 ? void 0 : err.statusCode) === 409) {
|
627
|
+
var _err$body22, _err$body23;
|
628
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.STATIC_MEETING_LINK_ALREADY_EXISTS_ERROR, {
|
629
|
+
reason: err.message,
|
630
|
+
stack: err.stack
|
631
|
+
});
|
632
|
+
throw new MeetingInfoV2StaticMeetingLinkAlreadyExists((_err$body22 = err.body) === null || _err$body22 === void 0 ? void 0 : _err$body22.code, (_err$body23 = err.body) === null || _err$body23 === void 0 ? void 0 : _err$body23.message);
|
633
|
+
}
|
634
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.ENABLE_STATIC_METTING_LINK_FAILURE, {
|
635
|
+
reason: err.message,
|
636
|
+
stack: err.stack
|
637
|
+
});
|
638
|
+
throw err;
|
639
|
+
}));
|
640
|
+
case 3:
|
641
|
+
case "end":
|
642
|
+
return _context4.stop();
|
643
|
+
}
|
644
|
+
}, _callee4, this);
|
645
|
+
}));
|
646
|
+
function enableStaticMeetingLink(_x6) {
|
647
|
+
return _enableStaticMeetingLink.apply(this, arguments);
|
648
|
+
}
|
649
|
+
return enableStaticMeetingLink;
|
650
|
+
}()
|
651
|
+
/**
|
652
|
+
* Disables static meeting link for given conversation url
|
653
|
+
* @param {String} conversationUrl conversationUrl that's required to disable static meeting link if it exists
|
654
|
+
* @returns {Promise} returns a Promise
|
655
|
+
* @public
|
656
|
+
* @memberof MeetingInfo
|
657
|
+
*/
|
658
|
+
)
|
659
|
+
}, {
|
660
|
+
key: "disableStaticMeetingLink",
|
661
|
+
value: (function () {
|
662
|
+
var _disableStaticMeetingLink = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(conversationUrl) {
|
663
|
+
var body, uri;
|
664
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
665
|
+
while (1) switch (_context5.prev = _context5.next) {
|
666
|
+
case 0:
|
667
|
+
if (this.webex.meetings.preferredWebexSite) {
|
668
|
+
_context5.next = 2;
|
669
|
+
break;
|
670
|
+
}
|
671
|
+
throw Error('No preferred webex site found');
|
672
|
+
case 2:
|
673
|
+
body = {
|
674
|
+
spaceUrl: conversationUrl
|
675
|
+
};
|
676
|
+
uri = this.webex.meetings.preferredWebexSite ? "https://".concat(this.webex.meetings.preferredWebexSite, "/wbxappapi/v2/meetings/spaceInstant/deletePersistentMeeting") : '';
|
677
|
+
return _context5.abrupt("return", this.webex.request({
|
678
|
+
method: _constants.HTTP_VERBS.POST,
|
679
|
+
uri: uri,
|
680
|
+
body: body
|
681
|
+
}).then(function (requestResult) {
|
682
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DISABLE_STATIC_MEETING_LINK_SUCCESS);
|
683
|
+
return requestResult;
|
684
|
+
}).catch(function (err) {
|
685
|
+
if ((err === null || err === void 0 ? void 0 : err.statusCode) === 403) {
|
686
|
+
var _err$body24, _err$body25;
|
687
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_IS_IN_PROGRESS_ERROR, {
|
688
|
+
reason: err.message,
|
689
|
+
stack: err.stack
|
690
|
+
});
|
691
|
+
throw new MeetingInfoV2MeetingIsInProgressError((_err$body24 = err.body) === null || _err$body24 === void 0 ? void 0 : _err$body24.code, (_err$body25 = err.body) === null || _err$body25 === void 0 ? void 0 : _err$body25.message);
|
692
|
+
}
|
693
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DISABLE_STATIC_MEETING_LINK_FAILURE, {
|
694
|
+
reason: err.message,
|
695
|
+
stack: err.stack
|
696
|
+
});
|
697
|
+
throw err;
|
698
|
+
}));
|
699
|
+
case 5:
|
700
|
+
case "end":
|
701
|
+
return _context5.stop();
|
702
|
+
}
|
703
|
+
}, _callee5, this);
|
704
|
+
}));
|
705
|
+
function disableStaticMeetingLink(_x7) {
|
706
|
+
return _disableStaticMeetingLink.apply(this, arguments);
|
707
|
+
}
|
708
|
+
return disableStaticMeetingLink;
|
709
|
+
}()
|
411
710
|
/**
|
412
711
|
* Fetches meeting info from the server
|
413
712
|
* @param {String} destination one of many different types of destinations to look up info for
|
@@ -429,8 +728,8 @@ var MeetingInfoV2 = exports.default = /*#__PURE__*/function () {
|
|
429
728
|
}, {
|
430
729
|
key: "fetchMeetingInfo",
|
431
730
|
value: (function () {
|
432
|
-
var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
433
|
-
var
|
731
|
+
var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(destination) {
|
732
|
+
var _this12 = this;
|
434
733
|
var type,
|
435
734
|
password,
|
436
735
|
captchaInfo,
|
@@ -448,34 +747,34 @@ var MeetingInfoV2 = exports.default = /*#__PURE__*/function () {
|
|
448
747
|
err,
|
449
748
|
requestOptions,
|
450
749
|
directURI,
|
451
|
-
|
452
|
-
return _regenerator.default.wrap(function
|
453
|
-
while (1) switch (
|
750
|
+
_args6 = arguments;
|
751
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
752
|
+
while (1) switch (_context6.prev = _context6.next) {
|
454
753
|
case 0:
|
455
|
-
type =
|
456
|
-
password =
|
457
|
-
captchaInfo =
|
458
|
-
installedOrgID =
|
459
|
-
locusId =
|
460
|
-
extraParams =
|
461
|
-
options =
|
462
|
-
registrationId =
|
754
|
+
type = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : null;
|
755
|
+
password = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : null;
|
756
|
+
captchaInfo = _args6.length > 3 && _args6[3] !== undefined ? _args6[3] : null;
|
757
|
+
installedOrgID = _args6.length > 4 && _args6[4] !== undefined ? _args6[4] : null;
|
758
|
+
locusId = _args6.length > 5 && _args6[5] !== undefined ? _args6[5] : null;
|
759
|
+
extraParams = _args6.length > 6 && _args6[6] !== undefined ? _args6[6] : {};
|
760
|
+
options = _args6.length > 7 && _args6[7] !== undefined ? _args6[7] : {};
|
761
|
+
registrationId = _args6.length > 8 && _args6[8] !== undefined ? _args6[8] : null;
|
463
762
|
meetingId = options.meetingId, sendCAevents = options.sendCAevents;
|
464
|
-
|
763
|
+
_context6.next = 11;
|
465
764
|
return _utilv.default.getDestinationType({
|
466
765
|
destination: destination,
|
467
766
|
type: type,
|
468
767
|
webex: this.webex
|
469
768
|
});
|
470
769
|
case 11:
|
471
|
-
destinationType =
|
770
|
+
destinationType = _context6.sent;
|
472
771
|
if (!(destinationType.type === _constants.DESTINATION_TYPE.CONVERSATION_URL && this.webex.config.meetings.experimental.enableAdhocMeetings && this.webex.meetings.preferredWebexSite)) {
|
473
|
-
|
772
|
+
_context6.next = 14;
|
474
773
|
break;
|
475
774
|
}
|
476
|
-
return
|
775
|
+
return _context6.abrupt("return", this.createAdhocSpaceMeeting(destinationType.destination, installedOrgID));
|
477
776
|
case 14:
|
478
|
-
|
777
|
+
_context6.next = 16;
|
479
778
|
return _utilv.default.getRequestBody(_objectSpread(_objectSpread({}, destinationType), {}, {
|
480
779
|
password: password,
|
481
780
|
captchaInfo: captchaInfo,
|
@@ -485,9 +784,9 @@ var MeetingInfoV2 = exports.default = /*#__PURE__*/function () {
|
|
485
784
|
registrationId: registrationId
|
486
785
|
}));
|
487
786
|
case 16:
|
488
|
-
body =
|
787
|
+
body = _context6.sent;
|
489
788
|
if (_lodash.default.difference((0, _keys.default)(body), (0, _keys.default)(_constants.DEFAULT_MEETING_INFO_REQUEST_BODY)).length) {
|
490
|
-
|
789
|
+
_context6.next = 21;
|
491
790
|
break;
|
492
791
|
}
|
493
792
|
err = new Error('Not enough information to fetch meeting info');
|
@@ -503,10 +802,10 @@ var MeetingInfoV2 = exports.default = /*#__PURE__*/function () {
|
|
503
802
|
method: _constants.HTTP_VERBS.POST,
|
504
803
|
body: body
|
505
804
|
};
|
506
|
-
|
805
|
+
_context6.next = 24;
|
507
806
|
return _utilv.default.getDirectMeetingInfoURI(destinationType);
|
508
807
|
case 24:
|
509
|
-
directURI =
|
808
|
+
directURI = _context6.sent;
|
510
809
|
if (directURI) {
|
511
810
|
requestOptions.uri = directURI;
|
512
811
|
} else {
|
@@ -524,13 +823,13 @@ var MeetingInfoV2 = exports.default = /*#__PURE__*/function () {
|
|
524
823
|
}
|
525
824
|
});
|
526
825
|
}
|
527
|
-
return
|
826
|
+
return _context6.abrupt("return", this.webex.request(requestOptions).then(function (response) {
|
528
827
|
if (meetingId && sendCAevents) {
|
529
828
|
var _response$body, _response$body2, _response$body3;
|
530
|
-
|
829
|
+
_this12.webex.internal.newMetrics.submitInternalEvent({
|
531
830
|
name: 'internal.client.meetinginfo.response'
|
532
831
|
});
|
533
|
-
|
832
|
+
_this12.webex.internal.newMetrics.submitClientEvent({
|
534
833
|
name: 'client.meetinginfo.response',
|
535
834
|
payload: {
|
536
835
|
identifiers: {
|
@@ -548,10 +847,10 @@ var MeetingInfoV2 = exports.default = /*#__PURE__*/function () {
|
|
548
847
|
return response;
|
549
848
|
}).catch(function (err) {
|
550
849
|
if (meetingId && sendCAevents) {
|
551
|
-
|
850
|
+
_this12.webex.internal.newMetrics.submitInternalEvent({
|
552
851
|
name: 'internal.client.meetinginfo.response'
|
553
852
|
});
|
554
|
-
|
853
|
+
_this12.webex.internal.newMetrics.submitClientEvent({
|
555
854
|
name: 'client.meetinginfo.response',
|
556
855
|
payload: {
|
557
856
|
identifiers: {
|
@@ -565,23 +864,23 @@ var MeetingInfoV2 = exports.default = /*#__PURE__*/function () {
|
|
565
864
|
});
|
566
865
|
}
|
567
866
|
if ((err === null || err === void 0 ? void 0 : err.statusCode) === 403) {
|
568
|
-
var _err$
|
569
|
-
|
570
|
-
|
571
|
-
|
867
|
+
var _err$body26, _err$body27, _err$body27$data;
|
868
|
+
_this12.handlePolicyError(err);
|
869
|
+
_this12.handleJoinWebinarError(err);
|
870
|
+
_this12.handleForbiddenError(err);
|
572
871
|
_metrics.default.sendBehavioralMetric(_constants2.default.VERIFY_PASSWORD_ERROR, {
|
573
872
|
reason: err.message,
|
574
873
|
stack: err.stack
|
575
874
|
});
|
576
|
-
throw new MeetingInfoV2PasswordError((_err$
|
875
|
+
throw new MeetingInfoV2PasswordError((_err$body26 = err.body) === null || _err$body26 === void 0 ? void 0 : _err$body26.code, (_err$body27 = err.body) === null || _err$body27 === void 0 ? void 0 : (_err$body27$data = _err$body27.data) === null || _err$body27$data === void 0 ? void 0 : _err$body27$data.meetingInfo);
|
577
876
|
}
|
578
877
|
if ((err === null || err === void 0 ? void 0 : err.statusCode) === 423) {
|
579
|
-
var _err$
|
878
|
+
var _err$body28;
|
580
879
|
_metrics.default.sendBehavioralMetric(_constants2.default.VERIFY_CAPTCHA_ERROR, {
|
581
880
|
reason: err.message,
|
582
881
|
stack: err.stack
|
583
882
|
});
|
584
|
-
throw new MeetingInfoV2CaptchaError((_err$
|
883
|
+
throw new MeetingInfoV2CaptchaError((_err$body28 = err.body) === null || _err$body28 === void 0 ? void 0 : _err$body28.code, {
|
585
884
|
captchaId: err.body.captchaID,
|
586
885
|
verificationImageURL: err.body.verificationImageURL,
|
587
886
|
verificationAudioURL: err.body.verificationAudioURL,
|
@@ -596,11 +895,11 @@ var MeetingInfoV2 = exports.default = /*#__PURE__*/function () {
|
|
596
895
|
}));
|
597
896
|
case 28:
|
598
897
|
case "end":
|
599
|
-
return
|
898
|
+
return _context6.stop();
|
600
899
|
}
|
601
|
-
},
|
900
|
+
}, _callee6, this);
|
602
901
|
}));
|
603
|
-
function fetchMeetingInfo(
|
902
|
+
function fetchMeetingInfo(_x8) {
|
604
903
|
return _fetchMeetingInfo.apply(this, arguments);
|
605
904
|
}
|
606
905
|
return fetchMeetingInfo;
|