@shoppexio/storefront 1.0.76 → 1.0.78
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/CHANGELOG.md +13 -0
- package/dist/customer.cjs +1 -1
- package/dist/customer.cjs.map +1 -1
- package/dist/customer.d.cts +1 -1
- package/dist/customer.d.ts +1 -1
- package/dist/customer.js +1 -1
- package/dist/customer.js.map +1 -1
- package/dist/index.cjs +50 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +50 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.78
|
|
4
|
+
|
|
5
|
+
- `captureAffiliateFromUrl()` honours the shop's attribution mode (ADR-0067). Under `FIRST_CLICK` a held, unexpired attribution wins and a newer `?ref=` no longer replaces it; the landing is still reported so click statistics stay complete. `LAST_CLICK` is unchanged and remains the default.
|
|
6
|
+
- The attribution window is no longer fixed at 30 days: `/attribution` returns `attribution_mode` and `attribution_window_days`, and a newly stored referral uses the shop's (or its tier's) window.
|
|
7
|
+
- New export `getStoredAffiliate()`, returning `{ code, mode }` for the held attribution, or `null`.
|
|
8
|
+
- `setAffiliateCode(code, ttlDays, mode?)` accepts the mode to persist. Existing two-argument calls are unaffected.
|
|
9
|
+
- The `shoppex:affiliate_code:v1` storage key is unchanged and entries written by earlier versions keep working: an entry without a mode reads as `LAST_CLICK`, the behaviour it was written under. No attribution is lost on upgrade.
|
|
10
|
+
- Note: first-click is enforced in the browser, like the window itself. It is an attribution rule, not fraud protection.
|
|
11
|
+
|
|
12
|
+
## 1.0.77
|
|
13
|
+
|
|
14
|
+
- Headless customer replacement requests now require `lineItemId` in the SDK types, matching the live API. Pass the invoice position UUID; omitted or null IDs are not valid. The read-only `replacementEligibility` query still allows omitting its line ID.
|
|
15
|
+
|
|
3
16
|
## 1.0.75
|
|
4
17
|
|
|
5
18
|
- `getStore`, `getStorefront`, `resolveStoreByDomain`, `getProducts`, `getStorefrontProductsPage`, `getProduct` and `getCategories` now forward the full failure contract (`code`, `errorParams`, `status`, `responseReceived`, `responseDefinitive`) instead of rebuilding `{ success: false, message }`, so `code === 'errors.storefront.currency_unavailable'` is branchable through every catalog read. A slug `getProduct()` whose store lookup failed returns that failure instead of a misleading not-found.
|
package/dist/customer.cjs
CHANGED
|
@@ -15705,7 +15705,7 @@ var HeadlessCustomerClient = class {
|
|
|
15705
15705
|
method: "POST",
|
|
15706
15706
|
authenticated: true,
|
|
15707
15707
|
body: {
|
|
15708
|
-
line_item_id: options.lineItemId
|
|
15708
|
+
line_item_id: options.lineItemId,
|
|
15709
15709
|
reason: options.reason,
|
|
15710
15710
|
...options.idempotencyKey ? { idempotency_key: options.idempotencyKey } : {}
|
|
15711
15711
|
},
|