@spree/docs 0.1.12 → 0.1.13
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/dist/api-reference/store-api/metadata.md +7 -4
- package/dist/api-reference/store.yaml +322 -460
- package/dist/developer/core-concepts/metafields.md +12 -8
- package/dist/developer/customization/dependencies.md +1 -1
- package/dist/developer/customization/metadata.md +26 -15
- package/dist/developer/storefront/nextjs/architecture.md +22 -18
- package/dist/developer/storefront/nextjs/customization.md +3 -3
- package/dist/developer/storefront/nextjs/quickstart.md +1 -1
- package/dist/developer/storefront/nextjs/spree-next-package.md +92 -206
- package/package.json +1 -1
|
@@ -148,13 +148,16 @@ Metadata is stored as a flat JSON object. You can use any keys and values:
|
|
|
148
148
|
|
|
149
149
|
## Metadata vs Metafields
|
|
150
150
|
|
|
151
|
+
Spree has two permanent, complementary systems for custom data — **metadata for machines, metafields for humans**.
|
|
152
|
+
|
|
151
153
|
| | Metadata | Metafields |
|
|
152
154
|
|-|----------|------------|
|
|
153
|
-
| **
|
|
155
|
+
| **Purpose** | Developer escape hatch — integration IDs, sync state | Merchant-defined structured attributes |
|
|
156
|
+
| **Schema** | Schemaless JSON — no definition required | Defined via MetafieldDefinitions (typed, validated) |
|
|
154
157
|
| **Validation** | None | Type-specific validation |
|
|
155
|
-
| **Visibility** | Write-only in Store API | Configurable (public
|
|
158
|
+
| **Visibility** | Write-only in Store API, readable in Admin API | Configurable (admin-only or public) |
|
|
156
159
|
| **Admin UI** | JSON preview | Dedicated form fields |
|
|
157
|
-
| **Best for** | Integration data, tracking, attribution | Product specs, custom
|
|
160
|
+
| **Best for** | Integration data, tracking, attribution, write-and-forget | Product specs, custom attributes, customer-facing data |
|
|
158
161
|
| **API access** | Write via Store API, read via Admin API | Read/write via both APIs |
|
|
159
162
|
|
|
160
|
-
For more details on metafields, see the [Metafields guide](../../developer/core-concepts/metafields.md).
|
|
163
|
+
Both systems are here to stay. For more details on metafields, see the [Metafields guide](../../developer/core-concepts/metafields.md).
|