callkaro-cli-unofficial 0.9.1 → 0.9.2
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/commands/analytics.js +5 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
|
@@ -60,8 +60,12 @@ async function analyticsPerformanceCommand(opts) {
|
|
|
60
60
|
async function analyticsVersionCommand(agentId, opts) {
|
|
61
61
|
const api = (0, session_1.requireApi)();
|
|
62
62
|
try {
|
|
63
|
+
if (opts.cohort && opts.cohort !== 'leads')
|
|
64
|
+
throw new Error(`--cohort must be "leads" (got "${opts.cohort}"). Omit it for the call view.`);
|
|
63
65
|
const res = await api.versionAnalytics(agentId, {
|
|
64
66
|
version_ids: opts.versions,
|
|
67
|
+
initial_version_ids: opts.initialVersions,
|
|
68
|
+
cohort: opts.cohort,
|
|
65
69
|
startDate: opts.start,
|
|
66
70
|
endDate: opts.end,
|
|
67
71
|
});
|
|
@@ -71,7 +75,7 @@ async function analyticsVersionCommand(agentId, opts) {
|
|
|
71
75
|
if (!rows.length)
|
|
72
76
|
return void (0, ui_1.info)('No version analytics.');
|
|
73
77
|
(0, ui_1.table)(['VERSION', 'CALLS', 'CONNECTED', 'CONVERTED', 'RECEIPT→CONV %', 'CONN→CONV %'], rows.map((r) => [
|
|
74
|
-
r._id, r.total_calls ?? '', r.connected_calls ?? '', r.converted_calls ?? '',
|
|
78
|
+
r.versionName ?? r._id, r.total_calls ?? '', r.connected_calls ?? '', r.converted_calls ?? '',
|
|
75
79
|
r.overall_receipt_to_conversion_pct ?? '', r.overall_connected_to_conversion_pct ?? '',
|
|
76
80
|
]));
|
|
77
81
|
}
|
package/dist/index.js
CHANGED
|
@@ -1295,7 +1295,9 @@ analytics.command('performance').description('per-agent performance')
|
|
|
1295
1295
|
.option('--json', 'raw JSON')
|
|
1296
1296
|
.action(analytics_1.analyticsPerformanceCommand);
|
|
1297
1297
|
analytics.command('version <agentId>').description('per-version analytics for an agent')
|
|
1298
|
-
.option('--versions <ids>', 'comma-separated version ids')
|
|
1298
|
+
.option('--versions <ids>', 'comma-separated final version ids')
|
|
1299
|
+
.option('--initial-versions <ids>', 'comma-separated initial version ids (calls that started on these versions)')
|
|
1300
|
+
.option('--cohort <view>', 'leads = Lead View (count each lead once) instead of per-call')
|
|
1299
1301
|
.option('--start <date>', 'start date')
|
|
1300
1302
|
.option('--end <date>', 'end date')
|
|
1301
1303
|
.option('--json', 'raw JSON')
|