Back to Medusa

User Module Events Reference

www/apps/resources/references/module_events/module_events.User/page.mdx

2.14.27.6 KB
Original Source

import { TypeList } from "docs-ui"

User Module Events Reference

This reference shows all the events emitted by the Medusa application related to the User Module. If you use the module outside the Medusa application, these events aren't emitted.

Invite Events

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> [invite.accepted](#inviteaccepted) </Table.Cell> <Table.Cell> Emitted when an invite is accepted. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [invite.created](#invitecreated) </Table.Cell> <Table.Cell> Emitted when invites are created. You can listen to this event to send an email to the invited users, for example. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [invite.deleted](#invitedeleted) </Table.Cell> <Table.Cell> Emitted when invites are deleted. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [invite.resent](#inviteresent) </Table.Cell> <Table.Cell> Emitted when invites should be resent because their token was refreshed. You can listen to this event to send an email to the invited users, for example. </Table.Cell> </Table.Row> </Table.Body> </Table>

<EventHeader headerLvl="3" headerProps={{ id: "inviteaccepted", children: (<>invite.accepted</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="invite.accepted" payload={\``ts { id, // The ID of the invite } ````} />

Emitted when an invite is accepted.

Payload

ts
{
  id, // The ID of the invite
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "invitecreated", children: (<>invite.created</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="invite.created" payload={\``ts { id, // The ID of the invite } ````} />

Emitted when invites are created. You can listen to this event to send an email to the invited users, for example.

Payload

ts
{
  id, // The ID of the invite
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "invitedeleted", children: (<>invite.deleted</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="invite.deleted" payload={\``ts { id, // The ID of the invite } ````} />

Emitted when invites are deleted.

Payload

ts
{
  id, // The ID of the invite
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "inviteresent", children: (<>invite.resent</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="invite.resent" payload={\``ts { id, // The ID of the invite } ````} />

Emitted when invites should be resent because their token was refreshed. You can listen to this event to send an email to the invited users, for example.

Payload

ts
{
  id, // The ID of the invite
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


User Events

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> [user.created](#usercreated) </Table.Cell> <Table.Cell> Emitted when users are created. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [user.updated](#userupdated) </Table.Cell> <Table.Cell> Emitted when users are updated. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [user.deleted](#userdeleted) </Table.Cell> <Table.Cell> Emitted when users are deleted. </Table.Cell> </Table.Row> </Table.Body> </Table>

<EventHeader headerLvl="3" headerProps={{ id: "usercreated", children: (<>user.created</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="user.created" payload={\``ts { id, // The ID of the user } ````} />

Emitted when users are created.

Payload

ts
{
  id, // The ID of the user
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "userupdated", children: (<>user.updated</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="user.updated" payload={\``ts { id, // The ID of the user } ````} />

Emitted when users are updated.

Payload

ts
{
  id, // The ID of the user
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "userdeleted", children: (<>user.deleted</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="user.deleted" payload={\``ts { id, // The ID of the user } ````} />

Emitted when users are deleted.

Payload

ts
{
  id, // The ID of the user
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.