conduyt 1.29.0 → 1.31.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 +28 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2299,7 +2299,7 @@ reports
|
|
|
2299
2299
|
.action(run(async (client) => client.get("/api/v1/reports/custom")));
|
|
2300
2300
|
reports
|
|
2301
2301
|
.command("create")
|
|
2302
|
-
.description("Create a saved report from a JSON definition (name, entity, columns, filters, sortBy, groupBy, groupBy2, aggregate, measureField, population: { smartViewId }); pivot: { rows, columns, measures } for a pivot grid on contacts/deals")
|
|
2302
|
+
.description("Create a saved report from a JSON definition (name, entity, columns, filters, sortBy, groupBy, groupBy2, aggregate, measureField, population: { smartViewId }, isShared, isPrivate: only you and admins can open it even when shared); pivot: { rows, columns, measures } for a pivot grid on contacts/deals")
|
|
2303
2303
|
.requiredOption("--json <definition>", "the definition as JSON (or @file)")
|
|
2304
2304
|
.action(run(async (client, opts) => {
|
|
2305
2305
|
const raw = opts.json.startsWith("@") ? (await import("node:fs")).readFileSync(opts.json.slice(1), "utf8") : opts.json;
|
|
@@ -2488,6 +2488,33 @@ reports
|
|
|
2488
2488
|
}
|
|
2489
2489
|
return client.get(`/api/v1/reports/speed-to-lead?${params.toString()}`);
|
|
2490
2490
|
}));
|
|
2491
|
+
reports
|
|
2492
|
+
.command("appointments")
|
|
2493
|
+
.description("Appointment report: booked, held, no-shows and show rate (past appointments only), cancellations, reschedules and upcoming, by assigned user, calendar or booking page, lead source, channel and day; window by appointment time (default) or booking time")
|
|
2494
|
+
.option("--from <iso>", "window start (default: 366 days before --to)")
|
|
2495
|
+
.option("--to <iso>", "window end (default: now)")
|
|
2496
|
+
.option("--basis <basis>", "start (appointment time, default) | booked (booking time)")
|
|
2497
|
+
.option("--assigned-to <id>", "only appointments assigned to this user")
|
|
2498
|
+
.option("--sources <list>", "comma-separated exact contact source values; __none__ adds appointments with no source or no contact")
|
|
2499
|
+
.action(run(async (client, opts) => {
|
|
2500
|
+
const params = new URLSearchParams();
|
|
2501
|
+
if (opts.from)
|
|
2502
|
+
params.set("from", opts.from);
|
|
2503
|
+
if (opts.to)
|
|
2504
|
+
params.set("to", opts.to);
|
|
2505
|
+
if (opts.basis) {
|
|
2506
|
+
if (!["start", "booked"].includes(opts.basis))
|
|
2507
|
+
throw new Error("--basis must be start or booked");
|
|
2508
|
+
params.set("basis", opts.basis);
|
|
2509
|
+
}
|
|
2510
|
+
if (opts.assignedTo) {
|
|
2511
|
+
assertUuid(opts.assignedTo, "user id");
|
|
2512
|
+
params.set("assignedTo", opts.assignedTo);
|
|
2513
|
+
}
|
|
2514
|
+
if (opts.sources)
|
|
2515
|
+
params.set("sources", opts.sources);
|
|
2516
|
+
return client.get(`/api/v1/reports/appointments?${params.toString()}`);
|
|
2517
|
+
}));
|
|
2491
2518
|
reports
|
|
2492
2519
|
.command("funnel")
|
|
2493
2520
|
.description("Stage funnel for one pipeline: deals that entered each stage in the window (created in it or moved into it) and what happened to them so far (advanced, lost, moved back, handed off to another pipeline, still there; the five add up to the entries) with median days per stage, plus the cohort of deals created in the window by where they sit now. Built from recorded stage moves, never from a snapshot. Windows clamp to 90 days.")
|
package/package.json
CHANGED