conduyt 1.55.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.
- package/dist/index.js +16 -1
- package/package.json +1 -1
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);
|
package/package.json
CHANGED