@mercurjs/docs 2.2.0-rc.0 → 2.2.0-rc.2

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.
Files changed (41) hide show
  1. package/content/learn/concepts.mdx +1 -1
  2. package/content/references/overview.mdx +10 -0
  3. package/content/references/panel-extension-api.mdx +337 -0
  4. package/content/references/workflows/cart/add-seller-shipping-method-to-cart.mdx +5 -1
  5. package/content/references/workflows/commission/batch-commission-rules.mdx +6 -2
  6. package/content/references/workflows/offer/batch-offer-inventory-items.mdx +6 -2
  7. package/content/references/workflows/offer/create-offers.mdx +3 -1
  8. package/content/references/workflows/offer/update-offers.mdx +3 -1
  9. package/content/references/workflows/order-group/get-order-groups-list.mdx +3 -1
  10. package/content/references/workflows/payout/process-payout-for-webhook.mdx +3 -1
  11. package/content/references/workflows/product/confirm-products.mdx +2 -0
  12. package/content/references/workflows/product/reject-product.mdx +2 -0
  13. package/content/references/workflows/product/request-product-change.mdx +2 -0
  14. package/content/references/workflows/seller/approve-seller.mdx +2 -0
  15. package/content/references/workflows/seller/suspend-seller.mdx +2 -0
  16. package/content/references/workflows/seller/terminate-seller.mdx +2 -0
  17. package/content/references/workflows/seller/unsuspend-seller.mdx +2 -0
  18. package/content/references/workflows/seller/unterminate-seller.mdx +2 -0
  19. package/content/resources/best-practices/api-routes.mdx +306 -0
  20. package/content/resources/best-practices/custom-fields.mdx +241 -0
  21. package/content/resources/best-practices/frontend.mdx +286 -0
  22. package/content/resources/best-practices/module-links.mdx +157 -0
  23. package/content/resources/best-practices/modules.mdx +144 -0
  24. package/content/resources/best-practices/overview.mdx +115 -0
  25. package/content/resources/best-practices/subscribers-and-jobs.mdx +133 -0
  26. package/content/resources/best-practices/types.mdx +120 -0
  27. package/content/resources/best-practices/workflows.mdx +173 -0
  28. package/content/resources/customization/custom-fields.mdx +5 -1
  29. package/content/resources/customization/extending-panels.mdx +170 -113
  30. package/content/resources/tutorials/add-a-widget.mdx +110 -0
  31. package/content/resources/tutorials/add-order-detail-button.mdx +113 -0
  32. package/content/resources/tutorials/custom-panel-page.mdx +2 -2
  33. package/content/resources/tutorials/customize-navigation.mdx +110 -0
  34. package/content/resources/tutorials/extend-forms-and-tables.mdx +188 -0
  35. package/content/resources/tutorials/extend-onboarding.mdx +253 -0
  36. package/content/resources/tutorials/import-export-products.mdx +3 -3
  37. package/content/resources/tutorials/store-setup-checklist.mdx +214 -0
  38. package/llms.txt +17 -3
  39. package/package.json +1 -1
  40. package/content/resources/tutorials/recompose-a-page.mdx +0 -129
  41. package/content/resources/tutorials/replace-panel-components.mdx +0 -116
@@ -77,7 +77,7 @@ The [Mercur CLI](/rc/tools/cli) (`@mercurjs/cli@rc`) manages your project — sc
77
77
 
78
78
  ## Dashboard SDK
79
79
 
80
- The [Dashboard SDK](/rc/tools/dashboard-sdk) (`@mercurjs/dashboard-sdk`) is a Vite plugin shared by the admin panel and vendor portal. It provides file-based routing, automatic navigation generation, component overrides, and i18n support.
80
+ The [Dashboard SDK](/rc/tools/dashboard-sdk) (`@mercurjs/dashboard-sdk`) is a Vite plugin shared by the admin panel and vendor portal. It provides file-based routing, automatic navigation generation, widget and custom-field extensions, and i18n support.
81
81
 
82
82
  ## API Client
83
83
 
@@ -58,6 +58,16 @@ Mercur extends the Medusa server with three route surfaces. Start with the conve
58
58
  </Card>
59
59
  </CardGroup>
60
60
 
