Back to Medusa

Region Module Events Reference

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

2.14.23.1 KB
Original Source

import { TypeList } from "docs-ui"

Region Module Events Reference

This reference shows all the events emitted by the Medusa application related to the Region 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> [region.updated](#regionupdated) </Table.Cell> <Table.Cell> Emitted when regions are updated. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [region.created](#regioncreated) </Table.Cell> <Table.Cell> Emitted when regions are created. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [region.deleted](#regiondeleted) </Table.Cell> <Table.Cell> Emitted when regions are deleted. </Table.Cell> </Table.Row> </Table.Body> </Table>

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

Emitted when regions are updated.

Payload

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

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="2" headerProps={{ id: "regioncreated", children: (<>region.created</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="region.created" payload={\``ts { id, // The ID of the region } ````} />

Emitted when regions are created.

Payload

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

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="2" headerProps={{ id: "regiondeleted", children: (<>region.deleted</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="region.deleted" payload={\``ts { id, // The ID of the region } ````} />

Emitted when regions are deleted.

Payload

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

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.