conduyt 1.54.0 → 1.56.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 +55 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1096,10 +1096,22 @@ const bookingPageBody = (opts) => {
1096
1096
  set("brandName", opts.brandName);
1097
1097
  if (typeof opts.embedOrigins === "string")
1098
1098
  set("embedAllowedOrigins", opts.embedOrigins.split(",").map((o) => o.trim()).filter(Boolean));
1099
+ if (opts.documents !== undefined)
1100
+ set("documentsEnabled", opts.documents === "on" || opts.documents === true);
1101
+ if (typeof opts.documentsPageUrl === "string")
1102
+ set("documentsPageUrl", opts.documentsPageUrl === "none" ? null : opts.documentsPageUrl);
1099
1103
  if (typeof opts.availability === "string")
1100
1104
  set("availabilityRules", JSON.parse(opts.availability));
1101
1105
  if (opts.active !== undefined)
1102
1106
  set("isActive", opts.active);
1107
+ // (Codex rb-r9 m3) every other field the route accepts (the OpenAPI BookingPagePatch schema) through --data; the typed
1108
+ // options above win over the same key in it
1109
+ if (typeof opts.data === "string") {
1110
+ const extra = JSON.parse(opts.data);
1111
+ if (!extra || typeof extra !== "object" || Array.isArray(extra))
1112
+ throw new Error("--data must be a JSON object");
1113
+ return { ...extra, ...body };
1114
+ }
1103
1115
  return body;
1104
1116
  };
1105
1117
  const bookingPageOptions = (cmd) => cmd
@@ -1107,6 +1119,8 @@ const bookingPageOptions = (cmd) => cmd
1107
1119
  .option("--slug <slug>", "public slug (conduyt.app/book/<slug>)")
1108
1120
  .option("--description <text>", "description shown on the page")
1109
1121
  .option("--host <userId>", "host user UUID (the page owner)")
1122
+ .option("--documents <on|off>", "the documents step after the booking (bank statements and funding agreements attached to the lead)")
1123
+ .option("--documents-page-url <url>", "the site page the confirmation email links back to for the upload (https; reads ?appointment=<id>); 'none' clears it")
1110
1124
  .option("--duration <minutes>", "slot length in minutes")
1111
1125
  .option("--minimum-notice <minutes>", "earliest booking, minutes from now")
1112
1126
  .option("--max-advance-days <days>", "how far ahead visitors may book")
@@ -1118,7 +1132,8 @@ const bookingPageOptions = (cmd) => cmd
1118
1132
  .option("--embed-origins <origins>", "comma-separated origins allowed to embed/call the page (empty = any)")
1119
1133
  .option("--availability <json>", "AvailabilityWindow[] JSON override, e.g. '[{\"dayOfWeek\":1,\"startTime\":\"09:00\",\"endTime\":\"11:00\"}]'")
1120
1134
  .option("--active", "page accepts bookings")
1121
- .option("--no-active", "page stops accepting bookings");
1135
+ .option("--no-active", "page stops accepting bookings")
1136
+ .option("--data <json>", "any other page field as a JSON object (the OpenAPI BookingPagePatch schema: eventType, hostUserIds, reminders, formFields, bufferBefore, color, redirectUrl, gdprEnabled, waitlistEnabled, template, …)");
1122
1137
  bookingPageOptions(bookingPages.command("create").description("Create a booking page (POST /booking-pages): --title, --slug, --host and --duration at least"))
1123
1138
  .action(run(async (client, opts) => {
1124
1139
  const body = bookingPageBody(opts);
@@ -2097,6 +2112,45 @@ webhooks
2097
2112
  Object.assign(body, jsonArg(opts.json, "--json"));
2098
2113
  return client.post("/api/v1/webhooks/manage", body);
2099
2114
  }));
2115
+ // ---- drip send barrier recovery (Smart Views slice A, Codex r70 m5) ----
2116
+ // A drip step whose provider outcome was unconfirmed is PARKED behind a barrier (a parked webhook log and/or the
2117
+ // processor's marker). An operator (admin/owner) cancels it here: cancel-only leaves the barrier standing (nothing is
2118
+ // sent); --skip assumes the step was delivered (the processor advances without sending); --resend sends the step AGAIN
2119
+ // (a possible duplicate SMS) and is refused without --acknowledge-duplicate-risk.
2120
+ const uuidArg = (raw, name) => {
2121
+ if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(raw))
2122
+ throw new Error(`${name} must be a UUID`);
2123
+ return raw;
2124
+ };
2125
+ const barrierBody = (opts) => {
2126
+ if (opts.skip && opts.resend)
2127
+ throw new Error("pass --skip or --resend, not both");
2128
+ if (opts.resend && !opts.acknowledgeDuplicateRisk)
2129
+ throw new Error("--resend may deliver the step TWICE (its outcome was unconfirmed): pass --acknowledge-duplicate-risk, or --skip to advance without sending");
2130
+ const body = {};
2131
+ if (opts.skip)
2132
+ body.resolution = "skip";
2133
+ if (opts.resend) {
2134
+ body.resolution = "resend";
2135
+ body.confirm = "RESEND_UNCONFIRMED_DRIP";
2136
+ }
2137
+ return body;
2138
+ };
2139
+ webhooks
2140
+ .command("cancel-log <id>")
2141
+ .description("Cancel ONE parked / queued / failed webhook log of an unconfirmed drip send (POST /webhook-logs/{id}/cancel; admin/owner, webhooks scope). Cancel-only by default: the barrier stands")
2142
+ .option("--skip", "assume the step was delivered: the processor advances without sending")
2143
+ .option("--resend", "send the step again (duplicate risk: needs --acknowledge-duplicate-risk; refused 409 step_already_sent when the step already carries sent evidence: use --skip)")
2144
+ .option("--acknowledge-duplicate-risk", "you accept the step may be delivered twice")
2145
+ .action(run(async (client, id, opts) => client.post(`/api/v1/webhook-logs/${uuidArg(id, "id")}/cancel`, barrierBody(opts))));
2146
+ const dripEnrollments = program.command("drip-enrollments").description("Drip enrollment recovery");
2147
+ dripEnrollments
2148
+ .command("cancel-barrier <id>")
2149
+ .description("Cancel a drip enrollment's whole send barrier (POST /drip-enrollments/{id}/cancel-barrier; admin/owner, drip-enrollments scope) — every parked / queued / failed log, including a marker-only barrier with no log at all. Cancel-only by default: the barrier stands")
2150
+ .option("--skip", "assume the current step was delivered: the processor advances without sending")
2151
+ .option("--resend", "send the step again (duplicate risk: needs --acknowledge-duplicate-risk; refused 409 step_already_sent when the step already carries sent evidence: use --skip)")
2152
+ .option("--acknowledge-duplicate-risk", "you accept the step may be delivered twice")
2153
+ .action(run(async (client, id, opts) => client.post(`/api/v1/drip-enrollments/${uuidArg(id, "id")}/cancel-barrier`, barrierBody(opts))));
2100
2154
  // ---- dnc (Do Not Call) ----
2101
2155
  // NOTE: an AI agent's API key must be granted the `dnc` scope to manage the DNC
2102
2156
  // list. Reading also requires dialer:view; adding a litigator entry and removals
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "conduyt",
3
- "version": "1.54.0",
4
- "description": "Command-line interface for Conduyt CRM \u2014 manage contacts, deals, pipelines, and run insight queries from your terminal.",
3
+ "version": "1.56.0",
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",
7
7
  "bin": {