@shoppexio/storefront 1.0.71 → 1.0.72

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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.72
4
+
5
+ - REMOVED: the checkout Turnstile verification lane. `mountCheckoutChallenge`, `CheckoutChallengeCallbacks`, `CheckoutChallengeFrame`, `ApiChallenge`, `SDKResponse.challenge`, `retryWithProof`, and the `autoResolveChallenge`/`turnstileToken` checkout options are gone; invoice creation is a single request again and rate-limit refusals are plain 429s. Bot protection moved to the platform edge. The `X-Idempotency-Key` machinery is unchanged.
6
+
3
7
  ## 1.0.70
4
8
 
5
9
  - One replay engine: a turnstile-challenged refusal now carries `retryWithProof` — the frozen hand-off (cart bytes, codes, currency, quote proof, and the ORIGINAL idempotency key) replays with only the fresh proof attached, and the server's create-request uniqueness is the double-invoice guarantee. Client coalescing is UX-only. New `quoteToken` option; shared Turnstile frame protocol.
package/README.md CHANGED
@@ -66,46 +66,6 @@ currency-bound; Shoppex rejects a mismatch as
66
66
  `errors.checkout.quote_token_stale` instead of creating an invoice for a total
67
67
  the buyer did not approve.
68
68
 
69
- ## Checkout verification on custom domains
70
-
71
- Shoppex can require human verification before it creates an invoice. Use the
72
- hosted verification broker from the SDK. Do not render the returned Turnstile
73
- site key directly on your custom domain.
74
-
75
- ```ts
76
- import shoppex, { mountCheckoutChallenge } from '@shoppexio/storefront';
77
-
78
- const container = document.getElementById('checkout-verification');
79
- let frame: ReturnType<typeof mountCheckoutChallenge> | undefined;
80
-
81
- if (!container) throw new Error('Checkout verification container is missing.');
82
-
83
- async function startCheckout(turnstileToken?: string) {
84
- const result = await shoppex.checkout({ turnstileToken });
85
-
86
- if (result.success) return;
87
- if (!result.challenge) throw new Error(result.message ?? 'Checkout could not be started.');
88
-
89
- frame?.dispose();
90
- frame = mountCheckoutChallenge(container, result.challenge, {
91
- onSuccess(token) {
92
- frame?.dispose();
93
- frame = undefined;
94
- void startCheckout(token);
95
- },
96
- onUnavailable() {
97
- frame?.dispose();
98
- frame = undefined;
99
- console.error('Checkout verification could not load.');
100
- },
101
- });
102
- }
103
- ```
104
-
105
- If your site sends a Content Security Policy, add
106
- `https://checkout.shoppex.io` to `frame-src`. Call `dispose()` when the checkout
107
- component unmounts or before you mount another challenge.
108
-
109
69
  ## Custom customer account
110
70
 
111
71
  Build your own OTP login, order history, and download UI without adding a