www/apps/resources/references/module_events/module_events.User/page.mdx
import { TypeList } from "docs-ui"
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.
<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.
{
id, // The ID of the invite
}
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.
{
id, // The ID of the invite
}
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.
{
id, // The ID of the invite
}
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.
{
id, // The ID of the invite
}
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: "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.
{
id, // The ID of the user
}
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.
{
id, // The ID of the user
}
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.
{
id, // The ID of the user
}
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.