@webex/internal-plugin-ediscovery 3.0.0-bnr.4 → 3.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +6 -0
- package/babel.config.js +3 -0
- package/dist/config.js +1 -2
- package/dist/config.js.map +1 -1
- package/dist/ediscovery-error.js +2 -4
- package/dist/ediscovery-error.js.map +1 -1
- package/dist/ediscovery.js +8 -5
- package/dist/ediscovery.js.map +1 -1
- package/dist/index.js +11 -12
- package/dist/index.js.map +1 -1
- package/dist/report-request.js +1 -2
- package/dist/report-request.js.map +1 -1
- package/dist/retry.js.map +1 -1
- package/dist/transforms.js +1 -2
- package/dist/transforms.js.map +1 -1
- package/jest.config.js +3 -0
- package/package.json +28 -12
- package/process +1 -0
- package/dist/internal-plugin-ediscovery.d.ts +0 -50
- package/dist/tsdoc-metadata.json +0 -11
- package/dist/types/config.d.ts +0 -11
- package/dist/types/ediscovery-error.d.ts +0 -11
- package/dist/types/ediscovery.d.ts +0 -6
- package/dist/types/index.d.ts +0 -4
- package/dist/types/report-request.d.ts +0 -29
- package/dist/types/retry.d.ts +0 -2
- package/dist/types/transforms.d.ts +0 -35
package/.eslintrc.js
ADDED
package/babel.config.js
ADDED
package/dist/config.js
CHANGED
|
@@ -5,7 +5,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _default = {
|
|
8
|
+
var _default = exports.default = {
|
|
9
9
|
ediscovery: {
|
|
10
10
|
defaultOptions: {
|
|
11
11
|
offset: 0,
|
|
@@ -15,5 +15,4 @@ var _default = {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
exports.default = _default;
|
|
19
18
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ediscovery","defaultOptions","offset","size","timeoutMs","types"],"sources":["config.js"],"sourcesContent":["export default {\n ediscovery: {\n defaultOptions: {\n offset: 0,\n size: 100,\n timeoutMs: 30000,\n types: [],\n },\n },\n};\n"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"names":["ediscovery","defaultOptions","offset","size","timeoutMs","types"],"sources":["config.js"],"sourcesContent":["export default {\n ediscovery: {\n defaultOptions: {\n offset: 0,\n size: 100,\n timeoutMs: 30000,\n types: [],\n },\n },\n};\n"],"mappings":";;;;;;;iCAAe;EACbA,UAAU,EAAE;IACVC,cAAc,EAAE;MACdC,MAAM,EAAE,CAAC;MACTC,IAAI,EAAE,GAAG;MACTC,SAAS,EAAE,KAAK;MAChBC,KAAK,EAAE;IACT;EACF;AACF,CAAC"}
|
package/dist/ediscovery-error.js
CHANGED
|
@@ -18,7 +18,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
18
18
|
/**
|
|
19
19
|
* General ediscovery error
|
|
20
20
|
*/
|
|
21
|
-
var EdiscoveryError = /*#__PURE__*/function (_Exception) {
|
|
21
|
+
var EdiscoveryError = exports.EdiscoveryError = /*#__PURE__*/function (_Exception) {
|
|
22
22
|
(0, _inherits2.default)(EdiscoveryError, _Exception);
|
|
23
23
|
var _super = _createSuper(EdiscoveryError);
|
|
24
24
|
function EdiscoveryError() {
|
|
@@ -30,8 +30,7 @@ var EdiscoveryError = /*#__PURE__*/function (_Exception) {
|
|
|
30
30
|
/**
|
|
31
31
|
* InvalidEmailAddressError is thrown when an email address has been supplied as a parameter and cannot be found in CI
|
|
32
32
|
*/
|
|
33
|
-
exports.
|
|
34
|
-
var InvalidEmailAddressError = /*#__PURE__*/function (_EdiscoveryError) {
|
|
33
|
+
var InvalidEmailAddressError = exports.InvalidEmailAddressError = /*#__PURE__*/function (_EdiscoveryError) {
|
|
35
34
|
(0, _inherits2.default)(InvalidEmailAddressError, _EdiscoveryError);
|
|
36
35
|
var _super2 = _createSuper(InvalidEmailAddressError);
|
|
37
36
|
function InvalidEmailAddressError() {
|
|
@@ -48,5 +47,4 @@ var InvalidEmailAddressError = /*#__PURE__*/function (_EdiscoveryError) {
|
|
|
48
47
|
}]);
|
|
49
48
|
return InvalidEmailAddressError;
|
|
50
49
|
}(EdiscoveryError);
|
|
51
|
-
exports.InvalidEmailAddressError = InvalidEmailAddressError;
|
|
52
50
|
//# sourceMappingURL=ediscovery-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EdiscoveryError","Exception","InvalidEmailAddressError"],"sources":["ediscovery-error.js"],"sourcesContent":["import {Exception} from '@webex/common';\n\n/**\n * General ediscovery error\n */\nexport class EdiscoveryError extends Exception {}\n\n/**\n * InvalidEmailAddressError is thrown when an email address has been supplied as a parameter and cannot be found in CI\n */\nexport class InvalidEmailAddressError extends EdiscoveryError {\n // This value correspondes to the ediscovery error code INVALID_USER_EMAILS_LIST_IN_MESSAGE\n static getErrorCode() {\n return 14400001;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAwC;AAAA;AAExC;AACA;AACA;AAFA,
|
|
1
|
+
{"version":3,"names":["_common","require","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","EdiscoveryError","exports","_Exception","_inherits2","_super","_classCallCheck2","_createClass2","Exception","InvalidEmailAddressError","_EdiscoveryError","_super2","key","value","getErrorCode"],"sources":["ediscovery-error.js"],"sourcesContent":["import {Exception} from '@webex/common';\n\n/**\n * General ediscovery error\n */\nexport class EdiscoveryError extends Exception {}\n\n/**\n * InvalidEmailAddressError is thrown when an email address has been supplied as a parameter and cannot be found in CI\n */\nexport class InvalidEmailAddressError extends EdiscoveryError {\n // This value correspondes to the ediscovery error code INVALID_USER_EMAILS_LIST_IN_MESSAGE\n static getErrorCode() {\n return 14400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H,gBAAA,CAAArB,OAAA,QAAAwB,wBAAA;IAAA,OAAAE,OAAA,CAAApB,KAAA,OAAAD,SAAA;EAAA;EAAA,IAAAiB,aAAA,CAAAtB,OAAA,EAAAwB,wBAAA;IAAAG,GAAA;IAAAC,KAAA;IACnC;IACA,SAAAC,aAAA,EAAsB;MACpB,OAAO,QAAQ;IACjB;EAAC;EAAA,OAAAL,wBAAA;AAAA,EAJ2CR,eAAe"}
|
package/dist/ediscovery.js
CHANGED
|
@@ -28,11 +28,15 @@ var _webexCore = require("@webex/webex-core");
|
|
|
28
28
|
var _common = require("@webex/common");
|
|
29
29
|
var _ediscoveryError = require("./ediscovery-error");
|
|
30
30
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _obj;
|
|
31
|
+
/* eslint-disable */
|
|
32
|
+
/*!
|
|
33
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
34
|
+
*/
|
|
31
35
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && o[_Symbol$iterator] || o["@@iterator"]; if (!it) { if (_Array$isArray2(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
32
36
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
37
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
34
|
-
function ownKeys(
|
|
35
|
-
function _objectSpread(
|
|
38
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor2(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
39
|
+
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$getOwnPropertyDescriptor2(t, r)); }); } return e; }
|
|
36
40
|
/**
|
|
37
41
|
* Creates a unique oneflight key for a request from the reportId and options params
|
|
38
42
|
* It is important that the offset params are included if present to ensure paged requests get back the correct data
|
|
@@ -589,8 +593,7 @@ var EDiscovery = _webexCore.WebexPlugin.extend((_dec = (0, _webexCore.waitForVal
|
|
|
589
593
|
}, _callee10);
|
|
590
594
|
}))();
|
|
591
595
|
},
|
|
592
|
-
version: "3.0.0-
|
|
596
|
+
version: "3.0.0-next.1"
|
|
593
597
|
}, ((0, _applyDecoratedDescriptor2.default)(_obj, "createReport", [_dec], (0, _getOwnPropertyDescriptor.default)(_obj, "createReport"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getReport", [_dec2], (0, _getOwnPropertyDescriptor.default)(_obj, "getReport"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getReports", [_dec3], (0, _getOwnPropertyDescriptor.default)(_obj, "getReports"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "deleteReport", [_dec4], (0, _getOwnPropertyDescriptor.default)(_obj, "deleteReport"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "restartReport", [_dec5], (0, _getOwnPropertyDescriptor.default)(_obj, "restartReport"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getContent", [_dec6, _dec7], (0, _getOwnPropertyDescriptor.default)(_obj, "getContent"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getContentContainer", [_dec8, _dec9], (0, _getOwnPropertyDescriptor.default)(_obj, "getContentContainer"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getContentContainerByContainerId", [_dec10, _dec11], (0, _getOwnPropertyDescriptor.default)(_obj, "getContentContainerByContainerId"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "getClientConfig", [_dec12], (0, _getOwnPropertyDescriptor.default)(_obj, "getClientConfig"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "postAuditLog", [_dec13], (0, _getOwnPropertyDescriptor.default)(_obj, "postAuditLog"), _obj)), _obj)));
|
|
594
|
-
var _default2 = EDiscovery;
|
|
595
|
-
exports.default = _default2;
|
|
598
|
+
var _default2 = exports.default = EDiscovery;
|
|
596
599
|
//# sourceMappingURL=ediscovery.js.map
|
package/dist/ediscovery.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createOneFlightKey","reportId","options","key","String","offset","size","types","EDiscovery","WebexPlugin","extend","waitForValue","oneFlight","keyFactory","containerId","namespace","session","contentContainerCache","type","default","createReport","reportRequest","Error","config","defaultOptions","body","request","method","service","resource","timeout","timeoutMs","_handleReportRequestError","reason","errorCode","InvalidEmailAddressError","getErrorCode","invalidEmails","JSON","parse","message","length","invalidEmailAddressError","reject","logger","warn","error","getReport","getReports","qs","deleteReport","restartReport","getContent","_createRequestOptions","requestOptions","getContentContainer","reportUUID","res","_writeToContentContainerCache","getContentContainerByContainerId","has","get","statusCode","containers","set","container","clearCache","clear","_getReportIdFromUrl","reportUrl","uuids","match","_isUrl","string","test","isUrl","substring","lastIndexOf","url","getClientConfig","postAuditLog"],"sources":["ediscovery.js"],"sourcesContent":["/* eslint-disable */\n\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nimport {waitForValue, WebexPlugin} from '@webex/webex-core';\nimport {oneFlight} from '@webex/common';\n\nimport {InvalidEmailAddressError} from './ediscovery-error';\n\n/**\n * Creates a unique oneflight key for a request from the reportId and options params\n * It is important that the offset params are included if present to ensure paged requests get back the correct data\n * @param {Object} reportId - A set of criteria for determining the focus of the search\n * @param {Object} options - optional parameters for this method\n * @returns {String} oneFlight key which is a composite of the request parameters\n */\nfunction createOneFlightKey(reportId, options) {\n let key = String(reportId);\n\n if (options) {\n if (options.offset) {\n key += String(options.offset);\n }\n if (options.size) {\n key += String(options.size);\n }\n if (options.types) {\n key += String(options.types);\n }\n }\n\n return key;\n}\n\n/**\n * @class EDiscovery is used by compliance officers to run compliance reports\n *\n */\nconst EDiscovery = WebexPlugin.extend({\n namespace: 'EDiscovery',\n\n session: {\n contentContainerCache: {\n type: 'object',\n default() {\n return new Map();\n }\n }\n },\n\n @waitForValue('@')\n /**\n * Creates a compliance report with a specific set of search parameters\n * @param {Object} reportRequest - A set of criteria for determining the focus of the search\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity>} Http response containing the new report record\n */\n async createReport(reportRequest, options) {\n if (!reportRequest) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n const body = reportRequest;\n\n try {\n return await this.request({\n method: 'POST',\n service: 'ediscovery',\n resource: 'reports',\n timeout: options.timeoutMs,\n body\n });\n }\n catch (reason) {\n return this._handleReportRequestError(reason);\n }\n },\n\n /**\n * Checks the error from createReport and ensures the appropriate error is sent to the client\n * @param {Error} reason - Error response thrown by the request to createReport\n * @returns {Promise<Error>} Promise rejection containing the error\n */\n _handleReportRequestError(reason) {\n if (reason.body.errorCode === InvalidEmailAddressError.getErrorCode()) {\n try {\n const invalidEmails = JSON.parse(reason.body.message);\n\n if (Array.isArray(invalidEmails) && invalidEmails.length) {\n const invalidEmailAddressError = new InvalidEmailAddressError(invalidEmails);\n\n return Promise.reject(invalidEmailAddressError);\n }\n\n this.logger.warn('InvalidEmailAddress error received but the list could not be parsed to the correct format.');\n }\n catch (error) {\n // assume syntax error and continue\n this.logger.error('InvalidEmailAddress error received but an error occured while parsing the emails.');\n }\n }\n\n return Promise.reject(reason);\n },\n\n @waitForValue('@')\n /**\n * Retrieves information relating to a specified report\n * @param {UUID} reportId - Id of the report being requested\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity<ReportRecord>>} Http response containing the specified report record\n */\n async getReport(reportId, options) {\n if (!reportId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'GET',\n service: 'ediscovery',\n resource: `reports/${reportId}`,\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n /**\n * Retrieves all the compliance officers reports\n * @param {Object} options - optional parameters for this method\n * @param {number} options.offset - start position from which to retrieve records\n * @param {number} options.size - the number of records to retrieve\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity<Array<ReportRecord>>>} Http Response containing a list of report records\n */\n async getReports(options) {\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'GET',\n service: 'ediscovery',\n resource: 'reports',\n qs: {offset: options.offset, size: options.size},\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n /**\n * Deletes a specified report\n * @param {UUID} reportId - Id of the report being requested for deletion\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity>} HttpResponse indicating if delete was successful\n */\n async deleteReport(reportId, options) {\n if (!reportId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'DELETE',\n service: 'ediscovery',\n resource: `reports/${reportId}`,\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n /**\n * Restarts a completed or cancelled report so that it begins again from scratch\n * @param {UUID} reportId - Id of the report being requested\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity<ReportRecord>>} Http response containing the report record\n */\n async restartReport(reportId, options) {\n if (!reportId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'PUT',\n service: 'ediscovery',\n resource: `reports/${reportId}`,\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n @oneFlight({keyFactory: (reportId, options) => createOneFlightKey(reportId, options)})\n /**\n * Retrieves content associated with a report\n * @param {UUID|string} reportId - UUID or url of the report which contains the content\n * @param {Object} options - optional parameters for this method\n * @param {number} options.offset - start position from which to retrieve records\n * @param {number} options.size - the number of records to retrieve\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity<[Activity]>>} Http response containing the activities\n */\n async getContent(reportId, options) {\n if (!reportId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n const [requestOptions] = this._createRequestOptions(reportId, '/contents');\n\n return this.request({\n method: 'GET',\n ...requestOptions,\n qs: {offset: options.offset, size: options.size},\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n @oneFlight({keyFactory: (reportId, options) => createOneFlightKey(reportId, options)})\n /**\n * Retrieves a list of content containers relevant to a specified report\n * @param {UUID|string} reportId - UUID or url of the report being requested\n * @param {Object} options - optional parameters for this method\n * @param {number} options.offset - start position from which to retrieve records\n * @param {number} options.size - the number of records to retrieve\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @param {Set<Object>} options.types - Set of ContentContainerTypes to be retrieved\n * @returns {Promise<ResponseEntity<ContentContainer>>} Http response containing the content containers\n */\n async getContentContainer(reportId, options) {\n if (!reportId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n const [requestOptions, reportUUID] = this._createRequestOptions(reportId, '/contents/container');\n\n const res = await this.request({\n method: 'GET',\n ...requestOptions,\n qs: {offset: options.offset, size: options.size},\n timeout: options.timeoutMs,\n types: options.types\n });\n\n await this._writeToContentContainerCache(reportUUID, res.body);\n\n return res;\n },\n\n @waitForValue('@')\n @oneFlight({keyFactory: (reportId, containerId) => String(reportId + containerId)})\n /**\n * Retrieves information for a specific content container relevant to a specified report\n * @param {UUID|string} reportId - UUID or url of the report being requested\n * @param {UUID} containerId - Id of the contenyt container being requested\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity<ContentContainer>>} Http response containing the specified content container\n */\n async getContentContainerByContainerId(reportId, containerId, options) {\n if (!reportId || !containerId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n const [requestOptions, reportUUID] = this._createRequestOptions(reportId, `/contents/container/${containerId}`);\n\n // If this content container has already been cached then it can be retrieved from there instead of making a network call to ediscovery\n if (this.contentContainerCache.has(reportUUID) && this.contentContainerCache.get(reportUUID).has(containerId)) {\n return {body: this.contentContainerCache.get(reportUUID).get(containerId), statusCode: 200};\n }\n\n this.logger.warn(`Cache miss for container ${containerId} in contentContainerCache`);\n\n const res = await this.request({\n method: 'GET',\n ...requestOptions,\n qs: {offset: options.offset, size: options.size},\n timeout: options.timeoutMs\n });\n\n await this._writeToContentContainerCache(reportUUID, [res.body]);\n\n return res;\n },\n\n /**\n * The results of a getContentContainer or getContentContainerByContainerId request are written to the contentContainerCache\n * since information for a container is likely to be accessed very frequently when decrypting activities\n * @param {UUID} reportId - Id of the report which contains the relevant content summary\n * @param {Array<Object>} containers - List of the container objects to be written to the cache\n * @returns {Promise} - Promise resolution indicating operation is complete\n */\n _writeToContentContainerCache(reportId, containers) {\n if (!reportId || !containers || !containers.length) {\n return;\n }\n\n if (!this.contentContainerCache.has(reportId)) {\n this.contentContainerCache.set(reportId, new Map());\n }\n\n for (const container of containers) {\n if (container && container.containerId) {\n try {\n this.contentContainerCache.get(reportId).set(container.containerId, container);\n }\n catch (error) {\n this.logger.error(`Error adding ${container.containerId} to contentContainerCache: ${error}`);\n }\n }\n else {\n this.logger.error('Error adding undefined container to contentContainerCache');\n }\n }\n },\n\n /**\n * Wipe the cache used by eDiscovery to store the space summaries and content containers.\n * Good practice to clear it down when finished with a report to save RAM.\n * @returns {undefined}\n */\n clearCache() {\n this.contentContainerCache.clear();\n },\n\n /**\n * Retrieves a uuid string from a report url\n * @param {String} reportUrl - full destination address (including report id parameter) for the http request being sent\n * e.g. 'http://ediscovery-intb.wbx2.com/ediscovery/api/v1/reports/3b10e625-2bd5-4efa-b866-58d6c93c505c'\n * @returns {String} - uuid of the report\n */\n _getReportIdFromUrl(reportUrl) {\n if (reportUrl) {\n const uuids = reportUrl.match(/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/);\n\n if (uuids && uuids.length > 0) {\n return uuids[0];\n }\n }\n\n return '';\n },\n\n _isUrl(string) {\n // Regex found from `https://ihateregex.io/expr/url`\n return /https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&\\/\\/=]*)/g.test(string);\n },\n\n /**\n * Create the appropriate request options based on whether the reportId is a url or a uuid.\n * @param {UUID|string} reportId - May be either a url for the report or a uuid.\n * e.g. 'http://ediscovery-intb.wbx2.com/ediscovery/api/v1/reports/3b10e625-2bd5-4efa-b866-58d6c93c505c' or '3b10e625-2bd5-4efa-b866-58d6c93c505c'.\n * @param {String} resource - The resource on the remote server to request\n * @returns {[Options, uuid]} - The options to pass to `request` and the report uuid.\n */\n _createRequestOptions(reportId, resource) {\n let requestOptions;\n let reportUUID;\n const isUrl = this._isUrl(reportId);\n\n if (isUrl) {\n reportUUID = this._getReportIdFromUrl(reportId);\n\n if (!reportUUID) {\n throw Error('Report url does not contain a report id');\n }\n\n // Ensure the url is formatted to\n // https://ediscovery.intb1.ciscospark.com/ediscovery/api/v1/reports/16bf0d01-b1f7-483b-89a2-915144158fb9\n // index.js for example passes the url in as\n // https://ediscovery.intb1.ciscospark.com/ediscovery/api/v1/reports/16bf0d01-b1f7-483b-89a2-915144158fb9/contents\n const reportUrl = reportId.substring(0, reportId.lastIndexOf(reportUUID) + reportUUID.length);\n\n requestOptions = {\n url: reportUrl + resource\n };\n }\n else {\n requestOptions = {\n service: 'ediscovery',\n resource: `reports/${reportId}/${resource}`\n };\n reportUUID = reportId;\n }\n\n return [requestOptions, reportUUID];\n },\n\n @waitForValue('@')\n /**\n * Retrieves a config object from the service which can be used by the client for optimal performance, e.g. content page size\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<Config>} Http response containing the config object\n */\n async getClientConfig(options) {\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'GET',\n service: 'ediscovery',\n resource: 'reports/clientconfig',\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n /**\n * Submits an audit event to the eDiscovery service for admin use. Only expected to be used for\n * the getContentContainer API\n * @param {UUID} reportId - Id of the report to send an audit log for\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<Config>} Http response containing the config object\n */\n async postAuditLog(reportId, options) {\n if (!reportId) {\n throw Error('No report ID specified');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'POST',\n service: 'ediscovery',\n resource: `reports/${reportId}/audit/summary-download`,\n timeout: options.timeoutMs\n });\n }\n\n});\n\nexport default EDiscovery;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;AACA;AAEA;AAA4D;AAAA;AAAA;AAAA;AAAA;AAAA;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,CAACC,QAAQ,EAAEC,OAAO,EAAE;EAC7C,IAAIC,GAAG,GAAGC,MAAM,CAACH,QAAQ,CAAC;EAE1B,IAAIC,OAAO,EAAE;IACX,IAAIA,OAAO,CAACG,MAAM,EAAE;MAClBF,GAAG,IAAIC,MAAM,CAACF,OAAO,CAACG,MAAM,CAAC;IAC/B;IACA,IAAIH,OAAO,CAACI,IAAI,EAAE;MAChBH,GAAG,IAAIC,MAAM,CAACF,OAAO,CAACI,IAAI,CAAC;IAC7B;IACA,IAAIJ,OAAO,CAACK,KAAK,EAAE;MACjBJ,GAAG,IAAIC,MAAM,CAACF,OAAO,CAACK,KAAK,CAAC;IAC9B;EACF;EAEA,OAAOJ,GAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA,IAAMK,UAAU,GAAGC,sBAAW,CAACC,MAAM,SAYlC,IAAAC,uBAAY,EAAC,GAAG,CAAC,UA2DjB,IAAAA,uBAAY,EAAC,GAAG,CAAC,UAwBjB,IAAAA,uBAAY,EAAC,GAAG,CAAC,UAsBjB,IAAAA,uBAAY,EAAC,GAAG,CAAC,UAwBjB,IAAAA,uBAAY,EAAC,GAAG,CAAC,UAwBjB,IAAAA,uBAAY,EAAC,GAAG,CAAC,UACjB,IAAAC,iBAAS,EA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YAAA;QAAA;MAAA;IAAA;EACJ,CAAC;EAAA;AAEH,CAAC,28CAAC;AAAC,gBAEYvB,UAAU;AAAA"}
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_common","_ediscoveryError","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_dec11","_dec12","_dec13","_obj","_createForOfIteratorHelper","o","allowArrayLike","it","_Symbol","_Symbol$iterator","_Array$isArray2","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","normalCompletion","didErr","err","call","step","next","_e2","return","minLen","_arrayLikeToArray","Object","prototype","toString","slice","constructor","name","_Array$from","test","arr","len","arr2","Array","ownKeys","r","t","_Object$keys","_Object$getOwnPropertySymbols","filter","_Object$getOwnPropertyDescriptor2","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","createOneFlightKey","reportId","options","key","String","offset","size","types","EDiscovery","WebexPlugin","extend","waitForValue","oneFlight","keyFactory","containerId","namespace","session","contentContainerCache","type","_default","_map","createReport","reportRequest","_this","_asyncToGenerator2","_regenerator","mark","_callee","body","wrap","_callee$","_context","prev","Error","config","defaultOptions","request","method","service","resource","timeout","timeoutMs","abrupt","sent","t0","_handleReportRequestError","stop","reason","errorCode","InvalidEmailAddressError","getErrorCode","invalidEmails","JSON","parse","message","_isArray","invalidEmailAddressError","_promise","reject","logger","warn","error","getReport","_this2","_callee2","_callee2$","_context2","concat","getReports","_this3","_callee3","_callee3$","_context3","qs","deleteReport","_this4","_callee4","_callee4$","_context4","restartReport","_this5","_callee5","_callee5$","_context5","getContent","_this6","_callee6","_this6$_createRequest","_this6$_createRequest2","requestOptions","_callee6$","_context6","_createRequestOptions","_slicedToArray2","getContentContainer","_this7","_callee7","_this7$_createRequest","_this7$_createRequest2","reportUUID","res","_callee7$","_context7","_writeToContentContainerCache","getContentContainerByContainerId","_this8","_callee8","_this8$_createRequest","_this8$_createRequest2","_callee8$","_context8","has","get","statusCode","containers","set","_iterator","_step","container","clearCache","clear","_getReportIdFromUrl","reportUrl","uuids","match","_isUrl","string","isUrl","substring","lastIndexOf","url","getClientConfig","_this9","_callee9","_callee9$","_context9","postAuditLog","_this10","_callee10","_callee10$","_context10","version","_applyDecoratedDescriptor2","_getOwnPropertyDescriptor","_default2","exports"],"sources":["ediscovery.js"],"sourcesContent":["/* eslint-disable */\n\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nimport {waitForValue, WebexPlugin} from '@webex/webex-core';\nimport {oneFlight} from '@webex/common';\n\nimport {InvalidEmailAddressError} from './ediscovery-error';\n\n/**\n * Creates a unique oneflight key for a request from the reportId and options params\n * It is important that the offset params are included if present to ensure paged requests get back the correct data\n * @param {Object} reportId - A set of criteria for determining the focus of the search\n * @param {Object} options - optional parameters for this method\n * @returns {String} oneFlight key which is a composite of the request parameters\n */\nfunction createOneFlightKey(reportId, options) {\n let key = String(reportId);\n\n if (options) {\n if (options.offset) {\n key += String(options.offset);\n }\n if (options.size) {\n key += String(options.size);\n }\n if (options.types) {\n key += String(options.types);\n }\n }\n\n return key;\n}\n\n/**\n * @class EDiscovery is used by compliance officers to run compliance reports\n *\n */\nconst EDiscovery = WebexPlugin.extend({\n namespace: 'EDiscovery',\n\n session: {\n contentContainerCache: {\n type: 'object',\n default() {\n return new Map();\n }\n }\n },\n\n @waitForValue('@')\n /**\n * Creates a compliance report with a specific set of search parameters\n * @param {Object} reportRequest - A set of criteria for determining the focus of the search\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity>} Http response containing the new report record\n */\n async createReport(reportRequest, options) {\n if (!reportRequest) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n const body = reportRequest;\n\n try {\n return await this.request({\n method: 'POST',\n service: 'ediscovery',\n resource: 'reports',\n timeout: options.timeoutMs,\n body\n });\n }\n catch (reason) {\n return this._handleReportRequestError(reason);\n }\n },\n\n /**\n * Checks the error from createReport and ensures the appropriate error is sent to the client\n * @param {Error} reason - Error response thrown by the request to createReport\n * @returns {Promise<Error>} Promise rejection containing the error\n */\n _handleReportRequestError(reason) {\n if (reason.body.errorCode === InvalidEmailAddressError.getErrorCode()) {\n try {\n const invalidEmails = JSON.parse(reason.body.message);\n\n if (Array.isArray(invalidEmails) && invalidEmails.length) {\n const invalidEmailAddressError = new InvalidEmailAddressError(invalidEmails);\n\n return Promise.reject(invalidEmailAddressError);\n }\n\n this.logger.warn('InvalidEmailAddress error received but the list could not be parsed to the correct format.');\n }\n catch (error) {\n // assume syntax error and continue\n this.logger.error('InvalidEmailAddress error received but an error occured while parsing the emails.');\n }\n }\n\n return Promise.reject(reason);\n },\n\n @waitForValue('@')\n /**\n * Retrieves information relating to a specified report\n * @param {UUID} reportId - Id of the report being requested\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity<ReportRecord>>} Http response containing the specified report record\n */\n async getReport(reportId, options) {\n if (!reportId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'GET',\n service: 'ediscovery',\n resource: `reports/${reportId}`,\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n /**\n * Retrieves all the compliance officers reports\n * @param {Object} options - optional parameters for this method\n * @param {number} options.offset - start position from which to retrieve records\n * @param {number} options.size - the number of records to retrieve\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity<Array<ReportRecord>>>} Http Response containing a list of report records\n */\n async getReports(options) {\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'GET',\n service: 'ediscovery',\n resource: 'reports',\n qs: {offset: options.offset, size: options.size},\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n /**\n * Deletes a specified report\n * @param {UUID} reportId - Id of the report being requested for deletion\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity>} HttpResponse indicating if delete was successful\n */\n async deleteReport(reportId, options) {\n if (!reportId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'DELETE',\n service: 'ediscovery',\n resource: `reports/${reportId}`,\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n /**\n * Restarts a completed or cancelled report so that it begins again from scratch\n * @param {UUID} reportId - Id of the report being requested\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity<ReportRecord>>} Http response containing the report record\n */\n async restartReport(reportId, options) {\n if (!reportId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'PUT',\n service: 'ediscovery',\n resource: `reports/${reportId}`,\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n @oneFlight({keyFactory: (reportId, options) => createOneFlightKey(reportId, options)})\n /**\n * Retrieves content associated with a report\n * @param {UUID|string} reportId - UUID or url of the report which contains the content\n * @param {Object} options - optional parameters for this method\n * @param {number} options.offset - start position from which to retrieve records\n * @param {number} options.size - the number of records to retrieve\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity<[Activity]>>} Http response containing the activities\n */\n async getContent(reportId, options) {\n if (!reportId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n const [requestOptions] = this._createRequestOptions(reportId, '/contents');\n\n return this.request({\n method: 'GET',\n ...requestOptions,\n qs: {offset: options.offset, size: options.size},\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n @oneFlight({keyFactory: (reportId, options) => createOneFlightKey(reportId, options)})\n /**\n * Retrieves a list of content containers relevant to a specified report\n * @param {UUID|string} reportId - UUID or url of the report being requested\n * @param {Object} options - optional parameters for this method\n * @param {number} options.offset - start position from which to retrieve records\n * @param {number} options.size - the number of records to retrieve\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @param {Set<Object>} options.types - Set of ContentContainerTypes to be retrieved\n * @returns {Promise<ResponseEntity<ContentContainer>>} Http response containing the content containers\n */\n async getContentContainer(reportId, options) {\n if (!reportId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n const [requestOptions, reportUUID] = this._createRequestOptions(reportId, '/contents/container');\n\n const res = await this.request({\n method: 'GET',\n ...requestOptions,\n qs: {offset: options.offset, size: options.size},\n timeout: options.timeoutMs,\n types: options.types\n });\n\n await this._writeToContentContainerCache(reportUUID, res.body);\n\n return res;\n },\n\n @waitForValue('@')\n @oneFlight({keyFactory: (reportId, containerId) => String(reportId + containerId)})\n /**\n * Retrieves information for a specific content container relevant to a specified report\n * @param {UUID|string} reportId - UUID or url of the report being requested\n * @param {UUID} containerId - Id of the contenyt container being requested\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<ResponseEntity<ContentContainer>>} Http response containing the specified content container\n */\n async getContentContainerByContainerId(reportId, containerId, options) {\n if (!reportId || !containerId) {\n throw Error('Undefined parameter');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n const [requestOptions, reportUUID] = this._createRequestOptions(reportId, `/contents/container/${containerId}`);\n\n // If this content container has already been cached then it can be retrieved from there instead of making a network call to ediscovery\n if (this.contentContainerCache.has(reportUUID) && this.contentContainerCache.get(reportUUID).has(containerId)) {\n return {body: this.contentContainerCache.get(reportUUID).get(containerId), statusCode: 200};\n }\n\n this.logger.warn(`Cache miss for container ${containerId} in contentContainerCache`);\n\n const res = await this.request({\n method: 'GET',\n ...requestOptions,\n qs: {offset: options.offset, size: options.size},\n timeout: options.timeoutMs\n });\n\n await this._writeToContentContainerCache(reportUUID, [res.body]);\n\n return res;\n },\n\n /**\n * The results of a getContentContainer or getContentContainerByContainerId request are written to the contentContainerCache\n * since information for a container is likely to be accessed very frequently when decrypting activities\n * @param {UUID} reportId - Id of the report which contains the relevant content summary\n * @param {Array<Object>} containers - List of the container objects to be written to the cache\n * @returns {Promise} - Promise resolution indicating operation is complete\n */\n _writeToContentContainerCache(reportId, containers) {\n if (!reportId || !containers || !containers.length) {\n return;\n }\n\n if (!this.contentContainerCache.has(reportId)) {\n this.contentContainerCache.set(reportId, new Map());\n }\n\n for (const container of containers) {\n if (container && container.containerId) {\n try {\n this.contentContainerCache.get(reportId).set(container.containerId, container);\n }\n catch (error) {\n this.logger.error(`Error adding ${container.containerId} to contentContainerCache: ${error}`);\n }\n }\n else {\n this.logger.error('Error adding undefined container to contentContainerCache');\n }\n }\n },\n\n /**\n * Wipe the cache used by eDiscovery to store the space summaries and content containers.\n * Good practice to clear it down when finished with a report to save RAM.\n * @returns {undefined}\n */\n clearCache() {\n this.contentContainerCache.clear();\n },\n\n /**\n * Retrieves a uuid string from a report url\n * @param {String} reportUrl - full destination address (including report id parameter) for the http request being sent\n * e.g. 'http://ediscovery-intb.wbx2.com/ediscovery/api/v1/reports/3b10e625-2bd5-4efa-b866-58d6c93c505c'\n * @returns {String} - uuid of the report\n */\n _getReportIdFromUrl(reportUrl) {\n if (reportUrl) {\n const uuids = reportUrl.match(/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/);\n\n if (uuids && uuids.length > 0) {\n return uuids[0];\n }\n }\n\n return '';\n },\n\n _isUrl(string) {\n // Regex found from `https://ihateregex.io/expr/url`\n return /https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&\\/\\/=]*)/g.test(string);\n },\n\n /**\n * Create the appropriate request options based on whether the reportId is a url or a uuid.\n * @param {UUID|string} reportId - May be either a url for the report or a uuid.\n * e.g. 'http://ediscovery-intb.wbx2.com/ediscovery/api/v1/reports/3b10e625-2bd5-4efa-b866-58d6c93c505c' or '3b10e625-2bd5-4efa-b866-58d6c93c505c'.\n * @param {String} resource - The resource on the remote server to request\n * @returns {[Options, uuid]} - The options to pass to `request` and the report uuid.\n */\n _createRequestOptions(reportId, resource) {\n let requestOptions;\n let reportUUID;\n const isUrl = this._isUrl(reportId);\n\n if (isUrl) {\n reportUUID = this._getReportIdFromUrl(reportId);\n\n if (!reportUUID) {\n throw Error('Report url does not contain a report id');\n }\n\n // Ensure the url is formatted to\n // https://ediscovery.intb1.ciscospark.com/ediscovery/api/v1/reports/16bf0d01-b1f7-483b-89a2-915144158fb9\n // index.js for example passes the url in as\n // https://ediscovery.intb1.ciscospark.com/ediscovery/api/v1/reports/16bf0d01-b1f7-483b-89a2-915144158fb9/contents\n const reportUrl = reportId.substring(0, reportId.lastIndexOf(reportUUID) + reportUUID.length);\n\n requestOptions = {\n url: reportUrl + resource\n };\n }\n else {\n requestOptions = {\n service: 'ediscovery',\n resource: `reports/${reportId}/${resource}`\n };\n reportUUID = reportId;\n }\n\n return [requestOptions, reportUUID];\n },\n\n @waitForValue('@')\n /**\n * Retrieves a config object from the service which can be used by the client for optimal performance, e.g. content page size\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<Config>} Http response containing the config object\n */\n async getClientConfig(options) {\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'GET',\n service: 'ediscovery',\n resource: 'reports/clientconfig',\n timeout: options.timeoutMs\n });\n },\n\n @waitForValue('@')\n /**\n * Submits an audit event to the eDiscovery service for admin use. Only expected to be used for\n * the getContentContainer API\n * @param {UUID} reportId - Id of the report to send an audit log for\n * @param {Object} options - optional parameters for this method\n * @param {number} options.timeoutMs - connection timeout in milliseconds, defaults to 30s\n * @returns {Promise<Config>} Http response containing the config object\n */\n async postAuditLog(reportId, options) {\n if (!reportId) {\n throw Error('No report ID specified');\n }\n\n // use spread operator to set default options\n options = {...this.config.defaultOptions, ...options};\n\n return this.request({\n method: 'POST',\n service: 'ediscovery',\n resource: `reports/${reportId}/audit/summary-download`,\n timeout: options.timeoutMs\n });\n }\n\n});\n\nexport default EDiscovery;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AAA4D,IAAAG,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,IAAA;AAR5D;AAEA;AACA;AACA;AAFA,SAAAC,2BAAAC,CAAA,EAAAC,cAAA,QAAAC,EAAA,UAAAC,OAAA,oBAAAH,CAAA,CAAAI,gBAAA,KAAAJ,CAAA,qBAAAE,EAAA,QAAAG,eAAA,CAAAL,CAAA,MAAAE,EAAA,GAAAI,2BAAA,CAAAN,CAAA,MAAAC,cAAA,IAAAD,CAAA,WAAAA,CAAA,CAAAO,MAAA,qBAAAL,EAAA,EAAAF,CAAA,GAAAE,EAAA,MAAAM,CAAA,UAAAC,CAAA,YAAAA,EAAA,eAAAC,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAA,EAAA,QAAAH,CAAA,IAAAR,CAAA,CAAAO,MAAA,WAAAK,IAAA,mBAAAA,IAAA,SAAAC,KAAA,EAAAb,CAAA,CAAAQ,CAAA,UAAAM,CAAA,WAAAA,EAAAC,EAAA,UAAAA,EAA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lJ,OAAA,EAAAxD,IAAA,iBAAAX,KAAA,OAAAsN,yBAAA,CAAAnJ,OAAA,EAAAxD,IAAA,iBAAAA,IAAA,OAAA0M,0BAAA,CAAAlJ,OAAA,EAAAxD,IAAA,mBAAAV,KAAA,OAAAqN,yBAAA,CAAAnJ,OAAA,EAAAxD,IAAA,mBAAAA,IAAA,OAAA0M,0BAAA,CAAAlJ,OAAA,EAAAxD,IAAA,oBAAAT,KAAA,OAAAoN,yBAAA,CAAAnJ,OAAA,EAAAxD,IAAA,oBAAAA,IAAA,OAAA0M,0BAAA,CAAAlJ,OAAA,EAAAxD,IAAA,iBAAAR,KAAA,EAAAC,KAAA,OAAAkN,yBAAA,CAAAnJ,OAAA,EAAAxD,IAAA,iBAAAA,IAAA,OAAA0M,0BAAA,CAAAlJ,OAAA,EAAAxD,IAAA,0BAAAN,KAAA,EAAAC,KAAA,OAAAgN,yBAAA,CAAAnJ,OAAA,EAAAxD,IAAA,0BAAAA,IAAA,OAAA0M,0BAAA,CAAAlJ,OAAA,EAAAxD,IAAA,uCAAAJ,MAAA,EAAAC,MAAA,OAAA8M,yBAAA,CAAAnJ,OAAA,EAAAxD,IAAA,uCAAAA,IAAA,OAAA0M,0BAAA,CAAAlJ,OAAA,EAAAxD,IAAA,sBAAAF,MAAA,OAAA6M,yBAAA,CAAAnJ,OAAA,EAAAxD,IAAA,sBAAAA,IAAA,OAAA0M,0BAAA,CAAAlJ,OAAA,EAAAxD,IAAA,mBAAAD,MAAA,OAAA4M,yBAAA,CAAAnJ,OAAA,EAAAxD,IAAA,mBAAAA,IAAA,IAAAA,IAAA,GAAC;AAAC,IAAA4M,SAAA,GAAAC,OAAA,CAAArJ,OAAA,GAEYY,UAAU"}
|
package/dist/index.js
CHANGED
|
@@ -34,17 +34,17 @@ _Object$defineProperty(exports, "config", {
|
|
|
34
34
|
});
|
|
35
35
|
exports.default = void 0;
|
|
36
36
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
37
|
-
var _has2 = _interopRequireDefault(require("lodash/has"));
|
|
38
37
|
require("@webex/internal-plugin-encryption");
|
|
39
38
|
require("@webex/internal-plugin-conversation");
|
|
40
39
|
var _webexCore = require("@webex/webex-core");
|
|
40
|
+
var _lodash = require("lodash");
|
|
41
41
|
var _ediscovery = _interopRequireDefault(require("./ediscovery"));
|
|
42
42
|
var _transforms = _interopRequireDefault(require("./transforms"));
|
|
43
43
|
var _config = _interopRequireWildcard(require("./config"));
|
|
44
44
|
var _reportRequest = _interopRequireDefault(require("./report-request"));
|
|
45
45
|
var _ediscoveryError = require("./ediscovery-error");
|
|
46
|
-
function _getRequireWildcardCache(
|
|
47
|
-
function _interopRequireWildcard(
|
|
46
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
47
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
48
48
|
/*!
|
|
49
49
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
50
50
|
*/
|
|
@@ -57,7 +57,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
57
57
|
name: 'decryptReportRequest',
|
|
58
58
|
direction: 'inbound',
|
|
59
59
|
test: function test(ctx, object) {
|
|
60
|
-
return _promise.default.resolve((0,
|
|
60
|
+
return _promise.default.resolve((0, _lodash.has)(object, 'body.reportRequest'));
|
|
61
61
|
},
|
|
62
62
|
extract: function extract(object) {
|
|
63
63
|
return _promise.default.resolve(object);
|
|
@@ -66,7 +66,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
66
66
|
name: 'decryptReportRequestArray',
|
|
67
67
|
direction: 'inbound',
|
|
68
68
|
test: function test(ctx, object) {
|
|
69
|
-
return _promise.default.resolve((0,
|
|
69
|
+
return _promise.default.resolve((0, _lodash.has)(object, 'body[0].reportRequest'));
|
|
70
70
|
},
|
|
71
71
|
extract: function extract(object) {
|
|
72
72
|
return _promise.default.resolve(object);
|
|
@@ -75,7 +75,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
75
75
|
name: 'encryptReportRequest',
|
|
76
76
|
direction: 'outbound',
|
|
77
77
|
test: function test(ctx, object) {
|
|
78
|
-
return _promise.default.resolve((0,
|
|
78
|
+
return _promise.default.resolve((0, _lodash.has)(object, 'body.keywords') || (0, _lodash.has)(object, 'body.spaceNames') || (0, _lodash.has)(object, 'body.emails'));
|
|
79
79
|
},
|
|
80
80
|
extract: function extract(object) {
|
|
81
81
|
return _promise.default.resolve(object);
|
|
@@ -84,7 +84,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
84
84
|
name: 'decryptReportContent',
|
|
85
85
|
direction: 'inbound',
|
|
86
86
|
test: function test(ctx, object) {
|
|
87
|
-
return _promise.default.resolve((0,
|
|
87
|
+
return _promise.default.resolve((0, _lodash.has)(object, 'body.activityId'));
|
|
88
88
|
},
|
|
89
89
|
extract: function extract(object) {
|
|
90
90
|
return _promise.default.resolve(object);
|
|
@@ -93,7 +93,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
93
93
|
name: 'decryptReportContentArray',
|
|
94
94
|
direction: 'inbound',
|
|
95
95
|
test: function test(ctx, object) {
|
|
96
|
-
return _promise.default.resolve((0,
|
|
96
|
+
return _promise.default.resolve((0, _lodash.has)(object, 'body[0].activityId'));
|
|
97
97
|
},
|
|
98
98
|
extract: function extract(object) {
|
|
99
99
|
return _promise.default.resolve(object);
|
|
@@ -102,7 +102,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
102
102
|
name: 'decryptReportContentContainer',
|
|
103
103
|
direction: 'inbound',
|
|
104
104
|
test: function test(ctx, object) {
|
|
105
|
-
return _promise.default.resolve((0,
|
|
105
|
+
return _promise.default.resolve((0, _lodash.has)(object, 'body.containerId'));
|
|
106
106
|
},
|
|
107
107
|
extract: function extract(object) {
|
|
108
108
|
return _promise.default.resolve(object);
|
|
@@ -111,7 +111,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
111
111
|
name: 'decryptReportContentContainerArray',
|
|
112
112
|
direction: 'inbound',
|
|
113
113
|
test: function test(ctx, object) {
|
|
114
|
-
return _promise.default.resolve((0,
|
|
114
|
+
return _promise.default.resolve((0, _lodash.has)(object, 'body[0].containerId'));
|
|
115
115
|
},
|
|
116
116
|
extract: function extract(object) {
|
|
117
117
|
return _promise.default.resolve(object);
|
|
@@ -185,6 +185,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
185
185
|
}]
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
|
-
var _default = _ediscovery.default; // eslint-disable-next-line import/named
|
|
189
|
-
exports.default = _default;
|
|
188
|
+
var _default = exports.default = _ediscovery.default; // eslint-disable-next-line import/named
|
|
190
189
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registerInternalPlugin","EDiscovery","config","payloadTransformer","predicates","name","direction","test","ctx","object","resolve","extract","transforms","fn","Transforms","decryptReportRequest","body","all","map","item","transform","encryptReportRequest","reportId","decryptReportContent","options","uri","decryptReportContentContainer"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/* eslint-disable */\n\nimport '@webex/internal-plugin-encryption';\nimport '@webex/internal-plugin-conversation';\n\nimport {registerInternalPlugin} from '@webex/webex-core';\nimport {has} from 'lodash';\n\nimport EDiscovery from './ediscovery';\nimport Transforms from './transforms';\nimport config from './config';\n\nregisterInternalPlugin('ediscovery', EDiscovery, {\n config,\n payloadTransformer: {\n predicates: [\n {\n name: 'decryptReportRequest',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body.reportRequest'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'decryptReportRequestArray',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body[0].reportRequest'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'encryptReportRequest',\n direction: 'outbound',\n test(ctx, object) {\n return Promise.resolve(\n has(object, 'body.keywords') ||\n has(object, 'body.spaceNames') ||\n has(object, 'body.emails')\n );\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'decryptReportContent',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body.activityId'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'decryptReportContentArray',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body[0].activityId'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'decryptReportContentContainer',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body.containerId'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'decryptReportContentContainerArray',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body[0].containerId'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n ],\n transforms: [\n {\n name: 'decryptReportRequest',\n direction: 'inbound',\n fn(ctx, object) {\n return Transforms.decryptReportRequest(ctx, object);\n },\n },\n {\n name: 'decryptReportRequestArray',\n direction: 'inbound',\n fn(ctx, object) {\n if (!object || !object.body) {\n return Promise.resolve();\n }\n\n return Promise.all(\n object.body.map((item) => ctx.transform('decryptReportRequest', {body: item}))\n );\n },\n },\n {\n name: 'encryptReportRequest',\n direction: 'outbound',\n fn(ctx, object) {\n return Transforms.encryptReportRequest(ctx, object);\n },\n },\n {\n name: 'decryptReportContent',\n direction: 'inbound',\n fn(ctx, object, reportId) {\n return Transforms.decryptReportContent(ctx, object, reportId);\n },\n },\n {\n name: 'decryptReportContentArray',\n direction: 'inbound',\n fn(ctx, object) {\n if (!object || !object.body) {\n return Promise.resolve();\n }\n\n // Always use the report url as this'll resolve correctly for remote reports\n return Promise.all(\n object.body.map((item) =>\n ctx.transform('decryptReportContent', {body: item}, object.options.uri)\n )\n );\n },\n },\n {\n name: 'decryptReportContentContainer',\n direction: 'inbound',\n fn(ctx, object) {\n return Transforms.decryptReportContentContainer(ctx, object);\n },\n },\n {\n name: 'decryptReportContentContainerArray',\n direction: 'inbound',\n fn(ctx, object) {\n if (!object || !object.body) {\n return Promise.resolve();\n }\n\n return Promise.all(\n object.body.map((item) => ctx.transform('decryptReportContentContainer', {body: item}))\n );\n },\n },\n ],\n },\n});\n\nexport default EDiscovery;\n\n// eslint-disable-next-line import/named\nexport {config} from './config';\nexport {default as ReportRequest} from './report-request';\nexport {EdiscoveryError, InvalidEmailAddressError} from './ediscovery-error';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;AACA;AAEA;AAGA;AACA;AACA;AAgKA;AACA;AAA6E;AAAA;AA9K7E;AACA;AACA;AACA;;AAYA,IAAAA,iCAAsB,EAAC,YAAY,EAAEC,mBAAU,EAAE;EAC/CC,MAAM,EAANA,eAAM;EACNC,kBAAkB,EAAE;IAClBC,UAAU,EAAE,CACV;MACEC,IAAI,EAAE,sBAAsB;MAC5BC,SAAS,EAAE,SAAS;MACpBC,IAAI,gBAACC,GA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G,EAAEC,MAAM,EAAE;QACd,IAAI,CAACA,MAAM,IAAI,CAACA,MAAM,CAACO,IAAI,EAAE;UAC3B,OAAO,iBAAQN,OAAO,EAAE;QAC1B;QAEA,OAAO,iBAAQO,GAAG,CAChBR,MAAM,CAACO,IAAI,CAACE,GAAG,CAAC,UAACC,IAAI;UAAA,OAAKX,GAAG,CAACY,SAAS,CAAC,+BAA+B,EAAE;YAACJ,IAAI,EAAEG;UAAI,CAAC,CAAC;QAAA,EAAC,CACxF;MACH;IACF,CAAC;EAEL;AACF,CAAC,CAAC;AAAC,eAEYlB,mBAAU,EAEzB;AAAA"}
|
|
1
|
+
{"version":3,"names":["require","_webexCore","_lodash","_ediscovery","_interopRequireDefault","_transforms","_config","_interopRequireWildcard","_reportRequest","_ediscoveryError","_getRequireWildcardCache","e","_WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","_Object$defineProperty","_Object$getOwnPropertyDescriptor","u","Object","prototype","hasOwnProperty","call","i","set","registerInternalPlugin","EDiscovery","config","payloadTransformer","predicates","name","direction","test","ctx","object","_promise","resolve","extract","transforms","fn","Transforms","decryptReportRequest","body","all","map","item","transform","encryptReportRequest","reportId","decryptReportContent","options","uri","decryptReportContentContainer","_default","exports"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/* eslint-disable */\n\nimport '@webex/internal-plugin-encryption';\nimport '@webex/internal-plugin-conversation';\n\nimport {registerInternalPlugin} from '@webex/webex-core';\nimport {has} from 'lodash';\n\nimport EDiscovery from './ediscovery';\nimport Transforms from './transforms';\nimport config from './config';\n\nregisterInternalPlugin('ediscovery', EDiscovery, {\n config,\n payloadTransformer: {\n predicates: [\n {\n name: 'decryptReportRequest',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body.reportRequest'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'decryptReportRequestArray',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body[0].reportRequest'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'encryptReportRequest',\n direction: 'outbound',\n test(ctx, object) {\n return Promise.resolve(\n has(object, 'body.keywords') ||\n has(object, 'body.spaceNames') ||\n has(object, 'body.emails')\n );\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'decryptReportContent',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body.activityId'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'decryptReportContentArray',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body[0].activityId'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'decryptReportContentContainer',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body.containerId'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n {\n name: 'decryptReportContentContainerArray',\n direction: 'inbound',\n test(ctx, object) {\n return Promise.resolve(has(object, 'body[0].containerId'));\n },\n extract(object) {\n return Promise.resolve(object);\n },\n },\n ],\n transforms: [\n {\n name: 'decryptReportRequest',\n direction: 'inbound',\n fn(ctx, object) {\n return Transforms.decryptReportRequest(ctx, object);\n },\n },\n {\n name: 'decryptReportRequestArray',\n direction: 'inbound',\n fn(ctx, object) {\n if (!object || !object.body) {\n return Promise.resolve();\n }\n\n return Promise.all(\n object.body.map((item) => ctx.transform('decryptReportRequest', {body: item}))\n );\n },\n },\n {\n name: 'encryptReportRequest',\n direction: 'outbound',\n fn(ctx, object) {\n return Transforms.encryptReportRequest(ctx, object);\n },\n },\n {\n name: 'decryptReportContent',\n direction: 'inbound',\n fn(ctx, object, reportId) {\n return Transforms.decryptReportContent(ctx, object, reportId);\n },\n },\n {\n name: 'decryptReportContentArray',\n direction: 'inbound',\n fn(ctx, object) {\n if (!object || !object.body) {\n return Promise.resolve();\n }\n\n // Always use the report url as this'll resolve correctly for remote reports\n return Promise.all(\n object.body.map((item) =>\n ctx.transform('decryptReportContent', {body: item}, object.options.uri)\n )\n );\n },\n },\n {\n name: 'decryptReportContentContainer',\n direction: 'inbound',\n fn(ctx, object) {\n return Transforms.decryptReportContentContainer(ctx, object);\n },\n },\n {\n name: 'decryptReportContentContainerArray',\n direction: 'inbound',\n fn(ctx, object) {\n if (!object || !object.body) {\n return Promise.resolve();\n }\n\n return Promise.all(\n object.body.map((item) => ctx.transform('decryptReportContentContainer', {body: item}))\n );\n },\n },\n ],\n },\n});\n\nexport default EDiscovery;\n\n// eslint-disable-next-line import/named\nexport {config} from './config';\nexport {default as ReportRequest} from './report-request';\nexport {EdiscoveryError, InvalidEmailAddressError} from './ediscovery-error';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKAA,OAAA;AACAA,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,OAAA,GAAAC,uBAAA,CAAAP,OAAA;AAgKA,IAAAQ,cAAA,GAAAJ,sBAAA,CAAAJ,OAAA;AACA,IAAAS,gBAAA,GAAAT,OAAA;AAA6E,SAAAU,yBAAAC,CAAA,6BAAAC,QAAA,mBAAAC,CAAA,OAAAD,QAAA,IAAAE,CAAA,OAAAF,QAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,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OAAO,CAACC,GAAG,CAAC;QAAA,CACzE,CACF,CAAC;MACH;IACF,CAAC,EACD;MACErB,IAAI,EAAE,+BAA+B;MACrCC,SAAS,EAAE,SAAS;MACpBQ,EAAE,WAAAA,GAACN,GAAG,EAAEC,MAAM,EAAE;QACd,OAAOM,mBAAU,CAACY,6BAA6B,CAACnB,GAAG,EAAEC,MAAM,CAAC;MAC9D;IACF,CAAC,EACD;MACEJ,IAAI,EAAE,oCAAoC;MAC1CC,SAAS,EAAE,SAAS;MACpBQ,EAAE,WAAAA,GAACN,GAAG,EAAEC,MAAM,EAAE;QACd,IAAI,CAACA,MAAM,IAAI,CAACA,MAAM,CAACQ,IAAI,EAAE;UAC3B,OAAOP,QAAA,CAAAzB,OAAA,CAAQ0B,OAAO,CAAC,CAAC;QAC1B;QAEA,OAAOD,QAAA,CAAAzB,OAAA,CAAQiC,GAAG,CAChBT,MAAM,CAACQ,IAAI,CAACE,GAAG,CAAC,UAACC,IAAI;UAAA,OAAKZ,GAAG,CAACa,SAAS,CAAC,+BAA+B,EAAE;YAACJ,IAAI,EAAEG;UAAI,CAAC,CAAC;QAAA,EACxF,CAAC;MACH;IACF,CAAC;EAEL;AACF,CAAC,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAA5C,OAAA,GAEYgB,mBAAU,EAEzB"}
|
package/dist/report-request.js
CHANGED
|
@@ -41,6 +41,5 @@ var ReportRequest = /*#__PURE__*/(0, _createClass2.default)(function ReportReque
|
|
|
41
41
|
this.spaceNames = spaceNames;
|
|
42
42
|
this.range = range;
|
|
43
43
|
});
|
|
44
|
-
var _default = ReportRequest;
|
|
45
|
-
exports.default = _default;
|
|
44
|
+
var _default = exports.default = ReportRequest;
|
|
46
45
|
//# sourceMappingURL=report-request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ReportRequest","name","description","emails","userIds","keywords","encryptionKeyUrl","spaceNames","range","startTime","endTime"],"sources":["report-request.js"],"sourcesContent":["/**\n * Creates a report request object with a specific set of search parameters\n * @param {String} name - A label to identify the report\n * @param {String} description - A textual summary of the reports purpose\n * @param {Array<String>} emails - A list of user emails relevant to the report\n * @param {Array<String>} userIds - A list of UUIDs relevant to the report\n * @param {Array<String>} keywords - A list of search terms relevant to the report\n * @param {Array<String>} spaceNames - A list of space names relevant to the report\n * @param {Object} range - Contains the start time and end time defining the search period\n * @returns {Object} ReportRequest - Contains all search parameters\n */\nclass ReportRequest {\n constructor(\n name = '',\n description = '',\n emails = [],\n userIds = [],\n keywords = [],\n encryptionKeyUrl = '',\n spaceNames = [],\n range = {startTime: '2020-01-01T00:00:00', endTime: '2020-01-01T23:59:59'}\n ) {\n this.name = name;\n this.description = description;\n this.emails = emails;\n this.userIds = userIds;\n this.keywords = keywords;\n this.encryptionKeyUrl = encryptionKeyUrl;\n this.spaceNames = spaceNames;\n this.range = range;\n }\n}\n\nexport default ReportRequest;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAWMA,aAAa,
|
|
1
|
+
{"version":3,"names":["ReportRequest","_createClass2","default","name","arguments","length","undefined","description","emails","userIds","keywords","encryptionKeyUrl","spaceNames","range","startTime","endTime","_classCallCheck2","_default","exports"],"sources":["report-request.js"],"sourcesContent":["/**\n * Creates a report request object with a specific set of search parameters\n * @param {String} name - A label to identify the report\n * @param {String} description - A textual summary of the reports purpose\n * @param {Array<String>} emails - A list of user emails relevant to the report\n * @param {Array<String>} userIds - A list of UUIDs relevant to the report\n * @param {Array<String>} keywords - A list of search terms relevant to the report\n * @param {Array<String>} spaceNames - A list of space names relevant to the report\n * @param {Object} range - Contains the start time and end time defining the search period\n * @returns {Object} ReportRequest - Contains all search parameters\n */\nclass ReportRequest {\n constructor(\n name = '',\n description = '',\n emails = [],\n userIds = [],\n keywords = [],\n encryptionKeyUrl = '',\n spaceNames = [],\n range = {startTime: '2020-01-01T00:00:00', endTime: '2020-01-01T23:59:59'}\n ) {\n this.name = name;\n this.description = description;\n this.emails = emails;\n this.userIds = userIds;\n this.keywords = keywords;\n this.encryptionKeyUrl = encryptionKeyUrl;\n this.spaceNames = spaceNames;\n this.range = range;\n }\n}\n\nexport default ReportRequest;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAWMA,aAAa,oBAAAC,aAAA,CAAAC,OAAA,EACjB,SAAAF,cAAA,EASE;EAAA,IARAG,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IACTG,WAAW,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IAChBI,MAAM,GAAAJ,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IACXK,OAAO,GAAAL,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IACZM,QAAQ,GAAAN,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IACbO,gBAAgB,GAAAP,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IACrBQ,UAAU,GAAAR,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IACfS,KAAK,GAAAT,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;IAACU,SAAS,EAAE,qBAAqB;IAAEC,OAAO,EAAE;EAAqB,CAAC;EAAA,IAAAC,gBAAA,CAAAd,OAAA,QAAAF,aAAA;EAE1E,IAAI,CAACG,IAAI,GAAGA,IAAI;EAChB,IAAI,CAACI,WAAW,GAAGA,WAAW;EAC9B,IAAI,CAACC,MAAM,GAAGA,MAAM;EACpB,IAAI,CAACC,OAAO,GAAGA,OAAO;EACtB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;EACxB,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB;EACxC,IAAI,CAACC,UAAU,GAAGA,UAAU;EAC5B,IAAI,CAACC,KAAK,GAAGA,KAAK;AACpB,CAAC;AAAA,IAAAI,QAAA,GAAAC,OAAA,CAAAhB,OAAA,GAGYF,aAAa"}
|
package/dist/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["retryErrors","requestWithRetries","ctx","func","args","retryCount","retryIntervalInSeconds","maxRetries","timeout","
|
|
1
|
+
{"version":3,"names":["retryErrors","requestWithRetries","_x","_x2","_x3","_requestWithRetries","apply","arguments","_asyncToGenerator2","default","_regenerator","mark","_callee","ctx","func","args","retryCount","retryIntervalInSeconds","maxRetries","_args","wrap","_callee$","_context","prev","next","length","undefined","timeout","abrupt","catch","reason","includes","statusCode","Math","pow","headers","console","error","concat","_promise","reject","stop","sec","resolve","setTimeout","module","exports"],"sources":["retry.js"],"sourcesContent":["const retryErrors = [429, 502, 503, 504];\n\nasync function requestWithRetries(\n ctx,\n func,\n args,\n retryCount = 0,\n retryIntervalInSeconds = 0,\n maxRetries = 3\n) {\n await timeout(retryIntervalInSeconds);\n\n return func.apply(ctx, args).catch((reason) => {\n if (retryErrors.includes(reason.statusCode) && retryCount < maxRetries) {\n retryCount += 1;\n // eslint-disable-next-line no-shadow\n let retryIntervalInSeconds = (retryCount + 1) ** 2; // 4, 9 and 16 second delays as default\n\n if (reason.headers && reason.headers['retry-after']) {\n retryIntervalInSeconds = reason.headers['retry-after'];\n }\n console.error(\n `Request #${retryCount} error: ${reason.statusCode}. Attempting retry #${retryCount} in ${retryIntervalInSeconds} seconds`\n );\n\n return requestWithRetries(ctx, func, args, retryCount, retryIntervalInSeconds, maxRetries);\n }\n\n return Promise.reject(reason);\n });\n}\n\nfunction timeout(sec) {\n // return immediately if timeout is zero or undefined\n if (!sec) {\n return Promise.resolve();\n }\n\n return new Promise((resolve) => setTimeout(resolve, sec * 1000));\n}\n\nmodule.exports.requestWithRetries = requestWithRetries;\nmodule.exports.timeout = timeout;\n"],"mappings":";;;;;;AAAA,IAAMA,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAAC,SAE1BC,kBAAkBA,CAAAC,EAAA,EAAAC,GAAA,EAAAC,GAAA;EAAA,OAAAC,mBAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,oBAAA;EAAAA,mBAAA,OAAAG,kBAAA,CAAAC,OAAA,gBAAAC,YAAA,CAAAD,OAAA,CAAAE,IAAA,CAAjC,SAAAC,QACEC,GAAG,EACHC,IAAI,EACJC,IAAI;IAAA,IAAAC,UAAA;MAAAC,sBAAA;MAAAC,UAAA;MAAAC,KAAA,GAAAZ,SAAA;IAAA,OAAAG,YAAA,CAAAD,OAAA,CAAAW,IAAA,UAAAC,SAAAC,QAAA;MAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;QAAA;UACJR,UAAU,GAAAG,KAAA,CAAAM,MAAA,QAAAN,KAAA,QAAAO,SAAA,GAAAP,KAAA,MAAG,CAAC;UACdF,sBAAsB,GAAAE,KAAA,CAAAM,MAAA,QAAAN,KAAA,QAAAO,SAAA,GAAAP,KAAA,MAAG,CAAC;UAC1BD,UAAU,GAAAC,KAAA,CAAAM,MAAA,QAAAN,KAAA,QAAAO,SAAA,GAAAP,KAAA,MAAG,CAAC;UAAAG,QAAA,CAAAE,IAAA;UAAA,OAERG,OAAO,CAACV,sBAAsB,CAAC;QAAA;UAAA,OAAAK,QAAA,CAAAM,MAAA,WAE9Bd,IAAI,CAACR,KAAK,CAACO,GAAG,EAAEE,IAAI,CAAC,CAACc,KAAK,CAAC,UAACC,MAAM,EAAK;YAC7C,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OAAO,CAACnB,OAAO,GAAGA,OAAO"}
|
package/dist/transforms.js
CHANGED
package/dist/transforms.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Transforms","ctx","object","body","resolve","reportRequest","webex","internal","encryption","kms","createUnboundKeys","count","then","keys","length","encryptionKeyUrl","uri","createResource","userIds","userId","promises","name","push","encryptText","encryptedName","description","encryptedDescription","spaceNames","all","map","spaceName","encryptedSpaceNames","keywords","keyword","encryptedKeywords","emails","unencryptedEmails","email","encryptedEmails","catch","reason","logger","error","reject","reportNamePromise","decryptText","decryptedName","id","reportDescriptionPromise","decryptedDescription","spaceNamePromises","decryptedSpaceNames","keywordPromises","decryptedKeywords","emailPromises","decryptedEmails","concat","reportId","activity","ediscovery","getContentContainerByContainerId","targetId","res","container","activityId","warning","spaceWarning","containerWarning","containerName","isOneOnOne","displayNames","participants","formerParticipants","p","displayName","join","includes","verb","meeting","recording","extension","extensionType","spaceInfo","encryptedTextKeyValues","info","undefined","onBehalfOfUser","objectDisplayName","requestWithRetries","onBehalfOf","decryptedMessage","previousName","previousEncryptionKeyUrl","objectType","contentUrl","decryptedContentUrl","decryptedDisplayName","webUrl","decryptedWebUrl","previous","decryptedPreviousContentUrl","decryptedPreviousDisplayName","key","value","title","topic","shares","Array","prototype","apply","files","whiteboards","links","share","i","warn","mimeType","fileSize","url","microsoftSharedLinkInfo","driveId","decryptedDriveId","itemId","decryptedItemId","scr","sslr","decryptScr","decryptedSCR","loc","containerType","containerId","descriptionEncryptionKeyUrl","decryptedContainerDescription","decryptedContainerName"],"sources":["transforms.js"],"sourcesContent":["import {requestWithRetries} from './retry';\n\n/**\n * This class is used to encrypt/decrypt various properties on ReportRequests, Activities and Spaces as they are sent/returned to/from the eDiscovery Service\n */\nclass Transforms {\n /**\n * This function is used to encrypt sensitive properties on the ReportRequest before it is sent to the eDiscovery Service createReport API\n * @param {Object} ctx - An object containing a webex instance and a transform\n * @param {Object} object - Generic object that you want to encrypt some property on based on the type\n * @returns {Promise} - Returns a transform promise\n */\n static encryptReportRequest(ctx, object) {\n if (!object || !object.body) {\n return Promise.resolve(object);\n }\n const reportRequest = object.body;\n\n return ctx.webex.internal.encryption.kms\n .createUnboundKeys({count: 1})\n .then((keys) => {\n if (keys && keys.length > 0 && keys[0]) {\n reportRequest.encryptionKeyUrl = keys[0].uri;\n\n return ctx.webex.internal.encryption.kms\n .createResource({userIds: [keys[0].userId], keys})\n .then(() => {\n const promises = [];\n\n if (reportRequest.name) {\n promises.push(\n ctx.webex.internal.encryption\n .encryptText(keys[0], reportRequest.name)\n .then((encryptedName) => {\n reportRequest.name = encryptedName;\n })\n );\n }\n\n if (reportRequest.description) {\n promises.push(\n ctx.webex.internal.encryption\n .encryptText(keys[0], reportRequest.description)\n .then((encryptedDescription) => {\n reportRequest.description = encryptedDescription;\n })\n );\n }\n\n if (reportRequest.spaceNames) {\n promises.push(\n Promise.all(\n reportRequest.spaceNames.map((spaceName) =>\n ctx.webex.internal.encryption.encryptText(keys[0], spaceName)\n )\n ).then((encryptedSpaceNames) => {\n reportRequest.spaceNames = encryptedSpaceNames;\n })\n );\n }\n\n if (reportRequest.keywords) {\n promises.push(\n Promise.all(\n reportRequest.keywords.map((keyword) =>\n ctx.webex.internal.encryption.encryptText(keys[0], keyword)\n )\n ).then((encryptedKeywords) => {\n reportRequest.keywords = encryptedKeywords;\n })\n );\n }\n\n if (reportRequest.emails) {\n // store unencrypted emails for ediscovery service to convert to user ids\n reportRequest.unencryptedEmails = reportRequest.emails;\n promises.push(\n Promise.all(\n reportRequest.emails.map((email) =>\n ctx.webex.internal.encryption.encryptText(keys[0], email)\n )\n ).then((encryptedEmails) => {\n reportRequest.emails = encryptedEmails;\n })\n );\n }\n\n return Promise.all(promises);\n });\n }\n\n return Promise.resolve(object);\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error while encrypting report request: ${reportRequest} : ${reason}`\n );\n\n return Promise.reject(reason);\n });\n }\n\n /**\n * This function is used to decrypt encrypted properties on the ReportRequest that is returned from the eDiscovery Service getReport(s) API\n * @param {Object} ctx - An object containing a webex instance and a transform\n * @param {Object} object - Generic object that you want to decrypt some property on based on the type\n * @returns {Promise} - Returns a transform promise\n */\n static decryptReportRequest(ctx, object) {\n if (\n !object ||\n !object.body ||\n !object.body.reportRequest ||\n !object.body.reportRequest.encryptionKeyUrl\n ) {\n return Promise.resolve(object);\n }\n const {reportRequest} = object.body;\n\n let reportNamePromise;\n\n if (reportRequest.name) {\n reportNamePromise = ctx.webex.internal.encryption\n .decryptText(reportRequest.encryptionKeyUrl, reportRequest.name)\n .then((decryptedName) => {\n reportRequest.name = decryptedName;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error decrypting report name for report ${object.body.id}: ${reason}`\n );\n });\n }\n\n let reportDescriptionPromise;\n\n if (reportRequest.description) {\n reportDescriptionPromise = ctx.webex.internal.encryption\n .decryptText(reportRequest.encryptionKeyUrl, reportRequest.description)\n .then((decryptedDescription) => {\n reportRequest.description = decryptedDescription;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error decrypting description for report ${object.body.id}: ${reason}`\n );\n });\n }\n\n let spaceNamePromises = [];\n\n if (reportRequest.spaceNames) {\n spaceNamePromises = Promise.all(\n reportRequest.spaceNames.map((spaceName) =>\n ctx.webex.internal.encryption.decryptText(reportRequest.encryptionKeyUrl, spaceName)\n )\n )\n .then((decryptedSpaceNames) => {\n reportRequest.spaceNames = decryptedSpaceNames;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error decrypting space name for report ${object.body.id}: ${reason}`\n );\n });\n }\n\n let keywordPromises = [];\n\n if (reportRequest.keywords) {\n keywordPromises = Promise.all(\n reportRequest.keywords.map((keyword) =>\n ctx.webex.internal.encryption.decryptText(reportRequest.encryptionKeyUrl, keyword)\n )\n )\n .then((decryptedKeywords) => {\n reportRequest.keywords = decryptedKeywords;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error decrypting keywords for report ${object.body.id}: ${reason}`\n );\n });\n }\n\n let emailPromises = [];\n\n if (reportRequest.emails) {\n emailPromises = Promise.all(\n reportRequest.emails.map((email) =>\n ctx.webex.internal.encryption.decryptText(reportRequest.encryptionKeyUrl, email)\n )\n )\n .then((decryptedEmails) => {\n reportRequest.emails = decryptedEmails;\n })\n .catch((reason) => {\n ctx.webex.logger.error(`Error decrypting emails for report ${object.body.id}: ${reason}`);\n });\n }\n\n return Promise.all(\n [reportNamePromise, reportDescriptionPromise].concat(\n spaceNamePromises,\n keywordPromises,\n emailPromises\n )\n );\n }\n\n /**\n * This function is used to decrypt encrypted properties on the activities that are returned from the eDiscovery Service getContent API\n * @param {Object} ctx - An object containing a webex instance and a transform\n * @param {Object} object - Generic object that you want to decrypt some property on based on the type\n * @param {String} reportId - Id of the report for which content is being retrieved\n * @returns {Promise} - Returns a transform promise\n */\n static decryptReportContent(ctx, object, reportId) {\n if (!object || !object.body || !reportId) {\n return Promise.resolve();\n }\n const activity = object.body;\n\n const promises = [];\n\n return ctx.webex.internal.ediscovery\n .getContentContainerByContainerId(reportId, activity.targetId)\n .then((res) => {\n const container = res.body;\n\n if (!container) {\n const reason = `Container ${activity.targetId} not found - unable to decrypt activity ${activity.activityId}`;\n\n activity.error = reason;\n ctx.webex.logger.error(reason);\n\n return Promise.resolve(object);\n }\n\n // add warning properties to the activity - these will be recorded in the downloader\n if (container.warning) {\n activity.spaceWarning = container.warning; // Remove this property once all clients are using the content container model\n activity.containerWarning = container.warning;\n }\n\n // set space name and participants on activity\n if (container.containerName) {\n activity.spaceName = container.containerName; // Remove this property once all clients are using the content container model\n activity.containerName = container.containerName;\n } else if (container.isOneOnOne) {\n const displayNames = (container.participants || [])\n .concat(container.formerParticipants || [])\n .map((p) => p.displayName)\n .join(' & ');\n\n // One to One spaces have no space name, use participant names as 'Subject' instead\n activity.spaceName = displayNames; // Remove this property once all clients are using the content container model\n activity.containerName = displayNames;\n } else {\n activity.spaceName = ''; // Remove this property once all clients are using the content container model\n activity.containerName = '';\n }\n\n // post and share activities have content which needs to be decrypted\n // as do meeting, recording activities, customApp extensions, and space information updates\n if (\n !['post', 'share'].includes(activity.verb) &&\n !activity.meeting &&\n !activity.recording &&\n !(activity.extension && activity.extension.extensionType === 'customApp') &&\n !activity.spaceInfo?.name &&\n !activity.spaceInfo?.description &&\n !activity.encryptedTextKeyValues\n ) {\n return Promise.resolve(object);\n }\n\n if (!activity.encryptionKeyUrl) {\n // If the encryptionKeyUrl is empty we assume the activity is unencrypted\n ctx.webex.logger.info(\n `Activity ${activity.activityId} cannot be decrypted due to a missing encryption key url`\n );\n\n return Promise.resolve(object);\n }\n\n // CDR Compliance uses org key and does depend on an onBehalfOfUser\n if (activity.encryptedTextKeyValues === undefined && !container.onBehalfOfUser) {\n const reason = `No user available with which to decrypt activity ${activity.activityId} in container ${activity.targetId}`;\n\n ctx.webex.logger.error(reason);\n activity.error = reason;\n\n return Promise.resolve(object);\n }\n\n // Decrypt activity message if present\n if (activity.objectDisplayName) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.objectDisplayName,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.objectDisplayName = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt message error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n // add error property to activity - this error will be recorded in the downloader and the activity omitted from the report\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n\n // If the activity is a space information update, decrypt the name and description if present\n if (activity.spaceInfo?.name) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.spaceInfo.name,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.spaceInfo.name = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.spaceInfo.name error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n if (activity.spaceInfo?.description) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.spaceInfo.description,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.spaceInfo.description = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.spaceInfo.description error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n if (activity.spaceInfo?.previousName && activity.spaceInfo.previousEncryptionKeyUrl) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.spaceInfo.previousEncryptionKeyUrl,\n activity.spaceInfo.previousName,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.spaceInfo.previousName = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.spaceInfo.previousName error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n\n // Decrypt content url and display name if extension is present\n if (\n activity.extension &&\n activity.extension.objectType === 'extension' &&\n activity.extension.extensionType === 'customApp'\n ) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.extension.contentUrl,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedContentUrl) => {\n activity.extension.contentUrl = decryptedContentUrl;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.extension.contentUrl error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.extension.displayName,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedDisplayName) => {\n activity.extension.displayName = decryptedDisplayName;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.extension.displayName error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n\n // Decrypt webUrl.\n if (activity.extension.webUrl) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.extension.webUrl,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedWebUrl) => {\n activity.extension.webUrl = decryptedWebUrl;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.extension.webUrl error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n if (activity.verb === 'update' && activity.extension.previous) {\n if (activity.extension.previous.contentUrl) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.extension.previous.contentUrl,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedPreviousContentUrl) => {\n activity.extension.previous.contentUrl = decryptedPreviousContentUrl;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.extension.previous.contentUrl error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n if (activity.extension.previous.displayName) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.extension.previous.displayName,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedPreviousDisplayName) => {\n activity.extension.previous.displayName = decryptedPreviousDisplayName;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.extension.previous.displayName error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n }\n }\n\n // Decrypt encrypted text map if present\n if (activity.encryptedTextKeyValues !== undefined) {\n for (const [key, value] of Object.entries(activity.encryptedTextKeyValues)) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [activity.encryptionKeyUrl, value]\n )\n .then((decryptedMessage) => {\n activity.encryptedTextKeyValues[key] = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.encryptedTextKeyValues error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n }\n\n // Decrypt meeting title if present\n if (activity?.meeting?.title) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.meeting.title,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.meeting.title = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.meeting.title error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n\n // Decrypt meeting recording topic if present\n if (activity?.recording?.topic) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.recording.topic,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.recording.topic = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.recording.topic error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n\n // Decrypt shares (files, whiteboards, shared links)\n // Array.prototype.concat.apply ignores undefined\n let shares = Array.prototype.concat.apply([], activity.files);\n\n shares = Array.prototype.concat.apply(shares, activity.whiteboards);\n shares = Array.prototype.concat.apply(shares, activity.links);\n for (let i = 0; i < shares.length; i += 1) {\n const share = shares[i];\n\n // Decrypt the share's display name\n // Ignore display names for whiteboards which are unencrypted\n if (\n share.displayName &&\n (!activity.whiteboards || !activity.whiteboards.includes(share))\n ) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n share.displayName,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedDisplayName) => {\n share.displayName = decryptedDisplayName;\n })\n .catch((reason) => {\n ctx.webex.logger.warn(\n `Decrypt DisplayName error for activity ${activity.activityId} in container ${activity.targetId} for share type: ${share.mimeType}, size: ${share.fileSize}, and url: ${share.url} due to error: ${reason}`\n );\n // add warning property to activity - this will present an indication that there was data loss on the downloader\n activity.warning = reason;\n })\n );\n }\n\n // Shared Links can have additional decryption fields\n if (share.microsoftSharedLinkInfo) {\n if (share.microsoftSharedLinkInfo.driveId) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n share.microsoftSharedLinkInfo.driveId,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedDriveId) => {\n share.microsoftSharedLinkInfo.driveId = decryptedDriveId;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt share.microsoftSharedLinkInfo.driveId error for activity ${activity.activityId} in container ${activity.targetId} for share type: ${share.mimeType}, size: ${share.fileSize}, and url: ${share.url} due to error: ${reason}`\n );\n // add error property to activity - this error will be recorded in the downloader and the activity omitted from the report\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n\n if (share.microsoftSharedLinkInfo.itemId) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n share.microsoftSharedLinkInfo.itemId,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedItemId) => {\n share.microsoftSharedLinkInfo.itemId = decryptedItemId;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt share.microsoftSharedLinkInfo.itemId error for activity ${activity.activityId} in container ${activity.targetId} for share type: ${share.mimeType}, size: ${share.fileSize}, and url: ${share.url} due to error: ${reason}`\n );\n // add error property to activity - this error will be recorded in the downloader and the activity omitted from the report\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n }\n\n // Decrypt the scr (Secure Content Reference) or sslr (Secure Shared Link Reference)\n // Unlike a scr the sslr contains only a loc. But decryptScr(...) is flexible and\n // leaves the tag, auth, IV, etc fields on the SCR object as undefined.\n if (share.scr || share.sslr) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptScr,\n // A share will have an encryptionKeyUrl when it's activity uses a different encryptionKeyUrl. This can happen when old activities are edited\n // and key rotation is turn on.\n [\n share.encryptionKeyUrl || activity.encryptionKeyUrl,\n share.scr || share.sslr,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedSCR) => {\n if (share.scr) {\n share.scr = decryptedSCR;\n } else {\n share.sslr = decryptedSCR.loc;\n }\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt file scr or sslr error for activity ${activity.activityId} in container ${activity.targetId} for share type: ${share.mimeType}, size: ${share.fileSize}, and url: ${share.url} due to error: ${reason}`\n );\n // add error property to activity - this error will be recorded in the downloader and the activity omitted from the report\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n }\n\n return Promise.all(promises);\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error retrieving content container for: ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n // add error property to activity - this error will be recorded in the downloader and the activity omitted from the report\n activity.error = reason;\n\n return Promise.resolve(object);\n });\n }\n\n /**\n * This function is used to decrypt encrypted properties on the containers that are returned from the eDiscovery Service getContentContainer API\n * @param {Object} ctx - An object containing a webex instance and a transform\n * @param {Object} object - Generic object that you want to decrypt some property on based on the type\n * @returns {Promise} - Returns a transform promise\n */\n static decryptReportContentContainer(ctx, object) {\n if (!object || !object.body) {\n return Promise.resolve();\n }\n const container = object.body;\n\n if (!container.containerName) {\n return Promise.resolve(object);\n }\n\n if (!container.encryptionKeyUrl) {\n // If the encryptionKeyUrl is empty we assume the container name is unencrypted\n ctx.webex.logger.info(\n `${container.containerType} container ${container.containerId} cannot be decrypted due to a missing encryption key url`\n );\n\n return Promise.resolve(object);\n }\n\n if (!container.onBehalfOfUser) {\n const reason = `No user available with which to decrypt ${container.containerType} container ${container.containerId}`;\n\n ctx.webex.logger.error(reason);\n container.error = reason;\n\n return Promise.resolve(object);\n }\n\n // decrypt description if present with a descriptionEncryptionKeyUrl\n if (container.description && container.descriptionEncryptionKeyUrl) {\n requestWithRetries(ctx.webex.internal.encryption, ctx.webex.internal.encryption.decryptText, [\n container.descriptionEncryptionKeyUrl,\n container.description,\n {onBehalfOf: container.onBehalfOfUser},\n ])\n .then((decryptedContainerDescription) => {\n container.description = decryptedContainerDescription;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt container description error for ${container.containerType} container ${container.containerId}: ${reason}`\n );\n // add warn property to container info - this warning will be recorded in the downloader\n container.warning = reason;\n // don't return, attempt to decrypt the name first\n });\n }\n\n return requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [container.encryptionKeyUrl, container.containerName, {onBehalfOf: container.onBehalfOfUser}]\n )\n .then((decryptedContainerName) => {\n container.containerName = decryptedContainerName;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt container name error for ${container.containerType} container ${container.containerId}: ${reason}`\n );\n // add warn property to container info - this warning will be recorded in the downloader\n container.warning = reason;\n\n return Promise.resolve(object);\n });\n }\n}\n\nexport default Transforms;\n"],"mappings":";;;;;;;;;;;;;AAAA;AAEA;AACA;AACA;AAFA,IAGMA,UAAU;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IACd;AACF;AACA;AACA;AACA;AACA;IACE,8BAA4BC,GAAG,EAAEC,MAAM,EAAE;MACvC,IAAI,CAACA,MAAM,IAAI,CAACA,MAAM,CAACC,IAAI,EAAE;QAC3B,OAAO,iBAAQC,OAAO,CAACF,MAAM,CAAC;MAChC;MACA,IAAMG,aAAa,GAAGH,MAAM,CAACC,IAAI;MAEjC,OAAOF,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACC,GAAG,CACrCC,iBAAiB,CAAC;QAACC,KAAK,EAAE;MAAC,CAAC,CAAC,CAC7BC,IAAI,CAAC,UAACC,IAAI,EAAK;QACd,IAAIA,IAAI,IAAIA,IAAI,CAACC,MAAM,GAAG,CAAC,IAAID,IAAI,CAAC,CAAC,CAAC,EAAE;UACtCR,aAAa,CAACU,gBAAgB,GAAGF,IAAI,CAAC,CAAC,CAAC,CAACG,GAAG;UAE5C,OAAOf,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACC,GAAG,CACrCQ,cAAc,CAAC;YAACC,OAAO,EAAE,CAACL,IAAI,CAAC,CAAC,CAAC,CAACM,MAAM,CAAC;YAAEN,IAAI,EAAJA;UAAI,CAAC,CAAC,CACjDD,IAAI,CAAC,YAAM;YACV,IAAMQ,QAAQ,GAAG,EAAE;YAEnB,IAAIf,aAAa,CAACgB,IAAI,EAAE;cACtBD,QAAQ,CAACE,IAAI,CACXrB,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,CAC1Be,WAAW,CAACV,IAAI,CAAC,CAAC,CAAC,EAAER,aAAa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6B,EAAK;UACvCrE,SAAS,CAACtC,WAAW,GAAG2G,6BAA6B;QACvD,CAAC,CAAC,CACD7F,KAAK,CAAC,UAACC,MAAM,EAAK;UACjBvC,GAAG,CAACK,KAAK,CAACmC,MAAM,CAACC,KAAK,mDACuBqB,SAAS,CAACkE,aAAa,wBAAclE,SAAS,CAACmE,WAAW,eAAK1F,MAAM,EACjH;UACD;UACAuB,SAAS,CAACE,OAAO,GAAGzB,MAAM;UAC1B;QACF,CAAC,CAAC;MACN;;MAEA,OAAO,IAAAgD,yBAAkB,EACvBvF,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,EAC7BP,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACqC,WAAW,EACzC,CAACkB,SAAS,CAAChD,gBAAgB,EAAEgD,SAAS,CAACK,aAAa,EAAE;QAACqB,UAAU,EAAE1B,SAAS,CAACuB;MAAc,CAAC,CAAC,CAC9F,CACE1E,IAAI,CAAC,UAACyH,sBAAsB,EAAK;QAChCtE,SAAS,CAACK,aAAa,GAAGiE,sBAAsB;MAClD,CAAC,CAAC,CACD9F,KAAK,CAAC,UAACC,MAAM,EAAK;QACjBvC,GAAG,CAACK,KAAK,CAACmC,MAAM,CAACC,KAAK,4CACgBqB,SAAS,CAACkE,aAAa,wBAAclE,SAAS,CAACmE,WAAW,eAAK1F,MAAM,EAC1G;QACD;QACAuB,SAAS,CAACE,OAAO,GAAGzB,MAAM;QAE1B,OAAO,iBAAQpC,OAAO,CAACF,MAAM,CAAC;MAChC,CAAC,CAAC;IACN;EAAC;EAAA;AAAA;AAAA,eAGYF,UAAU;AAAA"}
|
|
1
|
+
{"version":3,"names":["_retry","require","Transforms","_classCallCheck2","default","_createClass2","key","value","encryptReportRequest","ctx","object","body","_promise","resolve","reportRequest","webex","internal","encryption","kms","createUnboundKeys","count","then","keys","length","encryptionKeyUrl","uri","createResource","userIds","userId","promises","name","push","encryptText","encryptedName","description","encryptedDescription","spaceNames","all","map","spaceName","encryptedSpaceNames","keywords","keyword","encryptedKeywords","emails","unencryptedEmails","email","encryptedEmails","catch","reason","logger","error","concat","reject","decryptReportRequest","reportNamePromise","decryptText","decryptedName","id","reportDescriptionPromise","decryptedDescription","spaceNamePromises","decryptedSpaceNames","keywordPromises","decryptedKeywords","emailPromises","decryptedEmails","decryptReportContent","reportId","activity","ediscovery","getContentContainerByContainerId","targetId","res","_activity$spaceInfo","_activity$spaceInfo2","_activity$spaceInfo3","_activity$spaceInfo4","_activity$spaceInfo5","_activity$meeting","_activity$recording","container","activityId","warning","spaceWarning","containerWarning","containerName","isOneOnOne","displayNames","participants","formerParticipants","p","displayName","join","includes","verb","meeting","recording","extension","extensionType","spaceInfo","encryptedTextKeyValues","info","undefined","onBehalfOfUser","objectDisplayName","requestWithRetries","onBehalfOf","decryptedMessage","previousName","previousEncryptionKeyUrl","objectType","contentUrl","decryptedContentUrl","decryptedDisplayName","webUrl","decryptedWebUrl","previous","decryptedPreviousContentUrl","decryptedPreviousDisplayName","_loop","_Object$entries$_i","_slicedToArray2","_Object$entries","_i","_entries","title","topic","shares","Array","prototype","apply","files","whiteboards","links","_loop2","share","i","warn","mimeType","fileSize","url","microsoftSharedLinkInfo","driveId","decryptedDriveId","itemId","decryptedItemId","scr","sslr","decryptScr","decryptedSCR","loc","decryptReportContentContainer","containerType","containerId","descriptionEncryptionKeyUrl","decryptedContainerDescription","decryptedContainerName","_default","exports"],"sources":["transforms.js"],"sourcesContent":["import {requestWithRetries} from './retry';\n\n/**\n * This class is used to encrypt/decrypt various properties on ReportRequests, Activities and Spaces as they are sent/returned to/from the eDiscovery Service\n */\nclass Transforms {\n /**\n * This function is used to encrypt sensitive properties on the ReportRequest before it is sent to the eDiscovery Service createReport API\n * @param {Object} ctx - An object containing a webex instance and a transform\n * @param {Object} object - Generic object that you want to encrypt some property on based on the type\n * @returns {Promise} - Returns a transform promise\n */\n static encryptReportRequest(ctx, object) {\n if (!object || !object.body) {\n return Promise.resolve(object);\n }\n const reportRequest = object.body;\n\n return ctx.webex.internal.encryption.kms\n .createUnboundKeys({count: 1})\n .then((keys) => {\n if (keys && keys.length > 0 && keys[0]) {\n reportRequest.encryptionKeyUrl = keys[0].uri;\n\n return ctx.webex.internal.encryption.kms\n .createResource({userIds: [keys[0].userId], keys})\n .then(() => {\n const promises = [];\n\n if (reportRequest.name) {\n promises.push(\n ctx.webex.internal.encryption\n .encryptText(keys[0], reportRequest.name)\n .then((encryptedName) => {\n reportRequest.name = encryptedName;\n })\n );\n }\n\n if (reportRequest.description) {\n promises.push(\n ctx.webex.internal.encryption\n .encryptText(keys[0], reportRequest.description)\n .then((encryptedDescription) => {\n reportRequest.description = encryptedDescription;\n })\n );\n }\n\n if (reportRequest.spaceNames) {\n promises.push(\n Promise.all(\n reportRequest.spaceNames.map((spaceName) =>\n ctx.webex.internal.encryption.encryptText(keys[0], spaceName)\n )\n ).then((encryptedSpaceNames) => {\n reportRequest.spaceNames = encryptedSpaceNames;\n })\n );\n }\n\n if (reportRequest.keywords) {\n promises.push(\n Promise.all(\n reportRequest.keywords.map((keyword) =>\n ctx.webex.internal.encryption.encryptText(keys[0], keyword)\n )\n ).then((encryptedKeywords) => {\n reportRequest.keywords = encryptedKeywords;\n })\n );\n }\n\n if (reportRequest.emails) {\n // store unencrypted emails for ediscovery service to convert to user ids\n reportRequest.unencryptedEmails = reportRequest.emails;\n promises.push(\n Promise.all(\n reportRequest.emails.map((email) =>\n ctx.webex.internal.encryption.encryptText(keys[0], email)\n )\n ).then((encryptedEmails) => {\n reportRequest.emails = encryptedEmails;\n })\n );\n }\n\n return Promise.all(promises);\n });\n }\n\n return Promise.resolve(object);\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error while encrypting report request: ${reportRequest} : ${reason}`\n );\n\n return Promise.reject(reason);\n });\n }\n\n /**\n * This function is used to decrypt encrypted properties on the ReportRequest that is returned from the eDiscovery Service getReport(s) API\n * @param {Object} ctx - An object containing a webex instance and a transform\n * @param {Object} object - Generic object that you want to decrypt some property on based on the type\n * @returns {Promise} - Returns a transform promise\n */\n static decryptReportRequest(ctx, object) {\n if (\n !object ||\n !object.body ||\n !object.body.reportRequest ||\n !object.body.reportRequest.encryptionKeyUrl\n ) {\n return Promise.resolve(object);\n }\n const {reportRequest} = object.body;\n\n let reportNamePromise;\n\n if (reportRequest.name) {\n reportNamePromise = ctx.webex.internal.encryption\n .decryptText(reportRequest.encryptionKeyUrl, reportRequest.name)\n .then((decryptedName) => {\n reportRequest.name = decryptedName;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error decrypting report name for report ${object.body.id}: ${reason}`\n );\n });\n }\n\n let reportDescriptionPromise;\n\n if (reportRequest.description) {\n reportDescriptionPromise = ctx.webex.internal.encryption\n .decryptText(reportRequest.encryptionKeyUrl, reportRequest.description)\n .then((decryptedDescription) => {\n reportRequest.description = decryptedDescription;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error decrypting description for report ${object.body.id}: ${reason}`\n );\n });\n }\n\n let spaceNamePromises = [];\n\n if (reportRequest.spaceNames) {\n spaceNamePromises = Promise.all(\n reportRequest.spaceNames.map((spaceName) =>\n ctx.webex.internal.encryption.decryptText(reportRequest.encryptionKeyUrl, spaceName)\n )\n )\n .then((decryptedSpaceNames) => {\n reportRequest.spaceNames = decryptedSpaceNames;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error decrypting space name for report ${object.body.id}: ${reason}`\n );\n });\n }\n\n let keywordPromises = [];\n\n if (reportRequest.keywords) {\n keywordPromises = Promise.all(\n reportRequest.keywords.map((keyword) =>\n ctx.webex.internal.encryption.decryptText(reportRequest.encryptionKeyUrl, keyword)\n )\n )\n .then((decryptedKeywords) => {\n reportRequest.keywords = decryptedKeywords;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error decrypting keywords for report ${object.body.id}: ${reason}`\n );\n });\n }\n\n let emailPromises = [];\n\n if (reportRequest.emails) {\n emailPromises = Promise.all(\n reportRequest.emails.map((email) =>\n ctx.webex.internal.encryption.decryptText(reportRequest.encryptionKeyUrl, email)\n )\n )\n .then((decryptedEmails) => {\n reportRequest.emails = decryptedEmails;\n })\n .catch((reason) => {\n ctx.webex.logger.error(`Error decrypting emails for report ${object.body.id}: ${reason}`);\n });\n }\n\n return Promise.all(\n [reportNamePromise, reportDescriptionPromise].concat(\n spaceNamePromises,\n keywordPromises,\n emailPromises\n )\n );\n }\n\n /**\n * This function is used to decrypt encrypted properties on the activities that are returned from the eDiscovery Service getContent API\n * @param {Object} ctx - An object containing a webex instance and a transform\n * @param {Object} object - Generic object that you want to decrypt some property on based on the type\n * @param {String} reportId - Id of the report for which content is being retrieved\n * @returns {Promise} - Returns a transform promise\n */\n static decryptReportContent(ctx, object, reportId) {\n if (!object || !object.body || !reportId) {\n return Promise.resolve();\n }\n const activity = object.body;\n\n const promises = [];\n\n return ctx.webex.internal.ediscovery\n .getContentContainerByContainerId(reportId, activity.targetId)\n .then((res) => {\n const container = res.body;\n\n if (!container) {\n const reason = `Container ${activity.targetId} not found - unable to decrypt activity ${activity.activityId}`;\n\n activity.error = reason;\n ctx.webex.logger.error(reason);\n\n return Promise.resolve(object);\n }\n\n // add warning properties to the activity - these will be recorded in the downloader\n if (container.warning) {\n activity.spaceWarning = container.warning; // Remove this property once all clients are using the content container model\n activity.containerWarning = container.warning;\n }\n\n // set space name and participants on activity\n if (container.containerName) {\n activity.spaceName = container.containerName; // Remove this property once all clients are using the content container model\n activity.containerName = container.containerName;\n } else if (container.isOneOnOne) {\n const displayNames = (container.participants || [])\n .concat(container.formerParticipants || [])\n .map((p) => p.displayName)\n .join(' & ');\n\n // One to One spaces have no space name, use participant names as 'Subject' instead\n activity.spaceName = displayNames; // Remove this property once all clients are using the content container model\n activity.containerName = displayNames;\n } else {\n activity.spaceName = ''; // Remove this property once all clients are using the content container model\n activity.containerName = '';\n }\n\n // post and share activities have content which needs to be decrypted\n // as do meeting, recording activities, customApp extensions, and space information updates\n if (\n !['post', 'share'].includes(activity.verb) &&\n !activity.meeting &&\n !activity.recording &&\n !(activity.extension && activity.extension.extensionType === 'customApp') &&\n !activity.spaceInfo?.name &&\n !activity.spaceInfo?.description &&\n !activity.encryptedTextKeyValues\n ) {\n return Promise.resolve(object);\n }\n\n if (!activity.encryptionKeyUrl) {\n // If the encryptionKeyUrl is empty we assume the activity is unencrypted\n ctx.webex.logger.info(\n `Activity ${activity.activityId} cannot be decrypted due to a missing encryption key url`\n );\n\n return Promise.resolve(object);\n }\n\n // CDR Compliance uses org key and does depend on an onBehalfOfUser\n if (activity.encryptedTextKeyValues === undefined && !container.onBehalfOfUser) {\n const reason = `No user available with which to decrypt activity ${activity.activityId} in container ${activity.targetId}`;\n\n ctx.webex.logger.error(reason);\n activity.error = reason;\n\n return Promise.resolve(object);\n }\n\n // Decrypt activity message if present\n if (activity.objectDisplayName) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.objectDisplayName,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.objectDisplayName = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt message error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n // add error property to activity - this error will be recorded in the downloader and the activity omitted from the report\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n\n // If the activity is a space information update, decrypt the name and description if present\n if (activity.spaceInfo?.name) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.spaceInfo.name,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.spaceInfo.name = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.spaceInfo.name error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n if (activity.spaceInfo?.description) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.spaceInfo.description,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.spaceInfo.description = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.spaceInfo.description error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n if (activity.spaceInfo?.previousName && activity.spaceInfo.previousEncryptionKeyUrl) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.spaceInfo.previousEncryptionKeyUrl,\n activity.spaceInfo.previousName,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.spaceInfo.previousName = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.spaceInfo.previousName error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n\n // Decrypt content url and display name if extension is present\n if (\n activity.extension &&\n activity.extension.objectType === 'extension' &&\n activity.extension.extensionType === 'customApp'\n ) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.extension.contentUrl,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedContentUrl) => {\n activity.extension.contentUrl = decryptedContentUrl;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.extension.contentUrl error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.extension.displayName,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedDisplayName) => {\n activity.extension.displayName = decryptedDisplayName;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.extension.displayName error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n\n // Decrypt webUrl.\n if (activity.extension.webUrl) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.extension.webUrl,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedWebUrl) => {\n activity.extension.webUrl = decryptedWebUrl;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.extension.webUrl error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n if (activity.verb === 'update' && activity.extension.previous) {\n if (activity.extension.previous.contentUrl) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.extension.previous.contentUrl,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedPreviousContentUrl) => {\n activity.extension.previous.contentUrl = decryptedPreviousContentUrl;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.extension.previous.contentUrl error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n if (activity.extension.previous.displayName) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.extension.previous.displayName,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedPreviousDisplayName) => {\n activity.extension.previous.displayName = decryptedPreviousDisplayName;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.extension.previous.displayName error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n }\n }\n\n // Decrypt encrypted text map if present\n if (activity.encryptedTextKeyValues !== undefined) {\n for (const [key, value] of Object.entries(activity.encryptedTextKeyValues)) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [activity.encryptionKeyUrl, value]\n )\n .then((decryptedMessage) => {\n activity.encryptedTextKeyValues[key] = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.encryptedTextKeyValues error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n }\n\n // Decrypt meeting title if present\n if (activity?.meeting?.title) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.meeting.title,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.meeting.title = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.meeting.title error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n\n // Decrypt meeting recording topic if present\n if (activity?.recording?.topic) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n activity.recording.topic,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedMessage) => {\n activity.recording.topic = decryptedMessage;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt activity.recording.topic error for activity ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n\n // Decrypt shares (files, whiteboards, shared links)\n // Array.prototype.concat.apply ignores undefined\n let shares = Array.prototype.concat.apply([], activity.files);\n\n shares = Array.prototype.concat.apply(shares, activity.whiteboards);\n shares = Array.prototype.concat.apply(shares, activity.links);\n for (let i = 0; i < shares.length; i += 1) {\n const share = shares[i];\n\n // Decrypt the share's display name\n // Ignore display names for whiteboards which are unencrypted\n if (\n share.displayName &&\n (!activity.whiteboards || !activity.whiteboards.includes(share))\n ) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n share.displayName,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedDisplayName) => {\n share.displayName = decryptedDisplayName;\n })\n .catch((reason) => {\n ctx.webex.logger.warn(\n `Decrypt DisplayName error for activity ${activity.activityId} in container ${activity.targetId} for share type: ${share.mimeType}, size: ${share.fileSize}, and url: ${share.url} due to error: ${reason}`\n );\n // add warning property to activity - this will present an indication that there was data loss on the downloader\n activity.warning = reason;\n })\n );\n }\n\n // Shared Links can have additional decryption fields\n if (share.microsoftSharedLinkInfo) {\n if (share.microsoftSharedLinkInfo.driveId) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n share.microsoftSharedLinkInfo.driveId,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedDriveId) => {\n share.microsoftSharedLinkInfo.driveId = decryptedDriveId;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt share.microsoftSharedLinkInfo.driveId error for activity ${activity.activityId} in container ${activity.targetId} for share type: ${share.mimeType}, size: ${share.fileSize}, and url: ${share.url} due to error: ${reason}`\n );\n // add error property to activity - this error will be recorded in the downloader and the activity omitted from the report\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n\n if (share.microsoftSharedLinkInfo.itemId) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [\n activity.encryptionKeyUrl,\n share.microsoftSharedLinkInfo.itemId,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedItemId) => {\n share.microsoftSharedLinkInfo.itemId = decryptedItemId;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt share.microsoftSharedLinkInfo.itemId error for activity ${activity.activityId} in container ${activity.targetId} for share type: ${share.mimeType}, size: ${share.fileSize}, and url: ${share.url} due to error: ${reason}`\n );\n // add error property to activity - this error will be recorded in the downloader and the activity omitted from the report\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n }\n\n // Decrypt the scr (Secure Content Reference) or sslr (Secure Shared Link Reference)\n // Unlike a scr the sslr contains only a loc. But decryptScr(...) is flexible and\n // leaves the tag, auth, IV, etc fields on the SCR object as undefined.\n if (share.scr || share.sslr) {\n promises.push(\n requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptScr,\n // A share will have an encryptionKeyUrl when it's activity uses a different encryptionKeyUrl. This can happen when old activities are edited\n // and key rotation is turn on.\n [\n share.encryptionKeyUrl || activity.encryptionKeyUrl,\n share.scr || share.sslr,\n {onBehalfOf: container.onBehalfOfUser},\n ]\n )\n .then((decryptedSCR) => {\n if (share.scr) {\n share.scr = decryptedSCR;\n } else {\n share.sslr = decryptedSCR.loc;\n }\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt file scr or sslr error for activity ${activity.activityId} in container ${activity.targetId} for share type: ${share.mimeType}, size: ${share.fileSize}, and url: ${share.url} due to error: ${reason}`\n );\n // add error property to activity - this error will be recorded in the downloader and the activity omitted from the report\n activity.error = reason;\n\n return Promise.resolve(object);\n })\n );\n }\n }\n\n return Promise.all(promises);\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Error retrieving content container for: ${activity.activityId} in container ${activity.targetId}: ${reason}`\n );\n // add error property to activity - this error will be recorded in the downloader and the activity omitted from the report\n activity.error = reason;\n\n return Promise.resolve(object);\n });\n }\n\n /**\n * This function is used to decrypt encrypted properties on the containers that are returned from the eDiscovery Service getContentContainer API\n * @param {Object} ctx - An object containing a webex instance and a transform\n * @param {Object} object - Generic object that you want to decrypt some property on based on the type\n * @returns {Promise} - Returns a transform promise\n */\n static decryptReportContentContainer(ctx, object) {\n if (!object || !object.body) {\n return Promise.resolve();\n }\n const container = object.body;\n\n if (!container.containerName) {\n return Promise.resolve(object);\n }\n\n if (!container.encryptionKeyUrl) {\n // If the encryptionKeyUrl is empty we assume the container name is unencrypted\n ctx.webex.logger.info(\n `${container.containerType} container ${container.containerId} cannot be decrypted due to a missing encryption key url`\n );\n\n return Promise.resolve(object);\n }\n\n if (!container.onBehalfOfUser) {\n const reason = `No user available with which to decrypt ${container.containerType} container ${container.containerId}`;\n\n ctx.webex.logger.error(reason);\n container.error = reason;\n\n return Promise.resolve(object);\n }\n\n // decrypt description if present with a descriptionEncryptionKeyUrl\n if (container.description && container.descriptionEncryptionKeyUrl) {\n requestWithRetries(ctx.webex.internal.encryption, ctx.webex.internal.encryption.decryptText, [\n container.descriptionEncryptionKeyUrl,\n container.description,\n {onBehalfOf: container.onBehalfOfUser},\n ])\n .then((decryptedContainerDescription) => {\n container.description = decryptedContainerDescription;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt container description error for ${container.containerType} container ${container.containerId}: ${reason}`\n );\n // add warn property to container info - this warning will be recorded in the downloader\n container.warning = reason;\n // don't return, attempt to decrypt the name first\n });\n }\n\n return requestWithRetries(\n ctx.webex.internal.encryption,\n ctx.webex.internal.encryption.decryptText,\n [container.encryptionKeyUrl, container.containerName, {onBehalfOf: container.onBehalfOfUser}]\n )\n .then((decryptedContainerName) => {\n container.containerName = decryptedContainerName;\n })\n .catch((reason) => {\n ctx.webex.logger.error(\n `Decrypt container name error for ${container.containerType} container ${container.containerId}: ${reason}`\n );\n // add warn property to container info - this warning will be recorded in the downloader\n container.warning = reason;\n\n return Promise.resolve(object);\n });\n }\n}\n\nexport default Transforms;\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA;AACA;AACA;AAFA,IAGMC,UAAU;EAAA,SAAAA,WAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAF,UAAA;EAAA;EAAA,IAAAG,aAAA,CAAAD,OAAA,EAAAF,UAAA;IAAAI,GAAA;IAAAC,KAAA;IACd;AACF;AACA;AACA;AACA;AACA;IACE,SAAAC,qBAA4BC,GAAG,EAAEC,MAAM,EAAE;MACvC,IAAI,CAACA,MAAM,IAAI,CAACA,MAAM,CAACC,IAAI,EAAE;QAC3B,OAAOC,QAAA,CAAAR,OAAA,CAAQS,OAAO,CAACH,MAAM,CAAC;MAChC;MACA,IAAMI,aAAa,GAAGJ,MAAM,CAACC,IAAI;MAEjC,OAAOF,GAAG,CAACM,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACC,GAAG,CACrCC,iBAAiB,CAAC;QAACC,KAAK,EAAE;MAAC,CAAC,CAAC,CAC7BC,IAAI,CAAC,UAACC,IAAI,EAAK;QACd,IAAIA,IAAI,IAAIA,IAAI,CAACC,MAAM,GAAG,CAAC,IAAID,IAAI,CAAC,CAAC,CAAC,EAAE;UACtCR,aAAa,CAACU,gBAAgB,GAAGF,IAAI,CAAC,CAAC,CAAC,CAACG,GAAG;UAE5C,OAAOhB,GAAG,CAACM,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACC,GAAG,CACrCQ,cAAc,CAAC;YAACC,OAAO,EAAE,CAACL,IAAI,CAAC,CAAC,CAAC,CAACM,MAAM,CAAC;YAAEN,IAAI,EAAJA;UAAI,CAAC,CAAC,CACjDD,IAAI,CAAC,YAAM;YACV,IAAMQ,QAAQ,GAAG,EAAE;YAEnB,IAAIf,aAAa,CAACgB,IAAI,EAAE;cACtBD,QAAQ,CAACE,IAAI,CACXtB,GAAG,CAACM,KAAK,CAACC,QAA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,CACD7G,KAAK,CAAC,UAACC,MAAM,EAAK;QACjBxC,GAAG,CAACM,KAAK,CAACmC,MAAM,CAACC,KAAK,qCAAAC,MAAA,CACgB6B,SAAS,CAACwE,aAAa,iBAAArG,MAAA,CAAc6B,SAAS,CAACyE,WAAW,QAAAtG,MAAA,CAAKH,MAAM,CAC3G,CAAC;QACD;QACAgC,SAAS,CAACE,OAAO,GAAGlC,MAAM;QAE1B,OAAOrC,QAAA,CAAAR,OAAA,CAAQS,OAAO,CAACH,MAAM,CAAC;MAChC,CAAC,CAAC;IACN;EAAC;EAAA,OAAAR,UAAA;AAAA;AAAA,IAAA4J,QAAA,GAAAC,OAAA,CAAA3J,OAAA,GAGYF,UAAU"}
|
package/jest.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/internal-plugin-ediscovery",
|
|
3
|
-
"version": "3.0.0-bnr.4",
|
|
4
3
|
"description": "",
|
|
5
4
|
"license": "MIT",
|
|
6
5
|
"contributors": [
|
|
@@ -25,19 +24,36 @@
|
|
|
25
24
|
]
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
28
|
-
"@
|
|
29
|
-
"@webex/
|
|
30
|
-
"@webex/
|
|
27
|
+
"@babel/core": "^7.17.10",
|
|
28
|
+
"@webex/babel-config-legacy": "0.0.0",
|
|
29
|
+
"@webex/eslint-config-legacy": "0.0.0",
|
|
30
|
+
"@webex/jest-config-legacy": "0.0.0",
|
|
31
|
+
"@webex/legacy-tools": "0.0.0",
|
|
32
|
+
"@webex/test-helper-chai": "3.0.0-next.1",
|
|
33
|
+
"@webex/test-helper-mocha": "3.0.0-next.1",
|
|
34
|
+
"@webex/test-helper-mock-webex": "3.0.0-next.1",
|
|
35
|
+
"@webex/test-helper-test-users": "3.0.0-next.1",
|
|
36
|
+
"eslint": "^8.24.0",
|
|
37
|
+
"prettier": "^2.7.1",
|
|
31
38
|
"sinon": "^9.2.4"
|
|
32
39
|
},
|
|
33
40
|
"dependencies": {
|
|
34
|
-
"@webex/common": "
|
|
35
|
-
"@webex/internal-plugin-conversation": "
|
|
36
|
-
"@webex/internal-plugin-
|
|
37
|
-
"@webex/internal-plugin-
|
|
38
|
-
"@webex/
|
|
39
|
-
"@webex/webex-core": "workspace:^",
|
|
41
|
+
"@webex/common": "3.0.0-next.1",
|
|
42
|
+
"@webex/internal-plugin-conversation": "3.0.0-next.1",
|
|
43
|
+
"@webex/internal-plugin-encryption": "3.0.0-next.1",
|
|
44
|
+
"@webex/internal-plugin-mercury": "3.0.0-next.1",
|
|
45
|
+
"@webex/webex-core": "3.0.0-next.1",
|
|
40
46
|
"lodash": "^4.17.21",
|
|
41
47
|
"uuid": "^3.3.2"
|
|
42
|
-
}
|
|
43
|
-
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "yarn build:src",
|
|
51
|
+
"build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
|
|
52
|
+
"deploy:npm": "yarn npm publish",
|
|
53
|
+
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
|
|
54
|
+
"test:browser:broken": "webex-legacy-tools test --integration --runner karma",
|
|
55
|
+
"test:style": "eslint ./src/**/*.*",
|
|
56
|
+
"test:unit": "webex-legacy-tools test --unit --runner jest"
|
|
57
|
+
},
|
|
58
|
+
"version": "3.0.0-next.1"
|
|
59
|
+
}
|
package/process
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {browser: true};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @class EDiscovery is used by compliance officers to run compliance reports
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
declare const EDiscovery: any;
|
|
6
|
-
export default EDiscovery;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* General ediscovery error
|
|
10
|
-
*/
|
|
11
|
-
export declare class EdiscoveryError {
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* InvalidEmailAddressError is thrown when an email address has been supplied as a parameter and cannot be found in CI
|
|
16
|
-
*/
|
|
17
|
-
export declare class InvalidEmailAddressError extends EdiscoveryError {
|
|
18
|
-
static getErrorCode(): number;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Creates a report request object with a specific set of search parameters
|
|
23
|
-
* @param {String} name - A label to identify the report
|
|
24
|
-
* @param {String} description - A textual summary of the reports purpose
|
|
25
|
-
* @param {Array<String>} emails - A list of user emails relevant to the report
|
|
26
|
-
* @param {Array<String>} userIds - A list of UUIDs relevant to the report
|
|
27
|
-
* @param {Array<String>} keywords - A list of search terms relevant to the report
|
|
28
|
-
* @param {Array<String>} spaceNames - A list of space names relevant to the report
|
|
29
|
-
* @param {Object} range - Contains the start time and end time defining the search period
|
|
30
|
-
* @returns {Object} ReportRequest - Contains all search parameters
|
|
31
|
-
*/
|
|
32
|
-
export declare class ReportRequest {
|
|
33
|
-
constructor(name?: string, description?: string, emails?: any[], userIds?: any[], keywords?: any[], encryptionKeyUrl?: string, spaceNames?: any[], range?: {
|
|
34
|
-
startTime: string;
|
|
35
|
-
endTime: string;
|
|
36
|
-
});
|
|
37
|
-
name: string;
|
|
38
|
-
description: string;
|
|
39
|
-
emails: any[];
|
|
40
|
-
userIds: any[];
|
|
41
|
-
keywords: any[];
|
|
42
|
-
encryptionKeyUrl: string;
|
|
43
|
-
spaceNames: any[];
|
|
44
|
-
range: {
|
|
45
|
-
startTime: string;
|
|
46
|
-
endTime: string;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { }
|
package/dist/tsdoc-metadata.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.34.4"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
package/dist/types/config.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* General ediscovery error
|
|
3
|
-
*/
|
|
4
|
-
export class EdiscoveryError {
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* InvalidEmailAddressError is thrown when an email address has been supplied as a parameter and cannot be found in CI
|
|
8
|
-
*/
|
|
9
|
-
export class InvalidEmailAddressError extends EdiscoveryError {
|
|
10
|
-
static getErrorCode(): number;
|
|
11
|
-
}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default ReportRequest;
|
|
2
|
-
/**
|
|
3
|
-
* Creates a report request object with a specific set of search parameters
|
|
4
|
-
* @param {String} name - A label to identify the report
|
|
5
|
-
* @param {String} description - A textual summary of the reports purpose
|
|
6
|
-
* @param {Array<String>} emails - A list of user emails relevant to the report
|
|
7
|
-
* @param {Array<String>} userIds - A list of UUIDs relevant to the report
|
|
8
|
-
* @param {Array<String>} keywords - A list of search terms relevant to the report
|
|
9
|
-
* @param {Array<String>} spaceNames - A list of space names relevant to the report
|
|
10
|
-
* @param {Object} range - Contains the start time and end time defining the search period
|
|
11
|
-
* @returns {Object} ReportRequest - Contains all search parameters
|
|
12
|
-
*/
|
|
13
|
-
declare class ReportRequest {
|
|
14
|
-
constructor(name?: string, description?: string, emails?: any[], userIds?: any[], keywords?: any[], encryptionKeyUrl?: string, spaceNames?: any[], range?: {
|
|
15
|
-
startTime: string;
|
|
16
|
-
endTime: string;
|
|
17
|
-
});
|
|
18
|
-
name: string;
|
|
19
|
-
description: string;
|
|
20
|
-
emails: any[];
|
|
21
|
-
userIds: any[];
|
|
22
|
-
keywords: any[];
|
|
23
|
-
encryptionKeyUrl: string;
|
|
24
|
-
spaceNames: any[];
|
|
25
|
-
range: {
|
|
26
|
-
startTime: string;
|
|
27
|
-
endTime: string;
|
|
28
|
-
};
|
|
29
|
-
}
|
package/dist/types/retry.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export default Transforms;
|
|
2
|
-
/**
|
|
3
|
-
* This class is used to encrypt/decrypt various properties on ReportRequests, Activities and Spaces as they are sent/returned to/from the eDiscovery Service
|
|
4
|
-
*/
|
|
5
|
-
declare class Transforms {
|
|
6
|
-
/**
|
|
7
|
-
* This function is used to encrypt sensitive properties on the ReportRequest before it is sent to the eDiscovery Service createReport API
|
|
8
|
-
* @param {Object} ctx - An object containing a webex instance and a transform
|
|
9
|
-
* @param {Object} object - Generic object that you want to encrypt some property on based on the type
|
|
10
|
-
* @returns {Promise} - Returns a transform promise
|
|
11
|
-
*/
|
|
12
|
-
static encryptReportRequest(ctx: any, object: any): Promise<any>;
|
|
13
|
-
/**
|
|
14
|
-
* This function is used to decrypt encrypted properties on the ReportRequest that is returned from the eDiscovery Service getReport(s) API
|
|
15
|
-
* @param {Object} ctx - An object containing a webex instance and a transform
|
|
16
|
-
* @param {Object} object - Generic object that you want to decrypt some property on based on the type
|
|
17
|
-
* @returns {Promise} - Returns a transform promise
|
|
18
|
-
*/
|
|
19
|
-
static decryptReportRequest(ctx: any, object: any): Promise<any>;
|
|
20
|
-
/**
|
|
21
|
-
* This function is used to decrypt encrypted properties on the activities that are returned from the eDiscovery Service getContent API
|
|
22
|
-
* @param {Object} ctx - An object containing a webex instance and a transform
|
|
23
|
-
* @param {Object} object - Generic object that you want to decrypt some property on based on the type
|
|
24
|
-
* @param {String} reportId - Id of the report for which content is being retrieved
|
|
25
|
-
* @returns {Promise} - Returns a transform promise
|
|
26
|
-
*/
|
|
27
|
-
static decryptReportContent(ctx: any, object: any, reportId: string): Promise<any>;
|
|
28
|
-
/**
|
|
29
|
-
* This function is used to decrypt encrypted properties on the containers that are returned from the eDiscovery Service getContentContainer API
|
|
30
|
-
* @param {Object} ctx - An object containing a webex instance and a transform
|
|
31
|
-
* @param {Object} object - Generic object that you want to decrypt some property on based on the type
|
|
32
|
-
* @returns {Promise} - Returns a transform promise
|
|
33
|
-
*/
|
|
34
|
-
static decryptReportContentContainer(ctx: any, object: any): Promise<any>;
|
|
35
|
-
}
|