From fcfd35a15794d692f2384f33052d908b223ab9a9 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 27 Jun 2025 11:56:36 +0300 Subject: [PATCH] docs: sort events in reference alphabetically (#12845) --- www/apps/book/public/llms-full.txt | 1102 +++++----- www/apps/resources/generated/edit-dates.mjs | 8 +- .../module_events.Order/page.mdx | 268 +-- .../module_events.Product/page.mdx | 698 +++---- .../module_events/module_events.User/page.mdx | 238 +-- .../references/modules/events/page.mdx | 1822 ++++++++--------- .../src/resources/helpers/events-listing.ts | 29 +- 7 files changed, 2084 insertions(+), 2081 deletions(-) diff --git a/www/apps/book/public/llms-full.txt b/www/apps/book/public/llms-full.txt index f51235f275..b5acae8ef7 100644 --- a/www/apps/book/public/llms-full.txt +++ b/www/apps/book/public/llms-full.txt @@ -14804,7 +14804,7 @@ export default async function helloWorldLoader({ ## Validate Module Options -If you expect a certain option and want to throw an error if it's not provided or isn't valid, it's recommended to perform the validation in a loader. The module's service is only instantiated when it's used, whereas the loader runs the when the Medusa application starts. +If you expect a certain option and want to throw an error if it's not provided or isn't valid, it's recommended to perform the validation in a loader. The module's service is only instantiated when it's used, whereas the loader runs when the Medusa application starts. So, by performing the validation in the loader, you ensure you can throw an error at an early point, rather than when the module is used. @@ -35120,6 +35120,38 @@ Connection to Redis in module 'workflow-engine-redis' established This documentation page includes the list of all events emitted by [Medusa's workflows](https://docs.medusajs.com/resources/medusa-workflows-reference/index.html.md). +## Auth Events + +### Summary + +|Event|Description| +|---|---| +|auth.password\_reset|Emitted when a reset password token is generated. You can listen to this event +to send a reset password email to the user or customer, for example.| + +### auth.password\_reset + +Emitted when a reset password token is generated. You can listen to this event +to send a reset password email to the user or customer, for example. + +#### Payload + +```ts +{ + entity_id, // The identifier of the user or customer. For example, an email address. + actor_type, // The type of actor. For example, "customer", "user", or custom. + token, // The generated token. +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [generateResetPasswordTokenWorkflow](https://docs.medusajs.com/references/medusa-workflows/generateResetPasswordTokenWorkflow/index.html.md) + +*** + ## Cart Events ### Summary @@ -35289,6 +35321,226 @@ The following workflows emit this event when they're executed. These workflows a *** +## Fulfillment Events + +### Summary + +|Event|Description| +|---|---| +|shipment.created|Emitted when a shipment is created for an order.| +|delivery.created|Emitted when a fulfillment is marked as delivered.| + +### shipment.created + +Emitted when a shipment is created for an order. + +#### Payload + +```ts +{ + id, // the ID of the shipment + no_notification, // (boolean) whether to notify the customer +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createOrderShipmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderShipmentWorkflow/index.html.md) + +*** + +### delivery.created + +Emitted when a fulfillment is marked as delivered. + +#### Payload + +```ts +{ + id, // the ID of the fulfillment +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [markOrderFulfillmentAsDeliveredWorkflow](https://docs.medusajs.com/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow/index.html.md) + +*** + +## Invite Events + +### Summary + +|Event|Description| +|---|---| +|invite.accepted|Emitted when an invite is accepted.| +|invite.created|Emitted when invites are created. You can listen to this event +to send an email to the invited users, for example.| +|invite.deleted|Emitted when invites are deleted.| +|invite.resent|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.| + +### invite.accepted + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [acceptInviteWorkflow](https://docs.medusajs.com/references/medusa-workflows/acceptInviteWorkflow/index.html.md) + +*** + +### invite.created + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInvitesWorkflow/index.html.md) + +*** + +### invite.deleted + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInvitesWorkflow/index.html.md) + +*** + +### invite.resent + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [refreshInviteTokensWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshInviteTokensWorkflow/index.html.md) + +*** + +## Order Edit Events + +### Summary + +|Event|Description| +|---|---| +|order-edit.requested|Emitted when an order edit is requested.| +|order-edit.confirmed|Emitted when an order edit request is confirmed.| +|order-edit.canceled|Emitted when an order edit request is canceled.| + +### order-edit.requested + +Emitted when an order edit is requested. + +#### Payload + +```ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [requestOrderEditRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/requestOrderEditRequestWorkflow/index.html.md) + +*** + +### order-edit.confirmed + +Emitted when an order edit request is confirmed. + +#### Payload + +```ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [confirmOrderEditRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmOrderEditRequestWorkflow/index.html.md) + +*** + +### order-edit.canceled + +Emitted when an order edit request is canceled. + +#### Payload + +```ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [cancelBeginOrderEditWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderEditWorkflow/index.html.md) + +*** + ## Order Events ### Summary @@ -35567,26 +35819,24 @@ The following workflows emit this event when they're executed. These workflows a *** -## Order Edit Events +## Payment Events ### Summary |Event|Description| |---|---| -|order-edit.requested|Emitted when an order edit is requested.| -|order-edit.confirmed|Emitted when an order edit request is confirmed.| -|order-edit.canceled|Emitted when an order edit request is canceled.| +|payment.captured|Emitted when a payment is captured.| +|payment.refunded|Emitted when a payment is refunded.| -### order-edit.requested +### payment.captured -Emitted when an order edit is requested. +Emitted when a payment is captured. #### Payload ```ts { - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + id, // the ID of the payment } ``` @@ -35594,20 +35844,21 @@ Emitted when an order edit is requested. 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [requestOrderEditRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/requestOrderEditRequestWorkflow/index.html.md) +- [capturePaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/capturePaymentWorkflow/index.html.md) +- [processPaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/processPaymentWorkflow/index.html.md) +- [markPaymentCollectionAsPaid](https://docs.medusajs.com/references/medusa-workflows/markPaymentCollectionAsPaid/index.html.md) *** -### order-edit.confirmed +### payment.refunded -Emitted when an order edit request is confirmed. +Emitted when a payment is refunded. #### Payload ```ts { - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + id, // the ID of the payment } ``` @@ -35615,300 +35866,7 @@ Emitted when an order edit request is confirmed. 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [confirmOrderEditRequestWorkflow](https://docs.medusajs.com/references/medusa-workflows/confirmOrderEditRequestWorkflow/index.html.md) - -*** - -### order-edit.canceled - -Emitted when an order edit request is canceled. - -#### Payload - -```ts -{ - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order -} -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [cancelBeginOrderEditWorkflow](https://docs.medusajs.com/references/medusa-workflows/cancelBeginOrderEditWorkflow/index.html.md) - -*** - -## User Events - -### Summary - -|Event|Description| -|---|---| -|user.created|Emitted when users are created.| -|user.updated|Emitted when users are updated.| -|user.deleted|Emitted when users are deleted.| - -### user.created - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/createUsersWorkflow/index.html.md) -- [createUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/createUserAccountWorkflow/index.html.md) -- [acceptInviteWorkflow](https://docs.medusajs.com/references/medusa-workflows/acceptInviteWorkflow/index.html.md) - -*** - -### user.updated - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateUsersWorkflow/index.html.md) - -*** - -### user.deleted - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteUsersWorkflow/index.html.md) -- [removeUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeUserAccountWorkflow/index.html.md) - -*** - -## Invite Events - -### Summary - -|Event|Description| -|---|---| -|invite.accepted|Emitted when an invite is accepted.| -|invite.created|Emitted when invites are created. You can listen to this event -to send an email to the invited users, for example.| -|invite.deleted|Emitted when invites are deleted.| -|invite.resent|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.| - -### invite.accepted - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [acceptInviteWorkflow](https://docs.medusajs.com/references/medusa-workflows/acceptInviteWorkflow/index.html.md) - -*** - -### invite.created - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createInvitesWorkflow/index.html.md) - -*** - -### invite.deleted - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteInvitesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteInvitesWorkflow/index.html.md) - -*** - -### invite.resent - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [refreshInviteTokensWorkflow](https://docs.medusajs.com/references/medusa-workflows/refreshInviteTokensWorkflow/index.html.md) - -*** - -## Auth Events - -### Summary - -|Event|Description| -|---|---| -|auth.password\_reset|Emitted when a reset password token is generated. You can listen to this event -to send a reset password email to the user or customer, for example.| - -### auth.password\_reset - -Emitted when a reset password token is generated. You can listen to this event -to send a reset password email to the user or customer, for example. - -#### Payload - -```ts -{ - entity_id, // The identifier of the user or customer. For example, an email address. - actor_type, // The type of actor. For example, "customer", "user", or custom. - token, // The generated token. -} -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [generateResetPasswordTokenWorkflow](https://docs.medusajs.com/references/medusa-workflows/generateResetPasswordTokenWorkflow/index.html.md) - -*** - -## Sales Channel Events - -### Summary - -|Event|Description| -|---|---| -|sales-channel.created|Emitted when sales channels are created.| -|sales-channel.updated|Emitted when sales channels are updated.| -|sales-channel.deleted|Emitted when sales channels are deleted.| - -### sales-channel.created - -Emitted when sales channels are created. - -#### Payload - -```ts -[{ - id, // The ID of the sales channel -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createSalesChannelsWorkflow/index.html.md) - -*** - -### sales-channel.updated - -Emitted when sales channels are updated. - -#### Payload - -```ts -[{ - id, // The ID of the sales channel -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateSalesChannelsWorkflow/index.html.md) - -*** - -### sales-channel.deleted - -Emitted when sales channels are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the sales channel -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteSalesChannelsWorkflow/index.html.md) +- [refundPaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/refundPaymentWorkflow/index.html.md) *** @@ -36052,6 +36010,216 @@ The following workflows emit this event when they're executed. These workflows a *** +## Product Option Events + +### Summary + +|Event|Description| +|---|---| +|product-option.updated|Emitted when product options are updated.| +|product-option.created|Emitted when product options are created.| +|product-option.deleted|Emitted when product options are deleted.| + +### product-option.updated + +Emitted when product options are updated. + +#### Payload + +```ts +[{ + id, // The ID of the product option +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [updateProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductOptionsWorkflow/index.html.md) + +*** + +### product-option.created + +Emitted when product options are created. + +#### Payload + +```ts +[{ + id, // The ID of the product option +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductOptionsWorkflow/index.html.md) + +*** + +### product-option.deleted + +Emitted when product options are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the product option +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductOptionsWorkflow/index.html.md) + +*** + +## Product Tag Events + +### Summary + +|Event|Description| +|---|---| +|product-tag.updated|Emitted when product tags are updated.| +|product-tag.created|Emitted when product tags are created.| +|product-tag.deleted|Emitted when product tags are deleted.| + +### product-tag.updated + +Emitted when product tags are updated. + +#### Payload + +```ts +[{ + id, // The ID of the product tag +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [updateProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductTagsWorkflow/index.html.md) + +*** + +### product-tag.created + +Emitted when product tags are created. + +#### Payload + +```ts +[{ + id, // The ID of the product tag +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTagsWorkflow/index.html.md) + +*** + +### product-tag.deleted + +Emitted when product tags are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the product tag +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductTagsWorkflow/index.html.md) + +*** + +## Product Type Events + +### Summary + +|Event|Description| +|---|---| +|product-type.updated|Emitted when product types are updated.| +|product-type.created|Emitted when product types are created.| +|product-type.deleted|Emitted when product types are deleted.| + +### product-type.updated + +Emitted when product types are updated. + +#### Payload + +```ts +[{ + id, // The ID of the product type +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [updateProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductTypesWorkflow/index.html.md) + +*** + +### product-type.created + +Emitted when product types are created. + +#### Payload + +```ts +[{ + id, // The ID of the product type +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTypesWorkflow/index.html.md) + +*** + +### product-type.deleted + +Emitted when product types are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the product type +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductTypesWorkflow/index.html.md) + +*** + ## Product Variant Events ### Summary @@ -36204,216 +36372,6 @@ The following workflows emit this event when they're executed. These workflows a *** -## Product Type Events - -### Summary - -|Event|Description| -|---|---| -|product-type.updated|Emitted when product types are updated.| -|product-type.created|Emitted when product types are created.| -|product-type.deleted|Emitted when product types are deleted.| - -### product-type.updated - -Emitted when product types are updated. - -#### Payload - -```ts -[{ - id, // The ID of the product type -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductTypesWorkflow/index.html.md) - -*** - -### product-type.created - -Emitted when product types are created. - -#### Payload - -```ts -[{ - id, // The ID of the product type -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTypesWorkflow/index.html.md) - -*** - -### product-type.deleted - -Emitted when product types are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the product type -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteProductTypesWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductTypesWorkflow/index.html.md) - -*** - -## Product Tag Events - -### Summary - -|Event|Description| -|---|---| -|product-tag.updated|Emitted when product tags are updated.| -|product-tag.created|Emitted when product tags are created.| -|product-tag.deleted|Emitted when product tags are deleted.| - -### product-tag.updated - -Emitted when product tags are updated. - -#### Payload - -```ts -[{ - id, // The ID of the product tag -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductTagsWorkflow/index.html.md) - -*** - -### product-tag.created - -Emitted when product tags are created. - -#### Payload - -```ts -[{ - id, // The ID of the product tag -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductTagsWorkflow/index.html.md) - -*** - -### product-tag.deleted - -Emitted when product tags are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the product tag -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteProductTagsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductTagsWorkflow/index.html.md) - -*** - -## Product Option Events - -### Summary - -|Event|Description| -|---|---| -|product-option.updated|Emitted when product options are updated.| -|product-option.created|Emitted when product options are created.| -|product-option.deleted|Emitted when product options are deleted.| - -### product-option.updated - -Emitted when product options are updated. - -#### Payload - -```ts -[{ - id, // The ID of the product option -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateProductOptionsWorkflow/index.html.md) - -*** - -### product-option.created - -Emitted when product options are created. - -#### Payload - -```ts -[{ - id, // The ID of the product option -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createProductOptionsWorkflow/index.html.md) - -*** - -### product-option.deleted - -Emitted when product options are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the product option -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteProductOptionsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteProductOptionsWorkflow/index.html.md) - -*** - ## Region Events ### Summary @@ -36484,104 +36442,146 @@ The following workflows emit this event when they're executed. These workflows a *** -## Fulfillment Events +## Sales Channel Events ### Summary |Event|Description| |---|---| -|shipment.created|Emitted when a shipment is created for an order.| -|delivery.created|Emitted when a fulfillment is marked as delivered.| +|sales-channel.created|Emitted when sales channels are created.| +|sales-channel.updated|Emitted when sales channels are updated.| +|sales-channel.deleted|Emitted when sales channels are deleted.| -### shipment.created +### sales-channel.created -Emitted when a shipment is created for an order. +Emitted when sales channels are created. #### Payload ```ts -{ - id, // the ID of the shipment - no_notification, // (boolean) whether to notify the customer -} +[{ + id, // The ID of the sales channel +}] ``` #### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [createOrderShipmentWorkflow](https://docs.medusajs.com/references/medusa-workflows/createOrderShipmentWorkflow/index.html.md) +- [createSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/createSalesChannelsWorkflow/index.html.md) *** -### delivery.created +### sales-channel.updated -Emitted when a fulfillment is marked as delivered. +Emitted when sales channels are updated. #### Payload ```ts -{ - id, // the ID of the fulfillment -} +[{ + id, // The ID of the sales channel +}] ``` #### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [markOrderFulfillmentAsDeliveredWorkflow](https://docs.medusajs.com/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow/index.html.md) +- [updateSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateSalesChannelsWorkflow/index.html.md) *** -## Payment Events Events +### sales-channel.deleted + +Emitted when sales channels are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the sales channel +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteSalesChannelsWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteSalesChannelsWorkflow/index.html.md) + +*** + +## User Events ### Summary |Event|Description| |---|---| -|payment.captured|Emitted when a payment is captured.| -|payment.refunded|Emitted when a payment is refunded.| +|user.created|Emitted when users are created.| +|user.updated|Emitted when users are updated.| +|user.deleted|Emitted when users are deleted.| -### payment.captured +### user.created -Emitted when a payment is captured. +Emitted when users are created. #### Payload ```ts -{ - id, // the ID of the payment -} +[{ + 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [capturePaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/capturePaymentWorkflow/index.html.md) -- [processPaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/processPaymentWorkflow/index.html.md) -- [markPaymentCollectionAsPaid](https://docs.medusajs.com/references/medusa-workflows/markPaymentCollectionAsPaid/index.html.md) +- [createUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/createUsersWorkflow/index.html.md) +- [createUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/createUserAccountWorkflow/index.html.md) +- [acceptInviteWorkflow](https://docs.medusajs.com/references/medusa-workflows/acceptInviteWorkflow/index.html.md) *** -### payment.refunded +### user.updated -Emitted when a payment is refunded. +Emitted when users are updated. #### Payload ```ts -{ - id, // the ID of the payment -} +[{ + 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [refundPaymentWorkflow](https://docs.medusajs.com/references/medusa-workflows/refundPaymentWorkflow/index.html.md) +- [updateUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/updateUsersWorkflow/index.html.md) + +*** + +### user.deleted + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteUsersWorkflow](https://docs.medusajs.com/references/medusa-workflows/deleteUsersWorkflow/index.html.md) +- [removeUserAccountWorkflow](https://docs.medusajs.com/references/medusa-workflows/removeUserAccountWorkflow/index.html.md) # build Command - Medusa CLI Reference diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index a31dd54486..4044157d76 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -6198,16 +6198,16 @@ export const generatedEditDates = { "app/commerce-modules/product/guides/variant-inventory/page.mdx": "2025-04-25T14:22:42.329Z", "app/troubleshooting/validation-error/page.mdx": "2025-04-25T14:14:57.568Z", "app/integrations/guides/contentful/page.mdx": "2025-06-26T11:55:43.353Z", - "references/modules/events/page.mdx": "2025-06-05T19:05:53.162Z", + "references/modules/events/page.mdx": "2025-06-27T07:31:07.646Z", "references/module_events/module_events.Auth/page.mdx": "2025-05-20T07:51:40.956Z", "references/module_events/module_events.Cart/page.mdx": "2025-05-20T07:51:40.956Z", "references/module_events/module_events.Customer/page.mdx": "2025-05-20T07:51:40.956Z", "references/module_events/module_events.Fulfillment/page.mdx": "2025-05-20T07:51:40.956Z", - "references/module_events/module_events.Order/page.mdx": "2025-06-05T19:05:53.210Z", - "references/module_events/module_events.Product/page.mdx": "2025-05-20T07:51:40.957Z", + "references/module_events/module_events.Order/page.mdx": "2025-06-27T07:31:07.670Z", + "references/module_events/module_events.Product/page.mdx": "2025-06-27T07:31:07.672Z", "references/module_events/module_events.Region/page.mdx": "2025-05-20T07:51:40.957Z", "references/module_events/module_events.Sales_Channel/page.mdx": "2025-05-20T07:51:40.957Z", - "references/module_events/module_events.User/page.mdx": "2025-05-20T07:51:40.957Z", + "references/module_events/module_events.User/page.mdx": "2025-06-27T07:31:07.671Z", "references/modules/module_events/page.mdx": "2025-06-05T19:05:53.207Z", "app/troubleshooting/medusa-admin/build-error/page.mdx": "2025-05-20T07:51:40.724Z", "references/events/Auth/variables/events.Auth.AuthWorkflowEvents/page.mdx": "2025-05-20T07:51:40.894Z", diff --git a/www/apps/resources/references/module_events/module_events.Order/page.mdx b/www/apps/resources/references/module_events/module_events.Order/page.mdx index d014bd1cb4..1e158f76d0 100644 --- a/www/apps/resources/references/module_events/module_events.Order/page.mdx +++ b/www/apps/resources/references/module_events/module_events.Order/page.mdx @@ -10,7 +10,140 @@ import { TypeList } from "docs-ui" This reference shows all the events emitted by the Medusa application related to the Order Module. If you use the module outside the Medusa application, these events aren't emitted. -## Order Events +## Order Edit Events + +### Summary + + + + + +Event + + +Description + + + + + + +[order-edit.requested](#order-editrequested) +v2.8.0 + + +Emitted when an order edit is requested. + + + + +[order-edit.confirmed](#order-editconfirmed) +v2.8.0 + + +Emitted when an order edit request is confirmed. + + + + +[order-edit.canceled](#order-editcanceled) +v2.8.0 + + +Emitted when an order edit request is canceled. + + + +
+ +order-edit.requested + +v2.8.0 +), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.requested" payload={`\`\`\`ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +\`\`\``} /> + +Emitted when an order edit is requested. + +#### Payload + +```ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [requestOrderEditRequestWorkflow](/references/medusa-workflows/requestOrderEditRequestWorkflow) + +--- + +order-edit.confirmed + +v2.8.0 +), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.confirmed" payload={`\`\`\`ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +\`\`\``} /> + +Emitted when an order edit request is confirmed. + +#### Payload + +```ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [confirmOrderEditRequestWorkflow](/references/medusa-workflows/confirmOrderEditRequestWorkflow) + +--- + +order-edit.canceled + +v2.8.0 +), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.canceled" payload={`\`\`\`ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +\`\`\``} /> + +Emitted when an order edit request is canceled. + +#### Payload + +```ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [cancelBeginOrderEditWorkflow](/references/medusa-workflows/cancelBeginOrderEditWorkflow) + +--- + +## Order Events ### Summary @@ -438,136 +571,3 @@ another customer. 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - [requestOrderTransferWorkflow](/references/medusa-workflows/requestOrderTransferWorkflow) - ---- - -## Order Edit Events - -### Summary - - - - - -Event - - -Description - - - - - - -[order-edit.requested](#order-editrequested) -v2.8.0 - - -Emitted when an order edit is requested. - - - - -[order-edit.confirmed](#order-editconfirmed) -v2.8.0 - - -Emitted when an order edit request is confirmed. - - - - -[order-edit.canceled](#order-editcanceled) -v2.8.0 - - -Emitted when an order edit request is canceled. - - - -
- -order-edit.requested - -v2.8.0 -), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.requested" payload={`\`\`\`ts -{ - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order -} -\`\`\``} /> - -Emitted when an order edit is requested. - -#### Payload - -```ts -{ - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order -} -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [requestOrderEditRequestWorkflow](/references/medusa-workflows/requestOrderEditRequestWorkflow) - ---- - -order-edit.confirmed - -v2.8.0 -), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.confirmed" payload={`\`\`\`ts -{ - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order -} -\`\`\``} /> - -Emitted when an order edit request is confirmed. - -#### Payload - -```ts -{ - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order -} -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [confirmOrderEditRequestWorkflow](/references/medusa-workflows/confirmOrderEditRequestWorkflow) - ---- - -order-edit.canceled - -v2.8.0 -), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.canceled" payload={`\`\`\`ts -{ - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order -} -\`\`\``} /> - -Emitted when an order edit request is canceled. - -#### Payload - -```ts -{ - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order -} -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [cancelBeginOrderEditWorkflow](/references/medusa-workflows/cancelBeginOrderEditWorkflow) diff --git a/www/apps/resources/references/module_events/module_events.Product/page.mdx b/www/apps/resources/references/module_events/module_events.Product/page.mdx index 51b07c89b5..fb88ccc61d 100644 --- a/www/apps/resources/references/module_events/module_events.Product/page.mdx +++ b/www/apps/resources/references/module_events/module_events.Product/page.mdx @@ -10,7 +10,7 @@ import { TypeList } from "docs-ui" This reference shows all the events emitted by the Medusa application related to the Product Module. If you use the module outside the Medusa application, these events aren't emitted. -## Product Category Events +## Product Category Events ### Summary @@ -125,7 +125,7 @@ The following workflows emit this event when they're executed. These workflows a --- -## Product Collection Events +## Product Collection Events ### Summary @@ -240,7 +240,352 @@ The following workflows emit this event when they're executed. These workflows a --- -## Product Variant Events +## Product Option Events + +### Summary + + + + + +Event + + +Description + + + + + + +[product-option.updated](#product-optionupdated) + + +Emitted when product options are updated. + + + + +[product-option.created](#product-optioncreated) + + +Emitted when product options are created. + + + + +[product-option.deleted](#product-optiondeleted) + + +Emitted when product options are deleted. + + + +
+ +product-option.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.updated" payload={`\`\`\`ts +[{ + id, // The ID of the product option +}] +\`\`\``} /> + +Emitted when product options are updated. + +#### Payload + +```ts +[{ + id, // The ID of the product option +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [updateProductOptionsWorkflow](/references/medusa-workflows/updateProductOptionsWorkflow) + +--- + +product-option.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.created" payload={`\`\`\`ts +[{ + id, // The ID of the product option +}] +\`\`\``} /> + +Emitted when product options are created. + +#### Payload + +```ts +[{ + id, // The ID of the product option +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createProductOptionsWorkflow](/references/medusa-workflows/createProductOptionsWorkflow) + +--- + +product-option.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.deleted" payload={`\`\`\`ts +[{ + id, // The ID of the product option +}] +\`\`\``} /> + +Emitted when product options are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the product option +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteProductOptionsWorkflow](/references/medusa-workflows/deleteProductOptionsWorkflow) + +--- + +## Product Tag Events + +### Summary + + + + + +Event + + +Description + + + + + + +[product-tag.updated](#product-tagupdated) + + +Emitted when product tags are updated. + + + + +[product-tag.created](#product-tagcreated) + + +Emitted when product tags are created. + + + + +[product-tag.deleted](#product-tagdeleted) + + +Emitted when product tags are deleted. + + + +
+ +product-tag.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.updated" payload={`\`\`\`ts +[{ + id, // The ID of the product tag +}] +\`\`\``} /> + +Emitted when product tags are updated. + +#### Payload + +```ts +[{ + id, // The ID of the product tag +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [updateProductTagsWorkflow](/references/medusa-workflows/updateProductTagsWorkflow) + +--- + +product-tag.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.created" payload={`\`\`\`ts +[{ + id, // The ID of the product tag +}] +\`\`\``} /> + +Emitted when product tags are created. + +#### Payload + +```ts +[{ + id, // The ID of the product tag +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createProductTagsWorkflow](/references/medusa-workflows/createProductTagsWorkflow) + +--- + +product-tag.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.deleted" payload={`\`\`\`ts +[{ + id, // The ID of the product tag +}] +\`\`\``} /> + +Emitted when product tags are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the product tag +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteProductTagsWorkflow](/references/medusa-workflows/deleteProductTagsWorkflow) + +--- + +## Product Type Events + +### Summary + + + + + +Event + + +Description + + + + + + +[product-type.updated](#product-typeupdated) + + +Emitted when product types are updated. + + + + +[product-type.created](#product-typecreated) + + +Emitted when product types are created. + + + + +[product-type.deleted](#product-typedeleted) + + +Emitted when product types are deleted. + + + +
+ +product-type.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.updated" payload={`\`\`\`ts +[{ + id, // The ID of the product type +}] +\`\`\``} /> + +Emitted when product types are updated. + +#### Payload + +```ts +[{ + id, // The ID of the product type +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [updateProductTypesWorkflow](/references/medusa-workflows/updateProductTypesWorkflow) + +--- + +product-type.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.created" payload={`\`\`\`ts +[{ + id, // The ID of the product type +}] +\`\`\``} /> + +Emitted when product types are created. + +#### Payload + +```ts +[{ + id, // The ID of the product type +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createProductTypesWorkflow](/references/medusa-workflows/createProductTypesWorkflow) + +--- + +product-type.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.deleted" payload={`\`\`\`ts +[{ + id, // The ID of the product type +}] +\`\`\``} /> + +Emitted when product types are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the product type +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteProductTypesWorkflow](/references/medusa-workflows/deleteProductTypesWorkflow) + +--- + +## Product Variant Events ### Summary @@ -361,7 +706,7 @@ The following workflows emit this event when they're executed. These workflows a --- -## Product Events +## Product Events ### Summary @@ -479,348 +824,3 @@ The following workflows emit this event when they're executed. These workflows a - [deleteProductsWorkflow](/references/medusa-workflows/deleteProductsWorkflow) - [batchProductsWorkflow](/references/medusa-workflows/batchProductsWorkflow) - [importProductsWorkflow](/references/medusa-workflows/importProductsWorkflow) - ---- - -## Product Type Events - -### Summary - - - - - -Event - - -Description - - - - - - -[product-type.updated](#product-typeupdated) - - -Emitted when product types are updated. - - - - -[product-type.created](#product-typecreated) - - -Emitted when product types are created. - - - - -[product-type.deleted](#product-typedeleted) - - -Emitted when product types are deleted. - - - -
- -product-type.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.updated" payload={`\`\`\`ts -[{ - id, // The ID of the product type -}] -\`\`\``} /> - -Emitted when product types are updated. - -#### Payload - -```ts -[{ - id, // The ID of the product type -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateProductTypesWorkflow](/references/medusa-workflows/updateProductTypesWorkflow) - ---- - -product-type.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.created" payload={`\`\`\`ts -[{ - id, // The ID of the product type -}] -\`\`\``} /> - -Emitted when product types are created. - -#### Payload - -```ts -[{ - id, // The ID of the product type -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createProductTypesWorkflow](/references/medusa-workflows/createProductTypesWorkflow) - ---- - -product-type.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.deleted" payload={`\`\`\`ts -[{ - id, // The ID of the product type -}] -\`\`\``} /> - -Emitted when product types are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the product type -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteProductTypesWorkflow](/references/medusa-workflows/deleteProductTypesWorkflow) - ---- - -## Product Tag Events - -### Summary - - - - - -Event - - -Description - - - - - - -[product-tag.updated](#product-tagupdated) - - -Emitted when product tags are updated. - - - - -[product-tag.created](#product-tagcreated) - - -Emitted when product tags are created. - - - - -[product-tag.deleted](#product-tagdeleted) - - -Emitted when product tags are deleted. - - - -
- -product-tag.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.updated" payload={`\`\`\`ts -[{ - id, // The ID of the product tag -}] -\`\`\``} /> - -Emitted when product tags are updated. - -#### Payload - -```ts -[{ - id, // The ID of the product tag -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateProductTagsWorkflow](/references/medusa-workflows/updateProductTagsWorkflow) - ---- - -product-tag.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.created" payload={`\`\`\`ts -[{ - id, // The ID of the product tag -}] -\`\`\``} /> - -Emitted when product tags are created. - -#### Payload - -```ts -[{ - id, // The ID of the product tag -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createProductTagsWorkflow](/references/medusa-workflows/createProductTagsWorkflow) - ---- - -product-tag.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.deleted" payload={`\`\`\`ts -[{ - id, // The ID of the product tag -}] -\`\`\``} /> - -Emitted when product tags are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the product tag -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteProductTagsWorkflow](/references/medusa-workflows/deleteProductTagsWorkflow) - ---- - -## Product Option Events - -### Summary - - - - - -Event - - -Description - - - - - - -[product-option.updated](#product-optionupdated) - - -Emitted when product options are updated. - - - - -[product-option.created](#product-optioncreated) - - -Emitted when product options are created. - - - - -[product-option.deleted](#product-optiondeleted) - - -Emitted when product options are deleted. - - - -
- -product-option.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.updated" payload={`\`\`\`ts -[{ - id, // The ID of the product option -}] -\`\`\``} /> - -Emitted when product options are updated. - -#### Payload - -```ts -[{ - id, // The ID of the product option -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateProductOptionsWorkflow](/references/medusa-workflows/updateProductOptionsWorkflow) - ---- - -product-option.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.created" payload={`\`\`\`ts -[{ - id, // The ID of the product option -}] -\`\`\``} /> - -Emitted when product options are created. - -#### Payload - -```ts -[{ - id, // The ID of the product option -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createProductOptionsWorkflow](/references/medusa-workflows/createProductOptionsWorkflow) - ---- - -product-option.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.deleted" payload={`\`\`\`ts -[{ - id, // The ID of the product option -}] -\`\`\``} /> - -Emitted when product options are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the product option -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteProductOptionsWorkflow](/references/medusa-workflows/deleteProductOptionsWorkflow) diff --git a/www/apps/resources/references/module_events/module_events.User/page.mdx b/www/apps/resources/references/module_events/module_events.User/page.mdx index cca6ae8afc..ade850c610 100644 --- a/www/apps/resources/references/module_events/module_events.User/page.mdx +++ b/www/apps/resources/references/module_events/module_events.User/page.mdx @@ -10,125 +10,7 @@ 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. -## User Events - -### Summary - - - - - -Event - - -Description - - - - - - -[user.created](#usercreated) - - -Emitted when users are created. - - - - -[user.updated](#userupdated) - - -Emitted when users are updated. - - - - -[user.deleted](#userdeleted) - - -Emitted when users are deleted. - - - -
- -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createUsersWorkflow](/references/medusa-workflows/createUsersWorkflow) -- [createUserAccountWorkflow](/references/medusa-workflows/createUserAccountWorkflow) -- [acceptInviteWorkflow](/references/medusa-workflows/acceptInviteWorkflow) - ---- - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateUsersWorkflow](/references/medusa-workflows/updateUsersWorkflow) - ---- - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteUsersWorkflow](/references/medusa-workflows/deleteUsersWorkflow) -- [removeUserAccountWorkflow](/references/medusa-workflows/removeUserAccountWorkflow) - ---- - -## Invite Events +## Invite Events ### Summary @@ -278,3 +160,121 @@ for example. 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - [refreshInviteTokensWorkflow](/references/medusa-workflows/refreshInviteTokensWorkflow) + +--- + +## User Events + +### Summary + + + + + +Event + + +Description + + + + + + +[user.created](#usercreated) + + +Emitted when users are created. + + + + +[user.updated](#userupdated) + + +Emitted when users are updated. + + + + +[user.deleted](#userdeleted) + + +Emitted when users are deleted. + + + +
+ +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createUsersWorkflow](/references/medusa-workflows/createUsersWorkflow) +- [createUserAccountWorkflow](/references/medusa-workflows/createUserAccountWorkflow) +- [acceptInviteWorkflow](/references/medusa-workflows/acceptInviteWorkflow) + +--- + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [updateUsersWorkflow](/references/medusa-workflows/updateUsersWorkflow) + +--- + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteUsersWorkflow](/references/medusa-workflows/deleteUsersWorkflow) +- [removeUserAccountWorkflow](/references/medusa-workflows/removeUserAccountWorkflow) diff --git a/www/apps/resources/references/modules/events/page.mdx b/www/apps/resources/references/modules/events/page.mdx index a856f43ce8..b65f07038c 100644 --- a/www/apps/resources/references/modules/events/page.mdx +++ b/www/apps/resources/references/modules/events/page.mdx @@ -10,7 +10,64 @@ import { TypeList } from "docs-ui" This documentation page includes the list of all events emitted by [Medusa's workflows](https://docs.medusajs.com/resources/medusa-workflows-reference). -## Cart Events +## Auth Events + +### Summary + + + + + +Event + + +Description + + + + + + +[auth.password_reset](#authpassword_reset) + + +Emitted when a reset password token is generated. You can listen to this event +to send a reset password email to the user or customer, for example. + + + +
+ +auth.password_reset), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="auth.password_reset" payload={`\`\`\`ts +{ + entity_id, // The identifier of the user or customer. For example, an email address. + actor_type, // The type of actor. For example, "customer", "user", or custom. + token, // The generated token. +} +\`\`\``} /> + +Emitted when a reset password token is generated. You can listen to this event +to send a reset password email to the user or customer, for example. + +#### Payload + +```ts +{ + entity_id, // The identifier of the user or customer. For example, an email address. + actor_type, // The type of actor. For example, "customer", "user", or custom. + token, // The generated token. +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [generateResetPasswordTokenWorkflow](/references/medusa-workflows/generateResetPasswordTokenWorkflow) + +--- + +## Cart Events ### Summary @@ -168,7 +225,7 @@ The following workflows emit this event when they're executed. These workflows a --- -## Customer Events +## Customer Events ### Summary @@ -285,7 +342,378 @@ The following workflows emit this event when they're executed. These workflows a --- -## Order Events +## Fulfillment Events + +### Summary + + + + + +Event + + +Description + + + + + + +[shipment.created](#shipmentcreated) + + +Emitted when a shipment is created for an order. + + + + +[delivery.created](#deliverycreated) + + +Emitted when a fulfillment is marked as delivered. + + + +
+ +shipment.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="shipment.created" payload={`\`\`\`ts +{ + id, // the ID of the shipment + no_notification, // (boolean) whether to notify the customer +} +\`\`\``} /> + +Emitted when a shipment is created for an order. + +#### Payload + +```ts +{ + id, // the ID of the shipment + no_notification, // (boolean) whether to notify the customer +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createOrderShipmentWorkflow](/references/medusa-workflows/createOrderShipmentWorkflow) + +--- + +delivery.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="delivery.created" payload={`\`\`\`ts +{ + id, // the ID of the fulfillment +} +\`\`\``} /> + +Emitted when a fulfillment is marked as delivered. + +#### Payload + +```ts +{ + id, // the ID of the fulfillment +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [markOrderFulfillmentAsDeliveredWorkflow](/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow) + +--- + +## Invite Events + +### Summary + + + + + +Event + + +Description + + + + + + +[invite.accepted](#inviteaccepted) + + +Emitted when an invite is accepted. + + + + +[invite.created](#invitecreated) + + +Emitted when invites are created. You can listen to this event +to send an email to the invited users, for example. + + + + +[invite.deleted](#invitedeleted) + + +Emitted when invites are deleted. + + + + +[invite.resent](#inviteresent) + + +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. + + + +
+ +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [acceptInviteWorkflow](/references/medusa-workflows/acceptInviteWorkflow) + +--- + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createInvitesWorkflow](/references/medusa-workflows/createInvitesWorkflow) + +--- + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteInvitesWorkflow](/references/medusa-workflows/deleteInvitesWorkflow) + +--- + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [refreshInviteTokensWorkflow](/references/medusa-workflows/refreshInviteTokensWorkflow) + +--- + +## Order Edit Events + +### Summary + + + + + +Event + + +Description + + + + + + +[order-edit.requested](#order-editrequested) +v2.8.0 + + +Emitted when an order edit is requested. + + + + +[order-edit.confirmed](#order-editconfirmed) +v2.8.0 + + +Emitted when an order edit request is confirmed. + + + + +[order-edit.canceled](#order-editcanceled) +v2.8.0 + + +Emitted when an order edit request is canceled. + + + +
+ +order-edit.requested + +v2.8.0 +), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.requested" payload={`\`\`\`ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +\`\`\``} /> + +Emitted when an order edit is requested. + +#### Payload + +```ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [requestOrderEditRequestWorkflow](/references/medusa-workflows/requestOrderEditRequestWorkflow) + +--- + +order-edit.confirmed + +v2.8.0 +), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.confirmed" payload={`\`\`\`ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +\`\`\``} /> + +Emitted when an order edit request is confirmed. + +#### Payload + +```ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [confirmOrderEditRequestWorkflow](/references/medusa-workflows/confirmOrderEditRequestWorkflow) + +--- + +order-edit.canceled + +v2.8.0 +), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.canceled" payload={`\`\`\`ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +\`\`\``} /> + +Emitted when an order edit request is canceled. + +#### Payload + +```ts +{ + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order +} +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [cancelBeginOrderEditWorkflow](/references/medusa-workflows/cancelBeginOrderEditWorkflow) + +--- + +## Order Events ### Summary @@ -716,7 +1144,7 @@ The following workflows emit this event when they're executed. These workflows a --- -## Order Edit Events +## Payment Events ### Summary @@ -734,52 +1162,36 @@ Description -[order-edit.requested](#order-editrequested) -v2.8.0 +[payment.captured](#paymentcaptured) -Emitted when an order edit is requested. +Emitted when a payment is captured. -[order-edit.confirmed](#order-editconfirmed) -v2.8.0 +[payment.refunded](#paymentrefunded) -Emitted when an order edit request is confirmed. - - - - -[order-edit.canceled](#order-editcanceled) -v2.8.0 - - -Emitted when an order edit request is canceled. +Emitted when a payment is refunded. -order-edit.requested - -v2.8.0 -), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.requested" payload={`\`\`\`ts +payment.captured), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="payment.captured" payload={`\`\`\`ts { - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + id, // the ID of the payment } \`\`\``} /> -Emitted when an order edit is requested. +Emitted when a payment is captured. #### Payload ```ts { - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + id, // the ID of the payment } ``` @@ -787,28 +1199,25 @@ Emitted when an order edit is requested. 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [requestOrderEditRequestWorkflow](/references/medusa-workflows/requestOrderEditRequestWorkflow) +- [capturePaymentWorkflow](/references/medusa-workflows/capturePaymentWorkflow) +- [processPaymentWorkflow](/references/medusa-workflows/processPaymentWorkflow) +- [markPaymentCollectionAsPaid](/references/medusa-workflows/markPaymentCollectionAsPaid) --- -order-edit.confirmed - -v2.8.0 -), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.confirmed" payload={`\`\`\`ts +payment.refunded), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="payment.refunded" payload={`\`\`\`ts { - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + id, // the ID of the payment } \`\`\``} /> -Emitted when an order edit request is confirmed. +Emitted when a payment is refunded. #### Payload ```ts { - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + id, // the ID of the payment } ``` @@ -816,483 +1225,11 @@ Emitted when an order edit request is confirmed. 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [confirmOrderEditRequestWorkflow](/references/medusa-workflows/confirmOrderEditRequestWorkflow) +- [refundPaymentWorkflow](/references/medusa-workflows/refundPaymentWorkflow) --- -order-edit.canceled - -v2.8.0 -), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.canceled" payload={`\`\`\`ts -{ - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order -} -\`\`\``} /> - -Emitted when an order edit request is canceled. - -#### Payload - -```ts -{ - order_id, // The ID of the order - actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order -} -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [cancelBeginOrderEditWorkflow](/references/medusa-workflows/cancelBeginOrderEditWorkflow) - ---- - -## User Events - -### Summary - - - - - -Event - - -Description - - - - - - -[user.created](#usercreated) - - -Emitted when users are created. - - - - -[user.updated](#userupdated) - - -Emitted when users are updated. - - - - -[user.deleted](#userdeleted) - - -Emitted when users are deleted. - - - -
- -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createUsersWorkflow](/references/medusa-workflows/createUsersWorkflow) -- [createUserAccountWorkflow](/references/medusa-workflows/createUserAccountWorkflow) -- [acceptInviteWorkflow](/references/medusa-workflows/acceptInviteWorkflow) - ---- - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateUsersWorkflow](/references/medusa-workflows/updateUsersWorkflow) - ---- - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteUsersWorkflow](/references/medusa-workflows/deleteUsersWorkflow) -- [removeUserAccountWorkflow](/references/medusa-workflows/removeUserAccountWorkflow) - ---- - -## Invite Events - -### Summary - - - - - -Event - - -Description - - - - - - -[invite.accepted](#inviteaccepted) - - -Emitted when an invite is accepted. - - - - -[invite.created](#invitecreated) - - -Emitted when invites are created. You can listen to this event -to send an email to the invited users, for example. - - - - -[invite.deleted](#invitedeleted) - - -Emitted when invites are deleted. - - - - -[invite.resent](#inviteresent) - - -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. - - - -
- -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [acceptInviteWorkflow](/references/medusa-workflows/acceptInviteWorkflow) - ---- - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createInvitesWorkflow](/references/medusa-workflows/createInvitesWorkflow) - ---- - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteInvitesWorkflow](/references/medusa-workflows/deleteInvitesWorkflow) - ---- - -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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [refreshInviteTokensWorkflow](/references/medusa-workflows/refreshInviteTokensWorkflow) - ---- - -## Auth Events - -### Summary - - - - - -Event - - -Description - - - - - - -[auth.password_reset](#authpassword_reset) - - -Emitted when a reset password token is generated. You can listen to this event -to send a reset password email to the user or customer, for example. - - - -
- -auth.password_reset), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="auth.password_reset" payload={`\`\`\`ts -{ - entity_id, // The identifier of the user or customer. For example, an email address. - actor_type, // The type of actor. For example, "customer", "user", or custom. - token, // The generated token. -} -\`\`\``} /> - -Emitted when a reset password token is generated. You can listen to this event -to send a reset password email to the user or customer, for example. - -#### Payload - -```ts -{ - entity_id, // The identifier of the user or customer. For example, an email address. - actor_type, // The type of actor. For example, "customer", "user", or custom. - token, // The generated token. -} -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [generateResetPasswordTokenWorkflow](/references/medusa-workflows/generateResetPasswordTokenWorkflow) - ---- - -## Sales Channel Events - -### Summary - - - - - -Event - - -Description - - - - - - -[sales-channel.created](#sales-channelcreated) - - -Emitted when sales channels are created. - - - - -[sales-channel.updated](#sales-channelupdated) - - -Emitted when sales channels are updated. - - - - -[sales-channel.deleted](#sales-channeldeleted) - - -Emitted when sales channels are deleted. - - - -
- -sales-channel.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="sales-channel.created" payload={`\`\`\`ts -[{ - id, // The ID of the sales channel -}] -\`\`\``} /> - -Emitted when sales channels are created. - -#### Payload - -```ts -[{ - id, // The ID of the sales channel -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createSalesChannelsWorkflow](/references/medusa-workflows/createSalesChannelsWorkflow) - ---- - -sales-channel.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="sales-channel.updated" payload={`\`\`\`ts -[{ - id, // The ID of the sales channel -}] -\`\`\``} /> - -Emitted when sales channels are updated. - -#### Payload - -```ts -[{ - id, // The ID of the sales channel -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateSalesChannelsWorkflow](/references/medusa-workflows/updateSalesChannelsWorkflow) - ---- - -sales-channel.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="sales-channel.deleted" payload={`\`\`\`ts -[{ - id, // The ID of the sales channel -}] -\`\`\``} /> - -Emitted when sales channels are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the sales channel -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteSalesChannelsWorkflow](/references/medusa-workflows/deleteSalesChannelsWorkflow) - ---- - -## Product Category Events +## Product Category Events ### Summary @@ -1407,7 +1344,7 @@ The following workflows emit this event when they're executed. These workflows a --- -## Product Collection Events +## Product Collection Events ### Summary @@ -1522,7 +1459,352 @@ The following workflows emit this event when they're executed. These workflows a --- -## Product Variant Events +## Product Option Events + +### Summary + + + + + +Event + + +Description + + + + + + +[product-option.updated](#product-optionupdated) + + +Emitted when product options are updated. + + + + +[product-option.created](#product-optioncreated) + + +Emitted when product options are created. + + + + +[product-option.deleted](#product-optiondeleted) + + +Emitted when product options are deleted. + + + +
+ +product-option.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.updated" payload={`\`\`\`ts +[{ + id, // The ID of the product option +}] +\`\`\``} /> + +Emitted when product options are updated. + +#### Payload + +```ts +[{ + id, // The ID of the product option +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [updateProductOptionsWorkflow](/references/medusa-workflows/updateProductOptionsWorkflow) + +--- + +product-option.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.created" payload={`\`\`\`ts +[{ + id, // The ID of the product option +}] +\`\`\``} /> + +Emitted when product options are created. + +#### Payload + +```ts +[{ + id, // The ID of the product option +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createProductOptionsWorkflow](/references/medusa-workflows/createProductOptionsWorkflow) + +--- + +product-option.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.deleted" payload={`\`\`\`ts +[{ + id, // The ID of the product option +}] +\`\`\``} /> + +Emitted when product options are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the product option +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteProductOptionsWorkflow](/references/medusa-workflows/deleteProductOptionsWorkflow) + +--- + +## Product Tag Events + +### Summary + + + + + +Event + + +Description + + + + + + +[product-tag.updated](#product-tagupdated) + + +Emitted when product tags are updated. + + + + +[product-tag.created](#product-tagcreated) + + +Emitted when product tags are created. + + + + +[product-tag.deleted](#product-tagdeleted) + + +Emitted when product tags are deleted. + + + +
+ +product-tag.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.updated" payload={`\`\`\`ts +[{ + id, // The ID of the product tag +}] +\`\`\``} /> + +Emitted when product tags are updated. + +#### Payload + +```ts +[{ + id, // The ID of the product tag +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [updateProductTagsWorkflow](/references/medusa-workflows/updateProductTagsWorkflow) + +--- + +product-tag.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.created" payload={`\`\`\`ts +[{ + id, // The ID of the product tag +}] +\`\`\``} /> + +Emitted when product tags are created. + +#### Payload + +```ts +[{ + id, // The ID of the product tag +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createProductTagsWorkflow](/references/medusa-workflows/createProductTagsWorkflow) + +--- + +product-tag.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.deleted" payload={`\`\`\`ts +[{ + id, // The ID of the product tag +}] +\`\`\``} /> + +Emitted when product tags are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the product tag +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteProductTagsWorkflow](/references/medusa-workflows/deleteProductTagsWorkflow) + +--- + +## Product Type Events + +### Summary + + + + + +Event + + +Description + + + + + + +[product-type.updated](#product-typeupdated) + + +Emitted when product types are updated. + + + + +[product-type.created](#product-typecreated) + + +Emitted when product types are created. + + + + +[product-type.deleted](#product-typedeleted) + + +Emitted when product types are deleted. + + + +
+ +product-type.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.updated" payload={`\`\`\`ts +[{ + id, // The ID of the product type +}] +\`\`\``} /> + +Emitted when product types are updated. + +#### Payload + +```ts +[{ + id, // The ID of the product type +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [updateProductTypesWorkflow](/references/medusa-workflows/updateProductTypesWorkflow) + +--- + +product-type.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.created" payload={`\`\`\`ts +[{ + id, // The ID of the product type +}] +\`\`\``} /> + +Emitted when product types are created. + +#### Payload + +```ts +[{ + id, // The ID of the product type +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [createProductTypesWorkflow](/references/medusa-workflows/createProductTypesWorkflow) + +--- + +product-type.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.deleted" payload={`\`\`\`ts +[{ + id, // The ID of the product type +}] +\`\`\``} /> + +Emitted when product types are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the product type +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteProductTypesWorkflow](/references/medusa-workflows/deleteProductTypesWorkflow) + +--- + +## Product Variant Events ### Summary @@ -1643,7 +1925,7 @@ The following workflows emit this event when they're executed. These workflows a --- -## Product Events +## Product Events ### Summary @@ -1764,352 +2046,7 @@ The following workflows emit this event when they're executed. These workflows a --- -## Product Type Events - -### Summary - - - - - -Event - - -Description - - - - - - -[product-type.updated](#product-typeupdated) - - -Emitted when product types are updated. - - - - -[product-type.created](#product-typecreated) - - -Emitted when product types are created. - - - - -[product-type.deleted](#product-typedeleted) - - -Emitted when product types are deleted. - - - -
- -product-type.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.updated" payload={`\`\`\`ts -[{ - id, // The ID of the product type -}] -\`\`\``} /> - -Emitted when product types are updated. - -#### Payload - -```ts -[{ - id, // The ID of the product type -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateProductTypesWorkflow](/references/medusa-workflows/updateProductTypesWorkflow) - ---- - -product-type.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.created" payload={`\`\`\`ts -[{ - id, // The ID of the product type -}] -\`\`\``} /> - -Emitted when product types are created. - -#### Payload - -```ts -[{ - id, // The ID of the product type -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createProductTypesWorkflow](/references/medusa-workflows/createProductTypesWorkflow) - ---- - -product-type.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-type.deleted" payload={`\`\`\`ts -[{ - id, // The ID of the product type -}] -\`\`\``} /> - -Emitted when product types are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the product type -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteProductTypesWorkflow](/references/medusa-workflows/deleteProductTypesWorkflow) - ---- - -## Product Tag Events - -### Summary - - - - - -Event - - -Description - - - - - - -[product-tag.updated](#product-tagupdated) - - -Emitted when product tags are updated. - - - - -[product-tag.created](#product-tagcreated) - - -Emitted when product tags are created. - - - - -[product-tag.deleted](#product-tagdeleted) - - -Emitted when product tags are deleted. - - - -
- -product-tag.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.updated" payload={`\`\`\`ts -[{ - id, // The ID of the product tag -}] -\`\`\``} /> - -Emitted when product tags are updated. - -#### Payload - -```ts -[{ - id, // The ID of the product tag -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateProductTagsWorkflow](/references/medusa-workflows/updateProductTagsWorkflow) - ---- - -product-tag.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.created" payload={`\`\`\`ts -[{ - id, // The ID of the product tag -}] -\`\`\``} /> - -Emitted when product tags are created. - -#### Payload - -```ts -[{ - id, // The ID of the product tag -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createProductTagsWorkflow](/references/medusa-workflows/createProductTagsWorkflow) - ---- - -product-tag.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-tag.deleted" payload={`\`\`\`ts -[{ - id, // The ID of the product tag -}] -\`\`\``} /> - -Emitted when product tags are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the product tag -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteProductTagsWorkflow](/references/medusa-workflows/deleteProductTagsWorkflow) - ---- - -## Product Option Events - -### Summary - - - - - -Event - - -Description - - - - - - -[product-option.updated](#product-optionupdated) - - -Emitted when product options are updated. - - - - -[product-option.created](#product-optioncreated) - - -Emitted when product options are created. - - - - -[product-option.deleted](#product-optiondeleted) - - -Emitted when product options are deleted. - - - -
- -product-option.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.updated" payload={`\`\`\`ts -[{ - id, // The ID of the product option -}] -\`\`\``} /> - -Emitted when product options are updated. - -#### Payload - -```ts -[{ - id, // The ID of the product option -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [updateProductOptionsWorkflow](/references/medusa-workflows/updateProductOptionsWorkflow) - ---- - -product-option.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.created" payload={`\`\`\`ts -[{ - id, // The ID of the product option -}] -\`\`\``} /> - -Emitted when product options are created. - -#### Payload - -```ts -[{ - id, // The ID of the product option -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [createProductOptionsWorkflow](/references/medusa-workflows/createProductOptionsWorkflow) - ---- - -product-option.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="product-option.deleted" payload={`\`\`\`ts -[{ - id, // The ID of the product option -}] -\`\`\``} /> - -Emitted when product options are deleted. - -#### Payload - -```ts -[{ - id, // The ID of the product option -}] -``` - -#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. - -- [deleteProductOptionsWorkflow](/references/medusa-workflows/deleteProductOptionsWorkflow) - ---- - -## Region Events +## Region Events ### Summary @@ -2224,7 +2161,7 @@ The following workflows emit this event when they're executed. These workflows a --- -## Fulfillment Events +## Sales Channel Events ### Summary @@ -2242,74 +2179,104 @@ Description -[shipment.created](#shipmentcreated) +[sales-channel.created](#sales-channelcreated) -Emitted when a shipment is created for an order. +Emitted when sales channels are created. -[delivery.created](#deliverycreated) +[sales-channel.updated](#sales-channelupdated) -Emitted when a fulfillment is marked as delivered. +Emitted when sales channels are updated. + + + + +[sales-channel.deleted](#sales-channeldeleted) + + +Emitted when sales channels are deleted. -shipment.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="shipment.created" payload={`\`\`\`ts -{ - id, // the ID of the shipment - no_notification, // (boolean) whether to notify the customer -} +sales-channel.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="sales-channel.created" payload={`\`\`\`ts +[{ + id, // The ID of the sales channel +}] \`\`\``} /> -Emitted when a shipment is created for an order. +Emitted when sales channels are created. #### Payload ```ts -{ - id, // the ID of the shipment - no_notification, // (boolean) whether to notify the customer -} +[{ + id, // The ID of the sales channel +}] ``` #### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [createOrderShipmentWorkflow](/references/medusa-workflows/createOrderShipmentWorkflow) +- [createSalesChannelsWorkflow](/references/medusa-workflows/createSalesChannelsWorkflow) --- -delivery.created), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="delivery.created" payload={`\`\`\`ts -{ - id, // the ID of the fulfillment -} +sales-channel.updated), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="sales-channel.updated" payload={`\`\`\`ts +[{ + id, // The ID of the sales channel +}] \`\`\``} /> -Emitted when a fulfillment is marked as delivered. +Emitted when sales channels are updated. #### Payload ```ts -{ - id, // the ID of the fulfillment -} +[{ + id, // The ID of the sales channel +}] ``` #### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [markOrderFulfillmentAsDeliveredWorkflow](/references/medusa-workflows/markOrderFulfillmentAsDeliveredWorkflow) +- [updateSalesChannelsWorkflow](/references/medusa-workflows/updateSalesChannelsWorkflow) --- -## Payment Events Events +sales-channel.deleted), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="sales-channel.deleted" payload={`\`\`\`ts +[{ + id, // The ID of the sales channel +}] +\`\`\``} /> + +Emitted when sales channels are deleted. + +#### Payload + +```ts +[{ + id, // The ID of the sales channel +}] +``` + +#### 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteSalesChannelsWorkflow](/references/medusa-workflows/deleteSalesChannelsWorkflow) + +--- + +## User Events ### Summary @@ -2327,67 +2294,100 @@ Description -[payment.captured](#paymentcaptured) +[user.created](#usercreated) -Emitted when a payment is captured. +Emitted when users are created. -[payment.refunded](#paymentrefunded) +[user.updated](#userupdated) -Emitted when a payment is refunded. +Emitted when users are updated. + + + + +[user.deleted](#userdeleted) + + +Emitted when users are deleted. -payment.captured), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="payment.captured" payload={`\`\`\`ts -{ - id, // the ID of the payment -} +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 a payment is captured. +Emitted when users are created. #### Payload ```ts -{ - id, // the ID of the payment -} +[{ + 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [capturePaymentWorkflow](/references/medusa-workflows/capturePaymentWorkflow) -- [processPaymentWorkflow](/references/medusa-workflows/processPaymentWorkflow) -- [markPaymentCollectionAsPaid](/references/medusa-workflows/markPaymentCollectionAsPaid) +- [createUsersWorkflow](/references/medusa-workflows/createUsersWorkflow) +- [createUserAccountWorkflow](/references/medusa-workflows/createUserAccountWorkflow) +- [acceptInviteWorkflow](/references/medusa-workflows/acceptInviteWorkflow) --- -payment.refunded), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="payment.refunded" payload={`\`\`\`ts -{ - id, // the ID of the payment -} +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 a payment is refunded. +Emitted when users are updated. #### Payload ```ts -{ - id, // the ID of the payment -} +[{ + 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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. -- [refundPaymentWorkflow](/references/medusa-workflows/refundPaymentWorkflow) +- [updateUsersWorkflow](/references/medusa-workflows/updateUsersWorkflow) + +--- + +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](https://docs.medusajs.com/api/store) and [Admin](https://docs.medusajs.com/api/admin) API references. + +- [deleteUsersWorkflow](/references/medusa-workflows/deleteUsersWorkflow) +- [removeUserAccountWorkflow](/references/medusa-workflows/removeUserAccountWorkflow) diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/events-listing.ts b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/events-listing.ts index 7a6ccf9ea0..9b00ec5690 100644 --- a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/events-listing.ts +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/events-listing.ts @@ -1,7 +1,6 @@ import Handlebars from "handlebars" import pkg from "slugify" import { DeclarationReflection, ReflectionKind } from "typedoc" -import { pascalToWords } from "utils" const slugify = pkg.default @@ -35,16 +34,12 @@ export default function () { } if (this.kind === ReflectionKind.Module) { - this.children?.forEach((child, index) => { - const count = parseChildren(child.children || []) - if (count > 0 && index < this.children!.length - 1) { - content.push("") - content.push("---") - content.push("") - } - }) + const sortedChildren = sortChildren( + this.children?.map((child) => child.children || []).flat() || [] + ) + parseChildren(sortedChildren) } else { - parseChildren(this.children || []) + parseChildren(sortChildren(this.children || [])) } return content.join("\n") @@ -67,9 +62,11 @@ function formatEventsType( } const content: string[] = [] const subHeaderPrefix = "#".repeat(subtitleLevel) - const header = pascalToWords( - eventVariable.name.replaceAll("WorkflowEvents", "") - ) + const header = + eventVariable.comment?.blockTags + .find((tag) => tag.tag === "@category") + ?.content.map((content) => content.text) + .join("") || "" if (showHeader) { content.push(`${"#".repeat(subtitleLevel - 1)} ${header} Events`) } @@ -268,3 +265,9 @@ function getEventWorkflows(event: DeclarationReflection): string[] | undefined { .join("") .split(", ") } + +function sortChildren(ref: DeclarationReflection[]) { + return ref.sort((a, b) => { + return a.name.localeCompare(b.name) + }) +}