@webex/internal-plugin-support 3.0.0-beta.15 → 3.0.0-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.js +0 -3
- package/dist/config.js.map +1 -1
- package/dist/index.js +1 -8
- package/dist/index.js.map +1 -1
- package/dist/support.js +48 -72
- package/dist/support.js.map +1 -1
- package/package.json +9 -9
package/dist/config.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
|
|
9
7
|
exports.default = void 0;
|
|
10
|
-
|
|
11
8
|
/*!
|
|
12
9
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
13
10
|
*/
|
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":"
|
|
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,eAIe;EACbA,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;AAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
_Object$defineProperty(exports, "default", {
|
|
12
9
|
enumerable: true,
|
|
13
10
|
get: function get() {
|
|
14
11
|
return _support.default;
|
|
15
12
|
}
|
|
16
13
|
});
|
|
17
|
-
|
|
18
14
|
require("@webex/internal-plugin-device");
|
|
19
|
-
|
|
20
15
|
var _webexCore = require("@webex/webex-core");
|
|
21
|
-
|
|
22
16
|
var _support = _interopRequireDefault(require("./support"));
|
|
23
|
-
|
|
24
17
|
var _config = _interopRequireDefault(require("./config"));
|
|
25
|
-
|
|
26
18
|
/*!
|
|
27
19
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
28
20
|
*/
|
|
21
|
+
|
|
29
22
|
(0, _webexCore.registerInternalPlugin)('support', _support.default, {
|
|
30
23
|
config: _config.default
|
|
31
24
|
});
|
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":["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":";;;;;;;;;;;;;AAGA;AAEA;AAEA;AACA;AARA;AACA;AACA;;AAQA,IAAAA,iCAAsB,EAAC,SAAS,EAAEC,gBAAO,EAAE;EACzCC,MAAM,EAANA;AACF,CAAC,CAAC"}
|
package/dist/support.js
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
exports.default = void 0;
|
|
12
|
-
|
|
13
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
14
|
-
|
|
15
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
16
|
-
|
|
17
11
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
18
|
-
|
|
19
12
|
var _webexCore = require("@webex/webex-core");
|
|
20
|
-
|
|
21
13
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
22
|
-
|
|
23
14
|
/*!
|
|
24
15
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
25
16
|
*/
|
|
17
|
+
|
|
26
18
|
var Support = _webexCore.WebexPlugin.extend({
|
|
27
19
|
namespace: 'Support',
|
|
28
20
|
getFeedbackUrl: function getFeedbackUrl(options) {
|
|
@@ -55,22 +47,18 @@ var Support = _webexCore.WebexPlugin.extend({
|
|
|
55
47
|
},
|
|
56
48
|
submitLogs: function submitLogs(metadata, logs) {
|
|
57
49
|
var _this = this;
|
|
50
|
+
var metadataArray = this._constructFileMetadata(metadata);
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
// this is really testing that Ampersand is fully ready. once it's ready, these exist
|
|
62
53
|
if (!logs && this.webex.logger.sdkBuffer && this.webex.logger.clientBuffer && this.webex.logger.buffer) {
|
|
63
54
|
logs = this.webex.logger.formatLogs();
|
|
64
55
|
}
|
|
65
|
-
|
|
66
56
|
var filename;
|
|
67
|
-
|
|
68
57
|
if (metadata.locusId && metadata.callStart) {
|
|
69
58
|
filename = "".concat(metadata.locusId, "_").concat(metadata.callStart, ".txt");
|
|
70
59
|
} else {
|
|
71
60
|
filename = "".concat(this.webex.sessionId, ".txt");
|
|
72
61
|
}
|
|
73
|
-
|
|
74
62
|
var userId;
|
|
75
63
|
return this.webex.credentials.getUserToken().catch(function () {
|
|
76
64
|
return _this.webex.credentials.getClientToken();
|
|
@@ -78,57 +66,53 @@ var Support = _webexCore.WebexPlugin.extend({
|
|
|
78
66
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(token) {
|
|
79
67
|
var headers, initalOpts, finalOpts, options;
|
|
80
68
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
81
|
-
while (1) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
case "end":
|
|
126
|
-
return _context.stop();
|
|
127
|
-
}
|
|
69
|
+
while (1) switch (_context.prev = _context.next) {
|
|
70
|
+
case 0:
|
|
71
|
+
headers = {
|
|
72
|
+
authorization: token.toString()
|
|
73
|
+
};
|
|
74
|
+
initalOpts = {
|
|
75
|
+
service: 'clientLogs',
|
|
76
|
+
resource: 'logs/urls'
|
|
77
|
+
};
|
|
78
|
+
finalOpts = {
|
|
79
|
+
service: 'clientLogs',
|
|
80
|
+
resource: 'logs/meta'
|
|
81
|
+
};
|
|
82
|
+
options = (0, _defaults2.default)(initalOpts, {
|
|
83
|
+
file: logs,
|
|
84
|
+
shouldAttemptReauth: false,
|
|
85
|
+
headers: headers,
|
|
86
|
+
phases: {
|
|
87
|
+
initialize: {
|
|
88
|
+
body: {
|
|
89
|
+
file: filename
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
upload: {
|
|
93
|
+
$uri: function $uri(session) {
|
|
94
|
+
return session.tempURL;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
finalize: (0, _defaults2.default)(finalOpts, {
|
|
98
|
+
$body: function $body(session) {
|
|
99
|
+
userId = session.userId;
|
|
100
|
+
return {
|
|
101
|
+
filename: session.logFilename,
|
|
102
|
+
data: metadataArray,
|
|
103
|
+
userId: _this.webex.internal.device.userId || session.userId
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return _context.abrupt("return", _this.webex.upload(options));
|
|
110
|
+
case 5:
|
|
111
|
+
case "end":
|
|
112
|
+
return _context.stop();
|
|
128
113
|
}
|
|
129
114
|
}, _callee);
|
|
130
115
|
}));
|
|
131
|
-
|
|
132
116
|
return function (_x) {
|
|
133
117
|
return _ref.apply(this, arguments);
|
|
134
118
|
};
|
|
@@ -136,11 +120,9 @@ var Support = _webexCore.WebexPlugin.extend({
|
|
|
136
120
|
if (userId && !body.userId) {
|
|
137
121
|
body.userId = userId;
|
|
138
122
|
}
|
|
139
|
-
|
|
140
123
|
return body;
|
|
141
124
|
});
|
|
142
125
|
},
|
|
143
|
-
|
|
144
126
|
/**
|
|
145
127
|
* Constructs an array of key-value pairs for log upload.
|
|
146
128
|
* @param {*} metadata
|
|
@@ -154,38 +136,32 @@ var Support = _webexCore.WebexPlugin.extend({
|
|
|
154
136
|
value: metadata[key]
|
|
155
137
|
};
|
|
156
138
|
}
|
|
157
|
-
|
|
158
139
|
return null;
|
|
159
140
|
}).filter(function (entry) {
|
|
160
141
|
return Boolean(entry);
|
|
161
142
|
});
|
|
162
|
-
|
|
163
143
|
if (this.webex.sessionId) {
|
|
164
144
|
metadataArray.push({
|
|
165
145
|
key: 'trackingId',
|
|
166
146
|
value: this.webex.sessionId
|
|
167
147
|
});
|
|
168
148
|
}
|
|
169
|
-
|
|
170
149
|
if (this.webex.internal.device.userId) {
|
|
171
150
|
metadataArray.push({
|
|
172
151
|
key: 'userId',
|
|
173
152
|
value: this.webex.internal.device.userId
|
|
174
153
|
});
|
|
175
154
|
}
|
|
176
|
-
|
|
177
155
|
if (this.webex.internal.device.orgId) {
|
|
178
156
|
metadataArray.push({
|
|
179
157
|
key: 'orgId',
|
|
180
158
|
value: this.webex.internal.device.orgId
|
|
181
159
|
});
|
|
182
160
|
}
|
|
183
|
-
|
|
184
161
|
return metadataArray;
|
|
185
162
|
},
|
|
186
|
-
version: "3.0.0-beta.
|
|
163
|
+
version: "3.0.0-beta.17"
|
|
187
164
|
});
|
|
188
|
-
|
|
189
165
|
var _default = Support;
|
|
190
166
|
exports.default = _default;
|
|
191
167
|
//# 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 ]\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":"
|
|
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 ]\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,aAAI,CAACC,EAAE,EAAE;QAC3CC,YAAY,EAAE,IAAI,CAACL,MAAM,CAACK;MAC5B,CAAC;IACH,CAAC,CAAC,CAACC,IAAI,CAAC,UAACC,GAAG;MAAA,OAAKA,GAAG,CAACT,IAAI,CAACU,GAAG;IAAA,EAAC;EAChC,CAAC;EAEDC,aAAa,2BAAG;IACd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in-support",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "nickclar <nickclar@cisco.com>",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
25
|
-
"@webex/internal-plugin-search": "3.0.0-beta.
|
|
26
|
-
"@webex/internal-plugin-support": "3.0.0-beta.
|
|
27
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
28
|
-
"@webex/test-helper-file": "3.0.0-beta.
|
|
29
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
30
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
31
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
24
|
+
"@webex/internal-plugin-device": "3.0.0-beta.17",
|
|
25
|
+
"@webex/internal-plugin-search": "3.0.0-beta.17",
|
|
26
|
+
"@webex/internal-plugin-support": "3.0.0-beta.17",
|
|
27
|
+
"@webex/test-helper-chai": "3.0.0-beta.17",
|
|
28
|
+
"@webex/test-helper-file": "3.0.0-beta.17",
|
|
29
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.17",
|
|
30
|
+
"@webex/test-helper-test-users": "3.0.0-beta.17",
|
|
31
|
+
"@webex/webex-core": "3.0.0-beta.17",
|
|
32
32
|
"lodash": "^4.17.21",
|
|
33
33
|
"uuid": "^3.3.2"
|
|
34
34
|
}
|