@webex/plugin-meetings 3.12.0-next.5 → 3.12.0-next.50
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/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/breakouts/breakout.js +6 -2
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +6 -3
- package/dist/constants.js.map +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 +38 -24
- 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/constants.js +10 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +593 -358
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +22 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +10 -1
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +4 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +277 -86
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/types.js +16 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/properties.js +1 -0
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +3 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +842 -521
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +19 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +199 -77
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +67 -5
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +3 -0
- package/dist/member/util.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +10 -0
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +61 -15
- package/dist/types/hashTree/utils.d.ts +11 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/locus-info/index.d.ts +46 -6
- package/dist/types/locus-info/types.d.ts +17 -1
- package/dist/types/media/properties.d.ts +1 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
- package/dist/types/meeting/index.d.ts +70 -1
- package/dist/types/meeting/util.d.ts +8 -0
- package/dist/types/meetings/index.d.ts +18 -1
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +1 -0
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/webinar/index.js +361 -235
- package/dist/webinar/index.js.map +1 -1
- package/package.json +22 -22
- package/src/aiEnableRequest/index.ts +16 -0
- package/src/breakouts/breakout.ts +2 -1
- package/src/config.ts +1 -0
- package/src/constants.ts +5 -1
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +47 -24
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTreeParser.ts +306 -160
- package/src/hashTree/utils.ts +17 -0
- package/src/index.ts +5 -0
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interpretation/index.ts +25 -8
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +276 -93
- package/src/locus-info/types.ts +19 -1
- package/src/media/properties.ts +1 -0
- package/src/meeting/in-meeting-actions.ts +4 -0
- package/src/meeting/index.ts +315 -26
- package/src/meeting/util.ts +20 -2
- package/src/meetings/index.ts +104 -43
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +80 -1
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +3 -0
- package/src/metrics/constants.ts +1 -0
- package/src/recording-controller/index.ts +1 -2
- package/src/webinar/index.ts +162 -21
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/breakouts/breakout.ts +7 -3
- package/test/unit/spec/controls-options-manager/index.js +140 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1294 -191
- package/test/unit/spec/hashTree/utils.ts +88 -1
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interpretation/index.ts +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +443 -81
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
- package/test/unit/spec/meeting/index.js +836 -41
- package/test/unit/spec/meeting/muteState.js +3 -0
- package/test/unit/spec/meeting/utils.js +33 -0
- package/test/unit/spec/meetings/index.js +275 -10
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +161 -0
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +24 -0
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/webinar/index.ts +141 -16
|
@@ -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,18 +197,13 @@ 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
|
-
return (
|
|
202
|
-
// @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
|
-
);
|
|
206
|
+
return _this.sendControlsRequest(requestParams);
|
|
209
207
|
});
|
|
210
208
|
}, _promise.default.resolve());
|
|
211
209
|
}
|
|
@@ -220,6 +218,9 @@ var ControlsOptionsManager = exports.default = /*#__PURE__*/function () {
|
|
|
220
218
|
key: "setControls",
|
|
221
219
|
value: function setControls(setting) {
|
|
222
220
|
var _this2 = this;
|
|
221
|
+
if (!this.locusUrl) {
|
|
222
|
+
return _promise.default.reject(new _parameter.default('The associated locusUrl for setControls() must be defined.'));
|
|
223
|
+
}
|
|
223
224
|
_loggerProxy.default.logger.log("ControlsOptionsManager:index#setControls --> ".concat((0, _stringify.default)(setting)));
|
|
224
225
|
var body = {};
|
|
225
226
|
var error;
|
|
@@ -228,7 +229,7 @@ var ControlsOptionsManager = exports.default = /*#__PURE__*/function () {
|
|
|
228
229
|
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
229
230
|
key = _ref3[0],
|
|
230
231
|
value = _ref3[1];
|
|
231
|
-
if (!shouldSkipCheckToMergeBody && value !== undefined && !(_util.default !== null && _util.default !== void 0 && _util.default["".concat(value ?
|
|
232
|
+
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
233
|
error = new _permission.default("".concat(key, " [").concat(value, "] not allowed, due to moderator property."));
|
|
233
234
|
}
|
|
234
235
|
if (error) {
|
|
@@ -245,7 +246,7 @@ var ControlsOptionsManager = exports.default = /*#__PURE__*/function () {
|
|
|
245
246
|
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
247
|
body.audio[(0, _lodash.camelCase)(key)] = value;
|
|
247
248
|
} else {
|
|
248
|
-
body[(0, _lodash.camelCase)(key)] = (0, _defineProperty2.default)({},
|
|
249
|
+
body[(0, _lodash.camelCase)(key)] = (0, _defineProperty2.default)({}, _constants.ENABLED, value);
|
|
249
250
|
}
|
|
250
251
|
break;
|
|
251
252
|
case _enums.Setting.roles:
|
|
@@ -260,16 +261,29 @@ var ControlsOptionsManager = exports.default = /*#__PURE__*/function () {
|
|
|
260
261
|
if (error) {
|
|
261
262
|
return _promise.default.reject(error);
|
|
262
263
|
}
|
|
263
|
-
var
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
var requestParams = _util.default.getControlsRequestParams({
|
|
265
|
+
body: body,
|
|
266
|
+
locusUrl: this.locusUrl,
|
|
267
|
+
mainLocusUrl: this.mainLocusUrl
|
|
268
|
+
});
|
|
269
|
+
return this.sendControlsRequest(requestParams);
|
|
270
|
+
}
|
|
266
271
|
|
|
272
|
+
/**
|
|
273
|
+
* Sends a controls request to Locus. When authorizingLocusUrl is present in the body,
|
|
274
|
+
* we use a plain request() because the response contains the main session Locus DTO
|
|
275
|
+
* instead of the breakout we're in, so we don't want to parse it as a delta.
|
|
276
|
+
* Otherwise we use locusDeltaRequest() for normal delta processing.
|
|
277
|
+
*
|
|
278
|
+
* @param {Object} requestParams - The request parameters from getControlsRequestParams.
|
|
279
|
+
* @returns {Promise<any>}
|
|
280
|
+
*/
|
|
281
|
+
}, {
|
|
282
|
+
key: "sendControlsRequest",
|
|
283
|
+
value: function sendControlsRequest(requestParams) {
|
|
284
|
+
return requestParams.body.authorizingLocusUrl ?
|
|
267
285
|
// @ts-ignore
|
|
268
|
-
|
|
269
|
-
uri: "".concat(this.mainLocusUrl || this.locusUrl, "/").concat(_constants.CONTROLS),
|
|
270
|
-
body: _objectSpread(_objectSpread({}, body), extraBody),
|
|
271
|
-
method: _constants.HTTP_VERBS.PATCH
|
|
272
|
-
});
|
|
286
|
+
this.request.request(requestParams) : this.request.locusDeltaRequest(requestParams);
|
|
273
287
|
}
|
|
274
288
|
|
|
275
289
|
/**
|
|
@@ -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,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,gCAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAAA,CAAAR,CAAA,EAAAG,CAAA,YAAAH,CAAA;AAAA,SAAAS,cAAAX,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAW,SAAA,CAAAC,MAAA,EAAAZ,CAAA,UAAAC,CAAA,WAAAU,SAAA,CAAAX,CAAA,IAAAW,SAAA,CAAAX,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAe,MAAA,CAAAZ,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,CAAAC,OAAA,EAAAjB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAiB,iCAAA,GAA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AAAC,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","sendControlsRequest","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","authorizingLocusUrl","locusDeltaRequest","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(() => this.sendControlsRequest(requestParams));\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 return this.sendControlsRequest(requestParams);\n }\n\n /**\n * Sends a controls request to Locus. When authorizingLocusUrl is present in the body,\n * we use a plain request() because the response contains the main session Locus DTO\n * instead of the breakout we're in, so we don't want to parse it as a delta.\n * Otherwise we use locusDeltaRequest() for normal delta processing.\n *\n * @param {Object} requestParams - The request parameters from getControlsRequestParams.\n * @returns {Promise<any>}\n */\n private sendControlsRequest(requestParams: {\n uri: string;\n body: Record<string, any>;\n method: string;\n }): Promise<any> {\n return requestParams.body.authorizingLocusUrl\n ? // @ts-ignore\n this.request.request(requestParams)\n : this.request.locusDeltaRequest(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,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,YAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAAwD,SAAAQ,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,aAAA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C,IAAI,CAAC5C,OAAO,CAAC4E,iBAAiB,CAAChC,aAAa,CAAC;IACnD;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAtC,GAAA;IAAAC,KAAA,EAMA,SAAOsE,cAAcA,CAACC,OAAgB,EAAgB;MACpD,OAAO,IAAI,CAAC5B,WAAW,KAAAzD,gBAAA,CAAAC,OAAA,MAAGwE,cAAO,CAACK,WAAW,EAAGO,OAAO,CAAC,CAAC;IAC3D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAxE,GAAA;IAAAC,KAAA,EAMA,SAAOwE,iBAAiBA,CAACD,OAAgB,EAAgB;MACvD,OAAO,IAAI,CAAC5B,WAAW,KAAAzD,gBAAA,CAAAC,OAAA,MAAGwE,cAAO,CAACI,cAAc,EAAGQ,OAAO,CAAC,CAAC;IAC9D;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EARE;IAAAxE,GAAA;IAAAC,KAAA,EASA,SAAOyE,UAAUA,CACfC,YAAqB,EACrBC,qBAA8B,EAC9BC,kBAA2B,EAC3BV,KAAoB,EACN;MACd,OAAO,IAAI,CAACvB,WAAW,KAAAzD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MACpBwE,cAAO,CAACC,KAAK,EAAGc,YAAY,GAC5Bf,cAAO,CAACI,cAAc,EAAGY,qBAAqB,GAC9ChB,cAAO,CAACK,WAAW,EAAGY,kBAAkB,GACxCjB,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;AACA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PxB,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,gCAA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EiB,MAAM,EAAEC,qBAAU,CAACC;MACrB,CAAC;IACH;EAAC;AAAA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAA5G,OAAA,GAGYI,KAAK","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/defi
|
|
|
4
4
|
_Object$defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.EMPTY_HASH = exports.DataSetNames = void 0;
|
|
7
|
+
exports.EMPTY_HASH = exports.DataSetNames = exports.DATA_SET_INIT_PRIORITY = void 0;
|
|
8
8
|
var EMPTY_HASH = exports.EMPTY_HASH = '99aa06d3014798d86001c324468d497f';
|
|
9
9
|
var DataSetNames = exports.DataSetNames = {
|
|
10
10
|
MAIN: 'main',
|
|
@@ -19,4 +19,13 @@ var DataSetNames = exports.DataSetNames = {
|
|
|
19
19
|
// sent to web client, over Mercury
|
|
20
20
|
UNJOINED: 'unjoined' // sent when you are not joined, but can still see some stuff from the meeting (mutually exclusive with "main")
|
|
21
21
|
};
|
|
22
|
+
|
|
23
|
+
// Priority order for initializing data sets — higher priority names come first.
|
|
24
|
+
// Data sets not listed here will be initialized after all prioritized ones.
|
|
25
|
+
// MAIN must come before SELF because LocusInfo.updateFromHashTree processes the
|
|
26
|
+
// batch of updatedObjects in order, and the SELF handler in updateLocusFromHashTreeObject
|
|
27
|
+
// checks locus.info?.isWebinar (which comes from MAIN) to decide whether to create a
|
|
28
|
+
// participant object for webinar attendees. If SELF were initialized first, locus.info
|
|
29
|
+
// would not yet be populated and the attendee participant would be skipped.
|
|
30
|
+
var DATA_SET_INIT_PRIORITY = exports.DATA_SET_INIT_PRIORITY = [DataSetNames.MAIN, DataSetNames.SELF];
|
|
22
31
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EMPTY_HASH","exports","DataSetNames","MAIN","ATTENDEES","ATD_ACTIVE","ATD_UNMUTED","SELF","UNJOINED"],"sources":["constants.ts"],"sourcesContent":["export const EMPTY_HASH = '99aa06d3014798d86001c324468d497f';\n\nexport const DataSetNames = {\n MAIN: 'main', // sent to web client, contains also panelists, over LLM\n ATTENDEES: 'attendees', // NOT SENT to web client, all the attendees in the locus\n ATD_ACTIVE: 'atd-active', // only sent to panelists, over LLM; the attendees that have their hands raised or are allowed to unmute themselves\n ATD_UNMUTED: 'atd-unmuted', // sent to web client, over LLM, not sent to panelists; the attendees that are unmuted\n SELF: 'self', // sent to web client, over Mercury\n UNJOINED: 'unjoined', // sent when you are not joined, but can still see some stuff from the meeting (mutually exclusive with \"main\")\n};\n"],"mappings":";;;;;;;AAAO,IAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,kCAAkC;AAErD,IAAME,YAAY,GAAAD,OAAA,CAAAC,YAAA,GAAG;EAC1BC,IAAI,EAAE,MAAM;EAAE;EACdC,SAAS,EAAE,WAAW;EAAE;EACxBC,UAAU,EAAE,YAAY;EAAE;EAC1BC,WAAW,EAAE,aAAa;EAAE;EAC5BC,IAAI,EAAE,MAAM;EAAE;EACdC,QAAQ,EAAE,UAAU,CAAE;AACxB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["EMPTY_HASH","exports","DataSetNames","MAIN","ATTENDEES","ATD_ACTIVE","ATD_UNMUTED","SELF","UNJOINED","DATA_SET_INIT_PRIORITY"],"sources":["constants.ts"],"sourcesContent":["export const EMPTY_HASH = '99aa06d3014798d86001c324468d497f';\n\nexport const DataSetNames = {\n MAIN: 'main', // sent to web client, contains also panelists, over LLM\n ATTENDEES: 'attendees', // NOT SENT to web client, all the attendees in the locus\n ATD_ACTIVE: 'atd-active', // only sent to panelists, over LLM; the attendees that have their hands raised or are allowed to unmute themselves\n ATD_UNMUTED: 'atd-unmuted', // sent to web client, over LLM, not sent to panelists; the attendees that are unmuted\n SELF: 'self', // sent to web client, over Mercury\n UNJOINED: 'unjoined', // sent when you are not joined, but can still see some stuff from the meeting (mutually exclusive with \"main\")\n};\n\n// Priority order for initializing data sets — higher priority names come first.\n// Data sets not listed here will be initialized after all prioritized ones.\n// MAIN must come before SELF because LocusInfo.updateFromHashTree processes the\n// batch of updatedObjects in order, and the SELF handler in updateLocusFromHashTreeObject\n// checks locus.info?.isWebinar (which comes from MAIN) to decide whether to create a\n// participant object for webinar attendees. If SELF were initialized first, locus.info\n// would not yet be populated and the attendee participant would be skipped.\nexport const DATA_SET_INIT_PRIORITY: string[] = [DataSetNames.MAIN, DataSetNames.SELF];\n"],"mappings":";;;;;;;AAAO,IAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,kCAAkC;AAErD,IAAME,YAAY,GAAAD,OAAA,CAAAC,YAAA,GAAG;EAC1BC,IAAI,EAAE,MAAM;EAAE;EACdC,SAAS,EAAE,WAAW;EAAE;EACxBC,UAAU,EAAE,YAAY;EAAE;EAC1BC,WAAW,EAAE,aAAa;EAAE;EAC5BC,IAAI,EAAE,MAAM;EAAE;EACdC,QAAQ,EAAE,UAAU,CAAE;AACxB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMC,sBAAgC,GAAAR,OAAA,CAAAQ,sBAAA,GAAG,CAACP,YAAY,CAACC,IAAI,EAAED,YAAY,CAACK,IAAI,CAAC","ignoreList":[]}
|