chore(docs): Generated References (automated) (#12580)
Generated the following references: - `_index.mdx` - `api_key_models` - `auth_models` - `cart_models` - `core_flows` - `currency_models` - `customer_models` - `file_service` - `fulfillment_models` - `inventory_next_models` - `js_sdk` - `medusa` - `modules` - `modules_sdk` - `order_models` - `payment_models` - `pricing_models` - `product_models` - `promotion_models` - `region_models` - `sales_channel_models` - `stock_location_next_models` - `store_models` - `tax_models` - `types` - `user_models` - `workflows` Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
1 parent
fcaf454849
commit
6725bee130
525 files changed
+209363
-199239
No files matched your search
+39
@@ -0,0 +1,39 @@
|
||||
---
|
||||
slug: /references/helper-steps/createEntitiesStep
|
||||
sidebar_label: createEntitiesStep
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# createEntitiesStep - Helper Steps API Reference
|
||||
|
||||
This documentation provides a reference to the `createEntitiesStep` step. It belongs to the `@medusajs/medusa/core-flows` package.
|
||||
|
||||
This step creates one or more entities using methods in a module's service.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
createEntitiesStep({
|
||||
moduleRegistrationName: Modules.CART,
|
||||
invokeMethod: "createCreditLines",
|
||||
compensateMethod: "deleteCreditLines",
|
||||
data: {
|
||||
cart_id: "cart_123",
|
||||
amount: 10,
|
||||
reference: "payment",
|
||||
reference_id: "payment_123",
|
||||
metadata: {
|
||||
key: "value",
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"CreateEntitiesStepType","type":"[CreateEntitiesStepType](../../interfaces/helper_steps.CreateEntitiesStepType/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"moduleRegistrationName","type":"`string`","description":"The regitration name of the module that contains the method to be invoked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"invokeMethod","type":"`string`","description":"The method to be invoked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"compensateMethod","type":"`string`","description":"The method to be invoked in case of compensation (when an error occurs).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`[]","description":"The data to pass to the invoke method.\nFor example, an array of objects to create.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entityIdentifier","type":"`string`","description":"A string to pass to the compensate method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="createEntitiesStep"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"any[]","type":"`any`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="createEntitiesStep"/>
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
---
|
||||
slug: /references/helper-steps/deleteEntitiesStep
|
||||
sidebar_label: deleteEntitiesStep
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deleteEntitiesStep - Helper Steps API Reference
|
||||
|
||||
This documentation provides a reference to the `deleteEntitiesStep` step. It belongs to the `@medusajs/medusa/core-flows` package.
|
||||
|
||||
This step deletes one or more entities using methods in a module's service.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
deleteEntitiesStep({
|
||||
moduleRegistrationName: Modules.CART,
|
||||
invokeMethod: "softDeleteCreditLines",
|
||||
compensateMethod: "restoreCreditLines",
|
||||
data: input.id,
|
||||
})
|
||||
```
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteEntitiesStepType","type":"[DeleteEntitiesStepType](../../interfaces/helper_steps.DeleteEntitiesStepType/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"moduleRegistrationName","type":"`string`","description":"The regitration name of the module that contains the method to be invoked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"invokeMethod","type":"`string`","description":"The method to be invoked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"compensateMethod","type":"`string`","description":"The method to be invoked in case of compensation (when an error occurs).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`[]","description":"The data to pass to the invoke method.\nFor example, an array of IDs to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entityIdentifier","type":"`string`","description":"A string to pass to the compensate method.\nFor example, an ID of the entity to be deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="deleteEntitiesStep"/>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CreateEntitiesStepType
|
||||
|
||||
<TypeList types={[{"name":"moduleRegistrationName","type":"`string`","description":"The regitration name of the module that contains the method to be invoked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"invokeMethod","type":"`string`","description":"The method to be invoked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"compensateMethod","type":"`string`","description":"The method to be invoked in case of compensation (when an error occurs).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`[]","description":"The data to pass to the invoke method.\nFor example, an array of objects to create.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entityIdentifier","type":"`string`","description":"A string to pass to the compensate method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreateEntitiesStepType"/>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# DeleteEntitiesStepType
|
||||
|
||||
<TypeList types={[{"name":"moduleRegistrationName","type":"`string`","description":"The regitration name of the module that contains the method to be invoked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"invokeMethod","type":"`string`","description":"The method to be invoked.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"compensateMethod","type":"`string`","description":"The method to be invoked in case of compensation (when an error occurs).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`[]","description":"The data to pass to the invoke method.\nFor example, an array of IDs to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entityIdentifier","type":"`string`","description":"A string to pass to the compensate method.\nFor example, an ID of the entity to be deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DeleteEntitiesStepType"/>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# createEntitiesStepId
|
||||
|
||||
`Const` **createEntitiesStepId**: `"create-entities-step"`
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deleteEntitiesStepId
|
||||
|
||||
`Const` **deleteEntitiesStepId**: `"delete-entities-step"`
|
||||
Reference in new issue
Block a user