conduyt 1.73.0 → 1.74.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.
Files changed (2) hide show
  1. package/dist/index.js +15 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -80,11 +80,23 @@ contacts
80
80
  .command("list")
81
81
  .description("List contacts")
82
82
  .option("--limit <n>", "max results")
83
- .option("--cursor <cursor>", "pagination cursor")
84
- .option("--query <q>", "search query")
83
+ .option("--page <n>", "page number (default 1; the contacts list pages with page and per_page)")
84
+ .option("--cursor <cursor>", "not supported on contacts list (the API pages with --page); passing it exits 1 and sends no request")
85
+ .option("--query <q>", "search text (name, email, phone; sent to the API as `search`)")
86
+ .option("--email <address>", "exact email lookup, repeatable (--email a@x.com --email b@y.com): matches the primary email or any secondary email slot, trimmed and lower-cased; each address is at most 254 characters; an empty or invalid address, or more than 20 distinct addresses, is a 400; on a workspace whose identifier index is still being built, a lookup whose stored spellings exceed its stored-spelling bind budget is a 422 (a count of spellings, not contacts; other filters do not help)", (v, prev = []) => [...prev, v])
85
87
  .option("--master-status <list>", "only these lead statuses, comma-separated (open, won, lost, abandoned, disqualified, or an account custom status)")
86
88
  .option("--exclude-master-status <list>", "hide these lead statuses, comma-separated — e.g. won,lost,abandoned,disqualified is the Active view")
87
- .action(run(async (client, opts) => client.get(`/api/v1/contacts${buildQuery({ limit: opts.limit, cursor: opts.cursor, query: opts.query, master_status: opts.masterStatus, exclude_master_status: opts.excludeMasterStatus })}`)));
89
+ .action(run(async (client, opts) => {
90
+ // the route never reads `cursor` (it pages with page / per_page): refuse before any request instead of silently returning page 1
91
+ if (opts.cursor !== undefined)
92
+ throw new Error("contacts list does not support --cursor (the API pages with page and per_page); use --page <n>");
93
+ // the API reads `search` (there is no `query` param), and every repeated `email` occurrence
94
+ const qs = new URLSearchParams(buildQuery({ limit: opts.limit, page: opts.page, search: opts.query, master_status: opts.masterStatus, exclude_master_status: opts.excludeMasterStatus }).slice(1));
95
+ for (const address of opts.email ?? [])
96
+ qs.append("email", address);
97
+ const q = qs.toString();
98
+ return client.get(`/api/v1/contacts${q ? `?${q}` : ""}`);
99
+ }));
88
100
  contacts
89
101
  .command("get <id>")
90
102
  .description("Get a single contact by id (includes `revision`: pass it as --expected-revision on `contacts update` / `contacts collaborators`; `hasOutboundSms` is true when the workspace has ever PROVABLY texted the contact: a proven send only, not a draft, a queued row or a pre-send failure; use it to pick `messages check --context`: false = first, true = conversation; `hasOutboundEmail` is the same for email: true when at least one outbound email to the contact was proven sent, so a genuine \"Re:\" reply is a conversation and not flagged)")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt",
3
- "version": "1.73.0",
3
+ "version": "1.74.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",