hookwright 1.11.0 → 1.12.1

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/cli.js +21 -22
  2. 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.11.0",
27
+ version: "1.12.1",
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,23 @@ 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: "storeUrl" },
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: "cart.productDetails", required: true, note: "the first PAID line wins; freebies rank last" },
1176
- { source: "line_items[].title", target: "cart.productName", note: 'the featured line alone, without the "and N more"' },
1177
- { source: "line_items[].image", target: "cart.image", note: "looked up from product_id when the line has none" },
1178
- { source: "\u2014 (store domain + handle)", target: "cart.productUrl", note: "resolved, not sent" },
1179
- { source: "\u2014 (store domain + line ids)", target: "cartLink", note: "resolved, not sent" },
1180
- { source: "\u2014 (company shopify integration)", target: "storeUrl", note: "resolved, not sent" },
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 + line ids)", target: "cart_link", note: "resolved, not sent" },
1179
+ { source: "\u2014 (company shopify integration)", target: "store_url", note: "resolved, not sent" },
1181
1180
  { source: "line_items[].price", target: "\u2014 (ranking only)", note: "a zero price marks the line a freebie" },
1182
- { source: "line_items[].quantity", target: "cart.quantity", note: "summed across the cart" },
1181
+ { source: "line_items[].quantity", target: "total_quantity", note: "summed across the cart" },
1183
1182
  { source: "line_items[]", target: "cart.itemCount", note: "the line count, not the quantity" },
1184
1183
  { source: "total_price", target: "total_price", note: "the body is stored as sent" },
1185
1184
  { source: "subtotal_price", target: "subtotal_price" },
1186
1185
  { source: "total_discount", target: "total_discount" },
1187
1186
  { source: "currency", target: "currency" },
1188
- { source: "abandoned_checkout_url", target: "checkoutUrl", required: true, note: "token_id is a bare uuid, only usable once built into a link" }
1187
+ { source: "abandoned_checkout_url", target: "checkout_link", required: true, note: "token_id is a bare uuid, only usable once built into a link" }
1189
1188
  ];
1190
1189
  var FIELD_MAPS2 = {
1191
1190
  store_page_view: [...COMMON_FIELDS2, ...BROWSING_FIELDS],
@@ -1537,21 +1536,21 @@ var fieldMap5 = [
1537
1536
  { source: "payload.user.last_name", target: "customer.lastName" },
1538
1537
  { source: "payload.user.full_name", target: "customer.fullName", note: "falls back to first + last name" },
1539
1538
  { source: "payload.user.email", target: "customer.email" },
1540
- { source: "payload.checkout_url", target: "checkoutUrl", required: true },
1539
+ { source: "payload.checkout_url", target: "payload.checkout_url", required: true },
1541
1540
  { source: "payload.session_id", target: "sessionId" },
1542
1541
  { source: "payload.session_state", target: "sessionState" },
1543
- { source: "payload.cart_items[].title", target: "cart.productName", required: true, note: "the first PAID line wins; freebies rank last" },
1544
- { source: "payload.cart_items[].image", target: "cart.image" },
1545
- { source: "payload.cart_items[].total_price", target: "pricing.totalPrice", note: "summed across the cart" },
1546
- { source: "payload.cart_items[].total_discount", target: "pricing.totalDiscount", note: "summed across the cart" },
1547
- { source: "payload.cart_items[].quantity", target: "cart.quantity", note: "summed across the cart" },
1542
+ { source: "payload.cart_items[].title", target: "product_details", required: true, note: "the first PAID line wins; freebies rank last" },
1543
+ { source: "payload.cart_items[].image", target: "product_image_url" },
1544
+ { source: "payload.cart_items[].total_price", target: "total_price", note: "summed across the cart" },
1545
+ { source: "payload.cart_items[].total_discount", target: "total_discount", note: "summed across the cart" },
1546
+ { source: "payload.cart_items[].quantity", target: "total_quantity", note: "summed across the cart" },
1548
1547
  { source: "payload.cart_items[]", target: "cart.itemCount", note: "the line count, not the quantity" },
1549
- { source: "payload.coupons[0].code", target: "pricing.couponCode" },
1550
- { source: "payload.checkout_context.presentment_currency", target: "pricing.currency" },
1548
+ { source: "payload.coupons[0].code", target: "coupon_code" },
1549
+ { source: "payload.checkout_context.presentment_currency", target: "currency" },
1551
1550
  { source: "payload.checkout_context.presentment_country", target: "phone region" },
1552
1551
  { source: "payload.metadata.utm[]", target: "utm.*", note: "a list of {name,value} pairs, not an object" },
1553
1552
  { source: "payload.metadata.landing_page", target: "attribution.landingPage" },
1554
- { source: "store.shopify_domain", target: "storeUrl" },
1553
+ { source: "store.shopify_domain", target: "store.shopify_domain" },
1555
1554
  { source: "store.name", target: "store.name" },
1556
1555
  { source: "store.main_domain", target: "store.mainDomain" },
1557
1556
  { source: "payload.checkout_context.store_country", target: "store.country" },
@@ -1578,7 +1577,7 @@ var COLLECTION_VIEWED_FIELDS = [
1578
1577
  { source: "payload.collection_viewed.handle", target: "payload.collection_viewed.handle", required: true, note: "the url is built from this" },
1579
1578
  { source: "payload.collection_viewed.image", target: "payload.collection_viewed.image" },
1580
1579
  { source: "payload.collection_viewed.collection_id", target: "payload.collection_viewed.collection_id" },
1581
- { source: "\u2014 (store domain + handle)", target: "collection_url", note: "derived, not sent" }
1580
+ { source: "store.shopify_domain / store.main_domain", target: "collection_url", note: "derived: {domain}/collections/{handle}" }
1582
1581
  ];
1583
1582
  var PRODUCT_VIEWED_FIELDS = [
1584
1583
  ...ENVELOPE_FIELDS,
@@ -1586,7 +1585,7 @@ var PRODUCT_VIEWED_FIELDS = [
1586
1585
  { source: "payload.product_viewed.handle", target: "payload.product_viewed.handle", required: true, note: "the url is built from this" },
1587
1586
  { source: "payload.product_viewed.image", target: "payload.product_viewed.image" },
1588
1587
  { source: "payload.product_viewed.product_id", target: "payload.product_viewed.product_id" },
1589
- { source: "\u2014 (store domain + handle)", target: "product_url", note: "derived, not sent" }
1588
+ { source: "store.shopify_domain / store.main_domain", target: "product_url", note: "derived: {domain}/products/{handle}" }
1590
1589
  ];
1591
1590
  var FIELD_MAPS3 = {
1592
1591
  ABANDONED_CHECKOUT: fieldMap5,
@@ -1649,7 +1648,7 @@ function buildPayload5(ctx) {
1649
1648
  collection_id: Number(collection?.id) || 0,
1650
1649
  name: collection?.title ?? "",
1651
1650
  handle: collection?.handle ?? "",
1652
- image: collection?.image?.src ?? "",
1651
+ image: collection?.image ?? "",
1653
1652
  timestamp: now.toISOString()
1654
1653
  }
1655
1654
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hookwright",
3
- "version": "1.11.0",
3
+ "version": "1.12.1",
4
4
  "description": "Build real, signed e-commerce webhooks from a live Shopify catalogue — interactive terminal UI, no backend",
5
5
  "keywords": [
6
6
  "webhook",