conduyt 1.34.0 → 1.35.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/README.md CHANGED
@@ -37,6 +37,9 @@ conduyt deals list --pipeline <id> # list deals
37
37
  conduyt pipelines # list pipelines and stages
38
38
  conduyt search "acme corp" # search across the CRM
39
39
  conduyt insights summary # run an AI insight query
40
+ conduyt insights saved_report --report "Lead Activity" --period last_7_days # run any saved report as a tool
41
+ conduyt insights dashboard --dashboard Floor --period today # run every tile of a board
42
+ conduyt insights report_catalog # what this key can run
40
43
  conduyt privacy export <id> # GDPR data-portability export (owner/admin)
41
44
  conduyt privacy forget <id> --confirm FORGET # GDPR erasure — IRREVERSIBLE, owner only
42
45
  conduyt reply-capture status # inbound reply capture: state, DNS records, provider health
package/dist/index.js CHANGED
@@ -484,10 +484,17 @@ program
484
484
  // ---- insights ----
485
485
  program
486
486
  .command("insights <type>")
487
- .description("Run an AI insight query. Types: sms_drip_status, sms_responses_untouched, " +
488
- "agent_followups, pipeline_health, email_performance, smart_view_summary, " +
489
- "team_activity, contact_import_history")
487
+ .description("Run an AI insight query. Types: report_catalog, saved_report, dashboard, sms_drip_status, " +
488
+ "sms_responses_untouched, agent_followups, pipeline_health, email_performance, " +
489
+ "smart_view_summary, team_activity, contact_import_history")
490
490
  .option("--input <json>", "JSON payload to send with the request")
491
+ .option("--report <idOrName>", "saved_report: the saved report to run, by id or exact name")
492
+ .option("--dashboard <idOrName>", "dashboard: the dashboard to run, by id or exact name")
493
+ .option("--period <preset>", "saved_report / dashboard: today | this_week | this_month | this_quarter | this_year | last_7_days | last_30_days | last_90_days")
494
+ .option("--from <date>", "saved_report / dashboard: custom window start (YYYY-MM-DD), with --to")
495
+ .option("--to <date>", "saved_report / dashboard: custom window end (YYYY-MM-DD), with --from")
496
+ .option("--page <n>", "saved_report: page number")
497
+ .option("--per-page <n>", "saved_report: rows per page (max 500)")
491
498
  .action(run(async (client, type, opts) => {
492
499
  let extra = {};
493
500
  if (opts.input) {
@@ -498,6 +505,26 @@ program
498
505
  fail("--input must be valid JSON");
499
506
  }
500
507
  }
508
+ const isUuid = (v) => /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(v);
509
+ const ref = (v) => (isUuid(v) ? { id: v } : { name: v });
510
+ if (opts.report)
511
+ extra.report = ref(opts.report);
512
+ if (opts.dashboard)
513
+ extra.dashboard = ref(opts.dashboard);
514
+ const filters = { ...(extra.filters ?? {}) };
515
+ if (opts.period)
516
+ filters.period = opts.period;
517
+ if (opts.from || opts.to) {
518
+ if (!opts.from || !opts.to)
519
+ fail("--from and --to go together");
520
+ filters.dateRange = { from: opts.from, to: opts.to };
521
+ }
522
+ if (Object.keys(filters).length)
523
+ extra.filters = filters;
524
+ if (opts.page)
525
+ extra.page = Number(opts.page);
526
+ if (opts.perPage)
527
+ extra.perPage = Number(opts.perPage);
501
528
  // The /ai/insights endpoint reads the insight name from `query`, not
502
529
  // `type` — sending `type` returned "Unsupported query type" for every
503
530
  // call, so the CLI's insights command was fully broken.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt",
3
- "version": "1.34.0",
3
+ "version": "1.35.0",
4
4
  "description": "Command-line interface for Conduyt CRM — manage contacts, deals, pipelines, and run insight queries from your terminal.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",