@webex/internal-plugin-call-ai-summary 0.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.
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
4
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
5
+ var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
6
+ var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
7
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
8
+ /*!
9
+ * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.
10
+ *
11
+ * Manual integration test for internal-plugin-call-ai-summary
12
+ * Tests the full flow using the SDK service catalog (WDM):
13
+ * device.register() -> getContainer -> getSummary (with KMS decryption)
14
+ *
15
+ * The SDK resolves `service: 'pragya'` to the correct base URL via the
16
+ * service catalog populated during device registration.
17
+ *
18
+ * Usage:
19
+ * WEBEX_TOKEN='<token>' node src/manual-integration-test.js
20
+ */
21
+
22
+ /* eslint-disable no-console, require-jsdoc */
23
+
24
+ require('@webex/internal-plugin-call-ai-summary');
25
+ var WebexCore = require('@webex/webex-core').default;
26
+
27
+ // ---------------------------------------------------------------------------
28
+ // Configuration
29
+ // ---------------------------------------------------------------------------
30
+ var WEBEX_TOKEN = process.env.WEBEX_TOKEN || '<PASTE_YOUR_TOKEN_HERE>';
31
+ var CONTAINER_ID = process.env.CONTAINER_ID || '<PASTE_CONTAINER_ID_HERE>';
32
+
33
+ // ---------------------------------------------------------------------------
34
+ // Main
35
+ // ---------------------------------------------------------------------------
36
+ function main() {
37
+ return _main.apply(this, arguments);
38
+ }
39
+ function _main() {
40
+ _main = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
41
+ var _container$summaryDat, _container$summaryDat2;
42
+ var webex, pragyaUrl, container, summaryResult, noteStr, shortNoteStr, truncNote, truncShort, truncated, transcriptUrl, _yield$webex$request, transcriptBody, _t;
43
+ return _regenerator.default.wrap(function (_context) {
44
+ while (1) switch (_context.prev = _context.next) {
45
+ case 0:
46
+ console.log('=== Step 1: Create WebexCore ===\n');
47
+ webex = new WebexCore({
48
+ credentials: {
49
+ access_token: WEBEX_TOKEN
50
+ }
51
+ }); // Step 2: Register device to populate service catalog
52
+ console.log('=== Step 2: Register device (WDM) ===\n');
53
+ _context.next = 1;
54
+ return webex.internal.device.register();
55
+ case 1:
56
+ console.log('Device registered successfully.');
57
+ console.log('Device URL:', webex.internal.device.url);
58
+
59
+ // Log the pragya service URL from the service catalog
60
+ try {
61
+ pragyaUrl = webex.internal.services.get('pragya');
62
+ console.log('Pragya service URL (from catalog):', pragyaUrl);
63
+ } catch (e) {
64
+ console.log('Could not resolve pragya from service catalog:', e.message);
65
+ }
66
+
67
+ // Step 3: Get container via plugin (uses service: 'pragya' + resource)
68
+ console.log('\n=== Step 3: getContainer via plugin ===\n');
69
+ _context.next = 2;
70
+ return webex.internal.aisummary.getContainer({
71
+ containerId: CONTAINER_ID
72
+ });
73
+ case 2:
74
+ container = _context.sent;
75
+ console.log('Container Info:', (0, _stringify.default)({
76
+ id: container.id,
77
+ objectType: container.objectType,
78
+ encryptionKeyUrl: container.encryptionKeyUrl,
79
+ summaryUrl: (_container$summaryDat = container.summaryData) === null || _container$summaryDat === void 0 ? void 0 : _container$summaryDat.summaryUrl,
80
+ transcriptUrl: (_container$summaryDat2 = container.summaryData) === null || _container$summaryDat2 === void 0 ? void 0 : _container$summaryDat2.transcriptUrl
81
+ }, null, 2));
82
+
83
+ // Step 4: Call getSummary via plugin (fetches + decrypts all content)
84
+ console.log('\n=== Step 4: getSummary via plugin ===\n');
85
+ _context.next = 3;
86
+ return webex.internal.aisummary.getSummary({
87
+ containerInfo: container
88
+ });
89
+ case 3:
90
+ summaryResult = _context.sent;
91
+ console.log('=== getSummary return structure ===');
92
+ noteStr = summaryResult.note || '';
93
+ shortNoteStr = summaryResult.shortNote || '';
94
+ truncNote = noteStr.length > 200 ? "".concat(noteStr.substring(0, 200), "...") : noteStr;
95
+ truncShort = shortNoteStr.length > 200 ? "".concat(shortNoteStr.substring(0, 200), "...") : shortNoteStr;
96
+ truncated = {
97
+ id: summaryResult.id,
98
+ note: truncNote,
99
+ shortNote: truncShort,
100
+ actionItems: (summaryResult.actionItems || []).map(function (item) {
101
+ var content = item.aiGeneratedContent || '';
102
+ var truncContent = content.length > 100 ? "".concat(content.substring(0, 100), "...") : content;
103
+ return {
104
+ id: item.id,
105
+ aiGeneratedContent: truncContent,
106
+ editedContent: item.editedContent
107
+ };
108
+ }),
109
+ feedbackUrl: summaryResult.feedbackUrl
110
+ };
111
+ console.log((0, _stringify.default)(truncated, null, 2));
112
+
113
+ // Step 5: Get transcript URL via plugin
114
+ console.log('\n=== Step 5: getTranscriptUrl via plugin ===\n');
115
+ transcriptUrl = webex.internal.aisummary.getTranscriptUrl({
116
+ containerInfo: container
117
+ });
118
+ console.log('Transcript URL:', transcriptUrl);
119
+
120
+ // Step 6: Fetch transcript content
121
+ console.log('\n=== Step 6: Fetch transcript content ===\n');
122
+ _context.prev = 4;
123
+ _context.next = 5;
124
+ return webex.request({
125
+ method: 'GET',
126
+ uri: "".concat(transcriptUrl, "?fields=id,content")
127
+ });
128
+ case 5:
129
+ _yield$webex$request = _context.sent;
130
+ transcriptBody = _yield$webex$request.body;
131
+ console.log('Transcript response keys:', (0, _keys.default)(transcriptBody));
132
+ console.log((0, _stringify.default)(transcriptBody, null, 2).substring(0, 500));
133
+ _context.next = 7;
134
+ break;
135
+ case 6:
136
+ _context.prev = 6;
137
+ _t = _context["catch"](4);
138
+ console.error('Transcript fetch failed:', _t.message);
139
+ case 7:
140
+ console.log('\nDone.');
141
+ process.exit(0);
142
+ case 8:
143
+ case "end":
144
+ return _context.stop();
145
+ }
146
+ }, _callee, null, [[4, 6]]);
147
+ }));
148
+ return _main.apply(this, arguments);
149
+ }
150
+ main().catch(function (err) {
151
+ console.error('FATAL:', err.message || err);
152
+ process.exit(1);
153
+ });
154
+ //# sourceMappingURL=manual-integration-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["require","WebexCore","default","WEBEX_TOKEN","process","env","CONTAINER_ID","main","_main","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","_container$summaryDat","_container$summaryDat2","webex","pragyaUrl","container","summaryResult","noteStr","shortNoteStr","truncNote","truncShort","truncated","transcriptUrl","_yield$webex$request","transcriptBody","_t","wrap","_context","prev","next","console","log","credentials","access_token","internal","device","register","url","services","get","e","message","aisummary","getContainer","containerId","sent","_stringify","id","objectType","encryptionKeyUrl","summaryUrl","summaryData","getSummary","containerInfo","note","shortNote","length","concat","substring","actionItems","map","item","content","aiGeneratedContent","truncContent","editedContent","feedbackUrl","getTranscriptUrl","request","method","uri","body","_keys","error","exit","stop","catch","err"],"sources":["manual-integration-test.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n *\n * Manual integration test for internal-plugin-call-ai-summary\n * Tests the full flow using the SDK service catalog (WDM):\n * device.register() -> getContainer -> getSummary (with KMS decryption)\n *\n * The SDK resolves `service: 'pragya'` to the correct base URL via the\n * service catalog populated during device registration.\n *\n * Usage:\n * WEBEX_TOKEN='<token>' node src/manual-integration-test.js\n */\n\n/* eslint-disable no-console, require-jsdoc */\n\nrequire('@webex/internal-plugin-call-ai-summary');\n\nconst WebexCore = require('@webex/webex-core').default;\n\n// ---------------------------------------------------------------------------\n// Configuration\n// ---------------------------------------------------------------------------\nconst WEBEX_TOKEN = process.env.WEBEX_TOKEN || '<PASTE_YOUR_TOKEN_HERE>';\nconst CONTAINER_ID = process.env.CONTAINER_ID || '<PASTE_CONTAINER_ID_HERE>';\n\n// ---------------------------------------------------------------------------\n// Main\n// ---------------------------------------------------------------------------\nasync function main() {\n console.log('=== Step 1: Create WebexCore ===\\n');\n const webex = new WebexCore({\n credentials: {\n access_token: WEBEX_TOKEN,\n },\n });\n\n // Step 2: Register device to populate service catalog\n console.log('=== Step 2: Register device (WDM) ===\\n');\n await webex.internal.device.register();\n console.log('Device registered successfully.');\n console.log('Device URL:', webex.internal.device.url);\n\n // Log the pragya service URL from the service catalog\n try {\n const pragyaUrl = webex.internal.services.get('pragya');\n console.log('Pragya service URL (from catalog):', pragyaUrl);\n } catch (e) {\n console.log('Could not resolve pragya from service catalog:', e.message);\n }\n\n // Step 3: Get container via plugin (uses service: 'pragya' + resource)\n console.log('\\n=== Step 3: getContainer via plugin ===\\n');\n const container = await webex.internal.aisummary.getContainer({\n containerId: CONTAINER_ID,\n });\n console.log(\n 'Container Info:',\n JSON.stringify(\n {\n id: container.id,\n objectType: container.objectType,\n encryptionKeyUrl: container.encryptionKeyUrl,\n summaryUrl: container.summaryData?.summaryUrl,\n transcriptUrl: container.summaryData?.transcriptUrl,\n },\n null,\n 2\n )\n );\n\n // Step 4: Call getSummary via plugin (fetches + decrypts all content)\n console.log('\\n=== Step 4: getSummary via plugin ===\\n');\n const summaryResult = await webex.internal.aisummary.getSummary({\n containerInfo: container,\n });\n\n console.log('=== getSummary return structure ===');\n const noteStr = summaryResult.note || '';\n const shortNoteStr = summaryResult.shortNote || '';\n const truncNote = noteStr.length > 200 ? `${noteStr.substring(0, 200)}...` : noteStr;\n const truncShort =\n shortNoteStr.length > 200 ? `${shortNoteStr.substring(0, 200)}...` : shortNoteStr;\n const truncated = {\n id: summaryResult.id,\n note: truncNote,\n shortNote: truncShort,\n actionItems: (summaryResult.actionItems || []).map((item) => {\n const content = item.aiGeneratedContent || '';\n const truncContent = content.length > 100 ? `${content.substring(0, 100)}...` : content;\n\n return {\n id: item.id,\n aiGeneratedContent: truncContent,\n editedContent: item.editedContent,\n };\n }),\n feedbackUrl: summaryResult.feedbackUrl,\n };\n console.log(JSON.stringify(truncated, null, 2));\n\n // Step 5: Get transcript URL via plugin\n console.log('\\n=== Step 5: getTranscriptUrl via plugin ===\\n');\n const transcriptUrl = webex.internal.aisummary.getTranscriptUrl({\n containerInfo: container,\n });\n console.log('Transcript URL:', transcriptUrl);\n\n // Step 6: Fetch transcript content\n console.log('\\n=== Step 6: Fetch transcript content ===\\n');\n try {\n const {body: transcriptBody} = await webex.request({\n method: 'GET',\n uri: `${transcriptUrl}?fields=id,content`,\n });\n console.log('Transcript response keys:', Object.keys(transcriptBody));\n console.log(JSON.stringify(transcriptBody, null, 2).substring(0, 500));\n } catch (err) {\n console.error('Transcript fetch failed:', err.message);\n }\n\n console.log('\\nDone.');\n process.exit(0);\n}\n\nmain().catch((err) => {\n console.error('FATAL:', err.message || err);\n process.exit(1);\n});\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEAA,OAAO,CAAC,wCAAwC,CAAC;AAEjD,IAAMC,SAAS,GAAGD,OAAO,CAAC,mBAAmB,CAAC,CAACE,OAAO;;AAEtD;AACA;AACA;AACA,IAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACF,WAAW,IAAI,yBAAyB;AACxE,IAAMG,YAAY,GAAGF,OAAO,CAACC,GAAG,CAACC,YAAY,IAAI,2BAA2B;;AAE5E;AACA;AACA;AAAA,SACeC,IAAIA,CAAA;EAAA,OAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,MAAA;EAAAA,KAAA,OAAAG,kBAAA,CAAAT,OAAA,eAAAU,YAAA,CAAAV,OAAA,CAAAW,IAAA,CAAnB,SAAAC,QAAA;IAAA,IAAAC,qBAAA,EAAAC,sBAAA;IAAA,IAAAC,KAAA,EAAAC,SAAA,EAAAC,SAAA,EAAAC,aAAA,EAAAC,OAAA,EAAAC,YAAA,EAAAC,SAAA,EAAAC,UAAA,EAAAC,SAAA,EAAAC,aAAA,EAAAC,oBAAA,EAAAC,cAAA,EAAAC,EAAA;I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E,GAAG,CAAC,CAAC;UAAC/B,QAAA,CAAAE,IAAA;UAAA;QAAA;UAAAF,QAAA,CAAAC,IAAA;UAAAH,EAAA,GAAAE,QAAA;UAEvEG,OAAO,CAAC2C,KAAK,CAAC,0BAA0B,EAAEhD,EAAA,CAAIgB,OAAO,CAAC;QAAC;UAGzDX,OAAO,CAACC,GAAG,CAAC,SAAS,CAAC;UACtB/B,OAAO,CAAC0E,IAAI,CAAC,CAAC,CAAC;QAAC;QAAA;UAAA,OAAA/C,QAAA,CAAAgD,IAAA;MAAA;IAAA,GAAAjE,OAAA;EAAA,CACjB;EAAA,OAAAN,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAEDH,IAAI,CAAC,CAAC,CAACyE,KAAK,CAAC,UAACC,GAAG,EAAK;EACpB/C,OAAO,CAAC2C,KAAK,CAAC,QAAQ,EAAEI,GAAG,CAACpC,OAAO,IAAIoC,GAAG,CAAC;EAC3C7E,OAAO,CAAC0E,IAAI,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
4
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
5
+ var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
6
+ var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/array/is-array"));
7
+ var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
8
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
9
+ /*!
10
+ * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.
11
+ *
12
+ * Manual test for internal-plugin-call-ai-summary
13
+ *
14
+ * Usage:
15
+ * WEBEX_TOKEN='<your-token>' node manual-test.js
16
+ *
17
+ * Or paste your token directly into WEBEX_TOKEN below.
18
+ */
19
+
20
+ /* eslint-disable no-console, require-jsdoc */
21
+
22
+ require('@webex/internal-plugin-call-ai-summary');
23
+ var WebexCore = require('@webex/webex-core').default;
24
+
25
+ // ---------------------------------------------------------------------------
26
+ // Configuration
27
+ // ---------------------------------------------------------------------------
28
+ var WEBEX_TOKEN = process.env.WEBEX_TOKEN || '<PASTE_YOUR_TOKEN_HERE>';
29
+ var CONTAINER_ID = '<PASTE_CONTAINER_ID_HERE>';
30
+ var PRAGYA_BASE_URL = '<PASTE_PRAGYA_BASE_URL_HERE>';
31
+
32
+ // ---------------------------------------------------------------------------
33
+ // Main
34
+ // ---------------------------------------------------------------------------
35
+ function main() {
36
+ return _main.apply(this, arguments);
37
+ }
38
+ function _main() {
39
+ _main = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
40
+ var webex, response, container, passed, failed, check, checkExists, checkType, checkMatch, summaryData, summaryDataData, memberships, first;
41
+ return _regenerator.default.wrap(function (_context) {
42
+ while (1) switch (_context.prev = _context.next) {
43
+ case 0:
44
+ checkMatch = function _checkMatch(label, value, regex) {
45
+ if (regex.test(value)) {
46
+ console.log(" PASS: ".concat(label, " matches ").concat(regex));
47
+ passed += 1;
48
+ } else {
49
+ console.log(" FAIL: ".concat(label, " \u2014 ").concat((0, _stringify.default)(value), " does not match ").concat(regex));
50
+ failed += 1;
51
+ }
52
+ };
53
+ checkType = function _checkType(label, value, type) {
54
+ var actual = (0, _isArray.default)(value) ? 'array' : (0, _typeof2.default)(value);
55
+ var expected = type;
56
+ if (type === 'array' ? (0, _isArray.default)(value) : actual === expected) {
57
+ console.log(" PASS: ".concat(label, " is ").concat(type));
58
+ passed += 1;
59
+ } else {
60
+ console.log(" FAIL: ".concat(label, " \u2014 expected ").concat(type, ", got ").concat(actual));
61
+ failed += 1;
62
+ }
63
+ };
64
+ checkExists = function _checkExists(label, value) {
65
+ if (value !== undefined && value !== null) {
66
+ console.log(" PASS: ".concat(label, " exists"));
67
+ passed += 1;
68
+ } else {
69
+ console.log(" FAIL: ".concat(label, " is missing"));
70
+ failed += 1;
71
+ }
72
+ };
73
+ check = function _check(label, actual, expected) {
74
+ if (actual === expected) {
75
+ console.log(" PASS: ".concat(label));
76
+ passed += 1;
77
+ } else {
78
+ console.log(" FAIL: ".concat(label, " \u2014 expected ").concat((0, _stringify.default)(expected), ", got ").concat((0, _stringify.default)(actual)));
79
+ failed += 1;
80
+ }
81
+ };
82
+ if (WEBEX_TOKEN === '<PASTE_YOUR_TOKEN_HERE>') {
83
+ console.error('ERROR: Set WEBEX_TOKEN env var or paste your token in the script.');
84
+ process.exit(1);
85
+ }
86
+ webex = new WebexCore({
87
+ credentials: {
88
+ access_token: WEBEX_TOKEN
89
+ }
90
+ });
91
+ console.log('--- Fetching container', CONTAINER_ID, '(SDK auth) ---\n');
92
+ _context.next = 1;
93
+ return webex.request({
94
+ method: 'GET',
95
+ uri: "".concat(PRAGYA_BASE_URL, "/containers/").concat(CONTAINER_ID),
96
+ headers: {
97
+ 'content-type': 'application/json'
98
+ }
99
+ });
100
+ case 1:
101
+ response = _context.sent;
102
+ container = response.body;
103
+ passed = 0;
104
+ failed = 0;
105
+ // --- Top-level container ---
106
+ console.log('\n--- Top-level container ---');
107
+ checkType('container', container, 'object');
108
+ check('container.id', container.id, CONTAINER_ID);
109
+ check('container.objectType', container.objectType, 'callingAIContainer');
110
+ checkExists('container.summaryData', container.summaryData);
111
+ checkExists('container.memberships', container.memberships);
112
+ checkMatch('container.encryptionKeyUrl', container.encryptionKeyUrl, /^kms:\/\//);
113
+ checkMatch('container.kmsResourceObjectUrl', container.kmsResourceObjectUrl, /^kms:\/\//);
114
+ checkMatch('container.aclUrl', container.aclUrl, /^https?:\/\//);
115
+ checkExists('container.start', container.start);
116
+ checkExists('container.end', container.end);
117
+ checkExists('container.forkSessionId', container.forkSessionId);
118
+ checkExists('container.callSessionId', container.callSessionId);
119
+ checkExists('container.ownerUserId', container.ownerUserId);
120
+ checkExists('container.orgId', container.orgId);
121
+
122
+ // --- summaryData ---
123
+ console.log('\n--- summaryData ---');
124
+ summaryData = container.summaryData;
125
+ checkType('summaryData', summaryData, 'object');
126
+ checkExists('summaryData.extensionId', summaryData.extensionId);
127
+ check('summaryData.objectType', summaryData.objectType, 'extension');
128
+ check('summaryData.extensionType', summaryData.extensionType, 'callingAISummary');
129
+
130
+ // --- summaryData.data ---
131
+ console.log('\n--- summaryData.data ---');
132
+ summaryDataData = summaryData.data;
133
+ checkType('summaryData.data', summaryDataData, 'object');
134
+ checkExists('summaryData.data.id', summaryDataData.id);
135
+ check('summaryData.data.objectType', summaryDataData.objectType, 'callingAISummary');
136
+ checkExists('summaryData.data.status', summaryDataData.status);
137
+ checkMatch('summaryData.data.summaryUrl', summaryDataData.summaryUrl, /^https?:\/\//);
138
+ checkMatch('summaryData.data.transcriptUrl', summaryDataData.transcriptUrl, /^https?:\/\//);
139
+ checkMatch('summaryData.data.aclUrl', summaryDataData.aclUrl, /^https?:\/\//);
140
+ checkMatch('summaryData.data.kmsResourceObjectUrl', summaryDataData.kmsResourceObjectUrl, /^kms:\/\//);
141
+ checkType('summaryData.data.summarizeAfterCall', summaryDataData.summarizeAfterCall, 'boolean');
142
+ checkType('summaryData.data.contentRetention', summaryDataData.contentRetention, 'object');
143
+
144
+ // --- memberships ---
145
+ console.log('\n--- memberships ---');
146
+ memberships = container.memberships;
147
+ checkType('memberships', memberships, 'object');
148
+ checkType('memberships.items', memberships.items, 'array');
149
+ if (memberships.items.length > 0) {
150
+ console.log(" PASS: memberships.items has ".concat(memberships.items.length, " member(s)"));
151
+ passed += 1;
152
+ first = memberships.items[0];
153
+ checkExists('memberships.items[0].id', first.id);
154
+ checkType('memberships.items[0].roles', first.roles, 'array');
155
+ check('memberships.items[0].objectType', first.objectType, 'containerMembership');
156
+ } else {
157
+ console.log(' FAIL: memberships.items is empty');
158
+ failed += 1;
159
+ }
160
+
161
+ // --- Summary ---
162
+ console.log("\n=== ".concat(passed, " passed, ").concat(failed, " failed ==="));
163
+ process.exit(failed > 0 ? 1 : 0);
164
+ case 2:
165
+ case "end":
166
+ return _context.stop();
167
+ }
168
+ }, _callee);
169
+ }));
170
+ return _main.apply(this, arguments);
171
+ }
172
+ main().catch(function (err) {
173
+ console.error('FAILED:', err.message || err);
174
+ process.exit(1);
175
+ });
176
+ //# sourceMappingURL=manual-pragya-api-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["require","WebexCore","default","WEBEX_TOKEN","process","env","CONTAINER_ID","PRAGYA_BASE_URL","main","_main","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","webex","response","container","passed","failed","check","checkExists","checkType","checkMatch","summaryData","summaryDataData","memberships","first","wrap","_context","prev","next","_checkMatch","label","value","regex","test","console","log","concat","_stringify","_checkType","type","actual","_isArray","_typeof2","expected","_checkExists","undefined","_check","error","exit","credentials","access_token","request","method","uri","headers","sent","body","id","objectType","encryptionKeyUrl","kmsResourceObjectUrl","aclUrl","start","end","forkSessionId","callSessionId","ownerUserId","orgId","extensionId","extensionType","data","status","summaryUrl","transcriptUrl","summarizeAfterCall","contentRetention","items","length","roles","stop","catch","err","message"],"sources":["manual-pragya-api-test.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n *\n * Manual test for internal-plugin-call-ai-summary\n *\n * Usage:\n * WEBEX_TOKEN='<your-token>' node manual-test.js\n *\n * Or paste your token directly into WEBEX_TOKEN below.\n */\n\n/* eslint-disable no-console, require-jsdoc */\n\nrequire('@webex/internal-plugin-call-ai-summary');\n\nconst WebexCore = require('@webex/webex-core').default;\n\n// ---------------------------------------------------------------------------\n// Configuration\n// ---------------------------------------------------------------------------\nconst WEBEX_TOKEN = process.env.WEBEX_TOKEN || '<PASTE_YOUR_TOKEN_HERE>';\nconst CONTAINER_ID = '<PASTE_CONTAINER_ID_HERE>';\nconst PRAGYA_BASE_URL = '<PASTE_PRAGYA_BASE_URL_HERE>';\n\n// ---------------------------------------------------------------------------\n// Main\n// ---------------------------------------------------------------------------\nasync function main() {\n if (WEBEX_TOKEN === '<PASTE_YOUR_TOKEN_HERE>') {\n console.error('ERROR: Set WEBEX_TOKEN env var or paste your token in the script.');\n process.exit(1);\n }\n\n const webex = new WebexCore({\n credentials: {\n access_token: WEBEX_TOKEN,\n },\n });\n\n console.log('--- Fetching container', CONTAINER_ID, '(SDK auth) ---\\n');\n\n const response = await webex.request({\n method: 'GET',\n uri: `${PRAGYA_BASE_URL}/containers/${CONTAINER_ID}`,\n headers: {\n 'content-type': 'application/json',\n },\n });\n\n const container = response.body;\n let passed = 0;\n let failed = 0;\n\n function check(label, actual, expected) {\n if (actual === expected) {\n console.log(` PASS: ${label}`);\n passed += 1;\n } else {\n console.log(\n ` FAIL: ${label} — expected ${JSON.stringify(expected)}, got ${JSON.stringify(actual)}`\n );\n failed += 1;\n }\n }\n\n function checkExists(label, value) {\n if (value !== undefined && value !== null) {\n console.log(` PASS: ${label} exists`);\n passed += 1;\n } else {\n console.log(` FAIL: ${label} is missing`);\n failed += 1;\n }\n }\n\n function checkType(label, value, type) {\n const actual = Array.isArray(value) ? 'array' : typeof value;\n const expected = type;\n if (type === 'array' ? Array.isArray(value) : actual === expected) {\n console.log(` PASS: ${label} is ${type}`);\n passed += 1;\n } else {\n console.log(` FAIL: ${label} — expected ${type}, got ${actual}`);\n failed += 1;\n }\n }\n\n function checkMatch(label, value, regex) {\n if (regex.test(value)) {\n console.log(` PASS: ${label} matches ${regex}`);\n passed += 1;\n } else {\n console.log(` FAIL: ${label} — ${JSON.stringify(value)} does not match ${regex}`);\n failed += 1;\n }\n }\n\n // --- Top-level container ---\n console.log('\\n--- Top-level container ---');\n checkType('container', container, 'object');\n check('container.id', container.id, CONTAINER_ID);\n check('container.objectType', container.objectType, 'callingAIContainer');\n checkExists('container.summaryData', container.summaryData);\n checkExists('container.memberships', container.memberships);\n checkMatch('container.encryptionKeyUrl', container.encryptionKeyUrl, /^kms:\\/\\//);\n checkMatch('container.kmsResourceObjectUrl', container.kmsResourceObjectUrl, /^kms:\\/\\//);\n checkMatch('container.aclUrl', container.aclUrl, /^https?:\\/\\//);\n checkExists('container.start', container.start);\n checkExists('container.end', container.end);\n checkExists('container.forkSessionId', container.forkSessionId);\n checkExists('container.callSessionId', container.callSessionId);\n checkExists('container.ownerUserId', container.ownerUserId);\n checkExists('container.orgId', container.orgId);\n\n // --- summaryData ---\n console.log('\\n--- summaryData ---');\n const {summaryData} = container;\n checkType('summaryData', summaryData, 'object');\n checkExists('summaryData.extensionId', summaryData.extensionId);\n check('summaryData.objectType', summaryData.objectType, 'extension');\n check('summaryData.extensionType', summaryData.extensionType, 'callingAISummary');\n\n // --- summaryData.data ---\n console.log('\\n--- summaryData.data ---');\n const summaryDataData = summaryData.data;\n checkType('summaryData.data', summaryDataData, 'object');\n checkExists('summaryData.data.id', summaryDataData.id);\n check('summaryData.data.objectType', summaryDataData.objectType, 'callingAISummary');\n checkExists('summaryData.data.status', summaryDataData.status);\n checkMatch('summaryData.data.summaryUrl', summaryDataData.summaryUrl, /^https?:\\/\\//);\n checkMatch('summaryData.data.transcriptUrl', summaryDataData.transcriptUrl, /^https?:\\/\\//);\n checkMatch('summaryData.data.aclUrl', summaryDataData.aclUrl, /^https?:\\/\\//);\n checkMatch(\n 'summaryData.data.kmsResourceObjectUrl',\n summaryDataData.kmsResourceObjectUrl,\n /^kms:\\/\\//\n );\n checkType('summaryData.data.summarizeAfterCall', summaryDataData.summarizeAfterCall, 'boolean');\n checkType('summaryData.data.contentRetention', summaryDataData.contentRetention, 'object');\n\n // --- memberships ---\n console.log('\\n--- memberships ---');\n const {memberships} = container;\n checkType('memberships', memberships, 'object');\n checkType('memberships.items', memberships.items, 'array');\n if (memberships.items.length > 0) {\n console.log(` PASS: memberships.items has ${memberships.items.length} member(s)`);\n passed += 1;\n const first = memberships.items[0];\n checkExists('memberships.items[0].id', first.id);\n checkType('memberships.items[0].roles', first.roles, 'array');\n check('memberships.items[0].objectType', first.objectType, 'containerMembership');\n } else {\n console.log(' FAIL: memberships.items is empty');\n failed += 1;\n }\n\n // --- Summary ---\n console.log(`\\n=== ${passed} passed, ${failed} failed ===`);\n process.exit(failed > 0 ? 1 : 0);\n}\n\nmain().catch((err) => {\n console.error('FAILED:', err.message || err);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEAA,OAAO,CAAC,wCAAwC,CAAC;AAEjD,IAAMC,SAAS,GAAGD,OAAO,CAAC,mBAAmB,CAAC,CAACE,OAAO;;AAEtD;AACA;AACA;AACA,IAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACF,WAAW,IAAI,yBAAyB;AACxE,IAAMG,YAAY,GAAG,2BAA2B;AAChD,IAAMC,eAAe,GAAG,8BAA8B;;AAEtD;AACA;AACA;AAAA,SACeC,IAAIA,CAAA;EAAA,OAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,MAAA;EAAAA,KAAA,OAAAG,kBAAA,CAAAV,OAAA,eAAAW,YAAA,CAAAX,OAAA,CAAAY,IAAA,CAAnB,SAAAC,QAAA;IAAA,IAAAC,KAAA,EAAAC,QAAA,EAAAC,SAAA,EAAAC,MAAA,EAAAC,MAAA,EA0BWC,KAAK,EAYLC,WAAW,EAUXC,SAAS,EAYTC,UAAU,EAAAC,WAAA,EAAAC,eAAA,EAAAC,WAAA,EAAAC,KAAA;IAAA,OAAAf,YAAA,CAAAX,OAAA,CAAA2B,IAAA,WAAAC,QAAA;MAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;QAAA;UAAVR,UAAU,YAAAS,YAACC,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAE;YACvC,IAAIA,KAAK,CAACC,IAAI,CAACF,KAAK,CAAC,EAAE;cACrBG,OAAO,CAACC,GAAG,YAAAC,MAAA,CAAYN,KAAK,eAAAM,MAAA,CAAYJ,KAAK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CAAC;YAClF9D,MAAM,IAAI,CAAC;YACLS,KAAK,GAAGD,WAAW,CAACqD,KAAK,CAAC,CAAC,CAAC;YAClC1D,WAAW,CAAC,yBAAyB,EAAEM,KAAK,CAACiC,EAAE,CAAC;YAChDtC,SAAS,CAAC,4BAA4B,EAAEK,KAAK,CAACsD,KAAK,EAAE,OAAO,CAAC;YAC7D7D,KAAK,CAAC,iCAAiC,EAAEO,KAAK,CAACkC,UAAU,EAAE,qBAAqB,CAAC;UACnF,CAAC,MAAM;YACLxB,OAAO,CAACC,GAAG,CAAC,oCAAoC,CAAC;YACjDnB,MAAM,IAAI,CAAC;UACb;;UAEA;UACAkB,OAAO,CAACC,GAAG,UAAAC,MAAA,CAAUrB,MAAM,eAAAqB,MAAA,CAAYpB,MAAM,gBAAa,CAAC;UAC3DhB,OAAO,CAACgD,IAAI,CAAChC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAAC;QAAA;UAAA,OAAAU,QAAA,CAAAqD,IAAA;MAAA;IAAA,GAAApE,OAAA;EAAA,CAClC;EAAA,OAAAN,KAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAEDH,IAAI,CAAC,CAAC,CAAC4E,KAAK,CAAC,UAACC,GAAG,EAAK;EACpB/C,OAAO,CAACa,KAAK,CAAC,SAAS,EAAEkC,GAAG,CAACC,OAAO,IAAID,GAAG,CAAC;EAC5CjF,OAAO,CAACgD,IAAI,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC","ignoreList":[]}
package/dist/types.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
+ _Object$defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2025 Cisco Systems, Inc. See LICENSE file.\n */\n\n// --- Pragya Response DTOs ---\n\n/**\n * Summary data URLs from a Pragya container.\n */\nexport interface PragyaSummaryData {\n /** Status of the summary (e.g., \"Active\") */\n status: string;\n /** Full summary URL (AI Bridge) */\n summaryUrl: string;\n /** Transcript URL (AI Bridge) */\n transcriptUrl: string;\n /** Whether summarization runs after call ends */\n summarizeAfterCall: boolean;\n /** Notes-specific URL (may not be present in all API versions) */\n notesUrl?: string;\n /** Action items URL (may not be present in all API versions) */\n actionItemsUrl?: string;\n}\n\n/**\n * Complete Pragya container response.\n */\nexport interface PragyaContainerResponse {\n /** Summary data with content URLs */\n summaryData: PragyaSummaryData;\n /** KMS encryption key URL for decrypting content */\n encryptionKeyUrl: string;\n /** KMS resource object URL */\n kmsResourceObjectUrl: string;\n /** ACL URL for access control */\n aclUrl: string;\n /** Fork session ID */\n forkSessionId: string;\n /** Call session ID */\n callSessionId: string;\n /** Owner user ID */\n ownerUserId: string;\n /** Organization ID */\n orgId: string;\n /** Call start time */\n start: string;\n /** Call end time */\n end: string;\n}\n\n// --- Request DTOs ---\n\n/**\n * Options for resolving a Pragya container.\n */\nexport interface GetContainerOptions {\n /** Pragya container ID (from Janus extensionPayload.callingContainerIds) */\n containerId: string;\n}\n\n/**\n * Options for fetching summary content.\n * Requires the resolved Pragya container info.\n */\nexport interface GetSummaryContentOptions {\n /** The resolved Pragya container response */\n containerInfo: PragyaContainerResponse;\n}\n\n// --- Summary Response DTOs ---\n\n/**\n * Decrypted AI-generated summary content.\n * Contains all three content types returned by the summary API.\n */\nexport interface SummaryContent {\n /** Unique identifier */\n id: string;\n /** Decrypted full note content */\n note: string;\n /** Decrypted short note content */\n shortNote: string;\n /** Decrypted action item snippets */\n actionItems: ActionItemSnippet[];\n /** Feedback URL (if available) */\n feedbackUrl?: string;\n}\n\n/**\n * Decrypted AI-generated notes.\n */\nexport interface SummaryNotes {\n /** Unique identifier */\n id: string;\n /** Decrypted notes content */\n content: string;\n /** Feedback URL (if available) */\n feedbackUrl?: string;\n}\n\n/**\n * Single action item snippet.\n */\nexport interface ActionItemSnippet {\n /** Unique identifier */\n id: string;\n /** User-edited version (if available) */\n editedContent?: string;\n /** Decrypted AI-generated content */\n aiGeneratedContent: string;\n}\n\n/**\n * Decrypted AI-generated action items.\n */\nexport interface SummaryActionItems {\n /** Unique identifier (absent when no action items exist) */\n id?: string;\n /** Array of action item snippets */\n snippets: ActionItemSnippet[];\n /** Feedback URL (if available) */\n feedbackUrl?: string;\n}\n\n/**\n * Single decrypted transcript snippet.\n */\nexport interface TranscriptSnippet {\n /** Start time in milliseconds */\n startTime: string;\n /** End time in milliseconds */\n endTime: string;\n /** Decrypted transcript content */\n content: string;\n /** Audio CSI identifier */\n audioCSI?: string;\n /** Speaker information */\n speaker?: {\n speakerName: string;\n speakerId: string;\n };\n}\n\n/**\n * Decrypted transcript response.\n */\nexport interface TranscriptContent {\n /** Unique identifier */\n id: string;\n /** Total number of snippets */\n totalCount: number;\n /** Decrypted transcript snippets */\n snippets: TranscriptSnippet[];\n}\n"],"mappings":"","ignoreList":[]}
package/jest.config.js ADDED
@@ -0,0 +1,3 @@
1
+ const config = require('@webex/jest-config-legacy');
2
+
3
+ module.exports = config;
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@webex/internal-plugin-call-ai-summary",
3
+ "description": "A Webex internal plugin for AI-generated call summary retrieval",
4
+ "license": "MIT",
5
+ "author": "Webex JS SDK Team",
6
+ "main": "dist/index.js",
7
+ "devMain": "src/index.ts",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/webex/webex-js-sdk.git",
11
+ "directory": "packages/@webex/internal-plugin-call-ai-summary"
12
+ },
13
+ "engines": {
14
+ "node": ">=16"
15
+ },
16
+ "browserify": {
17
+ "transform": [
18
+ "babelify",
19
+ "envify"
20
+ ]
21
+ },
22
+ "dependencies": {
23
+ "@webex/internal-plugin-encryption": "3.11.0-next.11",
24
+ "@webex/webex-core": "3.11.0-next.8"
25
+ },
26
+ "devDependencies": {
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.11.0-next.1",
33
+ "@webex/test-helper-mock-webex": "3.11.0-next.1",
34
+ "eslint": "^8.24.0",
35
+ "prettier": "^2.7.1",
36
+ "sinon": "^9.2.4"
37
+ },
38
+ "scripts": {
39
+ "build": "yarn build:src",
40
+ "build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
41
+ "deploy:npm": "yarn npm publish",
42
+ "test": "yarn test:style && yarn test:unit",
43
+ "test:style": "eslint ./src/**/*.*",
44
+ "test:unit": "webex-legacy-tools test --unit --runner jest"
45
+ },
46
+ "version": "0.0.0-next.1"
47
+ }