docs: generate events reference (#12341)

* docs: generate events reference

* change link in navbar

* fix redirect
This commit is contained in:
Shahed Nasser
2025-05-01 19:39:53 +03:00
committed by GitHub
parent 332e46d1db
commit 70a99a2434
94 changed files with 31164 additions and 18109 deletions
@@ -0,0 +1,105 @@
---
slug: /references/customer/events
sidebar_label: Events Reference
---
import { TypeList } from "docs-ui"
# Customer Module Events Reference
This reference shows all the events emitted by the Medusa application related to the Customer Module. If you use the module outside the Medusa application, these events aren't emitted.
## Summary
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>
Event
</Table.HeaderCell>
<Table.HeaderCell>
Description
</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>
[customer.created](#customercreated)
</Table.Cell>
<Table.Cell>
Emitted when a customer is created.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[customer.updated](#customerupdated)
</Table.Cell>
<Table.Cell>
Emitted when a customer is updated.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[customer.deleted](#customerdeleted)
</Table.Cell>
<Table.Cell>
Emitted when a customer is deleted.
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>
## `customer.created`
Emitted when a customer is created.
### Payload
```ts
[{
id, // The ID of the customer
}]
```
### Workflows Emitting this Event
- [createCustomersWorkflow](/references/medusa-workflows/createCustomersWorkflow)
- [createCustomerAccountWorkflow](/references/medusa-workflows/createCustomerAccountWorkflow)
---
## `customer.updated`
Emitted when a customer is updated.
### Payload
```ts
[{
id, // The ID of the customer
}]
```
### Workflows Emitting this Event
- [updateCustomersWorkflow](/references/medusa-workflows/updateCustomersWorkflow)
---
## `customer.deleted`
Emitted when a customer is deleted.
### Payload
```ts
[{
id, // The ID of the customer
}]
```
### Workflows Emitting this Event
- [deleteCustomersWorkflow](/references/medusa-workflows/deleteCustomersWorkflow)
- [removeCustomerAccountWorkflow](/references/medusa-workflows/removeCustomerAccountWorkflow)