docs: [20/n] generate core-flows reference (#8803)
This commit is contained in:
1 parent
c617dc873b
commit
40330650e4
7 files changed
+1829
No files matched your search
@@ -0,0 +1,53 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Payment
|
||||
|
||||
<TypeList types={[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"namLine truncated
|
||||
|
||||
___
|
||||
|
||||
## capturePaymentWorkflowId
|
||||
|
||||
`Const` **capturePaymentWorkflowId**: `"capture-payment-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## refundPaymentWorkflowId
|
||||
|
||||
`Const` **refundPaymentWorkflowId**: `"refund-payment-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## capturePaymentWorkflow
|
||||
|
||||
This workflow captures a payment.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"capturePaymentWorkflow","steps":[{"type":"step","name":"capturePaymentStep","description":"This step captures a payment.","link":"../core_flows.Steps_Payment/page.mdx#capturepaymentstep","depth":1},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":2},{"type":"when","condition":"{\n return !!orderPayment?.order?.id\n }","depth":"3","steps":[{"type":"step","name":"addOrderTransactionStep","description":"This step creates an order transaction.","link":"../core_flows.Steps_Order/page.mdx#addordertransactionstep","depth":3}]},{"type":"step","name":"emitEventStep","description":"Emit an event.\n\n","link":"../core_flows.Steps_Common/page.mdx#emiteventstep","depth":4}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePaymentWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"naLine truncated
|
||||
|
||||
___
|
||||
|
||||
## refundPaymentWorkflow
|
||||
|
||||
This workflow refunds a payment.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"refundPaymentWorkflow","steps":[{"type":"step","name":"refundPaymentStep","description":"This step refunds a payment.","link":"../core_flows.Steps_Payment/page.mdx#refundpaymentstep","depth":1},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":2},{"type":"when","condition":"{\n return !!orderPayment?.order?.id\n }","depth":"3","steps":[{"type":"step","name":"addOrderTransactionStep","description":"This step creates an order transaction.","link":"../core_flows.Steps_Order/page.mdx#addordertransactionstep","depth":3}]},{"type":"step","name":"emitEventStep","description":"Emit an event.\n\n","link":"../core_flows.Steps_Common/page.mdx#emiteventstep","depth":4}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPaymentWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"naLine truncated
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Payment Collection
|
||||
|
||||
<TypeList types={[{"name":"payment_collection_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[CreateRefundReasonDTO](../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"[CreateRefundReasonDTO](../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"[CreateRefundReasonDTO](../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"[CreateRefundReasonDTO](../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../payment/interfaces/payment.PaymentProviderContext/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"billing_address","type":"Partial<[AddressDTO](../../payment/types/payment.AddressDTO/page.mdx)>","description":"The payment's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| Line truncated
|
||||
|
||||
___
|
||||
|
||||
## createPaymentSessionsWorkflowId
|
||||
|
||||
`Const` **createPaymentSessionsWorkflowId**: `"create-payment-sessions"`
|
||||
|
||||
___
|
||||
|
||||
## createRefundReasonsWorkflowId
|
||||
|
||||
`Const` **createRefundReasonsWorkflowId**: `"create-refund-reasons-workflow"`
|
||||
|
||||
___
|
||||
|
||||
## deletePaymentSessionsWorkflowId
|
||||
|
||||
`Const` **deletePaymentSessionsWorkflowId**: `"delete-payment-sessions"`
|
||||
|
||||
___
|
||||
|
||||
## updateRefundReasonsWorkflowId
|
||||
|
||||
`Const` **updateRefundReasonsWorkflowId**: `"update-refund-reasons"`
|
||||
|
||||
___
|
||||
|
||||
## createPaymentSessionsWorkflow
|
||||
|
||||
This workflow creates payment sessions.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createPaymentSessionsWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"createPaymentSessionStep","description":"This step creates a payment session.","link":"../core_flows.Steps_Payment_Collection/page.mdx#createpaymentsessionstep","depth":2},{"type":"workflow","name":"deletePaymentSessionsWorkflow","description":"This workflow deletes one or more payment sessions.","link":"page.mdx#deletepaymentsessionsworkflow","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreatePaymentSessionsWorkflowInput","type":"[CreatePaymentSessionsWorkflowInput](../interfaces/core_flows.CreatePaymentSessionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_collection_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../payment/interfaces/payment.PaymentProviderContext/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"billing_address","type":"Partial<[AddressDTO](../../payment/types/payment.AddressDTO/page.mdx)>","description":"The payment's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The associated customer's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"session_id","type":"`string`","description":"The ID of payment session the provider payment is associated with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"Partial<[CustomerDTO](../../payment/interfaces/payment.CustomerDTO/page.mdx)>","description":"The customer associated with this payment.","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](../../payment/interfaces/payment.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phoneLine truncated
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"PaymentSessionDTO","type":"[PaymentSessionDTO](../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount to authorize.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data necessary for the payment provider to process the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PaymentSessionStatus](../../payment/types/payment.PaymentSessionStatus/page.mdx)","description":"The status of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"The context necessary for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_at","type":"`Date`","description":"When the payment session was authorized.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection","type":"[PaymentCollectionDTO](../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","description":"The payment collection the session is associated with.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[PaymentCollectionStatus](../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":"","expandable":false,"children"Line truncated
|
||||
|
||||
___
|
||||
|
||||
## createRefundReasonsWorkflow
|
||||
|
||||
This workflow creates one or more refund reasons.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createRefundReasonsWorkflow","steps":[{"type":"step","name":"createRefundReasonStep","description":"This step creates one or more refund reasons.","link":"../core_flows.Steps_Payment_Collection/page.mdx#createrefundreasonstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateRefundReasonDTO](../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deletePaymentSessionsWorkflow
|
||||
|
||||
This workflow deletes one or more payment sessions.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deletePaymentSessionsWorkflow","steps":[{"type":"step","name":"deletePaymentSessionsStep","description":"This step deletes one or more payment sessions.\n\nNote: This step should not be used alone as it doesn't consider a revert\nUse deletePaymentSessionsWorkflow instead that uses this step","link":"../core_flows.Steps_Payment_Collection/page.mdx#deletepaymentsessionsstep","depth":1},{"type":"step","name":"validateDeletedPaymentSessionsStep","description":"This step validates that the specified payment session IDs were deleted.","link":"../core_flows.Steps_Payment_Collection/page.mdx#validatedeletedpaymentsessionsstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeletePaymentSessionsWorkflowInput","type":"[DeletePaymentSessionsWorkflowInput](../interfaces/core_flows.DeletePaymentSessionsWorkflowInput/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="deletePaymentSessionsWorkflow"/>
|
||||
|
||||
### 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="deletePaymentSessionsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updateRefundReasonsWorkflow
|
||||
|
||||
This workflow updates one or more refund reasons.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateRefundReasonsWorkflow","steps":[{"type":"step","name":"updateRefundReasonsStep","description":"This step updates one or more refund reasons.","link":"../core_flows.Steps_Payment_Collection/page.mdx#updaterefundreasonsstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateRefundReasonDTO[]","type":"[UpdateRefundReasonDTO](../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdateRefundReasonDTO","type":"[UpdateRefundReasonDTO](../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The id of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsWorkflow"/>
|
||||
@@ -0,0 +1,165 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Price List
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`BatchPriceListPricesWorkflowDTO`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`BatchPriceListPricesWorkflowDTO`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`BatchPriceListPricesWorkflowDTO`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`BatchPriceListPricesWorkflowDTO`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`CreatePriceListPricesWorkflowDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`CreatePriceListPricesWorkflowDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`CreatePriceListPricesWorkflowDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`CreatePriceListPricesWorkflowDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_lists_data","type":"`CreatePriceListWorkflowInputDTO`[]","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":[]},{"name":"data","type":"`UpdatePriceListPricesWorkflowDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdatePriceListPricesWorkflowDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdatePriceListPricesWorkflowDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdatePriceListPricesWorkflowDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_lists_data","type":"`UpdatePriceListWorkflowInputDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_lists_data","type":"`UpdatePriceListWorkflowInputDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_lists_data","type":"`UpdatePriceListWorkflowInputDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_lists_data","type":"`UpdatePriceListWorkflowInputDTO`[]","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_Price List"/>
|
||||
|
||||
___
|
||||
|
||||
## batchPriceListPricesWorkflowId
|
||||
|
||||
`Const` **batchPriceListPricesWorkflowId**: `"batch-price-list-prices"`
|
||||
|
||||
___
|
||||
|
||||
## createPriceListPricesWorkflowId
|
||||
|
||||
`Const` **createPriceListPricesWorkflowId**: `"create-price-list-prices"`
|
||||
|
||||
___
|
||||
|
||||
## createPriceListsWorkflowId
|
||||
|
||||
`Const` **createPriceListsWorkflowId**: `"create-price-lists"`
|
||||
|
||||
___
|
||||
|
||||
## deletePriceListsWorkflowId
|
||||
|
||||
`Const` **deletePriceListsWorkflowId**: `"delete-price-lists"`
|
||||
|
||||
___
|
||||
|
||||
## removePriceListPricesWorkflowId
|
||||
|
||||
`Const` **removePriceListPricesWorkflowId**: `"remove-price-list-prices"`
|
||||
|
||||
___
|
||||
|
||||
## updatePriceListPricesWorkflowId
|
||||
|
||||
`Const` **updatePriceListPricesWorkflowId**: `"update-price-list-prices"`
|
||||
|
||||
___
|
||||
|
||||
## updatePriceListsWorkflowId
|
||||
|
||||
`Const` **updatePriceListsWorkflowId**: `"update-price-lists"`
|
||||
|
||||
___
|
||||
|
||||
## batchPriceListPricesWorkflow
|
||||
|
||||
This workflow manages price lists' prices by creating, updating, or removing them.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"batchPriceListPricesWorkflow","steps":[{"type":"workflow","name":"createPriceListPricesWorkflow","description":"This workflow creates prices in price lists.","link":"page.mdx#createpricelistpricesworkflow","depth":1},{"type":"workflow","name":"updatePriceListPricesWorkflow","description":"This workflow update price lists' prices.","link":"page.mdx#updatepricelistpricesworkflow","depth":1},{"type":"workflow","name":"removePriceListPricesWorkflow","description":"This workflow removes price lists' prices.","link":"page.mdx#removepricelistpricesworkflow","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`BatchPriceListPricesWorkflowDTO`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchPriceListPricesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"BatchPriceListPricesWorkflowResult","type":"`BatchPriceListPricesWorkflowResult`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchPriceListPricesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## createPriceListPricesWorkflow
|
||||
|
||||
This workflow creates prices in price lists.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createPriceListPricesWorkflow","steps":[{"type":"step","name":"validatePriceListsStep","description":"This step validates that the specified price lists exist.","link":"../core_flows.Steps_Price_List/page.mdx#validatepricelistsstep","depth":1},{"type":"step","name":"validateVariantPriceLinksStep","description":"This step validates that the specified variants have prices.","link":"../core_flows.Steps_Price_List/page.mdx#validatevariantpricelinksstep","depth":1},{"type":"step","name":"createPriceListPricesStep","description":"This step creates prices for a price list.","link":"../core_flows.Steps_Price_List/page.mdx#createpricelistpricesstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`CreatePriceListPricesWorkflowDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPriceListPricesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"PriceDTO[]","type":"[PriceDTO](../../pricing/interfaces/pricing.PriceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceDTO","type":"[PriceDTO](../../pricing/interfaces/pricing.PriceDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The price of this price.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../pricing/types/pricing.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"min_quantity","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../pricing/types/pricing.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"max_quantity","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../pricing/types/pricing.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_set","type":"[PriceSetDTO](../../pricing/interfaces/pricing.PriceSetDTO/page.mdx)","description":"The price set associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../pricing/interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_price","type":"[CalculatedPriceSet](../../pricing/interfaces/pricing.CalculatedPriceSet/page.mdx)","description":"The calculated price based on the context.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_list","type":"[PriceListDTO](../../pricing/interfaces/pricing.PriceListDTO/page.mdx)","description":"The price list associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The price list's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","Line truncated
|
||||
|
||||
___
|
||||
|
||||
## createPriceListsWorkflow
|
||||
|
||||
This workflow creates one or more price lists.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createPriceListsWorkflow","steps":[{"type":"step","name":"validateVariantPriceLinksStep","description":"This step validates that the specified variants have prices.","link":"../core_flows.Steps_Price_List/page.mdx#validatevariantpricelinksstep","depth":1},{"type":"step","name":"createPriceListsStep","description":"This step creates a price list.","link":"../core_flows.Steps_Price_List/page.mdx#createpricelistsstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreatePriceListsWorkflowInput","type":"[CreatePriceListsWorkflowInput](../types/core_flows.CreatePriceListsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"price_lists_data","type":"`CreatePriceListWorkflowInputDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPriceListsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"PriceListDTO[]","type":"[PriceListDTO](../../pricing/interfaces/pricing.PriceListDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceListDTO","type":"[PriceListDTO](../../pricing/interfaces/pricing.PriceListDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price list's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The price list's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../pricing/types/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PriceListType](../../pricing/types/pricing.PriceListType/page.mdx)","description":"The price list's type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with this price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[PriceDTO](../../pricing/interfaces/pricing.PriceDTO/page.mdx)[]","description":"The associated price list money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The price of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"[PriceSetDTO](../../pricing/interfaces/pricing.PriceSetDTO/page.mdx)","description":"The price set associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"price_list","type":"[PriceListDTO](../../pricing/interfaces/pricing.PriceListDTO/page.mdx)","description":"The price list associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_rules","type":"[PriceRuleDTO](../../pricing/interfaces/pricing.PriceRuleDTO/page.mdx)[]","description":"The price rules associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"money_amounts","type":"[MoneyAmountDTO](../../pricing/interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The associated money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Line truncated
|
||||
|
||||
___
|
||||
|
||||
## deletePriceListsWorkflow
|
||||
|
||||
This workflow deletes one or more price lists.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deletePriceListsWorkflow","steps":[{"type":"step","name":"deletePriceListsStep","description":"This step deletes one or more price lists.","link":"../core_flows.Steps_Price_List/page.mdx#deletepricelistsstep","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="deletePriceListsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## removePriceListPricesWorkflow
|
||||
|
||||
This workflow removes price lists' prices.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"removePriceListPricesWorkflow","steps":[{"type":"step","name":"removePriceListPricesStep","description":"This step removes prices from a price list.","link":"../core_flows.Steps_Price_List/page.mdx#removepricelistpricesstep","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="removePriceListPricesWorkflow"/>
|
||||
|
||||
### 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="removePriceListPricesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updatePriceListPricesWorkflow
|
||||
|
||||
This workflow update price lists' prices.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updatePriceListPricesWorkflow","steps":[{"type":"step","name":"validatePriceListsStep","description":"This step validates that the specified price lists exist.","link":"../core_flows.Steps_Price_List/page.mdx#validatepricelistsstep","depth":1},{"type":"step","name":"validateVariantPriceLinksStep","description":"This step validates that the specified variants have prices.","link":"../core_flows.Steps_Price_List/page.mdx#validatevariantpricelinksstep","depth":1},{"type":"step","name":"updatePriceListPricesStep","description":"This step updates a price list's prices.","link":"../core_flows.Steps_Price_List/page.mdx#updatepricelistpricesstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`UpdatePriceListPricesWorkflowDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePriceListPricesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"PriceDTO[]","type":"[PriceDTO](../../pricing/interfaces/pricing.PriceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceDTO","type":"[PriceDTO](../../pricing/interfaces/pricing.PriceDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The price of this price.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../pricing/types/pricing.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"min_quantity","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../pricing/types/pricing.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"max_quantity","type":"[BigNumberValue](../../pricing/types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../pricing/types/pricing.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_set","type":"[PriceSetDTO](../../pricing/interfaces/pricing.PriceSetDTO/page.mdx)","description":"The price set associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../pricing/interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_price","type":"[CalculatedPriceSet](../../pricing/interfaces/pricing.CalculatedPriceSet/page.mdx)","description":"The calculated price based on the context.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_list","type":"[PriceListDTO](../../pricing/interfaces/pricing.PriceListDTO/page.mdx)","description":"The price list associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The price list's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","Line truncated
|
||||
|
||||
___
|
||||
|
||||
## updatePriceListsWorkflow
|
||||
|
||||
This workflow updates one or more price lists.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updatePriceListsWorkflow","steps":[{"type":"step","name":"validatePriceListsStep","description":"This step validates that the specified price lists exist.","link":"../core_flows.Steps_Price_List/page.mdx#validatepricelistsstep","depth":1},{"type":"step","name":"updatePriceListsStep","description":"This step updates one or more price lists.","link":"../core_flows.Steps_Price_List/page.mdx#updatepricelistsstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"price_lists_data","type":"`UpdatePriceListWorkflowInputDTO`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePriceListsWorkflow"/>
|
||||
@@ -0,0 +1,69 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Pricing
|
||||
|
||||
## createPricePreferencesWorkflowId
|
||||
|
||||
`Const` **createPricePreferencesWorkflowId**: `"create-price-preferences"`
|
||||
|
||||
___
|
||||
|
||||
## deletePricePreferencesWorkflowId
|
||||
|
||||
`Const` **deletePricePreferencesWorkflowId**: `"delete-price-preferences"`
|
||||
|
||||
___
|
||||
|
||||
## updatePricePreferencesWorkflowId
|
||||
|
||||
`Const` **updatePricePreferencesWorkflowId**: `"update-price-preferences"`
|
||||
|
||||
___
|
||||
|
||||
## createPricePreferencesWorkflow
|
||||
|
||||
This workflow creates one or more price preferences.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createPricePreferencesWorkflow","steps":[{"type":"step","name":"createPricePreferencesStep","description":"This step creates one or more price preferences.","link":"../core_flows.Steps_Pricing/page.mdx#createpricepreferencesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreatePricePreferencesWorkflowInput[]","type":"`CreatePricePreferencesWorkflowInput`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreatePricePreferencesWorkflowInput","type":"`CreatePricePreferencesWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPricePreferencesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"PricePreferenceDTO[]","type":"[PricePreferenceDTO](../../pricing/interfaces/pricing.PricePreferenceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PricePreferenceDTO","type":"[PricePreferenceDTO](../../pricing/interfaces/pricing.PricePreferenceDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price preference's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price preference.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`null` \\| `string`","description":"The rule attribute for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `string`","description":"The rule value for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price preference was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price preference was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price preference was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPricePreferencesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deletePricePreferencesWorkflow
|
||||
|
||||
This workflow deletes one or more price preferences.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deletePricePreferencesWorkflow","steps":[{"type":"step","name":"deletePricePreferencesStep","description":"This step deletes one or more price preferences.","link":"../core_flows.Steps_Pricing/page.mdx#deletepricepreferencesstep","depth":1}]}} />
|
||||
|
||||
### 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="deletePricePreferencesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updatePricePreferencesWorkflow
|
||||
|
||||
This workflow updates one or more price preferences.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updatePricePreferencesWorkflow","steps":[{"type":"step","name":"updatePricePreferencesStep","description":"This step updates price preferences matching the specified filters.","link":"../core_flows.Steps_Pricing/page.mdx#updatepricepreferencesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdatePricePreferencesWorkflowInput","type":"`UpdatePricePreferencesWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePricePreferencesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"PricePreferenceDTO[]","type":"[PricePreferenceDTO](../../pricing/interfaces/pricing.PricePreferenceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PricePreferenceDTO","type":"[PricePreferenceDTO](../../pricing/interfaces/pricing.PricePreferenceDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price preference's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price preference.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`null` \\| `string`","description":"The rule attribute for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `string`","description":"The rule value for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price preference was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price preference was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price preference was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePricePreferencesWorkflow"/>
|
||||
File diff suppressed because it is too large.
Load diff
+69
@@ -0,0 +1,69 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Product Category
|
||||
|
||||
## createProductCategoriesWorkflowId
|
||||
|
||||
`Const` **createProductCategoriesWorkflowId**: `"create-product-categories"`
|
||||
|
||||
___
|
||||
|
||||
## deleteProductCategoriesWorkflowId
|
||||
|
||||
`Const` **deleteProductCategoriesWorkflowId**: `"delete-product-categories"`
|
||||
|
||||
___
|
||||
|
||||
## updateProductCategoriesWorkflowId
|
||||
|
||||
`Const` **updateProductCategoriesWorkflowId**: `"update-product-categories"`
|
||||
|
||||
___
|
||||
|
||||
## createProductCategoriesWorkflow
|
||||
|
||||
This workflow creates one or more product categories.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createProductCategoriesWorkflow","steps":[{"type":"step","name":"createProductCategoriesStep","description":"This step creates one or more product categories.","link":"../core_flows.Steps_Product_Category/page.mdx#createproductcategoriesstep","depth":1},{"type":"step","name":"emitEventStep","description":"Emit an event.\n\n","link":"../core_flows.Steps_Common/page.mdx#emiteventstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateProductCategoriesWorkflowInput","type":"[CreateProductCategoriesWorkflowInput](../../types/WorkflowTypes/ProductCategoryWorkflow/interfaces/types.WorkflowTypes.ProductCategoryWorkflow.CreateProductCategoriesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"product_categories","type":"[CreateProductCategoryDTO](../../product/interfaces/product.CreateProductCategoryDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The product category's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The product category's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The product category's handle.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The ID of the parent product category, if it has any.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../product/types/product.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="createProductCategoriesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"ProductCategoryDTO[]","type":"[ProductCategoryDTO](../../product/interfaces/product.ProductCategoryDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductCategoryDTO","type":"[ProductCategoryDTO](../../product/interfaces/product.ProductCategoryDTO/page.mdx)","optional":false,"defaultValue":"","description":"A product category's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the product category among sibling categories.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"`null` \\| [ProductCategoryDTO](../../product/interfaces/product.ProductCategoryDTO/page.mdx)","description":"The associated parent category.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the product category among sibling categories.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"`null` \\| [ProductCategoryDTO](../../product/interfaces/product.ProductCategoryDTO/page.mdx)","description":"The associated parent category.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The associated parent category id.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"category_children","type":"[ProductCategoryDTO](../../product/interfaces/product.ProductCategoryDTO/page.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[ProductDTO](../../product/interfaces/product.ProductDTO/page.mdx)[]","description":"The associated products.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../product/types/product.MetadataType/page.mdx)","description":"The ranking of the product category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product category was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The associated parent category id.","optional":false,Line truncated
|
||||
|
||||
___
|
||||
|
||||
## deleteProductCategoriesWorkflow
|
||||
|
||||
This workflow deletes one or more product categories.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteProductCategoriesWorkflow","steps":[{"type":"step","name":"deleteProductCategoriesStep","description":"This step deletes one or more product categories.","link":"../core_flows.Steps_Product_Category/page.mdx#deleteproductcategoriesstep","depth":1},{"type":"step","name":"emitEventStep","description":"Emit an event.\n\n","link":"../core_flows.Steps_Common/page.mdx#emiteventstep","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="deleteProductCategoriesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updateProductCategoriesWorkflow
|
||||
|
||||
This workflow updates product categories matching specified filters.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateProductCategoriesWorkflow","steps":[{"type":"step","name":"updateProductCategoriesStep","description":"This step updates product categories matching specified filters.","link":"../core_flows.Steps_Product_Category/page.mdx#updateproductcategoriesstep","depth":1},{"type":"step","name":"emitEventStep","description":"Emit an event.\n\n","link":"../core_flows.Steps_Common/page.mdx#emiteventstep","depth":2}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateProductCategoriesWorkflowInput","type":"[UpdateProductCategoriesWorkflowInput](../../types/WorkflowTypes/ProductCategoryWorkflow/interfaces/types.WorkflowTypes.ProductCategoryWorkflow.UpdateProductCategoriesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterableProductCategoryProps](../../product/interfaces/product.FilterableProductCategoryProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductCategoryProps](../../product/interfaces/product.FilterableProductCategoryProps/page.mdx) \\| [BaseFilterable](../../product/interfaces/product.BaseFilterable/page.mdx)<[FilterableProductCategoryProps](../../product/interfaces/product.FilterableProductCategoryProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductCategoryProps](../../product/interfaces/product.FilterableProductCategoryProps/page.mdx) \\| [BaseFilterable](../../product/interfaces/product.BaseFilterable/page.mdx)<[FilterableProductCategoryProps](../../product/interfaces/product.FilterableProductCategoryProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableProductCategoryProps](../../product/interfaces/product.FilterableProductCategoryProps/page.mdx) \\| [BaseFilterable](../../product/interfaces/product.BaseFilterable/page.mdx)<[FilterableProductCategoryProps](../../product/interfaces/product.FilterableProductCategoryProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Filter product categories based on searchable fields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"The names to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string` \\| `string`[]","description":"Filter product categories by their parent category's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"The handles to filter product categories by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter product categories by whether they're active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter product categories by whether they're internal.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boolean`","description":"Whether to include children of retrieved product categories.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_ancestors_tree","type":"`boolean`","description":"Whether to include parents of retrieved product categories.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../product/interfaces/product.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../product/interfaces/product.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableProductCategoryProps](../../product/interfaces/product.FilterableProductCategoryProps/page.mdx) \\| [BaseFilterable](../../product/interfaces/product.BaseFilterable/page.mdx)<[FilterableProductCategoryProps](../../product/interfaces/product.FilterableProductCategoryProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableProductCategoryProps](../..Line truncated
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"ProductCategoryDTO[]","type":"[ProductCategoryDTO](../../product/interfaces/product.ProductCategoryDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ProductCategoryDTO","type":"[ProductCategoryDTO](../../product/interfaces/product.ProductCategoryDTO/page.mdx)","optional":false,"defaultValue":"","description":"A product category's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the product category among sibling categories.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"`null` \\| [ProductCategoryDTO](../../product/interfaces/product.ProductCategoryDTO/page.mdx)","description":"The associated parent category.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The handle of the product category. The handle can be used to create slug URL paths.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Whether the product category is active.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rank","type":"`number`","description":"The ranking of the product category among sibling categories.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category","type":"`null` \\| [ProductCategoryDTO](../../product/interfaces/product.ProductCategoryDTO/page.mdx)","description":"The associated parent category.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The associated parent category id.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"category_children","type":"[ProductCategoryDTO](../../product/interfaces/product.ProductCategoryDTO/page.mdx)[]","description":"The associated child categories.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"products","type":"[ProductDTO](../../product/interfaces/product.ProductDTO/page.mdx)[]","description":"The associated products.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the product category was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the product category was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../product/types/product.MetadataType/page.mdx)","description":"The ranking of the product category among sibling categories.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"When the product category was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"parent_category_id","type":"`null` \\| `string`","description":"The associated parent category id.","optional":false,Line truncated
|
||||
@@ -0,0 +1,199 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Tax
|
||||
|
||||
<TypeList types={[{"name":"rules","type":"[CreateTaxRateRuleDTO](../../tax/interfaces/tax.CreateTaxRateRuleDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../tax/types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the\nuser that created it.","optional":true,"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":"tax_rate_ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"Omit<[CreateTaxRateRuleDTO](../../tax/interfaces/tax.CreateTaxRateRuleDTO/page.mdx), \"tax_rate_id\">[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../tax/types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the\nuser that created it.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"selector","type":"[FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../tax/interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../tax/interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../tax/interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Find tax rates based on name and code properties through this search term.","optional":true,"defaultValue"Line truncated
|
||||
|
||||
___
|
||||
|
||||
## createTaxRateRulesWorkflowId
|
||||
|
||||
`Const` **createTaxRateRulesWorkflowId**: `"create-tax-rate-rules"`
|
||||
|
||||
___
|
||||
|
||||
## createTaxRatesWorkflowId
|
||||
|
||||
`Const` **createTaxRatesWorkflowId**: `"create-tax-rates"`
|
||||
|
||||
___
|
||||
|
||||
## createTaxRegionsWorkflowId
|
||||
|
||||
`Const` **createTaxRegionsWorkflowId**: `"create-tax-regions"`
|
||||
|
||||
___
|
||||
|
||||
## deleteTaxRateRulesWorkflowId
|
||||
|
||||
`Const` **deleteTaxRateRulesWorkflowId**: `"delete-tax-rate-rules"`
|
||||
|
||||
___
|
||||
|
||||
## deleteTaxRatesWorkflowId
|
||||
|
||||
`Const` **deleteTaxRatesWorkflowId**: `"delete-tax-rates"`
|
||||
|
||||
___
|
||||
|
||||
## deleteTaxRegionsWorkflowId
|
||||
|
||||
`Const` **deleteTaxRegionsWorkflowId**: `"delete-tax-regions"`
|
||||
|
||||
___
|
||||
|
||||
## setTaxRateRulesWorkflowId
|
||||
|
||||
`Const` **setTaxRateRulesWorkflowId**: `"set-tax-rate-rules"`
|
||||
|
||||
___
|
||||
|
||||
## updateTaxRatesWorkflowId
|
||||
|
||||
`Const` **updateTaxRatesWorkflowId**: `"update-tax-rates"`
|
||||
|
||||
___
|
||||
|
||||
## createTaxRateRulesWorkflow
|
||||
|
||||
This workflow creates one or more tax rate rules.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createTaxRateRulesWorkflow","steps":[{"type":"step","name":"createTaxRateRulesStep","description":"This step creates one or more tax rate rules.","link":"../core_flows.Steps_Tax/page.mdx#createtaxraterulesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateTaxRateRulesWorkflowInput","type":"[CreateTaxRateRulesWorkflowInput](../types/core_flows.CreateTaxRateRulesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"rules","type":"[CreateTaxRateRuleDTO](../../tax/interfaces/tax.CreateTaxRateRuleDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../tax/types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the\nuser that created it.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTaxRateRulesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"TaxRateRuleDTO[]","type":"[TaxRateRuleDTO](../../tax/interfaces/tax.TaxRateRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"TaxRateRuleDTO","type":"[TaxRateRuleDTO](../../tax/interfaces/tax.TaxRateRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The tax rate rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax rate rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the tax rate rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax rate rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the user\nthat created the tax rate rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate","type":"[TaxRateDTO](../../tax/interfaces/tax.TaxRateDTO/page.mdx)","description":"The associated tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code the tax rate is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the Tax Rate.","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":"tax_region_id","type":"`string`","description":"The ID of the associated tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate should be combined with parent rates.\n\nLearn more [here](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#combinable-tax-rates).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default rate for the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate. For example, the ID of the user that created the tax rate.","optional":false,"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="createTaxRateRulesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## createTaxRatesWorkflow
|
||||
|
||||
This workflow creates one or more tax rates.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createTaxRatesWorkflow","steps":[{"type":"step","name":"createTaxRatesStep","description":"This step creates one or more tax rates.","link":"../core_flows.Steps_Tax/page.mdx#createtaxratesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateTaxRateDTO[]","type":"[CreateTaxRateDTO](../../tax/interfaces/tax.CreateTaxRateDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateTaxRateDTO","type":"[CreateTaxRateDTO](../../tax/interfaces/tax.CreateTaxRateDTO/page.mdx)","optional":false,"defaultValue":"","description":"The tax rate to be created.","expandable":false,"children":[{"name":"tax_region_id","type":"`string`","description":"The associated tax region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"Omit<[CreateTaxRateRuleDTO](../../tax/interfaces/tax.CreateTaxRateRuleDTO/page.mdx), \"tax_rate_id\">[]","description":"The rules of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../tax/types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the\nuser that created it.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is default.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"Who created the tax rate. For example, the ID of the user\nthat created the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../tax/types/tax.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="createTaxRatesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"TaxRateDTO[]","type":"[TaxRateDTO](../../tax/interfaces/tax.TaxRateDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"TaxRateDTO","type":"[TaxRateDTO](../../tax/interfaces/tax.TaxRateDTO/page.mdx)","optional":false,"defaultValue":"","description":"The tax rate details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code the tax rate is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the Tax Rate.","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":"tax_region_id","type":"`string`","description":"The ID of the associated tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate should be combined with parent rates.\n\nLearn more [here](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#combinable-tax-rates).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default rate for the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate. For example, the ID of the user that created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTaxRatesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## createTaxRegionsWorkflow
|
||||
|
||||
This workflow creates one or more tax regions.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createTaxRegionsWorkflow","steps":[{"type":"step","name":"createTaxRegionsStep","description":"This step creates one or more tax regions.","link":"../core_flows.Steps_Tax/page.mdx#createtaxregionsstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateTaxRegionDTO[]","type":"[CreateTaxRegionDTO](../../tax/interfaces/tax.CreateTaxRegionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateTaxRegionDTO","type":"[CreateTaxRegionDTO](../../tax/interfaces/tax.CreateTaxRegionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The tax region to be created.","expandable":false,"children":[{"name":"country_code","type":"`string`","description":"The ISO 3 character country code of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The province code of the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`null` \\| `string`","description":"The ID of the tax region's parent.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../tax/types/tax.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 tax region. For example, the ID of\nthe user that created the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_tax_rate","type":"`object`","description":"The default tax rate of the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../tax/types/tax.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="createTaxRegionsWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"TaxRegionDTO[]","type":"[TaxRegionDTO](../../tax/interfaces/tax.TaxRegionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"TaxRegionDTO","type":"[TaxRegionDTO](../../tax/interfaces/tax.TaxRegionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The tax region details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The ISO 2 character country code of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The province code of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`null` \\| `string`","description":"The ID of the tax region's parent tax region.","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 tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax region. For example, the ID of the user\nthat created the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTaxRegionsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteTaxRateRulesWorkflow
|
||||
|
||||
This workflow deletes one or more tax rate rules.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteTaxRateRulesWorkflow","steps":[{"type":"step","name":"deleteTaxRateRulesStep","description":"This step deletes one or more tax rate rules.","link":"../core_flows.Steps_Tax/page.mdx#deletetaxraterulesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteTaxRateRulesWorkflowInput","type":"[DeleteTaxRateRulesWorkflowInput](../types/core_flows.DeleteTaxRateRulesWorkflowInput/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="deleteTaxRateRulesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteTaxRatesWorkflow
|
||||
|
||||
This workflow deletes one or more tax rates.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteTaxRatesWorkflow","steps":[{"type":"step","name":"deleteTaxRatesStep","description":"This step deletes one or more tax rates.","link":"../core_flows.Steps_Tax/page.mdx#deletetaxratesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteTaxRatesWorkflowInput","type":"[DeleteTaxRatesWorkflowInput](../types/core_flows.DeleteTaxRatesWorkflowInput/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="deleteTaxRatesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## deleteTaxRegionsWorkflow
|
||||
|
||||
This workflow deletes one or more tax regions.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteTaxRegionsWorkflow","steps":[{"type":"step","name":"deleteTaxRegionsStep","description":"This step deletes one or more tax regions.","link":"../core_flows.Steps_Tax/page.mdx#deletetaxregionsstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteTaxRegionsWorkflowInput","type":"[DeleteTaxRegionsWorkflowInput](../types/core_flows.DeleteTaxRegionsWorkflowInput/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="deleteTaxRegionsWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## setTaxRateRulesWorkflow
|
||||
|
||||
This workflow sets the rules of tax rates.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"setTaxRateRulesWorkflow","steps":[{"type":"step","name":"listTaxRateRuleIdsStep","description":"This step retrieves the IDs of tax rate rules matching the specified filters.","link":"../core_flows.Steps_Tax/page.mdx#listtaxrateruleidsstep","depth":1},{"type":"step","name":"deleteTaxRateRulesStep","description":"This step deletes one or more tax rate rules.","link":"../core_flows.Steps_Tax/page.mdx#deletetaxraterulesstep","depth":2},{"type":"step","name":"createTaxRateRulesStep","description":"This step creates one or more tax rate rules.","link":"../core_flows.Steps_Tax/page.mdx#createtaxraterulesstep","depth":3}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"SetTaxRatesRulesWorkflowInput","type":"[SetTaxRatesRulesWorkflowInput](../types/core_flows.SetTaxRatesRulesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"tax_rate_ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"Omit<[CreateTaxRateRuleDTO](../../tax/interfaces/tax.CreateTaxRateRuleDTO/page.mdx), \"tax_rate_id\">[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../tax/types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the\nuser that created it.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="setTaxRateRulesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"TaxRateRuleDTO[]","type":"[TaxRateRuleDTO](../../tax/interfaces/tax.TaxRateRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"TaxRateRuleDTO","type":"[TaxRateRuleDTO](../../tax/interfaces/tax.TaxRateRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The tax rate rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax rate rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the tax rate rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax rate rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the user\nthat created the tax rate rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate","type":"[TaxRateDTO](../../tax/interfaces/tax.TaxRateDTO/page.mdx)","description":"The associated tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code the tax rate is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the Tax Rate.","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":"tax_region_id","type":"`string`","description":"The ID of the associated tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate should be combined with parent rates.\n\nLearn more [here](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#combinable-tax-rates).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default rate for the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate. For example, the ID of the user that created the tax rate.","optional":false,"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="setTaxRateRulesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## maybeListTaxRateRuleIdsStep
|
||||
|
||||
This step lists the rules to update in a tax rate update object.
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"MaybeListTaxRateRuleIdsStepInput","type":"[MaybeListTaxRateRuleIdsStepInput](../types/core_flows.MaybeListTaxRateRuleIdsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"tax_rate_ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"[UpdateTaxRateDTO](../../tax/interfaces/tax.UpdateTaxRateDTO/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"Omit<[CreateTaxRateRuleDTO](../../tax/interfaces/tax.CreateTaxRateRuleDTO/page.mdx), \"tax_rate_id\">[]","description":"The rules of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../tax/types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the\nuser that created it.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is default.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable.\n\nLearn more [here](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#combinable-tax-rates).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../tax/types/tax.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="maybeListTaxRateRuleIdsStep"/>
|
||||
|
||||
### 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="maybeListTaxRateRuleIdsStep"/>
|
||||
|
||||
___
|
||||
|
||||
## updateTaxRatesWorkflow
|
||||
|
||||
This workflow updates tax rates matching specified filters.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateTaxRatesWorkflow","steps":[{"type":"step","name":"updateTaxRatesStep","description":"This step updates tax rates matching the specified filters.","link":"../core_flows.Steps_Tax/page.mdx#updatetaxratesstep","depth":1},{"type":"step","name":"deleteTaxRateRulesStep","description":"This step deletes one or more tax rate rules.","link":"../core_flows.Steps_Tax/page.mdx#deletetaxraterulesstep","depth":2},{"type":"step","name":"createTaxRateRulesStep","description":"This step creates one or more tax rate rules.","link":"../core_flows.Steps_Tax/page.mdx#createtaxraterulesstep","depth":3}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UpdateTaxRatesWorkflowInput","type":"[UpdateTaxRatesWorkflowInput](../types/core_flows.UpdateTaxRatesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../tax/interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../tax/interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../tax/interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Find tax rates based on name and code properties through this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the tax rates by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string` \\| `string`[]","description":"Filter the tax rates by their associated tax regions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number` \\| [OperatorMap](../../tax/types/tax.OperatorMap/page.mdx)<number> \\| `number`[]","description":"Filter the tax rates by their rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../tax/types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [OperatorMap](../../tax/types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../tax/types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their creation date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../tax/types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their update date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[] \\| [OperatorMap](../../tax/types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by who created it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../tax/interfaces/tax.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../tax/interfaces/tax.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../tax/interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../tax/interfaces/tax.FilterableTaxRateProps/paLine truncated
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"TaxRateDTO[]","type":"[TaxRateDTO](../../tax/interfaces/tax.TaxRateDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"TaxRateDTO","type":"[TaxRateDTO](../../tax/interfaces/tax.TaxRateDTO/page.mdx)","optional":false,"defaultValue":"","description":"The tax rate details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code the tax rate is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the Tax Rate.","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":"tax_region_id","type":"`string`","description":"The ID of the associated tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate should be combined with parent rates.\n\nLearn more [here](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#combinable-tax-rates).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default rate for the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate. For example, the ID of the user that created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateTaxRatesWorkflow"/>
|
||||
Reference in new issue
Block a user