61
+ ## Panel extension API
62
+
63
+ The file-based helpers for extending the admin and vendor panels without forking.
64
+
65
+ <CardGroup cols={1}>
66
+ <Card title="Panel Extension API" href="/rc/references/panel-extension-api">
67
+ <code>defineWidgetConfig</code>, <code>defineNavigationConfig</code>, <code>defineCustomFieldsConfig</code>, and <code>createFormHelper</code> — config shapes and the exact props passed to every component you supply.
68
+ </Card>
69
+ </CardGroup>
70
+
61
71
  ## Workflows and configuration
62
72
 
63
73
  <CardGroup cols={2}>
@@ -0,0 +1,337 @@
1
+ ---
2
+ title: "Panel Extension API"
3
+ description: "The file-based helpers for extending the admin and vendor panels — defineWidgetConfig, defineNavigationConfig, defineCustomFieldsConfig, createFormHelper — and the exact props passed to every component you supply."
4
+ ---
5
+
6
+ This is the technical contract for the panel extension API.
7
+ Where the [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables),
8
+ [Add a widget](/rc/resources/tutorials/add-a-widget), and
9
+ [Customize navigation](/rc/resources/tutorials/customize-navigation) tutorials
10
+ walk through *building* an extension, this page documents the exact config shape
11
+ of each helper and — most importantly — **the props each `component` you pass in
12
+ receives at render time**.
13
+
14
+ <Info>
15
+ **Separate apps, no `surface` field.** Admin (`@mercurjs/admin`, port 7000) and
16
+ vendor (`@mercurjs/vendor`, port 7001) are separate Vite apps. A file dropped
17
+ under a panel's `src/` targets *that* panel — the folder you author in *is* the
18
+ surface. The helpers are the same in both; import them from
19
+ `@mercurjs/dashboard-sdk` (config helpers) and `@mercurjs/dashboard-shared`
20
+ (`createFormHelper`).
21
+ </Info>
22
+
23
+ ## Typed targets (register once)
24
+
25
+ Zone ids, nav item ids, models, and built-in field ids are typed per panel from a
26
+ generated `extension-targets.d.ts`. Reference it once per host app so every
27
+ extension file type-checks with no per-file import:
28
+
29
+ ```typescript apps/vendor/src/extension-targets.d.ts
30
+ /// <reference types="@mercurjs/vendor/extension-targets" />
31
+ ```
32
+
33
+ ```typescript apps/admin-test/src/extension-targets.d.ts
34
+ /// <reference types="@mercurjs/admin/extension-targets" />
35
+ ```
36
+
37
+ A wrong `zone`, `model`, or nav `id` fails `tsc` (`bun run lint`) rather than
38
+ silently no-op'ing at runtime.
39
+
40
+ ---
41
+
42
+ ## `defineWidgetConfig`
43
+
44
+ A widget is a React component attached to a named zone on a built-in page. The
45
+ placement (`before | after | replace`) is the last segment of the zone id.
46
+
47
+ ```tsx apps/vendor/src/widgets/product-list-banner.tsx
48
+ import { defineWidgetConfig } from "@mercurjs/dashboard-sdk"
49
+
50
+ export const config = defineWidgetConfig({
51
+ zone: "product.list.before", // WidgetZoneId — <domain>.<view>[.<slot>].<before|after|replace>
52
+ })
53
+
54
+ export default ProductListBanner
55
+ ```
56
+
57
+ ### Config
58
+
59
+ | Field | Type | Description |
60
+ | ------ | ------------------------------- | --------------------------------------------------------------------------- |
61
+ | `zone` | `WidgetZoneId \| WidgetZoneId[]` | Target zone(s). Placement is the suffix. Multiple widgets stack in order. |
62
+ | `id` | `string` (optional) | Stable id; derived from the file path at build time when omitted. |
63
+
64
+ ### Component props
65
+
66
+ The widget component receives a single prop:
67
+
68
+ | Prop | Type | Description |
69
+ | ------ | --------- | ----------------------------------------------------------------------------------------- |
70
+ | `data` | `unknown` | The zone's contextual entity — e.g. the loaded product on a `product.detail.*` zone. Undefined on list/public zones that have no single entity. |
71
+
72
+ ```tsx
73
+ const ProductDetailNote = ({ data }: { data?: HttpTypes.AdminProduct }) => (
74
+ <Container>{data?.title}</Container>
75
+ )
76
+ ```
77
+
78
+ <Note>
79
+ The public `login.logo` / `login.before` / `login.after` zones render before
80
+ authentication and receive no `data`.
81
+ </Note>
82
+
83
+ ---
84
+
85
+ ## `defineNavigationConfig`
86
+
87
+ Reorder, hide, relabel, or re-parent **built-in** sidebar items. Single
88
+ host-owned file — blocks cannot contribute nav overrides.
89
+
90
+ ```ts apps/vendor/src/_navigation.ts
91
+ import { defineNavigationConfig } from "@mercurjs/dashboard-sdk"
92
+
93
+ export default defineNavigationConfig({
94
+ items: [
95
+ { id: "orders", rank: 0 },
96
+ { id: "price-lists", hidden: true },
97
+ { id: "payouts", label: "settlements" },
98
+ { id: "categories", nested: null, rank: 1 },
99
+ { id: "campaigns", nested: "orders" },
100
+ ],
101
+ })
102
+ ```
103
+
104
+ ### `NavItemOverride`
105
+
106
+ | Field | Type | Description |
107
+ | -------- | -------------------------- | ------------------------------------------------------------------------------ |
108
+ | `id` | `NavItemId` | Built-in item to override (top-level or nested). Typed against the panel registry. |
109
+ | `rank` | `number` (optional) | Order within the item's parent (or among top-level items). |
110
+ | `hidden` | `boolean` (optional) | Remove from the sidebar (route may still be directly reachable). |
111
+ | `label` | `string` (optional) | i18n key or literal replacing the item's label. |
112
+ | `icon` | `ComponentType` (optional) | Icon component replacing the item's icon (from `@medusajs/icons`). |
113
+ | `nested` | `NavParentId \| null` (optional) | Re-parent under a built-in parent id; `null` promotes a nested item to top level. |
114
+
115
+ There is no `component` prop here — navigation overrides reshape existing items
116
+ only.
117
+
118
+ ---
119
+
120
+ ## `defineCustomFieldsConfig`
121
+
122
+ The model-scoped surface. One file per model adds form fields, section displays,
123
+ section actions, and list-table columns. Import
124
+ `createFormHelper` from `@mercurjs/dashboard-shared` to turn a Zod schema into an
125
+ input type + validation.
126
+
127
+ ```tsx apps/vendor/src/custom-fields/product.tsx
128
+ import { defineCustomFieldsConfig } from "@mercurjs/dashboard-sdk"
129
+ import { createFormHelper } from "@mercurjs/dashboard-shared"
130
+
131
+ type ProductWithMeta = { metadata?: Record<string, unknown> }
132
+ const form = createFormHelper<ProductWithMeta>()
133
+
134
+ export default defineCustomFieldsConfig({
135
+ model: "product",
136
+ link: "brand", // string | string[] — module link(s) fetched alongside the entity
137
+ forms: [/* ... */],
138
+ displays: [/* ... */],
139
+ list: {/* ... */},
140
+ })
141
+ ```
142
+
143
+ ### Top-level config
144
+
145
+ | Field | Type | Description |
146
+ | ---------- | ------------------------ | ------------------------------------------------------------------------ |
147
+ | `model` | `CustomFieldModel` | Target model (start with `"product"`). Typed against `CustomFieldsRegistry`. |
148
+ | `link` | `string \| string[]` | Module link(s) fetched alongside the entity; their data is available to columns and displays via the `+link.*` fetch. |
149
+ | `forms` | `CustomFormEntry[]` | Fields injected into built-in create/edit/onboarding forms. |
150
+ | `displays` | `CustomDisplayEntry[]` | Field replace/remove/add + `ActionMenu` actions on detail sections. |
151
+ | `list` | `CustomListExtension` | Columns, bulk actions, filters, view defaults on the model's list table. |
152
+
153
+ ### `forms[]` — form fields
154
+
155
+ ```tsx
156
+ forms: [
157
+ {
158
+ zone: "edit", // CustomFormZone — "create" | "edit" | "organize" | "attributes" | "onboarding"
159
+ tab: "general", // TabbedForm tab id, or wizard step id for zone: "onboarding"
160
+ fields: {
161
+ erp_id: form.define({
162
+ validation: form.string().nullish(), // Zod → input type + validation
163
+ defaultValue: (data) => (data?.metadata?.erp_id as string) ?? "",
164
+ label: "ERP ID",
165
+ description: "External system identifier",
166
+ placeholder: "ERP-000",
167
+ component: MyErpInput, // optional custom render
168
+ }),
169
+ },
170
+ },
171
+ ]
172
+ ```
173
+
174
+ Each field is a `CustomFormField`:
175
+
176
+ | Field | Type | Description |
177
+ | -------------- | ---------------------------------------- | ----------------------------------------------------------------- |
178
+ | `validation` | Zod schema | Drives both the default input type and validation. |
179
+ | `defaultValue` | `unknown \| ((data) => unknown)` | Static value or a resolver from the loaded entity. |
180
+ | `label` | `string` (optional) | Field label. |
181
+ | `description` | `string` (optional) | Help text below the input. |
182
+ | `placeholder` | `string` (optional) | Input placeholder. |
183
+ | `component` | `ComponentType` (optional) | Custom render; falls back to a default input for the Zod type. |
184
+
185
+ <Warning>
186
+ **Form-field `component` receives no props.** It is rendered as `<Component />`
187
+ inside the field's `additional_data.<field>` React Hook Form context. Read and
188
+ write the value with RHF's `useFormContext()` / `useController()`, and render
189
+ through the mandated `Form.Field → Form.Item` chain — do not use a raw
190
+ `Controller`. Values live in form state under `additional_data`; in the MVP,
191
+ `product` custom fields persist onto the product's `metadata`.
192
+ </Warning>
193
+
194
+ ### `displays[]` — detail sections
195
+
196
+ ```tsx
197
+ displays: [
198
+ {
199
+ zone: "general", // CustomFieldsRegistry displayZones — an existing detail section id
200
+ fields: [
201
+ { id: "erp_id", component: ErpRow }, // ADD (unknown id → new read-only row)
202
+ { id: "status", component: BrandedStatusBadge }, // REPLACE a built-in field's render
203
+ { id: "created_by", component: null }, // REMOVE a built-in field
204
+ ],
205
+ actions: [
206
+ { rank: 0, component: SyncErpAction }, // add to the section's ActionMenu
207
+ ],
208
+ },
209
+ ]
210
+ ```
211
+
212
+ `fields[]` is `CustomDisplayField`:
213
+
214
+ | Field | Type | Description |
215
+ | ----------- | --------------------------------------- | -------------------------------------------------------------------------------------- |
216
+ | `id` | `displayFieldIds \| (string & {})` | Built-in field id (autocompletes) → replace/remove; any other string → add a new row. |
217
+ | `component` | `ComponentType<{ data? }> \| null` | Render component, or `null` to remove a built-in field. |
218
+
219
+ **Display field `component` props:**
220
+
221
+ | Prop | Type | Description |
222
+ | ------ | --------- | ---------------------------------- |
223
+ | `data` | `unknown` | The loaded detail entity, **including any `link`ed module data**. If the config declares `link: "brand"`, read it off `data.brand` here. |
224
+
225
+ ```tsx
226
+ // with `link: "brand"` on the config, the linked module data rides on `data`
227
+ const BrandRow = ({ data }: { data?: { brand?: { name: string } } }) => (
228
+ <Text>{data?.brand?.name}</Text>
229
+ )
230
+ ```
231
+
232
+ `actions[]` is `SectionAction` (the same shape as list `bulkActions`):
233
+
234
+ | Field | Type | Description |
235
+ | ----------- | ------------------------------- | ----------------------------------------------------------------- |
236
+ | `rank` | `number` (optional) | Position within the section's `ActionMenu`. |
237
+ | `component` | `ComponentType<{ data? }>` | Owns its own label, icon, group placement, and `onClick`. |
238
+
239
+ **Section-action `component` props:**
240
+
241
+ | Prop | Type | Description |
242
+ | ------ | --------- | ----------------------------------------------------------------------- |
243
+ | `data` | `unknown` | The loaded detail entity, **including any `link`ed module data** (e.g. `data.brand`). |
244
+
245
+ ### `list` — list table
246
+
247
+ ```tsx
248
+ list: {
249
+ columns: [
250
+ { id: "title", component: ({ value }) => <strong>{value}</strong> }, // override a cell
251
+ { id: "brand_name", header: "Brand", component: ({ row }) => row.brand?.name }, // add (from link)
252
+ ],
253
+ bulkActions: [{ rank: 0, component: ArchiveBulkAction }],
254
+ filters: [/* add / remove list filters */],
255
+ viewDefaults: {
256
+ columnVisibility: { created_at: false }, // hide a column
257
+ columnOrder: ["title", "sku", "erp_id"],
258
+ },
259
+ }
260
+ ```
261
+
262
+ `columns[]` is `CustomColumn`:
263
+
264
+ | Field | Type | Description |
265
+ | ----------- | ------------------------------------------ | -------------------------------------------------------- |
266
+ | `id` | `string` | Column id — matches a built-in column to override, or adds a new one. |
267
+ | `header` | `string` (optional) | Column header text (for added columns). |
268
+ | `component` | `ComponentType<{ row?, value? }>` (optional) | Cell renderer. |
269
+
270
+ **Column `component` props:**
271
+
272
+ | Prop | Type | Description |
273
+ | ------- | --------- | -------------------------------------------------------- |
274
+ | `row` | `unknown` | The full row entity (including `link`ed module data). |
275
+ | `value` | `unknown` | The cell value for this column id, when derivable. |
276
+
277
+ `bulkActions[]` is `SectionAction` (`{ rank?, component }`, component props `{ data? }`).
278
+
279
+ <Note>
280
+ **Bulk-action rendering is deferred in the MVP.** `bulkActions` are accepted and
281
+ surfaced by the config but not yet mounted into the list toolbar.
282
+ </Note>
283
+
284
+ <Warning>
285
+ **Vendor product list is field-constrained.** The vendor `product` list must use
286
+ the curated fields from `useProductTableQuery` — the SDK merges `link` fetches
287
+ with the `+`/`-` convention, never bare fields, or the list 500s. You never
288
+ hand-write the field list; the `link` declaration drives it.
289
+ </Warning>
290
+
291
+ ---
292
+
293
+ ## `createFormHelper`
294
+
295
+ `createFormHelper<T>()` returns Medusa's zod surface for describing field
296
+ validation and value types:
297
+
298
+ ```ts
299
+ const form = createFormHelper<ProductWithMeta>()
300
+
301
+ form.define({ validation, defaultValue?, label?, description?, placeholder?, component? })
302
+ form.string() / form.number() / form.boolean() / form.date()
303
+ form.array() / form.object() / form.null() / form.nullable() / form.coerce
304
+ ```
305
+
306
+ The generated registry types the **target** (which zone/tab/field ids exist); the
307
+ Zod `validation` types the **value**. The two compose — codegen types the address,
308
+ Zod types the payload.
309
+
310
+ ---
311
+
312
+ ## Persistence
313
+
314
+ <Warning>
315
+ **The MVP is a UI surface only.** Custom fields render, validate, and display
316
+ through the built-in forms/sections/tables — there is no generic core-side write
317
+ path. For `product`, values are submitted under `additional_data` and persisted
318
+ onto `metadata`. To store data for other models, wire your own route/workflow or
319
+ use the backend [Custom Fields module](/rc/resources/customization/custom-fields).
320
+ </Warning>
321
+
322
+ ## Related
323
+
324
+ <CardGroup cols={2}>
325
+ <Card title="Extend forms and tables" href="/rc/resources/tutorials/extend-forms-and-tables">
326
+ Step-by-step build with `defineCustomFieldsConfig`.
327
+ </Card>
328
+ <Card title="Add a widget" href="/rc/resources/tutorials/add-a-widget">
329
+ Inject a component into a zone.
330
+ </Card>
331
+ <Card title="Customize navigation" href="/rc/resources/tutorials/customize-navigation">
332
+ Reorder and hide sidebar items.
333
+ </Card>
334
+ <Card title="Custom Fields module" href="/rc/references/modules/custom-fields">
335
+ The backend storage layer.
336
+ </Card>
337
+ </CardGroup>
@@ -21,12 +21,16 @@ await addSellerShippingMethodToCartWorkflow(container).run({
21
21
  ## Input
22
22
 
23
23
  <ParamField body="cart_id" type="string" required>The cart to add shipping methods to.</ParamField>
24
- <ParamField body="options" type="object[]" required>Shipping options to add as methods.
24
+
25
+ <ParamField body="options" type="object[]" required>
26
+ Shipping options to add as methods.
27
+
25
28
  <Expandable title="properties">
26
29
  <ParamField body="id" type="string" required>The shipping option ID; must have a calculated price for the cart.</ParamField>
27
30
  <ParamField body="data" type="object">Custom method data validated by the fulfillment provider.</ParamField>
28
31
  </Expandable>
29
32
  </ParamField>
33
+
30
34
  <ParamField body="additional_data" type="object">Custom data passed through to the workflow hooks.</ParamField>
31
35
 
32
36
  ## Result
@@ -23,13 +23,17 @@ const { result } = await batchCommissionRulesWorkflow(container).run({
23
23
  ## Input
24
24
 
25
25
  <ParamField body="commission_rate_id" type="string" required>The commission rate the rules belong to.</ParamField>
26
- <ParamField body="create" type="object[]">Rules to create.
26
+ <ParamField body="create" type="object[]">
27
+ Rules to create.
28
+
27
29
  <Expandable title="properties">
28
30
  <ParamField body="reference" type="string" required>Entity type the rule targets (e.g. `seller`, `product_category`, `product_type`).</ParamField>
29
31
  <ParamField body="reference_id" type="string" required>ID of the referenced entity.</ParamField>
30
32
  </Expandable>
31
33
  </ParamField>
32
- <ParamField body="update" type="object[]">Rules to update.
34
+ <ParamField body="update" type="object[]">
35
+ Rules to update.
36
+
33
37
  <Expandable title="properties">
34
38
  <ParamField body="id" type="string" required>The rule to update.</ParamField>
35
39
  <ParamField body="reference" type="string">New reference type.</ParamField>
@@ -23,13 +23,17 @@ const { result } = await batchOfferInventoryItemsWorkflow(container).run({
23
23
  ## Input
24
24
 
25
25
  <ParamField body="offer_id" type="string" required>The offer whose inventory links are managed; fails if not found.</ParamField>
26
- <ParamField body="create" type="object[]">Links to create; the inventory items must exist and not appear in `update`/`delete`.
26
+ <ParamField body="create" type="object[]">
27
+ Links to create; the inventory items must exist and not appear in `update`/`delete`.
28
+
27
29
  <Expandable title="properties">
28
30
  <ParamField body="inventory_item_id" type="string" required>The inventory item to link.</ParamField>
29
31
  <ParamField body="required_quantity" type="number">Units consumed per offer unit; defaults to `1`.</ParamField>
30
32
  </Expandable>
31
33
  </ParamField>
32
- <ParamField body="update" type="object[]">Existing links to update.
34
+ <ParamField body="update" type="object[]">
35
+ Existing links to update.
36
+
33
37
  <Expandable title="properties">
34
38
  <ParamField body="inventory_item_id" type="string" required>The linked inventory item.</ParamField>
35
39
  <ParamField body="required_quantity" type="number" required>New units consumed per offer unit.</ParamField>
@@ -31,7 +31,9 @@ const { result } = await createOffersWorkflow(container).run({
31
31
 
32
32
  ## Input
33
33
 
34
- <ParamField body="offers" type="object[]" required>Offers to create.
34
+ <ParamField body="offers" type="object[]" required>
35
+ Offers to create.
36
+
35
37
  <Expandable title="properties">
36
38
  <ParamField body="seller_id" type="string" required>The seller that owns the offer.</ParamField>
37
39
  <ParamField body="created_by" type="string" required>ID of the member creating the offer.</ParamField>
@@ -24,7 +24,9 @@ const { result } = await updateOffersWorkflow(container).run({
24
24
 
25
25
  ## Input
26
26
 
27
- <ParamField body="offers" type="object[]" required>Offer updates, keyed by ID.
27
+ <ParamField body="offers" type="object[]" required>
28
+ Offer updates, keyed by ID.
29
+
28
30
  <Expandable title="properties">
29
31
  <ParamField body="id" type="string" required>The offer to update; fails if not found.</ParamField>
30
32
  <ParamField body="sku" type="string">New SKU.</ParamField>
@@ -21,7 +21,9 @@ const { result } = await getOrderGroupsListWorkflow(container).run({
21
21
  ## Input
22
22
 
23
23
  <ParamField body="fields" type="string[]" required>Fields to retrieve; merged with the defaults needed for status aggregation.</ParamField>
24
- <ParamField body="variables" type="object">Query filters plus pagination.
24
+ <ParamField body="variables" type="object">
25
+ Query filters plus pagination.
26
+
25
27
  <Expandable title="properties">
26
28
  <ParamField body="skip" type="number">Number of groups to skip.</ParamField>
27
29
  <ParamField body="take" type="number">Number of groups to return.</ParamField>
@@ -21,7 +21,9 @@ await processPayoutForWebhookWorkflow(container).run({
21
21
  ## Input
22
22
 
23
23
  <ParamField body="action" type="string" required>One of `account.activated`, `account.restricted`, `account.rejected`, `payout.processing`, `payout.paid`, `payout.failed`, `payout.canceled`, `not_supported`.</ParamField>
24
- <ParamField body="data" type="object">Event target; nothing happens when omitted.
24
+ <ParamField body="data" type="object">
25
+ Event target; nothing happens when omitted.
26
+
25
27
  <Expandable title="properties">
26
28
  <ParamField body="id" type="string" required>The ID of the payout account (for `account.*` actions) or the payout (for `payout.*` actions).</ParamField>
27
29
  </Expandable>
@@ -33,6 +33,8 @@ await confirmProductsWorkflow(container).run({
33
33
  Operator-only note stored on the audit change and included in the emitted event.
34
34
  </ParamField>
35
35
 
36
+ <ParamField body="additional_data" type="object">Custom data passed through to the workflow hooks.</ParamField>
37
+
36
38
  ## Result
37
39
 
38
40
  <ResponseField name="result" type="void">
@@ -33,6 +33,8 @@ await rejectProductWorkflow(container).run({
33
33
  Actor id recorded on the audit trail entry.
34
34
  </ParamField>
35
35
 
36
+ <ParamField body="additional_data" type="object">Custom data passed through to the workflow hooks.</ParamField>
37
+
36
38
  ## Result
37
39
 
38
40
  <ResponseField name="result" type="void">
@@ -33,6 +33,8 @@ await requestProductChangeWorkflow(container).run({
33
33
  Actor id recorded on the audit trail entry.
34
34
  </ParamField>
35
35
 
36
+ <ParamField body="additional_data" type="object">Custom data passed through to the workflow hooks.</ParamField>
37
+
36
38
  ## Result
37
39
 
38
40
  <ResponseField name="result" type="void">
@@ -19,6 +19,8 @@ await approveSellerWorkflow(container).run({
19
19
 
20
20
  <ParamField body="seller_id" type="string" required>Id of the seller to approve.</ParamField>
21
21
 
22
+ <ParamField body="additional_data" type="object">Custom data passed through to the workflow hooks.</ParamField>
23
+
22
24
  ## Result
23
25
 
24
26
  <ResponseField name="result" type="void">Nothing is returned.</ResponseField>
@@ -20,6 +20,8 @@ await suspendSellerWorkflow(container).run({
20
20
  <ParamField body="seller_id" type="string" required>Id of the seller to suspend.</ParamField>
21
21
  <ParamField body="reason" type="string">Reason stored in `status_reason`.</ParamField>
22
22
 
23
+ <ParamField body="additional_data" type="object">Custom data passed through to the workflow hooks.</ParamField>
24
+
23
25
  ## Result
24
26
 
25
27
  <ResponseField name="result" type="void">Nothing is returned.</ResponseField>
@@ -20,6 +20,8 @@ await terminateSellerWorkflow(container).run({
20
20
  <ParamField body="seller_id" type="string" required>Id of the seller to terminate.</ParamField>
21
21
  <ParamField body="reason" type="string">Reason stored in `status_reason`.</ParamField>
22
22
 
23
+ <ParamField body="additional_data" type="object">Custom data passed through to the workflow hooks.</ParamField>
24
+
23
25
  ## Result
24
26
 
25
27
  <ResponseField name="result" type="void">Nothing is returned.</ResponseField>
@@ -19,6 +19,8 @@ await unsuspendSellerWorkflow(container).run({
19
19
 
20
20
  <ParamField body="seller_id" type="string" required>Id of the suspended seller.</ParamField>
21
21
 
22
+ <ParamField body="additional_data" type="object">Custom data passed through to the workflow hooks.</ParamField>
23
+
22
24
  ## Result
23
25
 
24
26
  <ResponseField name="result" type="void">Nothing is returned.</ResponseField>
@@ -19,6 +19,8 @@ await unterminateSellerWorkflow(container).run({
19
19
 
20
20
  <ParamField body="seller_id" type="string" required>Id of the terminated seller.</ParamField>
21
21
 
22
+ <ParamField body="additional_data" type="object">Custom data passed through to the workflow hooks.</ParamField>
23
+
22
24
  ## Result
23
25
 
24
26
  <ResponseField name="result" type="void">Nothing is returned.</ResponseField>