@spree/docs 0.1.236 → 0.1.238
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/admin-api/authentication.md +45 -0
- package/dist/api-reference/store.yaml +130 -130
- package/dist/api-reference/webhooks-events.md +1 -1
- package/dist/developer/contributing/developing-spree.md +2 -2
- package/dist/developer/core-concepts/metafields.md +1 -1
- package/dist/developer/core-concepts/store-credits-gift-cards.md +3 -5
- package/dist/developer/core-concepts/stores.md +1 -1
- package/dist/developer/customization/configuration.md +8 -8
- package/dist/developer/customization/dependencies.md +9 -9
- package/dist/developer/customization/metadata.md +3 -3
- package/dist/developer/customization/quickstart.md +7 -7
- package/dist/developer/customization/validations.md +1 -1
- package/dist/developer/dashboard/customization/backend.md +7 -4
- package/dist/developer/dashboard/customization/navigation.md +5 -3
- package/dist/developer/dashboard/customization/permissions.md +3 -1
- package/dist/developer/dashboard/customization/quickstart.md +3 -4
- package/dist/developer/dashboard/customization/routes.md +7 -6
- package/dist/developer/dashboard/customization/slots.md +7 -6
- package/dist/developer/dashboard/customization/tables.md +4 -2
- package/dist/developer/dashboard/customization/translations.md +4 -2
- package/dist/developer/dashboard/overview.md +5 -4
- package/dist/developer/dashboard/public-api.md +16 -2
- package/dist/developer/dashboard/recipes/attribute-end-to-end.md +2 -3
- package/dist/developer/dashboard/recipes/custom-form-field.md +12 -6
- package/dist/developer/dashboard/recipes/page-action-button.md +9 -8
- package/dist/developer/dashboard/recipes/sidebar-widget.md +11 -5
- package/dist/developer/dashboard/slots-catalog.md +1 -1
- package/dist/developer/how-to/build-a-marketplace.md +3 -3
- package/dist/developer/how-to/custom-digital-asset-provider.md +1 -1
- package/dist/developer/how-to/custom-document-numbers.md +3 -3
- package/dist/developer/how-to/custom-promotion.md +1 -1
- package/dist/developer/how-to/sell-digital-products.md +1 -1
- package/dist/developer/providers/dam.md +3 -1
- package/dist/developer/providers/erp.md +3 -1
- package/dist/developer/providers/pim.md +3 -1
- package/dist/developer/providers/sso.md +1 -1
- package/dist/developer/tutorial/dashboard.md +307 -0
- package/dist/developer/tutorial/events.md +66 -6
- package/dist/developer/tutorial/introduction.md +42 -13
- package/dist/developer/tutorial/model-and-api.md +187 -0
- package/dist/developer/tutorial/storefront.md +123 -6
- package/dist/developer/tutorial/testing.md +163 -7
- package/dist/developer/upgrades/5.6-to-6.0.md +16 -0
- package/package.json +1 -1
- package/dist/developer/tutorial/admin-api.md +0 -13
- package/dist/developer/tutorial/dashboard-plugin.md +0 -14
- package/dist/developer/tutorial/model.md +0 -13
- package/dist/developer/tutorial/store-api.md +0 -13
|
@@ -177,3 +177,48 @@ If the caller lacks permission for a specific action, the API returns `403 Forbi
|
|
|
177
177
|
| JWT token | `Authorization: Bearer <token>` | Interactive admin sessions; SPA | CanCanCan abilities |
|
|
178
178
|
|
|
179
179
|
> **NOTE:** If both headers are present, the JWT token wins: CanCanCan applies and scopes are ignored. This lets you use `sk_xxx` to bootstrap a session and then issue per-user JWTs for individual admin actions.
|
|
180
|
+
|
|
181
|
+
## Who a write is attributed to
|
|
182
|
+
|
|
183
|
+
Records that remember who acted on them — an order's `canceler`, `approver`
|
|
184
|
+
and `created_by`, a refund's `refunder`, the opener of a return, exchange or
|
|
185
|
+
claim, the receiver of a stock delivery — name whichever credential made the
|
|
186
|
+
call. A JWT request records the signed-in admin; a secret-key request records
|
|
187
|
+
the key itself, so a warehouse connector's write is attributed to the
|
|
188
|
+
connector rather than to nobody.
|
|
189
|
+
|
|
190
|
+
Each of these fields comes as a pair. The `*_id` is a prefixed id, `adm_…`
|
|
191
|
+
for a person and `key_…` for a key, and the `*_type` beside it says which:
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"canceler_id": "key_8QrN3xLq",
|
|
196
|
+
"canceler_type": "api_key",
|
|
197
|
+
"canceled_at": "2026-09-16T11:04:22Z"
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
`*_type` is `admin_user` or `api_key` today, and an extension may register
|
|
202
|
+
further kinds, so treat the value as an open list rather than a closed set.
|
|
203
|
+
Expanding the association gives the same three facts in one object — `id`,
|
|
204
|
+
`type` and a `label` fit to show in a timeline:
|
|
205
|
+
|
|
206
|
+
**SDK:**
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
const order = await client.orders.retrieve('or_m3Rp9wXz', { expand: ['canceler'] })
|
|
210
|
+
|
|
211
|
+
order.canceler // { id: 'key_8QrN3xLq', type: 'api_key', label: 'WMS connector' }
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**cURL:**
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
curl "https://example.com/api/v3/admin/orders/or_m3Rp9wXz?expand=canceler" \
|
|
218
|
+
-H "X-Spree-Api-Key: sk_xxx"
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
> **NOTE:** Attribution answers *who*, not *through which surface*. A store upgrading from
|
|
223
|
+
> an earlier release should run `rake spree:upgrade:backfill_actor_types` so
|
|
224
|
+
> existing records name the kind of actor they already held.
|