conduyt 1.19.0 → 1.21.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 +49 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1832,7 +1832,7 @@ replyCapture
|
|
|
1832
1832
|
// ---- lifecycle (master lead status + intake deals) ----
|
|
1833
1833
|
const lifecycle = program
|
|
1834
1834
|
.command("lifecycle")
|
|
1835
|
-
.description("Lifecycle
|
|
1835
|
+
.description("Lifecycle settings: lead master statuses, intake-deal creation, how the tenant works leads, and lost propagation");
|
|
1836
1836
|
lifecycle
|
|
1837
1837
|
.command("settings")
|
|
1838
1838
|
.description("Show the Lifecycle v2 configuration: masterStatuses.effective (the five defaults plus the account's customs) and intakeDeals (null can mean not configured OR not visible to your key — the setting is admin-visible only)")
|
|
@@ -1844,8 +1844,19 @@ lifecycle
|
|
|
1844
1844
|
? raw.masterStatuses.filter((x) => typeof x === "string")
|
|
1845
1845
|
: [];
|
|
1846
1846
|
const intakeDeals = raw.intakeDeals && typeof raw.intakeDeals === "object" ? raw.intakeDeals : null;
|
|
1847
|
+
// Lifecycle v3 (2026-09-08): how the tenant works leads + whether LOST propagation is live
|
|
1848
|
+
const dealWorkingMode = raw.dealWorkingMode === "pipeline" || raw.dealWorkingMode === "status" ? raw.dealWorkingMode : null;
|
|
1849
|
+
const lostRaw = raw.lostPropagation && typeof raw.lostPropagation === "object" ? raw.lostPropagation : null;
|
|
1847
1850
|
return {
|
|
1848
1851
|
data: {
|
|
1852
|
+
dealWorkingMode,
|
|
1853
|
+
...(dealWorkingMode === null
|
|
1854
|
+
? { dealWorkingModeNote: "null = not chosen yet — 'pipeline': every inbound contact gets a deal card (intake deals required); 'status': the contact is the opportunity" }
|
|
1855
|
+
: {}),
|
|
1856
|
+
lostPropagation: {
|
|
1857
|
+
enabled: lostRaw?.enabled === true,
|
|
1858
|
+
enabledAt: typeof lostRaw?.enabledAt === "string" ? lostRaw.enabledAt : null,
|
|
1859
|
+
},
|
|
1849
1860
|
masterStatuses: {
|
|
1850
1861
|
defaults: DEFAULTS,
|
|
1851
1862
|
customs,
|
|
@@ -1860,6 +1871,26 @@ lifecycle
|
|
|
1860
1871
|
},
|
|
1861
1872
|
};
|
|
1862
1873
|
}));
|
|
1874
|
+
lifecycle
|
|
1875
|
+
.command("set-working-mode <mode>")
|
|
1876
|
+
.description("Set how this tenant works leads (Lifecycle v3): pipeline = every inbound contact gets a deal card in the intake pipeline (intake deals must be enabled first; a new form/webhook/line cannot go live without a pipeline); status = the contact is the opportunity, no automatic cards. Switchable later.")
|
|
1877
|
+
.action(run(async (client, mode) => {
|
|
1878
|
+
if (mode !== "pipeline" && mode !== "status")
|
|
1879
|
+
throw new Error("mode must be 'pipeline' or 'status'.");
|
|
1880
|
+
return client.patch("/api/v1/settings", { dealWorkingMode: mode });
|
|
1881
|
+
}));
|
|
1882
|
+
lifecycle
|
|
1883
|
+
.command("set-lost-propagation")
|
|
1884
|
+
.description("Turn LOST propagation on or off (Lifecycle v3 P2). On: a contact flips to lost within a minute of its LAST open deal closing lost (carrying that deal's reason), a new open deal reopens a lost/abandoned/disqualified contact, a won contact never flips. Forward-only from the first enable. A lost contact silences every drip, sequence and playbook for that person — read the nightly shadow report (job run lost-propagation-shadow) before enabling.")
|
|
1885
|
+
.option("--enable", "flips happen live from now on")
|
|
1886
|
+
.option("--disable", "shadow report only")
|
|
1887
|
+
.action(run(async (client, opts) => {
|
|
1888
|
+
if (opts.enable && opts.disable)
|
|
1889
|
+
throw new Error("Pass either --enable or --disable, not both.");
|
|
1890
|
+
if (opts.enable === undefined && opts.disable === undefined)
|
|
1891
|
+
throw new Error("Pass --enable or --disable.");
|
|
1892
|
+
return client.patch("/api/v1/settings", { lostPropagation: { enabled: Boolean(opts.enable) } });
|
|
1893
|
+
}));
|
|
1863
1894
|
lifecycle
|
|
1864
1895
|
.command("set-intake-deals")
|
|
1865
1896
|
.description("Configure automatic deal creation on live intake (webhooks, public forms, public bookings). Even under --re-inbound always: bulk imports and staff/calendar/dialer-created appointments never mint, exact replays and same-source events within 10 min are skipped, and terminal-status contacts get no new deals")
|
|
@@ -2357,6 +2388,23 @@ projectBlue
|
|
|
2357
2388
|
assertUuid(lineId, "line id");
|
|
2358
2389
|
return client.put(`/api/v1/settings/project-blue/lines/${encodeURIComponent(lineId)}`, { userId: null });
|
|
2359
2390
|
}));
|
|
2391
|
+
// (2026-09-07) Voice calling through Project Blue's own Twilio account
|
|
2392
|
+
projectBlue
|
|
2393
|
+
.command("voice")
|
|
2394
|
+
.description("Project Blue voice calling: the vendor's Twilio Voice keys (masked) and the caller ID iPhone-line calls show")
|
|
2395
|
+
.action(run(async (client) => client.get("/api/v1/settings/project-blue/voice")));
|
|
2396
|
+
projectBlue
|
|
2397
|
+
.command("voice-connect")
|
|
2398
|
+
.description("Store Project Blue's Twilio Voice keys (dashboard → Settings → General → API Keys → Voice Calling API); verified against Twilio read-only")
|
|
2399
|
+
.requiredOption("--account-sid <sid>", "Twilio Account SID (AC…)")
|
|
2400
|
+
.requiredOption("--twiml-app-sid <sid>", "TwiML App SID (AP…)")
|
|
2401
|
+
.requiredOption("--api-key-sid <sid>", "API Key SID (SK…)")
|
|
2402
|
+
.requiredOption("--api-key-secret <secret>", "API Key Secret")
|
|
2403
|
+
.action(run(async (client, opts) => client.put("/api/v1/settings/project-blue/voice", { accountSid: opts.accountSid, twimlAppSid: opts.twimlAppSid, apiKeySid: opts.apiKeySid, apiKeySecret: opts.apiKeySecret })));
|
|
2404
|
+
projectBlue
|
|
2405
|
+
.command("voice-disconnect")
|
|
2406
|
+
.description("Remove Project Blue's Twilio Voice keys (iPhone-line calls fall back to FaceTime Audio)")
|
|
2407
|
+
.action(run(async (client) => client.del("/api/v1/settings/project-blue/voice")));
|
|
2360
2408
|
function assertUuid(id, label = "id") {
|
|
2361
2409
|
const uuidRe = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
2362
2410
|
if (!uuidRe.test(id.trim())) {
|
package/package.json
CHANGED