@webex/plugin-meetings 3.0.0-beta.87 → 3.0.0-beta.89
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/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +48 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +325 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +13 -7
- package/dist/breakouts/index.js.map +1 -1
- package/dist/constants.js +6 -2
- package/dist/constants.js.map +1 -1
- package/dist/meeting/index.js +15 -1
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +29 -17
- package/dist/meeting/request.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +33 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/constants.d.ts +3 -0
- package/dist/types/meeting/index.d.ts +1 -0
- package/dist/types/meeting/request.d.ts +3 -0
- package/package.json +19 -19
- package/src/annotation/annotation.types.ts +37 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +314 -0
- package/src/breakouts/index.ts +11 -4
- package/src/constants.ts +3 -0
- package/src/meeting/index.ts +12 -0
- package/src/meeting/request.ts +16 -1
- package/test/unit/spec/annotation/index.ts +420 -0
- package/test/unit/spec/breakouts/index.ts +72 -52
- package/test/unit/spec/meeting/index.js +13 -1
- package/test/unit/spec/meeting/request.js +65 -1
- package/test/unit/spec/meeting/utils.js +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["annotation.types.ts"],"sourcesContent":["/**\n * Type for an StrokeData Object\n */\ntype StrokeData = {\n fromUserId: string;\n fromDeviceUrl: string;\n toUserId: string;\n content: string;\n shareInstanceId: string;\n encryptionKeyUrl: string;\n};\n\ntype RequestData = {\n toUserId: string;\n toDeviceUrl: string;\n shareInstanceId: string;\n};\n\ntype CommandRequestBody = {\n actionType: string;\n resourceType: string;\n shareInstanceId: string;\n receivers?: any[];\n};\n\ninterface IAnnotationChannel {\n acceptRequest(approval);\n declineRequest(approval);\n approveAnnotation: (requestData: RequestData) => undefined | Promise<void>;\n cancelApproveAnnotation: (requestData: RequestData) => undefined | Promise<void>;\n closeAnnotation: (requestData: RequestData) => undefined | Promise<void>;\n sendStrokeData: (strokeData: StrokeData) => void;\n approvalUrlUpdate: (approvalUrl: string) => void;\n locusUrlUpdate: (locusUrl: string) => void;\n}\n\nexport type {StrokeData, RequestData, CommandRequestBody, IAnnotationChannel};\n"],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.EVENT_TRIGGERS = exports.ANNOTATION_STATUS = exports.ANNOTATION_RESOURCE_TYPE = exports.ANNOTATION_REQUEST_TYPE = exports.ANNOTATION_RELAY_TYPES = exports.ANNOTATION_POLICY = exports.ANNOTATION_ACTION_TYPE = exports.ANNOTATION = void 0;
|
|
8
|
+
var EVENT_TRIGGERS = {
|
|
9
|
+
ANNOTATION_STROKE_DATA: 'annotation:strokeData',
|
|
10
|
+
ANNOTATION_COMMAND: 'annotation:command'
|
|
11
|
+
};
|
|
12
|
+
exports.EVENT_TRIGGERS = EVENT_TRIGGERS;
|
|
13
|
+
var ANNOTATION_RESOURCE_TYPE = 'AnnotationOnShare';
|
|
14
|
+
exports.ANNOTATION_RESOURCE_TYPE = ANNOTATION_RESOURCE_TYPE;
|
|
15
|
+
var ANNOTATION_RELAY_TYPES = {
|
|
16
|
+
ANNOTATION_CLIENT: 'annotation.client'
|
|
17
|
+
};
|
|
18
|
+
exports.ANNOTATION_RELAY_TYPES = ANNOTATION_RELAY_TYPES;
|
|
19
|
+
var ANNOTATION_STATUS = {
|
|
20
|
+
NO_ANNOTATION: 'NO_ANNOTATION',
|
|
21
|
+
RUNNING_ANNOTATION: 'RUNNING_ANNOTATION'
|
|
22
|
+
};
|
|
23
|
+
exports.ANNOTATION_STATUS = ANNOTATION_STATUS;
|
|
24
|
+
var ANNOTATION_POLICY = {
|
|
25
|
+
ANYONE_CAN_ANNOTATE: 'AnyoneCanAnnotate',
|
|
26
|
+
APPROVAL: 'Approval',
|
|
27
|
+
ANNOTATION_NOT_ALLOWED: 'AnnotationNotAllowed'
|
|
28
|
+
};
|
|
29
|
+
exports.ANNOTATION_POLICY = ANNOTATION_POLICY;
|
|
30
|
+
var ANNOTATION_REQUEST_TYPE = {
|
|
31
|
+
ANNOTATION_MESSAGE: 'annotation_message'
|
|
32
|
+
};
|
|
33
|
+
exports.ANNOTATION_REQUEST_TYPE = ANNOTATION_REQUEST_TYPE;
|
|
34
|
+
var ANNOTATION_ACTION_TYPE;
|
|
35
|
+
exports.ANNOTATION_ACTION_TYPE = ANNOTATION_ACTION_TYPE;
|
|
36
|
+
(function (ANNOTATION_ACTION_TYPE) {
|
|
37
|
+
ANNOTATION_ACTION_TYPE["REQUESTED"] = "REQUESTED";
|
|
38
|
+
ANNOTATION_ACTION_TYPE["ACCEPTED"] = "ACCEPTED";
|
|
39
|
+
ANNOTATION_ACTION_TYPE["DECLINED"] = "DECLINED";
|
|
40
|
+
ANNOTATION_ACTION_TYPE["OFFERED"] = "OFFERED";
|
|
41
|
+
ANNOTATION_ACTION_TYPE["CANCELED"] = "CANCELED";
|
|
42
|
+
ANNOTATION_ACTION_TYPE["EXPIRED"] = "EXPIRED";
|
|
43
|
+
ANNOTATION_ACTION_TYPE["REVOKED"] = "REVOKED";
|
|
44
|
+
ANNOTATION_ACTION_TYPE["CLOSED"] = "CLOSED";
|
|
45
|
+
})(ANNOTATION_ACTION_TYPE || (exports.ANNOTATION_ACTION_TYPE = ANNOTATION_ACTION_TYPE = {}));
|
|
46
|
+
var ANNOTATION = 'annotation';
|
|
47
|
+
exports.ANNOTATION = ANNOTATION;
|
|
48
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["EVENT_TRIGGERS","ANNOTATION_STROKE_DATA","ANNOTATION_COMMAND","ANNOTATION_RESOURCE_TYPE","ANNOTATION_RELAY_TYPES","ANNOTATION_CLIENT","ANNOTATION_STATUS","NO_ANNOTATION","RUNNING_ANNOTATION","ANNOTATION_POLICY","ANYONE_CAN_ANNOTATE","APPROVAL","ANNOTATION_NOT_ALLOWED","ANNOTATION_REQUEST_TYPE","ANNOTATION_MESSAGE","ANNOTATION_ACTION_TYPE","ANNOTATION"],"sources":["constants.ts"],"sourcesContent":["export const EVENT_TRIGGERS = {\n ANNOTATION_STROKE_DATA: 'annotation:strokeData',\n ANNOTATION_COMMAND: 'annotation:command',\n};\nexport const ANNOTATION_RESOURCE_TYPE = 'AnnotationOnShare';\nexport const ANNOTATION_RELAY_TYPES = {\n ANNOTATION_CLIENT: 'annotation.client',\n};\n\nexport const ANNOTATION_STATUS = {\n NO_ANNOTATION: 'NO_ANNOTATION',\n RUNNING_ANNOTATION: 'RUNNING_ANNOTATION',\n};\n\nexport const ANNOTATION_POLICY = {\n ANYONE_CAN_ANNOTATE: 'AnyoneCanAnnotate',\n APPROVAL: 'Approval',\n ANNOTATION_NOT_ALLOWED: 'AnnotationNotAllowed',\n};\n\nexport const ANNOTATION_REQUEST_TYPE = {\n ANNOTATION_MESSAGE: 'annotation_message',\n};\n\nexport const enum ANNOTATION_ACTION_TYPE {\n REQUESTED = 'REQUESTED',\n ACCEPTED = 'ACCEPTED',\n DECLINED = 'DECLINED',\n OFFERED = 'OFFERED',\n CANCELED = 'CANCELED',\n EXPIRED = 'EXPIRED',\n REVOKED = 'REVOKED',\n CLOSED = 'CLOSED',\n}\n\nexport const ANNOTATION = 'annotation';\n"],"mappings":";;;;;;;AAAO,IAAMA,cAAc,GAAG;EAC5BC,sBAAsB,EAAE,uBAAuB;EAC/CC,kBAAkB,EAAE;AACtB,CAAC;AAAC;AACK,IAAMC,wBAAwB,GAAG,mBAAmB;AAAC;AACrD,IAAMC,sBAAsB,GAAG;EACpCC,iBAAiB,EAAE;AACrB,CAAC;AAAC;AAEK,IAAMC,iBAAiB,GAAG;EAC/BC,aAAa,EAAE,eAAe;EAC9BC,kBAAkB,EAAE;AACtB,CAAC;AAAC;AAEK,IAAMC,iBAAiB,GAAG;EAC/BC,mBAAmB,EAAE,mBAAmB;EACxCC,QAAQ,EAAE,UAAU;EACpBC,sBAAsB,EAAE;AAC1B,CAAC;AAAC;AAEK,IAAMC,uBAAuB,GAAG;EACrCC,kBAAkB,EAAE;AACtB,CAAC;AAAC;AAAA,IAEgBC,sBAAsB;AAAA;AAAA,WAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,sCAAtBA,sBAAsB;AAWjC,IAAMC,UAAU,GAAG,YAAY;AAAC"}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
|
4
|
+
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.default = void 0;
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
11
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
12
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
13
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
14
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
16
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
17
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
18
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
19
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
20
|
+
var _webexCore = require("@webex/webex-core");
|
|
21
|
+
var _triggerProxy = _interopRequireDefault(require("../common/events/trigger-proxy"));
|
|
22
|
+
var _constants = require("./constants");
|
|
23
|
+
var _constants2 = require("../constants");
|
|
24
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
+
/**
|
|
27
|
+
* @description Annotation to handle LLM and Mercury message and locus API
|
|
28
|
+
* @class
|
|
29
|
+
*/
|
|
30
|
+
var AnnotationChannel = /*#__PURE__*/function (_WebexPlugin) {
|
|
31
|
+
(0, _inherits2.default)(AnnotationChannel, _WebexPlugin);
|
|
32
|
+
var _super = _createSuper(AnnotationChannel);
|
|
33
|
+
/**
|
|
34
|
+
* Initializes annotation module
|
|
35
|
+
*/
|
|
36
|
+
function AnnotationChannel() {
|
|
37
|
+
var _this;
|
|
38
|
+
(0, _classCallCheck2.default)(this, AnnotationChannel);
|
|
39
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
40
|
+
args[_key] = arguments[_key];
|
|
41
|
+
}
|
|
42
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
43
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "namespace", _constants.ANNOTATION);
|
|
44
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "seqNum", void 0);
|
|
45
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hasSubscribedToEvents", void 0);
|
|
46
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "approvalUrl", void 0);
|
|
47
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusUrl", void 0);
|
|
48
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "annotationStatus", void 0);
|
|
49
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deviceUrl", void 0);
|
|
50
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "eventCommandProcessor", function (e) {
|
|
51
|
+
var _e$data, _e$data2, _e$data2$approval, _e$data3, _e$data3$approval;
|
|
52
|
+
if ((e === null || e === void 0 ? void 0 : (_e$data = e.data) === null || _e$data === void 0 ? void 0 : _e$data.eventType) === 'locus.approval_request' && (e === null || e === void 0 ? void 0 : (_e$data2 = e.data) === null || _e$data2 === void 0 ? void 0 : (_e$data2$approval = _e$data2.approval) === null || _e$data2$approval === void 0 ? void 0 : _e$data2$approval.resourceType) === _constants.ANNOTATION_RESOURCE_TYPE && e !== null && e !== void 0 && (_e$data3 = e.data) !== null && _e$data3 !== void 0 && (_e$data3$approval = _e$data3.approval) !== null && _e$data3$approval !== void 0 && _e$data3$approval.actionType) {
|
|
53
|
+
_triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
|
|
54
|
+
file: 'annotation',
|
|
55
|
+
function: 'approval_request'
|
|
56
|
+
}, _constants.EVENT_TRIGGERS.ANNOTATION_COMMAND, {
|
|
57
|
+
type: e.data.approval.actionType,
|
|
58
|
+
payload: e.data.approval
|
|
59
|
+
});
|
|
60
|
+
_this.seqNum = ((e === null || e === void 0 ? void 0 : e.sequenceNumber) || 0) + 1;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "eventDataProcessor", function (e) {
|
|
64
|
+
var _e$data4;
|
|
65
|
+
switch (e === null || e === void 0 ? void 0 : (_e$data4 = e.data) === null || _e$data4 === void 0 ? void 0 : _e$data4.relayType) {
|
|
66
|
+
case _constants.ANNOTATION_RELAY_TYPES.ANNOTATION_CLIENT:
|
|
67
|
+
_this.seqNum = ((e === null || e === void 0 ? void 0 : e.sequenceNumber) || 0) + 1;
|
|
68
|
+
_this.processStrokeMessage(e.data.request);
|
|
69
|
+
break;
|
|
70
|
+
default:
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sendAnnotationAction", /*#__PURE__*/function () {
|
|
75
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(actionType, requestData) {
|
|
76
|
+
var body;
|
|
77
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
78
|
+
while (1) switch (_context.prev = _context.next) {
|
|
79
|
+
case 0:
|
|
80
|
+
body = {
|
|
81
|
+
actionType: actionType,
|
|
82
|
+
resourceType: 'AnnotationOnShare',
|
|
83
|
+
shareInstanceId: requestData.shareInstanceId
|
|
84
|
+
};
|
|
85
|
+
if (requestData !== null && requestData !== void 0 && requestData.toUserId) {
|
|
86
|
+
body.receivers = [{
|
|
87
|
+
participantId: requestData.toUserId,
|
|
88
|
+
deviceUrl: requestData.toDeviceUrl
|
|
89
|
+
}];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
return _context.abrupt("return", _this.request({
|
|
94
|
+
method: _constants2.HTTP_VERBS.POST,
|
|
95
|
+
url: "".concat(_this.approvalUrl),
|
|
96
|
+
body: body
|
|
97
|
+
}));
|
|
98
|
+
case 3:
|
|
99
|
+
case "end":
|
|
100
|
+
return _context.stop();
|
|
101
|
+
}
|
|
102
|
+
}, _callee);
|
|
103
|
+
}));
|
|
104
|
+
return function (_x, _x2) {
|
|
105
|
+
return _ref.apply(this, arguments);
|
|
106
|
+
};
|
|
107
|
+
}());
|
|
108
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "decryptContent", function (encryptionKeyUrl, content) {
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
return _this.webex.internal.encryption.decryptText(encryptionKeyUrl, content).then(function (res) {
|
|
111
|
+
return res;
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "encryptContent", function (encryptionKeyUrl, content) {
|
|
115
|
+
// @ts-ignore
|
|
116
|
+
return _this.webex.internal.encryption.encryptText(encryptionKeyUrl, content).then(function (res) {
|
|
117
|
+
return res;
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sendStrokeData", function (strokeData) {
|
|
121
|
+
// @ts-ignore
|
|
122
|
+
if (!_this.webex.internal.llm.isConnected()) return;
|
|
123
|
+
_this.encryptContent(strokeData.encryptionKeyUrl, strokeData.content).then(function (encryptedContent) {
|
|
124
|
+
_this.publishEncrypted(encryptedContent, strokeData);
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
_this.seqNum = 1;
|
|
128
|
+
return _this;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Process Stroke Data
|
|
133
|
+
* @param {request} request stroke data
|
|
134
|
+
* @returns {void}
|
|
135
|
+
*/
|
|
136
|
+
(0, _createClass2.default)(AnnotationChannel, [{
|
|
137
|
+
key: "processStrokeMessage",
|
|
138
|
+
value: function processStrokeMessage(request) {
|
|
139
|
+
var _this2 = this;
|
|
140
|
+
this.decryptContent(request.encryptionKeyUrl, request.content).then(function (decryptedContent) {
|
|
141
|
+
request.content = decryptedContent;
|
|
142
|
+
_triggerProxy.default.trigger(_this2, {
|
|
143
|
+
file: 'annotation',
|
|
144
|
+
function: 'processStrokeMessage'
|
|
145
|
+
}, _constants.EVENT_TRIGGERS.ANNOTATION_STROKE_DATA, {
|
|
146
|
+
data: request
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** bind all events from mercury
|
|
152
|
+
* @param {Object} e
|
|
153
|
+
* @returns {undefined}
|
|
154
|
+
*/
|
|
155
|
+
}, {
|
|
156
|
+
key: "listenToEvents",
|
|
157
|
+
value:
|
|
158
|
+
/**
|
|
159
|
+
* Listen to websocket messages
|
|
160
|
+
* @returns {undefined}
|
|
161
|
+
*/
|
|
162
|
+
function listenToEvents() {
|
|
163
|
+
if (!this.hasSubscribedToEvents) {
|
|
164
|
+
// @ts-ignore
|
|
165
|
+
this.webex.internal.mercury.on('event:locus', this.eventCommandProcessor);
|
|
166
|
+
// @ts-ignore
|
|
167
|
+
this.webex.internal.llm.on('event:relay.event', this.eventDataProcessor);
|
|
168
|
+
this.hasSubscribedToEvents = true;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* set locusUrl
|
|
174
|
+
* @param {string} locusUrl
|
|
175
|
+
* @returns {void}
|
|
176
|
+
*/
|
|
177
|
+
}, {
|
|
178
|
+
key: "locusUrlUpdate",
|
|
179
|
+
value: function locusUrlUpdate(locusUrl) {
|
|
180
|
+
this.locusUrl = locusUrl;
|
|
181
|
+
this.listenToEvents();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* set approved url
|
|
186
|
+
* @param {string} approvalUrl
|
|
187
|
+
* @returns {void}
|
|
188
|
+
*/
|
|
189
|
+
}, {
|
|
190
|
+
key: "approvalUrlUpdate",
|
|
191
|
+
value: function approvalUrlUpdate(approvalUrl) {
|
|
192
|
+
this.approvalUrl = approvalUrl;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* accept request
|
|
197
|
+
* @param {object} approval
|
|
198
|
+
* @returns {Promise}
|
|
199
|
+
*/
|
|
200
|
+
}, {
|
|
201
|
+
key: "acceptRequest",
|
|
202
|
+
value: function acceptRequest(approval) {
|
|
203
|
+
// @ts-ignore
|
|
204
|
+
return this.request({
|
|
205
|
+
method: _constants2.HTTP_VERBS.PUT,
|
|
206
|
+
url: approval.url,
|
|
207
|
+
body: {
|
|
208
|
+
resourceType: _constants.ANNOTATION_RESOURCE_TYPE,
|
|
209
|
+
actionType: _constants.ANNOTATION_ACTION_TYPE.ACCEPTED
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* presenter declined request annotation
|
|
216
|
+
* @param {approval} approval
|
|
217
|
+
* @returns {Promise}
|
|
218
|
+
*/
|
|
219
|
+
}, {
|
|
220
|
+
key: "declineRequest",
|
|
221
|
+
value: function declineRequest(approval) {
|
|
222
|
+
// @ts-ignore
|
|
223
|
+
return this.request({
|
|
224
|
+
method: _constants2.HTTP_VERBS.PUT,
|
|
225
|
+
url: approval.url,
|
|
226
|
+
body: {
|
|
227
|
+
resourceType: _constants.ANNOTATION_RESOURCE_TYPE,
|
|
228
|
+
actionType: _constants.ANNOTATION_ACTION_TYPE.DECLINED
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* request approved annotation
|
|
235
|
+
* @param {RequestData} requestData
|
|
236
|
+
* @returns {Promise}
|
|
237
|
+
*/
|
|
238
|
+
}, {
|
|
239
|
+
key: "approveAnnotation",
|
|
240
|
+
value: function approveAnnotation(requestData) {
|
|
241
|
+
return this.sendAnnotationAction(_constants.ANNOTATION_ACTION_TYPE.REQUESTED, requestData);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* cancel approved annotation
|
|
246
|
+
* @param {object} requestData
|
|
247
|
+
* @returns {Promise}
|
|
248
|
+
*/
|
|
249
|
+
}, {
|
|
250
|
+
key: "cancelApproveAnnotation",
|
|
251
|
+
value: function cancelApproveAnnotation(requestData) {
|
|
252
|
+
return this.sendAnnotationAction(_constants.ANNOTATION_ACTION_TYPE.CANCELED, requestData);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* close annotation
|
|
257
|
+
* @param {object} requestData
|
|
258
|
+
* @returns {Promise}
|
|
259
|
+
*/
|
|
260
|
+
}, {
|
|
261
|
+
key: "closeAnnotation",
|
|
262
|
+
value: function closeAnnotation(requestData) {
|
|
263
|
+
return this.sendAnnotationAction(_constants.ANNOTATION_ACTION_TYPE.CLOSED, requestData);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* send annotation command
|
|
268
|
+
* @param {ANNOTATION_ACTION_TYPE} actionType
|
|
269
|
+
* @param {RequestData} requestData
|
|
270
|
+
* @returns {Promise}
|
|
271
|
+
*/
|
|
272
|
+
}, {
|
|
273
|
+
key: "publishEncrypted",
|
|
274
|
+
value:
|
|
275
|
+
/**
|
|
276
|
+
* private encrypted the strokes data
|
|
277
|
+
* @param {string} encryptedContent
|
|
278
|
+
* @param {StrokeData} strokeData
|
|
279
|
+
* @returns {void}
|
|
280
|
+
*/
|
|
281
|
+
function publishEncrypted(encryptedContent, strokeData) {
|
|
282
|
+
var data = {
|
|
283
|
+
id: "".concat(this.seqNum),
|
|
284
|
+
type: 'publishRequest',
|
|
285
|
+
recipients: {
|
|
286
|
+
// @ts-ignore
|
|
287
|
+
route: this.webex.internal.llm.getBinding()
|
|
288
|
+
},
|
|
289
|
+
headers: {
|
|
290
|
+
to: strokeData.toUserId
|
|
291
|
+
},
|
|
292
|
+
data: {
|
|
293
|
+
eventType: 'relay.event',
|
|
294
|
+
relayType: _constants.ANNOTATION_RELAY_TYPES.ANNOTATION_CLIENT,
|
|
295
|
+
request: {
|
|
296
|
+
value: {
|
|
297
|
+
sessionId: _uuid.default.v4(),
|
|
298
|
+
type: _constants.ANNOTATION_REQUEST_TYPE.ANNOTATION_MESSAGE,
|
|
299
|
+
locusUrl: this.locusUrl,
|
|
300
|
+
content: encryptedContent,
|
|
301
|
+
version: 'mVersion',
|
|
302
|
+
fromUserId: strokeData.fromUserId,
|
|
303
|
+
fromDeviceUrl: strokeData.fromDeviceUrl,
|
|
304
|
+
shareInstanceId: strokeData.shareInstanceId,
|
|
305
|
+
locusId: this.locusUrl && this.locusUrl.split('/').pop(),
|
|
306
|
+
encryptionKeyUrl: strokeData.encryptionKeyUrl
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
trackingId: "".concat(_webexCore.config.trackingIdPrefix, "_").concat(_uuid.default.v4().toString()),
|
|
311
|
+
timestamp: new Date().getTime(),
|
|
312
|
+
sequenceNumber: this.seqNum,
|
|
313
|
+
filterMessage: false
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
// @ts-ignore
|
|
317
|
+
this.webex.internal.llm.socket.send(data);
|
|
318
|
+
this.seqNum += 1;
|
|
319
|
+
}
|
|
320
|
+
}]);
|
|
321
|
+
return AnnotationChannel;
|
|
322
|
+
}(_webexCore.WebexPlugin);
|
|
323
|
+
var _default = AnnotationChannel;
|
|
324
|
+
exports.default = _default;
|
|
325
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AnnotationChannel","args","ANNOTATION","e","data","eventType","approval","resourceType","ANNOTATION_RESOURCE_TYPE","actionType","TriggerProxy","trigger","file","function","EVENT_TRIGGERS","ANNOTATION_COMMAND","type","payload","seqNum","sequenceNumber","relayType","ANNOTATION_RELAY_TYPES","ANNOTATION_CLIENT","processStrokeMessage","request","requestData","body","shareInstanceId","toUserId","receivers","participantId","deviceUrl","toDeviceUrl","method","HTTP_VERBS","POST","url","approvalUrl","encryptionKeyUrl","content","webex","internal","encryption","decryptText","then","res","encryptText","strokeData","llm","isConnected","encryptContent","encryptedContent","publishEncrypted","decryptContent","decryptedContent","ANNOTATION_STROKE_DATA","hasSubscribedToEvents","mercury","on","eventCommandProcessor","eventDataProcessor","locusUrl","listenToEvents","PUT","ANNOTATION_ACTION_TYPE","ACCEPTED","DECLINED","sendAnnotationAction","REQUESTED","CANCELED","CLOSED","id","recipients","route","getBinding","headers","to","value","sessionId","uuid","v4","ANNOTATION_REQUEST_TYPE","ANNOTATION_MESSAGE","version","fromUserId","fromDeviceUrl","locusId","split","pop","trackingId","config","trackingIdPrefix","toString","timestamp","Date","getTime","filterMessage","socket","send","WebexPlugin"],"sources":["index.ts"],"sourcesContent":["import uuid from 'uuid';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {WebexPlugin, config} from '@webex/webex-core';\nimport TriggerProxy from '../common/events/trigger-proxy';\n\nimport {\n EVENT_TRIGGERS,\n ANNOTATION_RELAY_TYPES,\n ANNOTATION,\n ANNOTATION_REQUEST_TYPE,\n ANNOTATION_ACTION_TYPE,\n ANNOTATION_RESOURCE_TYPE,\n} from './constants';\n\nimport {StrokeData, RequestData, IAnnotationChannel, CommandRequestBody} from './annotation.types';\nimport {HTTP_VERBS} from '../constants';\n\n/**\n * @description Annotation to handle LLM and Mercury message and locus API\n * @class\n */\nclass AnnotationChannel extends WebexPlugin implements IAnnotationChannel {\n namespace = ANNOTATION;\n\n private seqNum: number;\n\n hasSubscribedToEvents: boolean;\n\n approvalUrl: string;\n locusUrl: string;\n annotationStatus: string;\n deviceUrl: string;\n\n /**\n * Initializes annotation module\n */\n constructor(...args) {\n super(...args);\n this.seqNum = 1;\n }\n\n /**\n * Process Stroke Data\n * @param {request} request stroke data\n * @returns {void}\n */\n private processStrokeMessage(request) {\n this.decryptContent(request.encryptionKeyUrl, request.content).then((decryptedContent) => {\n request.content = decryptedContent;\n TriggerProxy.trigger(\n this,\n {\n file: 'annotation',\n function: 'processStrokeMessage',\n },\n EVENT_TRIGGERS.ANNOTATION_STROKE_DATA,\n {\n data: request,\n }\n );\n });\n }\n\n /** bind all events from mercury\n * @param {Object} e\n * @returns {undefined}\n */\n private eventCommandProcessor = (e) => {\n if (\n e?.data?.eventType === 'locus.approval_request' &&\n e?.data?.approval?.resourceType === ANNOTATION_RESOURCE_TYPE &&\n e?.data?.approval?.actionType\n ) {\n TriggerProxy.trigger(\n this,\n {\n file: 'annotation',\n function: 'approval_request',\n },\n EVENT_TRIGGERS.ANNOTATION_COMMAND,\n {\n type: e.data.approval.actionType,\n payload: e.data.approval,\n }\n );\n this.seqNum = (e?.sequenceNumber || 0) + 1;\n }\n };\n\n /** bind all events from llm\n * @param {Object} e\n * @returns {undefined}\n */\n private eventDataProcessor = (e) => {\n switch (e?.data?.relayType) {\n case ANNOTATION_RELAY_TYPES.ANNOTATION_CLIENT:\n this.seqNum = (e?.sequenceNumber || 0) + 1;\n this.processStrokeMessage(e.data.request);\n break;\n default:\n break;\n }\n };\n\n /**\n * Listen to websocket messages\n * @returns {undefined}\n */\n private listenToEvents() {\n if (!this.hasSubscribedToEvents) {\n // @ts-ignore\n this.webex.internal.mercury.on('event:locus', this.eventCommandProcessor);\n // @ts-ignore\n this.webex.internal.llm.on('event:relay.event', this.eventDataProcessor);\n this.hasSubscribedToEvents = true;\n }\n }\n\n /**\n * set locusUrl\n * @param {string} locusUrl\n * @returns {void}\n */\n public locusUrlUpdate(locusUrl: string) {\n this.locusUrl = locusUrl;\n this.listenToEvents();\n }\n\n /**\n * set approved url\n * @param {string} approvalUrl\n * @returns {void}\n */\n public approvalUrlUpdate(approvalUrl: string) {\n this.approvalUrl = approvalUrl;\n }\n\n /**\n * accept request\n * @param {object} approval\n * @returns {Promise}\n */\n public acceptRequest(approval) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n url: approval.url,\n body: {\n resourceType: ANNOTATION_RESOURCE_TYPE,\n actionType: ANNOTATION_ACTION_TYPE.ACCEPTED,\n },\n });\n }\n\n /**\n * presenter declined request annotation\n * @param {approval} approval\n * @returns {Promise}\n */\n public declineRequest(approval) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.PUT,\n url: approval.url,\n body: {\n resourceType: ANNOTATION_RESOURCE_TYPE,\n actionType: ANNOTATION_ACTION_TYPE.DECLINED,\n },\n });\n }\n\n /**\n * request approved annotation\n * @param {RequestData} requestData\n * @returns {Promise}\n */\n public approveAnnotation(requestData: RequestData) {\n return this.sendAnnotationAction(ANNOTATION_ACTION_TYPE.REQUESTED, requestData);\n }\n\n /**\n * cancel approved annotation\n * @param {object} requestData\n * @returns {Promise}\n */\n public cancelApproveAnnotation(requestData: RequestData) {\n return this.sendAnnotationAction(ANNOTATION_ACTION_TYPE.CANCELED, requestData);\n }\n\n /**\n * close annotation\n * @param {object} requestData\n * @returns {Promise}\n */\n public closeAnnotation(requestData: RequestData) {\n return this.sendAnnotationAction(ANNOTATION_ACTION_TYPE.CLOSED, requestData);\n }\n\n /**\n * send annotation command\n * @param {ANNOTATION_ACTION_TYPE} actionType\n * @param {RequestData} requestData\n * @returns {Promise}\n */\n private sendAnnotationAction = async (\n actionType: ANNOTATION_ACTION_TYPE,\n requestData: RequestData\n ): Promise<void> => {\n const body: CommandRequestBody = {\n actionType,\n resourceType: 'AnnotationOnShare',\n shareInstanceId: requestData.shareInstanceId,\n };\n if (requestData?.toUserId) {\n body.receivers = [{participantId: requestData.toUserId, deviceUrl: requestData.toDeviceUrl}];\n }\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n url: `${this.approvalUrl}`,\n body,\n });\n };\n\n /**\n * decrypt data\n * @param {string} encryptionKeyUrl\n * @param {string} content encrypted content\n * @returns {string} decrypted content\n */\n private decryptContent = (encryptionKeyUrl: string, content: string): Promise<any> => {\n // @ts-ignore\n return this.webex.internal.encryption.decryptText(encryptionKeyUrl, content).then((res) => {\n return res;\n });\n };\n\n /**\n * encrypt data\n * @param {string} encryptionKeyUrl\n * @param {string} content original content\n * @returns {string} encrypted content\n */\n private encryptContent = (encryptionKeyUrl: string, content: string): Promise<any> => {\n // @ts-ignore\n return this.webex.internal.encryption.encryptText(encryptionKeyUrl, content).then((res) => {\n return res;\n });\n };\n\n /**\n * Sends stroke data to presenter\n * @param {StrokeData} strokeData\n * @returns {void}\n */\n public sendStrokeData = (strokeData: StrokeData): void => {\n // @ts-ignore\n if (!this.webex.internal.llm.isConnected()) return;\n this.encryptContent(strokeData.encryptionKeyUrl, strokeData.content).then(\n (encryptedContent) => {\n this.publishEncrypted(encryptedContent, strokeData);\n }\n );\n };\n\n /**\n * private encrypted the strokes data\n * @param {string} encryptedContent\n * @param {StrokeData} strokeData\n * @returns {void}\n */\n private publishEncrypted(encryptedContent: string, strokeData: StrokeData) {\n const data = {\n id: `${this.seqNum}`,\n type: 'publishRequest',\n recipients: {\n // @ts-ignore\n route: this.webex.internal.llm.getBinding(),\n },\n headers: {\n to: strokeData.toUserId,\n },\n data: {\n eventType: 'relay.event',\n relayType: ANNOTATION_RELAY_TYPES.ANNOTATION_CLIENT,\n request: {\n value: {\n sessionId: uuid.v4(),\n type: ANNOTATION_REQUEST_TYPE.ANNOTATION_MESSAGE,\n locusUrl: this.locusUrl,\n content: encryptedContent,\n version: 'mVersion',\n fromUserId: strokeData.fromUserId,\n fromDeviceUrl: strokeData.fromDeviceUrl,\n shareInstanceId: strokeData.shareInstanceId,\n locusId: this.locusUrl && this.locusUrl.split('/').pop(),\n encryptionKeyUrl: strokeData.encryptionKeyUrl,\n },\n },\n },\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n timestamp: new Date().getTime(),\n sequenceNumber: this.seqNum,\n filterMessage: false,\n };\n\n // @ts-ignore\n this.webex.internal.llm.socket.send(data);\n this.seqNum += 1;\n }\n}\n\nexport default AnnotationChannel;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAEA;AACA;AAEA;AAUA;AAAwC;AAAA;AAExC;AACA;AACA;AACA;AAHA,IAIMA,iBAAiB;EAAA;EAAA;EAYrB;AACF;AACA;EACE,6BAAqB;IAAA;IAAA;IAAA,kCAANC,IAAI;MAAJA,IAAI;IAAA;IACjB,gDAASA,IAAI;IAAE,wFAfLC,qBAAU;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA,oGA6CU,UAACC,CAAC,EAAK;MAAA;MACrC,IACE,CAAAA,CAAC,aAADA,CAAC,kCAADA,CAAC,CAAEC,IAAI,4CAAP,QAASC,SAAS,MAAK,wBAAwB,IAC/C,CAAAF,CAAC,aAADA,CAAC,mCAADA,CAAC,CAAEC,IAAI,kEAAP,SAASE,QAAQ,sDAAjB,kBAAmBC,YAAY,MAAKC,mCAAwB,IAC5DL,CAAC,aAADA,CAAC,2BAADA,CAAC,CAAEC,IAAI,0DAAP,SAASE,QAAQ,8CAAjB,kBAAmBG,UAAU,EAC7B;QACAC,qBAAY,CAACC,OAAO,8CAElB;UACEC,IAAI,EAAE,YAAY;UAClBC,QAAQ,EAAE;QACZ,CAAC,EACDC,yBAAc,CAACC,kBAAkB,EACjC;UACEC,IAAI,EAAEb,CAAC,CAACC,IAAI,CAACE,QAAQ,CAACG,UAAU;UAChCQ,OAAO,EAAEd,CAAC,CAACC,IAAI,CAACE;QAClB,CAAC,CACF;QACD,MAAKY,MAAM,GAAG,CAAC,CAAAf,CAAC,aAADA,CAAC,uBAADA,CAAC,CAAEgB,cAAc,KAAI,CAAC,IAAI,CAAC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AC3C2D,OAAO,EAAE,IAAI,CAACzB,QAAQ,IAAI,IAAI,CAACA,QAAQ,CAAC0B,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,EAAE;cACxDlD,gBAAgB,EAAES,UAAU,CAACT;YAC/B;UACF;QACF,CAAC;QACDmD,UAAU,YAAKC,iBAAM,CAACC,gBAAgB,cAAIZ,aAAI,CAACC,EAAE,EAAE,CAACY,QAAQ,EAAE,CAAE;QAChEC,SAAS,EAAE,IAAIC,IAAI,EAAE,CAACC,OAAO,EAAE;QAC/B5E,cAAc,EAAE,IAAI,CAACD,MAAM;QAC3B8E,aAAa,EAAE;MACjB,CAAC;;MAED;MACA,IAAI,CAACxD,KAAK,CAACC,QAAQ,CAACO,GAAG,CAACiD,MAAM,CAACC,IAAI,CAAC9F,IAAI,CAAC;MACzC,IAAI,CAACc,MAAM,IAAI,CAAC;IAClB;EAAC;EAAA;AAAA,EAjS6BiF,sBAAW;AAAA,eAoS5BnG,iBAAiB;AAAA"}
|
package/dist/breakouts/index.js
CHANGED
|
@@ -775,15 +775,21 @@ var Breakouts = _webexCore.WebexPlugin.extend({
|
|
|
775
775
|
anyoneCanJoin: !!item.anyone
|
|
776
776
|
};
|
|
777
777
|
});
|
|
778
|
+
var body = _objectSpread(_objectSpread({}, this.editLock && !!this.editLock.token ? {
|
|
779
|
+
editlock: {
|
|
780
|
+
token: this.editLock.token,
|
|
781
|
+
refresh: true
|
|
782
|
+
}
|
|
783
|
+
} : {}), {
|
|
784
|
+
groups: [{
|
|
785
|
+
id: this.breakoutGroupId,
|
|
786
|
+
sessions: internalSessions
|
|
787
|
+
}]
|
|
788
|
+
});
|
|
778
789
|
return this.request({
|
|
779
790
|
method: _constants.HTTP_VERBS.PUT,
|
|
780
791
|
uri: this.url,
|
|
781
|
-
body:
|
|
782
|
-
groups: [{
|
|
783
|
-
id: this.breakoutGroupId,
|
|
784
|
-
sessions: internalSessions
|
|
785
|
-
}]
|
|
786
|
-
}
|
|
792
|
+
body: body
|
|
787
793
|
});
|
|
788
794
|
},
|
|
789
795
|
/**
|
|
@@ -839,7 +845,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
|
|
|
839
845
|
body: body
|
|
840
846
|
});
|
|
841
847
|
},
|
|
842
|
-
version: "3.0.0-beta.
|
|
848
|
+
version: "3.0.0-beta.89"
|
|
843
849
|
});
|
|
844
850
|
var _default = Breakouts;
|
|
845
851
|
exports.default = _default;
|