@webex/plugin-meetings 3.12.0-next.10 → 3.12.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/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +23 -21
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +36 -20
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +38 -14
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/hashTree/hashTreeParser.d.ts +12 -2
- package/dist/types/locus-info/index.d.ts +8 -3
- package/dist/webinar/index.js +1 -1
- package/package.json +13 -13
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +26 -19
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/hashTreeParser.ts +39 -22
- package/src/locus-info/index.ts +48 -24
- package/src/meeting/util.ts +1 -0
- package/test/unit/spec/controls-options-manager/index.js +114 -6
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +59 -32
- package/test/unit/spec/locus-info/index.js +47 -22
- package/test/unit/spec/meeting/utils.js +4 -0
|
@@ -178,7 +178,7 @@ var AIEnableRequest = _webexCore.WebexPlugin.extend({
|
|
|
178
178
|
method: _constants.HTTP_VERBS.PUT
|
|
179
179
|
});
|
|
180
180
|
},
|
|
181
|
-
version: "3.12.0-next.
|
|
181
|
+
version: "3.12.0-next.12"
|
|
182
182
|
});
|
|
183
183
|
var _default = exports.default = AIEnableRequest;
|
|
184
184
|
//# sourceMappingURL=index.js.map
|
package/dist/breakouts/index.js
CHANGED
|
@@ -1109,7 +1109,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
|
|
|
1109
1109
|
this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
|
|
1110
1110
|
}
|
|
1111
1111
|
},
|
|
1112
|
-
version: "3.12.0-next.
|
|
1112
|
+
version: "3.12.0-next.12"
|
|
1113
1113
|
});
|
|
1114
1114
|
var _default = exports.default = Breakouts;
|
|
1115
1115
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
4
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
|
-
exports.ENABLED = exports.CAN_UNSET = exports.CAN_SET = void 0;
|
|
8
|
+
exports.ENABLED = exports.CAN_UNSET = exports.CAN_SET = exports.AUDIO_CONTROL_BODY_KEYS = void 0;
|
|
9
|
+
var _set = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/set"));
|
|
10
|
+
var _lodash = require("lodash");
|
|
11
|
+
var _enums = require("./enums");
|
|
8
12
|
var ENABLED = exports.ENABLED = 'enabled';
|
|
9
13
|
var CAN_SET = exports.CAN_SET = 'canSet';
|
|
10
14
|
var CAN_UNSET = exports.CAN_UNSET = 'canUnset';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Body keys that represent audio controls. These do not support cross-locus
|
|
18
|
+
* authorization and must be sent directly to the current locus URL.
|
|
19
|
+
*/
|
|
20
|
+
var AUDIO_CONTROL_BODY_KEYS = exports.AUDIO_CONTROL_BODY_KEYS = new _set.default([_enums.Control.audio, (0, _lodash.camelCase)(_enums.Setting.muteOnEntry), (0, _lodash.camelCase)(_enums.Setting.disallowUnmute)]);
|
|
11
21
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ENABLED","exports","CAN_SET","CAN_UNSET"],"sources":["constants.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["_lodash","require","_enums","ENABLED","exports","CAN_SET","CAN_UNSET","AUDIO_CONTROL_BODY_KEYS","_set","default","Control","audio","camelCase","Setting","muteOnEntry","disallowUnmute"],"sources":["constants.ts"],"sourcesContent":["import {camelCase} from 'lodash';\nimport {Control, Setting} from './enums';\n\nconst ENABLED = 'enabled';\nconst CAN_SET = 'canSet';\nconst CAN_UNSET = 'canUnset';\n\n/**\n * Body keys that represent audio controls. These do not support cross-locus\n * authorization and must be sent directly to the current locus URL.\n */\nconst AUDIO_CONTROL_BODY_KEYS: ReadonlySet<string> = new Set([\n Control.audio,\n camelCase(Setting.muteOnEntry),\n camelCase(Setting.disallowUnmute),\n]);\n\nexport {ENABLED, CAN_SET, CAN_UNSET, AUDIO_CONTROL_BODY_KEYS};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAME,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,SAAS;AACzB,IAAME,OAAO,GAAAD,OAAA,CAAAC,OAAA,GAAG,QAAQ;AACxB,IAAMC,SAAS,GAAAF,OAAA,CAAAE,SAAA,GAAG,UAAU;;AAE5B;AACA;AACA;AACA;AACA,IAAMC,uBAA4C,GAAAH,OAAA,CAAAG,uBAAA,GAAG,IAAAC,IAAA,CAAAC,OAAA,CAAQ,CAC3DC,cAAO,CAACC,KAAK,EACb,IAAAC,iBAAS,EAACC,cAAO,CAACC,WAAW,CAAC,EAC9B,IAAAF,iBAAS,EAACC,cAAO,CAACE,cAAc,CAAC,CAClC,CAAC","ignoreList":[]}
|
|
@@ -11,8 +11,8 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
11
11
|
value: true
|
|
12
12
|
});
|
|
13
13
|
exports.default = void 0;
|
|
14
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
15
14
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
15
|
+
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
16
16
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
17
17
|
var _entries = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/entries"));
|
|
18
18
|
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/array/is-array"));
|
|
@@ -21,12 +21,12 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
|
|
|
21
21
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
22
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
23
23
|
var _lodash = require("lodash");
|
|
24
|
+
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
24
25
|
var _permission = _interopRequireDefault(require("../common/errors/permission"));
|
|
25
|
-
var _constants = require("../constants");
|
|
26
26
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
27
27
|
var _enums = require("./enums");
|
|
28
28
|
var _util = _interopRequireDefault(require("./util"));
|
|
29
|
-
var
|
|
29
|
+
var _constants = require("./constants");
|
|
30
30
|
function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31
31
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
32
|
/**
|
|
@@ -181,6 +181,9 @@ var ControlsOptionsManager = exports.default = /*#__PURE__*/function () {
|
|
|
181
181
|
key: "update",
|
|
182
182
|
value: function update() {
|
|
183
183
|
var _this = this;
|
|
184
|
+
if (!this.locusUrl) {
|
|
185
|
+
return _promise.default.reject(new _parameter.default('The associated locusUrl for update() controls must be defined.'));
|
|
186
|
+
}
|
|
184
187
|
for (var _len = arguments.length, controls = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
185
188
|
controls[_key] = arguments[_key];
|
|
186
189
|
}
|
|
@@ -194,17 +197,15 @@ var ControlsOptionsManager = exports.default = /*#__PURE__*/function () {
|
|
|
194
197
|
return (0, _defineProperty2.default)({}, control.scope, control.properties);
|
|
195
198
|
});
|
|
196
199
|
return payloads.reduce(function (previous, payload) {
|
|
197
|
-
var
|
|
198
|
-
|
|
199
|
-
|
|
200
|
+
var requestParams = _util.default.getControlsRequestParams({
|
|
201
|
+
body: payload,
|
|
202
|
+
locusUrl: _this.locusUrl,
|
|
203
|
+
mainLocusUrl: _this.mainLocusUrl
|
|
204
|
+
});
|
|
200
205
|
return previous.then(function () {
|
|
201
206
|
return (
|
|
202
207
|
// @ts-ignore
|
|
203
|
-
_this.request.request(
|
|
204
|
-
uri: "".concat(_this.mainLocusUrl || _this.locusUrl, "/").concat(_constants.CONTROLS),
|
|
205
|
-
body: _objectSpread(_objectSpread({}, payload), extraBody),
|
|
206
|
-
method: _constants.HTTP_VERBS.PATCH
|
|
207
|
-
})
|
|
208
|
+
_this.request.request(requestParams)
|
|
208
209
|
);
|
|
209
210
|
});
|
|
210
211
|
}, _promise.default.resolve());
|
|
@@ -220,6 +221,9 @@ var ControlsOptionsManager = exports.default = /*#__PURE__*/function () {
|
|
|
220
221
|
key: "setControls",
|
|
221
222
|
value: function setControls(setting) {
|
|
222
223
|
var _this2 = this;
|
|
224
|
+
if (!this.locusUrl) {
|
|
225
|
+
return _promise.default.reject(new _parameter.default('The associated locusUrl for setControls() must be defined.'));
|
|
226
|
+
}
|
|
223
227
|
_loggerProxy.default.logger.log("ControlsOptionsManager:index#setControls --> ".concat((0, _stringify.default)(setting)));
|
|
224
228
|
var body = {};
|
|
225
229
|
var error;
|
|
@@ -228,7 +232,7 @@ var ControlsOptionsManager = exports.default = /*#__PURE__*/function () {
|
|
|
228
232
|
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
229
233
|
key = _ref3[0],
|
|
230
234
|
value = _ref3[1];
|
|
231
|
-
if (!shouldSkipCheckToMergeBody && value !== undefined && !(_util.default !== null && _util.default !== void 0 && _util.default["".concat(value ?
|
|
235
|
+
if (!shouldSkipCheckToMergeBody && value !== undefined && !(_util.default !== null && _util.default !== void 0 && _util.default["".concat(value ? _constants.CAN_SET : _constants.CAN_UNSET).concat(key)](_this2.displayHints))) {
|
|
232
236
|
error = new _permission.default("".concat(key, " [").concat(value, "] not allowed, due to moderator property."));
|
|
233
237
|
}
|
|
234
238
|
if (error) {
|
|
@@ -245,7 +249,7 @@ var ControlsOptionsManager = exports.default = /*#__PURE__*/function () {
|
|
|
245
249
|
body.audio = body.audio ? _objectSpread(_objectSpread({}, body.audio), {}, (0, _defineProperty2.default)({}, (0, _lodash.camelCase)(key), value)) : (0, _defineProperty2.default)({}, (0, _lodash.camelCase)(key), value);
|
|
246
250
|
body.audio[(0, _lodash.camelCase)(key)] = value;
|
|
247
251
|
} else {
|
|
248
|
-
body[(0, _lodash.camelCase)(key)] = (0, _defineProperty2.default)({},
|
|
252
|
+
body[(0, _lodash.camelCase)(key)] = (0, _defineProperty2.default)({}, _constants.ENABLED, value);
|
|
249
253
|
}
|
|
250
254
|
break;
|
|
251
255
|
case _enums.Setting.roles:
|
|
@@ -260,16 +264,14 @@ var ControlsOptionsManager = exports.default = /*#__PURE__*/function () {
|
|
|
260
264
|
if (error) {
|
|
261
265
|
return _promise.default.reject(error);
|
|
262
266
|
}
|
|
263
|
-
var
|
|
264
|
-
|
|
265
|
-
|
|
267
|
+
var requestParams = _util.default.getControlsRequestParams({
|
|
268
|
+
body: body,
|
|
269
|
+
locusUrl: this.locusUrl,
|
|
270
|
+
mainLocusUrl: this.mainLocusUrl
|
|
271
|
+
});
|
|
266
272
|
|
|
267
273
|
// @ts-ignore
|
|
268
|
-
return this.request.request(
|
|
269
|
-
uri: "".concat(this.mainLocusUrl || this.locusUrl, "/").concat(_constants.CONTROLS),
|
|
270
|
-
body: _objectSpread(_objectSpread({}, body), extraBody),
|
|
271
|
-
method: _constants.HTTP_VERBS.PATCH
|
|
272
|
-
});
|
|
274
|
+
return this.request.request(requestParams);
|
|
273
275
|
}
|
|
274
276
|
|
|
275
277
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_lodash","require","_permission","_interopRequireDefault","_constants","_loggerProxy","_enums","_util","_constants2","ownKeys","e","r","t","_Object$keys2","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","ControlsOptionsManager","exports","request","options","_classCallCheck2","initialize","set","_createClass2","key","value","extract","setLocusUrl","url","isMainLocus","locusUrl","mainLocusUrl","setDisplayHints","hints","displayHints","getLocusUrl","getDisplayHints","update","_this","_len","controls","Array","_key","payloads","map","control","_keys","Control","includes","scope","Error","concat","Util","canUpdate","PermissionError","properties","reduce","previous","payload","extraBody","authorizingLocusUrl","then","uri","CONTROLS","body","method","HTTP_VERBS","PATCH","_promise","resolve","setControls","setting","_this2","LoggerProxy","logger","log","_stringify","error","shouldSkipCheckToMergeBody","_entries","_ref2","_ref3","_slicedToArray2","undefined","CAN_SET","CAN_UNSET","Setting","muted","audio","camelCase","disallowUnmute","muteOnEntry","ENABLED","roles","_isArray","reject","setMuteOnEntry","enabled","setDisallowUnmute","setMuteAll","mutedEnabled","disallowUnmuteEnabled","muteOnEntryEnabled"],"sources":["index.ts"],"sourcesContent":["import {camelCase} from 'lodash';\nimport PermissionError from '../common/errors/permission';\nimport {CONTROLS, HTTP_VERBS} from '../constants';\nimport MeetingRequest from '../meeting/request';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {Control, Setting} from './enums';\nimport {ControlConfig} from './types';\nimport Util from './util';\nimport {CAN_SET, CAN_UNSET, ENABLED} from './constants';\n\n/**\n * docs\n * https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html\n * https://confluence-eng-gpk2.cisco.com/conf/display/LOCUS/Hard+Mute+and+Audio+Privacy#HardMuteandAudioPrivacy-SelfMuteonEntry\n * https://confluence-eng-gpk2.cisco.com/conf/pages/viewpage.action?spaceKey=UC&title=WEBEX-124454%3A+UCF%3A+Hard+mute+support+for+Teams+joining+Webex+meeting\n * https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-180867\n * https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-393351\n */\n\n/**\n * @description ControlsOptionsManager is responsible for handling the behavior of participant controls when somebody joins a meeting\n * @export\n * @private\n * @class Recording\n */\nexport default class ControlsOptionsManager {\n /**\n * @instance\n * @type {MeetingRequest}\n * @private\n * @memberof ControlsOptionsManager\n */\n private request: MeetingRequest;\n\n /**\n * @instance\n * @type {Array}\n * @private\n * @memberof ControlsOptionsManager\n */\n private displayHints: Array<string> = [];\n\n /**\n * @instance\n * @type {string}\n * @private\n * @memberof ControlsOptionsManager\n */\n private locusUrl: string;\n\n /**\n * @instance\n * @type {string}\n * @private\n * @memberof ControlsOptionsManager\n */\n private mainLocusUrl: string;\n\n /**\n * @param {MeetingRequest} request\n * @param {Object} options\n * @constructor\n * @memberof ControlsOptionsManager\n */\n constructor(\n request: MeetingRequest,\n options?: {\n locusUrl: string;\n displayHints?: Array<string>;\n }\n ) {\n this.initialize(request);\n this.set(options);\n }\n\n /**\n * @param {MeetingRequest} request\n * @returns {void}\n * @private\n * @memberof ControlsOptionsManager\n */\n private initialize(request: MeetingRequest) {\n this.request = request;\n }\n\n /**\n * @param {Object} options\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public set(options?: {locusUrl: string; displayHints?: Array<string>}) {\n this.extract(options);\n }\n\n /**\n * @param {string} url\n * @param {boolean} isMainLocus\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public setLocusUrl(url: string, isMainLocus?: boolean) {\n this.locusUrl = url;\n if (isMainLocus) {\n this.mainLocusUrl = url;\n }\n }\n\n /**\n * @param {Array} hints\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public setDisplayHints(hints: Array<string>) {\n this.displayHints = hints;\n }\n\n /**\n * @returns {string}\n * @public\n * @memberof ControlsOptionsManager\n */\n public getLocusUrl() {\n return this.locusUrl;\n }\n\n /**\n * @returns {Array}\n * @public\n * @memberof ControlsOptionsManager\n */\n public getDisplayHints() {\n return this.displayHints;\n }\n\n /**\n * @param {Object} options\n * @returns {void}\n * @private\n * @memberof ControlsOptionsManager\n */\n private extract(options?: {locusUrl: string; displayHints?: Array<string>}) {\n this.setDisplayHints(options?.displayHints);\n this.setLocusUrl(options?.locusUrl);\n }\n\n /**\n * Set controls for this meeting.\n *\n * @param {Array<ControlConfig>} controls - Spread Array of ControlConfigs\n * @returns {Promise<Array<any>>}- Promise resolving if the request was successful.\n */\n public update(...controls: Array<ControlConfig>) {\n const payloads = controls.map((control) => {\n if (!Object.keys(Control).includes(control.scope)) {\n throw new Error(\n `updating meeting control scope \"${control.scope}\" is not a supported scope`\n );\n }\n\n if (!Util.canUpdate(control, this.displayHints)) {\n throw new PermissionError(\n `updating meeting control scope \"${control.scope}\" not allowed, due to moderator property.`\n );\n }\n\n return {\n [control.scope]: control.properties,\n };\n });\n\n return payloads.reduce((previous, payload) => {\n const extraBody =\n this.mainLocusUrl && this.mainLocusUrl !== this.locusUrl\n ? {authorizingLocusUrl: this.locusUrl}\n : {};\n\n return previous.then(() =>\n // @ts-ignore\n this.request.request({\n uri: `${this.mainLocusUrl || this.locusUrl}/${CONTROLS}`,\n body: {...payload, ...extraBody},\n method: HTTP_VERBS.PATCH,\n })\n );\n }, Promise.resolve());\n }\n\n /**\n * @param {Setting} setting\n * @private\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n private setControls(setting: {\n [Setting.muted]?: boolean;\n [Setting.disallowUnmute]?: boolean;\n [Setting.muteOnEntry]?: boolean;\n [Setting.roles]?: Array<string>;\n }): Promise<any> {\n LoggerProxy.logger.log(\n `ControlsOptionsManager:index#setControls --> ${JSON.stringify(setting)}`\n );\n\n const body: Record<string, any> = {};\n let error: PermissionError;\n\n let shouldSkipCheckToMergeBody = false;\n\n Object.entries(setting).forEach(([key, value]) => {\n if (\n !shouldSkipCheckToMergeBody &&\n value !== undefined &&\n !Util?.[`${value ? CAN_SET : CAN_UNSET}${key}`](this.displayHints)\n ) {\n error = new PermissionError(`${key} [${value}] not allowed, due to moderator property.`);\n }\n\n if (error) {\n return;\n }\n\n switch (key) {\n case Setting.muted:\n shouldSkipCheckToMergeBody = true;\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n break;\n\n case Setting.disallowUnmute:\n case Setting.muteOnEntry:\n if (Object.keys(setting).includes(Setting.muted)) {\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n body.audio[camelCase(key)] = value;\n } else {\n body[camelCase(key)] = {[ENABLED]: value};\n }\n break;\n\n case Setting.roles:\n if (Array.isArray(value)) {\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n }\n break;\n\n default:\n error = new PermissionError(`${key} [${value}] not allowed, due to moderator property.`);\n }\n });\n\n if (error) {\n return Promise.reject(error);\n }\n const extraBody =\n this.mainLocusUrl && this.mainLocusUrl !== this.locusUrl\n ? {authorizingLocusUrl: this.locusUrl}\n : {};\n\n // @ts-ignore\n return this.request.request({\n uri: `${this.mainLocusUrl || this.locusUrl}/${CONTROLS}`,\n body: {...body, ...extraBody},\n method: HTTP_VERBS.PATCH,\n });\n }\n\n /**\n * @public\n * @param {boolean} enabled\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setMuteOnEntry(enabled: boolean): Promise<any> {\n return this.setControls({[Setting.muteOnEntry]: enabled});\n }\n\n /**\n * @public\n * @param {boolean} enabled\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setDisallowUnmute(enabled: boolean): Promise<any> {\n return this.setControls({[Setting.disallowUnmute]: enabled});\n }\n\n /**\n * @public\n * @param {boolean} mutedEnabled\n * @param {boolean} disallowUnmuteEnabled\n * @param {boolean} muteOnEntryEnabled\n * @param {array} roles which should be muted\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setMuteAll(\n mutedEnabled: boolean,\n disallowUnmuteEnabled: boolean,\n muteOnEntryEnabled: boolean,\n roles: Array<string>\n ): Promise<any> {\n return this.setControls({\n [Setting.muted]: mutedEnabled,\n [Setting.disallowUnmute]: disallowUnmuteEnabled,\n [Setting.muteOnEntry]: muteOnEntryEnabled,\n [Setting.roles]: roles,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAAwD,SAAAQ,QAAAC,CAAA,EAAAC,CA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;AACA;EALE;IAAA3C,GAAA;IAAAC,KAAA,EAMA,SAAOuE,cAAcA,CAACC,OAAgB,EAAgB;MACpD,OAAO,IAAI,CAAC3B,WAAW,KAAA3D,gBAAA,CAAAC,OAAA,MAAG0E,cAAO,CAACK,WAAW,EAAGM,OAAO,CAAC,CAAC;IAC3D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAzE,GAAA;IAAAC,KAAA,EAMA,SAAOyE,iBAAiBA,CAACD,OAAgB,EAAgB;MACvD,OAAO,IAAI,CAAC3B,WAAW,KAAA3D,gBAAA,CAAAC,OAAA,MAAG0E,cAAO,CAACI,cAAc,EAAGO,OAAO,CAAC,CAAC;IAC9D;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EARE;IAAAzE,GAAA;IAAAC,KAAA,EASA,SAAO0E,UAAUA,CACfC,YAAqB,EACrBC,qBAA8B,EAC9BC,kBAA2B,EAC3BT,KAAoB,EACN;MACd,OAAO,IAAI,CAACvB,WAAW,KAAA3D,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MACpB0E,cAAO,CAACC,KAAK,EAAGa,YAAY,GAC5Bd,cAAO,CAACI,cAAc,EAAGW,qBAAqB,GAC9Cf,cAAO,CAACK,WAAW,EAAGW,kBAAkB,GACxChB,cAAO,CAACO,KAAK,EAAGA,KAAK,CACvB,CAAC;IACJ;EAAC;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_lodash","require","_parameter","_interopRequireDefault","_permission","_loggerProxy","_enums","_util","_constants","ownKeys","e","r","t","_Object$keys2","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","ControlsOptionsManager","exports","request","options","_classCallCheck2","initialize","set","_createClass2","key","value","extract","setLocusUrl","url","isMainLocus","locusUrl","mainLocusUrl","setDisplayHints","hints","displayHints","getLocusUrl","getDisplayHints","update","_this","_promise","reject","ParameterError","_len","controls","Array","_key","payloads","map","control","_keys","Control","includes","scope","Error","concat","Util","canUpdate","PermissionError","properties","reduce","previous","payload","requestParams","getControlsRequestParams","body","then","resolve","setControls","setting","_this2","LoggerProxy","logger","log","_stringify","error","shouldSkipCheckToMergeBody","_entries","_ref2","_ref3","_slicedToArray2","undefined","CAN_SET","CAN_UNSET","Setting","muted","audio","camelCase","disallowUnmute","muteOnEntry","ENABLED","roles","_isArray","setMuteOnEntry","enabled","setDisallowUnmute","setMuteAll","mutedEnabled","disallowUnmuteEnabled","muteOnEntryEnabled"],"sources":["index.ts"],"sourcesContent":["import {camelCase} from 'lodash';\nimport ParameterError from '../common/errors/parameter';\nimport PermissionError from '../common/errors/permission';\nimport MeetingRequest from '../meeting/request';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {Control, Setting} from './enums';\nimport {ControlConfig} from './types';\nimport Util from './util';\nimport {CAN_SET, CAN_UNSET, ENABLED} from './constants';\n\n/**\n * docs\n * https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html\n * https://confluence-eng-gpk2.cisco.com/conf/display/LOCUS/Hard+Mute+and+Audio+Privacy#HardMuteandAudioPrivacy-SelfMuteonEntry\n * https://confluence-eng-gpk2.cisco.com/conf/pages/viewpage.action?spaceKey=UC&title=WEBEX-124454%3A+UCF%3A+Hard+mute+support+for+Teams+joining+Webex+meeting\n * https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-180867\n * https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-393351\n */\n\n/**\n * @description ControlsOptionsManager is responsible for handling the behavior of participant controls when somebody joins a meeting\n * @export\n * @private\n * @class Recording\n */\nexport default class ControlsOptionsManager {\n /**\n * @instance\n * @type {MeetingRequest}\n * @private\n * @memberof ControlsOptionsManager\n */\n private request: MeetingRequest;\n\n /**\n * @instance\n * @type {Array}\n * @private\n * @memberof ControlsOptionsManager\n */\n private displayHints: Array<string> = [];\n\n /**\n * @instance\n * @type {string}\n * @private\n * @memberof ControlsOptionsManager\n */\n private locusUrl: string;\n\n /**\n * @instance\n * @type {string}\n * @private\n * @memberof ControlsOptionsManager\n */\n private mainLocusUrl: string;\n\n /**\n * @param {MeetingRequest} request\n * @param {Object} options\n * @constructor\n * @memberof ControlsOptionsManager\n */\n constructor(\n request: MeetingRequest,\n options?: {\n locusUrl: string;\n displayHints?: Array<string>;\n }\n ) {\n this.initialize(request);\n this.set(options);\n }\n\n /**\n * @param {MeetingRequest} request\n * @returns {void}\n * @private\n * @memberof ControlsOptionsManager\n */\n private initialize(request: MeetingRequest) {\n this.request = request;\n }\n\n /**\n * @param {Object} options\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public set(options?: {locusUrl: string; displayHints?: Array<string>}) {\n this.extract(options);\n }\n\n /**\n * @param {string} url\n * @param {boolean} isMainLocus\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public setLocusUrl(url: string, isMainLocus?: boolean) {\n this.locusUrl = url;\n if (isMainLocus) {\n this.mainLocusUrl = url;\n }\n }\n\n /**\n * @param {Array} hints\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public setDisplayHints(hints: Array<string>) {\n this.displayHints = hints;\n }\n\n /**\n * @returns {string}\n * @public\n * @memberof ControlsOptionsManager\n */\n public getLocusUrl() {\n return this.locusUrl;\n }\n\n /**\n * @returns {Array}\n * @public\n * @memberof ControlsOptionsManager\n */\n public getDisplayHints() {\n return this.displayHints;\n }\n\n /**\n * @param {Object} options\n * @returns {void}\n * @private\n * @memberof ControlsOptionsManager\n */\n private extract(options?: {locusUrl: string; displayHints?: Array<string>}) {\n this.setDisplayHints(options?.displayHints);\n this.setLocusUrl(options?.locusUrl);\n }\n\n /**\n * Set controls for this meeting.\n *\n * @param {Array<ControlConfig>} controls - Spread Array of ControlConfigs\n * @returns {Promise<Array<any>>}- Promise resolving if the request was successful.\n */\n public update(...controls: Array<ControlConfig>) {\n if (!this.locusUrl) {\n return Promise.reject(\n new ParameterError('The associated locusUrl for update() controls must be defined.')\n );\n }\n\n const payloads = controls.map((control) => {\n if (!Object.keys(Control).includes(control.scope)) {\n throw new Error(\n `updating meeting control scope \"${control.scope}\" is not a supported scope`\n );\n }\n\n if (!Util.canUpdate(control, this.displayHints)) {\n throw new PermissionError(\n `updating meeting control scope \"${control.scope}\" not allowed, due to moderator property.`\n );\n }\n\n return {\n [control.scope]: control.properties,\n };\n });\n\n return payloads.reduce((previous, payload) => {\n const requestParams = Util.getControlsRequestParams({\n body: payload,\n locusUrl: this.locusUrl,\n mainLocusUrl: this.mainLocusUrl,\n });\n\n return previous.then(() =>\n // @ts-ignore\n this.request.request(requestParams)\n );\n }, Promise.resolve());\n }\n\n /**\n * @param {Setting} setting\n * @private\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n private setControls(setting: {\n [Setting.muted]?: boolean;\n [Setting.disallowUnmute]?: boolean;\n [Setting.muteOnEntry]?: boolean;\n [Setting.roles]?: Array<string>;\n }): Promise<any> {\n if (!this.locusUrl) {\n return Promise.reject(\n new ParameterError('The associated locusUrl for setControls() must be defined.')\n );\n }\n\n LoggerProxy.logger.log(\n `ControlsOptionsManager:index#setControls --> ${JSON.stringify(setting)}`\n );\n\n const body: Record<string, any> = {};\n let error: PermissionError;\n\n let shouldSkipCheckToMergeBody = false;\n\n Object.entries(setting).forEach(([key, value]) => {\n if (\n !shouldSkipCheckToMergeBody &&\n value !== undefined &&\n !Util?.[`${value ? CAN_SET : CAN_UNSET}${key}`](this.displayHints)\n ) {\n error = new PermissionError(`${key} [${value}] not allowed, due to moderator property.`);\n }\n\n if (error) {\n return;\n }\n\n switch (key) {\n case Setting.muted:\n shouldSkipCheckToMergeBody = true;\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n break;\n\n case Setting.disallowUnmute:\n case Setting.muteOnEntry:\n if (Object.keys(setting).includes(Setting.muted)) {\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n body.audio[camelCase(key)] = value;\n } else {\n body[camelCase(key)] = {[ENABLED]: value};\n }\n break;\n\n case Setting.roles:\n if (Array.isArray(value)) {\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n }\n break;\n\n default:\n error = new PermissionError(`${key} [${value}] not allowed, due to moderator property.`);\n }\n });\n\n if (error) {\n return Promise.reject(error);\n }\n\n const requestParams = Util.getControlsRequestParams({\n body,\n locusUrl: this.locusUrl,\n mainLocusUrl: this.mainLocusUrl,\n });\n\n // @ts-ignore\n return this.request.request(requestParams);\n }\n\n /**\n * @public\n * @param {boolean} enabled\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setMuteOnEntry(enabled: boolean): Promise<any> {\n return this.setControls({[Setting.muteOnEntry]: enabled});\n }\n\n /**\n * @public\n * @param {boolean} enabled\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setDisallowUnmute(enabled: boolean): Promise<any> {\n return this.setControls({[Setting.disallowUnmute]: enabled});\n }\n\n /**\n * @public\n * @param {boolean} mutedEnabled\n * @param {boolean} disallowUnmuteEnabled\n * @param {boolean} muteOnEntryEnabled\n * @param {array} roles which should be muted\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setMuteAll(\n mutedEnabled: boolean,\n disallowUnmuteEnabled: boolean,\n muteOnEntryEnabled: boolean,\n roles: Array<string>\n ): Promise<any> {\n return this.setControls({\n [Setting.muted]: mutedEnabled,\n [Setting.disallowUnmute]: disallowUnmuteEnabled,\n [Setting.muteOnEntry]: muteOnEntryEnabled,\n [Setting.roles]: roles,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAA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F;MACA,OAAO,IAAI,CAACb,OAAO,CAACA,OAAO,CAAC4C,aAAa,CAAC;IAC5C;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAtC,GAAA;IAAAC,KAAA,EAMA,SAAOmE,cAAcA,CAACC,OAAgB,EAAgB;MACpD,OAAO,IAAI,CAAC1B,WAAW,KAAAxD,gBAAA,CAAAC,OAAA,MAAGuE,cAAO,CAACK,WAAW,EAAGK,OAAO,CAAC,CAAC;IAC3D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAArE,GAAA;IAAAC,KAAA,EAMA,SAAOqE,iBAAiBA,CAACD,OAAgB,EAAgB;MACvD,OAAO,IAAI,CAAC1B,WAAW,KAAAxD,gBAAA,CAAAC,OAAA,MAAGuE,cAAO,CAACI,cAAc,EAAGM,OAAO,CAAC,CAAC;IAC9D;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EARE;IAAArE,GAAA;IAAAC,KAAA,EASA,SAAOsE,UAAUA,CACfC,YAAqB,EACrBC,qBAA8B,EAC9BC,kBAA2B,EAC3BR,KAAoB,EACN;MACd,OAAO,IAAI,CAACvB,WAAW,KAAAxD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MACpBuE,cAAO,CAACC,KAAK,EAAGY,YAAY,GAC5Bb,cAAO,CAACI,cAAc,EAAGU,qBAAqB,GAC9Cd,cAAO,CAACK,WAAW,EAAGU,kBAAkB,GACxCf,cAAO,CAACO,KAAK,EAAGA,KAAK,CACvB,CAAC;IACJ;EAAC;AAAA","ignoreList":[]}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _Object$keys2 = require("@babel/runtime-corejs2/core-js/object/keys");
|
|
4
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
|
|
5
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
6
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
7
|
+
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
3
8
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
9
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
5
10
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
11
|
value: true
|
|
7
12
|
});
|
|
8
13
|
exports.default = void 0;
|
|
14
|
+
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
9
16
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
10
17
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
11
18
|
var _constants = require("../constants");
|
|
12
19
|
var _enums = require("./enums");
|
|
20
|
+
var _constants2 = require("./constants");
|
|
21
|
+
function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
23
|
/**
|
|
14
24
|
* The Controls Options Manager utilities
|
|
15
25
|
*
|
|
@@ -401,6 +411,87 @@ var Utils = /*#__PURE__*/function () {
|
|
|
401
411
|
}
|
|
402
412
|
return determinant;
|
|
403
413
|
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Check if all body keys represent audio controls.
|
|
417
|
+
*
|
|
418
|
+
* @param {Record<string, any>} body - The request body to inspect.
|
|
419
|
+
* @returns {boolean} - True if every key in the body is an audio control key.
|
|
420
|
+
*/
|
|
421
|
+
}, {
|
|
422
|
+
key: "isAudioControl",
|
|
423
|
+
value: function isAudioControl(body) {
|
|
424
|
+
return (0, _keys.default)(body).every(function (key) {
|
|
425
|
+
return _constants2.AUDIO_CONTROL_BODY_KEYS.has(key);
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Check if the current locus URL differs from the main locus URL,
|
|
431
|
+
* indicating a breakout session.
|
|
432
|
+
*
|
|
433
|
+
* @param {string} locusUrl - The current locus URL.
|
|
434
|
+
* @param {string} [mainLocusUrl] - The main locus URL.
|
|
435
|
+
* @returns {boolean} - True if in a breakout session.
|
|
436
|
+
*/
|
|
437
|
+
}, {
|
|
438
|
+
key: "isBreakoutLocusUrl",
|
|
439
|
+
value: function isBreakoutLocusUrl(locusUrl, mainLocusUrl) {
|
|
440
|
+
return Boolean(mainLocusUrl) && mainLocusUrl !== locusUrl;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Resolve the target URL and extra body fields for a controls request,
|
|
445
|
+
* handling breakout session routing. Note: This is a pure computation function.
|
|
446
|
+
* It does not validate that locusUrl is
|
|
447
|
+
* defined. Callers must guard against falsy locusUrl before
|
|
448
|
+
* invoking this function.
|
|
449
|
+
* Mixed audio and non-audio keys in a single body (e.g., {audio: {...},
|
|
450
|
+
* raiseHand: {...}}) are treated as non-audio and routed to mainLocusUrl with
|
|
451
|
+
* authorizingLocusUrl. This means the audio portion would go through unsupported
|
|
452
|
+
* cross-locus authorization. Callers must not produce mixed payloads — update()
|
|
453
|
+
* sends each control scope as a separate request, and setControls() only handles
|
|
454
|
+
* audio-related settings.
|
|
455
|
+
*
|
|
456
|
+
* The authorizingLocusUrl mechanism on PATCH /loci/{lid}/controls is not supported
|
|
457
|
+
* for audio control updates (mute/unmute, muteOnEntry, disallowUnmute).
|
|
458
|
+
* Audio controls are not wired into the cross-locus GraphQL authorization path that
|
|
459
|
+
* other control types (raiseHand, viewParticipantList, admit, reactions, etc.) use.
|
|
460
|
+
* Specifically, the GraphQL authorization layer does not recognize audio as a control
|
|
461
|
+
* type eligible for remote locus authorization.
|
|
462
|
+
* This means authorizingLocusUrl is effectively ignored for audio controls and the
|
|
463
|
+
* server evaluates the request against the target locus only, where the host may not
|
|
464
|
+
* be currently joined.
|
|
465
|
+
* Audio control updates must be sent directly to the locus the user is currently in.
|
|
466
|
+
* If the host is in a breakout and wants to mute participants in that breakout, the
|
|
467
|
+
* request should target the breakout locus URL directly, not the main session locus
|
|
468
|
+
* with authorizingLocusUrl.
|
|
469
|
+
* Meeting-wide audio control actions (e.g., muting panelists across all breakouts
|
|
470
|
+
* from a single request) are not currently supported through this mechanism.
|
|
471
|
+
*
|
|
472
|
+
* @param {object} options
|
|
473
|
+
* @param {Record<string, any>} options.body - The request body.
|
|
474
|
+
* @param {string} options.locusUrl - The current locus URL. Must be defined (callers must validate).
|
|
475
|
+
* @param {string} [options.mainLocusUrl] - The main locus URL.
|
|
476
|
+
* @returns {{ uri: string, body: Record<string, any>, method: string }}
|
|
477
|
+
*/
|
|
478
|
+
}, {
|
|
479
|
+
key: "getControlsRequestParams",
|
|
480
|
+
value: function getControlsRequestParams(options) {
|
|
481
|
+
var body = options.body,
|
|
482
|
+
locusUrl = options.locusUrl,
|
|
483
|
+
mainLocusUrl = options.mainLocusUrl;
|
|
484
|
+
var isAudio = Utils.isAudioControl(body);
|
|
485
|
+
var inBreakout = Utils.isBreakoutLocusUrl(locusUrl, mainLocusUrl);
|
|
486
|
+
var targetUrl = inBreakout && !isAudio ? mainLocusUrl : locusUrl;
|
|
487
|
+
return {
|
|
488
|
+
uri: "".concat(targetUrl, "/").concat(_constants.CONTROLS),
|
|
489
|
+
body: inBreakout && !isAudio ? _objectSpread(_objectSpread({}, body), {}, {
|
|
490
|
+
authorizingLocusUrl: locusUrl
|
|
491
|
+
}) : body,
|
|
492
|
+
method: _constants.HTTP_VERBS.PATCH
|
|
493
|
+
};
|
|
494
|
+
}
|
|
404
495
|
}]);
|
|
405
496
|
}();
|
|
406
497
|
var _default = exports.default = Utils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","_enums","Utils","_classCallCheck2","default","_createClass2","key","value","canSetMuteOnEntry","displayHints","includes","DISPLAY_HINTS","ENABLE_MUTE_ON_ENTRY","canSetDisallowUnmute","ENABLE_HARD_MUTE","canUnsetMuteOnEntry","DISABLE_MUTE_ON_ENTRY","canUnsetDisallowUnmute","DISABLE_HARD_MUTE","canSetMuted","MUTE_ALL","canUnsetMuted","UNMUTE_ALL","hasHints","config","requiredHints","every","hint","hasPolicies","requiredPolicies","_config$policies","policies","canUpdateAudio","control","properties","muted","push","disallowUnmute","muteOnEntry","canUpdateRaiseHand","enabled","ENABLE_RAISE_HAND","DISABLE_RAISE_HAND","canUpdateReactions","showDisplayNameWithReactions","undefined","ENABLE_SHOW_DISPLAY_NAME","DISABLE_SHOW_DISPLAY_NAME","ENABLE_REACTIONS","DISABLE_REACTIONS","canUpdateShareControl","SHARE_CONTROL","canUpdateViewTheParticipantsList","ENABLE_VIEW_THE_PARTICIPANT_LIST","DISABLE_VIEW_THE_PARTICIPANT_LIST","panelistEnabled","ENABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST","DISABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST","attendeeCount","ENABLE_SHOW_ATTENDEE_COUNT","DISABLE_SHOW_ATTENDEE_COUNT","canUpdateVideo","ENABLE_VIDEO","DISABLE_VIDEO","canUpdateAnnotation","ENABLE_ANNOTATION_MEETING_OPTION","DISABLE_ANNOTATION_MEETING_OPTION","canUpdateRemoteDesktopControl","ENABLE_RDC_MEETING_OPTION","DISABLE_RDC_MEETING_OPTION","canUpdatePollingQA","ENABLE_ATTENDEE_START_POLLING_QA","DISABLE_ATTENDEE_START_POLLING_QA","canUpdate","determinant","scope","Control","audio","raiseHand","reactions","shareControl","video","viewTheParticipantList","annotation","rdc","pollingQA","_default","exports"],"sources":["util.ts"],"sourcesContent":["import {DISPLAY_HINTS} from '../constants';\nimport {Control} from './enums';\nimport {\n ControlConfig,\n AudioProperties,\n RaiseHandProperties,\n ReactionsProperties,\n ViewTheParticipantListProperties,\n VideoProperties,\n type RemoteDesktopControlProperties,\n type AnnotationProperties,\n type PollingQAProperties,\n} from './types';\n\n/**\n * The Controls Options Manager utilities\n *\n * @internal\n */\nclass Utils {\n /**\n * Validate if enabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if allowing unmuting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n\n /**\n * Validate if disabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if enabling muting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n\n /**\n * Validate if muting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.MUTE_ALL);\n }\n\n /**\n * Validate if unmuting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.UNMUTE_ALL);\n }\n\n /**\n * Validate an array of hints are allowed based on a full collection of hints.\n *\n * @param {Object} config - Configuration Object.\n * @param {Array<string>} config.requiredHints - Hints required for validation.\n * @param {Array<string>} config.displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static hasHints(config: {requiredHints: Array<string>; displayHints: Array<string>}) {\n const {requiredHints, displayHints} = config;\n\n return requiredHints.every((hint) => displayHints.includes(hint));\n }\n\n /**\n * Validate that the self policy object contains the required policies.\n *\n * @param {Object} config - Configuration Object.\n * @param {Array<string>} config.requiredPolicies - Policies required for validation.\n * @param {Array<string>} config.policies - All available policies.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static hasPolicies(config: {requiredPolicies: Array<string>; policies: Array<string>}) {\n const {requiredPolicies, policies = {}} = config;\n\n return requiredPolicies.every((hint) => policies[hint]);\n }\n\n /**\n * Validate if an audio-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<AudioProperties>} control - Audio control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateAudio(\n control: ControlConfig<AudioProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.muted === true) {\n requiredHints.push(DISPLAY_HINTS.MUTE_ALL);\n }\n if (control.properties.muted === false) {\n requiredHints.push(DISPLAY_HINTS.UNMUTE_ALL);\n }\n if (control.properties.disallowUnmute === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n if (control.properties.disallowUnmute === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n if (control.properties.muteOnEntry === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n if (control.properties.muteOnEntry === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n public static canUpdateRaiseHand(\n control: ControlConfig<RaiseHandProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_RAISE_HAND);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_RAISE_HAND);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an reactions-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ReactionsProperties>} control - Reaction control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateReactions(\n control: ControlConfig<ReactionsProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n // This additional if statement avoids the display hint discrepency due to\n // the service blocking partial requests with this property only.\n if (control.properties.showDisplayNameWithReactions !== undefined) {\n if (control.properties.showDisplayNameWithReactions === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_SHOW_DISPLAY_NAME);\n }\n if (control.properties.showDisplayNameWithReactions === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_SHOW_DISPLAY_NAME);\n }\n } else {\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_REACTIONS);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_REACTIONS);\n }\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an share-control-scoped control is allowed to be sent to the service.\n *\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateShareControl(displayHints: Array<string>) {\n return Utils.hasHints({requiredHints: [DISPLAY_HINTS.SHARE_CONTROL], displayHints});\n }\n\n /**\n * Validate if an view-the-participants-list-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ViewTheParticipantListProperties>} control - View Participants List control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateViewTheParticipantsList(\n control: ControlConfig<ViewTheParticipantListProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n if (control.properties.panelistEnabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST);\n }\n if (control.properties.panelistEnabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST);\n }\n if (control.properties.attendeeCount === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_SHOW_ATTENDEE_COUNT);\n }\n if (control.properties.attendeeCount === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_SHOW_ATTENDEE_COUNT);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a video-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<VideoProperties>} control - Video control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateVideo(\n control: ControlConfig<VideoProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIDEO);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIDEO);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a annotation-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<AnnotationProperties>} control - Annotation control config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateAnnotation(\n control: ControlConfig<AnnotationProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_ANNOTATION_MEETING_OPTION);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_ANNOTATION_MEETING_OPTION);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a rdc-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<RemoteDesktopControlProperties>} control - Remote Desktop Control config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateRemoteDesktopControl(\n control: ControlConfig<RemoteDesktopControlProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_RDC_MEETING_OPTION);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_RDC_MEETING_OPTION);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a pollingQA-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<PollingQAProperties>} control - Polling QA config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdatePollingQA(\n control: ControlConfig<PollingQAProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_ATTENDEE_START_POLLING_QA);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_ATTENDEE_START_POLLING_QA);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate that a control can be sent to the service based on the provided\n * display hints.\n *\n * @param {ControlConfig} control - Control to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdate(control: ControlConfig, displayHints: Array<string>) {\n let determinant: boolean;\n\n switch (control.scope) {\n case Control.audio:\n determinant = Utils.canUpdateAudio(control as ControlConfig<AudioProperties>, displayHints);\n break;\n\n case Control.raiseHand:\n determinant = Utils.canUpdateRaiseHand(\n control as ControlConfig<RaiseHandProperties>,\n displayHints\n );\n break;\n\n case Control.reactions:\n determinant = Utils.canUpdateReactions(\n control as ControlConfig<ReactionsProperties>,\n displayHints\n );\n break;\n\n case Control.shareControl:\n determinant = Utils.canUpdateShareControl(displayHints);\n break;\n\n case Control.video:\n determinant = Utils.canUpdateVideo(control as ControlConfig<VideoProperties>, displayHints);\n break;\n\n case Control.viewTheParticipantList:\n determinant = Utils.canUpdateViewTheParticipantsList(\n control as ControlConfig<ViewTheParticipantListProperties>,\n displayHints\n );\n break;\n\n case Control.annotation:\n determinant = Utils.canUpdateAnnotation(\n control as ControlConfig<AnnotationProperties>,\n displayHints\n );\n break;\n\n case Control.rdc:\n determinant = Utils.canUpdateRemoteDesktopControl(\n control as ControlConfig<RemoteDesktopControlProperties>,\n displayHints\n );\n break;\n\n case Control.pollingQA:\n determinant = Utils.canUpdatePollingQA(\n control as ControlConfig<PollingQAProperties>,\n displayHints\n );\n break;\n\n default:\n determinant = false;\n }\n\n return determinant;\n }\n}\n\nexport default Utils;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAaA;AACA;AAC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ACPxB,YACF,CAAC;UACD;QAEF,KAAKmE,cAAO,CAACO,UAAU;UACrBT,WAAW,GAAGxE,KAAK,CAAC8D,mBAAmB,CACrC/B,OAAO,EACPxB,YACF,CAAC;UACD;QAEF,KAAKmE,cAAO,CAACQ,GAAG;UACdV,WAAW,GAAGxE,KAAK,CAACiE,6BAA6B,CAC/ClC,OAAO,EACPxB,YACF,CAAC;UACD;QAEF,KAAKmE,cAAO,CAACS,SAAS;UACpBX,WAAW,GAAGxE,KAAK,CAACoE,kBAAkB,CACpCrC,OAAO,EACPxB,YACF,CAAC;UACD;QAEF;UACEiE,WAAW,GAAG,KAAK;MACvB;MAEA,OAAOA,WAAW;IACpB;EAAC;AAAA;AAAA,IAAAY,QAAA,GAAAC,OAAA,CAAAnF,OAAA,GAGYF,KAAK","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_constants","require","_enums","_constants2","ownKeys","e","r","t","_Object$keys2","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","Utils","_classCallCheck2","_createClass2","key","value","canSetMuteOnEntry","displayHints","includes","DISPLAY_HINTS","ENABLE_MUTE_ON_ENTRY","canSetDisallowUnmute","ENABLE_HARD_MUTE","canUnsetMuteOnEntry","DISABLE_MUTE_ON_ENTRY","canUnsetDisallowUnmute","DISABLE_HARD_MUTE","canSetMuted","MUTE_ALL","canUnsetMuted","UNMUTE_ALL","hasHints","config","requiredHints","every","hint","hasPolicies","requiredPolicies","_config$policies","policies","canUpdateAudio","control","properties","muted","disallowUnmute","muteOnEntry","canUpdateRaiseHand","enabled","ENABLE_RAISE_HAND","DISABLE_RAISE_HAND","canUpdateReactions","showDisplayNameWithReactions","undefined","ENABLE_SHOW_DISPLAY_NAME","DISABLE_SHOW_DISPLAY_NAME","ENABLE_REACTIONS","DISABLE_REACTIONS","canUpdateShareControl","SHARE_CONTROL","canUpdateViewTheParticipantsList","ENABLE_VIEW_THE_PARTICIPANT_LIST","DISABLE_VIEW_THE_PARTICIPANT_LIST","panelistEnabled","ENABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST","DISABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST","attendeeCount","ENABLE_SHOW_ATTENDEE_COUNT","DISABLE_SHOW_ATTENDEE_COUNT","canUpdateVideo","ENABLE_VIDEO","DISABLE_VIDEO","canUpdateAnnotation","ENABLE_ANNOTATION_MEETING_OPTION","DISABLE_ANNOTATION_MEETING_OPTION","canUpdateRemoteDesktopControl","ENABLE_RDC_MEETING_OPTION","DISABLE_RDC_MEETING_OPTION","canUpdatePollingQA","ENABLE_ATTENDEE_START_POLLING_QA","DISABLE_ATTENDEE_START_POLLING_QA","canUpdate","determinant","scope","Control","audio","raiseHand","reactions","shareControl","video","viewTheParticipantList","annotation","rdc","pollingQA","isAudioControl","body","_keys","AUDIO_CONTROL_BODY_KEYS","has","isBreakoutLocusUrl","locusUrl","mainLocusUrl","Boolean","getControlsRequestParams","options","isAudio","inBreakout","targetUrl","uri","concat","CONTROLS","authorizingLocusUrl","method","HTTP_VERBS","PATCH","_default","exports"],"sources":["util.ts"],"sourcesContent":["import {CONTROLS, DISPLAY_HINTS, HTTP_VERBS} from '../constants';\nimport {Control} from './enums';\nimport {AUDIO_CONTROL_BODY_KEYS} from './constants';\nimport {\n ControlConfig,\n AudioProperties,\n RaiseHandProperties,\n ReactionsProperties,\n ViewTheParticipantListProperties,\n VideoProperties,\n type RemoteDesktopControlProperties,\n type AnnotationProperties,\n type PollingQAProperties,\n} from './types';\n\n/**\n * The Controls Options Manager utilities\n *\n * @internal\n */\nclass Utils {\n /**\n * Validate if enabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if allowing unmuting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n\n /**\n * Validate if disabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if enabling muting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n\n /**\n * Validate if muting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.MUTE_ALL);\n }\n\n /**\n * Validate if unmuting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.UNMUTE_ALL);\n }\n\n /**\n * Validate an array of hints are allowed based on a full collection of hints.\n *\n * @param {Object} config - Configuration Object.\n * @param {Array<string>} config.requiredHints - Hints required for validation.\n * @param {Array<string>} config.displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static hasHints(config: {requiredHints: Array<string>; displayHints: Array<string>}) {\n const {requiredHints, displayHints} = config;\n\n return requiredHints.every((hint) => displayHints.includes(hint));\n }\n\n /**\n * Validate that the self policy object contains the required policies.\n *\n * @param {Object} config - Configuration Object.\n * @param {Array<string>} config.requiredPolicies - Policies required for validation.\n * @param {Array<string>} config.policies - All available policies.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static hasPolicies(config: {requiredPolicies: Array<string>; policies: Array<string>}) {\n const {requiredPolicies, policies = {}} = config;\n\n return requiredPolicies.every((hint) => policies[hint]);\n }\n\n /**\n * Validate if an audio-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<AudioProperties>} control - Audio control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateAudio(\n control: ControlConfig<AudioProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.muted === true) {\n requiredHints.push(DISPLAY_HINTS.MUTE_ALL);\n }\n if (control.properties.muted === false) {\n requiredHints.push(DISPLAY_HINTS.UNMUTE_ALL);\n }\n if (control.properties.disallowUnmute === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n if (control.properties.disallowUnmute === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n if (control.properties.muteOnEntry === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n if (control.properties.muteOnEntry === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n public static canUpdateRaiseHand(\n control: ControlConfig<RaiseHandProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_RAISE_HAND);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_RAISE_HAND);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an reactions-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ReactionsProperties>} control - Reaction control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateReactions(\n control: ControlConfig<ReactionsProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n // This additional if statement avoids the display hint discrepency due to\n // the service blocking partial requests with this property only.\n if (control.properties.showDisplayNameWithReactions !== undefined) {\n if (control.properties.showDisplayNameWithReactions === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_SHOW_DISPLAY_NAME);\n }\n if (control.properties.showDisplayNameWithReactions === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_SHOW_DISPLAY_NAME);\n }\n } else {\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_REACTIONS);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_REACTIONS);\n }\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an share-control-scoped control is allowed to be sent to the service.\n *\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateShareControl(displayHints: Array<string>) {\n return Utils.hasHints({requiredHints: [DISPLAY_HINTS.SHARE_CONTROL], displayHints});\n }\n\n /**\n * Validate if an view-the-participants-list-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ViewTheParticipantListProperties>} control - View Participants List control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateViewTheParticipantsList(\n control: ControlConfig<ViewTheParticipantListProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n if (control.properties.panelistEnabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST);\n }\n if (control.properties.panelistEnabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST);\n }\n if (control.properties.attendeeCount === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_SHOW_ATTENDEE_COUNT);\n }\n if (control.properties.attendeeCount === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_SHOW_ATTENDEE_COUNT);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a video-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<VideoProperties>} control - Video control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateVideo(\n control: ControlConfig<VideoProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIDEO);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIDEO);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a annotation-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<AnnotationProperties>} control - Annotation control config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateAnnotation(\n control: ControlConfig<AnnotationProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_ANNOTATION_MEETING_OPTION);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_ANNOTATION_MEETING_OPTION);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a rdc-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<RemoteDesktopControlProperties>} control - Remote Desktop Control config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateRemoteDesktopControl(\n control: ControlConfig<RemoteDesktopControlProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_RDC_MEETING_OPTION);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_RDC_MEETING_OPTION);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a pollingQA-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<PollingQAProperties>} control - Polling QA config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdatePollingQA(\n control: ControlConfig<PollingQAProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_ATTENDEE_START_POLLING_QA);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_ATTENDEE_START_POLLING_QA);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate that a control can be sent to the service based on the provided\n * display hints.\n *\n * @param {ControlConfig} control - Control to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdate(control: ControlConfig, displayHints: Array<string>) {\n let determinant: boolean;\n\n switch (control.scope) {\n case Control.audio:\n determinant = Utils.canUpdateAudio(control as ControlConfig<AudioProperties>, displayHints);\n break;\n\n case Control.raiseHand:\n determinant = Utils.canUpdateRaiseHand(\n control as ControlConfig<RaiseHandProperties>,\n displayHints\n );\n break;\n\n case Control.reactions:\n determinant = Utils.canUpdateReactions(\n control as ControlConfig<ReactionsProperties>,\n displayHints\n );\n break;\n\n case Control.shareControl:\n determinant = Utils.canUpdateShareControl(displayHints);\n break;\n\n case Control.video:\n determinant = Utils.canUpdateVideo(control as ControlConfig<VideoProperties>, displayHints);\n break;\n\n case Control.viewTheParticipantList:\n determinant = Utils.canUpdateViewTheParticipantsList(\n control as ControlConfig<ViewTheParticipantListProperties>,\n displayHints\n );\n break;\n\n case Control.annotation:\n determinant = Utils.canUpdateAnnotation(\n control as ControlConfig<AnnotationProperties>,\n displayHints\n );\n break;\n\n case Control.rdc:\n determinant = Utils.canUpdateRemoteDesktopControl(\n control as ControlConfig<RemoteDesktopControlProperties>,\n displayHints\n );\n break;\n\n case Control.pollingQA:\n determinant = Utils.canUpdatePollingQA(\n control as ControlConfig<PollingQAProperties>,\n displayHints\n );\n break;\n\n default:\n determinant = false;\n }\n\n return determinant;\n }\n\n /**\n * Check if all body keys represent audio controls.\n *\n * @param {Record<string, any>} body - The request body to inspect.\n * @returns {boolean} - True if every key in the body is an audio control key.\n */\n public static isAudioControl(body: Record<string, any>): boolean {\n return Object.keys(body).every((key) => AUDIO_CONTROL_BODY_KEYS.has(key));\n }\n\n /**\n * Check if the current locus URL differs from the main locus URL,\n * indicating a breakout session.\n *\n * @param {string} locusUrl - The current locus URL.\n * @param {string} [mainLocusUrl] - The main locus URL.\n * @returns {boolean} - True if in a breakout session.\n */\n public static isBreakoutLocusUrl(locusUrl: string, mainLocusUrl?: string): boolean {\n return Boolean(mainLocusUrl) && mainLocusUrl !== locusUrl;\n }\n\n /**\n * Resolve the target URL and extra body fields for a controls request,\n * handling breakout session routing. Note: This is a pure computation function.\n * It does not validate that locusUrl is\n * defined. Callers must guard against falsy locusUrl before\n * invoking this function.\n * Mixed audio and non-audio keys in a single body (e.g., {audio: {...},\n * raiseHand: {...}}) are treated as non-audio and routed to mainLocusUrl with\n * authorizingLocusUrl. This means the audio portion would go through unsupported\n * cross-locus authorization. Callers must not produce mixed payloads — update()\n * sends each control scope as a separate request, and setControls() only handles\n * audio-related settings.\n *\n * The authorizingLocusUrl mechanism on PATCH /loci/{lid}/controls is not supported\n * for audio control updates (mute/unmute, muteOnEntry, disallowUnmute).\n * Audio controls are not wired into the cross-locus GraphQL authorization path that\n * other control types (raiseHand, viewParticipantList, admit, reactions, etc.) use.\n * Specifically, the GraphQL authorization layer does not recognize audio as a control\n * type eligible for remote locus authorization.\n * This means authorizingLocusUrl is effectively ignored for audio controls and the\n * server evaluates the request against the target locus only, where the host may not\n * be currently joined.\n * Audio control updates must be sent directly to the locus the user is currently in.\n * If the host is in a breakout and wants to mute participants in that breakout, the\n * request should target the breakout locus URL directly, not the main session locus\n * with authorizingLocusUrl.\n * Meeting-wide audio control actions (e.g., muting panelists across all breakouts\n * from a single request) are not currently supported through this mechanism.\n *\n * @param {object} options\n * @param {Record<string, any>} options.body - The request body.\n * @param {string} options.locusUrl - The current locus URL. Must be defined (callers must validate).\n * @param {string} [options.mainLocusUrl] - The main locus URL.\n * @returns {{ uri: string, body: Record<string, any>, method: string }}\n */\n public static getControlsRequestParams(options: {\n body: Record<string, any>;\n locusUrl: string;\n mainLocusUrl?: string;\n }): {\n uri: string;\n body: Record<string, any>;\n method: string;\n } {\n const {body, locusUrl, mainLocusUrl} = options;\n\n const isAudio = Utils.isAudioControl(body);\n const inBreakout = Utils.isBreakoutLocusUrl(locusUrl, mainLocusUrl);\n const targetUrl = inBreakout && !isAudio ? mainLocusUrl : locusUrl;\n\n return {\n uri: `${targetUrl}/${CONTROLS}`,\n body: inBreakout && !isAudio ? {...body, authorizingLocusUrl: locusUrl} : body,\n method: HTTP_VERBS.PATCH,\n };\n }\n}\n\nexport default Utils;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAoD,SAAAG,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,aAAA,CAAAH,CAAA,OAAAI,6BAAA,QAAAC,CAAA,GAAAD,6BAAA,CAAAJ,CAAA,GAAAC,CAAA,KAAAI,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAL,CAAA,WAAAM,gCA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