frontpage-host 0.1.22 → 0.1.23
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/modules/commands.js +3 -1
- package/dist/modules/typed_config.js +11 -1
- package/dist/registry.js +3 -2
- package/package.json +1 -1
package/dist/modules/commands.js
CHANGED
|
@@ -59,7 +59,7 @@ export const MODULE_COMMANDS = [
|
|
|
59
59
|
genericActions: GENERIC_ACTIONS,
|
|
60
60
|
extraActions: [
|
|
61
61
|
"get [--instance <slug>]",
|
|
62
|
-
"set --instance <slug> [--notify-email] [--confirm yes|no]",
|
|
62
|
+
"set --instance <slug> [--notify-email] [--confirm yes|no] [--confirm-template <id>]",
|
|
63
63
|
"destinations [--instance <slug>]",
|
|
64
64
|
"connect-destination <privyr|hubspot|pipedrive> --token \"…\" [--lead-source \"…\"]",
|
|
65
65
|
"attach-destination --instance <slug> --provider <id>",
|
|
@@ -74,6 +74,7 @@ export const MODULE_COMMANDS = [
|
|
|
74
74
|
"frontpage modules forms get",
|
|
75
75
|
"frontpage modules forms get --instance lead-gen",
|
|
76
76
|
"frontpage modules forms set --instance lead-gen --notify-email hi@example.com",
|
|
77
|
+
"frontpage modules forms set --instance lead-gen --confirm-template <template-id>",
|
|
77
78
|
"frontpage modules forms destinations",
|
|
78
79
|
"frontpage modules forms connect-destination privyr --token \"…\"",
|
|
79
80
|
"frontpage modules forms attach-destination --instance lead-gen --provider privyr",
|
|
@@ -83,6 +84,7 @@ export const MODULE_COMMANDS = [
|
|
|
83
84
|
notes: [
|
|
84
85
|
"Without --instance, get lists each form (id, status, notifyEmail). Do not target `default`.",
|
|
85
86
|
"Confirmation emails require a paid plan (same as Modules).",
|
|
87
|
+
"--confirm-template sets that form's saved template id. Every token must be one of the form's input names. An empty value clears it. A series is not attached to a form.",
|
|
86
88
|
"Destinations copy leads to HubSpot, Pipedrive, or Privyr. Connect once, then attach each form. Token write is admin (Privyr: paste the Incoming Webhook URL, not a token). request-destination-setup lights the editor amber bar (editor key). remove-destination requires --yes. Locations: https://frontpage.host/developers/modules#forms-destinations",
|
|
87
89
|
],
|
|
88
90
|
},
|
|
@@ -45,6 +45,9 @@ function printConfirmable(config, confirmations) {
|
|
|
45
45
|
printLine("confirm", `${yesNo(on)} (paid plan required)`);
|
|
46
46
|
else
|
|
47
47
|
printLine("confirm", yesNo(on));
|
|
48
|
+
if (typeof config.confirmTemplateId === "string") {
|
|
49
|
+
printLine("template", config.confirmTemplateId.trim() || "—");
|
|
50
|
+
}
|
|
48
51
|
}
|
|
49
52
|
function printFormsList(instances, destinations) {
|
|
50
53
|
if (!instances.length) {
|
|
@@ -112,6 +115,7 @@ export async function runTypedConfig(key, slug, action, flags) {
|
|
|
112
115
|
const notifyEmail = takeFlag(work, "--notify-email");
|
|
113
116
|
const hours = takeFlag(work, "--hours");
|
|
114
117
|
const confirmRaw = takeFlag(work, "--confirm");
|
|
118
|
+
const confirmTemplate = takeFlag(work, "--confirm-template");
|
|
115
119
|
assertNoUnknownFlags(work, "modules");
|
|
116
120
|
let confirmEnabled;
|
|
117
121
|
try {
|
|
@@ -135,8 +139,14 @@ export async function runTypedConfig(key, slug, action, flags) {
|
|
|
135
139
|
body.hours = hours;
|
|
136
140
|
if (confirmEnabled !== undefined)
|
|
137
141
|
body.confirmEnabled = confirmEnabled;
|
|
142
|
+
if (confirmTemplate !== undefined) {
|
|
143
|
+
if (key !== "forms") {
|
|
144
|
+
return emitUsage("modules", `--confirm-template is only for forms.\n\n${usage}`);
|
|
145
|
+
}
|
|
146
|
+
body.confirmTemplateId = confirmTemplate.trim();
|
|
147
|
+
}
|
|
138
148
|
if (key === "forms" && !instanceId) {
|
|
139
|
-
return emitUsage("modules", `Usage: frontpage modules forms set --instance <slug> [--notify-email] [--confirm yes|no]\n\n${usage}`);
|
|
149
|
+
return emitUsage("modules", `Usage: frontpage modules forms set --instance <slug> [--notify-email] [--confirm yes|no] [--confirm-template <id>]\n\n${usage}`);
|
|
140
150
|
}
|
|
141
151
|
const data = await v1Post(pathFor(slug, key), body);
|
|
142
152
|
if (isJson()) {
|
package/dist/registry.js
CHANGED
|
@@ -335,6 +335,7 @@ export const COMMANDS = [
|
|
|
335
335
|
"frontpage modules callbar set --phone +14085551234 --sms no",
|
|
336
336
|
"frontpage modules forms get",
|
|
337
337
|
"frontpage modules forms set --instance lead-gen --notify-email hi@example.com",
|
|
338
|
+
"frontpage modules forms set --instance lead-gen --confirm-template <template-id>",
|
|
338
339
|
"frontpage store connect --no-open",
|
|
339
340
|
"frontpage modules docs forms",
|
|
340
341
|
"frontpage modules docs google_reviews",
|
|
@@ -489,11 +490,11 @@ export const COMMANDS = [
|
|
|
489
490
|
"Integer cents only. $49.99 is 4999. Do not send 49.99 or a dollar string. --price-cents is the usual cost. Optional --discount-cents is the sale the buyer pays (strictly less than price). Omit --discount-cents when there is no sale. Checkout charges the sale; the site strikes through the usual price.",
|
|
490
491
|
"--add / --remove become signed delta. 5 adds 5. --remove 5 removes 5. Result copy is added 5 / removed 5 / set to 20 / stockNow.",
|
|
491
492
|
"Pass either --add, --remove, or --set. Never two together. --set unlimited returns counted stock to unlimited.",
|
|
492
|
-
"items: list|get|create|update|archive|activate [--off] | images --urls … | stock [--variant m] --add|--remove|--set. list --category hats. create/update --categories hats,summer",
|
|
493
|
+
"items: list|get|create|update|archive|activate [--off] | images --urls … | stock [--variant m] --add|--remove|--set. list --category hats. items list --json returns every product and every variant — do not paste that into a model. The editor manage_store list_items call is one page of 25 slim rows plus total; get_item is one product. create/update --categories hats,summer",
|
|
493
494
|
"categories: list|create|rename|archive. Create the category first. Assigning an unknown slug fails.",
|
|
494
495
|
"variants: add|update|archive <itemId> --id m --price-cents … [--option Size=M] [--stock]",
|
|
495
496
|
"settings: get|set-fulfillment|set-currency|set-checkout|set-checkout-fee. Currency is any Stripe presentment code such as usd or jpy. Checkout is store-wide (cart or instant). Do not use leftover items --checkout to pick cart vs Pay now. Gift cards still use --amount open --min-cents. Service fee applies to Add to cart and Pay now. Connect: frontpage store connect|status|disconnect. connect opens Frontpage then Stripe; --no-open for CI. disconnect keeps the shared Stripe account on payments.",
|
|
496
|
-
"Page markup is yours: data-fp-store-grid + data-fp-cart (cart starts hidden), every store control data-fp-requires=store. Product pages are the default: unless they said they do not want product pages, write one src/pages/products/item.astro (or shop) with data-fp-store-product. If they said no, skip that file and do not bind href or url. Description is a small markdown subset. PDP bind is <div data-fp-store-bind=description>. Do not bake titles or prices. Guide: https://frontpage.host/developers/store",
|
|
497
|
+
"Page markup is yours: data-fp-store-grid + data-fp-cart (cart starts hidden), every store control data-fp-requires=store. The public catalog pages with offset, limit, total, and truncated (default 24). list_items is the same shape with a max of 25. Product pages are the default: unless they said they do not want product pages, write one src/pages/products/item.astro (or shop) with data-fp-store-product. If they said no, skip that file and do not bind href or url. Description is a small markdown subset. PDP bind is <div data-fp-store-bind=description>. Do not bake titles or prices. Guide: https://frontpage.host/developers/store",
|
|
497
498
|
"import reads src/content/products/*.json from the site store into Store. One default variant each. Skip if that itemId already exists. Does not invent categories or change fulfillment.",
|
|
498
499
|
"orders / payments list|get read the same ledgers as frontpage inbox orders|payments",
|
|
499
500
|
"Unknown leftover flags fail closed (exit 2)",
|