@webex/internal-plugin-support 3.0.0-bnr.5 → 3.0.0
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/index.js.map +1 -1
- package/dist/support.js +13 -8
- package/dist/support.js.map +1 -1
- package/jest.config.js +3 -0
- package/package.json +33 -11
- package/process +1 -0
- package/src/support.js +10 -0
- package/test/unit/spec/support.js +63 -4
- package/dist/internal-plugin-support.d.ts +0 -4
- package/dist/tsdoc-metadata.json +0 -11
- package/dist/types/config.d.ts +0 -16
- package/dist/types/index.d.ts +0 -1
- package/dist/types/support.d.ts +0 -2
package/.eslintrc.js
ADDED
package/babel.config.js
ADDED
package/dist/config.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
10
10
|
*/
|
|
11
|
-
var _default = {
|
|
11
|
+
var _default = exports.default = {
|
|
12
12
|
device: {
|
|
13
13
|
preDiscoveryServices: {
|
|
14
14
|
atlasServiceUrl: process.env.ATLAS_SERVICE_URL || 'https://atlas-a.wbx2.com/admin/api/v1',
|
|
@@ -23,5 +23,4 @@ var _default = {
|
|
|
23
23
|
languageCode: ''
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
exports.default = _default;
|
|
27
26
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["device","preDiscoveryServices","atlasServiceUrl","process","env","ATLAS_SERVICE_URL","atlas","clientLogs","CLIENT_LOGS_SERVICE_URL","clientLogsServiceUrl","support","appType","appVersion","languageCode"],"sources":["config.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nexport default {\n device: {\n preDiscoveryServices: {\n atlasServiceUrl: process.env.ATLAS_SERVICE_URL || 'https://atlas-a.wbx2.com/admin/api/v1',\n atlas: process.env.ATLAS_SERVICE_URL || 'https://atlas-a.wbx2.com/admin/api/v1',\n clientLogs: process.env.CLIENT_LOGS_SERVICE_URL || 'https://client-logs-a.wbx2.com/api/v1',\n clientLogsServiceUrl:\n process.env.CLIENT_LOGS_SERVICE_URL || 'https://client-logs-a.wbx2.com/api/v1',\n },\n },\n\n support: {\n appType: '',\n appVersion: '',\n languageCode: '',\n },\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAFA,
|
|
1
|
+
{"version":3,"names":["_default","exports","default","device","preDiscoveryServices","atlasServiceUrl","process","env","ATLAS_SERVICE_URL","atlas","clientLogs","CLIENT_LOGS_SERVICE_URL","clientLogsServiceUrl","support","appType","appVersion","languageCode"],"sources":["config.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nexport default {\n device: {\n preDiscoveryServices: {\n atlasServiceUrl: process.env.ATLAS_SERVICE_URL || 'https://atlas-a.wbx2.com/admin/api/v1',\n atlas: process.env.ATLAS_SERVICE_URL || 'https://atlas-a.wbx2.com/admin/api/v1',\n clientLogs: process.env.CLIENT_LOGS_SERVICE_URL || 'https://client-logs-a.wbx2.com/api/v1',\n clientLogsServiceUrl:\n process.env.CLIENT_LOGS_SERVICE_URL || 'https://client-logs-a.wbx2.com/api/v1',\n },\n },\n\n support: {\n appType: '',\n appVersion: '',\n languageCode: '',\n },\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAFA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAIe;EACbC,MAAM,EAAE;IACNC,oBAAoB,EAAE;MACpBC,eAAe,EAAEC,OAAO,CAACC,GAAG,CAACC,iBAAiB,IAAI,uCAAuC;MACzFC,KAAK,EAAEH,OAAO,CAACC,GAAG,CAACC,iBAAiB,IAAI,uCAAuC;MAC/EE,UAAU,EAAEJ,OAAO,CAACC,GAAG,CAACI,uBAAuB,IAAI,uCAAuC;MAC1FC,oBAAoB,EAClBN,OAAO,CAACC,GAAG,CAACI,uBAAuB,IAAI;IAC3C;EACF,CAAC;EAEDE,OAAO,EAAE;IACPC,OAAO,EAAE,EAAE;IACXC,UAAU,EAAE,EAAE;IACdC,YAAY,EAAE;EAChB;AACF,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registerInternalPlugin","Support","config"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nimport '@webex/internal-plugin-device';\n\nimport {registerInternalPlugin} from '@webex/webex-core';\n\nimport Support from './support';\nimport config from './config';\n\nregisterInternalPlugin('support', Support, {\n config,\n});\n\nexport {default} from './support';\n"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"names":["require","_webexCore","_support","_interopRequireDefault","_config","registerInternalPlugin","Support","config"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nimport '@webex/internal-plugin-device';\n\nimport {registerInternalPlugin} from '@webex/webex-core';\n\nimport Support from './support';\nimport config from './config';\n\nregisterInternalPlugin('support', Support, {\n config,\n});\n\nexport {default} from './support';\n"],"mappings":";;;;;;;;;;;;;AAGAA,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAD,sBAAA,CAAAH,OAAA;AARA;AACA;AACA;;AAQA,IAAAK,iCAAsB,EAAC,SAAS,EAAEC,gBAAO,EAAE;EACzCC,MAAM,EAANA;AACF,CAAC,CAAC"}
|
package/dist/support.js
CHANGED
|
@@ -8,8 +8,8 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
11
|
-
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
12
11
|
var _webexCore = require("@webex/webex-core");
|
|
12
|
+
var _lodash = require("lodash");
|
|
13
13
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
14
14
|
/*!
|
|
15
15
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
@@ -23,7 +23,7 @@ var Support = _webexCore.WebexPlugin.extend({
|
|
|
23
23
|
method: 'POST',
|
|
24
24
|
api: 'conversation',
|
|
25
25
|
resource: 'users/deskFeedbackUrl',
|
|
26
|
-
body: (0,
|
|
26
|
+
body: (0, _lodash.defaults)(options, {
|
|
27
27
|
appVersion: this.config.appVersion,
|
|
28
28
|
appType: this.config.appType,
|
|
29
29
|
feedbackId: options.feedbackId || _uuid.default.v4(),
|
|
@@ -79,7 +79,7 @@ var Support = _webexCore.WebexPlugin.extend({
|
|
|
79
79
|
service: 'clientLogs',
|
|
80
80
|
resource: 'logs/meta'
|
|
81
81
|
};
|
|
82
|
-
options = (0,
|
|
82
|
+
options = (0, _lodash.defaults)(initalOpts, {
|
|
83
83
|
file: logs,
|
|
84
84
|
shouldAttemptReauth: false,
|
|
85
85
|
headers: headers,
|
|
@@ -94,7 +94,7 @@ var Support = _webexCore.WebexPlugin.extend({
|
|
|
94
94
|
return session.tempURL;
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
|
-
finalize: (0,
|
|
97
|
+
finalize: (0, _lodash.defaults)(finalOpts, {
|
|
98
98
|
$body: function $body(session) {
|
|
99
99
|
userId = session.userId;
|
|
100
100
|
return {
|
|
@@ -129,7 +129,7 @@ var Support = _webexCore.WebexPlugin.extend({
|
|
|
129
129
|
* @returns {array}
|
|
130
130
|
*/
|
|
131
131
|
_constructFileMetadata: function _constructFileMetadata(metadata) {
|
|
132
|
-
var metadataArray = ['locusId', 'callStart', 'feedbackId', 'correlationId', 'meetingId', 'surveySessionId', 'productAreaTag', 'issueTypeTag'].map(function (key) {
|
|
132
|
+
var metadataArray = ['locusId', 'appVersion', 'callStart', 'feedbackId', 'correlationId', 'meetingId', 'surveySessionId', 'productAreaTag', 'issueTypeTag', 'locussessionid', 'autoupload'].map(function (key) {
|
|
133
133
|
if (metadata[key]) {
|
|
134
134
|
return {
|
|
135
135
|
key: key,
|
|
@@ -146,6 +146,12 @@ var Support = _webexCore.WebexPlugin.extend({
|
|
|
146
146
|
value: this.webex.sessionId
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
+
if (this.webex.internal.support.config.appVersion) {
|
|
150
|
+
metadataArray.push({
|
|
151
|
+
key: 'appVersion',
|
|
152
|
+
value: this.webex.internal.support.config.appVersion
|
|
153
|
+
});
|
|
154
|
+
}
|
|
149
155
|
if (this.webex.internal.device.userId) {
|
|
150
156
|
metadataArray.push({
|
|
151
157
|
key: 'userId',
|
|
@@ -160,8 +166,7 @@ var Support = _webexCore.WebexPlugin.extend({
|
|
|
160
166
|
}
|
|
161
167
|
return metadataArray;
|
|
162
168
|
},
|
|
163
|
-
version: "3.0.0
|
|
169
|
+
version: "3.0.0"
|
|
164
170
|
});
|
|
165
|
-
var _default = Support;
|
|
166
|
-
exports.default = _default;
|
|
171
|
+
var _default = exports.default = Support;
|
|
167
172
|
//# sourceMappingURL=support.js.map
|
package/dist/support.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Support","WebexPlugin","extend","namespace","getFeedbackUrl","options","request","method","api","resource","body","appVersion","config","appType","feedbackId","uuid","v4","languageCode","then","res","url","getSupportUrl","webex","qs","submitLogs","metadata","logs","metadataArray","_constructFileMetadata","logger","sdkBuffer","clientBuffer","buffer","formatLogs","filename","locusId","callStart","sessionId","userId","credentials","getUserToken","catch","getClientToken","token","headers","authorization","toString","initalOpts","service","finalOpts","file","shouldAttemptReauth","phases","initialize","upload","$uri","session","tempURL","finalize","$body","logFilename","data","internal","device","map","key","value","filter","entry","Boolean","push","orgId"],"sources":["support.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin} from '@webex/webex-core';\nimport {defaults} from 'lodash';\nimport uuid from 'uuid';\n\nconst Support = WebexPlugin.extend({\n namespace: 'Support',\n\n getFeedbackUrl(options) {\n options = options || {};\n\n return this.request({\n method: 'POST',\n api: 'conversation',\n resource: 'users/deskFeedbackUrl',\n body: defaults(options, {\n appVersion: this.config.appVersion,\n appType: this.config.appType,\n feedbackId: options.feedbackId || uuid.v4(),\n languageCode: this.config.languageCode,\n }),\n }).then((res) => res.body.url);\n },\n\n getSupportUrl() {\n return this.webex\n .request({\n method: 'GET',\n api: 'conversation',\n resource: 'users/deskSupportUrl',\n qs: {\n languageCode: this.config.languageCode,\n },\n })\n .then((res) => res.body.url);\n },\n\n submitLogs(metadata, logs) {\n const metadataArray = this._constructFileMetadata(metadata);\n\n // this is really testing that Ampersand is fully ready. once it's ready, these exist\n if (\n !logs &&\n this.webex.logger.sdkBuffer &&\n this.webex.logger.clientBuffer &&\n this.webex.logger.buffer\n ) {\n logs = this.webex.logger.formatLogs();\n }\n\n let filename;\n\n if (metadata.locusId && metadata.callStart) {\n filename = `${metadata.locusId}_${metadata.callStart}.txt`;\n } else {\n filename = `${this.webex.sessionId}.txt`;\n }\n\n let userId;\n\n return this.webex.credentials\n .getUserToken()\n .catch(() => this.webex.credentials.getClientToken())\n .then(async (token) => {\n const headers = {authorization: token.toString()};\n\n const initalOpts = {\n service: 'clientLogs',\n resource: 'logs/urls',\n };\n\n const finalOpts = {\n service: 'clientLogs',\n resource: 'logs/meta',\n };\n\n const options = defaults(initalOpts, {\n file: logs,\n shouldAttemptReauth: false,\n headers,\n phases: {\n initialize: {\n body: {\n file: filename,\n },\n },\n upload: {\n $uri: (session) => session.tempURL,\n },\n finalize: defaults(finalOpts, {\n $body: (session) => {\n userId = session.userId;\n\n return {\n filename: session.logFilename,\n data: metadataArray,\n userId: this.webex.internal.device.userId || session.userId,\n };\n },\n }),\n },\n });\n\n return this.webex.upload(options);\n })\n .then((body) => {\n if (userId && !body.userId) {\n body.userId = userId;\n }\n\n return body;\n });\n },\n\n /**\n * Constructs an array of key-value pairs for log upload.\n * @param {*} metadata\n * @returns {array}\n */\n _constructFileMetadata(metadata) {\n const metadataArray = [\n 'locusId',\n 'callStart',\n 'feedbackId',\n 'correlationId',\n 'meetingId',\n 'surveySessionId',\n 'productAreaTag',\n 'issueTypeTag',\n ]\n .map((key) => {\n if (metadata[key]) {\n return {\n key,\n value: metadata[key],\n };\n }\n\n return null;\n })\n .filter((entry) => Boolean(entry));\n\n if (this.webex.sessionId) {\n metadataArray.push({\n key: 'trackingId',\n value: this.webex.sessionId,\n });\n }\n\n if (this.webex.internal.device.userId) {\n metadataArray.push({\n key: 'userId',\n value: this.webex.internal.device.userId,\n });\n }\n\n if (this.webex.internal.device.orgId) {\n metadataArray.push({\n key: 'orgId',\n value: this.webex.internal.device.orgId,\n });\n }\n\n return metadataArray;\n },\n});\n\nexport default Support;\n"],"mappings":";;;;;;;;;;;AAIA;AAEA;AANA;AACA;AACA;;AAMA,IAAMA,OAAO,GAAGC,sBAAW,CAACC,MAAM,CAAC;EACjCC,SAAS,EAAE,SAAS;EAEpBC,cAAc,0BAACC,OAAO,EAAE;IACtBA,OAAO,GAAGA,OAAO,IAAI,CAAC,CAAC;IAEvB,OAAO,IAAI,CAACC,OAAO,CAAC;MAClBC,MAAM,EAAE,MAAM;MACdC,GAAG,EAAE,cAAc;MACnBC,QAAQ,EAAE,uBAAuB;MACjCC,IAAI,EAAE,wBAASL,OAAO,EAAE;QACtBM,UAAU,EAAE,IAAI,CAACC,MAAM,CAACD,UAAU;QAClCE,OAAO,EAAE,IAAI,CAACD,MAAM,CAACC,OAAO;QAC5BC,UAAU,EAAET,OAAO,CAACS,UAAU,IAAIC,aA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AI,CAAC5C,KAAK,CAACwC,QAAQ,CAACC,MAAM,CAACQ;MACpC,CAAC,CAAC;IACJ;IAEA,OAAO5C,aAAa;EACtB,CAAC;EAAA;AACH,CAAC,CAAC;AAAC,eAEY3B,OAAO;AAAA"}
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_lodash","_uuid","_interopRequireDefault","Support","WebexPlugin","extend","namespace","getFeedbackUrl","options","request","method","api","resource","body","defaults","appVersion","config","appType","feedbackId","uuid","v4","languageCode","then","res","url","getSupportUrl","webex","qs","submitLogs","metadata","logs","_this","metadataArray","_constructFileMetadata","logger","sdkBuffer","clientBuffer","buffer","formatLogs","filename","locusId","callStart","concat","sessionId","userId","credentials","getUserToken","catch","getClientToken","_ref","_asyncToGenerator2","default","_regenerator","mark","_callee","token","headers","initalOpts","finalOpts","wrap","_callee$","_context","prev","next","authorization","toString","service","file","shouldAttemptReauth","phases","initialize","upload","$uri","session","tempURL","finalize","$body","logFilename","data","internal","device","abrupt","stop","_x","apply","arguments","map","key","value","filter","entry","Boolean","push","support","orgId","version","_default","exports"],"sources":["support.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin} from '@webex/webex-core';\nimport {defaults} from 'lodash';\nimport uuid from 'uuid';\n\nconst Support = WebexPlugin.extend({\n namespace: 'Support',\n\n getFeedbackUrl(options) {\n options = options || {};\n\n return this.request({\n method: 'POST',\n api: 'conversation',\n resource: 'users/deskFeedbackUrl',\n body: defaults(options, {\n appVersion: this.config.appVersion,\n appType: this.config.appType,\n feedbackId: options.feedbackId || uuid.v4(),\n languageCode: this.config.languageCode,\n }),\n }).then((res) => res.body.url);\n },\n\n getSupportUrl() {\n return this.webex\n .request({\n method: 'GET',\n api: 'conversation',\n resource: 'users/deskSupportUrl',\n qs: {\n languageCode: this.config.languageCode,\n },\n })\n .then((res) => res.body.url);\n },\n\n submitLogs(metadata, logs) {\n const metadataArray = this._constructFileMetadata(metadata);\n\n // this is really testing that Ampersand is fully ready. once it's ready, these exist\n if (\n !logs &&\n this.webex.logger.sdkBuffer &&\n this.webex.logger.clientBuffer &&\n this.webex.logger.buffer\n ) {\n logs = this.webex.logger.formatLogs();\n }\n\n let filename;\n\n if (metadata.locusId && metadata.callStart) {\n filename = `${metadata.locusId}_${metadata.callStart}.txt`;\n } else {\n filename = `${this.webex.sessionId}.txt`;\n }\n\n let userId;\n\n return this.webex.credentials\n .getUserToken()\n .catch(() => this.webex.credentials.getClientToken())\n .then(async (token) => {\n const headers = {authorization: token.toString()};\n\n const initalOpts = {\n service: 'clientLogs',\n resource: 'logs/urls',\n };\n\n const finalOpts = {\n service: 'clientLogs',\n resource: 'logs/meta',\n };\n\n const options = defaults(initalOpts, {\n file: logs,\n shouldAttemptReauth: false,\n headers,\n phases: {\n initialize: {\n body: {\n file: filename,\n },\n },\n upload: {\n $uri: (session) => session.tempURL,\n },\n finalize: defaults(finalOpts, {\n $body: (session) => {\n userId = session.userId;\n\n return {\n filename: session.logFilename,\n data: metadataArray,\n userId: this.webex.internal.device.userId || session.userId,\n };\n },\n }),\n },\n });\n\n return this.webex.upload(options);\n })\n .then((body) => {\n if (userId && !body.userId) {\n body.userId = userId;\n }\n\n return body;\n });\n },\n\n /**\n * Constructs an array of key-value pairs for log upload.\n * @param {*} metadata\n * @returns {array}\n */\n _constructFileMetadata(metadata) {\n const metadataArray = [\n 'locusId',\n 'appVersion',\n 'callStart',\n 'feedbackId',\n 'correlationId',\n 'meetingId',\n 'surveySessionId',\n 'productAreaTag',\n 'issueTypeTag',\n 'locussessionid',\n 'autoupload',\n ]\n .map((key) => {\n if (metadata[key]) {\n return {\n key,\n value: metadata[key],\n };\n }\n\n return null;\n })\n .filter((entry) => Boolean(entry));\n\n if (this.webex.sessionId) {\n metadataArray.push({\n key: 'trackingId',\n value: this.webex.sessionId,\n });\n }\n\n if (this.webex.internal.support.config.appVersion) {\n metadataArray.push({\n key: 'appVersion',\n value: this.webex.internal.support.config.appVersion,\n });\n }\n\n if (this.webex.internal.device.userId) {\n metadataArray.push({\n key: 'userId',\n value: this.webex.internal.device.userId,\n });\n }\n\n if (this.webex.internal.device.orgId) {\n metadataArray.push({\n key: 'orgId',\n value: this.webex.internal.device.orgId,\n });\n }\n\n return metadataArray;\n },\n});\n\nexport default Support;\n"],"mappings":";;;;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AANA;AACA;AACA;;AAMA,IAAMI,OAAO,GAAGC,sBAAW,CAACC,MAAM,CAAC;EACjCC,SAAS,EAAE,SAAS;EAEpBC,cAAc,WAAAA,eAACC,OAAO,EAAE;IACtBA,OAAO,GAAGA,OAAO,IAAI,CAAC,CAAC;IAEvB,OAAO,IAAI,CAACC,OAAO,CAAC;MAClBC,MAAM,EAAE,MAAM;MACdC,GAAG,EAAE,cAAc;MACnBC,QAAQ,EAAE,uBAAuB;MACjCC,IAAI,EAAE,IAAAC,gBAAQ,EAACN,OAAO,EAAE;QACtBO,UAAU,EAAE,IAAI,CAACC,MAAM,CAACD,UAAU;QAClCE,OAAO,EAAE,IAAI,CAACD,MAAM,CAACC,OAAO;QAC5BC,UAAU,EAAEV,OAAO,CAACU,UAAU,IAAIC,aAAI,CAACC,EAAE,CAAC,CAAC;QAC3CC,YAAY,EAAE,IAAI,CAACL,MAAM,CAACK;MAC5B,CAAC;IACH,CAAC,CAAC,CAACC,IAAI,CAAC,UAACC,GAAG;MAAA,OAAKA,GAAG,CAACV,IAAI,CAACW,GAAG;IAAA,EAAC;EAChC,CAAC;EAEDC,aAAa,WAAAA,cAAA,EAAG;IACd,OAAO,IAAI,CAACC,KAAK,CACdjB,OAAO,CAAC;MACPC,MAAM,EAAE,KAAK;MACbC,GAAG,EAAE,cAAc;MACnBC,QAAQ,EAAE,sBAAsB;MAChCe,EAAE,EAAE;QACFN,YAAY,EAAE,IAAI,CAACL,M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D,QAAQ,CAACc,OAAO,CAAC7E,MAAM,CAACD;MAC5C,CAAC,CAAC;IACJ;IAEA,IAAI,IAAI,CAACW,KAAK,CAACqD,QAAQ,CAACC,MAAM,CAACpC,MAAM,EAAE;MACrCZ,aAAa,CAAC4D,IAAI,CAAC;QACjBL,GAAG,EAAE,QAAQ;QACbC,KAAK,EAAE,IAAI,CAAC9D,KAAK,CAACqD,QAAQ,CAACC,MAAM,CAACpC;MACpC,CAAC,CAAC;IACJ;IAEA,IAAI,IAAI,CAAClB,KAAK,CAACqD,QAAQ,CAACC,MAAM,CAACc,KAAK,EAAE;MACpC9D,aAAa,CAAC4D,IAAI,CAAC;QACjBL,GAAG,EAAE,OAAO;QACZC,KAAK,EAAE,IAAI,CAAC9D,KAAK,CAACqD,QAAQ,CAACC,MAAM,CAACc;MACpC,CAAC,CAAC;IACJ;IAEA,OAAO9D,aAAa;EACtB,CAAC;EAAA+D,OAAA;AACH,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA9C,OAAA,GAEYhD,OAAO"}
|
package/jest.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/internal-plugin-support",
|
|
3
|
-
"version": "3.0.0-bnr.5",
|
|
4
3
|
"description": "",
|
|
5
4
|
"license": "MIT",
|
|
6
5
|
"author": "nickclar <nickclar@cisco.com>",
|
|
@@ -21,15 +20,38 @@
|
|
|
21
20
|
]
|
|
22
21
|
},
|
|
23
22
|
"dependencies": {
|
|
24
|
-
"@webex/internal-plugin-device": "3.0.0
|
|
25
|
-
"@webex/internal-plugin-search": "3.0.0
|
|
26
|
-
"@webex/
|
|
27
|
-
"@webex/test-helper-
|
|
28
|
-
"@webex/test-helper-
|
|
29
|
-
"@webex/test-helper-
|
|
30
|
-
"@webex/
|
|
31
|
-
"@webex/webex-core": "3.0.0-bnr.5",
|
|
23
|
+
"@webex/internal-plugin-device": "3.0.0",
|
|
24
|
+
"@webex/internal-plugin-search": "3.0.0",
|
|
25
|
+
"@webex/test-helper-chai": "3.0.0",
|
|
26
|
+
"@webex/test-helper-file": "3.0.0",
|
|
27
|
+
"@webex/test-helper-mock-webex": "3.0.0",
|
|
28
|
+
"@webex/test-helper-test-users": "3.0.0",
|
|
29
|
+
"@webex/webex-core": "3.0.0",
|
|
32
30
|
"lodash": "^4.17.21",
|
|
33
31
|
"uuid": "^3.3.2"
|
|
34
|
-
}
|
|
35
|
-
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "yarn build:src",
|
|
35
|
+
"build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
|
|
36
|
+
"deploy:npm": "yarn npm publish",
|
|
37
|
+
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
|
|
38
|
+
"test:browser": "webex-legacy-tools test --integration --runner karma",
|
|
39
|
+
"test:integratio:broken": "webex-legacy-tools test --integration --runner mocha",
|
|
40
|
+
"test:style": "eslint ./src/**/*.*",
|
|
41
|
+
"test:unit": "webex-legacy-tools test --unit --runner jest"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@babel/core": "^7.17.10",
|
|
45
|
+
"@webex/babel-config-legacy": "0.0.0",
|
|
46
|
+
"@webex/eslint-config-legacy": "0.0.0",
|
|
47
|
+
"@webex/jest-config-legacy": "0.0.0",
|
|
48
|
+
"@webex/legacy-tools": "0.0.0",
|
|
49
|
+
"@webex/test-helper-chai": "3.0.0",
|
|
50
|
+
"@webex/test-helper-mocha": "3.0.0",
|
|
51
|
+
"@webex/test-helper-mock-webex": "3.0.0",
|
|
52
|
+
"@webex/test-helper-test-users": "3.0.0",
|
|
53
|
+
"eslint": "^8.24.0",
|
|
54
|
+
"prettier": "^2.7.1"
|
|
55
|
+
},
|
|
56
|
+
"version": "3.0.0"
|
|
57
|
+
}
|
package/process
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {browser: true};
|
package/src/support.js
CHANGED
|
@@ -123,6 +123,7 @@ const Support = WebexPlugin.extend({
|
|
|
123
123
|
_constructFileMetadata(metadata) {
|
|
124
124
|
const metadataArray = [
|
|
125
125
|
'locusId',
|
|
126
|
+
'appVersion',
|
|
126
127
|
'callStart',
|
|
127
128
|
'feedbackId',
|
|
128
129
|
'correlationId',
|
|
@@ -130,6 +131,8 @@ const Support = WebexPlugin.extend({
|
|
|
130
131
|
'surveySessionId',
|
|
131
132
|
'productAreaTag',
|
|
132
133
|
'issueTypeTag',
|
|
134
|
+
'locussessionid',
|
|
135
|
+
'autoupload',
|
|
133
136
|
]
|
|
134
137
|
.map((key) => {
|
|
135
138
|
if (metadata[key]) {
|
|
@@ -150,6 +153,13 @@ const Support = WebexPlugin.extend({
|
|
|
150
153
|
});
|
|
151
154
|
}
|
|
152
155
|
|
|
156
|
+
if (this.webex.internal.support.config.appVersion) {
|
|
157
|
+
metadataArray.push({
|
|
158
|
+
key: 'appVersion',
|
|
159
|
+
value: this.webex.internal.support.config.appVersion,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
153
163
|
if (this.webex.internal.device.userId) {
|
|
154
164
|
metadataArray.push({
|
|
155
165
|
key: 'userId',
|
|
@@ -8,9 +8,7 @@ import Support from '@webex/internal-plugin-support';
|
|
|
8
8
|
import {assert} from '@webex/test-helper-chai';
|
|
9
9
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
10
10
|
|
|
11
|
-
describe('plugin-support',
|
|
12
|
-
this.timeout(20000);
|
|
13
|
-
|
|
11
|
+
describe('plugin-support', () => {
|
|
14
12
|
let webex;
|
|
15
13
|
|
|
16
14
|
beforeEach(() => {
|
|
@@ -22,18 +20,23 @@ describe('plugin-support', function () {
|
|
|
22
20
|
|
|
23
21
|
webex.internal.device.userId = 'user-abc-123';
|
|
24
22
|
webex.internal.device.orgId = 'org-abc-123';
|
|
23
|
+
webex.internal.support.config.appVersion = '0.0.0.0';
|
|
25
24
|
});
|
|
26
25
|
|
|
27
26
|
describe('#_constructFileMetadata()', () => {
|
|
28
27
|
it('constructs a sample File Meta Data', () => {
|
|
29
28
|
const result = webex.internal.support._constructFileMetadata({});
|
|
30
29
|
|
|
31
|
-
assert.equal(result.length,
|
|
30
|
+
assert.equal(result.length, 4);
|
|
32
31
|
assert.deepEqual(result, [
|
|
33
32
|
{
|
|
34
33
|
key: 'trackingId',
|
|
35
34
|
value: 'mock-webex_88888888-4444-4444-4444-aaaaaaaaaaaa',
|
|
36
35
|
},
|
|
36
|
+
{
|
|
37
|
+
key: 'appVersion',
|
|
38
|
+
value: '0.0.0.0',
|
|
39
|
+
},
|
|
37
40
|
{
|
|
38
41
|
key: 'userId',
|
|
39
42
|
value: webex.internal.device.userId,
|
|
@@ -92,6 +95,62 @@ describe('plugin-support', function () {
|
|
|
92
95
|
|
|
93
96
|
assert.equal(found?.value, issueTypeTag);
|
|
94
97
|
});
|
|
98
|
+
|
|
99
|
+
it('sends locussessionid if specified in metadata', () => {
|
|
100
|
+
const locussessionid = 'locussessionid';
|
|
101
|
+
const result = webex.internal.support._constructFileMetadata({locussessionid});
|
|
102
|
+
const found = result.find((attr) => attr.key === 'locussessionid');
|
|
103
|
+
|
|
104
|
+
assert.equal(found?.value, locussessionid);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it('sends locusId if specified in metadata', () => {
|
|
108
|
+
const locusId = 'locusId';
|
|
109
|
+
const result = webex.internal.support._constructFileMetadata({locusId});
|
|
110
|
+
const found = result.find((attr) => attr.key === 'locusId');
|
|
111
|
+
|
|
112
|
+
assert.equal(found?.value, locusId);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it('sends callStart if specified in metadata', () => {
|
|
116
|
+
const callStart = 'callStart';
|
|
117
|
+
const result = webex.internal.support._constructFileMetadata({callStart});
|
|
118
|
+
const found = result.find((attr) => attr.key === 'callStart');
|
|
119
|
+
|
|
120
|
+
assert.equal(found?.value, callStart);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it('sends feedbackId if specified in metadata', () => {
|
|
124
|
+
const feedbackId = 'feedbackId';
|
|
125
|
+
const result = webex.internal.support._constructFileMetadata({feedbackId});
|
|
126
|
+
const found = result.find((attr) => attr.key === 'feedbackId');
|
|
127
|
+
|
|
128
|
+
assert.equal(found?.value, feedbackId);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('sends correlationId if specified in metadata', () => {
|
|
132
|
+
const correlationId = 'correlationId';
|
|
133
|
+
const result = webex.internal.support._constructFileMetadata({correlationId});
|
|
134
|
+
const found = result.find((attr) => attr.key === 'correlationId');
|
|
135
|
+
|
|
136
|
+
assert.equal(found?.value, correlationId);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('sends meetingId if specified in metadata', () => {
|
|
140
|
+
const meetingId = 'meetingId';
|
|
141
|
+
const result = webex.internal.support._constructFileMetadata({meetingId});
|
|
142
|
+
const found = result.find((attr) => attr.key === 'meetingId');
|
|
143
|
+
|
|
144
|
+
assert.equal(found?.value, meetingId);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it('sends autoupload if specified in metadata', () => {
|
|
148
|
+
const autoupload = 'autoupload';
|
|
149
|
+
const result = webex.internal.support._constructFileMetadata({autoupload});
|
|
150
|
+
const found = result.find((attr) => attr.key === 'autoupload');
|
|
151
|
+
|
|
152
|
+
assert.equal(found?.value, autoupload);
|
|
153
|
+
});
|
|
95
154
|
});
|
|
96
155
|
|
|
97
156
|
describe('#submitLogs()', () => {
|
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,16 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
namespace device {
|
|
3
|
-
namespace preDiscoveryServices {
|
|
4
|
-
const atlasServiceUrl: string;
|
|
5
|
-
const atlas: string;
|
|
6
|
-
const clientLogs: string;
|
|
7
|
-
const clientLogsServiceUrl: string;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
namespace support {
|
|
11
|
-
const appType: string;
|
|
12
|
-
const appVersion: string;
|
|
13
|
-
const languageCode: string;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export default _default;
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./support";
|
package/dist/types/support.d.ts
DELETED