callkaro-cli-unofficial 0.7.2 → 0.8.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.
@@ -316,6 +316,177 @@ class DashboardApi {
316
316
  const q = source === 'manual' ? { source: 'manual' } : {};
317
317
  return this.requestBinary('GET', `/v1/audit-reports/daywise/${encodeURIComponent(agentId)}/${encodeURIComponent(rcaDate)}/pdf${qs(q)}`);
318
318
  }
319
+ // --- Agent version commits, diff, revert & v2 save -------------------------
320
+ /** List commits for an agent (`GET /v2/commits/:agentId?version=&page=&pageSize=`). */
321
+ agentCommits(agentId, query = {}) {
322
+ return this.request('GET', `/v2/commits/${encodeURIComponent(agentId)}${qs(query)}`);
323
+ }
324
+ /** Fetch one commit in full (`GET /v2/commits/single/:commitId`). */
325
+ agentCommit(commitId) {
326
+ return this.request('GET', `/v2/commits/single/${encodeURIComponent(commitId)}`);
327
+ }
328
+ /** Compare two commits of an agent (`GET /v2/commits/:agentId/compare?commitA=&commitB=`). */
329
+ compareAgentCommits(agentId, commitA, commitB) {
330
+ return this.request('GET', `/v2/commits/${encodeURIComponent(agentId)}/compare${qs({ commitA, commitB })}`);
331
+ }
332
+ /** Revert an agent version to a previous commit (`POST /v2/commits/revert/:agentId/:commitId`). */
333
+ revertAgentCommit(agentId, commitId) {
334
+ return this.request('POST', `/v2/commits/revert/${encodeURIComponent(agentId)}/${encodeURIComponent(commitId)}`, {});
335
+ }
336
+ /** Compare two agent versions (`POST /v2/agents/compareVersions` with `{ versionIds: [a, b] }`). */
337
+ compareAgentVersions(versionIds) {
338
+ return this.request('POST', '/v2/agents/compareVersions', { versionIds });
339
+ }
340
+ /**
341
+ * Dashboard `/v2/agents/:agentId?version=:versionId` save — accepts function
342
+ * `source_code` and `commitMessage` that `/cli/agents` rejects.
343
+ */
344
+ updateAgentV2(agentId, versionId, body) {
345
+ const q = versionId ? qs({ version: versionId }) : '';
346
+ return this.request('PUT', `/v2/agents/${encodeURIComponent(agentId)}${q}`, body);
347
+ }
348
+ /** Delete an agent version (`DELETE /v2/agents/deleteversion/:agentId?version=:versionId`). */
349
+ deleteAgentVersionV2(agentId, versionId) {
350
+ return this.request('DELETE', `/v2/agents/deleteversion/${encodeURIComponent(agentId)}${qs({ version: versionId })}`);
351
+ }
352
+ /** Duplicate an agent (`PUT /v2/agents/duplicate/:agentId` with `{ name, versions }`). */
353
+ duplicateAgentV2(agentId, body) {
354
+ return this.request('PUT', `/v2/agents/duplicate/${encodeURIComponent(agentId)}`, body);
355
+ }
356
+ // --- Audit summary drilldowns (`/v1/audit-summary/*`) ----------------------
357
+ /** Summary rollup for a strategy or batch (`GET /v1/audit-summary/:scope/:id/summary`). */
358
+ auditSummary(scope, id, query = {}) {
359
+ return this.request('GET', `/v1/audit-summary/${scope}/${encodeURIComponent(id)}/summary${qs(query)}`);
360
+ }
361
+ /** Audited calls in a dimension/category (`GET /v1/audit-summary/:scope/:id/categories/:dimension/:category/calls`). */
362
+ auditCategoryCalls(scope, id, dimension, category, query = {}) {
363
+ return this.request('GET', `/v1/audit-summary/${scope}/${encodeURIComponent(id)}/categories/${encodeURIComponent(dimension)}/${encodeURIComponent(category)}/calls${qs(query)}`);
364
+ }
365
+ /** Audited calls at a severity level (`GET /v1/audit-summary/:scope/:id/severities/:severity/calls`). */
366
+ auditSeverityCalls(scope, id, severity, query = {}) {
367
+ return this.request('GET', `/v1/audit-summary/${scope}/${encodeURIComponent(id)}/severities/${encodeURIComponent(severity)}/calls${qs(query)}`);
368
+ }
369
+ /** Audited calls for an extra-variable value (`GET /v1/audit-summary/:scope/:id/extra-variables/:name/:value/calls`). */
370
+ auditExtraVariableCalls(scope, id, name, value, query = {}) {
371
+ return this.request('GET', `/v1/audit-summary/${scope}/${encodeURIComponent(id)}/extra-variables/${encodeURIComponent(name)}/${encodeURIComponent(value)}/calls${qs(query)}`);
372
+ }
373
+ /** Audited calls scoring below 80 (`GET /v1/audit-summary/:scope/:id/scores/below-80/calls`). */
374
+ auditBelow80Calls(scope, id, query = {}) {
375
+ return this.request('GET', `/v1/audit-summary/${scope}/${encodeURIComponent(id)}/scores/below-80/calls${qs(query)}`);
376
+ }
377
+ /** Single audited call report (`GET /v1/audit-summary/:scope/:id/calls/:callId`). */
378
+ auditCallDetail(scope, id, callId, query = {}) {
379
+ return this.request('GET', `/v1/audit-summary/${scope}/${encodeURIComponent(id)}/calls/${encodeURIComponent(callId)}${qs(query)}`);
380
+ }
381
+ // --- Diagnostic analytics (`/analytics/*`) ---------------------------------
382
+ /** Failed LLM/TTS response buckets (`GET /analytics/failed-responses`). */
383
+ failedResponses(query = {}) {
384
+ return this.request('GET', `/analytics/failed-responses${qs(query)}`);
385
+ }
386
+ /** Calls matching a failed response bucket (`GET /analytics/failed-response-calls`). */
387
+ failedResponseCalls(query = {}) {
388
+ return this.request('GET', `/analytics/failed-response-calls${qs(query)}`);
389
+ }
390
+ /** Per-function execution analytics (`GET /analytics/functions`). */
391
+ functionAnalytics(query = {}) {
392
+ return this.request('GET', `/analytics/functions${qs(query)}`);
393
+ }
394
+ /** Chat agent analytics (`GET /analytics/chat`). */
395
+ chatAnalytics(query = {}) {
396
+ return this.request('GET', `/analytics/chat${qs(query)}`);
397
+ }
398
+ // --- Do-Not-Disturb numbers (`/dnd-phone-numbers/*`) -----------------------
399
+ /** List DND numbers (`GET /dnd-phone-numbers`). */
400
+ listDndNumbers(query = {}) {
401
+ return this.request('GET', `/dnd-phone-numbers${qs(query)}`);
402
+ }
403
+ /** Add a single DND phone number (`POST /dnd-phone-numbers/add`). */
404
+ addDndNumber(phoneNumber) {
405
+ return this.request('POST', '/dnd-phone-numbers/add', { phoneNumber });
406
+ }
407
+ /** Update a DND record (`PUT /dnd-phone-numbers/:id`). */
408
+ updateDndNumber(id, phoneNumber) {
409
+ return this.request('PUT', `/dnd-phone-numbers/${encodeURIComponent(id)}`, { phoneNumber });
410
+ }
411
+ /** Remove a DND record by id (`DELETE /dnd-phone-numbers/:id`). */
412
+ removeDndNumber(id) {
413
+ return this.request('DELETE', `/dnd-phone-numbers/${encodeURIComponent(id)}`);
414
+ }
415
+ /** Remove multiple DND records by id (`POST /dnd-phone-numbers/delete-multiple`). */
416
+ removeDndNumbers(ids) {
417
+ return this.request('POST', '/dnd-phone-numbers/delete-multiple', { ids });
418
+ }
419
+ /** Bulk import DND phone numbers (`POST /dnd-phone-numbers/import`). */
420
+ importDndNumbers(phoneNumbers) {
421
+ return this.request('POST', '/dnd-phone-numbers/import', { phoneNumbers });
422
+ }
423
+ // --- Call QA Feedback tickets (`/feedback/*`) ------------------------------
424
+ /** List feedback tickets (`GET /feedback?status=processing|in-review|resolved&page=1`). */
425
+ listFeedback(query = {}) {
426
+ return this.request('GET', `/feedback${qs({ status: query.status || 'processing', page: query.page || 1 })}`);
427
+ }
428
+ /** Create a feedback ticket (`POST /feedback`). */
429
+ createFeedback(body) {
430
+ return this.request('POST', '/feedback', body);
431
+ }
432
+ /** Comment on a feedback ticket (`PUT /feedback/:id/comment`). */
433
+ commentFeedback(id, text) {
434
+ return this.request('PUT', `/feedback/${encodeURIComponent(id)}/comment`, { text });
435
+ }
436
+ /** Submit a feedback ticket for review (`PUT /feedback/:id/submit-review`). */
437
+ submitFeedbackReview(id, body) {
438
+ return this.request('PUT', `/feedback/${encodeURIComponent(id)}/submit-review`, body);
439
+ }
440
+ /** Send a feedback ticket back to processing (`PUT /feedback/:id/back-to-processing`). */
441
+ reopenFeedback(id, comment) {
442
+ return this.request('PUT', `/feedback/${encodeURIComponent(id)}/back-to-processing`, { comment });
443
+ }
444
+ /** Resolve a feedback ticket (`PUT /feedback/:id/resolve`). */
445
+ resolveFeedback(id, comment) {
446
+ return this.request('PUT', `/feedback/${encodeURIComponent(id)}/resolve`, { comment });
447
+ }
448
+ // --- Knowledge Base (`/knowledge/*`) ---------------------------------------
449
+ /** List knowledge base items for the user (`GET /knowledge/user`). */
450
+ listKnowledge() {
451
+ return this.request('GET', '/knowledge/user');
452
+ }
453
+ /** Delete a knowledge base item (`DELETE /knowledge/:id`). */
454
+ deleteKnowledge(id) {
455
+ return this.request('DELETE', `/knowledge/${encodeURIComponent(id)}`);
456
+ }
457
+ // --- OpenAI / AI Copilot generators (`/openai-tools/*`) --------------------
458
+ /** Draft a simulation test case from a real call (`POST /openai-tools/generate-simulation-testcase-draft`). */
459
+ generateSimFromCall(body) {
460
+ return this.request('POST', '/openai-tools/generate-simulation-testcase-draft', {
461
+ includeMetadata: true,
462
+ includeFunctions: true,
463
+ ...body,
464
+ });
465
+ }
466
+ /** Generate or refine a simulation test case from a hint (`POST /openai-tools/generate-simulation-testcase-from-prompt`). */
467
+ generateSimFromPrompt(body) {
468
+ return this.request('POST', '/openai-tools/generate-simulation-testcase-from-prompt', body);
469
+ }
470
+ /** Generate an audit strategy draft (`POST /openai-tools/generate-audit-strategy-draft`). */
471
+ generateAuditStrategyDraft(body) {
472
+ return this.request('POST', '/openai-tools/generate-audit-strategy-draft', body);
473
+ }
474
+ /** Generate a callflow summary draft (`POST /openai-tools/generate-callflow-summary-draft`). */
475
+ generateCallflowSummaryDraft(body) {
476
+ return this.request('POST', '/openai-tools/generate-callflow-summary-draft', body);
477
+ }
478
+ /** Generate or edit a voice agent function (`POST /openai-tools/generate-function`). */
479
+ generateFunctionCode(body) {
480
+ return this.request('POST', '/openai-tools/generate-function', body);
481
+ }
482
+ /** Generate post-call analysis config (`POST /openai-tools/generate-postcall-config`). */
483
+ generatePostcallConfig(body) {
484
+ return this.request('POST', '/openai-tools/generate-postcall-config', body);
485
+ }
486
+ /** Generate workflow code step (`POST /openai-tools/generate-workflow-code`). */
487
+ generateWorkflowCode(body) {
488
+ return this.request('POST', '/openai-tools/generate-workflow-code', body);
489
+ }
319
490
  // --- Call analyzers -------------------------------------------------------
320
491
  listAnalyzers() { return this.request('GET', '/v1/call-analyzers'); }
321
492
  // --- Audit reports (dashboard side) ---------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "callkaro-cli-unofficial",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Unofficial fork of the CallKaro CLI — manage your voice AI agents from the terminal",
6
6
  "bin": {