@spree/docs 0.1.147 → 0.1.149

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.
@@ -9806,6 +9806,20 @@ components:
9806
9806
  bearerFormat: JWT
9807
9807
  description: JWT token for authenticated customers
9808
9808
  schemas:
9809
+ ClaimReason:
9810
+ type: object
9811
+ properties:
9812
+ id:
9813
+ type: string
9814
+ name:
9815
+ type: string
9816
+ active:
9817
+ type: boolean
9818
+ required:
9819
+ - id
9820
+ - name
9821
+ - active
9822
+ x-typelizer: true
9809
9823
  PaginationMeta:
9810
9824
  type: object
9811
9825
  properties:
@@ -10587,8 +10601,6 @@ components:
10587
10601
  type: string
10588
10602
  status:
10589
10603
  type: string
10590
- claim_type:
10591
- type: string
10592
10604
  resolution:
10593
10605
  type: string
10594
10606
  nullable: true
@@ -10614,6 +10626,8 @@ components:
10614
10626
  canceled_at:
10615
10627
  type: string
10616
10628
  nullable: true
10629
+ reason:
10630
+ "$ref": "#/components/schemas/ClaimReason"
10617
10631
  claim_line_items:
10618
10632
  type: array
10619
10633
  items:
@@ -10622,7 +10636,6 @@ components:
10622
10636
  - id
10623
10637
  - number
10624
10638
  - status
10625
- - claim_type
10626
10639
  - resolution
10627
10640
  - order_id
10628
10641
  - reason_id
@@ -12578,6 +12591,8 @@ components:
12578
12591
  canceled_at:
12579
12592
  type: string
12580
12593
  nullable: true
12594
+ reason:
12595
+ "$ref": "#/components/schemas/ReturnReason"
12581
12596
  return_line_items:
12582
12597
  type: array
12583
12598
  items:
@@ -12595,6 +12610,20 @@ components:
12595
12610
  - refunded_at
12596
12611
  - canceled_at
12597
12612
  x-typelizer: true
12613
+ ReturnReason:
12614
+ type: object
12615
+ properties:
12616
+ id:
12617
+ type: string
12618
+ name:
12619
+ type: string
12620
+ active:
12621
+ type: boolean
12622
+ required:
12623
+ - id
12624
+ - name
12625
+ - active
12626
+ x-typelizer: true
12598
12627
  State:
12599
12628
  type: object
12600
12629
  properties:
@@ -80,10 +80,6 @@ erDiagram
80
80
  integer refund_reason_id
81
81
  }
82
82
 
83
- LogEntry {
84
- text details
85
- }
86
-
87
83
  Order ||--o{ Payment : "has many"
88
84
  Order ||--o{ PaymentSession : "has many"
89
85
  Payment }o--|| PaymentMethod : "belongs to"
@@ -91,7 +87,6 @@ erDiagram
91
87
  Payment }o--o| PaymentSource : "source"
92
88
  Payment }o--o| StoreCredit : "source"
93
89
  Payment ||--o| PaymentSession : "linked via response_code"
94
- Payment ||--o{ LogEntry : "has many"
95
90
  Payment ||--o{ Refund : "has many"
96
91
  PaymentMethod ||--o{ PaymentSession : "has many"
97
92
  PaymentMethod ||--o{ PaymentSetupSession : "has many"
@@ -509,11 +504,7 @@ Each payment update also recalculates the order's `payment_state`:
509
504
  | `credit_owed` | This order has been paid for in excess of its total |
510
505
  | `paid` | This order has been paid for in full |
511
506
 
512
- > **WARNING:** You may want to keep tabs on the number of orders with a `payment_state` of `failed`. A sudden increase could indicate a problem with your payment gateway and most likely a serious problem affecting customer satisfaction. Check the latest `log_entries` for the most recent payments if this is happening.
513
-
514
- ### Log Entries
515
-
516
- Responses from payment gateways are stored as log entries for debugging purposes. These can be viewed in the Admin Panel on the payment detail page.
507
+ > **WARNING:** You may want to keep tabs on the number of orders with a `payment_state` of `failed`. A sudden increase could indicate a problem with your payment gateway and most likely a serious problem affecting customer satisfaction. Check your payment gateway's dashboard for the most recent transactions if this is happening.
517
508
 
518
509
  ## Payment Sources
519
510
 
@@ -344,6 +344,16 @@ Also note:
344
344
  - Localized number parsing still happens: `Spree::Price#amount=` runs `Spree::LocalizedNumber.parse`, so `set_price(currency, '1,599.99')` works as `price=` did.
345
345
  - The variant validation that inferred a missing price from the product's default variant is gone. Set prices explicitly (the product and variant factories already do).
346
346
 
347
+ ### `StateChange` and `LogEntry` are gone
348
+
349
+ `Spree::StateChange` and `Spree::LogEntry` are removed — the models, the `state_changes` associations on `Order`, `Payment` and `Fulfillment`, the `log_entries` associations on `Payment` and `Refund`, and everything that wrote to them. Both were write-only: nothing in Spree read the rows back, and the admin screens that displayed them are gone.
350
+
351
+ **Events are the audit trail now.** Instead of querying state-change rows, subscribe to the lifecycle events that already fire on every meaningful transition: `order.placed`, `order.canceled`, `payment.completed`, `payment.voided`, `fulfillment.ready`, `fulfillment.fulfilled`, `fulfillment.canceled`, `fulfillment.resumed`, and the rest. If you need a persistent history, write it from a subscriber.
352
+
353
+ **Gateway responses are no longer stored in your database.** `LogEntry` kept every gateway response as serialized YAML. For transaction forensics, use your payment provider's dashboard — `Payment#gateway_dashboard_payment_url` links straight to the transaction — or `Spree::PaymentSession`, which holds the gateway-side state for session-based providers.
354
+
355
+ The `spree_state_changes` and `spree_log_entries` tables are **not dropped until 6.1**, so your existing rows survive the upgrade. If you want the history long-term, export it before upgrading to 6.1.
356
+
347
357
  ## Deprecated in 6.0, removed in 6.1
348
358
 
349
359
  Every rename keeps the legacy name working for one release with a deprecation warning. The notable ones:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.147",
3
+ "version": "0.1.149",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",