conduyt 1.73.0 → 1.75.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/dist/index.js +27 -6
- 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("--
|
|
84
|
-
.option("--
|
|
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) =>
|
|
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)")
|
|
@@ -4015,16 +4027,17 @@ dialer
|
|
|
4015
4027
|
}));
|
|
4016
4028
|
dialer
|
|
4017
4029
|
.command("settings")
|
|
4018
|
-
.description("Show the account's Smart Dialing policy (GET /dialer/settings, dialer scope): autoAdvanceEnabled, pauseSeconds, advanceOn (disposition | timer), openLeadOnDial (the lead's record opens as each Smart Dialing call goes out), smartDialCallerId (local_presence = an area-code match from the number pool, the rep's own line when no pool exists; did = always the rep's own line), plus localPresenceConfigured.")
|
|
4030
|
+
.description("Show the account's Smart Dialing policy (GET /dialer/settings, dialer scope): autoAdvanceEnabled, pauseSeconds, advanceOn (disposition | timer), openLeadOnDial (the lead's record opens as each Smart Dialing call goes out), smartDialCallerId (local_presence = an area-code match from the number pool, the rep's own line when no pool exists; did = always the rep's own line), wrapupAutoReleaseSeconds (seconds of continuous wrap-up after which a rep returns to Available automatically; 0 = off, otherwise 30 to 3600; default 300), plus localPresenceConfigured.")
|
|
4019
4031
|
.action(run(async (client) => client.get("/api/v1/dialer/settings")));
|
|
4020
4032
|
dialer
|
|
4021
4033
|
.command("set-settings")
|
|
4022
|
-
.description("Change the account's Smart Dialing policy (PATCH /dialer/settings, settings scope). Pass only what changes: --auto-advance on|off, --pause-seconds 1-60, --advance-on disposition|timer, --open-lead on|off (the lead's record opens as each Smart Dialing call goes out), --calls-from local_presence|did.")
|
|
4034
|
+
.description("Change the account's Smart Dialing policy (PATCH /dialer/settings, settings scope). Pass only what changes: --auto-advance on|off, --pause-seconds 1-60, --advance-on disposition|timer, --open-lead on|off (the lead's record opens as each Smart Dialing call goes out), --calls-from local_presence|did, --wrapup-seconds 0|30-3600 (seconds of continuous wrap-up after which a rep returns to Available automatically; 0 = off, otherwise 30-3600).")
|
|
4023
4035
|
.option("--auto-advance <on|off>", "start the next dial automatically after a call")
|
|
4024
4036
|
.option("--pause-seconds <n>", "seconds between calls when auto-advance is on (1-60)")
|
|
4025
4037
|
.option("--advance-on <mode>", "disposition | timer")
|
|
4026
4038
|
.option("--open-lead <on|off>", "open the lead's record as each Smart Dialing call goes out")
|
|
4027
4039
|
.option("--calls-from <line>", "local_presence | did")
|
|
4040
|
+
.option("--wrapup-seconds <n>", "seconds of continuous wrap-up after which a rep returns to Available automatically: 0 = off, otherwise 30-3600")
|
|
4028
4041
|
.action(run(async (client, opts) => {
|
|
4029
4042
|
const body = {};
|
|
4030
4043
|
if (opts.autoAdvance !== undefined)
|
|
@@ -4049,8 +4062,16 @@ dialer
|
|
|
4049
4062
|
throw new Error(`--calls-from must be one of ${SMART_DIAL_CALLER_IDS.join(", ")}.`);
|
|
4050
4063
|
body.smartDialCallerId = line;
|
|
4051
4064
|
}
|
|
4065
|
+
if (opts.wrapupSeconds !== undefined) {
|
|
4066
|
+
// digits only: Number() would read "" as 0 (switching the timer off) and "1e2" / "0x1e" / "30.0" as numbers
|
|
4067
|
+
const raw = opts.wrapupSeconds.trim();
|
|
4068
|
+
const n = /^\d{1,5}$/.test(raw) ? Number(raw) : NaN;
|
|
4069
|
+
if (!(n === 0 || (n >= 30 && n <= 3600)))
|
|
4070
|
+
throw new Error("--wrapup-seconds must be 0 (off) or a whole number of seconds from 30 to 3600.");
|
|
4071
|
+
body.wrapupAutoReleaseSeconds = n;
|
|
4072
|
+
}
|
|
4052
4073
|
if (Object.keys(body).length === 0)
|
|
4053
|
-
throw new Error("Nothing to change: pass at least one of --auto-advance, --pause-seconds, --advance-on, --open-lead, --calls-from.");
|
|
4074
|
+
throw new Error("Nothing to change: pass at least one of --auto-advance, --pause-seconds, --advance-on, --open-lead, --calls-from, --wrapup-seconds.");
|
|
4054
4075
|
return client.patch("/api/v1/dialer/settings", body);
|
|
4055
4076
|
}));
|
|
4056
4077
|
dialer
|
package/package.json
CHANGED