hookwright 1.11.0 → 1.12.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/cli.js +19 -19
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -24,7 +24,7 @@ var init_package = __esm({
|
|
|
24
24
|
"package.json"() {
|
|
25
25
|
package_default = {
|
|
26
26
|
name: "hookwright",
|
|
27
|
-
version: "1.
|
|
27
|
+
version: "1.12.0",
|
|
28
28
|
description: "Build real, signed e-commerce webhooks from a live Shopify catalogue \u2014 interactive terminal UI, no backend",
|
|
29
29
|
keywords: [
|
|
30
30
|
"webhook",
|
|
@@ -1168,24 +1168,24 @@ var BROWSING_FIELDS = [
|
|
|
1168
1168
|
{ source: "eventPayload.uiData.pageTitle / data.page_title", target: "page.title" },
|
|
1169
1169
|
{ source: "eventPayload.uiData.landingPageUrl / data.landing_page_url", target: "page.landingPage" },
|
|
1170
1170
|
{ source: "eventPayload.uiData.referrerPageUrl / data.referrer_page_url", target: "page.referrer" },
|
|
1171
|
-
{ source: "eventPayload.clientData.brandUrl", target: "
|
|
1171
|
+
{ source: "eventPayload.clientData.brandUrl", target: "store_url" },
|
|
1172
1172
|
{ source: "session_id / sessionId", target: "sessionId" }
|
|
1173
1173
|
];
|
|
1174
1174
|
var CART_FIELDS = [
|
|
1175
|
-
{ source: "line_items[].title", target: "
|
|
1176
|
-
{ source: "line_items[].title", target: "
|
|
1177
|
-
{ source: "line_items[].image", target: "
|
|
1178
|
-
{ source: "\u2014 (store domain + handle)", target: "
|
|
1179
|
-
{ source: "\u2014 (store domain + line ids)", target: "
|
|
1180
|
-
{ source: "\u2014 (company shopify integration)", target: "
|
|
1175
|
+
{ source: "line_items[].title", target: "product_details", required: true, note: "the first PAID line wins; freebies rank last" },
|
|
1176
|
+
{ source: "line_items[].title", target: "product_name", note: 'the featured line alone, without the "and N more"' },
|
|
1177
|
+
{ source: "line_items[].image", target: "product_image_url", note: "looked up from product_id when the line has none" },
|
|
1178
|
+
{ source: "\u2014 (store domain + handle)", target: "product_url", note: "resolved, not sent" },
|
|
1179
|
+
{ source: "\u2014 (store domain + line ids)", target: "cart_link", note: "resolved, not sent" },
|
|
1180
|
+
{ source: "\u2014 (company shopify integration)", target: "store_url", note: "resolved, not sent" },
|
|
1181
1181
|
{ source: "line_items[].price", target: "\u2014 (ranking only)", note: "a zero price marks the line a freebie" },
|
|
1182
|
-
{ source: "line_items[].quantity", target: "
|
|
1182
|
+
{ source: "line_items[].quantity", target: "total_quantity", note: "summed across the cart" },
|
|
1183
1183
|
{ source: "line_items[]", target: "cart.itemCount", note: "the line count, not the quantity" },
|
|
1184
1184
|
{ source: "total_price", target: "total_price", note: "the body is stored as sent" },
|
|
1185
1185
|
{ source: "subtotal_price", target: "subtotal_price" },
|
|
1186
1186
|
{ source: "total_discount", target: "total_discount" },
|
|
1187
1187
|
{ source: "currency", target: "currency" },
|
|
1188
|
-
{ source: "abandoned_checkout_url", target: "
|
|
1188
|
+
{ source: "abandoned_checkout_url", target: "checkout_link", required: true, note: "token_id is a bare uuid, only usable once built into a link" }
|
|
1189
1189
|
];
|
|
1190
1190
|
var FIELD_MAPS2 = {
|
|
1191
1191
|
store_page_view: [...COMMON_FIELDS2, ...BROWSING_FIELDS],
|
|
@@ -1537,21 +1537,21 @@ var fieldMap5 = [
|
|
|
1537
1537
|
{ source: "payload.user.last_name", target: "customer.lastName" },
|
|
1538
1538
|
{ source: "payload.user.full_name", target: "customer.fullName", note: "falls back to first + last name" },
|
|
1539
1539
|
{ source: "payload.user.email", target: "customer.email" },
|
|
1540
|
-
{ source: "payload.checkout_url", target: "
|
|
1540
|
+
{ source: "payload.checkout_url", target: "payload.checkout_url", required: true },
|
|
1541
1541
|
{ source: "payload.session_id", target: "sessionId" },
|
|
1542
1542
|
{ source: "payload.session_state", target: "sessionState" },
|
|
1543
|
-
{ source: "payload.cart_items[].title", target: "
|
|
1544
|
-
{ source: "payload.cart_items[].image", target: "
|
|
1545
|
-
{ source: "payload.cart_items[].total_price", target: "
|
|
1546
|
-
{ source: "payload.cart_items[].total_discount", target: "
|
|
1547
|
-
{ source: "payload.cart_items[].quantity", target: "
|
|
1543
|
+
{ source: "payload.cart_items[].title", target: "product_details", required: true, note: "the first PAID line wins; freebies rank last" },
|
|
1544
|
+
{ source: "payload.cart_items[].image", target: "product_image_url" },
|
|
1545
|
+
{ source: "payload.cart_items[].total_price", target: "total_price", note: "summed across the cart" },
|
|
1546
|
+
{ source: "payload.cart_items[].total_discount", target: "total_discount", note: "summed across the cart" },
|
|
1547
|
+
{ source: "payload.cart_items[].quantity", target: "total_quantity", note: "summed across the cart" },
|
|
1548
1548
|
{ source: "payload.cart_items[]", target: "cart.itemCount", note: "the line count, not the quantity" },
|
|
1549
|
-
{ source: "payload.coupons[0].code", target: "
|
|
1550
|
-
{ source: "payload.checkout_context.presentment_currency", target: "
|
|
1549
|
+
{ source: "payload.coupons[0].code", target: "coupon_code" },
|
|
1550
|
+
{ source: "payload.checkout_context.presentment_currency", target: "currency" },
|
|
1551
1551
|
{ source: "payload.checkout_context.presentment_country", target: "phone region" },
|
|
1552
1552
|
{ source: "payload.metadata.utm[]", target: "utm.*", note: "a list of {name,value} pairs, not an object" },
|
|
1553
1553
|
{ source: "payload.metadata.landing_page", target: "attribution.landingPage" },
|
|
1554
|
-
{ source: "store.shopify_domain", target: "
|
|
1554
|
+
{ source: "store.shopify_domain", target: "store.shopify_domain" },
|
|
1555
1555
|
{ source: "store.name", target: "store.name" },
|
|
1556
1556
|
{ source: "store.main_domain", target: "store.mainDomain" },
|
|
1557
1557
|
{ source: "payload.checkout_context.store_country", target: "store.country" },
|