docs: updated event reference (#1996)
* docs: updated event reference * added note about sales channels
This commit is contained in:
@@ -1454,7 +1454,7 @@ In one case, when the `/admin/products/{id}` endpoint is used to update the prod
|
||||
```js
|
||||
{
|
||||
id, //id of product
|
||||
field //an array of field names that were updated
|
||||
fields //an array of field names that were updated
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1681,6 +1681,111 @@ Object of the following format:
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Sales Channel Events
|
||||
|
||||
This section holds all events related to sales channels.
|
||||
|
||||
:::note
|
||||
|
||||
As of Medusa v1.3.5, Sales Channels are available but guarded by a feature flag. To use Sales Channels, add the following environment variable:
|
||||
|
||||
```bash
|
||||
MEDUSA_FF_SALES_CHANNELS=true
|
||||
```
|
||||
|
||||
Then, run the [migrations](../migrations.md#how-to-run-migrations).
|
||||
|
||||
:::
|
||||
|
||||
<table class="reference-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Event Name
|
||||
</th>
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<th>
|
||||
Event Data Payload
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`sales_channel.created`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Triggered when a sales channel is created.
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Object of the following format:
|
||||
|
||||
```js
|
||||
{
|
||||
id //string ID of sales channel
|
||||
}
|
||||
```
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`sales_channel.updated`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Triggered when a sales channel is updated
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Object of the following format:
|
||||
|
||||
```js
|
||||
{
|
||||
id, //string ID of sales channel
|
||||
}
|
||||
```
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`sales_channel.deleted`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Triggered when a sales channel is deleted.
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Object of the following format:
|
||||
|
||||
```js
|
||||
{
|
||||
id //string ID of sales channel
|
||||
}
|
||||
```
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Swap Events
|
||||
|
||||
This section holds all events related to swaps.
|
||||
@@ -1953,6 +2058,54 @@ Event Data Payload
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`user.created`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Triggered when a user is created.
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Object of the following format:
|
||||
|
||||
```js
|
||||
{
|
||||
id //string ID of user
|
||||
}
|
||||
```
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`user.updated`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Triggered when a user is updated.
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Object of the following format:
|
||||
|
||||
```js
|
||||
{
|
||||
id //string ID of user
|
||||
}
|
||||
```
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`user.password_reset`
|
||||
|
||||
</td>
|
||||
@@ -1972,6 +2125,30 @@ Object of the following format:
|
||||
}
|
||||
```
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`user.deleted`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Triggered when a user is deleted.
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Object of the following format:
|
||||
|
||||
```js
|
||||
{
|
||||
id //string ID of user
|
||||
}
|
||||
```
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user