From cc79f21c911756a9a36b27603844db1e078a0376 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Wed, 27 Nov 2024 11:57:11 +0200 Subject: [PATCH] docs: update list of events (#10308) --- .../resources/app/events-reference/page.mdx | 304 +++++++++++++++++- 1 file changed, 297 insertions(+), 7 deletions(-) diff --git a/www/apps/resources/app/events-reference/page.mdx b/www/apps/resources/app/events-reference/page.mdx index 29e910d74c..5fa7fbd75c 100644 --- a/www/apps/resources/app/events-reference/page.mdx +++ b/www/apps/resources/app/events-reference/page.mdx @@ -6,13 +6,7 @@ export const metadata = { # {metadata.title} -This documentation page includes the list of all events emitted by Medusa's workflows. - - - -Events are still in development and may change. - - +This documentation page includes the list of all events emitted by [Medusa's workflows](../medusa-workflows-reference/page.mdx). ## Auth Events @@ -52,6 +46,85 @@ Events are still in development and may change. --- +## Cart Events + + + + + Event Name + Description + Payload + + + + + + + `cart.created` + + + + + Emitted when a cart is created. + + + + +```ts blockStyle="inline" +{ + id, // The ID of the cart +} +``` + + + + + + + `cart.updated` + + + + + Emitted when a cart is updated. This includes updates to its items, shipping methods, or information. + + + + +```ts blockStyle="inline" +{ + id, // The ID of the customer +} +``` + + + + + + + `cart.region_updated` + + + + + Emitted when the region of a cart is updated. + + + + +```ts blockStyle="inline" +{ + id, // The ID of the customer +} +``` + + + + +
+ +--- + ## Customer Events @@ -259,6 +332,223 @@ Events are still in development and may change. { id, // The ID of the order } +``` + + + + + + + `order.canceled` + + + + + Emitted when an order is canceled. + + + + +```ts blockStyle="inline" +{ + id, // The ID of the order +} +``` + + + + + + + `order.completed` + + + + + Emitted when orders are completed. + + + + +```ts blockStyle="inline" +[{ + id, // The ID of the order +}] +``` + + + + + + + `order.archived` + + + + + Emitted when orders are archived. + + + + +```ts blockStyle="inline" +[{ + id, // The ID of the order +}] +``` + + + + + + + `order.fulfillment_created` + + + + + Emitted when a fulfillment is created for an order. + + + + +```ts blockStyle="inline" +{ + order_id, // The ID of the order + fulfillment_id, // The ID of the fulfillment +} +``` + + + + + + + `order.fulfillment_canceled` + + + + + Emitted when a fulfillment is canceled for an order. + + + + +```ts blockStyle="inline" +{ + order_id, // The ID of the order + fulfillment_id, // The ID of the fulfillment +} +``` + + + + + + + `order.return_requested` + + + + + Emitted when a return is requested. + + + + +```ts blockStyle="inline" +{ + order_id, // The ID of the order + return_id, // The ID of the return +} +``` + + + + + + + `order.return_received` + + + + + Emitted when a return is received. + + + + +```ts blockStyle="inline" +{ + order_id, // The ID of the order + return_id, // The ID of the return +} +``` + + + + + + + `order.claim_created` + + + + + Emitted when a claim is created. + + + + +```ts blockStyle="inline" +{ + order_id, // The ID of the order + claim_id, // The ID of the claim +} +``` + + + + + + + `order.exchange_created` + + + + + Emitted when an exchange is created. + + + + +```ts blockStyle="inline" +{ + order_id, // The ID of the order + exchange_id, // The ID of the exchange +} +``` + + + + + + + `order.transfer_requested` + + + + + Emitted when an order transfer is requested. This is available from [Medusa v2.0.5+](https://github.com/medusajs/medusa/releases/tag/v2.0.5). + + + + +```ts blockStyle="inline" +{ + order_id, // The ID of the order + exchange_id, // The ID of the exchange +} ```