docs: [19/n] generate core-flows reference (#8802)
* docs: [19/n] generate core-flows reference * more
This commit is contained in:
1 parent
9dc70a8195
commit
c617dc873b
10 files changed
+3905
No files matched your search
@@ -0,0 +1,137 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Common
|
||||
|
||||
<TypeList types={[{"name":"created","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"updated","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"updated","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../Line truncated
|
||||
|
||||
___
|
||||
|
||||
## batchLinksWorkflowId
|
||||
|
||||
`Const` **batchLinksWorkflowId**: `"batch-links"`
|
||||
|
||||
___
|
||||
|
||||
## createLinksWorkflowId
|
||||
|
||||
`Const` **createLinksWorkflowId**: `"create-link"`
|
||||
|
||||
___
|
||||
|
||||
## dismissLinksWorkflowId
|
||||
|
||||
`Const` **dismissLinksWorkflowId**: `"dismiss-link"`
|
||||
|
||||
___
|
||||
|
||||
## updateLinksWorkflowId
|
||||
|
||||
`Const` **updateLinksWorkflowId**: `"update-link"`
|
||||
|
||||
___
|
||||
|
||||
## batchLinksWorkflow
|
||||
|
||||
This workflow manages one or more links to create, update, or dismiss them.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"batchLinksWorkflow","steps":[{"type":"step","name":"createRemoteLinkStep","description":"This step creates remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#create-link).\n\n","link":"../core_flows.Steps_Common/page.mdx#createremotelinkstep","depth":1},{"type":"step","name":"updateRemoteLinksStep","description":"","link":"../core_flows.Steps_Common/page.mdx#updateremotelinksstep","depth":1},{"type":"step","name":"dismissRemoteLinkStep","description":"This step removes remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#dismiss-link).\n\n","link":"../core_flows.Steps_Common/page.mdx#dismissremotelinkstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"BatchWorkflowInput","type":"[BatchWorkflowInput](../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowInput/page.mdx)<LinkDefinition, LinkDefinition, LinkDefinition>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","description":"A link for two records of linked data models.\n\nThe keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"LinkDefinition","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","description":"A link for two records of linked data models.\n\nThe keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"LinkDefinition","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","description":"A link for two records of linked data models.\n\nThe keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchLinksWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"created","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"updated","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"deleted","type":"([LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchLinksWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## createLinksWorkflow
|
||||
|
||||
This workflow creates one or more links between records.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createLinksWorkflow","steps":[{"type":"step","name":"createRemoteLinkStep","description":"This step creates remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#create-link).\n\n","link":"../core_flows.Steps_Common/page.mdx#createremotelinkstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","description":"A link for two records of linked data models.\n\nThe keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLinksWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","description":"A link for two records of linked data models.\n\nThe keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLinksWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## dismissLinksWorkflow
|
||||
|
||||
This workflow dismisses one or more links between records.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"dismissLinksWorkflow","steps":[{"type":"step","name":"dismissRemoteLinkStep","description":"This step removes remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#dismiss-link).\n\n","link":"../core_flows.Steps_Common/page.mdx#dismissremotelinkstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","description":"A link for two records of linked data models.\n\nThe keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissLinksWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","description":"A link for two records of linked data models.\n\nThe keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissLinksWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updateLinksWorkflow
|
||||
|
||||
This workflow updates one or more links between records.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateLinksWorkflow","steps":[{"type":"step","name":"updateRemoteLinksStep","description":"","link":"../core_flows.Steps_Common/page.mdx#updateremotelinksstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","description":"A link for two records of linked data models.\n\nThe keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLinksWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","description":"A link for two records of linked data models.\n\nThe keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLinksWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
@@ -0,0 +1,333 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Customer
|
||||
|
||||
<TypeList types={[{"name":"addresses","type":"[CreateCustomerAddressDTO](../../customer/interfaces/customer.CreateCustomerAddressDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`null` \\| `string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is default shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is the default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`null` \\| `string`","description":"The company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`null` \\| `string`","description":"The address 1.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`null` \\| `string`","description":"The address 2.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`null` \\| `string`","description":"The province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`null` \\| `string`","description":"The postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"addresses","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","Line truncated
|
||||
|
||||
___
|
||||
|
||||
## createCustomerAddressesWorkflowId
|
||||
|
||||
`Const` **createCustomerAddressesWorkflowId**: `"create-customer-addresses"`
|
||||
|
||||
___
|
||||
|
||||
## createCustomerAccountWorkflowId
|
||||
|
||||
`Const` **createCustomerAccountWorkflowId**: `"create-customer-account"`
|
||||
|
||||
___
|
||||
|
||||
## createCustomersWorkflowId
|
||||
|
||||
`Const` **createCustomersWorkflowId**: `"create-customers"`
|
||||
|
||||
___
|
||||
|
||||
## deleteCustomerAddressesWorkflowId
|
||||
|
||||
`Const` **deleteCustomerAddressesWorkflowId**: `"delete-customer-addresses"`
|
||||
|
||||
___
|
||||
|
||||
## deleteCustomersWorkflowId
|
||||
|
||||
`Const` **deleteCustomersWorkflowId**: `"delete-customers"`
|
||||
|
||||
___
|
||||
|
||||
## updateCustomerAddressesWorkflowId
|
||||
|
||||
`Const` **updateCustomerAddressesWorkflowId**: `"update-customer-addresses"`
|
||||
|
||||
___
|
||||
|
||||
## updateCustomersWorkflowId
|
||||
|
||||
`Const` **updateCustomersWorkflowId**: `"update-customers"`
|
||||
|
||||
___
|
||||
|
||||
## createCustomerAddressesWorkflow
|
||||
|
||||
This workflow creates one or more customer address.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createCustomerAddressesWorkflow","steps":[{"type":"step","name":"maybeUnsetDefaultShippingAddressesStep","description":"This step unsets the `is_default_shipping` property of one or more addresses.","link":"../core_flows.Steps_Customer/page.mdx#maybeunsetdefaultshippingaddressesstep","depth":1},{"type":"step","name":"maybeUnsetDefaultBillingAddressesStep","description":"This step unsets the `is_default_billing` property of one or more addresses.","link":"../core_flows.Steps_Customer/page.mdx#maybeunsetdefaultbillingaddressesstep","depth":1},{"type":"step","name":"createCustomerAddressesStep","description":"This step creates one or more customer addresses.","link":"../core_flows.Steps_Customer/page.mdx#createcustomeraddressesstep","depth":2},{"type":"hook","name":"addressesCreated","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#addressesCreated","depth":3}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateCustomerAddressesWorkflowInput","type":"[CreateCustomerAddressesWorkflowInput](../types/core_flows.CreateCustomerAddressesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"addresses","type":"[CreateCustomerAddressDTO](../../customer/interfaces/customer.CreateCustomerAddressDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`null` \\| `string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is default shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is the default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`null` \\| `string`","description":"The company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`null` \\| `string`","description":"The address 1.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`null` \\| `string`","description":"The address 2.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`null` \\| `string`","description":"The province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`null` \\| `string`","description":"The postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerAddressesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerAddressDTO[]","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CustomerAddressDTO","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer address details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerAddressesWorkflow"/>
|
||||
|
||||
### Hooks
|
||||
|
||||
#### addressesCreated
|
||||
|
||||
##### Example
|
||||
|
||||
```ts
|
||||
import { createCustomerAddressesWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
createCustomerAddressesWorkflow.hooks.addressesCreated(
|
||||
async (({ addresses, additional_data }, { container }) => {
|
||||
//TODO
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
##### Input
|
||||
|
||||
Handlers consuming this hook accept the following input.
|
||||
|
||||
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"addresses","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown> | undefined`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addressesCreated"/>
|
||||
|
||||
___
|
||||
|
||||
## createCustomerAccountWorkflow
|
||||
|
||||
This workflow creates an authentication account for a customer.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createCustomerAccountWorkflow","steps":[{"type":"step","name":"createCustomersStep","description":"This step creates one or more customers.","link":"../core_flows.Steps_Customer/page.mdx#createcustomersstep","depth":1},{"type":"step","name":"setAuthAppMetadataStep","description":"This step sets the `app_metadata` property of an auth identity.","link":"../core_flows.Steps_Auth/page.mdx#setauthappmetadatastep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateCustomerAccountWorkflowInput","type":"[CreateCustomerAccountWorkflowInput](../types/core_flows.CreateCustomerAccountWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"authIdentityId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customersData","type":"[CreateCustomerDTO](../../customer/interfaces/customer.CreateCustomerDTO/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"Omit<[CreateCustomerAddressDTO](../../customer/interfaces/customer.CreateCustomerAddressDTO/page.mdx), \"customer_id\">[]","description":"The addresses of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_name","type":"`null` \\| `string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is default shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is the default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`null` \\| `string`","description":"The company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`null` \\| `string`","description":"The address 1.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`null` \\| `string`","description":"The address 2.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`null` \\| `string`","description":"The province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`null` \\| `string`","description":"The postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"[MetadataType](../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerAccountWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerDTO","type":"[CustomerDTO](../../customer/interfaces/customer.CustomerDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"`object`[]","description":"The groups of the customer.","optional":false,"defaultVaLine truncated
|
||||
|
||||
___
|
||||
|
||||
## createCustomersWorkflow
|
||||
|
||||
This workflow creates one or more customers.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createCustomersWorkflow","steps":[{"type":"step","name":"createCustomersStep","description":"This step creates one or more customers.","link":"../core_flows.Steps_Customer/page.mdx#createcustomersstep","depth":1},{"type":"hook","name":"customersCreated","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#customersCreated","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateCustomersWorkflowInput","type":"[CreateCustomersWorkflowInput](../types/core_flows.CreateCustomersWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"customersData","type":"[CreateCustomerDTO](../../customer/interfaces/customer.CreateCustomerDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"Omit<[CreateCustomerAddressDTO](../../customer/interfaces/customer.CreateCustomerAddressDTO/page.mdx), \"customer_id\">[]","description":"The addresses of the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_name","type":"`null` \\| `string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is default shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is the default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`null` \\| `string`","description":"The company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`null` \\| `string`","description":"The address 1.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`null` \\| `string`","description":"The address 2.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`null` \\| `string`","description":"The province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`null` \\| `string`","description":"The postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"[MetadataType](../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomersWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerDTO[]","type":"[CustomerDTO](../../customer/interfaces/customer.CustomerDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CustomerDTO","type":"[CustomerDTO](../../customer/interfaces/customer.CustomerDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"phone","type":"`null` \\| `string`","descriptiLine truncated
|
||||
|
||||
### Hooks
|
||||
|
||||
#### customersCreated
|
||||
|
||||
##### Example
|
||||
|
||||
```ts
|
||||
import { createCustomersWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
createCustomersWorkflow.hooks.customersCreated(
|
||||
async (({ customers, additional_data }, { container }) => {
|
||||
//TODO
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
##### Input
|
||||
|
||||
Handlers consuming this hook accept the following input.
|
||||
|
||||
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"customers","type":"[CustomerDTO](../../customer/interfaces/customer.CustomerDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"`object`[]","description":"The groups of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown> | undefined`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="customersCreated"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteCustomerAddressesWorkflow
|
||||
|
||||
This workflow deletes one or more customer addresses.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteCustomerAddressesWorkflow","steps":[{"type":"step","name":"deleteCustomerAddressesStep","description":"This step deletes one or more customer addresses.","link":"../core_flows.Steps_Customer/page.mdx#deletecustomeraddressesstep","depth":1},{"type":"hook","name":"addressesDeleted","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#addressesDeleted","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteCustomerAddressesWorkflowInput","type":"[DeleteCustomerAddressesWorkflowInput](../types/core_flows.DeleteCustomerAddressesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteCustomerAddressesWorkflow"/>
|
||||
|
||||
### Hooks
|
||||
|
||||
#### addressesDeleted
|
||||
|
||||
##### Example
|
||||
|
||||
```ts
|
||||
import { deleteCustomerAddressesWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
deleteCustomerAddressesWorkflow.hooks.addressesDeleted(
|
||||
async (({ ids }, { container }) => {
|
||||
//TODO
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
##### Input
|
||||
|
||||
Handlers consuming this hook accept the following input.
|
||||
|
||||
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addressesDeleted"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteCustomersWorkflow
|
||||
|
||||
This workflow deletes one or more customers.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteCustomersWorkflow","steps":[{"type":"step","name":"deleteCustomersStep","description":"This step deletes one or more customers.","link":"../core_flows.Steps_Customer/page.mdx#deletecustomersstep","depth":1},{"type":"hook","name":"customersDeleted","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#customersDeleted","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteCustomersWorkflowInput","type":"[DeleteCustomersWorkflowInput](../types/core_flows.DeleteCustomersWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteCustomersWorkflow"/>
|
||||
|
||||
### Hooks
|
||||
|
||||
#### customersDeleted
|
||||
|
||||
##### Example
|
||||
|
||||
```ts
|
||||
import { deleteCustomersWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
deleteCustomersWorkflow.hooks.customersDeleted(
|
||||
async (({ ids }, { container }) => {
|
||||
//TODO
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
##### Input
|
||||
|
||||
Handlers consuming this hook accept the following input.
|
||||
|
||||
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="customersDeleted"/>
|
||||
|
||||
___
|
||||
|
||||
## updateCustomerAddressesWorkflow
|
||||
|
||||
This workflow updates one or more customer addresses.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateCustomerAddressesWorkflow","steps":[{"type":"step","name":"maybeUnsetDefaultShippingAddressesStep","description":"This step unsets the `is_default_shipping` property of one or more addresses.","link":"../core_flows.Steps_Customer/page.mdx#maybeunsetdefaultshippingaddressesstep","depth":1},{"type":"step","name":"maybeUnsetDefaultBillingAddressesStep","description":"This step unsets the `is_default_billing` property of one or more addresses.","link":"../core_flows.Steps_Customer/page.mdx#maybeunsetdefaultbillingaddressesstep","depth":1},{"type":"step","name":"updateCustomerAddressesStep","description":"This step updates one or more customer addresses.","link":"../core_flows.Steps_Customer/page.mdx#updatecustomeraddressesstep","depth":2},{"type":"hook","name":"addressesUpdated","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#addressesUpdated","depth":3}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateCustomerAddressesWorkflowInput","type":"[UpdateCustomerAddressesWorkflowInput](../types/core_flows.UpdateCustomerAddressesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterableCustomerAddressProps](../../customer/interfaces/customer.FilterableCustomerAddressProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"q","type":"`string`","description":"Searches for addreses by properties such as name and street using this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the customer address by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string` \\| [OperatorMap](../../customer/types/customer.OperatorMap/page.mdx)<string>","description":"Filter addresses by name.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T> \\| [ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default_shipping","type":"`boolean` \\| [OperatorMap](../../customer/types/customer.OperatorMap/page.mdx)<boolean>","description":"Filter addresses by whether they're the default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T> \\| [ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","deLine truncated
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerAddressDTO[]","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CustomerAddressDTO","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer address details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateCustomerAddressesWorkflow"/>
|
||||
|
||||
### Hooks
|
||||
|
||||
#### addressesUpdated
|
||||
|
||||
##### Example
|
||||
|
||||
```ts
|
||||
import { updateCustomerAddressesWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
updateCustomerAddressesWorkflow.hooks.addressesUpdated(
|
||||
async (({ addresses, additional_data }, { container }) => {
|
||||
//TODO
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
##### Input
|
||||
|
||||
Handlers consuming this hook accept the following input.
|
||||
|
||||
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"addresses","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown> | undefined`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addressesUpdated"/>
|
||||
|
||||
___
|
||||
|
||||
## updateCustomersWorkflow
|
||||
|
||||
This workflow updates one or more customers.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateCustomersWorkflow","steps":[{"type":"step","name":"updateCustomersStep","description":"This step updates one or more customers.","link":"../core_flows.Steps_Customer/page.mdx#updatecustomersstep","depth":1},{"type":"hook","name":"customersUpdated","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#customersUpdated","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateCustomersWorkflowInput","type":"[UpdateCustomersWorkflowInput](../types/core_flows.UpdateCustomersWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterableCustomerProps](../../customer/interfaces/customer.FilterableCustomerProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"q","type":"`string`","description":"Searches for customers by properties such as name and email using this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the customer by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string` \\| `string`[] \\| [OperatorMap](../../customer/types/customer.OperatorMap/page.mdx)<string>","description":"Filter by email.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T> \\| [ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"groups","type":"`string` \\| `string`[] \\| [FilterableCustomerGroupProps](../../customer/interfaces/customer.FilterableCustomerGroupProps/page.mdx)","description":"Filter by associated customer group.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"q","type":"`string`","description":"Searches for customer groups by name using this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the customer group by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../customer/types/customer.OperatorMap/page.mdx)<string>","description":"Filter customer groups by name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"Line truncated
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerDTO[]","type":"[CustomerDTO](../../customer/interfaces/customer.CustomerDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CustomerDTO","type":"[CustomerDTO](../../customer/interfaces/customer.CustomerDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"phone","type":"`null` \\| `string`","descriptiLine truncated
|
||||
|
||||
### Hooks
|
||||
|
||||
#### customersUpdated
|
||||
|
||||
##### Example
|
||||
|
||||
```ts
|
||||
import { updateCustomersWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
updateCustomersWorkflow.hooks.customersUpdated(
|
||||
async (({ customers, additional_data }, { container }) => {
|
||||
//TODO
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
##### Input
|
||||
|
||||
Handlers consuming this hook accept the following input.
|
||||
|
||||
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"customers","type":"[CustomerDTO](../../customer/interfaces/customer.CustomerDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"`object`[]","description":"The groups of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown> | undefined`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="customersUpdated"/>
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
|
||||
___
|
||||
|
||||
## \_\_type
|
||||
|
||||
**\_\_type**:
|
||||
@@ -0,0 +1,93 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Customer Group
|
||||
|
||||
<TypeList types={[{"name":"customersData","type":"[CreateCustomerGroupDTO](../../customer/interfaces/customer.CreateCustomerGroupDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"Who created the customer group. For example,\nthe ID of the user that created the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"[FilterableCustomerGroupProps](../../customer/interfaces/customer.FilterableCustomerGroupProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"q","type":"`string`","description":"Searches for customer groups by name using this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the customer group by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../customer/types/customer.OperatorMap/page.mdx)<string>","description":"Filter customer groups by name.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T> \\| [ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customers","type":"`string` \\| `string`[] \\| [FilterableCustomerProps](../../customer/interfaces/customer.FilterableCustomerProps/page.mdx)","description":"Filter Line truncated
|
||||
|
||||
___
|
||||
|
||||
## createCustomerGroupsWorkflowId
|
||||
|
||||
`Const` **createCustomerGroupsWorkflowId**: `"create-customer-groups"`
|
||||
|
||||
___
|
||||
|
||||
## deleteCustomerGroupsWorkflowId
|
||||
|
||||
`Const` **deleteCustomerGroupsWorkflowId**: `"delete-customer-groups"`
|
||||
|
||||
___
|
||||
|
||||
## linkCustomersToCustomerGroupWorkflowId
|
||||
|
||||
`Const` **linkCustomersToCustomerGroupWorkflowId**: `"link-customers-to-customer-group"`
|
||||
|
||||
___
|
||||
|
||||
## updateCustomerGroupsWorkflowId
|
||||
|
||||
`Const` **updateCustomerGroupsWorkflowId**: `"update-customer-groups"`
|
||||
|
||||
___
|
||||
|
||||
## createCustomerGroupsWorkflow
|
||||
|
||||
This workflow creates one or more customer groups.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createCustomerGroupsWorkflow","steps":[{"type":"step","name":"createCustomerGroupsStep","description":"This step creates one or more customer groups.","link":"../core_flows.Steps_Customer_Group/page.mdx#createcustomergroupsstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateCustomerGroupsWorkflowInput","type":"[CreateCustomerGroupsWorkflowInput](../types/core_flows.CreateCustomerGroupsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"customersData","type":"[CreateCustomerGroupDTO](../../customer/interfaces/customer.CreateCustomerGroupDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"Who created the customer group. For example,\nthe ID of the user that created the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerGroupsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerGroupDTO[]","type":"[CustomerGroupDTO](../../customer/interfaces/customer.CustomerGroupDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CustomerGroupDTO","type":"[CustomerGroupDTO](../../customer/interfaces/customer.CustomerGroupDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer group details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customers","type":"Partial<[CustomerDTO](../../customer/interfaces/customer.CustomerDTO/page.mdx)>[]","description":"The customers of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"`object`[]","description":"The groups of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerGroupsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteCustomerGroupsWorkflow
|
||||
|
||||
This workflow deletes one or more customer groups.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteCustomerGroupsWorkflow","steps":[{"type":"step","name":"deleteCustomerGroupStep","description":"This step deletes one or more customer groups.","link":"../core_flows.Steps_Customer_Group/page.mdx#deletecustomergroupstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteCustomerGroupsWorkflowInput","type":"[DeleteCustomerGroupsWorkflowInput](../types/core_flows.DeleteCustomerGroupsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteCustomerGroupsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## linkCustomersToCustomerGroupWorkflow
|
||||
|
||||
This workflow creates one or more links between customer and customer group records.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"linkCustomersToCustomerGroupWorkflow","steps":[{"type":"step","name":"linkCustomersToCustomerGroupStep","description":"This step creates one or more links between customer and customer group records.","link":"../core_flows.Steps_Customer_Group/page.mdx#linkcustomerstocustomergroupstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"LinkWorkflowInput","type":"[LinkWorkflowInput](../../types/CommonTypes/types/types.CommonTypes.LinkWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"add","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="linkCustomersToCustomerGroupWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updateCustomerGroupsWorkflow
|
||||
|
||||
This workflow updates one or more customer groups.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateCustomerGroupsWorkflow","steps":[{"type":"step","name":"updateCustomerGroupsStep","description":"This step updates one or more customer groups.","link":"../core_flows.Steps_Customer_Group/page.mdx#updatecustomergroupsstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateCustomerGroupsWorkflowInput","type":"[UpdateCustomerGroupsWorkflowInput](../types/core_flows.UpdateCustomerGroupsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterableCustomerGroupProps](../../customer/interfaces/customer.FilterableCustomerGroupProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"q","type":"`string`","description":"Searches for customer groups by name using this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the customer group by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../customer/types/customer.OperatorMap/page.mdx)<string>","description":"Filter customer groups by name.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T> \\| [ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../customer/types/customer.Query/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../customer/types/customer.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customers","type":"`string` \\| `string`[] \\| [FilterableCustomerProps](../../customer/interfaces/customer.FilterableCustomerProps/page.mdx)","description":"Filter customer groups by associated customers.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"q","type":"`string`","description":"Searches for customers by properties such as name and email using this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the customer by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string` \\| `string`[] \\| [OperatorMap](../../customer/types/customer.OperatorMap/page.mdx)<string>","description":"Filter by email.","optional":true,"defaultValue":"","expandable":fLine truncated
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerGroupDTO[]","type":"[CustomerGroupDTO](../../customer/interfaces/customer.CustomerGroupDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CustomerGroupDTO","type":"[CustomerGroupDTO](../../customer/interfaces/customer.CustomerGroupDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer group details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customers","type":"Partial<[CustomerDTO](../../customer/interfaces/customer.CustomerDTO/page.mdx)>[]","description":"The customers of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"`object`[]","description":"The groups of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateCustomerGroupsWorkflow"/>
|
||||
@@ -0,0 +1,21 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Defaults
|
||||
|
||||
## createDefaultsWorkflowID
|
||||
|
||||
`Const` **createDefaultsWorkflowID**: `"create-defaults"`
|
||||
|
||||
___
|
||||
|
||||
## createDefaultsWorkflow
|
||||
|
||||
This workflow creates default data for a Medusa application.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createDefaultsWorkflow","steps":[{"type":"step","name":"createDefaultSalesChannelStep","description":"This step creates a default sales channel.","link":"../core_flows.Steps_Sales_Channel/page.mdx#createdefaultsaleschannelstep","depth":1},{"type":"step","name":"createDefaultStoreStep","description":"This step creates a default store.","link":"../core_flows.Steps_Defaults/page.mdx#createdefaultstorestep","depth":2}]}} />
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"undefined \\| StoreDTO","type":"`undefined` \\| [StoreDTO](../../store/interfaces/store.StoreDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"undefined \\| StoreDTO","type":"`undefined` \\| [StoreDTO](../../store/interfaces/store.StoreDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createDefaultsWorkflow"/>
|
||||
@@ -0,0 +1,49 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_File
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"files","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"filename","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mimeType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"content","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"access","type":"`\"public\"` \\| `\"private\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"filename","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mimeType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"content","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"access","type":"`\"public\"` \\| `\"private\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Workflows_File"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteFilesWorkflowId
|
||||
|
||||
`Const` **deleteFilesWorkflowId**: `"delete-files"`
|
||||
|
||||
___
|
||||
|
||||
## uploadFilesWorkflowId
|
||||
|
||||
`Const` **uploadFilesWorkflowId**: `"upload-files"`
|
||||
|
||||
___
|
||||
|
||||
## deleteFilesWorkflow
|
||||
|
||||
This workflow deletes one or more files.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteFilesWorkflow","steps":[{"type":"step","name":"deleteFilesStep","description":"This step deletes one or more files.","link":"../core_flows.Steps_File/page.mdx#deletefilesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteFilesWorkflowInput","type":"[DeleteFilesWorkflowInput](../types/core_flows.DeleteFilesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteFilesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## uploadFilesWorkflow
|
||||
|
||||
This workflow uploads one or more files.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"uploadFilesWorkflow","steps":[{"type":"step","name":"uploadFilesStep","description":"This step uploads one or more files.","link":"../core_flows.Steps_File/page.mdx#uploadfilesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UploadFilesWorkflowInput","type":"[UploadFilesWorkflowInput](../types/core_flows.UploadFilesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"files","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"filename","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mimeType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"content","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"access","type":"`\"public\"` \\| `\"private\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="uploadFilesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"FileDTO[]","type":"[FileDTO](../../types/FileTypes/interfaces/types.FileTypes.FileDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"FileDTO","type":"[FileDTO](../../types/FileTypes/interfaces/types.FileTypes.FileDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the File.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the File.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="uploadFilesWorkflow"/>
|
||||
@@ -0,0 +1,345 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Fulfillment
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Workflows_Fulfillment"/>
|
||||
|
||||
___
|
||||
|
||||
## batchShippingOptionRulesWorkflowId
|
||||
|
||||
`Const` **batchShippingOptionRulesWorkflowId**: `"batch-shipping-option-rules"`
|
||||
|
||||
___
|
||||
|
||||
## cancelFulfillmentWorkflowId
|
||||
|
||||
`Const` **cancelFulfillmentWorkflowId**: `"cancel-fulfillment-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## createFulfillmentWorkflowId
|
||||
|
||||
`Const` **createFulfillmentWorkflowId**: `"create-fulfillment-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## createReturnFulfillmentWorkflowId
|
||||
|
||||
`Const` **createReturnFulfillmentWorkflowId**: `"create-return-fulfillment-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## createServiceZonesWorkflowId
|
||||
|
||||
`Const` **createServiceZonesWorkflowId**: `"create-service-zones-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## createShipmentWorkflowId
|
||||
|
||||
`Const` **createShipmentWorkflowId**: `"create-shipment-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## createShippingOptionsWorkflowId
|
||||
|
||||
`Const` **createShippingOptionsWorkflowId**: `"create-shipping-options-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## createShippingProfilesWorkflowId
|
||||
|
||||
`Const` **createShippingProfilesWorkflowId**: `"create-shipping-profiles-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## deleteFulfillmentSetsWorkflowId
|
||||
|
||||
`Const` **deleteFulfillmentSetsWorkflowId**: `"delete-fulfillment-sets-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## deleteServiceZonesWorkflowId
|
||||
|
||||
`Const` **deleteServiceZonesWorkflowId**: `"delete-service-zones-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## deleteShippingOptionsWorkflowId
|
||||
|
||||
`Const` **deleteShippingOptionsWorkflowId**: `"delete-shipping-options-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## updateFulfillmentWorkflowId
|
||||
|
||||
`Const` **updateFulfillmentWorkflowId**: `"update-fulfillment-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## updateServiceZonesWorkflowId
|
||||
|
||||
`Const` **updateServiceZonesWorkflowId**: `"update-service-zones-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## updateShippingOptionsWorkflowId
|
||||
|
||||
`Const` **updateShippingOptionsWorkflowId**: `"update-shipping-options-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## updateShippingProfilesWorkflowId
|
||||
|
||||
`Const` **updateShippingProfilesWorkflowId**: `"update-shipping-profiles-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## batchShippingOptionRulesWorkflow
|
||||
|
||||
This workflow manages shipping option rules by creating, updating, or deleting them.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"batchShippingOptionRulesWorkflow","steps":[{"type":"step","name":"createShippingOptionRulesStep","description":"This step creates one or more shipping option rules.","link":"../core_flows.Steps_Fulfillment/page.mdx#createshippingoptionrulesstep","depth":1},{"type":"step","name":"deleteShippingOptionRulesStep","description":"This step deletes one or more shipping option rules.","link":"../core_flows.Steps_Fulfillment/page.mdx#deleteshippingoptionrulesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"BatchWorkflowInput","type":"[BatchWorkflowInput](../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowInput/page.mdx)<[CreateShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.CreateShippingOptionRuleDTO/page.mdx), [UpdateShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.UpdateShippingOptionRuleDTO/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateShippingOptionRuleDTO","type":"[CreateShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.CreateShippingOptionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The shipping option rule to be created.","expandable":false,"children":[{"name":"attribute","type":"`string`","description":"The attribute of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[RuleOperatorType](../../fulfillment/types/fulfillment.RuleOperatorType/page.mdx)","description":"The operator of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `string`[]","description":"The value(s) of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"UpdateShippingOptionRuleDTO","type":"[UpdateShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.UpdateShippingOptionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The attributes to update in the shipping option rule.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the shipping option rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[RuleOperatorType](../../fulfillment/types/fulfillment.RuleOperatorType/page.mdx)","description":"The operator of the shipping option rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `string`[]","description":"The value(s) of the shipping option rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`string`","description":"The associated shipping option's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchShippingOptionRulesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"BatchWorkflowOutput","type":"[BatchWorkflowOutput](../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowOutput/page.mdx)<[ShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionRuleDTO/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingOptionRuleDTO","type":"[ShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The shipping option rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"`string`","description":"The operator of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `object`","description":"The values of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `string`[]","description":"The values of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_option_id","type":"`string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","description":"The associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[ShippingProfileDTO](../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)","description":"The associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_provider","type":"[FulfillmentProviderDTO](../../fulfillment/interfaces/fulfillment.FulfillmentProviderDTO/page.mdx)","description":"The associated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ShippingOptionTypeDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionTypeDTO/page.mdx)","description":"The associated shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[ShippingOptionRuleDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionRuleDTO/page.mdx)[]","description":"The rules associated with the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillments","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)[]","description":"The fulfillments associated with the shipping option.","optional":false,"defaultValue":"","expLine truncated
|
||||
|
||||
___
|
||||
|
||||
## cancelFulfillmentWorkflow
|
||||
|
||||
This workflow cancels a fulfillment.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"cancelFulfillmentWorkflow","steps":[{"type":"step","name":"cancelFulfillmentStep","description":"This step cancels a fulfillment.","link":"../core_flows.Steps_Fulfillment/page.mdx#cancelfulfillmentstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelFulfillmentWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## createFulfillmentWorkflow
|
||||
|
||||
This workflow creates a fulfillment.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createFulfillmentWorkflow","steps":[{"type":"step","name":"createFulfillmentStep","description":"This step creates a fulfillment","link":"../core_flows.Steps_Fulfillment/page.mdx#createfulfillmentstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateFulfillmentWorkflowInput","type":"`CreateFulfillmentWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillmentWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"FulfillmentDTO","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `Date`","description":"The date the fulfillment was packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `Date`","description":"The date the fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `Date`","description":"The date the fulfillment was delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the fulfillment provider to process\nthe fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option","type":"`null` \\| [ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","description":"The associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optioLine truncated
|
||||
|
||||
___
|
||||
|
||||
## createReturnFulfillmentWorkflow
|
||||
|
||||
This workflow creates a fulfillment for a return.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createReturnFulfillmentWorkflow","steps":[{"type":"step","name":"createReturnFulfillmentStep","description":"This step creates a fulfillment for a return.","link":"../core_flows.Steps_Fulfillment/page.mdx#createreturnfulfillmentstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateFulfillmentWorkflowInput","type":"`CreateFulfillmentWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReturnFulfillmentWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"FulfillmentDTO","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `Date`","description":"The date the fulfillment was packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `Date`","description":"The date the fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `Date`","description":"The date the fulfillment was delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the fulfillment provider to process\nthe fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option","type":"`null` \\| [ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","description":"The associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optioLine truncated
|
||||
|
||||
___
|
||||
|
||||
## createServiceZonesWorkflow
|
||||
|
||||
This workflow creates one or more service zones.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createServiceZonesWorkflow","steps":[{"type":"step","name":"createServiceZonesStep","description":"This step creates one or more service zones.","link":"../core_flows.Steps_Fulfillment/page.mdx#createservicezonesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateServiceZonesWorkflowInput","type":"`CreateServiceZonesWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createServiceZonesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"ServiceZoneDTO[]","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ServiceZoneDTO","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","optional":false,"defaultValue":"","description":"The service zone details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zones","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","description":"The service zones associated with the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"geo_zones","type":"[GeoZoneDTO](../../fulfillment/interfaces/fulfillment.GeoZoneDTO/page.mdx)[]","description":"The geo zones assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[GeoZoneType](../../fulfillment/types/fulfillment.GeoZoneType/page.mdx)","description":"The type of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The province code of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_expression","type":"`null` \\| `Record<string, unknown>`","description":"The postal expression of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_options","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","description":"The shipping options assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","descriLine truncated
|
||||
|
||||
___
|
||||
|
||||
## createShipmentWorkflow
|
||||
|
||||
This workflow creates shipments for a fulfillment.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createShipmentWorkflow","steps":[{"type":"step","name":"validateShipmentStep","description":"This step validates that a shipment can be created for a fulfillment.","link":"../core_flows.Steps_Fulfillment/page.mdx#validateshipmentstep","depth":1},{"type":"workflow","name":"updateFulfillmentWorkflow","description":"This workflow updates a fulfillment.","link":"page.mdx#updatefulfillmentworkflow","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateShipmentWorkflowInput","type":"`CreateShipmentWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShipmentWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"FulfillmentDTO","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `Date`","description":"The date the fulfillment was packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `Date`","description":"The date the fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `Date`","description":"The date the fulfillment was delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the fulfillment provider to process\nthe fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option","type":"`null` \\| [ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","description":"The associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optioLine truncated
|
||||
|
||||
___
|
||||
|
||||
## createShippingOptionsWorkflow
|
||||
|
||||
This workflow creates one or more shipping options.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createShippingOptionsWorkflow","steps":[{"type":"step","name":"upsertShippingOptionsStep","description":"This step creates or updates shipping options.","link":"../core_flows.Steps_Fulfillment/page.mdx#upsertshippingoptionsstep","depth":1},{"type":"step","name":"createShippingOptionsPriceSetsStep","description":"This step creates price sets for one or more shipping options.","link":"../core_flows.Steps_Fulfillment/page.mdx#createshippingoptionspricesetsstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateShippingOptionsWorkflowInput[]","type":"`CreateShippingOptionsWorkflowInput`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateShippingOptionsWorkflowInput","type":"`CreateShippingOptionsWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShippingOptionsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"CreateShippingOptionsWorkflowOutput","type":"`CreateShippingOptionsWorkflowOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShippingOptionsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## createShippingProfilesWorkflow
|
||||
|
||||
This workflow creates one or more shipping profiles.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createShippingProfilesWorkflow","steps":[{"type":"step","name":"createShippingProfilesStep","description":"This step creates one or more shipping profiles.","link":"../core_flows.Steps_Fulfillment/page.mdx#createshippingprofilesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateShippingProfilesWorkflowInput","type":"`CreateShippingProfilesWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShippingProfilesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"CreateShippingProfilesWorkflowOutput","type":"`CreateShippingProfilesWorkflowOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createShippingProfilesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteFulfillmentSetsWorkflow
|
||||
|
||||
This workflow deletes one or more fulfillment sets.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteFulfillmentSetsWorkflow","steps":[{"type":"step","name":"deleteFulfillmentSetsStep","description":"This step deletes one or more fulfillment sets.","link":"../core_flows.Steps_Fulfillment/page.mdx#deletefulfillmentsetsstep","depth":1},{"type":"step","name":"removeRemoteLinkStep","description":"This step deletes linked records of a record.\n\nLearn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#cascade-delete-linked-records)\n\n","link":"../core_flows.Steps_Common/page.mdx#removeremotelinkstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteFulfillmentSetsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteServiceZonesWorkflow
|
||||
|
||||
This workflow deletes one or more service zones.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteServiceZonesWorkflow","steps":[{"type":"step","name":"deleteServiceZonesStep","description":"This step deletes one or more service zones.","link":"../core_flows.Steps_Fulfillment/page.mdx#deleteservicezonesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteServiceZonesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteShippingOptionsWorkflow
|
||||
|
||||
This workflow deletes one or more shipping options.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteShippingOptionsWorkflow","steps":[{"type":"step","name":"deleteShippingOptionsStep","description":"This step deletes one or more shipping options.","link":"../core_flows.Steps_Fulfillment/page.mdx#deleteshippingoptionsstep","depth":1},{"type":"step","name":"removeRemoteLinkStep","description":"This step deletes linked records of a record.\n\nLearn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#cascade-delete-linked-records)\n\n","link":"../core_flows.Steps_Common/page.mdx#removeremotelinkstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteShippingOptionsWorkflowInput","type":"`DeleteShippingOptionsWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteShippingOptionsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updateFulfillmentWorkflow
|
||||
|
||||
This workflow updates a fulfillment.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateFulfillmentWorkflow","steps":[{"type":"step","name":"updateFulfillmentStep","description":"This step updates a fulfillment.","link":"../core_flows.Steps_Fulfillment/page.mdx#updatefulfillmentstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateFulfillmentWorkflowInput","type":"`UpdateFulfillmentWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateFulfillmentWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"FulfillmentDTO","type":"[FulfillmentDTO](../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `Date`","description":"The date the fulfillment was packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `Date`","description":"The date the fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `Date`","description":"The date the fulfillment was delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the fulfillment provider to process\nthe fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option","type":"`null` \\| [ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","description":"The associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optioLine truncated
|
||||
|
||||
___
|
||||
|
||||
## updateServiceZonesWorkflow
|
||||
|
||||
This workflow updates one or more service zones.
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateServiceZonesWorkflowInput","type":"`UpdateServiceZonesWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateServiceZonesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"ServiceZoneDTO[]","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ServiceZoneDTO","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","optional":false,"defaultValue":"","description":"The service zone details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_set","type":"[FulfillmentSetDTO](../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)","description":"The fulfillment set assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zones","type":"[ServiceZoneDTO](../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)[]","description":"The service zones associated with the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fulfillment_set_id","type":"`string`","description":"The fulfillment set id of the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"geo_zones","type":"[GeoZoneDTO](../../fulfillment/interfaces/fulfillment.GeoZoneDTO/page.mdx)[]","description":"The geo zones assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[GeoZoneType](../../fulfillment/types/fulfillment.GeoZoneType/page.mdx)","description":"The type of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The province code of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_expression","type":"`null` \\| `Record<string, unknown>`","description":"The postal expression of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The update date of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the geo zone.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"shipping_options","type":"[ShippingOptionDTO](../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)[]","description":"The shipping options assoiated with the service zone.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","descriLine truncated
|
||||
|
||||
___
|
||||
|
||||
## updateShippingOptionsWorkflow
|
||||
|
||||
This workflow updates one or more shipping options.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateShippingOptionsWorkflow","steps":[{"type":"step","name":"upsertShippingOptionsStep","description":"This step creates or updates shipping options.","link":"../core_flows.Steps_Fulfillment/page.mdx#upsertshippingoptionsstep","depth":1},{"type":"step","name":"setShippingOptionsPricesStep","description":"This step sets the prices of one or more shipping options.","link":"../core_flows.Steps_Fulfillment/page.mdx#setshippingoptionspricesstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateShippingOptionsWorkflowInput[]","type":"`UpdateShippingOptionsWorkflowInput`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdateShippingOptionsWorkflowInput","type":"`UpdateShippingOptionsWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateShippingOptionsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"UpdateShippingOptionsWorkflowOutput","type":"`UpdateShippingOptionsWorkflowOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateShippingOptionsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updateShippingProfilesWorkflow
|
||||
|
||||
This workflow updates one or more shipping profiles.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateShippingProfilesWorkflow","steps":[{"type":"step","name":"updateShippingProfilesStep","description":"This step updates shipping profiles matching the specified filters.","link":"../core_flows.Steps_Fulfillment/page.mdx#updateshippingprofilesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateShippingProfilesWorkflowInput","type":"`UpdateShippingProfilesWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateShippingProfilesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"CreateShippingProfilesWorkflowOutput","type":"`CreateShippingProfilesWorkflowOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateShippingProfilesWorkflow"/>
|
||||
@@ -0,0 +1,173 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Inventory
|
||||
|
||||
<TypeList types={[{"name":"creates","type":"[CreateInventoryLevelInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateInventoryLevelInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"deletes","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[CreateInventoryItemInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateInventoryItemInput/page.mdx) & `object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"sku","type":"`null` \\| `string`","description":"The SKU of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The origin country of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The MID code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The title of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The thumbnail of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_levels","type":"`LocationLevelWithoutInventory`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"inventory_levels","type":"[CreateInventoryLevelInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateInventoryLevelInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stLine truncated
|
||||
|
||||
___
|
||||
|
||||
## bulkCreateDeleteLevelsWorkflowId
|
||||
|
||||
`Const` **bulkCreateDeleteLevelsWorkflowId**: `"bulk-create-delete-levels-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## createInventoryItemsWorkflowId
|
||||
|
||||
`Const` **createInventoryItemsWorkflowId**: `"create-inventory-items-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## createInventoryLevelsWorkflowId
|
||||
|
||||
`Const` **createInventoryLevelsWorkflowId**: `"create-inventory-levels-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## deleteInventoryItemWorkflowId
|
||||
|
||||
`Const` **deleteInventoryItemWorkflowId**: `"delete-inventory-item-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## deleteInventoryLevelsWorkflowId
|
||||
|
||||
`Const` **deleteInventoryLevelsWorkflowId**: `"delete-inventory-levels-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## updateInventoryItemsWorkflowId
|
||||
|
||||
`Const` **updateInventoryItemsWorkflowId**: `"update-inventory-items-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## updateInventoryLevelsWorkflowId
|
||||
|
||||
`Const` **updateInventoryLevelsWorkflowId**: `"update-inventory-levels-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## bulkCreateDeleteLevelsWorkflow
|
||||
|
||||
This workflow creates and deletes inventory levels.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"bulkCreateDeleteLevelsWorkflow","steps":[{"type":"step","name":"deleteInventoryLevelsFromItemAndLocationsStep","description":"This step removes one or more inventory levels by their associated inventory item and location.","link":"../core_flows.Steps_Inventory/page.mdx#deleteinventorylevelsfromitemandlocationsstep","depth":1},{"type":"step","name":"createInventoryLevelsStep","description":"This step creates one or more inventory levels.","link":"../core_flows.Steps_Inventory/page.mdx#createinventorylevelsstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"BulkCreateDeleteLevelsWorkflowInput","type":"[BulkCreateDeleteLevelsWorkflowInput](../interfaces/core_flows.BulkCreateDeleteLevelsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"creates","type":"[CreateInventoryLevelInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateInventoryLevelInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"deletes","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="bulkCreateDeleteLevelsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"InventoryLevelDTO[]","type":"[InventoryLevelDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.InventoryLevelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InventoryLevelDTO","type":"[InventoryLevelDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.InventoryLevelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The inventory level details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number`","description":"The reserved quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"available_quantity","type":"`number`","description":"The available quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="bulkCreateDeleteLevelsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## createInventoryItemsWorkflow
|
||||
|
||||
This workflow creates one or more inventory items.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createInventoryItemsWorkflow","steps":[{"type":"step","name":"createInventoryItemsStep","description":"This step creates one or more inventory items.","link":"../core_flows.Steps_Inventory/page.mdx#createinventoryitemsstep","depth":1},{"type":"workflow","name":"createInventoryLevelsWorkflow","description":"This workflow creates one or more inventory levels.","link":"page.mdx#createinventorylevelsworkflow","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateInventoryItemsWorkflowInput","type":"[CreateInventoryItemsWorkflowInput](../interfaces/core_flows.CreateInventoryItemsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"items","type":"[CreateInventoryItemInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateInventoryItemInput/page.mdx) & `object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"sku","type":"`null` \\| `string`","description":"The SKU of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The origin country of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The MID code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The title of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The thumbnail of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_levels","type":"`LocationLevelWithoutInventory`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createInventoryItemsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"InventoryItemDTO[]","type":"[InventoryItemDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.InventoryItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InventoryItemDTO","type":"[InventoryItemDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.InventoryItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The inventory item details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The SKU of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The origin country of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The mid code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The title of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The thumbnail of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createInventoryItemsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## createInventoryLevelsWorkflow
|
||||
|
||||
This workflow creates one or more inventory levels.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createInventoryLevelsWorkflow","steps":[{"type":"step","name":"validateInventoryLocationsStep","description":"This step ensures that the inventory levels exist for each specified pair of inventory item and location.","link":"../core_flows.Steps_Inventory/page.mdx#validateinventorylocationsstep","depth":1},{"type":"step","name":"createInventoryLevelsStep","description":"This step creates one or more inventory levels.","link":"../core_flows.Steps_Inventory/page.mdx#createinventorylevelsstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateInventoryLevelsWorkflowInput","type":"[CreateInventoryLevelsWorkflowInput](../interfaces/core_flows.CreateInventoryLevelsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"inventory_levels","type":"[CreateInventoryLevelInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateInventoryLevelInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createInventoryLevelsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"InventoryLevelDTO[]","type":"[InventoryLevelDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.InventoryLevelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InventoryLevelDTO","type":"[InventoryLevelDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.InventoryLevelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The inventory level details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number`","description":"The reserved quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"available_quantity","type":"`number`","description":"The available quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createInventoryLevelsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteInventoryItemWorkflow
|
||||
|
||||
This workflow deletes one or more inventory items.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteInventoryItemWorkflow","steps":[{"type":"step","name":"deleteInventoryItemStep","description":"This step deletes one or more inventory items.","link":"../core_flows.Steps_Inventory/page.mdx#deleteinventoryitemstep","depth":1},{"type":"step","name":"removeRemoteLinkStep","description":"This step deletes linked records of a record.\n\nLearn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#cascade-delete-linked-records)\n\n","link":"../core_flows.Steps_Common/page.mdx#removeremotelinkstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteInventoryItemWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteInventoryItemWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteInventoryLevelsWorkflow
|
||||
|
||||
This workflow deletes one or more inventory levels.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteInventoryLevelsWorkflow","steps":[{"type":"step","name":"deleteInventoryLevelsStep","description":"This step deletes one or more inventory levels.","link":"../core_flows.Steps_Inventory/page.mdx#deleteinventorylevelsstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteInventoryLevelsWorkflowInput","type":"[DeleteInventoryLevelsWorkflowInput](../interfaces/core_flows.DeleteInventoryLevelsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteInventoryLevelsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteInventoryLevelsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updateInventoryItemsWorkflow
|
||||
|
||||
This workflow updates one or more inventory items.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateInventoryItemsWorkflow","steps":[{"type":"step","name":"updateInventoryItemsStep","description":"This step updates one or more inventory items.","link":"../core_flows.Steps_Inventory/page.mdx#updateinventoryitemsstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateInventoryItemsWorkflowInput","type":"[UpdateInventoryItemsWorkflowInput](../interfaces/core_flows.UpdateInventoryItemsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"updates","type":"[UpdateInventoryItemInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.UpdateInventoryItemInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The SKU of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The origin country of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The MID code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The title of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The thumbnail of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateInventoryItemsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"InventoryItemDTO[]","type":"[InventoryItemDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.InventoryItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InventoryItemDTO","type":"[InventoryItemDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.InventoryItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The inventory item details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the inventory item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The SKU of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The origin country of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The HS code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The mid code of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The material of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The weight of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The length of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The height of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The width of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The title of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The thumbnail of the inventory item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateInventoryItemsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updateInventoryLevelsWorkflow
|
||||
|
||||
This workflow updates one or more inventory levels.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateInventoryLevelsWorkflow","steps":[{"type":"step","name":"updateInventoryLevelsStep","description":"This step updates one or more inventory levels.","link":"../core_flows.Steps_Inventory/page.mdx#updateinventorylevelsstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateInventoryLevelsWorkflowInput","type":"[UpdateInventoryLevelsWorkflowInput](../interfaces/core_flows.UpdateInventoryLevelsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"updates","type":"[BulkUpdateInventoryLevelInput](../../types/InventoryTypes/interfaces/types.InventoryTypes.BulkUpdateInventoryLevelInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"id of the inventory level to update","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the associated inventory item in the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateInventoryLevelsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"InventoryLevelDTO[]","type":"[InventoryLevelDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.InventoryLevelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InventoryLevelDTO","type":"[InventoryLevelDTO](../../types/InventoryTypes/interfaces/types.InventoryTypes.InventoryLevelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The inventory level details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stocked_quantity","type":"`number`","description":"The stocked quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reserved_quantity","type":"`number`","description":"The reserved quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"incoming_quantity","type":"`number`","description":"The incoming quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"available_quantity","type":"`number`","description":"The available quantity of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the inventory level.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateInventoryLevelsWorkflow"/>
|
||||
@@ -0,0 +1,93 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Invite
|
||||
|
||||
## acceptInviteWorkflowId
|
||||
|
||||
`Const` **acceptInviteWorkflowId**: `"accept-invite-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## createInvitesWorkflowId
|
||||
|
||||
`Const` **createInvitesWorkflowId**: `"create-invite-step"`
|
||||
|
||||
___
|
||||
|
||||
## deleteInvitesWorkflowId
|
||||
|
||||
`Const` **deleteInvitesWorkflowId**: `"delete-invites-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## refreshInviteTokensWorkflowId
|
||||
|
||||
`Const` **refreshInviteTokensWorkflowId**: `"refresh-invite-tokens-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## acceptInviteWorkflow
|
||||
|
||||
This workflow accepts an invite and creates a user.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"acceptInviteWorkflow","steps":[{"type":"step","name":"validateTokenStep","description":"This step validates a specified token and returns its associated invite.","link":"../core_flows.Steps_Invite/page.mdx#validatetokenstep","depth":1},{"type":"step","name":"createUsersStep","description":"This step creates one or more users.","link":"../core_flows.Steps_User/page.mdx#createusersstep","depth":2},{"type":"step","name":"setAuthAppMetadataStep","description":"This step sets the `app_metadata` property of an auth identity.","link":"../core_flows.Steps_Auth/page.mdx#setauthappmetadatastep","depth":3},{"type":"step","name":"deleteInvitesStep","description":"This step deletes one or more invites.","link":"../core_flows.Steps_Invite/page.mdx#deleteinvitesstep","depth":4}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"AcceptInviteWorkflowInputDTO","type":"[AcceptInviteWorkflowInputDTO](../../types/WorkflowTypes/InviteWorkflow/interfaces/types.WorkflowTypes.InviteWorkflow.AcceptInviteWorkflowInputDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"invite_token","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="acceptInviteWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"UserDTO[]","type":"[UserDTO](../../user/interfaces/user.UserDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UserDTO","type":"[UserDTO](../../user/interfaces/user.UserDTO/page.mdx)","optional":false,"defaultValue":"","description":"The user details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The avatar URL of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The creation date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The updated date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the user.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="acceptInviteWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## createInvitesWorkflow
|
||||
|
||||
This workflow creates one or more invites.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createInvitesWorkflow","steps":[{"type":"step","name":"createInviteStep","description":"This step creates one or more invites.","link":"../core_flows.Steps_Invite/page.mdx#createinvitestep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateInvitesWorkflowInputDTO","type":"[CreateInvitesWorkflowInputDTO](../../types/WorkflowTypes/InviteWorkflow/interfaces/types.WorkflowTypes.InviteWorkflow.CreateInvitesWorkflowInputDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"invites","type":"[CreateInviteDTO](../../user/interfaces/user.CreateInviteDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The email of the invite.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"accepted","type":"`boolean`","description":"Whether the invite is accepted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createInvitesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"InviteDTO[]","type":"[InviteDTO](../../user/interfaces/user.InviteDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InviteDTO","type":"[InviteDTO](../../user/interfaces/user.InviteDTO/page.mdx)","optional":false,"defaultValue":"","description":"The invite details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the invite.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the invite.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"accepted","type":"`boolean`","description":"Whether the invite is accepted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"token","type":"`string`","description":"The token of the invite.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"expires_at","type":"`Date`","description":"The invite's expiry date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The invite's creation date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The invite's update date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The invite's deletion date.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createInvitesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteInvitesWorkflow
|
||||
|
||||
This workflow deletes one or more invites.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteInvitesWorkflow","steps":[{"type":"step","name":"deleteInvitesStep","description":"This step deletes one or more invites.","link":"../core_flows.Steps_Invite/page.mdx#deleteinvitesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteInvitesWorkflowInput","type":"[DeleteInvitesWorkflowInput](../../types/WorkflowTypes/InviteWorkflow/interfaces/types.WorkflowTypes.InviteWorkflow.DeleteInvitesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteInvitesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## refreshInviteTokensWorkflow
|
||||
|
||||
This workflow refreshes the token of one or more invites.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"refreshInviteTokensWorkflow","steps":[{"type":"step","name":"refreshInviteTokensStep","description":"This step refreshes the tokens of one or more invites.","link":"../core_flows.Steps_Invite/page.mdx#refreshinvitetokensstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"ResendInvitesWorkflowInputDTO","type":"[ResendInvitesWorkflowInputDTO](../../types/WorkflowTypes/InviteWorkflow/interfaces/types.WorkflowTypes.InviteWorkflow.ResendInvitesWorkflowInputDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"invite_ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refreshInviteTokensWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"InviteDTO[]","type":"[InviteDTO](../../user/interfaces/user.InviteDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InviteDTO","type":"[InviteDTO](../../user/interfaces/user.InviteDTO/page.mdx)","optional":false,"defaultValue":"","description":"The invite details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the invite.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the invite.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"accepted","type":"`boolean`","description":"Whether the invite is accepted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"token","type":"`string`","description":"The token of the invite.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"expires_at","type":"`Date`","description":"The invite's expiry date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The invite's creation date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The invite's update date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The invite's deletion date.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refreshInviteTokensWorkflow"/>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Line Item
|
||||
|
||||
<TypeList types={[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Workflows_Line Item"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteLineItemsWorkflowId
|
||||
|
||||
`Const` **deleteLineItemsWorkflowId**: `"delete-line-items"`
|
||||
|
||||
___
|
||||
|
||||
## deleteLineItemsWorkflow
|
||||
|
||||
This workflow deletes line items from a cart.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteLineItemsWorkflow","steps":[{"type":"step","name":"deleteLineItemsStep","description":"This step deletes line items.","link":"../core_flows.Steps_Line_Item/page.mdx#deletelineitemsstep","depth":1},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"../core_flows.Workflows_Cart/page.mdx#updatecartpromotionsworkflow","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteLineItemsWorkflowInput","type":"[DeleteLineItemsWorkflowInput](../types/core_flows.DeleteLineItemsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteLineItemsWorkflow"/>
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user