@spree/docs 0.1.253 → 0.1.254

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.
@@ -711,7 +711,7 @@ Endpoints marked — are exempt from scope checks (authentication and session en
711
711
  | Method | Path | Required scope | Summary |
712
712
  |---|---|---|---|
713
713
  | `GET` | `/translations` | `read_products` | Translation coverage for a resource type |
714
- | `POST` | `/translations/batch` | *write_<resource> for every resource type in the batch (for API-key authentication)* | Batch upsert translations |
714
+ | `POST` | `/translations/batch` | *write_&lt;resource&gt; for every resource type in the batch (for API-key authentication)* | Batch upsert translations |
715
715
 
716
716
  ## Webhook endpoints
717
717
 
@@ -30,7 +30,7 @@ Spree Backend → Webhook POST → Storefront → render email → send via Rese
30
30
 
31
31
  1. **Create a webhook endpoint** in Spree Admin → Settings → Developer → Webhooks:
32
32
  - **URL:** `https://your-storefront.com/api/webhooks/spree`
33
- - **Events:** `order.completed`, `order.canceled`, `order.shipped`, `customer.password_reset_requested`, `newsletter_subscriber.subscription_requested`
33
+ - **Events:** `order.placed`, `order.canceled`, `order.fulfilled`, `customer.password_reset_requested`
34
34
 
35
35
  2. **Configure the storefront** with the webhook secret and email provider:
36
36
 
@@ -49,13 +49,12 @@ Spree Backend → Webhook POST → Storefront → render email → send via Rese
49
49
 
50
50
  | Event | Email |
51
51
  |-------|-------|
52
- | `order.completed` | Order confirmation with items, totals, addresses |
52
+ | `order.placed` | Order confirmation with items, totals, addresses |
53
53
  | `order.canceled` | Cancellation notice |
54
- | `order.shipped` | Shipping notification with tracking link |
54
+ | `order.fulfilled` | Shipping notification with tracking link |
55
55
  | `customer.password_reset_requested` | Password reset link |
56
- | `newsletter_subscriber.subscription_requested` | Newsletter double opt-in confirmation link |
57
56
 
58
- > **NOTE:** The storefront listens for `order.completed` and `order.shipped`, the names these events had before Spree 6.0. Spree 6.0 still sends them alongside the new names, `order.placed` and `order.fulfilled`, but stops in Spree 6.1. Before upgrading to 6.1, switch the storefront handlers and your webhook endpoint subscriptions to the new names.
57
+ > **NOTE:** Spree 6.0 also sends the pre-6.0 names `order.completed` and `order.shipped` as deprecated aliases until 6.1. Subscribe the endpoint to the new names only — subscribing to both makes Spree deliver both events.
59
58
 
60
59
  #### Custom Frameworks
61
60
 
@@ -16,14 +16,14 @@ Email templates are React components in `src/lib/emails/`:
16
16
 
17
17
  | File | Event | Description |
18
18
  |------|-------|-------------|
19
- | `order-confirmation.tsx` | `order.completed` | Items, totals, addresses, delivery method |
19
+ | `order-confirmation.tsx` | `order.placed` | Items, totals, addresses, delivery method |
20
20
  | `order-canceled.tsx` | `order.canceled` | Cancellation notice with items |
21
- | `shipment-shipped.tsx` | `order.shipped` | Tracking number and link |
21
+ | `shipment-shipped.tsx` | `order.fulfilled` | Tracking number and link |
22
22
  | `password-reset.tsx` | `customer.password_reset_requested` | Reset button and fallback link |
23
23
 
24
24
  Customize a template by editing its file directly — they use `@react-email/components` for email-safe layout primitives.
25
25
 
26
- > **NOTE:** The storefront listens for `order.completed` and `order.shipped`, the names these events had before Spree 6.0. Spree 6.0 still sends them alongside the new names, `order.placed` and `order.fulfilled`, but stops in Spree 6.1. Before upgrading to 6.1, switch the storefront handlers and your webhook endpoint subscriptions to the new names.
26
+ > **NOTE:** Spree 6.0 also sends the pre-6.0 names `order.completed` and `order.shipped` as deprecated aliases until 6.1. Subscribe the endpoint to the new names only — subscribing to both makes Spree deliver both events.
27
27
 
28
28
  ## Previewing
29
29
 
@@ -57,9 +57,9 @@ import { createWebhookHandler } from '@/lib/spree/webhooks'
57
57
  const handler = createWebhookHandler({
58
58
  secret: process.env.SPREE_WEBHOOK_SECRET!,
59
59
  handlers: {
60
- 'order.completed': handleOrderCompleted,
60
+ 'order.placed': handleOrderPlaced,
61
61
  'order.canceled': handleOrderCanceled,
62
- 'order.shipped': handleOrderShipped,
62
+ 'order.fulfilled': handleOrderFulfilled,
63
63
  'customer.password_reset_requested': handlePasswordReset,
64
64
  },
65
65
  })
@@ -74,7 +74,7 @@ To add a new email type:
74
74
 
75
75
  ## Setup
76
76
 
77
- 1. **Create a webhook endpoint** in Spree Admin → Settings → Developer → Webhooks. Subscribe to `order.completed`, `order.canceled`, `order.shipped`, and `customer.password_reset_requested`, and copy the secret key into `SPREE_WEBHOOK_SECRET`.
77
+ 1. **Create a webhook endpoint** in Spree Admin → Settings → Developer → Webhooks. Subscribe to `order.placed`, `order.canceled`, `order.fulfilled`, and `customer.password_reset_requested`, and copy the secret key into `SPREE_WEBHOOK_SECRET`.
78
78
 
79
79
  2. **Receive webhooks locally.** Expose the storefront with a public URL so Spree can reach it — the simplest option is a [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/):
80
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.253",
3
+ "version": "0.1.254",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",