conduyt 1.35.0 → 1.37.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
@@ -40,6 +40,12 @@ conduyt insights summary # run an AI insight query
40
40
  conduyt insights saved_report --report "Lead Activity" --period last_7_days # run any saved report as a tool
41
41
  conduyt insights dashboard --dashboard Floor --period today # run every tile of a board
42
42
  conduyt insights report_catalog # what this key can run
43
+ conduyt messages transports # what a workflow Send SMS step can speak through today (Twilio numbers, Project Blue lines, the WhatsApp sender)
44
+ conduyt whatsapp status # WhatsApp via your Twilio: connected? from which sender
45
+ conduyt whatsapp senders # the senders Twilio lists for the account (ONLINE = connectable)
46
+ conduyt whatsapp connect <senderSid> # connect a sender (verified with Twilio first)
47
+ conduyt whatsapp templates # approved / pending / rejected templates with their {{n}} placeholders
48
+ conduyt messages send-sms --contact <id> --transport whatsapp --whatsapp-template HX… --whatsapp-variables '{"1":"Alex"}' --body "…"
43
49
  conduyt privacy export <id> # GDPR data-portability export (owner/admin)
44
50
  conduyt privacy forget <id> --confirm FORGET # GDPR erasure — IRREVERSIBLE, owner only
45
51
  conduyt reply-capture status # inbound reply capture: state, DNS records, provider health
package/dist/index.js CHANGED
@@ -802,6 +802,36 @@ messages
802
802
  Object.assign(body, jsonArg(opts.json, "--json"));
803
803
  return client.post("/api/v1/messages", body);
804
804
  }));
805
+ messages
806
+ .command("transports")
807
+ .description("What a workflow Send SMS step can speak through today (GET /sms/transports): Twilio {connected, numbers = account number + active reps' lines, valid send_sms fromNumber values}, Project Blue {connected, lines held by active reps, valid projectBlueLineId values for smsMode project_blue}, WhatsApp {connected, sender for smsMode whatsapp}, webhook provider count, FromK.ai coming soon (automations scope)")
808
+ .action(run(async (client) => client.get("/api/v1/sms/transports")));
809
+ // ---- WhatsApp via Twilio (2026-09-11) ----
810
+ const whatsapp = program.command("whatsapp").description("WhatsApp via your own Twilio account: a Meta-approved sender, approved templates for outreach, free-form replies within a contact's 24-hour window");
811
+ whatsapp
812
+ .command("status")
813
+ .description("Connection status (GET /settings/whatsapp): connected | not_configured | twilio_required, the sender {phoneNumber, sid} (settings scope)")
814
+ .action(run(async (client) => client.get("/api/v1/settings/whatsapp")));
815
+ whatsapp
816
+ .command("senders")
817
+ .description("The WhatsApp senders Twilio lists under the account's credentials, with status (only ONLINE can be connected) and which one is connected (settings scope)")
818
+ .action(run(async (client) => client.get("/api/v1/settings/whatsapp/senders")));
819
+ whatsapp
820
+ .command("connect <senderSid>")
821
+ .description("Connect the account's WhatsApp sender by its Twilio sid (XE…, see `whatsapp senders`) — verified with Twilio first: on this account and ONLINE; one sender belongs to one Conduyt account (settings scope)")
822
+ .action(run(async (client, senderSid) => {
823
+ if (!/^XE[0-9a-fA-F]{32}$/.test(senderSid.trim()))
824
+ throw new Error("senderSid must be a Twilio WhatsApp sender SID (XE followed by 32 hex characters).");
825
+ return client.put("/api/v1/settings/whatsapp", { senderSid: senderSid.trim() });
826
+ }));
827
+ whatsapp
828
+ .command("disconnect")
829
+ .description("Forget the WhatsApp sender — workflow steps on the WhatsApp channel stop sending (settings scope)")
830
+ .action(run(async (client) => client.del("/api/v1/settings/whatsapp")));
831
+ whatsapp
832
+ .command("templates")
833
+ .description("The account's WhatsApp templates (Twilio Content) with Meta's approval verdict: sid (a send-sms --whatsapp-template value), text with {{n}} placeholders, variables, approval (automations scope)")
834
+ .action(run(async (client) => client.get("/api/v1/sms/whatsapp/templates")));
805
835
  messages
806
836
  .command("send-sms")
807
837
  .description("Send an outbound SMS (POST /messages/sms/send) — via Twilio, or from your own Project Blue iPhone line with --transport project_blue")
@@ -809,7 +839,9 @@ messages
809
839
  .option("--body <text>", "SMS body, 1-1600 chars (required)")
810
840
  .option("--from <number>", "from number — must be an account-owned Twilio number/agent DID")
811
841
  .option("--provider <id>", "smsProviderId UUID")
812
- .option("--transport <transport>", "twilio (default) | project_blue — send from your assigned Project Blue iPhone line (iMessage when the lead is on Apple, SMS otherwise)")
842
+ .option("--transport <transport>", "twilio (default) | project_blue — your assigned Project Blue iPhone line (iMessage when the lead is on Apple, SMS otherwise) | whatsapp — the account's WhatsApp sender (free-form only within 24 hours of the lead's last WhatsApp message, else an approved template via --whatsapp-template)")
843
+ .option("--whatsapp-template <sid>", "transport whatsapp: an APPROVED template (Twilio Content SID HX…, see `whatsapp templates`); Conduyt reads it from Twilio at send time and records its text with the variables in place")
844
+ .option("--whatsapp-variables <json>", 'transport whatsapp with a template: placeholder number → value as JSON, e.g. {"1":"Alex"}')
813
845
  .option("--idempotency-key <key>", "operation key (8-200 chars) for at-most-once sends: reuse the SAME key when retrying a send whose outcome you did not see")
814
846
  .option("--json <json>", "full JSON body, merged over the flags")
815
847
  .action(run(async (client, opts) => {
@@ -824,6 +856,10 @@ messages
824
856
  body.smsProviderId = opts.provider;
825
857
  if (opts.transport !== undefined)
826
858
  body.transport = opts.transport;
859
+ if (opts.whatsappTemplate !== undefined)
860
+ body.whatsappContentSid = opts.whatsappTemplate;
861
+ if (opts.whatsappVariables !== undefined)
862
+ body.whatsappContentVariables = jsonArg(opts.whatsappVariables, "--whatsapp-variables");
827
863
  if (opts.idempotencyKey !== undefined)
828
864
  body.idempotencyKey = opts.idempotencyKey;
829
865
  if (opts.json !== undefined)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt",
3
- "version": "1.35.0",
3
+ "version": "1.37.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",