docs: rename Architectural Modules to Infrastructure Modules (#12212)

* docs: rename Architectural Modules to Infrastructure Modules

* generate again
This commit is contained in:
Shahed Nasser
2025-04-17 13:20:43 +03:00
committed by GitHub
parent 8618e6ee38
commit eb73bdb478
149 changed files with 12165 additions and 12145 deletions
@@ -35,7 +35,7 @@ const step1 = createStep(
)
```
This will resolve the service of the configured Cache Module, which is the [In-Memory Cache Module](https://docs.medusajs.com/resources/architectural-modules/cache/in-memory) by default.
This will resolve the service of the configured Cache Module, which is the [In-Memory Cache Module](https://docs.medusajs.com/resources/infrastructure-modules/cache/in-memory) by default.
You can then use the Cache Module's service's methods in the step. The rest of this guide details these methods.
@@ -13,7 +13,7 @@ import { TypeList, WorkflowDiagram } from "docs-ui"
This documentation provides a reference to the `deleteFilesStep`. It belongs to the `@medusajs/medusa/core-flows` package.
This step deletes one or more files using the installed
[File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file). The files
[File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file). The files
will be removed from the database and the storage.
## Example
@@ -13,7 +13,7 @@ import { TypeList, WorkflowDiagram } from "docs-ui"
This documentation provides a reference to the `uploadFilesStep`. It belongs to the `@medusajs/medusa/core-flows` package.
This step uploads one or more files using the installed
[File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file).
[File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file).
## Example
@@ -16,7 +16,7 @@ This documentation provides a reference to the `deleteFilesWorkflow`. It belongs
This workflow deletes one or more files. It's used by the
[Delete File Upload Admin API Route](https://docs.medusajs.com/api/admin#uploads\_deleteuploadsid).
The [File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file) installed
The [File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file) installed
in your application will be used to delete the file from storage.
You can use this workflow within your customizations or your own custom workflows, allowing you to
@@ -131,7 +131,7 @@ const myWorkflow = createWorkflow(
## Steps
<WorkflowDiagram workflow={{"name":"deleteFilesWorkflow","steps":[{"type":"step","name":"deleteFilesStep","description":"This step deletes one or more files using the installed\n[File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file). The files\nwill be removed from the database and the storage.","link":"../../../Steps_File/functions/core_flows.File.Steps_File.deleteFilesStep/page.mdx","depth":1}]}} />
<WorkflowDiagram workflow={{"name":"deleteFilesWorkflow","steps":[{"type":"step","name":"deleteFilesStep","description":"This step deletes one or more files using the installed\n[File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file). The files\nwill be removed from the database and the storage.","link":"../../../Steps_File/functions/core_flows.File.Steps_File.deleteFilesStep/page.mdx","depth":1}]}} />
## Input
@@ -14,7 +14,7 @@ import { TypeList, WorkflowDiagram } from "docs-ui"
This documentation provides a reference to the `uploadFilesWorkflow`. It belongs to the `@medusajs/medusa/core-flows` package.
This workflow uploads one or more files using the installed
[File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file). The workflow is used by the
[File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file). The workflow is used by the
[Upload Files Admin API Route](https://docs.medusajs.com/api/admin#uploads\_postuploads).
You can use this workflow within your customizations or your own custom workflows, allowing you to
@@ -149,7 +149,7 @@ const myWorkflow = createWorkflow(
## Steps
<WorkflowDiagram workflow={{"name":"uploadFilesWorkflow","steps":[{"type":"step","name":"uploadFilesStep","description":"This step uploads one or more files using the installed\n[File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file).","link":"../../../Steps_File/functions/core_flows.File.Steps_File.uploadFilesStep/page.mdx","depth":1}]}} />
<WorkflowDiagram workflow={{"name":"uploadFilesWorkflow","steps":[{"type":"step","name":"uploadFilesStep","description":"This step uploads one or more files using the installed\n[File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file).","link":"../../../Steps_File/functions/core_flows.File.Steps_File.uploadFilesStep/page.mdx","depth":1}]}} />
## Input
@@ -31,4 +31,4 @@ const data = notifyOnFailureStep([{
## Input
<TypeList types={[{"name":"NotifyOnFailureStepInput","type":"[NotifyOnFailureStepInput](../../../../types/core_flows.NotifyOnFailureStepInput/page.mdx)","optional":false,"defaultValue":"","description":"The notifications to send.","expandable":false,"children":[{"name":"to","type":"`string`","description":"The address to send the notification to, depending on\nthe channel. For example, the email address for the email channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"channel","type":"`string`","description":"The channel to send the notification through. For example, `email`.\nA [Notification Module Provider](https://docs.medusajs.com/resources/architectural-modules/notification)\nmust be installed and configured for the specified channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"template","type":"`string`","description":"The ID of the template to use for the notification. This template ID may be defined\nin a third-party service used to send the notification.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>` \\| `null`","description":"The data to use in the notification template. This data may be used to personalize\nthe notification, such as the user's name or the order number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"trigger_type","type":"`string` \\| `null`","description":"The type of trigger that caused the notification to be sent. For example, `order_created`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_id","type":"`string` \\| `null`","description":"The ID of the resource that triggered the notification. For example, the ID of the order\nthat triggered the notification.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_type","type":"`string` \\| `null`","description":"The type of the resource that triggered the notification. For example, `order`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"receiver_id","type":"`string` \\| `null`","description":"The ID of the user receiving the notification.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_notification_id","type":"`string` \\| `null`","description":"The ID of the original notification if it's being resent.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string` \\| `null`","description":"A key to ensure that the notification is sent only once. If the notification\nis sent multiple times, the key ensures that the notification is sent only once.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="notifyOnFailureStep"/>
<TypeList types={[{"name":"NotifyOnFailureStepInput","type":"[NotifyOnFailureStepInput](../../../../types/core_flows.NotifyOnFailureStepInput/page.mdx)","optional":false,"defaultValue":"","description":"The notifications to send.","expandable":false,"children":[{"name":"to","type":"`string`","description":"The address to send the notification to, depending on\nthe channel. For example, the email address for the email channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"channel","type":"`string`","description":"The channel to send the notification through. For example, `email`.\nA [Notification Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/notification)\nmust be installed and configured for the specified channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"template","type":"`string`","description":"The ID of the template to use for the notification. This template ID may be defined\nin a third-party service used to send the notification.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>` \\| `null`","description":"The data to use in the notification template. This data may be used to personalize\nthe notification, such as the user's name or the order number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"trigger_type","type":"`string` \\| `null`","description":"The type of trigger that caused the notification to be sent. For example, `order_created`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_id","type":"`string` \\| `null`","description":"The ID of the resource that triggered the notification. For example, the ID of the order\nthat triggered the notification.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"resource_type","type":"`string` \\| `null`","description":"The type of the resource that triggered the notification. For example, `order`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"receiver_id","type":"`string` \\| `null`","description":"The ID of the user receiving the notification.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"original_notification_id","type":"`string` \\| `null`","description":"The ID of the original notification if it's being resent.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string` \\| `null`","description":"A key to ensure that the notification is sent only once. If the notification\nis sent multiple times, the key ensures that the notification is sent only once.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="notifyOnFailureStep"/>
@@ -14,7 +14,7 @@ import { TypeList, WorkflowDiagram } from "docs-ui"
This documentation provides a reference to the `generateProductCsvStep`. It belongs to the `@medusajs/medusa/core-flows` package.
This step generates a CSV file that exports products. The CSV
file is created and stored using the registered [File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file).
file is created and stored using the registered [File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file).
## Example
@@ -34,4 +34,4 @@ const data = generateProductCsvStep(products)
## Output
<TypeList types={[{"name":"GenerateProductCsvStepOutput","type":"[GenerateProductCsvStepOutput](../../../../types/core_flows.GenerateProductCsvStepOutput/page.mdx)","optional":false,"defaultValue":"","description":"The export's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the generated file as returned by the [File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"filename","type":"`string`","description":"The name of the generated file as returned by the [File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="generateProductCsvStep"/>
<TypeList types={[{"name":"GenerateProductCsvStepOutput","type":"[GenerateProductCsvStepOutput](../../../../types/core_flows.GenerateProductCsvStepOutput/page.mdx)","optional":false,"defaultValue":"","description":"The export's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the generated file as returned by the [File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"filename","type":"`string`","description":"The name of the generated file as returned by the [File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="generateProductCsvStep"/>
@@ -254,7 +254,7 @@ const myWorkflow = createWorkflow(
## Steps
<WorkflowDiagram workflow={{"name":"exportProductsWorkflow","steps":[{"type":"step","name":"getAllProductsStep","description":"This step retrieves all products matching a set of filters.","link":"../../../Steps_Product/functions/core_flows.Product.Steps_Product.getAllProductsStep/page.mdx","depth":1},{"type":"step","name":"notifyOnFailureStep","description":"This step sends one or more notification when a workflow fails. This\nstep can be used in the beginning of a workflow so that, when the workflow fails,\nthe step's compensation function is triggered to send the notification.","link":"../../../../Notification/Steps_Notification/functions/core_flows.Notification.Steps_Notification.notifyOnFailureStep/page.mdx","depth":2},{"type":"step","name":"generateProductCsvStep","description":"This step generates a CSV file that exports products. The CSV\nfile is created and stored using the registered [File Module Provider](https://docs.medusajs.com/resources/architectural-modules/file).","link":"../../../Steps_Product/functions/core_flows.Product.Steps_Product.generateProductCsvStep/page.mdx","depth":3},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/learn/fundamentals/module-links/query).\n\n:::note\n\nThis step is deprecated. Use [useQueryGraphStep](../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.useQueryGraphStep/page.mdx) instead.\n\n:::","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.useRemoteQueryStep/page.mdx","depth":4},{"type":"step","name":"sendNotificationsStep","description":"This step sends one or more notifications.","link":"../../../../Notification/Steps_Notification/functions/core_flows.Notification.Steps_Notification.sendNotificationsStep/page.mdx","depth":5}]}} />
<WorkflowDiagram workflow={{"name":"exportProductsWorkflow","steps":[{"type":"step","name":"getAllProductsStep","description":"This step retrieves all products matching a set of filters.","link":"../../../Steps_Product/functions/core_flows.Product.Steps_Product.getAllProductsStep/page.mdx","depth":1},{"type":"step","name":"notifyOnFailureStep","description":"This step sends one or more notification when a workflow fails. This\nstep can be used in the beginning of a workflow so that, when the workflow fails,\nthe step's compensation function is triggered to send the notification.","link":"../../../../Notification/Steps_Notification/functions/core_flows.Notification.Steps_Notification.notifyOnFailureStep/page.mdx","depth":2},{"type":"step","name":"generateProductCsvStep","description":"This step generates a CSV file that exports products. The CSV\nfile is created and stored using the registered [File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file).","link":"../../../Steps_Product/functions/core_flows.Product.Steps_Product.generateProductCsvStep/page.mdx","depth":3},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/learn/fundamentals/module-links/query).\n\n:::note\n\nThis step is deprecated. Use [useQueryGraphStep](../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.useQueryGraphStep/page.mdx) instead.\n\n:::","link":"../../../../Common/Steps_Common/functions/core_flows.Common.Steps_Common.useRemoteQueryStep/page.mdx","depth":4},{"type":"step","name":"sendNotificationsStep","description":"This step sends one or more notifications.","link":"../../../../Notification/Steps_Notification/functions/core_flows.Notification.Steps_Notification.sendNotificationsStep/page.mdx","depth":5}]}} />
## Input
@@ -23,7 +23,7 @@ This workflow starts a product import from a CSV file in the background. It's us
You can use this workflow within your custom workflows, allowing you to wrap custom logic around product import.
For example, you can import products from another system.
The workflow only starts the import, but you'll have to confirm it using the [Workflow Engine](https://docs.medusajs.com/resources/architectural-modules/workflow-engine).
The workflow only starts the import, but you'll have to confirm it using the [Workflow Engine](https://docs.medusajs.com/resources/infrastructure-modules/workflow-engine).
The below example shows how to confirm the import.
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/b9edc066c8486e8ec52e4f505968db1c558bc7b8/packages/core/core-flows/src/product/workflows/import-products.ts#L92" />
@@ -231,7 +231,7 @@ const myWorkflow = createWorkflow(
</CodeTabs>
. You'll use this ID to confirm the import afterwards.
You confirm the import using the [Workflow Engine](https://docs.medusajs.com/resources/architectural-modules/workflow-engine).
You confirm the import using the [Workflow Engine](https://docs.medusajs.com/resources/infrastructure-modules/workflow-engine).
For example, in an API route:
```ts workflow={false}
@@ -35,7 +35,7 @@ const step1 = createStep(
)
```
This will resolve the service of the configured Event Module, which is the [Local Event Module](https://docs.medusajs.com/resources/architectural-modules/event/local) by default.
This will resolve the service of the configured Event Module, which is the [Local Event Module](https://docs.medusajs.com/resources/infrastructure-modules/event/local) by default.
You can then use the Event Module's service's methods in the step. The rest of this guide details these methods.
@@ -523,7 +523,7 @@ This property holds all custom modules installed in your Medusa application.
:::note
Medusa's commerce modules are configured by default, so only
Medusa's Commerce Modules are configured by default, so only
add them to this property if you're changing their configurations or adding providers to a module.
:::
File diff suppressed because one or more lines are too long